diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
deleted file mode 100644
index 8822471392b3e99659485aa565173cebba33c166..0000000000000000000000000000000000000000
--- a/devNotes/twine JS.txt	
+++ /dev/null
@@ -1,40833 +0,0 @@
-config.history.maxStates = 1; /* If you remove this, I will fucking yell at you. Stop. Doing. It. */
-config.saves.autosave = "autosave";
-State.expired.disable;
-
-/*:: StoryJS [script]*/
-
-/*config.history.tracking = false;*/
-State.expired.disable;
-
-window.variableAsNumber = function(x, defaultValue, minValue, maxValue) {
-	x = Number(x)
-	if (x != x) {//NaN
-		return defaultValue || 0;//In case the default value was not supplied.
-	}
-	if (x < minValue) {//Works even if minValue is undefined.
-		return minValue;
-	}
-	if (x > maxValue) {//Works even if maxValue is undefined.
-		return maxValue;
-	}
-	return x;
-};
-window.isSexuallyPure = function(slave) {
-	if (!slave) {
-		return null;
-	}
-	if (slave.vagina < 1 && slave.anus < 1 && !slave.analCount && !slave.vaginalCount && !slave.oralCount && !slave.mammaryCount && !slave.penetrativeCount) {
-		return true;
-	} else {
-		return false;
-	}
-};
-if (typeof interpolate == "undefined") {
-	var interpolate = function(x0,y0,x1,y1,x) {
-		if(x <= x0) {
-			return y0;
-		} else if(x >= x1) {
-			return y1;
-		} else {
-			return (x - x0) * ((y1 - y0) / (x1 - x0)) + y0;
-		}
-	};
-	window.interpolate = interpolate;
-}
-
-window.isFullyPotent = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.dick > 0 && slave.balls > 0 && slave.ballType != 'sterile' && slave.hormoneBalance < 100 && slave.drugs !== 'hormone blockers') {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-/* mousetrap v1.5.3 craig.is/killing/mice */
-(function(C,r,g){function t(a,b,h){a.addEventListener?a.addEventListener(b,h,!1):a.attachEvent("on"+b,h)}function x(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return l[a.which]?l[a.which]:p[a.which]?p[a.which]:String.fromCharCode(a.which).toLowerCase()}function D(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function u(a){return"shift"==a||"ctrl"==a||"alt"==a||
-"meta"==a}function y(a,b){var h,c,e,g=[];h=a;"+"===h?h=["+"]:(h=h.replace(/\+{2}/g,"+plus"),h=h.split("+"));for(e=0;e<h.length;++e)c=h[e],z[c]&&(c=z[c]),b&&"keypress"!=b&&A[c]&&(c=A[c],g.push("shift")),u(c)&&g.push(c);h=c;e=b;if(!e){if(!k){k={};for(var m in l)95<m&&112>m||l.hasOwnProperty(m)&&(k[l[m]]=m)}e=k[h]?"keydown":"keypress"}"keypress"==e&&g.length&&(e="keydown");return{key:c,modifiers:g,action:e}}function B(a,b){return null===a||a===r?!1:a===b?!0:B(a.parentNode,b)}function c(a){function b(a){a=
-a||{};var b=!1,n;for(n in q)a[n]?b=!0:q[n]=0;b||(v=!1)}function h(a,b,n,f,c,h){var g,e,l=[],m=n.type;if(!d._callbacks[a])return[];"keyup"==m&&u(a)&&(b=[a]);for(g=0;g<d._callbacks[a].length;++g)if(e=d._callbacks[a][g],(f||!e.seq||q[e.seq]==e.level)&&m==e.action){var k;(k="keypress"==m&&!n.metaKey&&!n.ctrlKey)||(k=e.modifiers,k=b.sort().join(",")===k.sort().join(","));k&&(k=f&&e.seq==f&&e.level==h,(!f&&e.combo==c||k)&&d._callbacks[a].splice(g,1),l.push(e))}return l}function g(a,b,n,f){d.stopCallback(b,
-b.target||b.srcElement,n,f)||!1!==a(b,n)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function e(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=x(a);b&&("keyup"==a.type&&w===b?w=!1:d.handleKey(b,D(a),a))}function l(a,c,n,f){function e(c){return function(){v=c;++q[a];clearTimeout(k);k=setTimeout(b,1E3)}}function h(c){g(n,c,a);"keyup"!==f&&(w=x(c));setTimeout(b,10)}for(var d=q[a]=0;d<c.length;++d){var p=d+1===c.length?h:e(f||
-y(c[d+1]).action);m(c[d],p,f,a,d)}}function m(a,b,c,f,e){d._directMap[a+":"+c]=b;a=a.replace(/\s+/g," ");var g=a.split(" ");1<g.length?l(a,g,b,c):(c=y(a,c),d._callbacks[c.key]=d._callbacks[c.key]||[],h(c.key,c.modifiers,{type:c.action},f,a,e),d._callbacks[c.key][f?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:f,level:e,combo:a}))}var d=this;a=a||r;if(!(d instanceof c))return new c(a);d.target=a;d._callbacks={};d._directMap={};var q={},k,w=!1,p=!1,v=!1;d._handleKey=function(a,
-c,e){var f=h(a,c,e),d;c={};var k=0,l=!1;for(d=0;d<f.length;++d)f[d].seq&&(k=Math.max(k,f[d].level));for(d=0;d<f.length;++d)f[d].seq?f[d].level==k&&(l=!0,c[f[d].seq]=1,g(f[d].callback,e,f[d].combo,f[d].seq)):l||g(f[d].callback,e,f[d].combo);f="keypress"==e.type&&p;e.type!=v||u(a)||f||b(c);p=l&&"keydown"==e.type};d._bindMultiple=function(a,b,c){for(var d=0;d<a.length;++d)m(a[d],b,c)};t(a,"keypress",e);t(a,"keydown",e);t(a,"keyup",e)}var l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",
-20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},p={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},A={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},z={option:"alt",command:"meta","return":"enter",
-escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},k;for(g=1;20>g;++g)l[111+g]="f"+g;for(g=0;9>=g;++g)l[g+96]=g;c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={};this._directMap=
-{};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||B(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.init=function(){var a=c(r),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a,arguments)}}(b))};c.init();C.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=
-c);"function"===typeof define&&define.amd&&define(function(){return c})})(window,document);
-
-Mousetrap.bind("enter", function () {
-	$("#story-caption #endWeekButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("space", function () {
-	$("#story-caption #nextButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("c", function () {
-	$("#story-caption #manageArcology a.macro-link").trigger("click");
-});
-Mousetrap.bind("p", function () {
-	$("#story-caption #managePenthouse a.macro-link").trigger("click");
-});
-Mousetrap.bind("n", function () {
-	$("#story-caption #manageEconomy a.macro-link").trigger("click");
-});
-Mousetrap.bind("left", function () {
-	$("#prevSlave a.macro-link").trigger("click");
-	$("#prevRule a").trigger("click");
-	$("#prevChild a.macro-link").trigger("click");
-});
-Mousetrap.bind("q", function () {
-	$("#prevSlave a.macro-link").trigger("click");
-	$("#prevRule a").trigger("click");
-	$("#prevChild a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+left", function () {
-	$("#firstRule a").trigger("click");
-});
-Mousetrap.bind("shift+q", function () {
-	$("#firstRule a").trigger("click");
-});
-Mousetrap.bind("right", function () {
-	$("#nextSlave a.macro-link").trigger("click");
-	$("#nextRule a").trigger("click");
-	$("#nextChild a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+right", function () {
-	$("#lastRule a").trigger("click");
-});
-Mousetrap.bind("e", function () {
-	$("#nextSlave a.macro-link").trigger("click");
-	$("#nextRule a").trigger("click");
-	$("#nextChild a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+e", function () {
-	$("#lastRule a").trigger("click");
-});
-Mousetrap.bind("f", function () {
-	$("#walkpast a.macro-link").trigger("click");
-});
-Mousetrap.bind("h", function () {
-	$("#manageHG a.macro-link").trigger("click");
-});
-Mousetrap.bind("s", function () {
-	$("#buySlaves a.macro-link").trigger("click");
-});
-Mousetrap.bind("a", function () {
-	$("#managePA a.macro-link").trigger("click");
-});
-Mousetrap.bind("b", function () {
-	$("#manageBG a.macro-link").trigger("click");
-});
-Mousetrap.bind("u", function () {
-	$("#manageRecruiter a.macro-link").trigger("click");
-});
-Mousetrap.bind("o", function () {
-	$("#story-caption #optionsButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("y", function () {
-	$("#story-caption #policyButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("f", function () {
-	$("#story-caption #FSButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("t", function () {
-	$("#story-caption #PAOButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("v", function () {
-	$("#story-caption #URButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("r", function () {
-	$("#RAButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("x", function () {
-	$("#story-caption #managePerson a.macro-link").trigger("click");
-});
-Mousetrap.bind("z", function () {
-	$("#story-caption #SFMButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("d", function () {
-	$("#story-caption #edictButton a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+s", function () {
-	$("#story-caption #securityHQ a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+a", function () {
-	$("#story-caption #secBarracks a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+h", function () {
-	$("#story-caption #propHub a.macro-link").trigger("click");
-});
-Mousetrap.bind("shift+r", function () {
-	$("#story-caption #riotCenter a.macro-link").trigger("click");
-});
-/**
- * BoobGenerator namespace.
- */
-if (typeof BoobGenerator == "undefined") {
-	var BoobGenerator = {
-		rollBreast: function (modif) {
-			var volume = [0, 300, 500, 650, 800, 1000, 1200, 1400, 1600, 1800, 2050, 2300, 2600, 2900, 3250, 3600, 3950, 4300, 4700, 5100, 5500, 5900];
-			var volume_dist = [90000, 470000, 720000, 840000, 908574, 947759, 970151, 982946, 990258, 994436, 996824, 998188, 998968, 999414, 999669, 999814, 999897, 999945, 999972, 999987, 999995, 1000000];
-			var randomRoll = Math.floor(Math.random() * 1000000) + 1
-			var actualSize = 0
-			while (randomRoll > volume_dist[actualSize]) {
-				actualSize = actualSize + 1
-			}
-			var minorSizeAdjustment = 0
-			if (Math.random()<.5) {
-				minorSizeAdjustment = (Math.floor(Math.random() * 2) + 1) * 50
-			}
-			var volResult = volume[actualSize] + minorSizeAdjustment + modif
-			if (volResult < 0) {volResult = 0}
-			return volResult
-		}
-	};
-	// Raise namespace scope to Global.
-	window.BoobGenerator = BoobGenerator;
-};
-
-/**
- * Slave checker namespace.
- */
-if (typeof SlaveStatsChecker == "undefined") {
-	var SlaveStatsChecker = {
-		checkForLisp: function (slave) {
-				/* Begin mod section: toggle whether slaves lisp. */
-				if (State && State.variables.disableLisping == 1) {
-					return false;
-				}
-				/* End mod section: toggle whether slaves lisp. */
-				return ((slave.lips > 70) || (slave.lipsPiercing + slave.tonguePiercing > 2) || (slave.teeth == "gapped"))
-			}
-	};
-	// Raise namespace scope to Global.
-	window.SlaveStatsChecker = SlaveStatsChecker;
-};
-
-window.removeFromArray = function(arr, val) {
-	for (var i = 0; i < arr.length; i++) {
-		if (val == arr[i])
-			return arr.splice(i,1);
-	}
-	return null;
-};
-
-window.filterInPlace = function(arr, callback, thisArg) {
-	var j = 0;
-
-	arr.forEach(function(e, i) {
-		if (callback.call(thisArg, e, i, arr))
-			arr[j++] = e;
-	});
-
-	arr.length = j;
-	return arr;
-};
-
-if (typeof FertilityAge == "undefined") {
-	var FertilityAge = {
-		setAge: function (age) {
-			age = Number(age);
-			if (age != age) {
-				return 13;
-			} else {
-				return age;
-			}
-		}
-	};
-	// Raise namespace scope to Global.
-	window.FertilityAge = FertilityAge;
-};
-
-window.canGetPregnant = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.preg == -1) { /* contraceptives check */
-		return false;
-	} else if (!isFertile(slave)) { /* check other fertility factors */
-		return false;
-	} else if ((slave.ovaries == 1) && (canDoVaginal(slave))) {
-		return true;
-	} else if ((slave.mpreg == 1) && (canDoAnal(slave))) { /* pregmod */
-		return true;
-	} else {
-		return false;
-	}
-};
-
-/* pregmod: are slave2's sperm compatible with slave1's eggs? */
-window.canBreed = function(slave1, slave2) {
-	if (!slave1 || !slave2) {
-		return null;
-	} else if (slave1.eggType == slave2.ballType) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-/* assuming slave1 is fertile, could slave2 impregnate slave1? slave2 must have dick and balls with compatible sperm; both slaves must not be in chastity; slave2 need not achieve erection */
-window.canImpreg = function(slave1, slave2) {
-	if (!slave1 || !slave2) {
-		return null;
-	} else if (slave2.dick < 1) {
-		return false;
-	} else if (slave2.ID === -1) {
-		if (slave1.eggType != "human") {
-			return false;
-		} else if (!canGetPregnant(slave1)) { /* includes chastity checks */
-			return false;
-		} else {
-			return true;
-		}
-	} else if (slave2.balls < 1) {
-		return false;
-	} else if (slave2.dickAccessory == "chastity") {
-		return false;
-	} else if (slave2.dickAccessory == "combined chastity") {
-		return false;
-	} else if (slave2.pubertyXY == 0) { /* pregmod start */
-		return false;
-	} else if (slave2.vasectomy == 1) {
-		return false;
-	} else if (slave1.ID === -1) {
-		if (slave2.ballType != "human") {
-			return false;
-		} else if (!isPlayerFertile(slave1)) {
-			return false;
-		} else {
-			return true;
-		}
-	} else if (!canBreed(slave1, slave2)) {
-		return false; /* pregmod end */
-	} else if (!canGetPregnant(slave1)) { /* includes chastity checks */
-		return false;
-	} else {
-		return true;
-	}
-};
-
-/* contraceptives (.preg == -1) do not negate this function */
-window.isFertile = function(slave) {
-	if (!slave) {
-		return null;
-	}
-
-	if (slave.womb.length > 0 && slave.geneticQuirks.superfetation < 2 && slave.ovaImplant < 1) { /* currently pregnant without superfetation */
-		return false;
-	} else if (slave.womb.length > 0) { /* temp failure condition to prevent current double preg bug */
-		return false;
-	} else if (slave.broodmother > 0) { /* currently broodmother */
-		return false;
-	} else if (slave.preg < -1) { /* sterile */
-		return false;
-	} else if (slave.pregWeek < 0) { /* postpartum */
-		return false;
-	} else if (slave.pubertyXX == 0) { /* pregmod start */
-		return false;
-	} else if (slave.ovaryAge >= 47) {
-		return false;
-	} else if (slave.inflation > 2) {
-		return false;
-	} else if (slave.bellyImplant != -1) {
-		return false;
-	} else if (slave.mpreg == 1) {
-		return true; /* pregmod end */
-	} else if (slave.ovaries == 1) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.isPlayerFertile = function(PC) {
-	if (!PC) {
-		return null;
-	} else if (PC.preg != 0) { /* currently pregnant, sterile, menopausal or on contraceptives */
-		return false;
-	} else if (PC.pregWeek < 0) { /* postpartum */
-		return false;
-	} else if (PC.vagina == 1) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.canAchieveErection = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.dick < 7 && slave.dick > 0 && slave.drugs !== 'hormone blockers' && (slave.balls > 0 ? slave.hormoneBalance < 100 : slave.hormoneBalance <= -100) && slave.ballType != 'sterile') {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.canPenetrate = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (!canAchieveErection(slave)) {
-		return false;
-	} else if (slave.dickAccessory == "chastity") {
-		return false;
-	} else if (slave.dickAccessory == "combined chastity") {
-		return false;
-	} else if (slave.dick > 7) {
-		return false;
-	}
-	return true;
-};
-
-window.canSee = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.eyes > -2) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.canHear = function(slave) {
-	if (!slave) {
-		return null;
-	} else if ((slave.hears > -2) && (slave.earwear != "deafening ear plugs")) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.canWalk = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.amp == 1) {
-		return false;
-	} else if (tooFatSlave(slave)) {
-		return false;
-	} else if (tooBigBreasts(slave)) {
-		return false;
-	} else if (tooBigDick(slave)) {
-		return false;
-	} else if (tooBigBalls(slave)) {
-		return false;
-	} else if (tooBigButt(slave)) {
-		return false;
-	} else if (tooBigBelly(slave)) {
-		return false;
-	} else if (slave.heels == 0) {
-		return true;
-	} else if (slave.shoes == "heels") {
-		return true;
-	} else if (slave.shoes == "extreme heels") {
-		return true;
-	} else if (slave.shoes == "boots") {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.canTalk = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.accent > 2) {
-		return false;
-	} else if (slave.voice == 0) {
-		return false;
-	} else if (slave.lips > 95) {
-		return false;
-	} else if (slave.collar == "dildo gag") {
-		return false;
-	} else if (slave.collar == "massive dildo gag") {
-		return false;
-	} else if (slave.collar == "ball gag") {
-		return false;
-	} else if (slave.collar == "bit gag") {
-		return false;
-	} else {
-		return true;
-	}
-};
-
-window.canDoAnal = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.vaginalAccessory == "anal chastity") {
-		return false;
-	} else if (slave.dickAccessory == "anal chastity") {
-		return false;
-	} else if (slave.vaginalAccessory == "combined chastity") {
-		return false;
-	} else if (slave.dickAccessory == "combined chastity") {
-		return false;
-	}
-	return true;
-};
-
-window.canDoVaginal = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.vagina < 0) {
-		return false;
-	} else if (slave.vaginalAccessory == "chastity belt") {
-		return false;
-	} else if (slave.vaginalAccessory == "combined chastity") {
-		return false;
-	}
-	return true;
-};
-
-window.tooFatSlave = function(slave){
-	if (!slave) {
-		return null;
-	} else if (slave.weight > 190+(slave.muscles/5) && slave.physicalAge >= 18) {
-		return true;
-	} else if (slave.weight > 130+(slave.muscles/20) && slave.physicalAge <= 3) {
-		return true;
-	} else if (slave.weight > 160+(slave.muscles/15) && slave.physicalAge <= 12) {
-		return true;
-	} else if (slave.weight > 185+(slave.muscles/10) && slave.physicalAge < 18) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.tooBigBreasts = function(slave){
-	if (!slave) {
-		return null;
-	} else if (slave.boobs > 30000+(slave.muscles*100) && slave.physicalAge >= 18) {
-		return true;
-	} else if (slave.boobs > 5000+(slave.muscles*10) && slave.physicalAge <= 3) {
-		return true;
-	} else if (slave.boobs > 10000+(slave.muscles*20) && slave.physicalAge <= 12) {
-		return true;
-	} else if (slave.boobs > 20000+(slave.muscles*50) && slave.physicalAge < 18) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.tooBigBelly = function(slave){
-	if (!slave) {
-		return null;
-	} else if (slave.belly >= 450000+(slave.muscles*2000) && slave.physicalAge >= 18) {
-		return true;
-	} else if (slave.belly >= 350000+(slave.muscles*1000) && slave.physicalAge >= 13) {
-		return true;
-	} else if (slave.belly >= 30000+(slave.muscles*500) && slave.physicalAge <= 3) {
-		return true;
-	} else if (slave.belly >= 150000+(slave.muscles*800) && slave.physicalAge <= 12) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.tooBigBalls = function(slave){
-	if (!slave) {
-		return null;
-	} else if (slave.balls >= 30+(slave.muscles*.3) && slave.physicalAge <= 3) {
-		return true;
-	} else if (slave.balls >= 60+(slave.muscles*.5) && slave.physicalAge <= 12) {
-		return true;
-	} else if (slave.balls >= 90+(slave.muscles*.7)) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.tooBigDick = function(slave){
-	if (!slave) {
-		return null;
-	} else if (slave.dick >= 20+(slave.muscles*.1) && slave.physicalAge <= 3 && slave.dick !== 0) {
-		return true;
-	} else if (slave.dick >= 45+(slave.muscles*.3) && slave.physicalAge <= 12) {
-		return true;
-	} else if (slave.dick >= 68+(slave.muscles*.4)) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.tooBigButt = function(slave){
-	if (!slave) {
-		return null;
-	} else if (slave.butt > 10 && slave.physicalAge <= 3) {
-		return true;
-	} else if (slave.butt > 14 && slave.physicalAge <= 12) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.relationTargetWord = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.relation == "daughter") {
-		return "mother";
-	} else if (slave.relation == "mother") {
-		return "daughter";
-	}
-	return slave.relation;
-};
-
-window.milkAmount = function(slave) {
-	var milk;
-	var calcs;
-	if (!slave) {
-		return null;
-	} else {
-		calcs = slave.boobs-slave.boobsImplant-slave.boobsMilk
-		if (calcs > 40000) {
-			milk = (158+((calcs-10000)/600))
-		} else if (calcs > 25000) {
-			milk = (128+((calcs-10000)/500))
-		} else if (calcs > 10000) {
-			milk = (78+((calcs-10000)/300))
-		} else if (calcs > 5000) {
-			milk = (53+((calcs-5000)/200))
-		} else if (calcs > 2000) {
-			milk = (29+((calcs-2000)/125))
-		} else if (calcs > 800) {
-			milk = (16+((calcs-800)/80))
-		} else {
-			milk = (8+((calcs-400)/50))
-		}
-		if (slave.lactation == 2) {
-			milk *= 1.2
-		}
-		milk += (milk*((slave.devotion-50)/200))
-		if (slave.boobsImplant > 200) {
-			milk *= 0.9
-		}
-		calcs = (slave.hormoneBalance/50)
-		if (slave.balls != 0 && calcs > -2) {
-			calcs -= 1
-		} else if (slave.ovaries != 1 && calcs < 2) {
-			calcs += 1
-		}
-		milk *= (1+(calcs*0.1))
-		milk *= (1+(slave.preg/100))
-		milk *= (1+(slave.health/50))
-		milk *= (1+(slave.weight/500))
-		milk *= (1+(slave.lactationAdaptation/500))
-		milk += (slave.boobsMilk/100)
-		milk = Math.trunc(milk)
-		milk = Math.clamp(milk,1,1000000000000000000)
-		return milk
-	}
-};
-
-window.cumAmount = function(slave) {
-	var cum = 0;
-	var calcs = 0;
-	if (!slave) {
-		return null;
-	} else {
-		if (slave.drugs == "testicle enhancement") {
-			cum = ((slave.balls*3.5)+1)
-		} else if (slave.drugs == "hyper testicle enhancement") {
-			cum = ((slave.balls*5)+1)
-		} else {
-			cum = ((slave.balls*2.5)+1)
-		}
-		if (slave.ballType == "sterile") {
-			cum *= 0.8
-		}
-		if (slave.diet == "cum production") {
-			cum *= 1.2
-		}
-		calcs = (slave.hormoneBalance/50)
-		cum *= (1-(calcs*0.1))
-		if (slave.scrotum == 0) {
-			cum *= 0.8
-		}
-		if (slave.prostate == 0) {
-			cum *= 0.2 // being generous here
-		} else if (slave.prostate == 2) {
-			cum *= 1.2
-		} else if (slave.prostate == 3) {
-			cum *= 1.5
-		}
-		if (slave.devotion > 50) {
-			cum += (cum*(slave.devotion/100))
-		} else if (slave.devotion < -50) {
-			cum += (cum*(slave.devotion/100))
-		}
-		if (slave.health > 50) {
-			cum += (cum*(slave.health/50))
-		} else if (slave.health < -50) {
-			cum += (cum*(slave.health/50))
-		}
-		cum = Math.trunc(cum)
-		cum = Math.clamp(cum,1,1000000000000000000)
-		return cum
-	}
-};
-
-window.lispReplace = function(text)
-{
-	text = text.replace(/Sh/g, "Th");
-	text = text.replace(/SS/g, "Th");
-	text = text.replace(/Ss/g, "Th");
-	text = text.replace(/sS/g, "Th");
-	text = text.replace(/S/g, "Th");
-	text = text.replace(/aX/g, "aKTH");
-	text = text.replace(/eX/g, "eKTH");
-	text = text.replace(/iX/g, "iKTH");
-	text = text.replace(/oX/g, "oKTH");
-	text = text.replace(/uX/g, "uKTH");
-	text = text.replace(/yX/g, "yKTH");
-	text = text.replace(/AX/g, "AKTH");
-	text = text.replace(/EX/g, "EKTH");
-	text = text.replace(/IX/g, "IKTH");
-	text = text.replace(/OX/g, "OKTH");
-	text = text.replace(/UX/g, "UKTH");
-	text = text.replace(/YX/g, "YKTH");
-	text = text.replace(/Xa/g, "Tha");
-	text = text.replace(/Xe/g, "The");
-	text = text.replace(/Xi/g, "Thi");
-	text = text.replace(/Xo/g, "Tho");
-	text = text.replace(/Xu/g, "Thu");
-	text = text.replace(/Xy/g, "Thy");
-	text = text.replace(/XA/g, "THA");
-	text = text.replace(/XE/g, "THE");
-	text = text.replace(/XI/g, "THI");
-	text = text.replace(/XO/g, "THO");
-	text = text.replace(/XU/g, "THU");
-	text = text.replace(/XY/g, "THY");
-	text = text.replace(/X/g, "EKTH");
-	text = text.replace(/zZ/g, "Th");
-	text = text.replace(/Zz/g, "Th");
-	text = text.replace(/ZZ/g, "TH");
-	text = text.replace(/Z/g, "Th");
-	text = text.replace(/Cia/g, "Tha");
-	text = text.replace(/Ci/g, "Thi");
-	text = text.replace(/Ce/g, "The");
-	text = text.replace(/Cy/g, "Thy");
-	text = text.replace(/CIA/g, "THA");
-	text = text.replace(/CI/g, "THI");
-	text = text.replace(/CE/g, "THE");
-	text = text.replace(/CY/g, "THY");
-	text = text.replace(/ss/g, "th");
-	text = text.replace(/sh/g, "th");
-	text = text.replace(/s/g, "th");
-	text = text.replace(/zz/g, "th");
-	text = text.replace(/z/g, "th");
-	text = text.replace(/ax/g, "akth");
-	text = text.replace(/ex/g, "ekth");
-	text = text.replace(/ix/g, "ikth");
-	text = text.replace(/ox/g, "okth");
-	text = text.replace(/ux/g, "ukth");
-	text = text.replace(/yx/g, "ykth");
-	text = text.replace(/Ax/g, "Akth");
-	text = text.replace(/Ex/g, "Ekth");
-	text = text.replace(/Ix/g, "Ikth");
-	text = text.replace(/Ox/g, "Okth");
-	text = text.replace(/Ux/g, "Ukth");
-	text = text.replace(/Yx/g, "Ykth");
-	text = text.replace(/xa/g, "tha");
-	text = text.replace(/xe/g, "the");
-	text = text.replace(/xi/g, "thi");
-	text = text.replace(/xo/g, "tho");
-	text = text.replace(/xu/g, "thu");
-	text = text.replace(/xy/g, "thy");
-	text = text.replace(/xA/g, "thA");
-	text = text.replace(/xE/g, "thE");
-	text = text.replace(/xI/g, "thI");
-	text = text.replace(/xO/g, "thO");
-	text = text.replace(/xU/g, "thU");
-	text = text.replace(/xY/g, "thY");
-	text = text.replace(/x/g, "ekth");
-	text = text.replace(/cia/g, "tha");
-	text = text.replace(/ci/g, "thi");
-	text = text.replace(/ce/g, "the");
-	text = text.replace(/cy/g, "thy");
-	text = text.replace(/cI/g, "thI");
-	text = text.replace(/cE/g, "thE");
-	text = text.replace(/cY/g, "thY");
-	return text;
-}
-
-window.isVegetable = function(slave) {
-	slave = slave || State.variables.activeSlave;
-	if(!slave) { return false; }
-	return (slave.fetish === 'mindbroken');
-};
-
-window.repGainSacrifice = function(slave, arcology) {
-	slave = slave || State.variables.activeSlave;
-	arcology = arcology || State.variables.arcologies[0];
-	if(!slave || !arcology || arcology.FSAztecRevivalist === "unset" || arcology.FSAztecRevivalist <= 0) {
-		return 0;
-	}
-	return Math.ceil(
-		(Math.min(100, Math.pow(1.0926, State.variables.week - slave.weekAcquired)) + slave.prestige * 30)
-			* arcology.FSAztecRevivalist / 100 / ((State.variables.slavesSacrificedThisWeek || 0) + 1));
-};
-
-window.bodyguardSuccessorEligible = function(slave) {
-	if(!slave) { return false; }
-	return (slave.devotion > 50 && slave.muscles >= 0 && slave.weight < 100 && slave.boobs < 8000 && slave.butt < 10 && slave.belly < 5000 && slave.balls < 10 && slave.dick < 10 && slave.preg < 20 && slave.fuckdoll == 0 && slave.fetish != "mindbroken" && canWalk(slave));
-};
-
-window.ngUpdateGenePool = function(genePool) {
-	var transferredSlaveIds = (State.variables.slaves || [])
-	.filter(function(s) { return s.ID >= 1200000; })
-	.map(function(s) { return s.ID - 1200000; });
-	return (genePool || [])
-	.filter(function(s) { return transferredSlaveIds.indexOf(s.ID) >= 0; })
-	.map(function(s) {
-	var result = jQuery.extend(true, {}, s);
-	result.ID += 1200000;
-	return result;
-	});
-}
-
-window.ngUpdateMissingTable = function(missingTable) {
-	var newTable = {};
-
-	(State.variables.slaves || [])
-	.forEach(s => ([s.pregSource+1200000,s.mother+1200000,s.father+1200000]
-	.filter(i => (i in missingTable))
-	.forEach(i => {
-	newTable[i-1200000] = missingTable[i];
-	newTable[i-1200000].ID -= 1200000;
-	})));
-
-	return newTable;
-};
-
-window.toJson = function(obj) {
-	var jsontext = JSON.stringify(obj);
-	jsontext = jsontext.replace(/^{/,"");
-	jsontext = jsontext.replace(/}$/,"");
-	return jsontext;
-};
-
-window.nippleColor = function(slave) {
-	slave = slave || State.variables.activeSlave;
-	if(slave.skin === 'tanned' || slave.skin === 'fair') {
-		if(slave.preg > slave.pregData.normalBirth/4 || (slave.birthsTotal > 0 && slave.lactation > 0)) {
-			return 'dark brown';
-		} else {
-			return 'pink';
-		}
-	} else if((slave.skin === 'pale' || slave.race === 'white')) {
-		if(slave.preg > slave.pregData.normalBirth/4 || (slave.birthsTotal > 0 && slave.lactation > 0)) {
-			return 'brown';
-		} else {
-			return 'pink';
-		}
-	} else if((slave.skin === 'brown' || slave.race === 'black')) {
-		if(slave.preg > slave.pregData.normalBirth/4 || (slave.birthsTotal > 0 && slave.lactation > 0)) {
-			return 'black';
-		} else {
-			return 'dark brown';
-		}
-	} else {
-		if(slave.preg > slave.pregData.normalBirth/4 || (slave.birthsTotal > 0 && slave.lactation > 0)) {
-			return 'dark brown';
-		} else {
-			return 'brown';
-		}
-	}
-}
-
-window.overpowerCheck = function(slave, PC) {
-	var strength;
-
-	if(State.variables.arcologies[0].FSPhysicalIdealist != "unset") {
-		if(PC.title == 1) {
-			strength = 130;
-		} else {
-			strength = 100;
-		}
-	} else if(PC.title == 1) {
-		strength = 50;
-	} else {
-		strength = 30;
-	}
-	strength += (185-slave.height);
-	strength -= (PC.belly/1000);
-
-	return strength;
-}
-
-window.impregnatedBy = function(slave) { /* returns array of IDs of all characters who impregnated slave */
-	var IDArray = [];
-	if (!Array.isArray(slave.womb)) {
-		WombInit(slave);
-	}
-	for (var i = 0; i < slave.womb.length; i++) {
-		IDArray.push(slave.womb[i].fatherID);
-	}
-	return IDArray;
-}
-
-window.isImpregnatedBy = function(mother, father) { /* returns true if mother was impregnated by father */
-	return impregnatedBy(mother).includes(father.ID);
-}
-
-window.jsAlert = function(obj)
-{
-	alert(obj);
-}
-
-window.jsConsoleInfo = function(obj)
-{
-	console.info(obj);
-}
-
-window.SoftenBehavioralFlaw = function SoftenBehavioralFlaw(slave) {
-	switch (slave.behavioralFlaw) {
-		case "arrogant":
-			slave.behavioralQuirk = "confident";
-			break;
-		case "bitchy":
-			slave.behavioralQuirk = "cutting";
-			break;
-		case "odd":
-			slave.behavioralQuirk = "funny";
-			break;
-		case "hates men":
-			slave.behavioralQuirk = "adores women";
-			break;
-		case "hates women":
-			slave.behavioralQuirk = "adores men";
-			break;
-		case "gluttonous":
-			slave.behavioralQuirk = "fitness";
-			break;
-		case "anorexic":
-			slave.behavioralQuirk = "insecure";
-			break;
-		case "devout":
-			slave.behavioralQuirk = "sinful";
-			break;
-		case "liberated":
-			slave.behavioralQuirk = "advocate";
-			break;
-	}
-	slave.behavioralFlaw = "none";
-};
-
-window.SoftenSexualFlaw = function SoftenSexualFlaw(slave) {
-	switch (slave.sexualFlaw) {
-		case "hates oral":
-			slave.sexualQuirk = "gagfuck queen";
-			break;
-		case "hates anal":
-			slave.sexualQuirk = "painal queen";
-			break;
-		case "hates penetration":
-			slave.sexualQuirk = "strugglefuck queen";
-			break;
-		case "shamefast":
-			slave.sexualQuirk = "tease";
-			break;
-		case "idealistic":
-			slave.sexualQuirk = "romantic";
-			break;
-		case "repressed":
-			slave.sexualQuirk = "perverted";
-			break;
-		case "apathetic":
-			slave.sexualQuirk = "caring";
-			break;
-		case "crude":
-			slave.sexualQuirk = "unflinching";
-			break;
-		case "judgemental":
-			slave.sexualQuirk = "size queen";
-			break;
-	}
-	slave.sexualFlaw = "none";
-};
-
-window.removeFS = function(FS) {
-	const V = State.variables;
-	const arcology = V.arcologies[0];
-	let FSDecoration = FS + "Decoration";
-	let FSSMR = FS + "SMR";
-	let FSLaw = FS + "Law";
-	if (FS === "FSSupremacist" || FS === "FSSubjugationist") {
-		FSLaw += "ME";
-	}
-	switch (FS) {
-		case "FSGenderRadicalist":
-			arcology.FSGenderRadicalistLawBeauty = 0;
-			arcology.FSGenderRadicalistLawFuta = 0;
-			break;
-		case "FSGenderFundamentalist":
-			arcology.FSGenderFundamentalistLawBeauty = 0;
-			arcology.FSGenderFundamentalistLawBimbo = 0;
-			arcology.FSGenderFundamentalistSMR = 0;
-			break;
-		case "FSTransformationFetishist":
-		case "FSAssetExpansionist":
-			arcology[FSSMR] = 0;
-			break;
-		case "FSPhysicalIdealist":
-			arcology.FSPhysicalIdealistLaw = 0;
-			arcology.FSPhysicalIdealistSMR = 0;
-			arcology.FSPhysicalIdealistStrongFat = 0;
-		case "FSHedonisticDecadence":
-			arcology.FSHedonisticDecadenceLaw = 0;
-			arcology.FSHedonisticDecadenceLaw2 = 0;
-			arcology.FSHedonisticDecadenceSMR = 0;
-			arcology.FSHedonisticDecadenceStrongFat = 0;
-			break;
-		case "FSChattelReligionist":
-			arcology.FSChattelReligionistLaw = 0;
-			arcology.FSChattelReligionistSMR = 0;
-			arcology.FSChattelReligionistCreed = 0;
-			break;
-		case "FSRepopulationFocus":
-			arcology[FSLaw] = 0;
-			arcology[FSSMR] = 0;
-			V.universalRulesChildrenBecomeBreeders = 0;
-		case "FSNull":
-			break;
-		default: /* all others have one law and one SMR */
-			arcology[FSLaw] = 0;
-			arcology[FSSMR] = 0;
-			break;
-	}
-	if (FS !== "FSNull") {
-		arcology[FSDecoration] = 20;
-		if (FS === "FSRestart") {
-			V.propOutcome = 0;
-			V.failedElite = 0;
-		}
-	}
-	arcology[FS] = "unset";
-	resetFSCredits();
-};
-
-window.resetFSCredits = function() {
-	const V = State.variables;
-	let activeFS = 0;
-	for (let i = 0; i < setup.FutureSocieties.length; i++) {
-		if (V.arcologies[0][setup.FutureSocieties[i]] > 0) {
-			activeFS++;
-		}
-	}
-	if (V.arcologies[0].FSNull > 0) { /* possibly recalculate for multiculturalism */
-		activeFS--;
-		if (V.FSCreditCount === 4) {
-			activeFS += V.arcologies[0].FSNull/25;
-		} else if (V.FSCreditCount === 6) {
-			activeFS += V.arcologies[0].FSNull/17;
-		} else if (V.FSCreditCount === 7) {
-			activeFS += V.arcologies[0].FSNull/15;
-		} else {
-			activeFS += V.arcologies[0].FSNull/20;
-		}
-	}
-	V.FSCredits = Math.max(Math.trunc(V.FSGotRepCredits - activeFS), 0);
-};
-
-window.generatePlayerPronouns = function(PC) {
-	if (PC.title === 0) {
-		PC.pronoun = "she";
-		PC.possessivePronoun = "hers";
-		PC.possessive = "her";
-		PC.object = "her";
-		PC.objectReflexive = "herself";
-		PC.noun = "woman";
-	} else {
-		PC.pronoun = "he";
-		PC.possessivePronoun = "his";
-		PC.possessive = "his";
-		PC.object = "him";
-		PC.objectReflexive = "himself";
-		PC.noun = "man";
-	}
-};
-
-window.generateAssistantPronouns = function() {
-	const V = State.variables;
-	if (V.assistant === 0) {
-		V.assistantPronouns.pronoun = "it";
-		V.assistantPronouns.possessivePronoun = "its";
-		V.assistantPronouns.possessive = "its";
-		V.assistantPronouns.object = "it";
-		V.assistantPronouns.objectReflexive = "itself";
-		V.assistantPronouns.noun = "program";
-	} else if ((V.assistantAppearance === "incubus") && (V.diversePronouns === 1)) {
-		V.assistantPronouns.pronoun = "he";
-		V.assistantPronouns.possessivePronoun = "his";
-		V.assistantPronouns.possessive = "his";
-		V.assistantPronouns.object = "him";
-		V.assistantPronouns.objectReflexive = "himself";
-		V.assistantPronouns.noun = "boy";
-	} else {
-		V.assistantPronouns.pronoun = "she";
-		V.assistantPronouns.possessivePronoun = "hers";
-		V.assistantPronouns.possessive = "her";
-		V.assistantPronouns.object = "her";
-		V.assistantPronouns.objectReflexive = "herself";
-		V.assistantPronouns.noun = "girl";
-	}
-
-	if (V.assistant === 0) {
-		V.marketAssistantPronouns.pronoun = "it";
-		V.marketAssistantPronouns.possessivePronoun = "its";
-		V.marketAssistantPronouns.possessive = "its";
-		V.marketAssistantPronouns.object = "it";
-		V.marketAssistantPronouns.objectReflexive = "itself";
-		V.marketAssistantPronouns.noun = "program";
-	} else if ((V.assistantAppearance === "succubus") && (V.diversePronouns === 1)) {
-		V.marketAssistantPronouns.pronoun = "he";
-		V.marketAssistantPronouns.possessivePronoun = "his";
-		V.marketAssistantPronouns.possessive = "his";
-		V.marketAssistantPronouns.object = "him";
-		V.marketAssistantPronouns.objectReflexive = "himself";
-		V.marketAssistantPronouns.noun = "boy";
-	} else {
-		V.marketAssistantPronouns.pronoun = "she";
-		V.marketAssistantPronouns.possessivePronoun = "hers";
-		V.marketAssistantPronouns.possessive = "her";
-		V.marketAssistantPronouns.object = "her";
-		V.marketAssistantPronouns.objectReflexive = "herself";
-		V.marketAssistantPronouns.noun = "girl";
-	}
-};
-
-/*:: itemAvailability [script]*/
-
-/* intended to condense the clothing/toy/etc availability checks into something less asinine */
-window.isItemAccessible = function(string) {
-	const V = State.variables;
-
-	if (V.cheatMode === 1){
-		return true;
-	} else {
-		switch (string) { /* no breaks needed because we always return */
-		case 'attractive lingerie for a pregnant woman':
-			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtMaternityLingerie === 1);
-		case 'a bunny outfit':
-			return (V.arcologies[0].FSGenderFundamentalist > 0 || V.clothesBoughtBunny === 1);
-		case 'body oil':
-			return (V.arcologies[0].FSPhysicalIdealist > 0 || V.clothesBoughtOil === 1);
-		case 'chains':
-			return (V.arcologies[0].FSDegradationist > 0 || V.clothesBoughtChains === 1);
-		case 'a chattel habit':
-			return (V.arcologies[0].FSChattelReligionist > 0 || V.clothesBoughtHabit === 1);
-		case 'conservative clothing':
-			return (V.arcologies[0].FSPaternalist > 0 || V.clothesBoughtConservative === 1);
-		case 'harem gauze':
-			return (V.arcologies[0].FSArabianRevivalist > 0 || V.clothesBoughtHarem === 1);
-		case 'a huipil':
-			return (V.arcologies[0].FSAztecRevivalist > 0 || V.clothesBoughtHuipil === 1);
-		case 'a kimono':
-			return (V.arcologies[0].FSEdoRevivalist > 0 || V.clothesBoughtKimono === 1 || V.continent === 'Japan');
-		case 'a maternity dress':
-			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtMaternityDress === 1);
-		case 'a slutty qipao':
-			return (V.arcologies[0].FSChineseRevivalist > 0 || V.clothesBoughtQipao === 1);
-		case 'a long qipao':
-			return (V.arcologies[0].FSChineseRevivalist > 0 || V.clothesBoughtCultural === 1);
-		case 'stretch pants and a crop-top':
-			return (V.arcologies[0].FSHedonisticDecadence > 0 || V.clothesBoughtLazyClothes === 1);
-		case 'a toga':
-			return (V.arcologies[0].FSRomanRevivalist > 0 || V.clothesBoughtToga === 1);
-		case 'Western clothing':
-			return (V.arcologies[0].FSPastoralist > 0 || V.clothesBoughtWestern === 1);
-		case 'battlearmor':
-		case 'a military uniform':
-		case 'a red army uniform':
-		case 'battledress':
-			return (V.clothesBoughtMilitary === 1);
-		case 'a biyelgee costume':
-		case 'a dirndl':
-		case 'lederhosen':
-		case 'a mounty outfit':
-		case 'a hanbok':
-			return (V.clothesBoughtCultural === 1);
-		case 'a burqa':
-		case 'a burkini':
-		case 'a blouse and hijab':
-		case 'a niqab and abaya':
-			return (V.clothesBoughtMiddleEastern === 1 || V.continent === 'the Middle East');
-		case 'a klan robe':
-		case 'a slutty klan robe':
-		case 'a schutzstaffel uniform':
-		case 'a slutty schutzstaffel uniform':
-			return (V.clothesBoughtPol === 1);
-		case 'a nice nurse outfit':
-		case 'a police uniform':
-		case 'nice business attire':
-			return (V.clothesBoughtCareer === 1);
-		case 'a nice maid outfit':
-			return (V.clothesBoughtCareer === 1 || V.PC.career === 'servant');
-		case 'a ball gown':
-		case 'a gothic lolita dress':
-		//case 'a halter top dress':
-		//case 'a mini dress':
-		//case 'a slave gown':
-			return (V.clothesBoughtDresses === 1);
-		case 'a cybersuit':
-		case 'a latex catsuit':
-			return (V.clothesBoughtBodysuits === 1);
-		case 'a button-up shirt and panties':
-		case 'a button-up shirt':
-		case 'cutoffs':
-		case 'jeans':
-		case 'leather pants and a tube top':
-		case 'leather pants':
-		case 'an oversized t-shirt':
-		case 'a sweater and cutoffs':
-		case 'a sweater and panties':
-		case 'a sweater':
-		case 'a t-shirt and jeans':
-		case 'a t-shirt and panties':
-		case 'a t-shirt':
-		case 'a tank-top and panties':
-		case 'a tank-top':
-		case 'a tube top':
-			return (V.clothesBoughtCasual === 1);
-		case 'boyshorts':
-		case 'a bra':
-		case 'kitty lingerie':
-		case 'panties and pasties':
-		case 'a skimpy loincloth':
-		case 'a thong':
-			return (V.clothesBoughtUnderwear === 1);
-		case 'leather pants and pasties':
-		case 'a t-shirt and thong':
-		case 'a tube top and thong':
-		case 'an oversized t-shirt and boyshorts':
-			return (V.clothesBoughtUnderwear === 1 && V.clothesBoughtCasual === 1);
-		case 'sport shorts and a sports bra':
-		case 'sport shorts':
-		case 'a sports bra':
-			return (V.clothesBoughtSports === 1);
-		case 'sport shorts and a t-shirt':
-			return (V.clothesBoughtSports === 1 && V.clothesBoughtCasual === 1);
-		case 'a nice pony outfit':
-		case 'a slutty pony outfit':
-			return (V.clothesBoughtPony === 1);
-		case 'a monokini':
-		case 'a one-piece swimsuit':
-			return (V.clothesBoughtSwimwear === 1);
-		case 'shimapan panties':
-		case 'a striped bra':
-		case 'striped panties':
-		case 'striped underwear':
-			return (V.clothesBoughtPantsu === 1 || V.continent === 'Japan');
-		case 'bowtie':
-			return (V.arcologies[0].FSGenderFundamentalist > 0 || V.clothesBoughtBunny === 1);
-		case 'ancient Egyptian':
-			return (V.arcologies[0].FSEgyptianRevivalist > 0 || V.clothesBoughtEgypt === 1);
-		case 'pasties': /* an option in saChoosesOwnClothes.tw, but everything else (e.g. descriptions, artwork, option in wardrobeUse.tw) is missing or not hooked up correctly */
-			return false;
-		case 'massive dildo gag':
-			return (V.toysBoughtGags === 1);
-		case 'a small empathy belly':
-		case 'a medium empathy belly':
-		case 'a large empathy belly':
-		case 'a huge empathy belly':
-			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtBelly === 1);
-		case 'long dildo':
-		case 'long, large dildo':
-		case 'long, huge dildo':
-			return (V.toysBoughtDildos === 1);
-		case 'long plug':
-		case 'long, large plug':
-		case 'long, huge plug':
-			return (V.toysBoughtButtPlugs === 1);
-		case 'tail':
-		case 'cat tail':
-		case 'fox tail':
-			return (V.toysBoughtButtPlugTails === 1);
-		default:
-			return true;
-		}
-	}
-};
-
-/*:: relationshipChecks [script]*/
-
-window.rivalryTerm = function(id) {
-	if (id.rivalry === 1) {
-		return `growing rival`;
-	} else if (id.rivalry === 2) {
-		return `rival`;
-	} else {
-		return `bitter rival`;
-	}
-}
-window.relationshipTerm = function(id) {
-	if (id.relationship === 1) {
-		return `friend`;
-	} else if (id.relationship === 2) {
-		return `best friend`;
-	} else if (id.relationship === 3) {
-			return `friend with benefits`;
-	} else if (id.relationship === 4) {
-			return `lover`;
-	} else {
-			return `slave wife`;
-	}
-}
-window.relationshipTermShort = function(id) {
-	if (id.relationship === 1) {
-		return `friend`;
-	} else if (id.relationship === 2) {
-		return `BFF`;
-	} else if (id.relationship === 3) {
-		return `FWB`;
-	} else if (id.relationship === 4) {
-		return `lover`;
-	} else {
-		return `wife`;
-	}
-}
-
-/*:: Extended Family Mode JS [script]*/
-
-/* see documentation for details /devNotes/Extended Family Mode Explained.txt */
-
-window.isMotherP = function isMotherP(daughter, mother) {
-	return daughter.mother === mother.ID
-}
-
-window.isFatherP = function isFatherP(daughter, father) {
-	return daughter.father === father.ID
-}
-
-window.isParentP = function isParentP(daughter, parent) {
-	return isMotherP(daughter,parent) || isFatherP(daughter,parent)
-}
-
-window.sameDad = function(slave1, slave2){
-	if ((slave1.father == slave2.father) && (slave1.father != 0 && slave1.father != -2)) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.sameMom = function(slave1, slave2){
-	if ((slave1.mother == slave2.mother) && (slave1.mother != 0 && slave1.mother != -2)) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-// testtest catches the case if a mother is a father or a father a mother - thank you familyAnon, for this code
-window.sameTParent = function(slave1, slave2) {
-	if (slave1.mother == -1 && slave1.father == -1 && slave2.mother == -1 && slave2.father == -1) {
-		return 1;
-	} else if (slave1.mother == slave2.father && slave1.father == slave2.mother && slave1.mother != 0 && slave1.mother != -2 && slave1.father != 0 && slave1.father != -2 && slave1.mother != slave1.father) {
-		return 2;
-	} else if ((slave1.mother == slave2.father || slave1.father == slave2.mother) && slave1.mother != 0 && slave1.mother != -2 && slave2.mother != 0 && slave2.mother != -2 && slave1.mother != slave1.father) {
-		return 3;
-	} else {
-		return 0;
-	}
-};
-
-/*
-window.sameTParent = function(slave1, slave2) {
-	if ((slave1.mother == slave2.father || slave1.father == slave2.mother) && (slave1.mother != 0 && slave1.mother != -2 && slave1.father != 0 && slave1.father != -2)) {
-		return true; //testtest catches the case if a mother is a father or a father a mother
-	} else {
-		return false;
-	}
-};
-*/
-
-window.areTwins = function(slave1, slave2) {
-	if (!sameDad(slave1, slave2)) {
-		return false;
-	} else if (!sameMom(slave1, slave2)) {
-		return false;
-	} else if (slave1.actualAge == slave2.actualAge && slave1.birthWeek == slave2.birthWeek) {
-		return true;
-	} else {
-		return false;
-	}
-};
-
-window.areSisters = function(slave1, slave2) {
-	if (slave1.ID == slave2.ID) {
-		return 0; //you are not your own sister
-	} else if (((slave1.father == 0) || (slave1.father == -2)) && ((slave1.mother == 0) || (slave1.mother == -2))) {
-		return 0; //not related
-	} else {
-		if (!sameDad(slave1, slave2) && sameMom(slave1, slave2)) {
-			return 3; //half sisters
-		} else if (sameDad(slave1, slave2) && !sameMom(slave1, slave2)) {
-			return 3; //half sisters
-		} else if (sameTParent(slave1, slave2) == 3) {
-			return 3; //half sisters
-		} else if (sameTParent(slave1, slave2) == 2) {
-			return 2; //sisters
-		} else if (sameDad(slave1, slave2) && sameMom(slave1, slave2)) {
-			if (slave1.actualAge == slave2.actualAge && slave1.birthWeek == slave2.birthWeek) {
-				return 1; //twins
-			} else {
-				return 2; //sisters
-			}
-		} else {
-			return 0; //not related
-		}
-	}
-};
-
-/*
-//3 = half-sisters, 2 = sisters, 1 = twins, 0 = not related
-window.areSisters = function(c1, c2) {
-	if(c1.ID == c2.ID) {
-		return 0;
-	}
-	var sib = 4;
-	if(sameMom(c1, c2)) {
-		sib -= 1;
-	}
-	if(sameDad(c1, c2)) {
-		sib -=1;
-	}
-	if (sib == 2 && c1.actualAge == c2.actualAge && c1.birthWeek == c2.birthWeek) {
-		sib -= 1;
-	}
-	if(sib == 4) {
-		return 0
-	} else {
-		return sib;
-	}
-}
-*/
-
-window.areRelated = function(slave1, slave2) {
-	return (slave1.father == slave2.ID || slave1.mother == slave2.ID || slave2.father == slave1.ID || slave2.mother == slave1.ID || areSisters(slave1, slave2) > 0);
-}
-
-window.totalRelatives = function(slave) {
-	var relatives = 0;
-	if (slave.mother > 0) {
-		relatives += 1
-	}
-	if (slave.father > 0) {
-		relatives += 1
-	}
-	if (slave.daughters > 0) {
-		relatives += slave.daughters
-	}
-	if (slave.sisters > 0) {
-		relatives += slave.sisters
-	}
-	return relatives
-};
-
-window.mutualChildren = function(slave1, slave2, slaves) {
-	return slaves.filter(function(s) { return s.ID != slave1.ID && s.ID != slave2.ID && s.mother > 0 && s.father > 0 && ((s.mother == slave1.ID && s.father == slave2.ID) || (s.mother == slave2.ID && s.father == slave1.ID)); }).length;
-}
-
-window.isSlaveAvailable = function(slave) {
-	if (!slave) {
-		return null;
-	} else if (slave.assignment == "be your agent") {
-		return false;
-	} else if (slave.assignment == "live with your agent") {
-		return false;
-	} else if (slave.assignment == "be confined in the arcade") {
-		return false;
-	} else if (slave.assignment == "work in the dairy" && State.variables.DairyRestraintsSetting >= 2) {
-		return false;
-	} else {
-		return true;
-	}
-};
-
-if (typeof DairyRestraintsSetting == "undefined") {
-	var DairyRestraintsSetting = {
-		setSetting: function (setting) {
-			setting = Number(setting)
-			return setting
-		}
-	};
-	// Raise namespace scope to Global.
-	window.DairyRestraintsSetting = DairyRestraintsSetting;
-};
-
-/* OLD
-window.randomRelatedSlave = function(slave, filterFunction) {
-	if(!slave || !SugarCube) { return undefined; }
-	if(typeof filterFunction !== 'function') { filterFunction = function(s, index, array) { return true; }; }
-	return State.variables.slaves.filter(filterFunction).shuffle().find(function(s, index, array) {return areSisters(slave, s) || s.mother == slave.ID || s.father == slave.ID || slave.ID == s.mother || slave.ID == s.father; })
-}
-*/
-
-window.randomRelatedSlave = function(slave, filterFunction) {
-	if(!slave || !SugarCube) { return undefined; }
-	if(typeof filterFunction !== 'function') {
-	filterFunction = function(s, index, array) { return true; };
-	}
-	var arr = State.variables.slaves.filter(filterFunction)
-	arr.shuffle()
-	return arr.find(function(s, index, array) {
-	return areSisters(slave, s)
-		|| slave.ID === s.mother
-		|| slave.ID === s.father
-		|| s.ID === slave.mother
-		|| s.ID === slave.father;
-	})
-}
-
-window.randomRelatedAvailableSlave = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s); });
-}
-
-window.randomSister = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return areSisters(slave, s); });
-}
-
-window.randomTwinSister = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return areSisters(slave, s) == 1; });
-}
-
-window.randomAvailableSister = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && areSisters(slave, s); });
-}
-
-window.randomAvailableTwinSister = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && areSisters(slave, s) == 1; });
-}
-
-window.randomDaughter = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return s.mother == slave.ID || s.father == slave.ID; });
-}
-
-window.randomAvailableDaughter = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && (s.mother == slave.ID || s.father == slave.ID); });
-}
-
-window.randomParent = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return s.ID == slave.mother || s.ID == slave.father; });
-}
-
-window.randomAvailableParent = function(slave) {
-	return randomRelatedSlave(slave, function(s, index, array) { return isSlaveAvailable(s) && (s.ID == slave.mother || s.ID == slave.father); });
-}
-
-window.totalPlayerRelatives = function(pc) {
-	var relatives = 0;
-	if (pc.mother > 0) {
-		relatives += 1
-	}
-	if (pc.father > 0) {
-		relatives += 1
-	}
-	if (pc.daughters > 0) {
-		relatives += pc.daughters
-	}
-	if (pc.sisters > 0) {
-		relatives += pc.sisters
-	}
-	return relatives
-};
-
-window.relativeTerm = function(slave1, slave2) {
-	if(slave2.mother == slave1.ID || slave2.father == slave1.ID) {
-		return "daughter";
-	} else if(slave1.mother == slave2.ID) {
-		return "mother";
-	} else if(slave1.father == slave2.ID) {
-		return "father";
-	} else if(areSisters(slave2, slave1) == 1) {
-		return "twin";
-	} else if(areSisters(slave2, slave1) == 2) {
-		return "sister";
-	} else if(areSisters(slave2, slave1) == 3) {
-		return "half-sister";
-	} else {
-		return "some unknown blood connection";
-	}
-}
-
-/*:: pregJS [script]*/
-
-/* Major props to the anons who worked together to forge the Super Pregnancy Project. Let your legacy go unforgotten.*/
-window.getPregBellySize = function(s) {
-	var gestastionWeek = s.preg;
-	var fetuses = s.pregType;
-	var phi = 1.618;
-
-	if(gestastionWeek <= 32) {
-		var targetLen = ((0.00006396 * Math.pow(gestastionWeek, 4)) - (0.005501 * Math.pow(gestastionWeek, 3)) + (0.161 * Math.pow(gestastionWeek, 2)) - (0.76 * gestastionWeek) + 0.208);
-	} else if(gestastionWeek <= 106) {
-		var targetLen = ((-0.0000004675 * Math.pow(gestastionWeek, 4)) + (0.0001905 * Math.pow(gestastionWeek, 3)) - (0.029 * Math.pow(gestastionWeek, 2)) + (2.132 * gestastionWeek) - 16.575);
-	} else {
-		var targetLen = ((-0.00003266 * Math.pow(gestastionWeek,2)) + (0.076 * gestastionWeek) + 43.843);
-	}
-
-	var bellySize = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3)) * fetuses);
-	return bellySize;
-};
-
-window.bellyAdjective = function(slave) {
-	slave = slave || State.variables.activeSlave;
-	if(slave.belly >= 1500) {
-		if(slave.belly >= 1000000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
-				return 'unfathomably distended, brimming with life';
-			} else {
-				return 'unfathomable';
-			}
-		} else if(slave.belly >= 750000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
-				return 'monolithic bulging';
-			} else {
-				return 'monolithic';
-			}
-		} else if(slave.belly >= 600000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
-				return 'titanic bulging';
-			} else {
-				return 'titanic';
-			}
-		} else if(slave.belly >= 450000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
-				return 'gigantic bulgy';
-			} else {
-				return 'gigantic';
-			}
-		} else if(slave.belly >= 300000) {
-			return 'massive';
-		} else if(slave.belly >= 100000) {
-			return 'giant';
-		} else if(slave.belly >= 15000) {
-			return 'huge';
-		} else if(slave.belly >= 10000) {
-			return 'big';
-		} else {
-			return 'swollen';
-		}
-	} else {
-		return '';
-	}
-};
-
-/* calculates and returns expected ovum count during conception*/
-window.setPregType = function(actor) {
-	/* IMHO rework is possible. Can be more interesting to play, if this code will take in account more body conditions - age, fat, food, hormone levels, etc. */
-
-	var ovum = jsRandom(actor.pregData.normalOvaMin, actor.pregData.normalOvaMax); //for default human profile it's always 1.
-	var fertilityStack = 0; // adds an increasing bonus roll for stacked fertility drugs
-
-	/* Suggestion for better animal pregnancy support - usage of another variable then ovum for fertility drugs bonus, and then adding actor.pregData.drugsEffect multiplier to it before adding to ovum. Example:
-
-		var bonus = 0;
-
-		... (code below where ovum changed to bonus)
-
-		bonus *= actor.pregData.drugsEffect;
-		ovum += bonus;
-
-	*/
-
-	if(actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now.
-		if(typeof actor.readyOva == "number" && actor.readyOva != 0) {
-			ovum = actor.readyOva; //just single override; for delayed impregnation cases
-		} else if(actor.ID == -1) {
-			if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm
-				if(actor.fertDrugs == 1) {
-					ovum += jsEither([2, 3, 3, 3, 3, 4, 4, 5]);
-				} else {
-					ovum += jsEither([1, 1, 2, 2, 3, 3, 4]);
-				}
-				if(actor.forcedFertDrugs > 0) {
-					ovum += jsEither([3, 3, 4, 4, 5]);
-				}
-			} else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples
-				if(actor.fertDrugs == 1) {
-					ovum += jsEither([1, 2, 2, 2, 2, 3, 3, 4]);
-				} else {
-					ovum += jsEither([0, 1, 1, 1, 1, 1, 2, 3]);
-				}
-				if(actor.forcedFertDrugs > 0) {
-					ovum += jsEither([2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]);
-				}
-			} else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins
-				if(actor.fertDrugs == 1) {
-					ovum += jsEither([1, 1, 2, 2, 2, 2, 3, 3]);
-				} else {
-					ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 1, 1, 2]);
-				}
-				if(actor.forcedFertDrugs > 0) {
-					ovum += jsEither([1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4]);
-				}
-			} else {
-				if(actor.fertDrugs == 1) {
-					ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3]);
-				} else {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
-				}
-				if(actor.forcedFertDrugs > 0) {
-					ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]);
-				}
-			}
-			ovum = Math.clamp(ovum, 0, 8);
-		} else if(actor.pregType == 0) {
-			if(actor.eggType == "horse" || actor.eggType == "cow") {
-				if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 1]);
-					fertilityStack += .8;
-				} else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples
-					fertilityStack += .4;
-				} else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins
-					fertilityStack += .2;
-				}
-				if(actor.ovaImplant == "fertility") {
-					fertilityStack += .3;
-				}
-				if(actor.hormones == 2) {
-					fertilityStack += .2;
-				}
-				if(actor.hormoneBalance >= 200) {
-					fertilityStack += .3;
-				}
-				if(actor.diet == "fertility") {
-					fertilityStack += .3;
-				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) {
-					fertilityStack += .5;
-				}
-				if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) {
-					fertilityStack += .2;
-				}
-				if(actor.drugs == "super fertility drugs") {
-					fertilityStack += 1.6;
-				} else if(actor.drugs == "fertility drugs") {
-					fertilityStack += .6;
-				}
-				fertilityStack = Math.floor(fertilityStack);
-				if(State.variables.seeHyperPreg == 1) {
-					if(actor.drugs == "super fertility drugs") {
-						ovum += jsRandom(0, fertilityStack*2);
-					} else {
-						ovum += jsRandom(0, fertilityStack);
-					}
-					if(actor.ovaImplant == "sympathy") {
-						ovum *= 2;
-					}
-				} else {
-					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant == "sympathy") {
-						ovum *= 2;
-						if(ovum > 4) {
-							ovum = 4;
-						}
-					} else if(ovum > 3) {
-						ovum = 3;
-					}
-				}
-			} else if(actor.eggType == "pig") {
-				if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm
-					ovum += jsRandom(4, 8);
-					fertilityStack += 16;
-				} else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples
-					ovum += jsRandom(2, 6);
-					fertilityStack += 10;
-				} else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins
-					ovum += jsRandom(2, 4);
-					fertilityStack += 6;
-				}
-				if(actor.ovaImplant == "fertility") {
-					ovum += jsRandom(4, 12);
-					fertilityStack += 6;
-				}
-				if(actor.hormones == 2) {
-					ovum += jsRandom(0, 4);
-					fertilityStack += 3;
-				}
-				if(actor.hormoneBalance >= 200) {
-					ovum += jsRandom(0, 4);
-					fertilityStack += 3;
-				}
-				if(actor.diet == "fertility") {
-					ovum += jsRandom(4, 10);
-					fertilityStack += 6;
-				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) {
-					ovum += jsRandom(8, 16);
-					fertilityStack += 10;
-				}
-				if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) {
-					fertilityStack += 2;
-				}
-				if(actor.drugs == "super fertility drugs") {
-					ovum += jsRandom(10, 40);
-					fertilityStack += 32;
-				} else if(actor.drugs == "fertility drugs") {
-					ovum += jsRandom(10, 20);
-					fertilityStack += 16;
-				}
-				if(State.variables.seeHyperPreg == 1) {
-					if(actor.drugs == "super fertility drugs") {
-						ovum += jsRandom(fertilityStack/2, fertilityStack*2);
-					} else {
-						ovum += jsRandom(fertilityStack/4, fertilityStack);
-					}
-					if(actor.ovaImplant == "sympathy") {
-						ovum *= 2;
-					}
-				} else {
-					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant == "sympathy") {
-						ovum *= 2;
-						if(ovum > 76) {
-							ovum = jsEither([70, 72, 74, 76]);
-						}
-					} else if(ovum > 75) {
-						ovum = jsRandom(60, 75);
-					}
-				}
-			} else {
-				if(actor.geneticQuirks.fertility == 2 && actor.geneticQuirks.hyperFertility == 2) { // Do not mix with sperm
-					ovum += jsEither([1, 2, 2, 3]);
-					fertilityStack++;
-					fertilityStack++;
-					fertilityStack++;
-					fertilityStack++;
-				} else if(actor.geneticQuirks.hyperFertility == 2) { // Predisposed to multiples
-					ovum += jsEither([0, 1, 1, 2]);
-					fertilityStack++;
-					fertilityStack++;
-				} else if(actor.geneticQuirks.fertility == 2) { // Predisposed to twins
-					ovum += jsEither([0, 0, 0, 0, 1]);
-					fertilityStack++;
-				} else {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); //base chance for twins
-				}
-				if(actor.ovaImplant == "fertility") {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
-					fertilityStack++;
-				}
-				if(actor.hormones == 2) {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2]);
-					fertilityStack++;
-				}
-				if(actor.hormoneBalance >= 200) {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]);
-					fertilityStack++;
-				}
-				if(actor.diet == "fertility") {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
-					fertilityStack++;
-				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements == 1 && ((actor.assignment == "serve in the master suite" || actor.assignment == "be your Concubine"))) {
-					ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]);
-					fertilityStack++;
-					fertilityStack++;
-				}
-				if(State.variables.reproductionFormula == 1 && (State.variables.week-actor.weekAcquired > 0)) {
-					fertilityStack++;
-				}
-				if(actor.drugs == "super fertility drugs") {
-					ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]);
-					fertilityStack++;
-					fertilityStack++;
-					fertilityStack++;
-					fertilityStack++;
-					fertilityStack++;
-				} else if(actor.drugs == "fertility drugs") {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]);
-					fertilityStack++;
-				}
-				if(State.variables.seeHyperPreg == 1) {
-					if(actor.drugs == "super fertility drugs") {
-						ovum += jsRandom(0, fertilityStack*2);
-					} else {
-						ovum += jsRandom(0, fertilityStack);
-					}
-					if(actor.ovaImplant == "sympathy") {
-						ovum *= 2;
-					}
-				} else {
-					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant == "sympathy") {
-						ovum *= 2;
-						if(ovum > 12) {
-							ovum = jsEither([10, 12]);
-						}
-					} else if(ovum > 12) {
-						ovum = jsRandom(6, 12);
-					}
-				}
-			}
-		}
-	}
-	return ovum;
-};
-
-/*
- Penetrative ability, ability to become pregnant, and canBreed() must be checked outside of this. Designed to assume .eggType == "human".
- target is the slave to get pregnant. Also accepts the PC.
- chance is the % chance to conceive.
- hole control's the hole involved (0 - vagina, 1 - ass, 2 - both). .mpreg did this.
- fatherID is the ID of her sire or 0 if undefined.
- displayOverride is an override if defined - fatherID must be defined in this case.
-*/
-window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) {
-	const V = State.variables;
-	let r = "";
-	if (V.seePreg !== 0) {
-		if (jsRandom(0,99) < (chance + (V.reproductionFormula*((target.pregSource <= 0) ? ((target.ID == -1) ? 0 : 10) : 20)))) {
-			if (target.mpreg === hole) {
-
-				target.preg = 1;
-				target.pregSource = (!fatherID ? 0 : fatherID);
-
-				if (target.ID !== -1) {
-					target.pregWeek = 1;
-				}
-
-				target.pregType = setPregType(target);
-				WombImpregnate(target, target.pregType, target.pregSource, 1);
-
-				if (V.menstruation === 1) {}
-				else if (!displayOverride) {
-					target.pregKnown = 1;
-					if (target.ID === -1) {
-						/* r += "@@.lime;You have gotten pregnant.@@"; */
-					} else if (target.fuckdoll === 0) {
-						r += "@@.lime;She has become pregnant.@@";
-					} else {
-						r += "@@.lime;It has become pregnant.@@";
-					}
-				} else {
-					target.pregKnown = 1;
-				}
-
-			} else if (hole === 2) {
-
-				target.preg = 1;
-				target.pregSource = (!fatherID ? 0 : fatherID);
-
-				if (target.ID !== -1) {
-					target.pregWeek = 1;
-				}
-
-				target.pregType = setPregType(target);
-				WombImpregnate(target, target.pregType, target.pregSource, 1);
-
-				if (V.menstruation === 1) {}
-				else if (!displayOverride) {
-					target.pregKnown = 1;
-					if (target.ID === -1) {
-						/* r += "@@.lime;You have gotten pregnant.@@"; */
-					} else if (target.fuckdoll === 0) {
-						r += "@@.lime;She has become pregnant.@@";
-					} else {
-						r += "@@.lime;It has become pregnant.@@";
-					}
-				} else {
-					target.pregKnown = 1;
-				}
-			}
-		}
-	}
-	return r;
-};
-
-window.getIncubatorReserved = function(slaves) {
-
-	return FetusGlobalReserveCount("incubator");
-};
-
-window.getNurseryReserved = function (slaves) {
-
-	return FetusGlobalReserveCount("nursery");
-};
-
-window.findFather = function(fatherID) {
-	let father;
-	let V = State.variables;
-
-	father = V.slaves[V.slaveIndices[fatherID]];
-	if (father === undefined) {
-		if (V.incubator > 0) {
-			father = V.tanks.find(function(s) { return s.ID == fatherID; });
-		}
-	}
-	if (father === undefined) {
-		if (V.nursery > 0) {
-			father = V.cribs.find(function(s) { return s.ID == fatherID; });
-		}
-	}
-
-	return father;
-};
-
-window.adjustFatherProperty = function(actor, property, newValue) {
-	let father = findFather(actor.ID);
-	if (father)
-		father[property] = newValue;
-};
-
-/* OLD
-window.adjustFatherProperty = function(actor, property, newValue) {
-	let V = State.variables;
-	let fatherIndex;
-
-	fatherIndex = V.slaves.findIndex(function(s) { return s.ID == actor.ID; });
-	if (fatherIndex > 0) {
-		V.slaves[fatherIndex][property] = newValue;
-	} else if (V.incubator > 0) {
-		fatherIndex = V.tanks.findIndex(function(s) { return s.ID == actor.ID; });
-		if (fatherIndex > 0) {
-			V.tanks[fatherIndex][property] = newValue;
-		}
-	}
-	if (fatherIndex === -1) {
-		if (V.nursery > 0) {
-			fatherIndex = V.cribs.findIndex(function(s) { return s.ID == actor.ID; });
-			if (fatherIndex !== -1) {
-				V.cribs[fatherIndex][property] = newValue;
-			}
-		}
-	}
-}
-*/
-
-/* not to be used until that last part is defined. It may become slave.boobWomb.volume or some shit */
-window.getBaseBoobs = function(slave) {
-	return slave.boobs-slave.boobsImplant-slave.boobsMilk-slave.boobsWombVolume;
-};
-
-/*:: SetBellySize [script]*/
-
-window.SetBellySize = function SetBellySize(slave) {
-
-	let _implantSize;
-	WombNormalizePreg(slave); /*now with support for legacy code that advance pregnancy by setting .preg++ */
-
-	if (slave.bellyImplant > 0)
-		_implantSize = slave.bellyImplant;
-	else
-		_implantSize = 0;
-
-	if (slave.inflation == 3)
-		slave.bellyFluid = 10000;
-	else if (slave.inflation == 2)
-		slave.bellyFluid = 5000;
-	else if (slave.inflation == 1)
-		slave.bellyFluid = 2000;
-	else
-		slave.bellyFluid = 0;
-
-	slave.belly = slave.bellyPreg+slave.bellyFluid+_implantSize;
-};
-
-/*:: rbuttonJS [script]*/
-/* This is modified radiobutton macro, for automatic checked state setup*/
-/* Usage (be sure to use quotes around parameters):
-
-	<<rbutton "$variable" "value">>
-Or:
-	<<rbutton "$variable" "value" "HTML_element_ID" "Text to replace with, inside html element with ID from previous parameter. <br> HTML tags allowed.">>
-
-Group of radiobutton will be created based on variable name. Checked state will be set up if variable contain value matched with second parameter. Full form of macro call can be used to display extended description of selected value.
-*/
-
-Macro.add('rbutton', {
-	handler() {
-		if (this.args.length < 2) {
-		const errors = [];
-		if (this.args.length < 1) { errors.push('variable name'); }
-		if (this.args.length < 2) { errors.push('checked value'); }
-		return this.error(`no ${errors.join(' or ')} specified`);
-		}
-
-		// Ensure that the variable name argument is a string.
-		if (typeof this.args[0] !== 'string') {
-		return this.error('variable name argument is not a string');
-		}
-
-		const varName = this.args[0].trim();
-
-		// Try to ensure that we receive the variable's name (incl. sigil), not its value.
-		if (varName[0] !== '$' && varName[0] !== '_') {
-		return this.error(`variable name "${this.args[0]}" is missing its sigil ($ or _)`);
-		}
-
-		const initValue = Wikifier.getValue(this.args[0]);
-		const varId = Util.slugify(varName);
-		const checkValue = this.args[1];
-		const el = document.createElement('input');
-
-		var replaceID = "";
-		var replaceText = "";
-		if (typeof this.args[2] === 'string') {
-			replaceID = this.args[2];
-		}
-		if (typeof this.args[3] === 'string') {
-			replaceText = this.args[3];
-		}
-
-		/*
-		Setup and initialize the group counter.
-		*/
-		if (!TempState.hasOwnProperty(this.name)) {
-		TempState[this.name] = {};
-		}
-
-		if (!TempState[this.name].hasOwnProperty(varId)) {
-		TempState[this.name][varId] = 0;
-		}
-
-		/*
-		Setup and append the input element to the output buffer.
-		*/
-		jQuery(el)
-		.attr({
-			id : `${this.name}-${varId}-${TempState[this.name][varId]++}`,
-			name : `${this.name}-${varId}`,
-			type : 'radio',
-			tabindex : 0 // for accessibility
-		})
-		.addClass(`macro-${this.name}`)
-		.on('change', function () {
-			if (this.checked) {
-			Wikifier.setValue(varName, checkValue);
-
-			if (replaceID.length > 0 && replaceText.length > 0){
-
-				var replaceEl = document.getElementById(replaceID);
-				//alert (replaceEl);
-				if (replaceEl != null) {
-					replaceEl.innerHTML = replaceText;
-					}
-
-				}
-			}
-		})
-		.ready (function () {
-			//alert ("DOM finished");
-			if (el.checked && replaceID.length > 0 && replaceText.length > 0){
-
-				var replaceEl = document.getElementById(replaceID);
-				//alert (replaceEl);
-				if (replaceEl != null) {
-					replaceEl.innerHTML = replaceText;
-				}
-
-			}
-		})
-		.appendTo(this.output);
-
-		/*
-		Set the story variable to the checked value and the input element to checked, if requested.
-		*/
-		if (initValue == checkValue) {
-		el.checked = true;
-		Wikifier.setValue(varName, checkValue);
-		}
-	}
-});
-
-/*:: textboxJS [script] */
-
-/* Nicked off greyelf, works for replace textboxes */
-window.setReplaceTextboxMaxLength = function (storyVarName, maxLength) {
-	var textboxId = '#textbox-' + Util.slugify(storyVarName);
-	$(textboxId)
-			.attr('maxlength', maxLength)
-			.css({
-				'min-width' : 'initial',
-				width : maxLength + 'em',
-				padding : '3px 2px'
-			});
-};
-
-/* Nicked off TheMadExile, works for non-replace textboxes */
-window.setTextboxMaxLength = function (storyVarName, maxLength) {
-	var textboxId = '#textbox-' + Util.slugify(storyVarName);
-	postdisplay[textboxId + '-maxlength'] = function (taskName) {
-		delete postdisplay[taskName];
-		$(textboxId)
-			.attr('maxlength', maxLength)
-			.css({
-				'min-width' : 'initial',
-				width : maxLength + 'em',
-				padding : '3px 2px'
-			});
-	};
-};
-
-/*:: accordionJS.tw [script]*/
-
-/* Accordion 000-250-006 */
-
-/*
- * We're making changes to the DOM, so we need to make them *after* everything has been generated
- * Sticking this all in postdisplay calls reduces the chance of there being a timing conflict
- * with other scripts, since anything poking the DOM here will be done last
- *
- * Dev Note: The accordion mod should be able to turn *anything* into an accordion. This iteration
- * is configured tightly for the end of week report runs, but it shouldn't be that hard to adapt for
- * other uses, like character bios. For now, I'll see what other extra-long passages of cosmetic text
- * might benefit.
- *
- * 000-250-006 03092017
-*/
-
-postdisplay["doAccordionSet"] = function (content) {
-	if (variables().useAccordion == 1) {
-		Array.prototype.slice.call(document.querySelectorAll('.macro-include'))
-		.forEach(function(element) {
-			element.classList.add('accHidden');
-		});
-	}
-}
-
-postdisplay["doAccordion"] = function (content) {
-	var acc = document.getElementsByClassName("accordion");
-	var i;
-
-	for (i = 0; i < acc.length; i += 1) {
-		acc[i].onclick = function () {
-			this.classList.toggle("active");
-			var panel = this.nextElementSibling;
-			if (panel.style.maxHeight) {
-				panel.style.maxHeight = null;
-			} else {
-				panel.style.maxHeight = 2*panel.scrollHeight + "px";
-			}
-		};
-	}
-};
-
-/*:: EconomyJS [script]*/
-
-window.LivingRule = Object.freeze({LUXURIOUS: 'luxurious', NORMAL: 'normal', SPARE: 'spare'});
-window.Job = Object.freeze({
-	DAIRY: 'work in the dairy', MILKMAID: 'be the Milkmaid', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your Concubine',
-	BABY_FACTORY: 'labor in the production line', BROTHEL: 'work in the brothel', MADAM: 'be the Madam', ARCADE: 'be confined in the arcade',
-	SERVANT: 'work as a servant', SERVER: 'be a servant', STEWARD: 'be the Stewardess', CLUB: 'serve in the club', DJ: 'be the DJ',
-	JAIL: 'be confined in the cellblock', WARDEN: 'be the Wardeness', CLINIC: 'get treatment in the clinic', NURSE: 'be the Nurse',
-	HGTOY: 'live with your Head Girl', SCHOOL: 'learn in the schoolroom', TEACHER: 'be the Schoolteacher', SPA: 'rest in the spa', ATTEND: 'be the Attendant',
-	NANNY: 'work as a nanny', MATRON: 'be the Matron', FARMYARD: 'work as a farmhand', FARMER: 'be the Farmer', REST: 'rest'
-	});
-window.PersonalAttention = Object.freeze({TRADE: 'trading', WAR: 'warfare', SLAVING: 'slaving', ENGINEERING: 'engineering', MEDICINE: 'medicine', MAID: 'upkeep', HACKING: 'hacking'});
-
-window.predictCost = function(array) {
-	var array2 = array;
-	var totalCosts = ( 
-	getBrothelCosts() +
-	getBrothelAdsCosts() +
-	getArcadeCosts()  +
-	getClubCosts() +
-	getClubAdsCosts() +
-	getDairyCosts() +
-	getIncubatorCosts() +
-	getServantsQuartersCosts() +
-	getMasterSuiteCosts() +
-	getNurseryCosts() +
-	getFarmyardCosts() +
-	getSecurityExpansionCost() +
-	getLifestyleCosts() +
-	getFSCosts() +
-	getCitizenOrphanageCosts() +
-	getPrivateOrphanageCosts() +
-	getPeacekeeperCosts() +
-	getMercenariesCosts() +
-	getMenialRetirementCosts() +
-	getRecruiterCosts() +
-	getSchoolCosts() +
-	getPolicyCosts() +
-	getCyberModCosts() +
-	getPCTrainingCosts() +
-	getPCCosts() +
-	predictTotalSlaveCosts(array2)
-	);
-
-	 //these two apply a multiplicative effect to all costs so far.
-	totalCosts = getEnvironmentCosts(totalCosts);
-	totalCosts = getPCMultiplierCosts(totalCosts);
-	
-	//in the old order these were applied after multiplication.  Not sure if deliberate, but I'm leaving it for now.
-	totalCosts += (
-	getSFCosts() + 
-	getWeatherCosts()
-	);
-/*
-	// clean up
-	if(totalCosts > 0) {
-		totalCosts = 0;
-	} else {
-		totalCosts = Math.ceil(totalCosts);
-	}
-*/
-	return totalCosts;
-};
-
-window.getCost = function(array) {
-	var array2 = array;
-	var oldCash = State.variables.cash;
-	var costSoFar = 0;
-	cashX(forceNeg(getBrothelCosts()), "brothel");
-	cashX(forceNeg(getBrothelAdsCosts()), "brothelAds");
-	cashX(forceNeg(getArcadeCosts()), "arcade");
-	cashX(forceNeg(getClubCosts()), "club");
-	cashX(forceNeg(getClubAdsCosts()), "brothelAds");
-	cashX(forceNeg(getDairyCosts()), "dairy");
-	cashX(forceNeg(getIncubatorCosts()), "incubator");
-	cashX(forceNeg(getServantsQuartersCosts()), "servantsQuarters");
-	cashX(forceNeg(getMasterSuiteCosts()), "masterSuite");
-	cashX(forceNeg(getNurseryCosts()), "nursery");
-	cashX(forceNeg(getFarmyardCosts()), "farmyard");
-	cashX(forceNeg(getSecurityExpansionCost()), "securityExpansion");
-	cashX(forceNeg(getLifestyleCosts()), "personalLivingExpenses");
-	cashX(forceNeg(getFSCosts()), "futureSocieties");
-	cashX(forceNeg(getCitizenOrphanageCosts()), "citizenOrphanage");
-	cashX(forceNeg(getPrivateOrphanageCosts()), "privateOrphanage");
-	cashX(forceNeg(getPeacekeeperCosts()), "peacekeepers");
-	cashX(forceNeg(getMercenariesCosts()), "mercenaries");
-	cashX(forceNeg(getMenialRetirementCosts()), "menialRetirement");
-	cashX(forceNeg(getRecruiterCosts()), "recruiter");
-	cashX(forceNeg(getSchoolCosts()), "schoolBacking");
-	cashX(forceNeg(getPolicyCosts()), "policies");
-	cashX(forceNeg(getCyberModCosts()), "cyberMod");
-	cashX(forceNeg(getPCTrainingCosts()), "PCtraining");
-	cashX(forceNeg(getPCCosts()), "PCmedical");
-	getTotalSlaveCosts(array2);
-
-
-	//these two apply a multiplicative effect to all costs so far.
-	// Calculate what the deduced expenses would be, then subtract
-	costSoFar = (oldCash - State.variables.cash); //How much we have spent by this point; expected to be positive.
-	cashX(forceNeg(costSoFar - getEnvironmentCosts(costSoFar), "environment")); //getEnv takes total costs and makes it worse.  Figure out how much worse and record it
-
-	costSoFar = (oldCash - State.variables.cash);
-	cashX(forceNeg(costSoFar - getPCMultiplierCosts(costSoFar)), "PCskills");
-
-	//in the old order these were applied after multiplication.  Not sure if deliberate, but I'm leaving it for now.
-	cashX(forceNeg(getSFCosts()), "specialForces");
-	cashX(forceNeg(getWeatherCosts()), "weather");
-	return (oldCash - State.variables.cash);
-};
-
-//slave expenses
-window.predictTotalSlaveCosts = function(array3) {
-	var loopCosts = 0;
-	//slave expenses
-	for (var slave of array3) {
-		loopCosts += getSlaveCost(slave);
-		loopCosts += getSlaveMinorCosts(slave);
-	}
-	return loopCosts;
-};
-
-window.getTotalSlaveCosts = function(array3) {
-	var slaveCost = 0;
-	var slaveCostMinor = 0;
-	for (var slave of array3) {
-		slaveCost = getSlaveCost(slave);
-		cashX(forceNeg(slaveCost), "slaveUpkeep", slave);
-		slaveCostMinor = getSlaveMinorCosts(slave);
-		cashX(forceNeg(slaveCostMinor), "slaveUpkeep", slave);
-	}
-	//nothing to return, cashX already billed.
-};
-
-//facility expenses
-window.getBrothelCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var brothel = State.variables.brothel;
-	var costs = (brothel * facilityCost);
-	costs += (0.1 * State.variables.brothelUpgradeDrugs * brothel * facilityCost);
-	return costs;
-};
-
-window.getBrothelAdsCosts = function() {
-	var brothel = State.variables.brothel;
-	var costs = 0
-	if(brothel > 0) {
-		costs += State.variables.brothelAdsSpending;
-	}
-	return costs;
-};
-
-window.getArcadeCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var arcade = State.variables.arcade;
-	var costs = (arcade * facilityCost * 0.5);
-	costs += (0.2 * State.variables.arcadeUpgradeInjectors * arcade * facilityCost)
-	+ (0.2 * State.variables.arcadeUpgradeCollectors * arcade * facilityCost);
-	return costs;
-};
-
-window.getClubCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var club = State.variables.club;
-	var costs = (club * facilityCost);
-	costs += (0.2 * State.variables.clubUpgradePDAs * club * facilityCost);
-	if(club > 0) {
-		costs += State.variables.clubAdsSpending;
-	}
-	return costs;
-};
-
-window.getClubAdsCosts = function() {
-	var club = State.variables.club;
-	var costs = 0;
-	if(club > 0) {
-		costs += State.variables.clubAdsSpending;
-	}
-	return costs;
-};
-
-window.getDairyCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var dairy = State.variables.dairy;
-	var costs = (dairy * facilityCost) + (0.2 * State.variables.dairyFeedersUpgrade * dairy * facilityCost)
-	+ (0.1 * State.variables.dairyPregUpgrade * dairy * facilityCost)
-	+ (0.2 * State.variables.dairyStimulatorsUpgrade * facilityCost);
-	if(dairy > 0) {
-		costs += ((State.variables.bioreactorsXY + State.variables.bioreactorsXX + State.variables.bioreactorsHerm + State.variables.bioreactorsBarren) * 100);
-	}
-	return costs;
-};
-
-window.getIncubatorCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var incubator = State.variables.incubator;
-	var costs = (State.variables.incubator * facilityCost * 10);
-	costs += (0.2 * State.variables.incubatorUpgradeWeight * incubator * facilityCost)
-	+ (0.2 * State.variables.incubatorUpgradeMuscles * incubator * facilityCost)
-	+ (0.2 * State.variables.incubatorUpgradeReproduction * incubator * facilityCost)
-	+ (0.2 * State.variables.incubatorUpgradeGrowthStims * incubator * facilityCost)
-	+ (0.5 * State.variables.incubatorUpgradeSpeed * incubator * facilityCost);
-	if(incubator > 0) {
-		costs += ((State.variables.incubatorWeightSetting + State.variables.incubatorMusclesSetting + State.variables.incubatorReproductionSetting + State.variables.incubatorGrowthStimsSetting) * 500);
-	}
-	return costs;
-};
-
-window.getServantsQuartersCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var servantsQuarters = State.variables.servantsQuarters;
-	var costs = (0.2 * State.variables.servantsQuartersUpgradeMonitoring * servantsQuarters * facilityCost);
-	return costs;
-};
-
-window.getMasterSuiteCosts = function() {
-	var costs = 0;
-	if(State.variables.masterSuitePregnancySlaveLuxuries === 1) {
-		costs += 500;
-	}
-	if(State.variables.masterSuitePregnancyFertilitySupplements === 1) {
-		costs += 1000;
-	}
-	return costs;
-};
-
-window.getNurseryCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var nursery = State.variables.nursery;
-	var costs = (nursery * facilityCost);
-	return costs;
-};
-
-window.getFarmyardCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var farmyard = State.variables.farmyard;
-	var costs = (farmyard * facilityCost);
-	return costs;
-};
-
-window.getSecurityExpansionCost = function() {
-	//security expansion
-	var secExpCost = 0;
-	var soldierMod = 0;
-	if(State.variables.secExp == 1) {
-		if(State.variables.edictsUpkeep > 0) {
-			secExpCost += State.variables.edictsUpkeep;
-		}
-		if(State.variables.SFSupportUpkeep > 0) {
-			secExpCost += State.variables.SFSupportUpkeep;
-		}
-		if(State.variables.propHub > 0) {
-			secExpCost += State.variables.propHubUpkeep;
-		}
-		if(State.variables.secHQ > 0) {
-			secExpCost += State.variables.secHQUpkeep + 20 * State.variables.secMenials;
-		}
-		if(State.variables.secBarracks > 0) {
-			secExpCost += State.variables.secBarracksUpkeep;
-		}
-		if(State.variables.riotCenter > 0) {
-			secExpCost += State.variables.riotUpkeep;
-		}
-		if(State.variables.soldierWages == 0) {
-			soldierMod = 1;
-		}
-		else if(State.variables.soldierWages == 1) {
-			soldierMod = 1.5;
-		}
-		else {
-			soldierMod = 2;
-		}
-		if (State.variables.militiaUnits != null) {
-			for (var i = 0; i < State.variables.militiaUnits.length; i++) {
-				if( !(State.variables.militiaUnits[i] === null) ){
-					secExpCost += State.variables.militiaUnits[i].troops * State.variables.soldierUpkeep * soldierMod;
-				}
-			}
-		}
-		if (State.variables.slaveUnits != null) {
-			for (var i = 0; i < State.variables.slaveUnits.length; i++) {
-				if( !( State.variables.slaveUnits[i] === null) ){
-					secExpCost += State.variables.slaveUnits[i].troops * State.variables.soldierUpkeep * 0.5 * soldierMod;
-				}
-			}
-		}
-		if (State.variables.mercUnits != null) {
-			for (var i = 0; i < State.variables.mercUnits.length; i++) {
-				if( !(State.variables.mercUnits[i] === null) ){
-					secExpCost += State.variables.mercUnits[i].troops * State.variables.soldierUpkeep * 1.5 * soldierMod;
-				}
-			}
-		}
-	}
-	return secExpCost;
-};
-
-	//general arcology costs
-
-window.getLifestyleCosts = function() {
-	var costs = 0;
-	var localEcon = State.variables.localEcon;
-	costs += (State.variables.girls * (250 + (50000 / localEcon)));
-	return costs;
-};
-
-window.getFSCosts = function() {
-	var costs = 0;
-	costs += State.variables.FSSpending;
-	if(State.variables.arcologies[0].FSRepopulationFocusLaw === 1 && State.variables.PC.pregKnown == 1) {
-		costs -= 500;
-	}
-	return costs;
-};
-
-window.getCitizenOrphanageCosts = function() {
-	var costs = 0;
-	costs += State.variables.citizenOrphanageTotal * 100;
-	return costs;
-};
-
-window.getPrivateOrphanageCosts = function() {
-	var costs = 0;
-	costs += State.variables.privateOrphanageTotal * 500;
-	if(State.variables.breederOrphanageTotal > 0) {
-		costs += 50;
-	}
-	return costs;
-};
-
-window.getPeacekeeperCosts = function() {
-	var costs = 0;
-	if(State.variables.peacekeepers !== 0 && State.variables.peacekeepers.undermining !== 0) {
-		costs += State.variables.peacekeepers.undermining;
-	}
-	return costs;
-};
-
-window.getMercenariesCosts = function() {
-	var costs = 0;
-	var mercCosts = State.variables.mercenaries * 2000;
-	if(State.variables.mercenaries > 0) {
-		if(State.variables.barracks) {
-			mercCosts *= 0.5;
-		}
-		if((State.variables.PC.warfare >= 100) || (State.variables.PC.career === 'arcology owner')) {
-			mercCosts *= 0.5;
-		}
-		costs += mercCosts;
-	}
-	return costs;
-};
-
-window.getMenialRetirementCosts = function() {
-	var costs = 0;
-	if(State.variables.citizenRetirementMenials == 1) {
-		costs += State.variables.menials * 2;
-	}
-	return costs;
-};
-
-// policy and other expenses
-window.getRecruiterCosts = function() {
-	var costs = 0;
-	if(State.variables.Recruiter !== 0) {
-		costs += 250;
-	}
-	return costs;
-};
-
-window.getSchoolCosts = function() {
-	var costs = 0;
-	if(State.variables.TSS.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if(State.variables.GRI.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if(State.variables.SCP.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if(State.variables.LDE.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if(State.variables.TGA.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if(State.variables.HA.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if(State.variables.TCR.schoolPresent === 1) {
-		costs += 1000;
-	}
-	if((State.variables.TFS.schoolPresent === 1) && ((State.variables.PC.dick === 0) || (State.variables.PC.vagina === 0) || (State.variables.PC.boobs === 0))) {
-		costs += 1000;
-	}
-	if(State.variables.TSS.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.GRI.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.SCP.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.LDE.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.TGA.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.HA.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.TCR.subsidize !== 0) {
-		costs += 1000;
-	}
-	if(State.variables.TFS.subsidize !== 0) {
-		costs += 1000;
-	}
-	return costs;
-};
-
-window.getPolicyCosts = function() {
-	var costs = 0;
-	var policyCost = State.variables.policyCost;
-	if(State.variables.alwaysSubsidizeGrowth === 1) {
-		costs += policyCost;
-	}
-	if(State.variables.alwaysSubsidizeRep === 1) {
-		costs += policyCost;
-	}
-	if(State.variables.RegularParties === 1) {
-		costs += policyCost;
-	}
-
-	if(State.variables.ProImmigrationCash === 1) {
-		costs += policyCost;
-	}
-	if(State.variables.AntiEnslavementCash === 1) {
-		costs += policyCost;
-	}
-
-	if(State.variables.CoursingAssociation === 1) {
-		costs += 1000;
-	}
-	return costs;
-};
-
-window.getCyberModCosts = function() {
-	var costs = 0;
-	if(State.variables.cyberMod !== 0 && State.variables.researchLab.built === 'true') {
-		costs += ((100 * State.variables.researchLab.maxSpace) + (300 * State.variables.researchLab.hired) + (100 * State.variables.researchLab.hired));
-	}
-	return costs;
-};
-
-
-//player expenses
-window.getPCTrainingCosts = function() {
-	var costs = 0;
-	if(State.variables.PC.actualAge >= State.variables.IsInPrimePC && State.variables.PC.actualAge < State.variables.IsPastPrimePC) {
-	if(State.variables.personalAttention === PersonalAttention.TRADE) {
-		costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
-	} else if(State.variables.personalAttention === PersonalAttention.WAR) {
-		costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
-	} else if(State.variables.personalAttention === PersonalAttention.SLAVING) {
-		costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
-	} else if(State.variables.personalAttention === PersonalAttention.ENGINEERING) {
-		costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
-	} else if(State.variables.personalAttention === PersonalAttention.MEDICINE) {
-		costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
-	} else if(State.variables.personalAttention === PersonalAttention.HACKING) {
-		costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
-	}
-	}
-	return costs;
-};
-window.getPCCosts = function() {
-	var costs = 0;
-	if(State.variables.PC.preg === -1) {
-		costs += 25;
-	} else if(State.variables.PC.fertDrugs === 1) {
-		costs += 50;
-	} else if(State.variables.PC.preg >= 16) {
-		costs += 100;
-	}
-	if(State.variables.PC.staminaPills === 1) {
-		costs += 50;
-	}
-	return costs;
-};
-
-
-window.getPCMultiplierCosts = function(cost) {
-	if(State.variables.PC.career === 'servant') {
-		if(State.variables.personalAttention === PersonalAttention.MAID) {
-			if(State.variables.PC.belly >= 5000) {
-				cost *= 0.80;
-			} else {
-				cost *= 0.75;
-			}
-		} else {
-			cost *= 0.9;
-		}
-	}
-
-	return cost;
-};
-
-window.getEnvironmentCosts = function(cost) {
-	if(State.variables.secExp == 1) {
-		if(State.variables.terrain === 'oceanic' || State.variables.terrain === 'marine') {
-			if(State.variables.docks > 0) {
-				cost *= (1 - State.variables.docks * 0.05);
-			}
-		} else if(State.variables.railway > 0) {
-			cost *= (1 - State.variables.railway * 0.05);
-		}
-	}
-	return cost;
-};
-
-window.getSFCosts = function() {
-	var costs = 0;
-	if(State.variables.SF.Toggle && State.variables.SF.Active >= 1) {
-		if(State.variables.SF.Subsidy) {
-			costs += Math.ceil( (10000*(State.variables.SF.Squad.Troops/10))+(1+(State.variables.arcologies[0].prosperity/100))+(1+(State.variables.SF.Size/100)) );
-		}
-		if(State.variables.SF.Bonus) {
-			const T = State.temporary;
-			Count();
-			costs += Math.ceil(T.SFCashBonus);
-		}
-	}
-	return costs;
-};
-
-window.getWeatherCosts = function() {
-	var costs = 0;
-	if(State.variables.econWeatherDamage && State.variables.disasterResponse > 0) {
-		costs += Math.trunc(State.variables.disasterResponse * 200000 / State.variables.localEcon);
-	}
-	if(State.variables.antiWeatherFreeze > 0) {
-		costs += Math.trunc(State.variables.antiWeatherFreeze * 200000 / State.variables.localEcon);
-	}
-	return costs;
-};
-
-window.getSlaveMinorCosts = function(slave) {
-	var costs = 0;
-	var rulesCost = State.variables.rulesCost;
-	if(slave.assignment === Job.SERVANT || slave.assignment === Job.SERVER) {
-	if(slave.trust < -20) {
-		costs -= rulesCost * 4;
-	} else if(slave.devotion < -20) {
-		if (slave.trust >= 20) {
-			costs -= rulesCost / 2;
-		} else {
-			costs -= rulesCost * 2;
-		}
-	} else if(slave.devotion <= 20) {
-		costs -= rulesCost * 3;
-	} else if(slave.devotion <= 50) {
-		costs -= rulesCost * 4;
-	} else {
-		costs -= rulesCost * 5;
-	}
-	if(slave.fetish === 'submissive') {
-		costs -= rulesCost;
-	} else if(slave.fetish === 'dom') {
-		costs += rulesCost;
-	}
-	if(slave.relationship < -1) {
-		costs -= rulesCost;
-	}
-	if(slave.energy < 20) {
-		costs -= rulesCost;
-	} else if(slave.energy < 40) {
-		costs -= rulesCost / 2;
-	}
-	if(slave.lactation > 0) {
-		costs -= 25;
-	}
-	if(slave.assignment === Job.SERVANT) {
-		costs -= rulesCost;
-	}
-	if(setup.servantCareers.includes(slave.career) || slave.skillS >= State.variables.masteredXP) {
-		costs -= rulesCost;
-	}
-	}
-	return costs;
-};
-
-window.getSlaveCost = function(s) {
-	if(!s) { return 0; }
-	// Data duplicated from Cost Report
-	var cost = 0;
-	var rulesCost = State.variables.rulesCost;
-	var foodCost = State.variables.foodCost;
-	var drugsCost = State.variables.drugsCost;
-
-	// Living expenses
-	switch(s.assignment) {
-	case Job.ARCADE:
-		cost += rulesCost * 0.75;
-		break;
-	case Job.DAIRY:
-		if(State.variables.dairyRestraintsSetting >= 2) {
-			cost += rulesCost * 0.75;
-		} else if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 1.5;
-		} else if(State.variables.dairyDecoration === 'Degradationist') {
-			cost += rulesCost * 0.90;
-		} else {
-			cost += rulesCost;
-		}
-		break;
-	case Job.BROTHEL:
-		if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 1.5;
-		} else {
-			cost += rulesCost;
-		}
-		break;
-	case Job.SCHOOL: case Job.CLUB:
-		cost += rulesCost * 1.5;
-		break;
-	case Job.CLINIC:
-		if(s.livingRules === LivingRule.LUXURIOUS) {
-			cost += rulesCost * 2;
-		} else if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 1.5;
-		} else {
-			cost += rulesCost;
-		}
-		break;
-	case Job.SPA: case Job.NANNY:
-		if(s.livingRules === LivingRule.LUXURIOUS) {
-			cost += rulesCost * 1.75;
-		} else if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 1.5;
-		} else {
-			cost += rulesCost;
-		}
-		break;
-	case Job.SERVANT:
-		if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 1.5;
-		} else {
-			if(State.variables.servantsQuartersDecoration === 'Degradationist') {
-				cost += rulesCost * 0.90;
-			} else {
-				cost += rulesCost;
-			}
-		}
-		break;
-	case Job.JAIL:
-		if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 1.25;
-		} else {
-			cost += rulesCost * 0.90;
-		}
-		break;
-	case Job.MADAM: case Job.DJ: case Job.NURSE: case Job.WARDEN:
-	case Job.ATTEND: case Job.STEWARD: case Job.MILKMAID: case Job.TEACHER:
-	case Job.MATRON:
-		cost += rulesCost * 2;
-		break;
-	default:
-		if(s.livingRules === LivingRule.LUXURIOUS) {
-			cost += rulesCost * (s.relationship >= 4 ? 3 : 4);
-		} else if(s.livingRules == LivingRule.NORMAL) {
-			cost += rulesCost * 2;
-		} else {
-			cost += rulesCost;
-		}
-		break;
-	}
-
-	// Food
-	cost += foodCost * 4;
-	switch(s.diet) {
-		case 'fattening': case 'muscle building':
-			cost += foodCost;
-			break;
-		case 'restricted': case 'slimming':
-			cost -= foodCost;
-			break;
-	}
-	if(s.geneticQuirks.fertility == 2 && s.geneticQuirks.hyperFertility == 2 && s.preg == 0 && (s.ovaries == 1 || s.mpreg == 1)) {
-		cost += foodCost * 0.5;
-	}
-	if(s.weight > 130) {
-		cost += foodCost * 2;
-	} else if(s.weight > 50) {
-		cost += foodCost;
-	} else if(s.weight < -50) {
-		cost -= foodCost;
-	}
-	if(s.drugs === 'appetite suppressors') {
-		cost -= foodCost;
-	}
-	if(s.lactation > 0) {
-		cost += foodCost * s.lactation * (1 + Math.trunc(s.boobs/10000));
-	}
-	if(s.preg > s.pregData.normalBirth/8) {
-		if(s.assignment === Job.DAIRY && State.variables.dairyFeedersSetting > 0) {
-			// Extra feeding costs to support pregnancy are covered by dairy feeders.
-			// TODO: Include them here anyway?
-		} else if((s.assignment === Job.MASTER_SUITE || s.assignment === Job.CONCUBINE)
-			&& State.variables.masterSuiteUpgradePregnancy === 1) {
-			// Extra feeding costs to support pregnancy are covered by master suite luxuries.
-			// TODO: Include them here anyway?
-		} else {
-			cost += foodCost * s.pregType * (s.pregControl === 'speed up' ? 3 : 1);
-			if (s.pregType >= 100) {
-				cost += foodCost * 5 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1);
-			} else if (s.pregType >= 50) {
-				cost += foodCost * 3 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1);
-			} else if (s.pregType >= 30) {
-				cost += foodCost * 2 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1);
-			} else if (s.pregType >= 10) {
-				cost += foodCost * s.pregType * (s.pregControl === 'speed up' ? 3 : 1);
-			}
-		}
-	}
-	if(s.diet === 'XX' || s.diet === 'XY' || s.diet === 'fertility') {
-		cost += 25;
-	} else if(s.diet === 'cleansing') {
-		cost += 50;
-	} else if(s.diet === 'XXY') {
-		cost += 75;
-	}
-
-	// Accessibility costs
-	if(State.variables.boobAccessibility !== 1 && s.boobs > 20000
-		&& (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 50;
-	}
-	if(State.variables.pregAccessibility !== 1
-		&& (s.belly >= 60000) && s.assignment != Job.BABY_FACTORY && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 100;
-	}
-	if(State.variables.dickAccessibility != 1 && s.dick > 45 && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 50;
-	}
-	if(State.variables.ballsAccessibility != 1 && s.balls > 90 && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 50;
-	}
-	if(State.variables.buttAccessibility != 1 && s.butt > 15 && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 50;
-	}
-	if(!canSee(s) && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 50;
-	} else if(s.eyes <= -1 && s.eyewear !== 'corrective glasses' && s.eyewear !== 'corrective contacts') {
-		cost += 25;
-	} else if(s.eyewear === 'blurring glasses' || s.eyewear === 'blurring contacts') {
-		cost += 25;
-	}
-	if(!canHear(s) && (s.assignment != Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment != Job.ARCADE)) {
-		cost += 40;
-	} else if(s.hears <= -1 && s.earwear !== 'hearing aids') {
-		cost += 15;
-	} else if(s.earwear === 'muffling ear plugs') {
-		cost += 15;
-	}
-	if((s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
-		if(s.amp !== 0) {
-			if(s.amp === 1) {
-				cost += rulesCost;
-			} else {
-				cost += rulesCost / 2;
-			}
-		} else if(!canWalk(s)) {
-			cost += rulesCost;
-		}
-	}
-
-	// Maintenance
-	if(s.boobs > 10000 && s.boobsImplantType === 1) {
-		cost += 50;
-	}
-	if(s.butt > 10 && s.buttImplantType === 1) {
-		cost += 50;
-	}
-	if((s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
-		if(s.preg > s.pregData.minLiveBirth && State.variables.universalRulesBirthing === 1) {
-			cost += 50;
-		}
-	}
-
-	// Retirement account
-	if(State.variables.citizenRetirementMenials === 1 && State.variables.CitizenRetirement === 0) {
-		cost += 2;
-	}
-
-	if(State.variables.CitizenRetirement === 1) {
-		cost += 250;
-	}
-
-	// Enemas
-	if(s.inflation === 3) {
-		switch(s.inflationType) {
-		case 'water':
-			cost += 100;
-			break;
-		case 'food':
-			cost += (foodCost * 4);
-			break;
-		case 'curative': case 'aphrodisiac': case 'tightener':
-			cost += (100 + (drugsCost * 2));
-			break;
-		}
-	} else if(s.inflation === 2) {
-		switch(s.inflationType) {
-		case 'water':
-			cost += 50;
-			break;
-		case 'food':
-			cost += (foodCost * 2);
-			break;
-		case 'curative': case 'aphrodisiac': case 'tightener':
-			cost += (50 + (drugsCost * 2));
-			break;
-		}
-	} else if(s.inflation === 1) {
-		switch(s.inflationType) {
-		case 'water':
-			cost += 25;
-			break;
-		case 'food':
-			cost += (foodCost);
-			break;
-		case 'curative': case 'aphrodisiac': case 'tightener':
-			cost += (25 + (drugsCost * 2));
-			break;
-		}
-	}
-
-	// Drugs
-	switch(s.drugs) {
-	case 'anti-aging cream':
-		cost += drugsCost * 10;
-		break;
-	case 'female hormone injections': case 'male hormone injections': case 'intensive breast injections':
-	case 'intensive butt injections': case 'intensive penis enhancement': case 'intensive testicle enhancement':
-	case 'intensive lip injections': case 'hyper breast injections': case 'hyper butt injections':
-	case 'hyper penis enhancement': case 'hyper testicle enhancement': case 'hyper lip injections':
-	case 'growth stimulants':
-		cost += drugsCost * 5;
-		break;
-	case 'sag-B-gone':
-		cost += Math.trunc(drugsCost * 0.1);
-		break;
-	case 'no drugs': case 'none':
-		break;
-	default:
-		cost += drugsCost * 2;
-		break;
-	}
-	if(s.curatives > 0 && s.assignmentVisible === 1) {
-		cost += drugsCost * s.curatives;
-	}
-	if(s.aphrodisiacs !== 0) {
-		cost += Math.trunc(drugsCost * Math.abs(s.aphrodisiacs));
-	}
-	if(s.hormones !== 0) {
-		cost += Math.trunc((drugsCost * Math.abs(s.hormones) * 0.5));
-	}
-	if(s.bodySwap > 0) {
-		cost += Math.trunc((drugsCost * s.bodySwap * 10));
-	}
-	if(s.preg === -1 && isFertile(s)) {
-		cost += Math.trunc((drugsCost * 0.5));
-	}
-
-	// Promotion costs
-	if(State.variables.studio === 1) {
-		if(s.pornFameSpending > 0) {
-			cost += (s.pornFameSpending/State.variables.PCSlutContacts);
-		}
-	}
-
-	if(isNaN(cost)) {
-		throw new Error('Cost calculation for slave ' + s.slaveName + ' (' + s.ID + ') failed.');
-	}
-	return cost;
-};
-
-// Supply and Demand for slaves (linear, simple)
-// PC buying slaves reduces supply, selling slaves reduces demand.
-
-window.menialSlaveCost = function(q) {
-	if(!q) {
-		q = 0;
-	}
-	var demand = State.variables.menialDemandFactor;
-	var supply = State.variables.menialSupplyFactor;
-	var baseCost = 1000;
-	var random = State.variables.slaveCostRandom;
-	return (Math.trunc(baseCost + demand / 400 - supply / 400 + q / 400) + random);
-};
-
-window.getSlaveStatisticData = function(s, facility) {
-	if(!s || !facility) {
-		// Base data, even without facility
-		return {
-			ID: s.ID, slaveName: s.slaveName, customLabel: s.customLabel,
-			income: 0, adsIncome: 0, rep: 0, cost: getSlaveCost(s),
-			customers: 0 /* brothel, club, ... */
-		};
-	}
-
-	if(!facility.income) {
-		facility.income = new Map();
-	}
-
-	if(facility.income.has(s.ID)) {
-		return facility.income.get(s.ID);
-	} else {
-		var data = {
-			ID: s.ID, slaveName: s.slaveName, customLabel: s.customLabel,
-			income: 0, adsIncome: 0, rep: 0, cost: getSlaveCost(s),
-			customers: 0 /* brothel, club, ... */
-		};
-		facility.income.set(s.ID, data);
-		return data;
-	}
-};
-
-window.initFacilityStatistics = function(facility) {
-	facility = facility || {};
-	facility.adsIncome = 0;
-	facility.maintenance = 0;
-	facility.totalIncome = 0;
-	facility.totalExpenses = 0;
-	facility.profit = 0;
-	facility.income = new Map();
-	return facility;
-};
-
-window.cashX = function(cost, what, who) {
-	const V = State.variables;
-
-	if(isNaN(cost)){
-		V.lastWeeksErrors += `NaN: "${cost}" at ${what},
-		`;
-	} else {
-		
-		//Spend the money
-		V.cash += cost;
-		
-		//INCOME
-		if(cost > 0) {
-
-				//record the action
-				if (typeof V.lastWeeksCashIncome[what] !== 'undefined') {
-					V.lastWeeksCashIncome[what] += cost;
-				} else {
-					V.lastWeeksErrors += `Unknown place "${what}" gained you ${cost},`;
-				}
-				
-				//record the slave, if available
-				if (typeof who !== 'undefined'){
-						who.lastWeeksCashIncome += cost;
-						who.lifetimeCashIncome += cost;
-				}
-		}
-		
-		//EXPENSES
-		else if(cost < 0) {
-
-			//record the action
-			if (typeof V.lastWeeksCashExpenses[what] !== 'undefined') {
-				V.lastWeeksCashExpenses[what] += cost;
-			} else {
-				V.lastWeeksErrors += `Unknown place "${what}" charged you ${cost},`;
-			}
-
-			//record the slave, if available
-			if (typeof who !== 'undefined'){
-				if (what === "slaveTransfer"){
-					who.slaveCost = cost;
-				} else {
-					who.lifetimeCashExpenses += cost;
-				}
-			}
-		}
-		return cost;
-	}
-};
-
-window.forceNeg = function(x) {
-	return -Math.abs(x);
-};
-
-Number.prototype.toFixedHTML = function() {
-	return commaNum(Number.prototype.toFixed.apply(this, arguments)).replace(/\.0+$/, '<span style="opacity: 0.3">$&</span>');
-};
-
-/*:: rulesAssistant [script]*/
-
-window.hasSurgeryRule = function(slave, rules) {
-	return rules.some(
-		rule => ruleApplied(slave, rule) && rule.set.autoSurgery > 0);
-};
-
-window.hasRuleFor = function(slave, rules, what) {
-	return rules.some(
-		rule => ruleApplied(slave, rule) && rule[what] !== "no default setting");
-};
-
-window.hasHColorRule = function(slave, rules) {
-	return hasRuleFor(slave, rules, "hColor");
-};
-
-window.hasHStyleRule = function(slave, rules) {
-	return hasRuleFor(slave, rules, "hStyle");
-};
-
-window.hasEyeColorRule = function(slave, rules) {
-	return hasRuleFor(slave, rules, "eyeColor");
-};
-
-window.lastPregRule = function(slave, rules) {
-	return rules.some(rule =>
-		ruleApplied(slave, rule) && rule.set.preg === -1);
-};
-
-window.mergeRules = function mergeRules(rules) {
-	const combinedRule = {};
-	rules.forEach(rule => {
-		// A rule overrides any preceding ones if,
-		// * there are no preceding ones,
-		// * or it sets autoBrand,
-		// * or it does not set autoBrand and is not "no default setting"
-		Object.keys(rule).forEach(key => {
-			const applies = (combinedRule[key] === undefined ||
-				(key === "autoBrand" && rule[key]) ||
-				(key !== "autoBrand" && rule[key] !== "no default setting"));
-			if (!applies) return;
-			combinedRule[key] = rule[key];
-		});
-	});
-	return combinedRule;
-};
-
-// return if a rule is applied on a slave
-window.ruleApplied = function(slave, rule) {
-	return slave.currentRules.includes(rule.ID);
-};
-
-// remove slave from the facility described by the rule
-window.RAFacilityRemove = function RAFacilityRemove(slave, rule) {
-	const V = State.variables;
-	let r = "";
-	if (!rule.facilityRemove) return r;
-	switch(rule.setAssignment) {
-	case "be confined in the arcade":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.arcadeName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "work in the brothel":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.brothelName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "serve in the club":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${clubName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "work in the dairy":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.dairyName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "work as farmhand":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.farmyardName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave. rule.removalAssignment);
-		}
-		break;
-
-	case "rest in the spa":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.spaName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "work as a nanny":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.nurseryName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "get treatment in the clinic":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>{slave.slaveName} has been removed from ${V.clinicName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "serve in the master suite":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>{slave.slaveName} has been removed from ${V.masterSuiteName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "live with your Head Girl":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${HGSuiteName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "work as a servant":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.servantsQuartersName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "learn in the schoolroom":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.schoolroomName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-
-	case "be confined in the cellblock":
-		if (slave.assignment === rule.setAssignment) {
-			r += `<br>${slave.slaveName} has been removed from ${V.cellblockName} and has been assigned to ${rule.removalAssignment}.`;
-			assignJob(slave, rule.removalAssignment);
-		}
-		break;
-	}
-};
-
-// return whether the rule applies to the slave
-window.ruleAppliesP = function ruleAppliesP(cond, slave) {
-	let flag;
-
-	// attribute / function check
-	switch (cond.function) {
-	case true: // always applies
-		flag = true;
-		break;
-	case false: // never applies
-		flag = false;
-		break;
-	case "between": // between two values of a slave's attribute
-		flag = between(
-			slave[cond.data.attribute],
-			cond.data.value[0],
-			cond.data.value[1]);
-		break;
-	case "belongs": // the attribute belongs in the list of values
-		flag = cond.data.value.includes(slave[cond.data.attribute])
-		break;
-	case "custom": // user provided JS function
-		flag = eval(cond.data)(slave);
-		break;
-	}
-	// assignment / facility / special slaves / specific slaves check
-	let assignment = slave.assignment;
-	if (assignment === "be your Concubine") assignment = "serve in the master suite";
-	flag = flag &&
-		!(cond.excludeSpecialSlaves && isLeaderP(slave)) &&
-		(cond.assignment.length === 0 || cond.assignment.includes(assignment)) &&
-		(cond.selectedSlaves.length === 0 || cond.selectedSlaves.includes(slave.ID)) &&
-		!(cond.excludedSlaves.includes(slave.ID));
-	return flag;
-};
-
-window.emptyDefaultRule = function emptyDefaultRule() {
-	const id = generateNewID();
-	const rule = {
-		ID: id,
-		name: `Rule ${id}`,
-		condition: {
-			function: false,
-			data: {},
-			excludeSpecialSlaves: false,
-			assignment: [],
-			selectedSlaves: [],
-			excludedSlaves: [],
-		},
-		set: {
-			releaseRules: "no default setting",
-			toyHole: "no default setting",
-			clitSetting: "no default setting",
-			clitSettingXY: "no default setting",
-			clitSettingXX: "no default setting",
-			clitSettingEnergy: "no default setting",
-			speechRules: "no default setting",
-			clothes: "no default setting",
-			collar: "no default setting",
-			shoes: "no default setting",
-			legAccessory: "no default setting",
-			virginAccessory: "no default setting",
-			aVirginAccessory: "no default setting",
-			vaginalAccessory: "no default setting",
-			aVirginDickAccessory: "no default setting",
-			dickAccessory: "no default setting",
-			bellyAccessory: "no default setting",
-			aVirginButtplug: "no default setting",
-			buttplug: "no default setting",
-			buttplugAttachment: "no default setting",
-			eyeColor: "no default setting",
-			makeup: "no default setting",
-			nails: "no default setting",
-			hColor: "no default setting",
-			hLength: "no default setting",
-			haircuts: "no default setting",
-			hStyle: "no default setting",
-			eyebrowHColor: "no default setting",
-			eyebrowHStyle: "no default setting",
-			eyebrowFullness: "no default setting",
-			pubicHColor: "no default setting",
-			pubicHStyle: "no default setting",
-			nipplesPiercing: "no default setting",
-			areolaePiercing: "no default setting",
-			clitPiercing: "no default setting",
-			vaginaLube: "no default setting",
-			vaginaPiercing: "no default setting",
-			dickPiercing: "no default setting",
-			anusPiercing: "no default setting",
-			lipsPiercing: "no default setting",
-			tonguePiercing: "no default setting",
-			earPiercing: "no default setting",
-			nosePiercing: "no default setting",
-			eyebrowPiercing: "no default setting",
-			navelPiercing: "no default setting",
-			corsetPiercing: "no default setting",
-			boobsTat: "no default setting",
-			buttTat: "no default setting",
-			vaginaTat: "no default setting",
-			dickTat: "no default setting",
-			lipsTat: "no default setting",
-			anusTat: "no default setting",
-			shouldersTat: "no default setting",
-			armsTat: "no default setting",
-			legsTat: "no default setting",
-			backTat: "no default setting",
-			stampTat: "no default setting",
-			curatives: "no default setting",
-			livingRules: "no default setting",
-			relationshipRules: "no default setting",
-			standardPunishment: "no default setting",
-			standardReward: "no default setting",
-			diet: "no default setting",
-			dietCum: "no default setting",
-			dietMilk: "no default setting",
-			onDiet: "no default setting",
-			muscles: "no default setting",
-			XY: "no default setting",
-			XX: "no default setting",
-			gelding: "no default setting",
-			preg: "no default setting",
-			growth_boobs: "no default setting",
-			growth_butt: "no default setting",
-			growth_lips: "no default setting",
-			growth_dick: "no default setting",
-			growth_balls: "no default setting",
-			aphrodisiacs: "no default setting",
-			autoSurgery: 0,
-			autoBrand: 0,
-			pornFeed: "no default setting",
-			pornFameSpending: "no default setting",
-			dietGrowthSupport: 0,
-			eyewear: "no default setting",
-			earwear: "no default setting",
-			setAssignment: "no default setting",
-			facilityRemove: false,
-			removalAssignment: "rest",
-			surgery_eyes: "no default setting",
-			surgery_hears: "no default setting",
-			surgery_lactation: "no default setting",
-			surgery_prostate: "no default setting",
-			surgery_cosmetic: "no default setting",
-			surgery_accent: "no default setting",
-			surgery_shoulders: "no default setting",
-			surgery_shouldersImplant: "no default setting",
-			surgery_boobs: "no default setting",
-			surgery_hips: "no default setting",
-			surgery_hipsImplant: "no default setting",
-			surgery_butt: "no default setting",
-			surgery_faceShape: "no default setting",
-			surgery_lips: "no default setting",
-			surgery_holes: "no default setting",
-			surgery_hair: "no default setting",
-			surgery_bodyhair: "no default setting",
-			surgery_vasectomy: "no default setting",
-			surgery_bellyImplant: "no default setting",
-			underArmHColor: "no default setting",
-			underArmHStyle: "no default setting",
-			drug: "no default setting",
-			eyes: "no default setting",
-			pregSpeed: "no default setting",
-			bellyImplantVol: -1,
-			teeth: "no default setting",
-			label: "no default setting",
-			removeLabel: "no default setting",
-			skinColor: "no default setting",
-			inflationType: "no default setting",
-		}
-	};
-	return rule;
-};
-
-// Saves the slave, silently fires the RA, saves the slave's after-RA state, and then reverts the slave.
-// Call and then check potential change against $slaveAfterRA to see if the RA would revert it.
-window.RulesDeconfliction = function RulesDeconfliction(slave) {
-	const before = clone(slave);
-	DefaultRules(slave);
-	State.variables.slaveAfterRA = clone(slave);
-	slave = before;
-}
-
-/*:: textinput [script]*/
-
-Macro.add("textinput", {
-	// Signifies that the macro is a container macro.
-	tags: null,
-
-	handler: function() {
-		if (this.args.length < 2) {
-			var errors = [];
-			if (this.args.length < 1) { errors.push("variable name"); }
-			if (this.args.length < 2) { errors.push("default value"); }
-			return this.error("no " + errors.join(" or ") + " specified");
-		}
-
-		// Ensure that the variable name argument is a string.
-		if (typeof this.args[0] !== "string") {
-			return this.error("variable name argument is not a string");
-		}
-
-		var varName = this.args[0].trim();
-
-		// Try to ensure that we receive the variable's name (incl. sigil), not its value.
-		if (varName[0] !== "$" && varName[0] !== "_") {
-			return this.error("variable name '" + varName + "' is missing its sigil ($ or _)");
-		}
-
-		var that = this;
-		var defaultValue = this.args[1];
-		var el = document.createElement("textarea");
-
-		// Setup and append the textarea element to the output buffer.
-		jQuery(el)
-			.attr({
-				rows: 4,
-				// cols: 68, // instead of setting "cols" we set the `min-width` in CSS
-				tabindex: 0 // for accessibility
-			})
-			.addClass("macro-textarea") // "hijack" the .macro-textarea class
-			.on("input", function() {
-				Wikifier.setValue(varName, this.value);
-				if (that.payload[0].contents !== "")
-					Wikifier.wikifyEval(that.payload[0].contents.trim());
-			})
-			.appendTo(this.output);
-
-		// Set the story variable and textarea element to the default value.
-		Wikifier.setValue(varName, defaultValue);
-
-		// Ideally, we should be setting `.defaultValue` here, but IE doesn't support it,
-		// so we have to use `.textContent`, which is equivalent.
-		el.textContent = defaultValue;
-	}
-});
-
-/*:: Bug Report [script]*/
-
-/*! <<bugreport>> macro for SugarCube 2.x */
-!function(){"use strict";if("undefined"==typeof version||"undefined"==typeof version.title||"SugarCube"!==version.title||"undefined"==typeof version.major||version.major<2)throw new Error("<<bugreport>> macro requires SugarCube 2.0 or greater, aborting load");Macro.add("bugreport",{handler:function(){function serializeVariables(varObj,diffObj,doSort){function renderDiff(diff,orig){for(var keys=Object.keys(diff||{}),render=orig?clone(orig):{},i=0,klen=keys.length;klen>i;i++){var p=keys[i],diffP=diff[p];if(diffP===Diff.Op.Delete)delete render[p];else if(Array.isArray(diffP))switch(diffP[0]){case Diff.Op.SpliceArray:try{render.splice(diffP[1],1+(diffP[2]-diffP[1]))}catch(e){}break;case Diff.Op.Copy:render[p]=clone(diffP[1]);break;case Diff.Op.CopyDate:render[p]=new Date(diffP[1])}else{var recurse=renderDiff(diffP,render[p]);0!==Object.keys(recurse).length&&(render[p]=recurse)}}return render}var varList=[],diff=renderDiff(Diff.diff(varObj,diffObj));for(var p in diff){var sName="$"+(-1===p.search(/[^\w]/)?p:'"'+p+'"');varList.push(sName+"="+JSON.stringify(diff[p]))}return doSort&&("function"==typeof doSort?varList.sort(doSort):varList.sort()),0!==varList.length?varList.join(", "):""}var srcMatch,passages,varsPre,varsPost,dialog,dataEl,info=null!=this.args[0]&&Story.has(this.args[0])?Story.get(this.args[0]):null,last=State.length-1,source=unescape(window.location);null!==(srcMatch=/\/([^\/]+)$/.exec(source))&&(source=srcMatch[1]),passages=[];for(var i=0;last>=i;i++)passages.push('"'+State.index(i).title+'"');passages=passages.join(", "),varsPre=serializeVariables(State.index(0).variables,State.index(last).variables),varsPost=serializeVariables(State.index(last).variables,State.variables),dialog=UI.setup("Bug Report","bugreport"),dialog.innerHTML=(null!==info?'<div id="bugreport-info"></div>':"")+'<div><b>Bug report:</b> <a id="bugreport-data-select" class="link-internal macro-bugreport">[Select]</a></div><code id="bugreport-data" tabindex="0"></code>'+(/applewebkit|chrome/.test(Browser.userAgent)?"":'<div class="scroll-pad">&nbsp;</div>'),dataEl=dialog.querySelector("#bugreport-data"),null!==info&&new Wikifier(dialog.querySelector("#bugreport-info"),info.processText()),addAccessibleClickHandler("#bugreport-data-select",function(self){return function(){jQuery(dataEl).focus(),self.selectData(dataEl)}}(this.self)),insertText(dataEl,"[spoiler][code]"),insertElement(dataEl,"br"),insertText(dataEl,"SOURCE: "+source),insertElement(dataEl,"br"),insertElement(dataEl,"br"),insertText(dataEl,"PASSAGES:"),insertElement(dataEl,"br"),insertText(dataEl,passages),insertElement(dataEl,"br"),insertElement(dataEl,"br"),insertText(dataEl,"VARIABLES (PRE-EXECUTION):"),insertElement(dataEl,"br"),varsPre&&(insertText(dataEl,varsPre),insertElement(dataEl,"br")),insertElement(dataEl,"br"),insertText(dataEl,"VARIABLES (POST-EXECUTION):"),insertElement(dataEl,"br"),varsPost&&(insertText(dataEl,varsPost),insertElement(dataEl,"br")),insertText(dataEl,"[/code][/spoiler]"),UI.open()},selectData:function(e){var s,r;if(window.getSelection){s=window.getSelection();if(s.setBaseAndExtent){var l=(e.innerText.length>1)?e.innerText.length-1:1;try{s.setBaseAndExtent(e,0,e,l)}catch(error){r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else{if(window.opera&&e.innerHTML.substring(e.innerHTML.length-4)==='<br>'){e.innerHTML=e.innerHTML+'&nbsp;'}var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else if(document.getSelection){s=document.getSelection();r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}else if(document.selection){r=document.body.createTextRange();r.moveToElementText(e);r.select()}}})}();
-
-/*:: Display Variables [script]*/
-
-/*! <<checkvars>> macro for SugarCube 2.x */
-!function(){"use strict";if("undefined"==typeof version||"undefined"==typeof version.title||"SugarCube"!==version.title||"undefined"==typeof version.major||version.major<2)throw new Error("<<checkvars>> macro requires SugarCube 2.0 or greater, aborting load");Macro.add("checkvars",{handler:function(){function toString(value,indent){var baseType=typeof value;switch(baseType){case"number":return isNaN(value)?"NaN":isFinite(value)?String(value):"Infinity";case"string":return JSON.stringify(value);case"function":return"(function)";default:if("object"!==baseType||null==value)return String(value);var objType=Object.prototype.toString.call(value);if("[object Date]"===objType)return'(object: Date, value: "'+value.toISOString()+'")';if("[object RegExp]"===objType)return"(object: RegExp, value: "+value.toString()+")";var opener,closer,result=[],indentText="  ";return indent||(indent=""),("[object Set]"===objType||value instanceof Set)&&(value=Array.from(value)),Array.isArray(value)?(opener="[\n",closer="\n"+indent+"]",value.forEach(function(p,i){result.push(indent+indentText+i+" ⇒ "+toString(value[i],indent+indentText))}),Object.keys(value).forEach(function(p){/^\d+$/.test(p)||result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})):"[object Map]"===objType||value instanceof Map?(opener="{\n",closer="\n"+indent+"}",Array.from(value).map(function(kv){result.push(indent+indentText+toString(kv[0],indent+indentText)+" ⇒ "+toString(kv[1],indent+indentText))})):(opener="{\n",closer="\n"+indent+"}",Object.keys(value).forEach(function(p){result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})),opener+result.join(",\n")+closer}}var dialog,sv=State.variables,names=Object.keys(sv);if(dialog=UI.setup("Story $variables","checkvars"),0===names.length)return dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><p><em>No $variables currently set…</em></p>",void UI.open();dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><table><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody></tbody></table>"+(/applewebkit|chrome/.test(Browser.userAgent)?"":'<div class="scroll-pad">&nbsp;</div>');var tbody=dialog.querySelector("tbody");names.sort(function(a,b){return Util.isNumeric(a)&&Util.isNumeric(b)?Number(a)-Number(b):a.localeCompare(b)});for(var i=0;i<names.length;i++){var tr=document.createElement("tr"),tdName=document.createElement("td"),tdValue=document.createElement("td");tdName.textContent="$"+names[i],tdValue.textContent = toString(sv[names[i]]),tr.appendChild(tdName),tr.appendChild(tdValue),tbody.appendChild(tr)}UI.open()}})}();
-
-/*:: Foreach Macro JS [script]*/
-
-Macro.add('foreach', {
-	skipArgs : true,
-	tags : null,
-
-	handler() {
-		const payload = this.payload[0].contents.replace(/\n$/, '');
-		let statement = this.args.raw.trim();
-		let variable;
-		let array;
-		let result;
-
-		if (statement.length !== 0) {
-			const parts = statement.match(/^(\S+?)\s+of\s+(\S.*?)\s*$/i);
-			if(parts !== null) {
-				variable = parts[1];
-				array = parts[2];
-			}
-		}
-		if(!variable || !array) {
-			return this.error('invalid syntax, format: <<foreach variable of array-expression>>... <</foreach>>');
-		}
-
-		try {
-			result = Scripting.evalTwineScript(array);
-		} catch (ex) {
-			return this.error(`bad evaluation: ${typeof ex === 'object' ? ex.message : ex}`);
-		}
-
-		let resultLength = result['length'];
-
-		// We don't check for "instanceof Array" to also be able to pass arguments or other strange objects
-		if(typeof resultLength !== 'number' || (resultLength % 1) !== 0) {
-			return this.error("bad evaluation: '" + result + "' is not an array or array-like object");
-		}
-
-		if(resultLength > Config.macros.maxLoopIterations) {
-			return this.error('Array too large for maxLoopIterations (' + resultLength + ' > ' + Config.macros.maxLoopIterations + ')');
-		}
-
-		if(!new RegExp(`^(${Patterns.variable})$`).test(variable)) {
-			return this.error('not a variable identifier: ' + variable);
-		}
-
-		if(resultLength <= 0) {
-			// Don't bother with empty stuff
-			return;
-		}
-
-		Config.debug && this.debugView.modes({block: true});
-
-		payload.replace(/^\n/, '');
-		for(let i = 0; i < resultLength; ++ i) {
-			Wikifier.setValue(variable, result[i]);
-			new Wikifier(this.output, payload);
-		}
-	}
-});
-
-/*:: UtilJS [script]*/
-
-/*
- * Height.mean(nationality, race, genes, age) - returns the mean height for the given combination and age in years (>=2)
- * Height.mean(nationality, race, genes) - returns the mean adult height for the given combination
- * Height.mean(slave) - returns the mean (expected) height for the given slave
- *
- * Height.random(nationality, race, genes, age) - returns a random height using the skew-normal distribution
- *													around the mean height for the given arguments
- * Height.random(nationality, race, genes) - returns a random height for the given combination of an adult, as above
- * Height.random(slave[, options]) - returns a random height for the given slave, as above.
- *										The additional options object can modify how the values are generated
- *										in the same way setting them as global configuration would, but only for this
- *										specific generation.
- *
- *										Example: Only generate above-average heights based on $activeSlave:
- *										Height.random($activeSlave, {limitMult: [0, 5]})
- *
- * Height.forAge(height, age, genes) - returns the height adapted to the age and genes
- * Height.forAge(height, slave) - returns the height adapted to the slave's age and genes
- *
- * Height.config(configuration) - configures the random height generator globally and returns the current configuration
- *	The options and their default values are:
- *	limitMult: [-3, 3] - Limit to the values the underlying (normal) random generator returns.
- *						In normal use, the values are almost never reached; only 0.27% of values are
- *						outside this range and need to be regenerated. With higher skew (see below),
- *						this might change.
- *	spread: 0.05 - The random values generated are multiplied by this and added to 1 to generate
- *					the final height multiplier. The default value together with the default limitMult
- *					means that the generated height will always fall within (1 - 0.05 * 3) = 85% and
- *					(1 + 0.05 * 3) = 115% of the mean height.
- *					Minimum value: 0.001; maximum value: 0.5
- *	skew: 0 - How much the height distribution skews to the right (positive) or left (negative) side
- *				of the height.
- *				Minimum value: -1000, maximum value: 1000
- *	limitHeight: [0, 999] - Limit the resulting height range. Warning: A small height limit range
- *							paired with a high spread value results in the generator having to
- *							do lots of work generating and re-generating random heights until
- *							one "fits".
- *
- * Anon's explanation:
- * limitMult: [0, -30]
- *
- * This specifies a range going up from 0 to -30. It needs to go [-30, 0] instead. Same thing with [0, -5] two lines down. note: technically, this isn't true, because for some bizarre reason Height.random reverses the numbers for you if you get them wrong. But it's important to establish good habits, so.
- *
- * Skew, spread, limitMult: These are statistics things. BTW, a gaussian distribution is a normal distribution. Just a naming thing.
- *
- * Skew: The shape parameter of a skew-normal distribution. See http://azzalini.stat.unipd.it/SN/Intro/intro.html for more details. Basically a measure of how asymmetrical the curve is. It doesn't move the main mass of the distribution. Rather, it's more like it moves mass from one of the tails into the main mass of the distribution.
- *
- * Spread: Changes the average distance from the mean, making the graph wider and shorter. Moves "mass" from the center to the tail. It's basically standard deviation, but named funny because FC codebase. Changing this can have dramatic effects. It's advised to keep this at or below 0.1 for usual height generation.
- *
- * limitMult: A clamp, expressed in z-score. (z=1 is one standard dev above mean, for ex.) If it excludes too much of the distribution the other parameters describe, you're going to spend lots of CPU making and throwing away heights. Don't worry about this unless you run into it.
- *
- * There's also limitHeight which you're not using. It's basically limitMult in different units.
- */
-window.Height = (function(){
-	'use strict';
-
-	// Global configuration (for different game modes/options/types)
-	var minMult = -3.0;
-	var maxMult = 3.0;
-	var skew = 0.0;
-	var spread = 0.05;
-	var minHeight = 0;
-	var maxHeight = 999;
-
-	// Configuration method for the above values
-	const _config = function(conf) {
-		if(_.isUndefined(conf)) {
-			return {limitMult: [minMult, maxMult], limitHeight: [minHeight, maxHeight], skew: skew, spread: spread};
-		}
-		if(_.isFinite(conf.skew)) { skew = Math.clamp(conf.skew, -1000, 1000); }
-		if(_.isFinite(conf.spread)) { spread = Math.clamp(conf.spread, 0.001, 0.5); }
-		if(_.isArray(conf.limitMult) && conf.limitMult.length === 2 && conf.limitMult[0] !== conf.limitMult[1] &&
-			_.isFinite(conf.limitMult[0]) && _.isFinite(conf.limitMult[1])) {
-			minMult = Math.min(conf.limitMult[0], conf.limitMult[1]);
-			maxMult = Math.max(conf.limitMult[0], conf.limitMult[1]);
-		}
-		if(_.isArray(conf.limitHeight) && conf.limitHeight.length === 2 && conf.limitHeight[0] !== conf.limitHeight[1] &&
-			_.isFinite(conf.limitHeight[0]) && _.isFinite(conf.limitHeight[1])) {
-			minHeight = Math.min(conf.limitHeight[0], conf.limitHeight[1]);
-			maxHeight = Math.max(conf.limitHeight[0], conf.limitHeight[1]);
-		}
-		return {limitMult: [minMult, maxMult], limitHeight: [minHeight, maxHeight], skew: skew, spread: spread};
-	};
-
-	/* if you can find an average for an undefined, add it in! */
-	const xxMeanHeight = {
-		"Afghan": 155.08, "Albanian": 161.77, "Algerian": 159.09, "American.asian": 158.4, "American.black": 163.6, "American.latina": 158.9, "American.white": 165, "American": 163.54,
-		"Andorran": 162.90, "Angolan": 157.31, "Antiguan": 160.65, "Argentinian": 159.18, "Armenian": 158.09, "Aruban": 158, "Australian": 165.86, "Austrian": 164.62, "Azerbaijani": 158.25,
-		"Bahamian": 160.68, "Bahraini": 156.69, "Bangladeshi": 150.79, "Barbadian": 165.28, "Belarusian": 166.35, "Belgian": 165.49, "Belizean": 156.88, "Beninese": 156.16, "Bermudian": 160.69,
-		"Bhutanese": 153.63, "Bissau-Guinean": 158.24, "Bolivian": 153.89, "Bosnian": 165.85, "Brazilian": 160.86, "British": 164.40, "Bruneian": 153.98, "Bulgarian": 164.80,
-		"Burkinabé": 160.19, "Burmese": 154.37, "Burundian": 154.02, "Cambodian": 152.91, "Cameroonian": 158.82, "Canadian": 163.91, "Cape Verdean": 161.65, "Catalan": 163.4,
-		"Central African": 158.04, "Chadian": 160.17, "Chilean": 159.36, "Chinese": 159.71, "Colombian": 156.85, "Comorian": 155.58, "Congolese": 157.57, "a Cook Islander": 163.19, "Costa Rican": 156.37,
-		"Croatian": 165.63, "Cuban": 157.98, "Curaçaoan": 158, "Cypriot": 162.27, "Czech": 168.46, "Danish": 167.21, "Djiboutian": 156.11, "Dominican": 159.03, "Dominiquais": 164.34, "Dutch": 168.72, "East Timorese": 151.15,
-		"Ecuadorian": 154.23, "Egyptian": 157.33, "Emirati": 158.68, "Equatoguinean": 157.33, "Eritrean": 156.39, "Estonian": 168.67, "Ethiopian": 155.71, "Fijian": 161.69, "Filipina": 149.60,
-		"Finnish": 165.90, "French Guianan": 157, "French Polynesian": 164.52, "French": 164.88, "Gabonese": 158.84, "Gambian": 160.93, "Georgian": 162.98, "German": 165.86, "Ghanan": 157.91,
-		"Greek": 164.87, "Greenlandic": 161.55, "Grenadian": 164.51, "Guamanian": 153.7, "Guatemalan": 149.39, "Guinean": 157.80, "Guyanese": 157.92, "Haitian": 158.72, "Honduran": 153.84, "Hungarian": 163.66,
-		"I-Kiribati": 157.00, "Icelandic": 165.95, "Indian": 152.59, "Indonesian": 152.80, "Iranian": 159.67, "Iraqi": 158.67, "Irish": 165.11, "Israeli": 161.80, "Italian": 164.61, "Ivorian": 158.07,
-		"Jamaican": 163.12, "Japanese": 158.31, "Jordanian": 158.83, "Kazakh": 158.58, "Kenyan": 158.16, "Kittitian": 159.20, "Korean": 160.65, "Kosovan": 165.7, "Kurdish": 165, "Kuwaiti": 159.43,
-		"Kyrgyz": 159.35, "Laotian": 151.28, "Latvian": 169.80, "Lebanese": 162.43, "Liberian": 157.3, "Libyan": 162.08, "a Liechtensteiner": 164.3, "Lithuanian": 166.61, "Luxembourgian": 164.43,
-		"Macedonian": 159.75, "Malagasy": 151.18, "Malawian": 154.40, "Malaysian": 156.30, "Maldivian": 155.02, "Malian": 160.47, "Maltese": 160.85, "Marshallese": 151.31, "Mauritanian": 157.72,
-		"Mauritian": 157.24, "Mexican": 156.85, "Micronesian": 156.09, "Moldovan": 163.24, "Monégasque": 164.61, "Mongolian": 158.22, "Montenegrin": 164.86, "Moroccan": 157.82, "Mosotho": 155.71,
-		"Motswana": 161.38, "Mozambican": 153.96, "Namibian": 158.78, "Nauruan": 153.98, "Nepalese": 150.86, "New Caledonian": 158.0, "a New Zealander": 164.94, "Ni-Vanuatu": 158.17, "Nicaraguan": 154.39, "Nigerian": 156.32,
-		"Nigerien": 158.25, "Niuean": 164.80, "Norwegian": 165.56, "Omani": 157.19, "Pakistani": 153.84, "Palauan": 156.22, "Palestinian": 158.75, "Panamanian": 155.47, "Papua New Guinean": 154.87,
-		"Paraguayan": 159.86, "Peruvian": 152.93, "Polish": 164.59, "Portuguese": 163.04, "Puerto Rican": 159.20, "Qatari": 159.38, "Romanian": 162.73, "Russian": 165.27, "Rwandan": 154.79, "Sahrawi": 157.82,
-		"Saint Lucian": 162.31, "Salvadoran": 154.55, "Sammarinese": 164.61, "Samoan": 161.97, "São Toméan": 158.91, "Saudi": 155.88, "Scottish": 163, "Senegalese": 162.52, "Serbian": 167.69,
-		"Seychellois": 162.08, "Sierra Leonean": 156.60, "Singaporean": 160.32, "Slovak": 167.47, "Slovene": 166.05, "a Solomon Islander": 154.42, "Somali": 156.06, "South African": 158.03,
-		"South Sudanese": 169.0, "Spanish": 163.40, "Sri Lankan": 154.56, "Sudanese": 156.04, "Surinamese": 160.66, "Swazi": 158.64, "Swedish": 165.70, "Swiss": 163.45, "Syrian": 158.65, "Taiwanese": 161.45,
-		"Tajik": 157.33, "Tanzanian": 156.6, "Thai": 157.87, "Tibetan": 158.75, "Togolese": 158.30, "Tongan": 165.52, "Trinidadian": 160.64, "Tunisian": 160.35, "Turkish": 160.50, "Turkmen": 161.73,
-		"Tuvaluan": 158.10, "Ugandan": 156.72, "Ukrainian": 166.34, "Uruguayan": 162.13, "Uzbek": 157.82, "Vatican": 162.5, "Venezuelan": 157.44, "Vietnamese": 153.59, "Vincentian": 160.70, "Yemeni": 153.97,
-		"Zairian": 155.25, "Zambian": 155.82, "Zimbabwean": 158.22,
-		"": 159.65 // default
-	};
-	const xyMeanHeight = {
-		"Afghan": 165.26, "Albanian": 173.39, "Algerian": 170.07, "American.asian": 172.5, "American.black": 177.4, "American.latina": 172.5, "American.white": 178.2, "American": 177.13,
-		"Andorran": 176.06, "Angolan": 167.31, "Antiguan": 164.8, "Argentinian": 174.62, "Armenian": 172.00, "Aruban": 165.1, "Australian": 179.20, "Austrian": 177.41, "Azerbaijani": 169.75,
-		"Bahamian": 172.75, "Bahraini": 167.74, "Bangladeshi": 163.81, "Barbadian": 175.92, "Belarusian": 178.44, "Belgian": 181.70, "Belizean": 168.73, "Beninese": 167.06, "Bermudian": 172.69,
-		"Bhutanese": 165.31, "Bissau-Guinean": 167.90, "Bolivian": 166.85, "Bosnian": 180.87, "Brazilian": 173.55, "British": 177.49, "Bruneian": 165.01, "Bulgarian": 178.24, "Burkinabé": 169.33,
-		"Burmese": 164.67, "Burundian": 166.64, "Cambodian": 163.33, "Cameroonian": 167.82, "Canadian": 178.09, "Cape Verdean": 173.22, "Catalan": 175.8, "Central African": 166.67,
-		"Chadian": 170.44, "Chilean": 171.81, "Chinese": 171.83, "Colombian": 169.50, "Comorian": 166.19, "Congolese": 167.45, "a Cook Islander": 174.77, "Costa Rican": 168.93, "Croatian": 180.78,
-		"Cuban": 172.00, "Curaçaoan": 165.1, "Cypriot": 174.99, "Czech": 180.10, "Danish": 181.39, "Djiboutian": 166.57, "Dominican": 172.75, "Dominiquais": 176.31, "Dutch": 182.54, "East Timorese": 159.79, "Ecuadorian": 167.08,
-		"Egyptian": 166.68, "Emirati": 170.46, "Equatoguinean": 167.36, "Eritrean": 168.36, "Estonian": 181.59, "Ethiopian": 166.23, "Fijian": 173.90, "Filipina": 163.23, "Finnish": 179.59,
-		"French Guianan": 168, "French Polynesian": 177.41, "French": 179.74, "Gabonese": 167.94, "Gambian": 165.40, "Georgian": 174.34, "German": 179.88, "Ghanan": 168.85, "Greek": 177.32, "Greenlandic": 174.87,
-		"Grenadian": 176.97, "Guamanian": 169.8, "Guatemalan": 163.41, "Guinean": 167.54, "Guyanese": 170.21, "Haitian": 172.64, "Honduran": 166.39, "Hungarian": 177.26, "I-Kiribati": 169.20, "Icelandic": 180.49,
-		"Indian": 164.95, "Indonesian": 163.55, "Iranian": 170.3, "Iraqi": 170.43, "Irish": 178.93, "Israeli": 176.86, "Italian": 177.77, "Ivorian": 166.53, "Jamaican": 174.53, "Japanese": 170.82, "Jordanian": 171.03,
-		"Kazakh": 171.14, "Kenyan": 169.64, "Kittitian": 169.62, "Korean": 173.46, "Kosovan": 179.5, "Kurdish": 175, "Kuwaiti": 172.07, "Kyrgyz": 171.24, "Laotian": 160.52, "Latvian": 181.42, "Lebanese": 174.39,
-		"Liberian": 163.66, "Libyan": 173.53, "a Liechtensteiner": 175.4, "Lithuanian": 179.03, "Luxembourgian": 177.86, "Macedonian": 178.33, "Malagasy": 161.55, "Malawian": 166, "Malaysian": 167.89,
-		"Maldivian": 167.68, "Malian": 171.3, "Maltese": 173.32, "Marshallese": 162.81, "Mauritanian": 163.28, "Mauritian": 170.50, "Mexican": 169.01, "Micronesian": 168.51, "Moldovan": 175.49,
-		"Monégasque": 177.77, "Mongolian": 169.07, "Montenegrin": 178.28, "Moroccan": 170.40, "Mosotho": 165.59, "Motswana": 171.63, "Mozambican": 164.80, "Namibian": 166.96, "Nauruan": 167.83,
-		"Nepalese": 162.32, "New Caledonian": 171.0, "a New Zealander": 177.74, "Ni-Vanuatu": 168.09, "Nicaraguan": 166.71, "Nigerian": 165.91, "Nigerien": 167.68, "Niuean": 175.83, "Norwegian": 179.75, "Omani": 169.16, "Pakistani": 166.95,
-		"Palauan": 167.69, "Palestinian": 172.09, "Panamanian": 168.49, "Papua New Guinean": 163.57, "Paraguayan": 172.83, "Peruvian": 165.23, "Polish": 177.33, "Portuguese": 172.93, "Puerto Rican": 172.08, "Qatari": 170.48,
-		"Romanian": 174.74, "Russian": 176.46, "Rwandan": 162.68, "Sahrawi": 170.40, "Saint Lucian": 171.95, "Salvadoran": 169.77, "Sammarinese": 177.77, "Samoan": 174.38, "São Toméan": 167.38,
-		"Saudi": 167.67, "Scottish": 177.6, "Senegalese": 173.14, "Serbian": 180.57, "Seychellois": 174.21, "Sierra Leonean": 164.41, "Singaporean": 172.57, "Slovak": 179.50, "Slovene": 179.80,
-		"a Solomon Islander": 164.14, "Somali": 166.60, "South African": 166.68, "South Sudanese": 175.9, "Spanish": 176.59, "Sri Lankan": 165.69, "Sudanese": 166.63, "Surinamese": 172.72, "Swazi": 168.13,
-		"Swedish": 179.74, "Swiss": 178.42, "Syrian": 170.43, "Taiwanese": 174.52, "Tajik": 171.26, "Tanzanian": 164.80, "Thai": 169.16, "Tibetan": 168.91, "Togolese": 168.33, "Tongan": 176.76,
-		"Trinidadian": 173.74, "Tunisian": 173.95, "Turkish": 174.21, "Turkmen": 171.97, "Tuvaluan": 169.64, "Ugandan": 165.62, "Ukrainian": 178.46, "Uruguayan": 173.43, "Uzbek": 169.38, "Vatican": 176.5,
-		"Venezuelan": 171.59, "Vietnamese": 164.45, "Vincentian": 172.78, "Yemeni": 159.89, "Zairian": 166.80, "Zambian": 166.52, "Zimbabwean": 168.59,
-		"": 171.42 // defaults
-	};
-
-	// Helper method - table lookup for nationality/race combinations
-	const nationalityMeanHeight = function(table, nationality, race, def) {
-		return table[nationality + "." + race] || table[nationality] || table["." + race] || table[""] || def;
-	};
-
-	// Helper method: Generate a skewed normal random variable with the skew s
-	// Reference: http://azzalini.stat.unipd.it/SN/faq-r.html
-	const skewedGaussian = function(s) {
-		let randoms = gaussianPair();
-		if(s === 0) {
-			// Don't bother, return an unskewed normal distribution
-			return randoms[0];
-		}
-		let delta = s / Math.sqrt(1 + s * s);
-		let result = delta * randoms[0] + Math.sqrt(1 - delta * delta) * randoms[1];
-		return randoms[0] >= 0 ? result : -result;
-	};
-
-	// Height multiplier generator; skewed gaussian according to global parameters
-	const multGenerator = function() {
-		let result = skewedGaussian(skew);
-		while(result < minMult || result > maxMult) {
-			result = skewedGaussian(skew);
-		}
-		return result;
-	};
-
-	// Helper method: Generate a height based on the mean one and limited according to config.
-	const heightGenerator = function(mean) {
-		let result = mean * (1 + multGenerator() * spread);
-		while(result < minHeight || result > maxHeight) {
-			result = mean * (1 + multGenerator() * spread);
-		}
-		return result;
-	};
-
-	// Helper method - apply age and genes to the adult height
-	const applyAge = function(height, age, genes) {
-		if(!_.isFinite(age) || age < 2 || age >= 20) {
-			return height;
-		}
-		let minHeight = 0, midHeight = 0, midAge = 15;
-		switch(genes) {
-			case 'XX': // female
-			case 'XXX': // Triple X syndrome female
-				minHeight = 85;
-				midHeight = height * 157 / 164;
-				midAge = 13;
-				break;
-			case 'XY': // male
-			case 'XXY': // Kinefelter syndrome male
-			case 'XYY': // XYY syndrome male
-				minHeight = 86;
-				midHeight = height * 170 / 178;
-				midAge = 15;
-				break;
-			case 'X0': case 'X': // Turner syndrome female
-				minHeight = 85 * 0.93;
-				midHeight = height * 157 / 164;
-				midAge = 13;
-				break;
-			default:
-				minHeight = 85.5;
-				midHeight = height * 327 / 342;
-				midAge = 14;
-				break;
-		}
-		if(age > midAge) {
-			// end of puberty to 20
-			return interpolate(midAge, midHeight, 20, height, age);
-		} else {
-			// 2 to end of puberty
-			return interpolate(2, minHeight, midAge, midHeight, age);
-		}
-	};
-
-	const _meanHeight = function(nationality, race, genes, age) {
-		if(_.isObject(nationality)) {
-			// We got called with a single slave as the argument
-			return _meanHeight(nationality.nationality, nationality.race, nationality.genes, nationality.physicalAge + nationality.birthWeek / 52.0);
-		}
-		let result = 0;
-		switch(genes) {
-			case 'XX': // female
-				result = nationalityMeanHeight(xxMeanHeight, nationality, race);
-				break;
-			case 'XY': // male
-				result = nationalityMeanHeight(xyMeanHeight, nationality, race);
-				break;
-			// special cases. Extra SHOX genes on X and Y chromosomes make for larger people
-			case 'X0': case 'X': // Turner syndrome female
-				result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 0.93;
-				break;
-			case 'XXX': // Triple X syndrome female
-				result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 1.03;
-				break;
-			case 'XXY': // Kinefelter syndrome male
-				result = nationalityMeanHeight(xyMeanHeight, nationality, race) * 1.03;
-				break;
-			case 'XYY': // XYY syndrome male
-				result = nationalityMeanHeight(xyMeanHeight, nationality, race) * 1.04;
-				break;
-			case 'Y': case 'Y0': case 'YY': case 'YYY':
-				console.log("Height.mean(): non-viable genes " + genes);
-				break;
-			default:
-				console.log("Height.mean(): unknown genes " + genes + ", returning mean between XX and XY");
-				result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 0.5 + nationalityMeanHeight(xyMeanHeight, nationality, race) * 0.5;
-				break;
-		}
-		return applyAge(result, age, genes);
-	};
-
-	const _randomHeight = function(nationality, race, genes, age) {
-		const mean = _meanHeight(nationality, race, genes, age);
-		// If we got called with a slave object and options, temporarily modify
-		// our configuration.
-		if(_.isObject(nationality) && _.isObject(race)) {
-			const currentConfig = _config();
-			_config(race);
-			const result = heightGenerator(mean);
-			_config(currentConfig);
-			return result;
-		}
-		return heightGenerator(mean);
-	};
-
-	const _forAge = function(height, age, genes) {
-		if(_.isObject(age)) {
-			// We got called with a slave as a second argument
-			return applyAge(height, age.physicalAge + age.birthWeek / 52.0, age.genes);
-		} else {
-			return applyAge(height, age, genes);
-		}
-	};
-
-	return {
-		mean: _meanHeight,
-		random: _randomHeight,
-		forAge: _forAge,
-		config: _config,
-	};
-})();
-
-/*
- *  Intelligence.random(options) - returns a random intelligence. If no options are passed, the generated number
- *									will be on a normal distribution with mean 0 and standard deviation 45.
- *
- *										Example: Only generate above-average intelligence based on $activeSlave:
- *										Intelligence.random({limitIntelligence: [0, 100]})
- *
- *  Intelligence.config(configuration) - configures the random height generator globally and returns the current configuration
- *
- *	The options and their default values are:
- *	mean: 0 - What the average intelligence will be. Increasing this will make it more likely
- *				to generate a smart slave, but will not guarantee it.
- *				Minimum value: -100, maximum value: 100
- *	limitMult: [-3, 3] - Limit to this many standard deviations from the mean.
- *						In normal use, the values are almost never reached; only 0.27% of values are
- *						outside this range and need to be regenerated. With higher skew (see below),
- *						this might change.
- *	spread: 45 - The random standard deviation of the calculated distribution. A higher value
- *				will make it more likely to have extreme values, a lower value will make any
- *				generated values cluster around the mean. If spread is 0, it will always return the mean.
- *	skew: 0 - How much the height distribution skews to the right (positive) or left (negative) side
- *				of the height. Unless you have a very specific reason, you should not need to change this.
- *				Minimum value: -1000, maximum value: 1000
- *	limitIntelligence: [-100,100] - Limit the resulting height range.
- *									Warning: A small intelligence limit range not containing the
- *									mean, and with a low spread value results in the generator
- *									having to do lots of work generating and re-generating random
- *									intelligences until one "fits".
- *
- *  This was modeled using the Height generator above. For some more information, see the comments for that.
- */
-window.Intelligence = (function(){
-	'use strict';
-
-	// Global configuration (for different game modes/options/types)
-	var mean = 0;
-	var minMult = -3.0;
-	var maxMult = 3.0;
-	var skew = 0.0;
-	var spread = 45;
-	var minIntelligence = -101;
-	var maxIntelligence = 100;
-
-	// Configuration method for the above values
-	const _config = function(conf) {
-		if(_.isUndefined(conf)) {
-			return {mean: mean, limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread};
-		}
-		if(_.isFinite(conf.mean)) { mean = Math.clamp(conf.mean, -100, 100); }
-		if(_.isFinite(conf.skew)) { skew = Math.clamp(conf.skew, -1000, 1000); }
-		if(_.isFinite(conf.spread)) { spread = Math.clamp(conf.spread, 0.1, 100); }
-		if(_.isArray(conf.limitMult) && conf.limitMult.length === 2 && conf.limitMult[0] !== conf.limitMult[1] &&
-			_.isFinite(conf.limitMult[0]) && _.isFinite(conf.limitMult[1])) {
-			minMult = Math.min(conf.limitMult[0], conf.limitMult[1]);
-			maxMult = Math.max(conf.limitMult[0], conf.limitMult[1]);
-		}
-		if(_.isArray(conf.limitIntelligence) && conf.limitIntelligence.length === 2 && conf.limitIntelligence[0] !== conf.limitIntelligence[1] &&
-			_.isFinite(conf.limitIntelligence[0]) && _.isFinite(conf.limitIntelligence[1])) {
-			minIntelligence = Math.clamp(Math.min(conf.limitIntelligence[0], conf.limitIntelligence[1]),-101,100);
-			maxIntelligence = Math.clamp(Math.max(conf.limitIntelligence[0], conf.limitIntelligence[1]),-101,100);
-		}
-		return {limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread};
-	};
-
-	// Helper method: Generate a skewed normal random variable with the skew s
-	// Reference: http://azzalini.stat.unipd.it/SN/faq-r.html
-	const skewedGaussian = function(s) {
-		let randoms = gaussianPair();
-		if(s === 0) {
-			// Don't bother, return an unskewed normal distribution
-			return randoms[0];
-		}
-		let delta = s / Math.sqrt(1 + s * s);
-		let result = delta * randoms[0] + Math.sqrt(1 - delta * delta) * randoms[1];
-		return randoms[0] >= 0 ? result : -result;
-	};
-
-	// Intelligence multiplier generator; skewed gaussian according to global parameters
-	const multGenerator = function() {
-		let result = skewedGaussian(skew);
-		while(result < minMult || result > maxMult) {
-			result = skewedGaussian(skew);
-		}
-		return result;
-	};
-
-	// Helper method: Transform the values from multGenerator to have the appropriate mean and standard deviation.
-	const intelligenceGenerator = function() {
-		let result = multGenerator() * spread + mean;
-		while(result < minIntelligence || result > maxIntelligence) {
-			result = multGenerator() * spread + mean;
-		}
-		return Math.ceil(result);
-	};
-
-	const _randomIntelligence = function(settings) {
-	if (settings) {
-		const currentConfig = _config();
-		_config(settings);
-		const result = intelligenceGenerator();
-		_config(currentConfig);
-		return result;
-	}
-	return intelligenceGenerator();
-	};
-
-	return {
-		random: _randomIntelligence,
-		config: _config,
-	};
-})();
-
-// Helper method - generate two independent Gaussian numbers using Box-Muller transform
-window.gaussianPair = function() {
-	let r = Math.sqrt(-2.0 * Math.log(1 - Math.random()));
-	let sigma = 2.0 * Math.PI * (1 - Math.random());
-	return [r * Math.cos(sigma), r * Math.sin(sigma)];
-};
-
-if(!Array.prototype.findIndex) {
-	Array.prototype.findIndex = function(predicate) {
-		if (this == null) {
-			throw new TypeError('Array.prototype.find called on null or undefined');
-		}
-		if (typeof predicate !== 'function') {
-			throw new TypeError('predicate must be a function');
-		}
-		var list = Object(this);
-		var length = list.length >>> 0;
-		var thisArg = arguments[1];
-		var value;
-
-		for (var i = 0; i < length; i++) {
-			value = list[i];
-			if (predicate.call(thisArg, value, i, list)) {
-				return i;
-			}
-		}
-		return -1;
-	};
-}
-
-/*
-A categorizer is used to "slice" a value range into distinct categories in an efficient manner.
-
-If the values are objects their property named 'value' will be set to whatever
-the value used for the choice was. This is important for getters, where it can be accessed
-via this.value.
-
---- Example ---
-Original SugarCube code
-<<if _Slave.muscles > 95>>
-	Musc++
-<<elseif _Slave.muscles > 30>>
-	Musc+
-<<elseif _Slave.muscles > 5>>
-	Toned
-<<elseif _Slave.muscles > -6>>
-<<elseif _Slave.muscles > -31>>
-	@@.red;weak@@
-<<elseif _Slave.muscles > -96>>
-	@@.red;weak+@@
-<<else>>
-	@@.red;weak++@@
-<</if>>
-
-As a categorizer
-<<if ndef $cats>><<set $cats = {}>><</if>>
-<<if ndef $cats.muscleCat>>
-	<!-- This only gets set once, skipping much of the code evaluation, and can be set outside of the code in an "init" passage for further optimization -->
-	<<set $cats.muscleCat = new Categorizer([96, 'Musc++'], [31, 'Musc+'], [6, 'Toned'], [-5, ''], [-30, '@@.red;weak@@'], [-95, '@@.red;weak+@@'], [-Infinity, '@@.red;weak++@@'])>>
-<</if>>
-<<print $cats.muscleCat.cat(_Slave.muscles)>>
-*/
-window.Categorizer = function() {
-	this.cats = Array.prototype.slice.call(arguments)
-		.filter(function(e, i, a) {
-			return e instanceof Array && e.length == 2 && typeof e[0] === 'number' && !isNaN(e[0]) &&
-				a.findIndex(function(val) { return e[0] === val[0]; }) === i; /* uniqueness test */ })
-		.sort(function(a, b) { return b[0] - a[0]; /* reverse sort */ });
-};
-window.Categorizer.prototype.cat = function(val, def) {
-	var result = def;
-	if(typeof val === 'number' && !isNaN(val)) {
-		var foundCat = this.cats.find(function(e) { return val >= e[0]; });
-		if(foundCat) {
-			result = foundCat[1];
-		}
-	}
-	// Record the value for the result's getter, if it is an object
-	// and doesn't have the property yet
-	if(result === Object(result)) {
-		result.value = val;
-	}
-	return result;
-};
-
-window.commaNum = function(s) {
-	if(!s) { return 0; }
-	if(State.variables.formatNumbers != 1) { return s; }
-	return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
-};
-
-window.cashFormat = function(s) {
-	if (!s) { s = 0; }
-	return "¤" + commaNum(Math.round(s * 100) / 100);
-};
-
-window.isFloat = function(n){
-	return n === +n && n !== (n|0);
-};
-
-window.isInt = function(n) {
-	return n === +n && n === (n|0);
-};
-
-window.numberWithCommas = function(x) {
-	return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
-};
-
-window.numberToWords = function(x) {
-	if (x === 0) {
-		return "zero"
-	} else {
-		var ONE_TO_NINETEEN = [
-			"one", "two", "three", "four", "five",
-			"six", "seven", "eight", "nine", "ten",
-			"eleven", "twelve", "thirteen", "fourteen", "fifteen",
-			"sixteen", "seventeen", "eighteen", "nineteen"
-		];
-
-		var TENS = [
-			"ten", "twenty", "thirty", "forty", "fifty",
-			"sixty", "seventy", "eighty", "ninety"
-		];
-
-		var SCALES = ["thousand", "million", "billion", "trillion"];
-
-		// helper function for use with Array.filter
-		function isTruthy(item) {
-			return !!item;
-		}
-
-		// convert a number into "chunks" of 0-999
-		function chunk(number) {
-			var thousands = [];
-
-			while (number > 0) {
-				thousands.push(number % 1000);
-				number = Math.floor(number / 1000);
-			}
-
-			return thousands;
-		}
-
-		// translate a number from 1-999 into English
-		function inEnglish(number) {
-			var thousands, hundreds, tens, ones, words = [];
-
-			if (number < 20) {
-				return ONE_TO_NINETEEN[number - 1]; // may be undefined
-			}
-
-			if (number < 100) {
-				ones = number % 10;
-				tens = number / 10 | 0; // equivalent to Math.floor(number / 10)
-
-				words.push(TENS[tens - 1]);
-				words.push(inEnglish(ones));
-
-				return words.filter(isTruthy).join("-");
-			}
-
-			hundreds = number / 100 | 0;
-			words.push(inEnglish(hundreds));
-			words.push("hundred");
-			words.push(inEnglish(number % 100));
-
-			return words.filter(isTruthy).join(" ");
-		}
-
-		// append the word for a scale. Made for use with Array.map
-		function appendScale(chunk, exp) {
-			var scale;
-			if (!chunk) {
-				return null;
-			}
-			scale = SCALES[exp - 1];
-			return [chunk, scale].filter(isTruthy).join(" ");
-		}
-
-		var string = chunk(x)
-			.map(inEnglish)
-			.map(appendScale)
-			.filter(isTruthy)
-			.reverse()
-			.join(" ");
-
-	} if (x > 0) {
-		return string;
-	} else {
-		return "negative " + string;
-	}
-};
-
-window.jsRandom = function(min,max) {
-	return Math.floor(Math.random()*(max-min+1)+min);
-};
-
-window.jsRandomMany = function (arr, count) {
-	var result = [];
-	var _tmp = arr.slice();
-	for (var i = 0; i < count; i++) {
-		var index = Math.ceil(Math.random() * 10) % _tmp.length;
-		result.push(_tmp.splice(index, 1)[0]);
-	}
-	return result;
-};
-
-//This function wants an array - which explains why it works like array.random(). Give it one or you'll face a NaN
-window.jsEither = function(choices) {
-	var index = Math.floor(Math.random() * choices.length);
-	return choices[index];
-};
-
-/*
-Make everything waiting for this execute. Usage:
-
-let doSomething = function() {
-	... your initialization code goes here ...
-};
-if(typeof Categorizer === 'function') {
-	doSomething();
-} else {
-	jQuery(document).one('categorizer.ready', doSomething);
-}
-*/
-jQuery(document).trigger('categorizer.ready');
-
-window.hashChoice = function hashChoice(obj) {
-	let randint = Math.floor(Math.random()*hashSum(obj));
-	let ret;
-	Object.keys(obj).some(key => {
-		if (randint < obj[key]) {
-			ret = key;
-			return true;
-		} else {
-			randint -= obj[key];
-			return false;
-		}
-	});
-	return ret;
-};
-
-window.hashSum = function hashSum(obj) {
-	let sum = 0;
-	Object.keys(obj).forEach(key => { sum += obj[key]; });
-	return sum;
-};
-
-window.arr2obj = function arr2obj(arr) {
-	const obj = {};
-	arr.forEach(item => { obj[item] = 1; });
-	return obj;
-};
-
-window.hashPush = function hashPush(obj, ...rest) {
-	rest.forEach(item => {
-		if (obj[item] === undefined) obj[item] = 1;
-		else obj[item] += 1;
-	});
-};
-
-window.weightedArray2HashMap = function weightedArray2HashMap(arr) {
-	const obj = {};
-	arr.forEach(item => {
-		if (obj[item] === undefined) obj[item] = 1;
-		else obj[item] += 1;
-	});
-	return obj;
-};
-
-
-window.between = function between(a, low, high) {
-	if (low === null) low = -Infinity;
-	if (high === null) high = Infinity;
-	return (a > low && a < high);
-};
-
-// generate a random, almost unique ID that is compliant (possibly) with RFC 4122
-window.generateNewID = function generateNewID() {
-	let date = Date.now(); //high-precision timer
-	let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
-		let r = (date + Math.random()*16)%16 | 0;
-		date = Math.floor(date/16);
-		return (c=='x' ? r : (r & 0x3 | 0x8)).toString(16);
-	});
-	return uuid;
-};
-
-window.arraySwap = function arraySwap(array, a, b) {
-	const tmp = array[a];
-	array[a] = array[b];
-	array[b] = tmp;
-};
-
-// circumvents sugarcube, allowing a plain HTML5 UI within it
-window.html5passage = function html5passage(passage_function) {
-	$(document).one(':passagedisplay', ev => {
-		const element = document.createElement("div");
-		element.classList.add("passage");
-		document.getElementById("passages").appendChild(element);
-		passage_function(element);
-		$(document).off(':passagedisplay');
-	});
-};
-
-//If you want to include a SugarCube passage in a JS function use this. The result must be printed using the <<print>> macro. passageTitle must be a string.
-window.jsInclude = function(passageTitle) {
-	if (Story.has(passageTitle))
-		return Story.get(passageTitle).processText();
-	else
-		return `<span class="red">Error: Passage ${passageTitle} does not exist.</span>`;
-};
-
-window.capFirstChar = function capFirstChar(string) {
-	return string.charAt(0).toUpperCase() + string.substr(1);
-};
-
-window.getSlaveDevotionClass = function (slave) {
-	if ((!slave) || (!State))
-		return undefined;
-	if ('mindbroken' == slave.fetish)
-		return 'mindbroken';
-	if (slave.devotion < -95)
-		return 'very-hateful';
-	else if (slave.devotion < -50)
-		return 'hateful';
-	else if (slave.devotion < -20)
-		return 'resistant';
-	else if (slave.devotion <= 20)
-		return 'ambivalent';
-	else if (slave.devotion <= 50)
-		return 'accepting';
-	else if (slave.devotion <= 95)
-		return 'devoted';
-	else
-		return 'worshipful';
-};
-
-window.getSlaveTrustClass = function (slave) {
-	if ((!slave) || (!State))
-		return undefined;
-
-	if ('mindbroken' == slave.fetish)
-		return '';
-
-	if (slave.trust < -95)
-		return 'extremely-terrified';
-	else if (slave.trust < -50)
-		return 'terrified';
-	else if (slave.trust < -20)
-		return 'frightened';
-	else if (slave.trust <= 20)
-		return 'fearful';
-	else if (slave.trust <= 50) {
-		if (slave.devotion < -20) return 'hate-careful';
-		else return 'careful';
-	} else if (slave.trust <= 95) {
-		if (slave.devotion < -20) return 'bold';
-		else return 'trusting';
-	} else {
-		if (slave.devotion < -20) return 'defiant';
-		else return 'profoundly-trusting';
-	}
-};
-
-//takes an integer e.g. $activeSlave.hLength, returns a string in the format 10 inches
-window.cmToInchString = function(s) {
-	return Math.round(s/2.54) + (Math.round(s/2.54) === 1?" inch":" inches");
-};
-
-//takes an integer e.g. $activeSlave.height, returns a string in the format 6'5"
-window.cmToFootInchString = function(s) {
-	if (Math.round(s/2.54) < 12)
-		return cmToInchString(s);
-	return Math.trunc(Math.round(s/2.54)/12) + `'` + Math.round(s/2.54)%12 + `"`;
-};
-
-//takes a dick value e.g. $activeSlave.dick, returns a string in the format 6 inches
-window.dickToInchString = function(s) {
-	return cmToInchString(dickToCM(s));
-};
-
-//takes a dick value e.g. $activeSlave.dick, returns an int of the dick length in cm
-window.dickToCM = function(s) {
-	return (s<9?s*5:(s===9?50:s*6));
-};
-
-//takes a ball value e.g. $activeSlave.balls, returns a string in the format 3 inches
-window.ballsToInchString = function(s) {
-	return cmToInchString(ballsToCM(s));
-};
-
-//takes a ball value e.g. $activeSlave.balls, returns an int of the ball size in cm
-window.ballsToCM = function(s) {
-	if (s < 2)
-		return 0;
-	return (s<10?(s-1)*2:s*2);
-};
-
-//takes a dick value e.g. $activeSlave.dick, returns a string in the format of either `20cm (8 inches)`, `8 inches`, or `20cm`
-window.dickToEitherUnit = function(s) {
-	if (State.variables.showInches === 1)
-		return dickToCM(s) + "cm (" + dickToInchString(s) + ")";
-	if (State.variables.showInches === 2)
-		return dickToInchString(s);
-	return dickToCM(s) + "cm";
-};
-
-//takes a ball value e.g. $activeSlave.balls, returns a string in the format of either `20cm (8 inches)`, `8 inches`, or `20cm`
-window.ballsToEitherUnit = function(s) {
-	if (State.variables.showInches === 1)
-		return ballsToCM(s) + "cm (" + ballsToInchString(s) + ")";
-	if (State.variables.showInches === 2)
-		return ballsToInchString(s);
-	return ballsToCM(s) + "cm";
-};
-
-//takes an int in centimeters e.g. $activeSlave.height, returns a string in the format of either `200cm (6'7")`, `6'7"`, or `200cm`
-window.heightToEitherUnit = function(s) {
-	if (State.variables.showInches === 1)
-		return s + "cm (" + cmToFootInchString(s) + ")";
-	if (State.variables.showInches === 2)
-		return cmToFootInchString(s);
-	return s + "cm";
-};
-
-//takes an int in centimeters e.g. $activeSlave.hLength, returns a string in the format of either `30cm (12 inches)`, `12 inches`, or `30cm`
-window.lengthToEitherUnit = function(s) {
-	if (State.variables.showInches === 1)
-		return s + "cm (" + cmToInchString(s) + ")";
-	if (State.variables.showInches === 2)
-		return cmToInchString(s);
-	return s + "cm";
-};
-
-/* decoration should be passed as "facilityDecoration" in quotes. For example, ValidateFacilityDecoration("brothelDecoration"). The quotes are important, do not pass it as a story variable. */
-window.ValidateFacilityDecoration = function ValidateFacilityDecoration(decoration) {
-	const V = State.variables;
-	switch (V[decoration]) {
-		case "standard":
-			/*nothing to do */
-			break;
-		case "Supremacist":
-			if (!Number.isFinite(V.arcologies[0].FSSupremacist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Subjugationist":
-			if (!Number.isFinite(V.arcologies[0].FSSubjugationist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Gender Radicalist":
-			if (!Number.isFinite(V.arcologies[0].FSGenderRadicalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Gender Fundamentalist":
-			if (!Number.isFinite(V.arcologies[0].FSGenderFundamentalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Paternalist":
-			if (!Number.isFinite(V.arcologies[0].FSPaternalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Body Purist":
-			if (!Number.isFinite(V.arcologies[0].FSBodyPurist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Transformation Fetishist":
-			if (!Number.isFinite(V.arcologies[0].FSTransformationFetishist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Youth Preferentialist":
-			if (!Number.isFinite(V.arcologies[0].FSYouthPreferentialist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Maturity Preferentialist":
-			if (!Number.isFinite(V.arcologies[0].FSMaturityPreferentialist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Slimness Enthusiast":
-			if (!Number.isFinite(V.arcologies[0].FSSlimnessEnthusiast)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Asset Expansionist":
-			if (!Number.isFinite(V.arcologies[0].FSAssetExpansionist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Pastoralist":
-			if (!Number.isFinite(V.arcologies[0].FSPastoralist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Physical Idealist":
-			if (!Number.isFinite(V.arcologies[0].FSPhysicalIdealist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Chattel Religionist":
-			if (!Number.isFinite(V.arcologies[0].FSChattelReligionist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Degradationist":
-			if (!Number.isFinite(V.arcologies[0].FSDegradationist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Roman Revivalist":
-			if (!Number.isFinite(V.arcologies[0].FSRomanRevivalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Egyptian Revivalist":
-			if (!Number.isFinite(V.arcologies[0].FSEgyptianRevivalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Edo Revivalist":
-			if (!Number.isFinite(V.arcologies[0].FSEdoRevivalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Arabian Revivalist":
-			if (!Number.isFinite(V.arcologies[0].FSArabianRevivalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Chinese Revivalist":
-			if (!Number.isFinite(V.arcologies[0].FSChineseRevivalist)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Repopulation Focus":
-			if (!Number.isFinite(V.arcologies[0].FSRepopulationFocus)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Eugenics":
-			if (!Number.isFinite(V.arcologies[0].FSRestart)) {
-				V[decoration] = "standard";
-			}
-			break;
-		case "Hedonistic":
-			if (!Number.isFinite(V.arcologies[0].FSHedonisticDecadence)) {
-				V[decoration] = "standard";
-			}
-			break;
-	}
-};
-
-window.FSChange = function FSChange(FS, magnitude, bonus_multiplier) {
-	"use strict";
-	const V = State.variables;
-	let errorMessage = "";
-
-	switch (FS) {
-		case "Supremacist":
-			if (Number.isFinite(V.arcologies[0].FSSupremacist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSSupremacist / V.FSLockinLevel);
-				V.arcologies[0].FSSupremacist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Subjugationist":
-			if (Number.isFinite(V.arcologies[0].FSSubjugationist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSSubjugationist / V.FSLockinLevel);
-				V.arcologies[0].FSSubjugationist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "GenderRadicalist":
-			if (Number.isFinite(V.arcologies[0].FSGenderRadicalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSGenderRadicalist / V.FSLockinLevel);
-				V.arcologies[0].FSGenderRadicalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "GenderFundamentalist":
-			if (Number.isFinite(V.arcologies[0].FSGenderFundamentalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSGenderFundamentalist / V.FSLockinLevel);
-				V.arcologies[0].FSGenderFundamentalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Paternalist":
-			if (Number.isFinite(V.arcologies[0].FSPaternalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSPaternalist / V.FSLockinLevel);
-				V.arcologies[0].FSPaternalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Degradationist":
-			if (Number.isFinite(V.arcologies[0].FSDegradationist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSDegradationist / V.FSLockinLevel);
-				V.arcologies[0].FSDegradationist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "AssetExpansionist":
-			if (Number.isFinite(V.arcologies[0].FSAssetExpansionist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSAssetExpansionist / V.FSLockinLevel);
-				V.arcologies[0].FSAssetExpansionist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "SlimnessEnthusiast":
-			if (Number.isFinite(V.arcologies[0].FSSlimnessEnthusiast)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSSlimnessEnthusiast / V.FSLockinLevel);
-				V.arcologies[0].FSSlimnessEnthusiast += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "TransformationFetishist":
-			if (Number.isFinite(V.arcologies[0].FSTransformationFetishist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSTransformationFetishist / V.FSLockinLevel);
-				V.arcologies[0].FSTransformationFetishist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "BodyPurist":
-			if (Number.isFinite(V.arcologies[0].FSBodyPurist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSBodyPurist / V.FSLockinLevel);
-				V.arcologies[0].FSBodyPurist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "MaturityPreferentialist":
-			if (Number.isFinite(V.arcologies[0].FSMaturityPreferentialist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSMaturityPreferentialist / V.FSLockinLevel);
-				V.arcologies[0].FSMaturityPreferentialist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "YouthPreferentialist":
-			if (Number.isFinite(V.arcologies[0].FSYouthPreferentialist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSYouthPreferentialist / V.FSLockinLevel);
-				V.arcologies[0].FSYouthPreferentialist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Pastoralist":
-			if (Number.isFinite(V.arcologies[0].FSPastoralist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSPastoralist / V.FSLockinLevel);
-				V.arcologies[0].FSPastoralist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "PhysicalIdealist":
-			if (Number.isFinite(V.arcologies[0].FSPhysicalIdealist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSPhysicalIdealist / V.FSLockinLevel);
-				V.arcologies[0].FSPhysicalIdealist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "ChattelReligionist":
-			if (Number.isFinite(V.arcologies[0].FSChattelReligionist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSChattelReligionist / V.FSLockinLevel);
-				V.arcologies[0].FSChattelReligionist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "RomanRevivalist":
-			if (Number.isFinite(V.arcologies[0].FSRomanRevivalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSRomanRevivalist / V.FSLockinLevel);
-				V.arcologies[0].FSRomanRevivalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "AztecRevivalist":
-			if (Number.isFinite(V.activeArcology.FSAztecRevivalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSAztecRevivalist / V.FSLockinLevel);
-				V.arcologies[0].FSAztecRevivalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "EgyptianRevivalist":
-			if (Number.isFinite(V.arcologies[0].FSEgyptianRevivalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSEgyptianRevivalist / V.FSLockinLevel);
-				V.arcologies[0].FSEgyptianRevivalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "EdoRevivalist":
-			if (Number.isFinite(V.arcologies[0].FSEdoRevivalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSEdoRevivalist / V.FSLockinLevel);
-				V.arcologies[0].FSEdoRevivalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "ArabianRevivalist":
-			if (Number.isFinite(V.arcologies[0].FSArabianRevivalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSArabianRevivalist / V.FSLockinLevel);
-				V.arcologies[0].FSArabianRevivalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "ChineseRevivalist":
-			if (Number.isFinite(V.arcologies[0].FSChineseRevivalist)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSChineseRevivalist / V.FSLockinLevel);
-				V.arcologies[0].FSChineseRevivalist += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Repopulationist":
-			if (Number.isFinite(V.arcologies[0].FSRepopulationFocus)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSRepopulationFocus / V.FSLockinLevel);
-				V.arcologies[0].FSRepopulationFocus += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Eugenics":
-			if (Number.isFinite(V.arcologies[0].FSRestart)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSRestart / V.FSLockinLevel);
-				V.arcologies[0].FSRestart += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		case "Hedonism":
-			if (Number.isFinite(V.arcologies[0].FSHedonisticDecadence)) {
-				V.rep += magnitude * V.FSSingleSlaveRep * (V.arcologies[0].FSHedonisticDecadence / V.FSLockinLevel);
-				V.arcologies[0].FSHedonisticDecadence += 0.05 * magnitude * V.FSSingleSlaveRep * (bonus_multiplier || 1);
-			}
-			break;
-		default:
-			errorMessage += "<span class='red'>ERROR: bad FS reference</span>";
-	}
-	return errorMessage;
-};
-
-window.FSChangePorn = function FSChangePorn(FS, magnitude) {
-	return FSChange(FS, magnitude, State.variables.pornFameBonus);
-};
-
-window.ordinalSuffix = function ordinalSuffix(i) {
-	var j = i % 10,
-		k = i % 100;
-	if (j == 1 && k != 11) {
-		return i + "st";
-	}
-	if (j == 2 && k != 12) {
-		return i + "nd";
-	}
-	if (j == 3 && k != 13) {
-		return i + "rd";
-	}
-	return i + "th";
-};
-
-window.removeDuplicates = function removeDuplicates(array) {
-	return [...new Set(array)];
-};
-
-window.induceLactation = function induceLactation(slave) {
-	let pronouns = getPronouns(slave);
-	let His = capFirstChar(pronouns.possessive);
-	let r = ``;
-	if (slave.induceLactation >= 10) {
-		if (jsRandom(1,100) < slave.induceLactation) {
-			r += `${His} breasts have been stimulated often enough to @@.lime;induce lactation.@@`
-			slave.induceLactation = 0;
-			slave.lactationDuration = 2;
-			slave.lactation = 1;
-		}
-	}
-	return r;
-};
-
-window.ResearchLabStockPile = function() {
-	const V = State.variables;
-	return `__Stockpile__
-	Prosthetics interfaces: ${commaNum(V.stockpile.basicPLimbInterface + V.stockpile.advPLimbInterface)}
-	&nbsp;Basic : $stockpile.basicPLimbInterface
-	&nbsp;Advanced: $stockpile.advPLimbInterface
-	Limbs: ${commaNum(V.stockpile.basicPLimb + V.stockpile.advSexPLimb + V.stockpile.advGracePLimb + V.stockpile.advCombatPLimb + V.stockpile.cyberneticPLimb)}
-	&nbsp;Basic: $stockpile.basicPLimb
-	&nbsp;Sex: $stockpile.advSexPLimb
-	&nbsp;Beauty: $stockpile.advGracePLimb
-	&nbsp;Combat: $stockpile.advCombatPLimb
-	&nbsp;Cybernetic: $stockpile.cyberneticPLimb
-	Implants: ${commaNum(V.stockpile.ocularImplant + V.stockpile.cochlearImplant + V.stockpile.erectileImplant)}
-	&nbsp;Ocular: $stockpile.ocularImplant
-	&nbsp;Cochlear: $stockpile.cochlearImplant
-	//&nbsp;Erectile: $stockpile.erectileImplant//
-	Electrolarynx: $stockpile.electrolarynx`;
-};
-
-window.originPronounReplace = function(slave) {
-	let r = slave.origin;
-	switch (r) {
-		case "She was the result of unprotected sex with a client. Her mother tracked you down years after her birth to force her upon you.":
-			return `${capFirstChar(slave.pronoun)} was the result of unprotected sex with a client. ${capFirstChar(slave.possessive)} mother tracked you down years after ${slave.possessive} birth to force ${slave.object} upon you.`;
-		case "You kept her after her owner failed to pay your bill for performing surgery on her.":
-			return `You kept ${slave.object} after ${slave.possessive} owner failed to pay your bill for performing surgery on ${slave.object}.`;
-		case "She comes from old money and sold herself into slavery to satisfy her obsession with the practice, believing her family would buy her back out of slavery later.":
-			return `${capFirstChar(slave.pronoun)} comes from old money and sold herself into slavery to satisfy ${slave.possessive} obsession with the practice, believing ${slave.possessive} family would buy ${slave.object} back out of slavery later.`;
-		case "When you took her from her previous owner, she was locked into a beautiful rosewood box lined with red velvet, crying.":
-			return `When you took ${slave.object} from ${slave.possessive} previous owner, ${slave.pronoun} was locked into a beautiful rosewood box lined with red velvet, crying.`;
-		case "Her husband sold her into slavery to escape his debts.":
-			return `${capFirstChar(slave.possessive)} husband sold ${slave.object} into slavery to escape his debts.`;
-		case "She was voluntarily enslaved after she decided that your arcology was the best place for her to get the steroids that she'd allowed to define her life.":
-			return `${capFirstChar(slave.pronoun)} was voluntarily enslaved after ${slave.pronoun} decided that your arcology was the best place for ${slave.object} to get the steroids that ${slave.pronoun}'d allowed to define ${slave.possessive} life.`;
-		case "She came to you to escape being sold to a cruel master after her producer informed her of her debt.":
-			return `${capFirstChar(slave.pronoun)} came to you to escape being sold to a cruel master after ${slave.possessive} producer informed ${slave.object} of ${slave.possessive} debt.`;
-		case "You tricked her into enslavement, manipulating her based on her surgical addiction.":
-			return `You tricked ${slave.object} into enslavement, manipulating ${slave.object} based on ${slave.possessive} surgical addiction.`;
-		case "You helped free her from a POW camp after being abandoned by her country, leaving her deeply indebted to you.":
-			return `You helped free ${slave.object} from a POW camp after being abandoned by ${slave.possessive} country, leaving ${slave.object} deeply indebted to you.`;
-		case "You purchased her in order to pave the way for her brother to take the throne.":
-			return `You purchased ${slave.object} in order to pave the way for ${slave.possessive} brother to take the throne.`;
-		case "You purchased her as a favor to her father.":
-			return `You purchased ${slave.object} as a favor to ${slave.possessive} father.`;
-		case "You purchased her from a King after his son put an illegitimate heir in her womb.":
-			return `You purchased ${slave.object} from a King after his son put an illegitimate heir in ${slave.possessive} womb.`;
-		case "You acquired her in the last stages of your career as a successful venture capitalist.":
-		case "Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with her, you had to temporarily switch to a desk job for your mercenary group.":
-		case "You acquired her in the last stages of your career as a noted private military contractor.":
-		case "You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create her.":
-		case "A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.":
-		case "Your slaving troop kept several girls as fucktoys, you sired her in your favorite.":
-		case "You enslaved her personally during the last stages of your slaving career.":
-		case "You sired her in yourself after an arcology owner, impressed by your work, rewarded you with a night you'll never forget.":
-		case "You conceived her after a male arcology owner, impressed by your work, rewarded you with a night you'll never forget.":
-		case "You sired her after a female arcology owner, impressed by your work, rewarded you with a night you'll never forget.":
-		case "You received her as a gift from an arcology owner impressed by your work.":
-		case "You captured her during your transition to the arcology":
-		case "You won her at cards, a memento from your life as one of the idle rich before you became an arcology owner.":
-		case "You brought her into the arcology mindbroken, little more than a walking collection of fuckable holes.":
-		case "You brought her into the arcology mindbroken, little more than a human onahole.":
-		case "She grew up sheltered and submissive, making her an easy target for enslavement.":
-		case "She was fresh from the slave markets when you acquired her.":
-		case "She chose to be a slave because the romanticized view of it she had turns her on.":
-		case "She was previously owned by a creative sadist, who has left a variety of mental scars on her.":
-		case "She was taken as a slave by a Sultan, who presented her as a gift to a surveyor.":
-		case "She is the winner of a martial arts slave tournament. You won her in a bet.":
-		case "She was homeless and willing to do anything for food, which in the end resulted in her becoming a slave.":
-		case "She was sold to you by an anonymous person who wanted her to suffer.":
-		case "You received her from a surgeon who botched an implant operation on her and needed to get her out of sight.":
-		case "She offered herself to you for enslavement to escape having plastic surgery foisted on her.":
-		case "You turned her into a slave girl after she fell into debt to you.":
-		case "She was raised in a radical slave school that treated her with drugs and surgery from a very young age.":
-		case "She was raised in a radical slave school that treated her from a very young age, up to the point that she never experienced male puberty.":
-		case "She was a runaway slave captured by a gang outside your arcology. You bought her cheap after she was harshly used by them.":
-		case "She was the private slave of a con artist cult leader before he had to abandon her and flee.":
-		case "You helped her give birth, leaving her deeply indebted to you.":
-		case "You purchased her from a King after she expressed knowledge of the prince's affair with another servant.":
-			r = r.replace(/\bherself\b/g, slave.objectReflexive);
-			r = r.replace(/\bHerself\b/g, capFirstChar(slave.objectReflexive));
-			r = r.replace(/\bshe\b/g, slave.pronoun);
-			r = r.replace(/\bShe\b/g, capFirstChar(slave.pronoun));
-			r = r.replace(/\bher\b/g, slave.object);
-			r = r.replace(/\bHer\b/g, capFirstChar(slave.object));
-			return r;
-		default:
-			r = r.replace(/\bherself\b/g, slave.objectReflexive);
-			r = r.replace(/\bHerself\b/g, capFirstChar(slave.objectReflexive));
-			r = r.replace(/\bshe\b/g, slave.pronoun);
-			r = r.replace(/\bShe\b/g, capFirstChar(slave.pronoun));
-			r = r.replace(/\bher\b/g, slave.possessive);
-			r = r.replace(/\bHer\b/g, capFirstChar(slave.possessive));
-			return r;
-	}
-};
-
-/*:: Span Macro JS [script]*/
-
-/*
- * <<span>> macro
- * A minimal macro which allows to create <span> elements with dynamic IDs.
- *
- * Usage: <<span $variable>>...<</span>>
- */
-Macro.add('span', {
-	skipArgs : true,
-	tags : null,
-
-	handler() {
-		const payload = this.payload[0].contents.replace(/(^\n+|\n+$)/, '');
-		let statement = this.args.raw.trim();
-		let result;
-
-		if(statement.length === 0) {
-			return this.error('invalid syntax, format: <<span id>>');
-		}
-
-		try {
-			result = Scripting.evalTwineScript(statement);
-		} catch (ex) {
-			return this.error(`bad evaluation: ${typeof ex === 'object' ? ex.message : ex}`);
-		}
-
-		Config.debug && this.debugView.modes({block: true});
-
-		jQuery("<span id='" + String(result) + "' />")
-			.wiki(payload)
-			.appendTo(this.output);
-	}
-});
-
-/*:: EventSelectionJS [script]*/
-
-window.generateRandomEventPoolStandard = function(eventSlave) {
-
-/* STANDARD EVENTS */
-
-if(eventSlave.fetish != "mindbroken") {
-	if(canWalk(eventSlave)) {
-		if(canTalk(eventSlave)) {
-
-			if(State.variables.RECockmilkInterceptionIDs.length > 1 || (State.variables.RECockmilkInterceptionIDs.length == 1 && eventSlave.ID != State.variables.RECockmilkInterceptionIDs[0])){
-				if(eventSlave.devotion > 20) {
-					if (eventSlave.dietCum > 0 || (eventSlave.fetishKnown && eventSlave.fetish == "cumslut")) {
-						State.variables.RETSevent.push("cockmilk interception");
-					}
-				}
-			}
-
-			if(State.variables.REInterslaveBeggingIDs.length > 1 || (State.variables.REInterslaveBeggingIDs.length == 1 && eventSlave.ID != State.variables.REInterslaveBeggingIDs[0])) {
-				if(State.variables.universalRulesConsent == 1) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.energy > 40) {
-							if(canPenetrate(eventSlave)) {
-								if(canSee(eventSlave)) {
-									if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-										State.variables.RETSevent.push("interslave begging");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.familyTesting == 0) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) {
-						if(eventSlave.relation == "mother") {
-							if(eventSlave.belly < 100000) {
-								if(eventSlave.lactation) {
-									if(eventSlave.nipples != "fuckable") {
-										if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-											State.variables.RETSevent.push("incestuous nursing");
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			} else {
-				if (eventSlave.devotion > 20 && (eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) && eventSlave.belly < 100000 && eventSlave.lactation > 0 && eventSlave.nipples != "fuckable" && eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity" && eventSlave.daughters > 0) {
-					State.variables.RETSevent.push("incestuous nursing");
-				}
-			}
-
-			if(eventSlave.intelligence+eventSlave.intelligenceImplant > 50) {
-				if(eventSlave.devotion > 50) {
-					if(eventSlave.intelligenceImplant >= 15) {
-						if(eventSlave.accent < 4) {
-							State.variables.RESSevent.push("devoted educated slave");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.entertainSkill >= 60 || ["an exotic dancer", "a dancer", "a house DJ", "a party girl", "an aspiring pop star"].includes(eventSlave.career)) {
-				if(canHear(eventSlave)) {
-					if(eventSlave.health > 40) {
-						if(eventSlave.devotion > 50) {
-							if(eventSlave.trust > 50) {
-								State.variables.RESSevent.push("happy dance");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.RERepressedAnalVirginSubIDs.length > 0) {
-				if(eventSlave.anus == 0) {
-					if(eventSlave.devotion >= -50) {
-						if(eventSlave.trust >= -50) {
-							if(eventSlave.sexualFlaw == "repressed") {
-								State.variables.RETSevent.push("repressed anal virgin");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.assistant > 0) {
-				if(State.variables.assistantAppearance != "normal") {
-					if(eventSlave.devotion >= -20) {
-						if(canSee(eventSlave)) {
-							if(eventSlave.devotion <= 50) {
-								if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) {
-									if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-										State.variables.RESSevent.push("PA servant");
-									}
-								}
-							} else if(eventSlave.trust > 75) {
-								if(eventSlave.energy > 60) {
-									if((canDoAnal(eventSlave) && eventSlave.anus > 0) || (canDoVaginal(eventSlave) && eventSlave.vagina > 0)) {
-										State.variables.RESSevent.push("PA flirting");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.clothes == "a succubus outfit") {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.trust > 20) {
-						State.variables.RESSevent.push("sexy succubus");
-					}
-				}
-			}
-
-			if(State.variables.HeadGirl != 0) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.anus != 0 && canDoAnal(eventSlave)) {
-						if(State.variables.HGSeverity >= 0) {
-							State.variables.events.push("RE anal punishment");
-						}
-						State.variables.events.push("RE shower punishment");
-					}
-				}
-				if(eventSlave.ID == State.variables.HeadGirl.ID) {
-					if(eventSlave.trust > 50) {
-						State.variables.RESSevent.push("trusting HG");
-					}
-				}
-				if(eventSlave.ID != State.variables.HeadGirl.ID) {
-					if(canSee(eventSlave) && canWalk(eventSlave)) {
-						if(eventSlave.speechRules != "restrictive") {
-							if(eventSlave.trust > 75) {
-								if(eventSlave.devotion > 50) {
-									if(eventSlave.oralSkill > 30) {
-										if(eventSlave.intelligence+eventSlave.intelligenceImplant >= State.variables.HeadGirl.intelligence+State.variables.HeadGirl.intelligenceImplant) {
-											if(eventSlave.oralSkill > State.variables.HeadGirl.oralSkill) {
-												State.variables.events.push("RE HG replacement");
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.livingRules == "spare") {
-				if(eventSlave.devotion <= 20) {
-					if(eventSlave.devotion > -10) {
-						State.variables.RESSevent.push("sleeping ambivalent");
-					}
-					if(eventSlave.trust < -20) {
-						State.variables.RESSevent.push("bad dream");
-					}
-				}
-			}
-
-			if(eventSlave.devotion <= 50) {
-				if(eventSlave.devotion >= -20) {
-					if(eventSlave.weekAcquired > 0) {
-						if(State.variables.week-eventSlave.weekAcquired < 10) {
-							if(eventSlave.energy > 20) {
-								if(eventSlave.anus != 0) {
-									if(eventSlave.vagina != 0) {
-										State.variables.RESSevent.push("ignorant horny");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.RETasteTestSubIDs.length > 1) {
-				if(eventSlave.livingRules == "luxurious") {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.energy > 80) {
-							State.variables.RETSevent.push("taste test");
-						}
-					}
-				}
-			}
-
-			if(State.variables.modRequestsAllowed > 0) {
-				if(eventSlave.trust > 50) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.dick != 0 || eventSlave.vagina != -1) {
-							if(eventSlave.nipples != "fuckable") {
-								if(eventSlave.speechRules == "permissive") {
-									if(eventSlave.corsetPiercing == 0) {
-										if(eventSlave.tonguePiercing == 0) {
-											if(eventSlave.anusPiercing == 0) {
-												if(eventSlave.nipplesPiercing == 0) {
-													if(eventSlave.dickPiercing == 0) {
-														if(eventSlave.vaginaPiercing == 0) {
-															if(eventSlave.lipsTat == 0 || eventSlave.lipsTat == "none") {
-																if(eventSlave.vaginaTat == 0 || eventSlave.vaginaTat == "none") {
-																	State.variables.RESSevent.push("mods please");
-																}
-															}
-														}
-													}
-												}
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.muscles > 5) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.diet != "slimming") {
-						State.variables.RESSevent.push("sore shoulders");
-					}
-				}
-			}
-
-			if(eventSlave.relationship > 3) {
-				var relationshipSlave = State.variables.slaves.find(function(s) { return s.ID == eventSlave.relationshipTarget; });
-				if(relationshipSlave.devotion > 20) {
-					if(canWalk(relationshipSlave)) {
-						if(canTalk(relationshipSlave)) {
-							if(eventSlave.devotion > 50) {
-								if(eventSlave.trust > 50) {
-									if(eventSlave.speechRules != "restrictive") {
-										State.variables.RETSevent.push("date please");
-									}
-									if(relationshipSlave.anus != 0) {
-										if(relationshipSlave.dick != 1) {
-											if(relationshipSlave.dick == 0 || canAchieveErection(relationshipSlave)) {
-												if(relationshipSlave.fetish == "dom" || relationshipSlave.fetish == "sadist") {
-													State.variables.RETSevent.push("top exhaustion");
-												}
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.REAnalCowgirlSubIDs.length > 1 || (State.variables.REAnalCowgirlSubIDs.length == 1 && eventSlave.ID != State.variables.REAnalCowgirlSubIDs[0])) {
-				if(eventSlave.devotion > 20) {
-					if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-						if(eventSlave.fetish == "buttslut" || eventSlave.fetish == "sadist" || eventSlave.fetish == "dom") {
-							if((eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") || eventSlave.dick == 0) {
-								State.variables.RETSevent.push("anal cowgirl");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.REBoobCollisionSubIDs.length > 1) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.trust > 20) {
-						if(eventSlave.boobs > 3000) {
-							if(eventSlave.attrXX >= 50 || (eventSlave.fetish == "boobs" && eventSlave.fetishStrength > 95)) {
-								State.variables.RETSevent.push("boob collision");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.weatherToday.severity <= 1) {
-				if(eventSlave.trust > 50) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.anus != 0 && canDoAnal(eventSlave)) {
-							if(eventSlave.vagina != 0) {
-								State.variables.RESSevent.push("confident tanning");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 50) {
-				if(eventSlave.trust > 50) {
-					var giver = 0;
-					if(State.variables.HeadGirl == 0) {
-						giver = 1;
-					} else if(State.variables.HeadGirl.ID != eventSlave.ID) {
-						giver = 1;
-					}
-					if(giver == 1) {
-						State.variables.RESSevent.push("a gift");
-					}
-				}
-			}
-
-			if(eventSlave.relationship >= 2) {
-				if(eventSlave.relationship < 5) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.trust >= -20) {
-							State.variables.events.push("RE relationship advice");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 50) {
-				if(eventSlave.anus > 0) {
-					if(eventSlave.vagina != 0) {
-						if(eventSlave.trust > 20) {
-							State.variables.RESSevent.push("devoted exhibition");
-							State.variables.RESSevent.push("devoted lotion");
-						}
-						if(eventSlave.energy > 95 && canDoAnal(eventSlave)) {
-							State.variables.RESSevent.push("devoted nympho");
-						}
-						if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") {
-							if(!["chastity", "combined chastity"].includes(eventSlave.dickAccessory) || eventSlave.dick == 0) {
-								State.variables.RESSevent.push("permitted masturbation");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.trust < -50) {
-				if(eventSlave.devotion <= 20) {
-					State.variables.RESSevent.push("terrified inspection");
-				}
-			}
-
-			if(eventSlave.dick > 0) {
-				if(eventSlave.anus > 0) {
-					if(eventSlave.devotion >= 10) {
-						if(State.variables.REFeminizationCheckinIDs.includes(eventSlave.ID)) {
-							State.variables.RECIevent.push("feminization");
-						}
-						if(eventSlave.trust >= 10) {
-							if(canAchieveErection(eventSlave)) {
-								if(State.variables.REFutaSisterCheckinIDs.includes(eventSlave.ID)) {
-									State.variables.RECIevent.push("futa");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.analSkill > 30) {
-				if(eventSlave.devotion >= 10) {
-					if(State.variables.REMILFCheckinIDs.includes(eventSlave.ID)) {
-						State.variables.RECIevent.push("MILF");
-					}
-				}
-			}
-
-			if(eventSlave.attrXY > 50) {
-				if(eventSlave.anus != 0) {
-					if(eventSlave.vagina != 0) {
-						if(eventSlave.devotion >= 10) {
-							if(State.variables.REOrientationCheckinIDs.includes(eventSlave.ID)) {
-								State.variables.RECIevent.push("orientation");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.face >= -10) {
-				if(eventSlave.devotion >= 10) {
-					if(eventSlave.assignment == "serve the public" || eventSlave.assignment == "whore") {
-						if(State.variables.REUglyCheckinIDs.includes(eventSlave.ID)) {
-							State.variables.RECIevent.push("ugly");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.anus > 1) {
-				if(eventSlave.anus < 4) {
-					if(eventSlave.analArea > 1) {
-						if(eventSlave.devotion > 50) {
-							if(eventSlave.trust > 50) {
-								if(State.variables.REButtholeCheckinIDs.includes(eventSlave.ID)) {
-									State.variables.RECIevent.push("butthole");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			/*
-			if(eventSlave.drugs == "breast injections") {
-				if(eventSlave.anus > 0 || eventSlave.vagina > 0) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.devotion >= -20) {
-							if(eventSlave.trust >= -50) {
-								if(State.variables.REReductionCheckinIDs.includes(eventSlave.ID)) {
-									State.variables.RECIevent.push("reduction");
-								}
-							}
-						}
-					}
-				}
-			}
-			*/
-
-			if(eventSlave.assignment == "be a servant" || eventSlave.assignment == "work as a servant") {
-				if(eventSlave.devotion <= 95) {
-					if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) {
-						State.variables.RESSevent.push("cooler lockin");
-					}
-				}
-			}
-
-			if(State.variables.universalRulesConsent == 0) {
-				if(eventSlave.devotion > 50) {
-					if(eventSlave.fetish == "sadist" || eventSlave.fetish == "dom" || eventSlave.energy > 95) {
-						if(State.variables.REShowerForceSubIDs.length > 0) {
-							if(eventSlave.trust <= 75) {
-								State.variables.RETSevent.push("shower force");
-							}
-						}
-						if(eventSlave.anus > 0) {
-							if(State.variables.RESadisticDescriptionSubIDs.length > 0) {
-								State.variables.RETSevent.push("sadistic description");
-							}
-						}
-						if(State.variables.cockFeeder > 0) {
-							if(canPenetrate(eventSlave) || eventSlave.dick == 0) {
-								State.variables.RESSevent.push("kitchen molestation");
-							}
-						}
-					}
-					if(State.variables.REIfYouEnjoyItSubIDs.length > 0) {
-						State.variables.RETSevent.push("if you enjoy it");
-					}
-					if(State.variables.RESimpleAssaultIDs.length > 0) {
-						if(canPenetrate(eventSlave)) {
-							State.variables.RETSevent.push("simple assault");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion < -50) {
-				if(eventSlave.trust >= -20) {
-					if(eventSlave.speechRules == "restrictive") {
-						State.variables.RESSevent.push("vocal disobedience");
-					}
-				}
-			}
-
-			if(State.variables.boobAccessibility != 1 && State.variables.ballsAccessibility != 1 && State.variables.pregAccessibility != 1) {
-				if(eventSlave.boobs > 10000) {
-					if(eventSlave.devotion >= -20) {
-						if(State.variables.slaves.length > 2) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								State.variables.RESSevent.push("huge tits");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.physicalAge > 30) {
-				if(eventSlave.ageImplant > 0) {
-					if(eventSlave.devotion > 20) {
-						State.variables.RESSevent.push("age implant");
-					}
-				}
-			}
-
-			if(State.variables.seeAge != 0) {
-				if(eventSlave.devotion > 50) {
-					if(eventSlave.speechRules != "restrictive") {
-						if(eventSlave.birthWeek >= 51) {
-							/* lets give this a much higher chance of appearing */
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.clothes == "a penitent nuns habit") {
-				if(eventSlave.anus > 0) {
-					if(eventSlave.devotion >= -20) {
-						if(eventSlave.devotion <= 50) {
-							State.variables.RESSevent.push("penitent");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.slaveName != eventSlave.birthName && eventSlave.birthName !== "") {
-				if(eventSlave.devotion <= 20) {
-					if(eventSlave.trust >= -20) {
-						if(eventSlave.anus > 0 && canDoAnal(eventSlave)) {
-							State.variables.RESSevent.push("not my name");
-						}
-					}
-				}
-			}
-
-			if(State.variables.slaves.length > 2) {
-				if(eventSlave.devotion >= -20) {
-					if(eventSlave.heels == 1) {
-						if(eventSlave.shoes == "heels" || eventSlave.shoes == "boots" || eventSlave.shoes == "extreme heels") {
-							State.variables.RESSevent.push("tendon fall");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.vagina < 0) {
-						if(canDoAnal(eventSlave)) {
-							if(eventSlave.anus > 0) {
-								if(eventSlave.analSkill <= 30) {
-									State.variables.RESSevent.push("obedient shemale");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 50) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.physicalAge > 37) {
-						if(eventSlave.anus > 0) {
-							if(eventSlave.vagina > 0) {
-								State.variables.RESSevent.push("devoted old");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.actualAge > 35) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							if(State.variables.PC.actualAge < 25) {
-								State.variables.RESSevent.push("young PC age difference");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.actualAge < 22) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							if(State.variables.PC.actualAge >= 50) {
-								State.variables.RESSevent.push("old PC age difference");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.fetish == "humiliation" || eventSlave.energy > 95) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.devotion >= -20) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							if(eventSlave.vagina != 0) {
-								if(eventSlave.anus != 0) {
-									if(eventSlave.fetishKnown == 1) {
-										State.variables.RESSevent.push("fearful humiliation");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.livingRules == "luxurious") {
-				if(eventSlave.devotion <= 75) {
-					if(eventSlave.devotion > 50) {
-						State.variables.RESSevent.push("newly devoted sunrise");
-					}
-				}
-			}
-
-			if(State.variables.PC.dick == 1) {
-				if(State.variables.PC.belly < 5000) {
-					if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) {
-						if(eventSlave.attrXY <= 35 || eventSlave.behavioralFlaw == "hates men" || eventSlave.sexualFlaw == "repressed") {
-							if(eventSlave.devotion >= -20) {
-								if(eventSlave.trust > 20) {
-									State.variables.RESSevent.push("frightening dick");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.spa > 0) {
-				if(eventSlave.boobs > 2000) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.trust > 20) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								State.variables.RESSevent.push("spa boobs");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.lactation > 0) {
-				if(eventSlave.boobs > 800) {
-					if(eventSlave.nipples != "fuckable") {
-						if(eventSlave.devotion > 20) {
-							if(eventSlave.trust > 20) {
-								State.variables.RESSevent.push("cow milking");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.dietCum > 0) {
-				if(eventSlave.devotion <= 20) {
-					if((eventSlave.fetish != "cumslut" && eventSlave.fetish != "masochist" && eventSlave.fetishStrength < 60) || eventSlave.fetishKnown == 0) {
-						State.variables.RESSevent.push("retching cum feeding");
-					}
-				}
-			}
-
-			if(State.variables.arcologies[0].FSSubjugationist != "unset") {
-				if(eventSlave.race != State.variables.arcologies[0].FSSubjugationistRace) {
-					if(State.variables.week-eventSlave.weekAcquired > 1) {
-						if(State.variables.week-eventSlave.weekAcquired < 10) {
-							if(eventSlave.devotion < -20) {
-								if(eventSlave.trust >= -20) {
-									if(eventSlave.health > -20) {
-										if(eventSlave.race == eventSlave.origRace) {
-											if(eventSlave.indentureRestrictions < 1) {
-												State.variables.RESSevent.push("subjugation blues");
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(canTalk(eventSlave)) {
-				if(eventSlave.dietCum > 0) {
-					if(eventSlave.diet == "fattening") {
-						if(eventSlave.trust >= -50) {
-							if(eventSlave.fetish != "cumslut") {
-								if(eventSlave.weight < -30) {
-									if(eventSlave.health > -80) {
-										if(eventSlave.behavioralFlaw != "anorexic") {
-											if(eventSlave.sexualFlaw != "self hating") {
-												if(eventSlave.fetishStrength <= 60 || eventSlave.fetishKnown != 1) {
-													State.variables.RESSevent.push("too thin for cum diet");
-												}
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.drugs == "intensive breast injections" || eventSlave.drugs == "hyper breast injections") {
-				if(eventSlave.boobs <= 8000) {
-					if(eventSlave.boobs > 2000) {
-						if(eventSlave.devotion <= 50) {
-							if(eventSlave.devotion >= -50) {
-								if(eventSlave.trust >= -50) {
-									if(eventSlave.fetish != "boobs") {
-										if(eventSlave.intelligence+eventSlave.intelligenceImplant >= -50) {
-											State.variables.RESSevent.push("breast expansion blues");
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.physicalAge > 35) {
-				if(eventSlave.speechRules != "restrictive") {
-					if(["whore", "serve the public", "work in the brothel", "serve in the club"].includes(eventSlave.assignment)) {
-						if(eventSlave.devotion >= -20) {
-							if(eventSlave.devotion <= 95) {
-								State.variables.RESSevent.push("ara ara");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.anus > 3) {
-				if(eventSlave.devotion > 50) {
-					if(eventSlave.trust > 50) {
-						State.variables.RESSevent.push("gaped asshole");
-					}
-				}
-			}
-
-			if(eventSlave.health > 90) {
-				if(eventSlave.muscles > 5) {
-					if(eventSlave.weight <= 30) {
-						if(eventSlave.weight >= -30) {
-							if(eventSlave.trust > 50) {
-								if(eventSlave.devotion > 50) {
-									State.variables.RESSevent.push("passing declaration");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.trust < -50) {
-				if(eventSlave.devotion <= 50) {
-					State.variables.RESSevent.push("im scared");
-				}
-			}
-
-			if(eventSlave.fetish == "sadist") {
-				if(eventSlave.fetishStrength > 20) {
-					if(State.variables.arcadeSlaves > 0) {
-						if(eventSlave.trust >= -20) {
-							if(eventSlave.devotion > 50) {
-								if(eventSlave.belly < 300000) {
-									State.variables.RESSevent.push("arcade sadist");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.dick == 0) {
-				if(eventSlave.vagina == -1) {
-					if(canDoAnal(eventSlave)) {
-						if(eventSlave.energy > 20) {
-							if(eventSlave.devotion >= -50) {
-								if(eventSlave.fetish != "buttslut" || eventSlave.fetishStrength <= 20) {
-									if(eventSlave.nipples != "fuckable") {
-										State.variables.RESSevent.push("desperate null");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.boobs > 2000) {
-					State.variables.RESSevent.push("back stretch");
-				}
-			}
-
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.speechRules != "restrictive") {
-						if(eventSlave.choosesOwnClothes !== 1) {
-							if(setup.modestClothes.includes(eventSlave.clothes)) {
-								State.variables.RESSevent.push("modest clothes");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.PC.vagina == 1) {
-				if(eventSlave.devotion <= 20) {
-					if((eventSlave.trust >= -20 && eventSlave.behavioralFlaw == "arrogant") || (eventSlave.trust > 20)) {
-						if(eventSlave.muscles > 30) {
-							if(eventSlave.health > 20) {
-								if(eventSlave.energy > 50) {
-									if(canPenetrate(eventSlave)) {
-										if(State.variables.Bodyguard == 0) {
-											State.variables.RESSevent.push("mutinery attempt");
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-		} /* closes mute exempt */
-
-		if(eventSlave.devotion > 20) {
-			if(["ball gag", "bit gag", "dildo gag", "massive dildo gag"].includes(eventSlave.collar)) {
-				State.variables.RESSevent.push("gagged slave");
-			}
-		}
-
-		if(eventSlave.devotion > 20) {
-			if(eventSlave.butt > 5) {
-				if(!["no clothing", "body oil", "a toga", "a kimono", "shibari ropes", "a slutty maid outfit", "a string bikini", "a scalemail bikini", "shimapan panties", "a chattel habit", "a slave gown", "a halter top dress", "a ball gown", "a mini dress", "harem gauze", "a schutzstaffel uniform", "a slutty schutzstaffel uniform", "a red army uniform", "a monokini", "a burkini"].includes(eventSlave.clothes)) {
-					State.variables.RESSevent.push("ass fitting");
-				}
-			}
-		}
-
-		if(eventSlave.trust > 20) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.energy > 40) {
-					if(eventSlave.belly < 300000) {
-						if(State.variables.PC.belly < 5000 && State.variables.PC.ballsImplant < 3 && State.variables.PC.balls < 3) {
-							if(canSee(eventSlave)) {
-								State.variables.RESSevent.push("comfortable seat");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.vaginaLube > 1) {
-			if(eventSlave.devotion > 20) {
-				if(canDoVaginal(State.variables.activeSlave)) {
-					State.variables.RESSevent.push("moist pussy");
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 20) {
-			if(eventSlave.trust <= -20) {
-				if(eventSlave.genes == "XY") {
-					if(eventSlave.dick > 0) {
-						if(!["chastity", "combined chastity"].includes(eventSlave.dickAccessory)) {
-							if(eventSlave.vagina == -1) {
-								if(eventSlave.attrXY < 50) {
-									State.variables.RESSevent.push("transition anxiety");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(State.variables.seeAge == 1) {
-			if(eventSlave.actualAge < 18) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.ovaries == 1) {
-						if(eventSlave.pubertyXX == 0) {
-							if(eventSlave.preg == 0) {
-								if(eventSlave.physicalAge >= eventSlave.pubertyAgeXX-.5) {
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-								}
-							}
-						}
-					}
-					if(canPenetrate(eventSlave)) {
-						if(eventSlave.balls > 0) {
-							if(eventSlave.pubertyXY == 0) {
-								if(eventSlave.physicalAge >= eventSlave.pubertyAgeXY-.5) {
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-								}
-							}
-						}
-					}
-				}
-			}
-		} /* closes aging exemption */
-
-
-		if(eventSlave.devotion >= -150) {
-			if(eventSlave.devotion <= 50) {
-				State.variables.events.push("RE standard punishment");
-			}
-		}
-
-		if(eventSlave.boobs > 600) {
-			if(eventSlave.boobShape == "torpedo-shaped") {
-				if(eventSlave.devotion >= -50) {
-					State.variables.RESSevent.push("torpedo squeeze");
-				}
-			}
-		}
-
-		if(eventSlave.assignment == "serve the public") {
-			if(eventSlave.fetishKnown == 1) {
-				if(State.variables.FSDegradationist == "unset") {
-					if(State.variables.arcologyUpgrade.drones == 1) {
-						State.variables.RESSevent.push("mean girls");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.balls > 0) {
-			if(eventSlave.hormoneBalance >= 100) {
-				if(State.variables.hormoneUpgradeMood == 0) {
-					if(eventSlave.trust >= -50) {
-						if(eventSlave.devotion >= -20) {
-							if(eventSlave.devotion <= 50) {
-								State.variables.RESSevent.push("orchiectomy please");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.trust > 20) {
-			if(eventSlave.devotion > 50) {
-				if(State.variables.PC.belly < 5000) {
-					State.variables.RESSevent.push("shower slip");
-				}
-				if(eventSlave.amp < 0) {
-					State.variables.RESSevent.push("plimb help");
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 20) {
-			if(eventSlave.devotion >= -50) {
-				if(eventSlave.trust >= -20) {
-					if(State.variables.suppository != 0) {
-						if(eventSlave.fetish != "buttslut") {
-							State.variables.RESSevent.push("suppository resistance");
-						}
-					}
-					if(State.variables.cockFeeder != 0) {
-						if(eventSlave.fetish != "cumslut") {
-							State.variables.RESSevent.push("cockfeeder resistance");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.relationship <= -2) {
-			if(eventSlave.trust > 50) {
-				if(eventSlave.devotion > 50) {
-					State.variables.RESSevent.push("bonded love");
-				}
-			}
-		}
-
-		if(eventSlave.trust > 20) {
-			if(eventSlave.devotion > 50) {
-				State.variables.RESSevent.push("objectifying visit");
-			}
-		}
-
-		if (canWalk(eventSlave)) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > -10) {
-					if(eventSlave.ID != State.variables.HeadGirl.ID) {
-						if(eventSlave.ID != State.variables.Concubine.ID) {
-							State.variables.RESSevent.push("refreshment delivery");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.dick > 8) {
-			if(eventSlave.balls > 0) {
-				if(eventSlave.energy > 60) {
-					if(eventSlave.devotion > 50) {
-						if(eventSlave.trust > 50) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								if(eventSlave.belly < 100000) {
-									State.variables.RESSevent.push("dick wringing");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.balls > 0) {
-			if(eventSlave.scrotum > 0) {
-				if(eventSlave.dickAccessory == "chastity" || eventSlave.dickAccessory == "combined chastity") {
-					if(eventSlave.devotion <= 95) {
-						if(eventSlave.energy > 50) {
-							if(eventSlave.energy < 95) {
-								if(eventSlave.devotion >= -20 || eventSlave.trust < -20) {
-									State.variables.RESSevent.push("cage relief");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(State.variables.PC.dick > 0) {
-			if(State.variables.PC.boobs > 0) {
-				if(canSee(eventSlave)) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.devotion >= -20) {
-							if(((eventSlave.attrXY <= 35) && (eventSlave.attrXX > 65)) || ((eventSlave.attrXX <= 35) && (eventSlave.attrXY > 65))) {
-								State.variables.RESSevent.push("dickgirl PC");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.voice > 0) {
-			if(eventSlave.lips <= 95) {
-				if(!["dildo gag", "massive dildo gag", "ball gag", "bit gag"].includes(eventSlave.collar)) {
-					if(eventSlave.accent == 3) {
-						if(eventSlave.devotion <= 50) {
-							if(eventSlave.trust > -10) {
-								if(eventSlave.devotion >= -20 || eventSlave.trust < -20) {
-									State.variables.RESSevent.push("language lesson");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.energy > 40) {
-			if(canSee(eventSlave)) {
-				if(eventSlave.trust >= -50) {
-					if(eventSlave.devotion > 0) {
-						if(eventSlave.devotion <= 50) {
-							if(((eventSlave.attrXX >= 50) && (State.variables.PC.boobs == 1 || State.variables.PC.title == 0) && (State.variables.PC.belly < 5000))
-								|| ((eventSlave.attrXY >= 50) && (State.variables.PC.dick == 1) && (State.variables.PC.boobs == 0) && (State.variables.PC.belly < 1500))
-								|| (eventSlave.fetish == "pregnancy" && State.variables.PC.belly >= 5000)
-								|| (eventSlave.fetish == "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) {
-								State.variables.RESSevent.push("hot PC");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.trust <= 20) {
-			if(eventSlave.trust >= -75) {
-				if(eventSlave.devotion <= 30) {
-					if(eventSlave.devotion >= -20) {
-						State.variables.RESSevent.push("like me");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.boobs >= 2000) {
-			if(eventSlave.boobsImplant == 0) {
-				if(eventSlave.nipples != "tiny" && eventSlave.nipples != "fuckable") {
-					if(eventSlave.devotion > 20) {
-						State.variables.RESSevent.push("huge naturals");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.boobs > 800) {
-			if(Math.floor(eventSlave.boobsImplant/eventSlave.boobs) >= .60) {
-				if(eventSlave.devotion > 20) {
-					State.variables.RESSevent.push("implant inspection");
-				}
-			}
-		}
-
-		if(eventSlave.devotion < -20) {
-			if(eventSlave.trust >= -20) {
-				if(eventSlave.clothes == "uncomfortable straps") {
-					State.variables.RESSevent.push("bondage gear");
-				}
-			}
-		}
-
-		if(eventSlave.labia > 1 && eventSlave.vagina >= 0) {
-			if(eventSlave.muscles > 5 || eventSlave.diet == "muscle building") {
-				if(eventSlave.belly < 10000) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.trust > 20) {
-							State.variables.RESSevent.push("inconvenient labia");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-			if(eventSlave.addict > 20) {
-				if(eventSlave.aphrodisiacs > 0 || eventSlave.inflationType == "aphrodisiac") {
-					State.variables.RESSevent.push("obedient addict");
-				}
-			}
-		}
-
-		if(State.variables.seeExtreme == 1) {
-			if(eventSlave.devotion < -50) {
-				if(eventSlave.trust >= -50) {
-					if(eventSlave.assignment != "stay confined") {
-						if(eventSlave.heels != 1) {
-							State.variables.RESSevent.push("escapee");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 50) {
-			if(eventSlave.trust >= -50) {
-				if(eventSlave.behavioralFlaw == "gluttonous") {
-					if(eventSlave.diet == "restricted") {
-						State.variables.RESSevent.push("diet");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 20) {
-			if(eventSlave.devotion >= -50) {
-				State.variables.RESSevent.push("resistant shower");
-			}
-		}
-
-		if(eventSlave.speechRules != "restrictive") {
-			if(eventSlave.devotion >= -20) {
-				if(eventSlave.trust >= -20) {
-					if(eventSlave.energy > 75) {
-						if(eventSlave.fetish != "buttslut") {
-							if(eventSlave.vagina != 0 || eventSlave.anus != 0) {
-								State.variables.RESSevent.push("night visit");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if (eventSlave.releaseRules == "restrictive" || eventSlave.releaseRules == "chastity") {
-			if(eventSlave.need) {
-				if(eventSlave.devotion <= 95) {
-					if(eventSlave.trust >= -20) {
-						if((eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") || (eventSlave.dick == 0)) {
-							State.variables.RESSevent.push("forbidden masturbation");
-						}
-					}
-				}
-				if(eventSlave.devotion >= -20) {
-					if(eventSlave.trust >= -50) {
-						State.variables.RESSevent.push("desperately horny");
-					}
-				}
-			}
-		}
-
-		if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-			if(canPenetrate(eventSlave)) {
-				State.variables.RESSevent.push("slave dick on slave");
-			}
-		}
-
-		if(eventSlave.muscles > 30) {
-			if(eventSlave.weight <= 10) {
-				if(eventSlave.anus != 0 || State.variables.PC.dick == 0) {
-					if(eventSlave.vagina != 0 || State.variables.PC.dick == 0) {
-						State.variables.RESSevent.push("muscles");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion >= -20) {
-			if(eventSlave.lactation > 1) {
-				if(canDoVaginal(eventSlave) || canDoAnal(eventSlave)) {
-					State.variables.RESSevent.push("milkgasm");
-				}
-			}
-		}
-
-		if(eventSlave.waist < -95) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust >= -20) {
-					if(eventSlave.belly < 30000) {
-						if(eventSlave.weight <= 95) {
-							State.variables.RESSevent.push("devoted waist");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.entertainSkill >= 100) {
-			if(eventSlave.trust > 50) {
-				if(["serve the public", "serve in the club"].includes(eventSlave.assignment)) {
-					State.variables.RESSevent.push("masterful entertainer");
-				}
-			}
-		}
-
-		if(eventSlave.whoreSkill >= 100) {
-			if(eventSlave.trust > 50) {
-				if(["whore", "work in the brothel"].includes(eventSlave.assignment)) {
-					State.variables.RESSevent.push("masterful whore");
-				}
-			}
-		}
-
-		if(eventSlave.dick > 0) {
-			if(eventSlave.balls == 0) {
-				if(eventSlave.ovaries == 0) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.trust < -50) {
-							if(eventSlave.anus > 0) {
-								if(canDoAnal(eventSlave)) {
-									State.variables.RESSevent.push("resistant gelding");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(State.variables.seePreg != 0) {
-			if(isFertile(eventSlave)) {
-				if(eventSlave.devotion > 50) {
-					if(State.variables.PC.dick != 0) {
-						if(eventSlave.fetish == "pregnancy" || eventSlave.energy > 95) {
-							if(eventSlave.eggType == "human") {
-								if(eventSlave.fetishKnown == 1) {
-									if(eventSlave.vagina != 0) {
-										if(eventSlave.anus > 0) {
-											State.variables.RESSevent.push("impregnation please");
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(["large plug", "long, large plug", "huge plug", "long, huge plug"].includes(eventSlave.buttplug)) {
-			if(eventSlave.assignment != "stay confined" && isSlaveAvailable(eventSlave)) {
-				if(eventSlave.devotion <= 20) {
-					if(eventSlave.trust >= -50) {
-						if(eventSlave.anus < 3) {
-							State.variables.RESSevent.push("plug disobedience");
-						}
-					}
-				}
-			}
-		}
-
-		if(["whore", "serve the public", "work in the brothel", "serve in the club"].includes(eventSlave.assignment)) {
-			if(eventSlave.vagina != 0) {
-				if(eventSlave.anus != 0) {
-					if(canDoAnal(eventSlave)) {
-						if(eventSlave.devotion <= 50) {
-							State.variables.RESSevent.push("used whore");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.assignment == "serve the public") {
-			if(eventSlave.devotion >= -20) {
-				if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-					State.variables.RESSevent.push("nice guys");
-				}
-			}
-		}
-
-		if(eventSlave.assignment == "please you") {
-			if(eventSlave.devotion > 20) {
-				State.variables.RESSevent.push("lazy evening");
-			}
-		}
-
-		if(eventSlave.height < (Height.mean(eventSlave)*0.95)) {
-			if(eventSlave.physicalAge > 12) {
-				if(canDoAnal(eventSlave)) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.trust <= 95) {
-							State.variables.RESSevent.push("devoted shortstack");
-						}
-					}
-				}
-			}
-		}
-
-	} /* closes amp/crawling exempt */
-
-	if(canTalk(eventSlave)) {
-
-		if(eventSlave.speechRules != "restrictive") {
-			if(eventSlave.boobsImplant > 400) {
-				if(eventSlave.lipsImplant >= 30) {
-					if(eventSlave.buttImplant > 3) {
-						if(eventSlave.boobs < 9000 || eventSlave.butt < 8) {
-							State.variables.RESSevent.push("surgery addict");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.assignment == "please you") {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust >= -20) {
-					if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-						if(!["chastity", "combined chastity"].includes(eventSlave.dickAccessory) || eventSlave.dick == 0) {
-							if(State.variables.corpIncorporated != 0) {
-								State.variables.RESSevent.push("shift sleep");
-							}
-							if(canWalk(eventSlave)) {
-								if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") {
-									State.variables.RESSevent.push("shift masturbation");
-								}
-							}
-							if(eventSlave.entertainSkill >= 60) {
-								State.variables.RESSevent.push("shift doorframe");
-							}
-						}
-						if(canDoVaginal(eventSlave)) {
-							if(State.variables.PC.vagina == 1) {
-								if(eventSlave.dick == 0) {
-									if(State.variables.fuckSlaves > 2) {
-										State.variables.RESSevent.push("fucktoy tribbing");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		} else if(["serve in the master suite", "be your Concubine"].includes(eventSlave.assignment)) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust >= -20) {
-					if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-						if((!["chastity", "combined chastity"].includes(eventSlave.dickAccessory)) || (eventSlave.dick == 0)) {
-							if(State.variables.corpIncorporated != 0) {
-								State.variables.RESSevent.push("shift sleep");
-							}
-							if(eventSlave.entertainSkill >= 60) {
-								State.variables.RESSevent.push("shift doorframe");
-							}
-						}
-						if(canDoVaginal(eventSlave)) {
-							if(State.variables.PC.vagina == 1) {
-								if(eventSlave.dick == 0) {
-									if(State.variables.fuckSlaves > 2) {
-										State.variables.RESSevent.push("fucktoy tribbing");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.speechRules != "restrictive") {
-			if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount > 900) {
-				if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount < 1100) {
-					if(eventSlave.vagina != 0) {
-						if(eventSlave.anus > 0) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								State.variables.RESSevent.push("millenary");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.assignment == "stay confined") {
-			if(eventSlave.devotion <= 50) {
-				State.variables.RESSevent.push("solitary desperation");
-			}
-		}
-
-		if(eventSlave.speechRules == "restrictive") {
-			if(eventSlave.devotion > 60) {
-				if(eventSlave.trust >= -20) {
-					State.variables.RESSevent.push("restricted profession");
-				}
-			}
-		}
-
-		if(eventSlave.speechRules == "restrictive") {
-			if(eventSlave.intelligence > 15) {
-				if(eventSlave.trust >= -20) {
-					if(eventSlave.devotion <= 20) {
-						State.variables.RESSevent.push("restricted smart");
-					}
-				}
-			}
-		}
-
-		if(State.variables.expansionRequestsAllowed > 0) {
-			if(eventSlave.drugs == "no drugs") {
-				if(eventSlave.speechRules == "permissive") {
-					if(eventSlave.health > 20) {
-						if(eventSlave.devotion >= -20) {
-							if(eventSlave.trust > 20) {
-								if(State.variables.arcologies[0].FSSlimnessEnthusiast == "unset") {
-									State.variables.RESSevent.push("injections please");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.assignment == "serve the public") {
-			if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-				if(eventSlave.devotion > 50) {
-					State.variables.RESSevent.push("serve the public devoted");
-				}
-			}
-		}
-
-		if(eventSlave.behavioralFlaw == "bitchy") {
-			if(canSee(eventSlave)) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.trust >= -20) {
-						State.variables.RESSevent.push("obedient bitchy");
-					}
-				}
-			}
-		}
-
-	} /* closes mute exempt */
-
-	if(State.variables.cockFeeder == 0) {
-		if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) {
-			if(eventSlave.devotion <= 50) {
-				if(eventSlave.devotion >= -20 || eventSlave.trust < -20) {
-					State.variables.RESSevent.push("obedient idiot");
-				}
-			}
-		}
-	}
-
-	if(eventSlave.boobs > 25000) {
-		if(eventSlave.belly < 100000) {
-			State.variables.RESSevent.push("tittymonster inspection");
-		}
-	}
-
-	if(State.variables.assistant > 1) {
-		if(eventSlave.fetishKnown == 1) {
-			if(eventSlave.energy > 95) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") {
-						State.variables.RESSevent.push("nympho with assistant");
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.devotion > 50) {
-		if(eventSlave.trust > 50) {
-			if(eventSlave.assignment == "please you" || eventSlave.assignment == "serve in the master suite" || eventSlave.assignment == "be your Concubine") {
-				State.variables.RESSevent.push("bed snuggle");
-			}
-		}
-	}
-
-	if(eventSlave.minorInjury == "sore ass") {
-		if(eventSlave.devotion <= 50) {
-			State.variables.RESSevent.push("sore ass");
-		}
-	}
-
-	if(eventSlave.sexualFlaw == "hates oral") {
-		if(State.variables.PC.dick != 0) {
-			if(eventSlave.devotion <= 50) {
-				State.variables.RESSevent.push("hates oral");
-			}
-		}
-	}
-
-	if(eventSlave.vagina == 0) {
-		if(eventSlave.devotion > 50) {
-			if(eventSlave.trust > 20) {
-				if(eventSlave.speechRules != "restrictive") {
-					State.variables.RESSevent.push("devoted virgin");
-				}
-			}
-		}
-	}
-
-	if(eventSlave.anus == 0) {
-		if(eventSlave.devotion > 50) {
-			if(eventSlave.trust > 20) {
-				if(eventSlave.speechRules != "restrictive") {
-					State.variables.RESSevent.push("devoted anal virgin");
-				}
-			}
-		}
-	}
-
-	if(State.variables.seeExtreme == 1) {
-		if(eventSlave.balls > 1) {
-			if(eventSlave.scrotum > 0) {
-				if(eventSlave.devotion <= 20) {
-					if(eventSlave.trust <= 20) {
-						if(eventSlave.speechRules != "restrictive") {
-							State.variables.RESSevent.push("fearful balls");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.devotion <= 50) {
-		if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") {
-			State.variables.RESSevent.push("scrubbing");
-		}
-	}
-
-	if(eventSlave.devotion <= 20) {
-		if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") {
-			if(eventSlave.clothes == "a slutty maid outfit" || eventSlave.clothes == "a nice maid outfit") {
-				State.variables.RESSevent.push("servant maid");
-			}
-		}
-	}
-
-	if(eventSlave.speechRules != "restrictive") {
-		if(canDoVaginal(eventSlave)) {
-			if(eventSlave.fetish != "buttslut") {
-				if(eventSlave.vagina == 0) {
-					if(eventSlave.anus != 0) {
-						if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount > 100) {
-							State.variables.RESSevent.push("unhappy virgin");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.aphrodisiacs > 1 || eventSlave.inflationType == "aphrodisiac") {
-		if(eventSlave.speechRules == "restrictive" && eventSlave.releaseRules !== "permissive") {
-			if(eventSlave.amp != 1) {
-				State.variables.RESSevent.push("extreme aphrodisiacs");
-			}
-		}
-	}
-
-	if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-		if(eventSlave.clit > 2) {
-			State.variables.RESSevent.push("slave clit on slave");
-		}
-	}
-
-	if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "chastity") {
-		if(eventSlave.dick > 4) {
-			if(eventSlave.amp != 1){
-				if(canAchieveErection(eventSlave)) {
-					if(eventSlave.belly < 10000) {
-						if(eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") {
-							State.variables.RESSevent.push("slave dick huge");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.heels == 1) {
-		if(eventSlave.shoes == "heels" || eventSlave.shoes == "extreme heels") {
-			if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-				State.variables.RESSevent.push("heels");
-			}
-		}
-	}
-
-	if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "chastity") {
-		if(eventSlave.belly < 300000) {
-			if(eventSlave.anus > 2) {
-				if(eventSlave.fetish == "buttslut" || eventSlave.energy > 95) {
-					if(eventSlave.fetish != "none") {
-						if(canDoAnal(eventSlave)) {
-							State.variables.RESSevent.push("loose buttslut");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.assignment == "whore") {
-		if(canDoAnal(eventSlave) && (eventSlave.vagina < 0 || canDoVaginal(eventSlave))) {
-			if(eventSlave.devotion < -20 && eventSlave.trust >= -20) {
-				State.variables.RESSevent.push("whore rebellious");
-			}
-		}
-	}
-
-	if(eventSlave.amp == 1) {
-		if(eventSlave.devotion > 20) {
-			if(eventSlave.anus > 0 && canDoAnal(eventSlave)) {
-				State.variables.RESSevent.push("devoted amp");
-			}
-		}
-		if(eventSlave.assignment == "rest") {
-			State.variables.RESSevent.push("resting amp");
-		}
-	}
-
-	if(eventSlave.boobs < 500) {
-		if(eventSlave.butt < 3) {
-			if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.devotion > 20 && eventSlave.trust >= -20) {
-						if(eventSlave.weight <= 10) {
-							if(eventSlave.muscles <= 30) {
-								State.variables.RESSevent.push("obedient girlish");
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.boobs > 1200) {
-		if(eventSlave.areolaeShape != "circle") {
-			if(eventSlave.devotion > 50) {
-				State.variables.RESSevent.push("shaped areolae");
-			}
-		}
-	}
-
-	if(eventSlave.behavioralFlaw == "arrogant") {
-		if(eventSlave.devotion < -50) {
-			if(eventSlave.trust >= -50) {
-				State.variables.RESSevent.push("rebellious arrogant");
-			}
-		}
-	}
-
-	if(State.variables.seePreg != 0) {
-		if(eventSlave.bellyPreg >= 10000) {
-			State.variables.RESSevent.push("hugely pregnant");
-		}
-	}
-
-	if(eventSlave.hormoneBalance >= 50) {
-		if(eventSlave.vagina == -1) {
-			if(eventSlave.balls >= 0) {
-				if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.fetish != "buttslut") {
-							if(eventSlave.speechRules == "permissive") {
-								State.variables.RESSevent.push("hormone dysfunction");
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.vaginaPiercing > 1) {
-		if(eventSlave.nipplesPiercing > 1) {
-			if(eventSlave.clitPiercing > 1) {
-				if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-					if(eventSlave.devotion <= 50) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							State.variables.RESSevent.push("heavy piercing");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.fetishKnown == 1) {
-		if(eventSlave.fetish == "cumslut" || eventSlave.energy > 95) {
-			if(["whore", "serve the public", "work in the brothel", "serve in the club", "work a glory hole"].includes(eventSlave.assignment)) {
-				if(eventSlave.devotion > 20) {
-					if(State.variables.PC.dick != 0) {
-						State.variables.RESSevent.push("cumslut whore");
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.anus == 0) {
-		if(eventSlave.devotion < -20) {
-			if(eventSlave.trust >= -20) {
-				State.variables.RESSevent.push("resistant anal virgin");
-			}
-		}
-	}
-
-	if(eventSlave.relationship == 4) {
-		if(eventSlave.devotion > 20) {
-			if(eventSlave.trust > 20) {
-				State.variables.events.push("RE slave marriage");
-			}
-		}
-	}
-
-	if(State.variables.PC.dick != 0) {
-		if (eventSlave.bellyPreg >= 300000) {
-			State.variables.RESSevent.push("hyperpreg stuck");
-		}
-	}
-
-	if(eventSlave.devotion >= 50) {
-		if(eventSlave.trust <= 20) {
-			if(canWalk(eventSlave)) {
-				State.variables.RESSevent.push("devoted fearful slave");
-			}
-		}
-	}
-
-	if(eventSlave.prestige == 0) {
-		if(eventSlave.devotion > 50) {
-			if(eventSlave.trust > 50) {
-
-				if(eventSlave.entertainSkill >= 100) {
-					if(eventSlave.assignment == "serve the public") {
-						State.variables.events.push("RE legendary entertainer");
-					}
-				}
-
-				if(eventSlave.whoreSkill >= 100) {
-					if(eventSlave.assignment == "whore") {
-						State.variables.events.push("RE legendary whore");
-					}
-				}
-
-				if(eventSlave.lactation > 0) {
-					if((eventSlave.boobs-eventSlave.boobsImplant) > 6000) {
-						if(eventSlave.assignment == "get milked") {
-							State.variables.events.push("RE legendary cow");
-						}
-					}
-				}
-
-				if(eventSlave.bellyPreg >= 14000) {
-					if(eventSlave.broodmother == 0) {
-						if(eventSlave.births > 10) {
-							if(eventSlave.assignment == "whore" || eventSlave.assignment == "serve the public") {
-								if(eventSlave.amp != 1) {
-									State.variables.events.push("RE legendary womb");
-								}
-							}
-						}
-					}
-				}
-
-				if(eventSlave.balls > 6) {
-					if(eventSlave.dick > 6) {
-						if(eventSlave.assignment == "work in the dairy" || eventSlave.assignment == "get milked") {
-							State.variables.events.push("RE legendary balls");
-						}
-					}
-				}
-
-				if(eventSlave.origin == "You sentenced her to enslavement as a punishment for attempted theft of a slave." || eventSlave.origin == "She is an enslaved Daughter of Liberty.") {
-					if(eventSlave.devotion > 95 && eventSlave.assignment == "please you") {
-						State.variables.events.push("RE former abolitionist");
-					}
-				}
-
-			}
-		}
-	}
-
-	/* NICKNAME EVENTS */
-
-	if(State.variables.nicknamesAllowed == 1) {
-		var toSearch = eventSlave.slaveName.toLowerCase();
-		if(toSearch.indexOf("'") == -1) {
-			if(State.variables.week-eventSlave.weekAcquired >= 4) {
-				State.variables.events.push("RE nickname");
-				State.variables.seed = 0;
-			}
-		} /* closes nickname check */
-	} /* closes no nicknames option */
-
-} /* closes mindbreak exempt */
-
-if(eventSlave.fetish == "mindbroken") {
-	if(canWalk(eventSlave)) {
-		State.variables.RESSevent.push("mindbroken morning");
-	}
-	if(eventSlave.kindness != undefined && eventSlave.kindness >= 100) {
-		if((isSlaveAvailable(eventSlave) && canWalk(eventSlave)) || (["please you", "serve in the master suite", "be your Concubine"].includes(eventSlave.assignment))) {
-			if(eventSlave.relationship == -3) {
-				if(jsRandom(1,200) < eventSlave.kindness) {
-					State.variables.RESSevent.push("surprising wakeup");
-				}
-			}
-		}
-	}
-	if(eventSlave.career == "a breeding bull" && eventSlave.assignment == "serve in the master suite" && canPenetrate(eventSlave) && eventSlave.dick >= 5 && eventSlave.amp != 1 && State.variables.PC.vagina == 1 && State.variables.PC.preg == 0 && (eventSlave.muscles > 30 || eventSlave.weight > 30)) {
-		State.variables.RESSevent.push("breeding bull");
-		if(State.variables.PC.fertDrugs > 0) {
-			State.variables.RESSevent.push("breeding bull");
-			State.variables.RESSevent.push("breeding bull");
-		}
-		if(State.variables.PC.forcedFertDrugs > 0) {
-			State.variables.RESSevent.push("breeding bull");
-			State.variables.RESSevent.push("breeding bull");
-		}
-	}
-}
-
-}
-
-/* servants spend a lot of time in the penthouse, so should be eligible for a number (but not all) random events */
-window.generateRandomEventPoolServant = function(eventSlave) {
-
-/* STANDARD EVENTS */
-
-if(eventSlave.fetish != "mindbroken") {
-	if(canWalk(eventSlave)) {
-		if(canTalk(eventSlave)) {
-
-			if(State.variables.RECockmilkInterceptionIDs.length > 1 || (State.variables.RECockmilkInterceptionIDs.length == 1 && eventSlave.ID != State.variables.RECockmilkInterceptionIDs[0])){
-				if(eventSlave.devotion > 20) {
-					if (eventSlave.dietCum > 0 || (eventSlave.fetishKnown && eventSlave.fetish == "cumslut")) {
-						State.variables.RETSevent.push("cockmilk interception");
-					}
-				}
-			}
-
-			if(State.variables.REInterslaveBeggingIDs.length > 1 || (State.variables.REInterslaveBeggingIDs.length == 1 && eventSlave.ID != State.variables.REInterslaveBeggingIDs[0])) {
-				if(State.variables.universalRulesConsent == 1) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.energy > 40) {
-							if(canPenetrate(eventSlave)) {
-								if(canSee(eventSlave)) {
-									if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-										State.variables.RETSevent.push("interslave begging");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.familyTesting == 0) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) {
-						if(eventSlave.relation == "mother") {
-							if(eventSlave.belly < 100000) {
-								if(eventSlave.lactation) {
-									if(eventSlave.nipples != "fuckable") {
-										if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-											State.variables.RETSevent.push("incestuous nursing");
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			} else {
-				if (eventSlave.devotion > 20 && (eventSlave.sexualQuirk == "perverted" || eventSlave.energy > 80) && eventSlave.belly < 100000 && eventSlave.lactation > 0 && eventSlave.nipples != "fuckable" && eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity" && eventSlave.daughters > 0) {
-					State.variables.RETSevent.push("incestuous nursing");
-				}
-			}
-
-
-			if(State.variables.assistant > 0) {
-				if(State.variables.assistantAppearance != "normal") {
-					if(eventSlave.devotion >= -20) {
-						if(eventSlave.devotion <= 50) {
-							if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) {
-								if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-									State.variables.RESSevent.push("PA servant");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.HeadGirl != 0) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.anus != 0 && canDoAnal(eventSlave)) {
-						if(State.variables.HGSeverity >= 0) {
-							State.variables.events.push("RE anal punishment");
-						}
-						State.variables.events.push("RE shower punishment");
-					}
-				}
-			}
-
-			if(State.variables.RETasteTestSubIDs.length > 1) {
-				if(eventSlave.livingRules == "luxurious") {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.energy > 80) {
-							State.variables.RETSevent.push("taste test");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.relationship > 3) {
-				var relationshipSlave = State.variables.slaves.find(function(s) { return s.ID == eventSlave.relationshipTarget; });
-				if(relationshipSlave.devotion > 20) {
-					if(canWalk(relationshipSlave)) {
-						if(canTalk(relationshipSlave)) {
-							if(eventSlave.devotion > 50) {
-								if(eventSlave.trust > 50) {
-									if(relationshipSlave.anus != 0) {
-										if(relationshipSlave.dick != 1) {
-											if(relationshipSlave.dick == 0 || canAchieveErection(relationshipSlave)) {
-												if(relationshipSlave.fetish == "dom" || relationshipSlave.fetish == "sadist") {
-													State.variables.RETSevent.push("top exhaustion");
-												}
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.weatherToday.severity <= 1) {
-				if(eventSlave.trust > 50) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.anus != 0 && canDoAnal(eventSlave)) {
-							if(eventSlave.vagina != 0) {
-								State.variables.RESSevent.push("confident tanning");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 50) {
-				if(eventSlave.trust > 50) {
-					var giver = 0;
-					if(State.variables.HeadGirl == 0) {
-						giver = 1;
-					} else if(State.variables.HeadGirl.ID != eventSlave.ID) {
-						giver = 1;
-					}
-					if(giver == 1) {
-						State.variables.RESSevent.push("a gift");
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 50) {
-				if(eventSlave.anus > 0) {
-					if(eventSlave.vagina != 0) {
-						if(eventSlave.trust > 20) {
-							State.variables.RESSevent.push("devoted lotion");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.assignment == "be a servant" || eventSlave.assignment == "work as a servant") {
-				if(eventSlave.devotion <= 95) {
-					if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) {
-						State.variables.RESSevent.push("cooler lockin");
-					}
-				}
-			}
-
-			if(State.variables.universalRulesConsent == 0) {
-				if(eventSlave.devotion > 50) {
-					if(eventSlave.fetish == "sadist" || eventSlave.fetish == "dom" || eventSlave.energy > 95) {
-						if(State.variables.REShowerForceSubIDs.length > 0) {
-							if(eventSlave.trust <= 75) {
-								State.variables.RETSevent.push("shower force");
-							}
-						}
-						if(eventSlave.anus > 0) {
-							if(State.variables.RESadisticDescriptionSubIDs.length > 0) {
-								State.variables.RETSevent.push("sadistic description");
-							}
-						}
-						if(State.variables.cockFeeder > 0) {
-							if(canPenetrate(eventSlave) || eventSlave.dick == 0) {
-								State.variables.RESSevent.push("kitchen molestation");
-							}
-						}
-					}
-					if(State.variables.REIfYouEnjoyItSubIDs.length > 0) {
-						State.variables.RETSevent.push("if you enjoy it");
-					}
-					if(State.variables.RESimpleAssaultIDs.length > 0) {
-						if(canPenetrate(eventSlave)) {
-							State.variables.RETSevent.push("simple assault");
-						}
-					}
-				}
-			}
-
-			if(State.variables.boobAccessibility != 1 && State.variables.ballsAccessibility != 1 && State.variables.pregAccessibility != 1) {
-				if(eventSlave.boobs > 10000) {
-					if(eventSlave.devotion >= -20) {
-						if(State.variables.slaves.length > 2) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								State.variables.RESSevent.push("huge tits");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.seeAge != 0) {
-				if(eventSlave.devotion > 50) {
-					if(eventSlave.speechRules != "restrictive") {
-						if(eventSlave.birthWeek >= 51) {
-							/* lets give this a much higher chance of appearing */
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-							State.variables.RESSevent.push("birthday");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.slaveName != eventSlave.birthName && eventSlave.birthName !== "") {
-				if(eventSlave.devotion <= 20) {
-					if(eventSlave.trust >= -20) {
-						if(eventSlave.anus > 0 && canDoAnal(eventSlave)) {
-							State.variables.RESSevent.push("not my name");
-						}
-					}
-				}
-			}
-
-			if(State.variables.slaves.length > 2) {
-				if(eventSlave.devotion >= -20) {
-					if(eventSlave.heels == 1) {
-						if(eventSlave.shoes == "heels" || eventSlave.shoes == "boots" || eventSlave.shoes == "extreme heels") {
-							State.variables.RESSevent.push("tendon fall");
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.vagina < 0) {
-						if(canDoAnal(eventSlave)) {
-							if(eventSlave.anus > 0) {
-								if(eventSlave.analSkill <= 30) {
-									State.variables.RESSevent.push("obedient shemale");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 50) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.physicalAge > 37) {
-						if(eventSlave.anus > 0) {
-							if(eventSlave.vagina > 0) {
-								State.variables.RESSevent.push("devoted old");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.actualAge > 35) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							if(State.variables.PC.actualAge < 25) {
-								State.variables.RESSevent.push("young PC age difference");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > 20) {
-					if(eventSlave.actualAge < 22) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							if(State.variables.PC.actualAge >= 50) {
-								State.variables.RESSevent.push("old PC age difference");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.fetish == "humiliation" || eventSlave.energy > 95) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.devotion >= -20) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							if(eventSlave.vagina != 0) {
-								if(eventSlave.anus != 0) {
-									if(eventSlave.fetishKnown == 1) {
-										State.variables.RESSevent.push("fearful humiliation");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.livingRules == "luxurious") {
-				if(eventSlave.devotion <= 75) {
-					if(eventSlave.devotion > 50) {
-						State.variables.RESSevent.push("newly devoted sunrise");
-					}
-				}
-			}
-
-			if(State.variables.PC.dick == 1) {
-				if(State.variables.PC.belly < 5000) {
-					if(["be a servant", "work as a servant"].includes(eventSlave.assignment)) {
-						if(eventSlave.attrXY <= 35 || eventSlave.behavioralFlaw == "hates men" || eventSlave.sexualFlaw == "repressed") {
-							if(eventSlave.devotion >= -20) {
-								if(eventSlave.trust > 20) {
-									State.variables.RESSevent.push("frightening dick");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.spa > 0) {
-				if(eventSlave.boobs > 2000) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.trust > 20) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								State.variables.RESSevent.push("spa boobs");
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.lactation > 0) {
-				if(eventSlave.boobs > 800) {
-					if(eventSlave.nipples != "fuckable") {
-						if(eventSlave.devotion > 20) {
-							if(eventSlave.trust > 20) {
-								State.variables.RESSevent.push("cow milking");
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.arcologies[0].FSSubjugationist != "unset") {
-				if(eventSlave.race != State.variables.arcologies[0].FSSubjugationistRace) {
-					if(State.variables.week-eventSlave.weekAcquired > 1) {
-						if(State.variables.week-eventSlave.weekAcquired < 10) {
-							if(eventSlave.devotion < -20) {
-								if(eventSlave.trust >= -20) {
-									if(eventSlave.health > -20) {
-										if(eventSlave.race == eventSlave.origRace) {
-											if(eventSlave.indentureRestrictions < 1) {
-												State.variables.RESSevent.push("subjugation blues");
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(canTalk(eventSlave)) {
-				if(eventSlave.dietCum > 0) {
-					if(eventSlave.diet == "fattening") {
-						if(eventSlave.trust >= -50) {
-							if(eventSlave.fetish != "cumslut") {
-								if(eventSlave.weight < -30) {
-									if(eventSlave.health > -80) {
-										if(eventSlave.behavioralFlaw != "anorexic") {
-											if(eventSlave.sexualFlaw != "self hating") {
-												if(eventSlave.fetishStrength <= 60 || eventSlave.fetishKnown != 1) {
-													State.variables.RESSevent.push("too thin for cum diet");
-												}
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.health > 90) {
-				if(eventSlave.muscles > 5) {
-					if(eventSlave.weight <= 30) {
-						if(eventSlave.weight >= -30) {
-							if(eventSlave.trust > 50) {
-								if(eventSlave.devotion > 50) {
-									State.variables.RESSevent.push("passing declaration");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(eventSlave.fetish == "sadist") {
-				if(eventSlave.fetishStrength > 20) {
-					if(State.variables.arcadeSlaves > 0) {
-						if(eventSlave.trust >= -20) {
-							if(eventSlave.devotion > 50) {
-								if(eventSlave.belly < 300000) {
-									State.variables.RESSevent.push("arcade sadist");
-								}
-							}
-						}
-					}
-				}
-			}
-
-			if(State.variables.PC.vagina == 1) {
-				if(eventSlave.devotion <= 20) {
-					if((eventSlave.trust >= -20 && eventSlave.behavioralFlaw == "arrogant") || (eventSlave.trust > 20)) {
-						if(eventSlave.muscles > 30) {
-							if(eventSlave.health > 20) {
-								if(eventSlave.energy > 50) {
-									if(canPenetrate(eventSlave)) {
-										if(State.variables.Bodyguard == 0) {
-											State.variables.RESSevent.push("mutinery attempt");
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-
-		} /* closes mute exempt */
-
-		if(eventSlave.devotion > 20) {
-			if(["ball gag", "bit gag", "dildo gag", "massive dildo gag"].includes(eventSlave.collar)) {
-				State.variables.RESSevent.push("gagged slave");
-			}
-		}
-
-		if(eventSlave.trust > 20) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.energy > 40) {
-					if(eventSlave.belly < 300000) {
-						if(State.variables.PC.belly < 5000 && State.variables.PC.ballsImplant < 3 && State.variables.PC.balls < 3) {
-							if(canSee(eventSlave)) {
-								State.variables.RESSevent.push("comfortable seat");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(State.variables.seeAge == 1) {
-			if(eventSlave.actualAge < 18) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.ovaries == 1) {
-						if(eventSlave.pubertyXX == 0) {
-							if(eventSlave.preg == 0) {
-								if(eventSlave.physicalAge >= eventSlave.pubertyAgeXX-.5) {
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-									State.variables.RESSevent.push("first period");
-								}
-							}
-						}
-					}
-					if(canPenetrate(eventSlave)) {
-						if(eventSlave.balls > 0) {
-							if(eventSlave.pubertyXY == 0) {
-								if(eventSlave.physicalAge >= eventSlave.pubertyAgeXY-.5) {
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-									State.variables.RESSevent.push("wet dreams");
-								}
-							}
-						}
-					}
-				}
-			}
-		} /* closes aging exemption */
-
-
-		if(eventSlave.devotion >= -150) {
-			if(eventSlave.devotion <= 50) {
-				State.variables.events.push("RE standard punishment");
-			}
-		}
-
-		if(eventSlave.trust > 20) {
-			if(eventSlave.devotion > 50) {
-				if(State.variables.PC.belly < 5000) {
-					State.variables.RESSevent.push("shower slip");
-				}
-				if(eventSlave.amp < 0) {
-					State.variables.RESSevent.push("plimb help");
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 20) {
-			if(eventSlave.devotion >= -50) {
-				if(eventSlave.trust >= -20) {
-					if(State.variables.suppository != 0) {
-						if(eventSlave.fetish != "buttslut") {
-							State.variables.RESSevent.push("suppository resistance");
-						}
-					}
-					if(State.variables.cockFeeder != 0) {
-						if(eventSlave.fetish != "cumslut") {
-							State.variables.RESSevent.push("cockfeeder resistance");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.relationship <= -2) {
-			if(eventSlave.trust > 50) {
-				if(eventSlave.devotion > 50) {
-					State.variables.RESSevent.push("bonded love");
-				}
-			}
-		}
-
-		if(eventSlave.trust > 20) {
-			if(eventSlave.devotion > 50) {
-				State.variables.RESSevent.push("objectifying visit");
-			}
-		}
-
-		if (canWalk(eventSlave)) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust > -10) {
-					if(eventSlave.ID != State.variables.HeadGirl.ID) {
-						if(eventSlave.ID != State.variables.Concubine.ID) {
-							State.variables.RESSevent.push("refreshment delivery");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.dick > 8) {
-			if(eventSlave.balls > 0) {
-				if(eventSlave.energy > 60) {
-					if(eventSlave.devotion > 50) {
-						if(eventSlave.trust > 50) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								if(eventSlave.belly < 100000) {
-									State.variables.RESSevent.push("dick wringing");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.balls > 0) {
-			if(eventSlave.scrotum > 0) {
-				if(eventSlave.dickAccessory == "chastity" || eventSlave.dickAccessory == "combined chastity") {
-					if(eventSlave.devotion <= 95) {
-						if(eventSlave.energy > 50) {
-							if(eventSlave.energy < 95) {
-								if(eventSlave.devotion >= -20 || eventSlave.trust < -20) {
-									State.variables.RESSevent.push("cage relief");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(State.variables.PC.dick > 0) {
-			if(State.variables.PC.boobs > 0) {
-				if(canSee(eventSlave)) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.devotion >= -20) {
-							if(((eventSlave.attrXY <= 35) && (eventSlave.attrXX > 65)) || ((eventSlave.attrXX <= 35) && (eventSlave.attrXY > 65))) {
-								State.variables.RESSevent.push("dickgirl PC");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.energy > 40) {
-			if(canSee(eventSlave)) {
-				if(eventSlave.trust >= -50) {
-					if(eventSlave.devotion > 0) {
-						if(eventSlave.devotion <= 50) {
-							if(((eventSlave.attrXX >= 50) && (State.variables.PC.boobs == 1 || State.variables.PC.title == 0) && (State.variables.PC.belly < 5000))
-								|| ((eventSlave.attrXY >= 50) && (State.variables.PC.dick == 1) && (State.variables.PC.boobs == 0) && (State.variables.PC.belly < 1500))
-								|| (eventSlave.fetish == "pregnancy" && State.variables.PC.belly >= 5000)
-								|| (eventSlave.fetish == "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) {
-								State.variables.RESSevent.push("hot PC");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.trust <= 20) {
-			if(eventSlave.trust >= -75) {
-				if(eventSlave.devotion <= 30) {
-					if(eventSlave.devotion >= -20) {
-						State.variables.RESSevent.push("like me");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion < -20) {
-			if(eventSlave.trust >= -20) {
-				if(eventSlave.clothes == "uncomfortable straps") {
-					State.variables.RESSevent.push("bondage gear");
-				}
-			}
-		}
-
-		if(eventSlave.labia > 1 && eventSlave.vagina >= 0) {
-			if(eventSlave.muscles > 5 || eventSlave.diet == "muscle building") {
-				if(eventSlave.belly < 10000) {
-					if(eventSlave.devotion > 20) {
-						if(eventSlave.trust > 20) {
-							State.variables.RESSevent.push("inconvenient labia");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-			if(eventSlave.addict > 20) {
-				if(eventSlave.aphrodisiacs > 0 || eventSlave.inflationType == "aphrodisiac") {
-					State.variables.RESSevent.push("obedient addict");
-				}
-			}
-		}
-
-		if(State.variables.seeExtreme == 1) {
-			if(eventSlave.devotion < -50) {
-				if(eventSlave.trust >= -50) {
-					if(eventSlave.assignment != "stay confined") {
-						if(eventSlave.heels != 1) {
-							State.variables.RESSevent.push("escapee");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 50) {
-			if(eventSlave.trust >= -50) {
-				if(eventSlave.behavioralFlaw == "gluttonous") {
-					if(eventSlave.diet == "restricted") {
-						State.variables.RESSevent.push("diet");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion <= 20) {
-			if(eventSlave.devotion >= -50) {
-				State.variables.RESSevent.push("resistant shower");
-			}
-		}
-
-		if(eventSlave.speechRules != "restrictive") {
-			if(eventSlave.devotion >= -20) {
-				if(eventSlave.trust >= -20) {
-					if(eventSlave.energy > 75) {
-						if(eventSlave.fetish != "buttslut") {
-							if(eventSlave.vagina != 0 || eventSlave.anus != 0) {
-								State.variables.RESSevent.push("night visit");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.releaseRules == "restrictive") {
-			if(eventSlave.need) {
-				if(eventSlave.devotion <= 95) {
-					if(eventSlave.trust >= -20) {
-						if((eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") || (eventSlave.dick == 0)) {
-							State.variables.RESSevent.push("forbidden masturbation");
-						}
-					}
-				}
-				if(eventSlave.devotion >= -20) {
-					if(eventSlave.trust >= -50) {
-						State.variables.RESSevent.push("desperately horny");
-					}
-				}
-			}
-		}
-
-		if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-			if(canPenetrate(eventSlave)) {
-				State.variables.RESSevent.push("slave dick on slave");
-			}
-		}
-
-		if(eventSlave.muscles > 30) {
-			if(eventSlave.weight <= 10) {
-				if(eventSlave.anus != 0 || State.variables.PC.dick == 0) {
-					if(eventSlave.vagina != 0 || State.variables.PC.dick == 0) {
-						State.variables.RESSevent.push("muscles");
-					}
-				}
-			}
-		}
-
-		if(eventSlave.devotion >= -20) {
-			if(eventSlave.lactation > 1) {
-				if(canDoVaginal(eventSlave) || canDoAnal(eventSlave)) {
-					State.variables.RESSevent.push("milkgasm");
-				}
-			}
-		}
-
-		if(eventSlave.waist < -95) {
-			if(eventSlave.devotion > 20) {
-				if(eventSlave.trust >= -20) {
-					if(eventSlave.belly < 30000) {
-						if(eventSlave.weight <= 95) {
-							State.variables.RESSevent.push("devoted waist");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.dick > 0) {
-			if(eventSlave.balls == 0) {
-				if(eventSlave.ovaries == 0) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.trust < -50) {
-							if(eventSlave.anus > 0) {
-								if(canDoAnal(eventSlave)) {
-									State.variables.RESSevent.push("resistant gelding");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(isFertile(eventSlave)) {
-			if(eventSlave.devotion > 50) {
-				if(State.variables.PC.dick != 0) {
-					if(eventSlave.fetish == "pregnancy" || eventSlave.energy > 95) {
-						if(eventSlave.eggType == "human") {
-							if(eventSlave.fetishKnown == 1) {
-								if(eventSlave.vagina != 0) {
-									if(eventSlave.anus > 0) {
-										State.variables.RESSevent.push("impregnation please");
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(["large plug", "long, large plug", "huge plug", "long, huge plug"].includes(eventSlave.buttplug)) {
-			if(eventSlave.assignment != "stay confined" && isSlaveAvailable(eventSlave)) {
-				if(eventSlave.devotion <= 20) {
-					if(eventSlave.trust >= -50) {
-						if(eventSlave.anus < 3) {
-							State.variables.RESSevent.push("plug disobedience");
-						}
-					}
-				}
-			}
-		}
-
-	} /* closes amp/crawling exempt */
-
-	if(canTalk(eventSlave)) {
-
-		if(eventSlave.speechRules != "restrictive") {
-			if(eventSlave.boobsImplant > 400) {
-				if(eventSlave.lipsImplant >= 30) {
-					if(eventSlave.buttImplant > 3) {
-						if(eventSlave.boobs < 9000 || eventSlave.butt < 8) {
-							State.variables.RESSevent.push("surgery addict");
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.speechRules != "restrictive") {
-			if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount > 900) {
-				if(eventSlave.oralCount+eventSlave.vaginalCount+eventSlave.analCount < 1100) {
-					if(eventSlave.vagina != 0) {
-						if(eventSlave.anus > 0) {
-							if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-								State.variables.RESSevent.push("millenary");
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(State.variables.expansionRequestsAllowed > 0) {
-			if(eventSlave.drugs == "no drugs") {
-				if(eventSlave.speechRules == "permissive") {
-					if(eventSlave.health > 20) {
-						if(eventSlave.devotion >= -20) {
-							if(eventSlave.trust > 20) {
-								if(State.variables.arcologies[0].FSSlimnessEnthusiast == "unset") {
-									State.variables.RESSevent.push("injections please");
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if(eventSlave.behavioralFlaw == "bitchy") {
-			if(canSee(eventSlave)) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.trust >= -20) {
-						State.variables.RESSevent.push("obedient bitchy");
-					}
-				}
-			}
-		}
-
-	} /* closes mute exempt */
-
-	if(State.variables.cockFeeder == 0) {
-		if(eventSlave.intelligence+eventSlave.intelligenceImplant < -50) {
-			if(eventSlave.devotion <= 50) {
-				if(eventSlave.devotion >= -20 || eventSlave.trust < -20) {
-					State.variables.RESSevent.push("obedient idiot");
-				}
-			}
-		}
-	}
-
-	if(State.variables.assistant > 1) {
-		if(eventSlave.fetishKnown == 1) {
-			if(eventSlave.energy > 95) {
-				if(eventSlave.devotion > 20) {
-					if(eventSlave.releaseRules == "permissive" || eventSlave.releaseRules == "masturbation") {
-						State.variables.RESSevent.push("nympho with assistant");
-					}
-				}
-			}
-		}
-	}
-
-
-	if(eventSlave.minorInjury == "sore ass") {
-		if(eventSlave.devotion <= 50) {
-			State.variables.RESSevent.push("sore ass");
-		}
-	}
-
-	if(eventSlave.sexualFlaw == "hates oral") {
-		if(State.variables.PC.dick != 0) {
-			if(eventSlave.devotion <= 50) {
-				State.variables.RESSevent.push("hates oral");
-			}
-		}
-	}
-
-	if(eventSlave.vagina == 0) {
-		if(eventSlave.devotion > 50) {
-			if(eventSlave.trust > 20) {
-				if(eventSlave.speechRules != "restrictive") {
-					State.variables.RESSevent.push("devoted virgin");
-				}
-			}
-		}
-	}
-
-	if(eventSlave.anus == 0) {
-		if(eventSlave.devotion > 50) {
-			if(eventSlave.trust > 20) {
-				if(eventSlave.speechRules != "restrictive") {
-					State.variables.RESSevent.push("devoted anal virgin");
-				}
-			}
-		}
-	}
-
-	if(eventSlave.devotion <= 50) {
-		if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") {
-			State.variables.RESSevent.push("scrubbing");
-		}
-	}
-
-	if(eventSlave.devotion <= 20) {
-		if(eventSlave.assignment == "work as a servant" || eventSlave.assignment == "be a servant") {
-			if(eventSlave.clothes == "a slutty maid outfit" || eventSlave.clothes == "a nice maid outfit") {
-				State.variables.RESSevent.push("servant maid");
-			}
-		}
-	}
-
-	if(eventSlave.aphrodisiacs > 1 || eventSlave.inflationType == "aphrodisiac") {
-		if(eventSlave.speechRules == "restrictive" && eventSlave.releaseRules !== "permissive") {
-			if(eventSlave.amp != 1) {
-				State.variables.RESSevent.push("extreme aphrodisiacs");
-			}
-		}
-	}
-
-	if (eventSlave.releaseRules != "restrictive" && eventSlave.releaseRules != "masturbation" && eventSlave.releaseRules != "chastity") {
-		if(eventSlave.clit > 2) {
-			State.variables.RESSevent.push("slave clit on slave");
-		}
-	}
-
-	if(eventSlave.releaseRules != "restrictive") {
-		if(eventSlave.dick > 4) {
-			if(eventSlave.amp != 1){
-				if(canAchieveErection(eventSlave)) {
-					if(eventSlave.belly < 10000) {
-						if(eventSlave.dickAccessory != "chastity" && eventSlave.dickAccessory != "combined chastity") {
-							State.variables.RESSevent.push("slave dick huge");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.heels == 1) {
-		if(eventSlave.shoes == "heels" || eventSlave.shoes == "extreme heels") {
-			if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-				State.variables.RESSevent.push("heels");
-			}
-		}
-	}
-
-	if(eventSlave.releaseRules != "restrictive") {
-		if(eventSlave.belly < 300000) {
-			if(eventSlave.anus > 2) {
-				if(eventSlave.fetish == "buttslut" || eventSlave.energy > 95) {
-					if(eventSlave.fetish != "none") {
-						if(canDoAnal(eventSlave)) {
-							State.variables.RESSevent.push("loose buttslut");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.boobs < 500) {
-		if(eventSlave.butt < 3) {
-			if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-				if(eventSlave.devotion <= 50) {
-					if(eventSlave.devotion > 20 && eventSlave.trust >= -20) {
-						if(eventSlave.weight <= 10) {
-							if(eventSlave.muscles <= 30) {
-								State.variables.RESSevent.push("obedient girlish");
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.boobs > 1200) {
-		if(eventSlave.areolaeShape != "circle") {
-			if(eventSlave.devotion > 50) {
-				State.variables.RESSevent.push("shaped areolae");
-			}
-		}
-	}
-
-	if(eventSlave.bellyPreg >= 10000) {
-		State.variables.RESSevent.push("hugely pregnant");
-	}
-
-	if(eventSlave.hormoneBalance >= 50) {
-		if(eventSlave.vagina == -1) {
-			if(eventSlave.balls >= 0) {
-				if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-					if(eventSlave.devotion <= 50) {
-						if(eventSlave.fetish != "buttslut") {
-							if(eventSlave.speechRules == "permissive") {
-								State.variables.RESSevent.push("hormone dysfunction");
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.vaginaPiercing > 1) {
-		if(eventSlave.nipplesPiercing > 1) {
-			if(eventSlave.clitPiercing > 1) {
-				if(eventSlave.devotion > 20 || eventSlave.trust < -20) {
-					if(eventSlave.devotion <= 50) {
-						if(canDoAnal(eventSlave) || canDoVaginal(eventSlave)) {
-							State.variables.RESSevent.push("heavy piercing");
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if(eventSlave.anus == 0) {
-		if(eventSlave.devotion < -20) {
-			if(eventSlave.trust >= -20) {
-				State.variables.RESSevent.push("resistant anal virgin");
-			}
-		}
-	}
-
-	if(State.variables.PC.dick != 0) {
-		if (eventSlave.bellyPreg >= 300000) {
-			State.variables.RESSevent.push("hyperpreg stuck");
-		}
-	}
-
-	if(eventSlave.devotion >= 50) {
-		if(eventSlave.trust <= 20) {
-			if(canWalk(eventSlave)) {
-				State.variables.RESSevent.push("devoted fearful slave");
-			}
-		}
-	}
-
-	if(eventSlave.relationship == 4) {
-		if(eventSlave.devotion > 20) {
-			if(eventSlave.trust > 20) {
-				State.variables.events.push("RE slave marriage");
-			}
-		}
-	}
-
-	/* NICKNAME EVENTS */
-
-	if(State.variables.nicknamesAllowed == 1) {
-		var toSearch = eventSlave.slaveName.toLowerCase();
-		if(toSearch.indexOf("'") == -1) {
-			if(State.variables.week-eventSlave.weekAcquired >= 4) {
-				State.variables.events.push("RE nickname");
-				State.variables.seed = 0;
-			}
-		} /* closes nickname check */
-	} /* closes no nicknames option */
-
-} /* closes mindbreak exempt */
-
-if(eventSlave.fetish == "mindbroken") {
-	if(canWalk(eventSlave)) {
-		State.variables.RESSevent.push("mindbroken morning");
-	}
-	if(eventSlave.kindness != undefined && eventSlave.kindness >= 100) {
-		if((isSlaveAvailable(eventSlave) && canWalk(eventSlave)) || (["please you", "serve in the master suite", "be your Concubine"].includes(eventSlave.assignment))) {
-			if(eventSlave.relationship == -3) {
-				if(jsRandom(1,200) < eventSlave.kindness) {
-					State.variables.RESSevent.push("surprising wakeup");
-				}
-			}
-		}
-	}
-}
-
-}
-
-window.populateEventArray = function(RESS = State.variables.RESSevent.length, RESSTR = State.variables.RESSTRevent.length, RETS = State.variables.RETSevent.length, RECI = State.variables.RECIevent.length) {
-
-	/* EVENT RANDOMIZATION */
-	var events = State.variables.events;
-
-	for(var i = 0; i < RESS; i++) {
-		events.push("RESS");
-	}
-	for(var i = 0; i < RESSTR; i++) {
-		events.push("RESSTR");
-	}
-	for(var i = 0; i < RETS; i++) {
-		events.push("RETS");
-	}
-	for(var i = 0; i < RECI; i++) {
-		events.push("RECI");
-	}
-	if(events.length == 0) {
-		events.push("RE no event");
-	}
-
-	return events;
-}
-
-/*:: AssayJS [script]*/
-
-window.isSlim = function(slave) {
-	let slim = false;
-	const ArcologyZero = State.variables.arcologies[0];
-
-	if (ArcologyZero.FSSlimnessEnthusiastLaw === 1) {
-		return (slimPass(slave) === 1);
-	} else {
-		if ((slave.boobs < 500) && (slave.butt < 3)) {
-			if ((slave.muscles <= 30) && (ArcologyZero.FSPhysicalIdealist === "unset") && (slave.weight <= 10) && (ArcologyZero.FSHedonisticDecadence === "unset")) {
-				slim = true;
-			} else if (ArcologyZero.FSPhysicalIdealist !== "unset") {
-			if ((ArcologyZero.FSPhysicalIdealistStrongFat === 1) && (slave.weight <= 30)) {
-					slim = true;
-			}
-		} else if ((ArcologyZero.FSHedonisticDecadence !== "unset") && (slave.weight <= 30)) {
-			if (ArcologyZero.FSHedonisticDecadenceStrongFat === 1) {
-					slim = true;
-				} else if (slave.muscles <= 30) {
-					slim = true;
-				}
-			}
-		}
-	}
-
-	return slim;
-};
-
-window.isStacked = function(slave) {
-	return (slave.butt > 4) && (slave.boobs > 800);
-};
-
-window.isModded = function(slave) {
-	let tatScore = TatScore(slave);
-	let piercingScore = PiercingScore(slave);
-	let modScore = piercingScore+tatScore;
-
-	return ((modScore > 15) || (piercingScore > 8 && tatScore > 5));
-};
-
-window.isUnmodded = function(slave) {
-	return (!isModded(slave) && (slave.corsetPiercing === 0) && (PiercingScore(slave) < 3) && (TatScore(slave) < 2));
-};
-
-window.isXY = function(slave) {
-	return (slave.dick > 0);
-};
-
-window.isYoung = function(slave) {
-	return (slave.visualAge < 30);
-};
-
-window.isPreg = function(slave) {
-	return ((slave.bellyPreg >= 5000) || (slave.bellyImplant >= 5000));
-};
-
-window.isNotPreg = function(slave) {
-	return (!isPreg(slave) && (slave.belly < 100) && (slave.weight < 30) && !setup.fakeBellies.includes(slave.bellyAccessory));
-};
-
-window.isPure = function(slave) {
-	return ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.waist >= -95) && (slave.lipsImplant === 0) && (slave.faceImplant < 30) && (slave.bellyImplant === -1) && (Math.abs(slave.shouldersImplant) < 2) && (Math.abs(slave.hipsImplant) < 2));
-};
-
-window.modScore = function modScore(slave) {
-	const V = State.variables;
-	V.piercingScore = PiercingScore(slave);
-	V.tatScore = TatScore(slave);
-	V.modScore = V.tatScore + V.piercingScore;
-};
-
-window.PiercingScore = function(slave) {
-	let piercingScore = 0;
-
-	if (slave.earPiercing > 0) {
-		piercingScore += slave.earPiercing*0.75-0.5;
-	}
-	if (slave.nosePiercing > 0) {
-		piercingScore += slave.nosePiercing*0.75-0.5;
-	}
-	if (slave.eyebrowPiercing > 0) {
-		piercingScore += slave.eyebrowPiercing*0.75-0.5;
-	}
-	if (slave.navelPiercing > 0) {
-		piercingScore += slave.navelPiercing*0.75-0.5;
-	}
-	if (slave.corsetPiercing > 0) {
-		piercingScore += slave.corsetPiercing*0.75+0.5;
-	}
-	if (slave.nipplesPiercing > 0) {
-		piercingScore += slave.nipplesPiercing*0.75-0.25;
-	}
-	if (slave.areolaePiercing > 0) {
-		piercingScore += slave.areolaePiercing*0.75+0.5;
-	}
-	if (slave.lipsPiercing > 0) {
-		piercingScore += slave.lipsPiercing*0.75-0.25;
-	}
-	if (slave.tonguePiercing > 0 ) {
-		piercingScore += slave.tonguePiercing*0.75-0.25;
-	}
-	if (slave.clitPiercing === 3) {
-		piercingScore += 1.25; /* smart piercing */
-	} else if (slave.clitPiercing > 0) {
-		piercingScore += slave.clitPiercing*0.75-0.25;
-	}
-	if (slave.vaginaPiercing > 0) {
-		piercingScore += slave.vaginaPiercing*0.75-0.25;
-	}
-	if (slave.dickPiercing > 0) {
-		piercingScore += slave.dickPiercing*0.75-0.25;
-	}
-	if (slave.anusPiercing > 0) {
-		piercingScore += slave.anusPiercing*0.75-0.25;
-	}
-	return piercingScore;
-};
-
-window.TatScore = function(slave) {
-	let tatScore = 0;
-
-	if (slave.boobsTat !== 0) {
-		tatScore += 1.25;
-	}
-	if (slave.buttTat !== 0) {
-		tatScore += 1.25;
-	}
-	if (slave.lipsTat !== 0) {
-		tatScore += 1.25;
-	}
-	if (slave.shouldersTat !== 0) {
-		tatScore += 1;
-	}
-	if (slave.backTat !== 0) {
-		tatScore += 1.25;
-	}
-	if (slave.armsTat !== 0) {
-		tatScore += 1;
-	}
-	if (slave.legsTat !== 0) {
-		tatScore += 1;
-	}
-	if (slave.stampTat !== 0) {
-		tatScore += 1;
-	}
-	if (slave.vaginaTat !== 0) {
-		tatScore += 1;
-	}
-	if (slave.dickTat !== 0) {
-		tatScore += 1;
-	}
-	if (slave.bellyTat !== 0) {
-		if (((slave.preg > slave.pregData.normalBirth/1.33) && (slave.pregType >= 20)) || (slave.belly >= 300000)) {
-			tatScore += 0.75;
-		} else if (((slave.preg > slave.pregData.normalBirth/2) && (slave.pregType >= 20)) || ((slave.preg > slave.pregData.normalBirth/1.33) && (slave.pregType >= 10)) || (slave.belly >= 150000)) {
-			tatScore += 1;
-		} else if ((slave.belly >= 10000) || (slave.bellyImplant >= 8000)) {
-			tatScore += 1;
-		} else if (((slave.preg >= slave.pregData.normalBirth/4) && (slave.pregType >= 20)) || ((slave.preg > slave.pregData.normalBirth/4) && (slave.pregType >= 10)) || (slave.belly >= 5000)) {
-			tatScore += 0.5;
-		} else if (slave.belly >= 1500) {
-			tatScore += 0.25;
-		} else {
-			tatScore += 0.1;
-		}
-	}
-	if (slave.anusTat === "bleached") {
-		tatScore += 0.5;
-	} else if (slave.anusTat !== 0) {
-		tatScore += 1.25;
-	}
-
-	return tatScore;
-};
-
-window.slimPass = function(slave) {
-	let slimPass = 0;
-	let ArcologyZero = State.variables.arcologies[0];
-
-	if (ArcologyZero.FSSlimnessEnthusiastLaw === 1) {
-		if ((slave.boobs < 300) && (slave.butt <= 1) && (slave.waist <= 10)) {
-			if ((ArcologyZero.FSPhysicalIdealist === "unset") && (ArcologyZero.FSHedonisticDecadenceStrongFat === 0) && (slave.muscles > 30)) { /*muscle check*/
-				slimPass = 0;
-			} else if ((ArcologyZero.FSHedonisticDecadence !== "unset") || (ArcologyZero.FSPhysicalIdealistStrongFat === 1)) { /*weight check*/
-				if (slave.weight > 30) {
-					slimPass = 0;
-				}
-			} else if (slave.weight > 10) {
-				slimPass = 0;
-			} else {
-				slimPass = 1;
-			}
-		}
-	}
-
-	return slimPass;
-};
-
-window.sameAssignmentP = function sameAssignmentP(A, B) {
-	return A.assignment === B.assignment;
-};
-
-window.haveRelationP = function haveRelationP(slave, target) {
-	return slave.relationTarget === target.ID;
-};
-
-window.haveRelationshipP = function haveRelationshipP(slave, target) {
-	return slave.relationshipTarget === target.ID;
-};
-
-window.isRivalP = function isRivalP(slave, target) {
-	return slave.rivalryTarget === target.ID;
-};
-
-window.supremeRaceP = function supremeRaceP(slave) {
-	return State.variables.arcologies[0].FSSupremacistRace === slave.race;
-};
-
-window.inferiorRaceP = function inferiorRaceP(slave) {
-	return State.variables.arcologies[0].FSSubjugationistRace === slave.race;
-};
-
-window.isLeaderP = function isLeaderP(slave) {
-	const V = State.variables;
-	const leaders = [V.HeadGirl, V.Bodyguard, V.Recruiter, V.Concubine, V.Nurse, V.Attendant, V.Matron, V.Madam, V.DJ, V.Milkmaid, V. Farmer, V.Stewardess, V.Schoolteacher, V.Wardeness];
-	return leaders.some(leader => leader.ID && leader.ID === slave.ID);
-};
-
-// helper function returning PC's title
-window.properTitle = function properTitle() {
-	const PC = State.variables.PC;
-	if (PC.customTitle) return PC.customTitle;
-	else if (PC.title !== 0) return "Sir";
-	else return "Ma'am";
-};
-
-// helper function returning slave's title for PC in situations where WrittenMaster() is inappropriate
-window.properMaster = function properMaster() {
-	const PC = State.variables.PC;
-	if (PC.customTitle) return PC.customTitle;
-	else if (PC.title !== 0) return "Master";
-	else return "Mistress";
-};
-
-window.newSlave = function newSlave(slave) {
-	const V = State.variables;
-
-	if (slave.override_Eye_Color != 1) {
-		switch (slave.eyeColor) {
-			case "blind blue":
-				slave.origEye = "deep blue";
-				break;
-			case "milky white":
-			case "implant":
-				slave.origEye = jsEither(["blue", "green", "brown", "hazel", "light blue", "light green", "dark green", "dark blue"]);
-				break;
-			default:
-				slave.origEye = slave.eyeColor;
-				break;
-		}
-	}
-
-	if (slave.override_Race != 1) {
-		slave.origRace = slave.race;
-	}
-	if (slave.override_H_Color != 1) {
-		slave.origHColor = slave.hColor;
-	}
-	if (slave.override_Arm_H_Color != 1) {
-		slave.underArmHColor = slave.hColor;
-	}
-	if (slave.override_Pubic_H_Color != 1) {
-		slave.pubicHColor = slave.hColor;
-	}
-	if (slave.override_Brow_H_Color != 1) {
-		slave.eyebrowHColor = slave.hColor;
-	}
-	if (slave.override_Skin != 1) {
-		slave.origSkin = slave.skin;
-	}
-
-	slave.override_Race = 0;
-	slave.override_H_Color = 0;
-	slave.override_Arm_H_Color = 0;
-	slave.override_Pubic_H_Color = 0;
-	slave.override_Brow_H_Color = 0;
-	slave.override_Skin = 0;
-	slave.override_Eye_Color = 0;
-
-	if (V.surnamesForbidden === 1) {
-		slave.slaveSurname = 0;
-	}
-
-	if (slave.preg > 0) {
-		slave.pregWeek = slave.preg;
-	} else {
-		slave.pregWeek = 0;
-	}
-
-	if (slave.clone !== 0) {
-		slave.canRecruit = 0;
-	}
-
-	if (V.familyTesting === 1) {
-		slave.sisters = 0;
-		slave.daughters = 0;
-		if (slave.mother === -1 || slave.father === -1) {
-			V.PC.daughters += 1;
-		}
-		if (areSisters(V.PC, slave) > 0) {
-			V.PC.sisters += 1;
-		}
-		for (let k = 0; k < V.slaves.length; k++) {
-			if (V.slaves[k].mother === slave.ID || V.slaves[k].father === slave.ID) {
-				slave.daughters++;
-			}
-			if (slave.mother === V.slaves[k].ID || slave.father === V.slaves[k].ID) {
-				V.slaves[k].daughters++;
-			}
-			if (areSisters(V.slaves[k], slave) > 0) {
-				slave.sisters++;
-				V.slaves[k].sisters++;
-			}
-		}
-	}
-
-	if (slave.dick > 0 &&
-		slave.balls > 0 &&
-		slave.devotion <= 50 &&
-		(slave.fetish !== "buttslut" || slave.fetishKnown !== 1) &&
-		slave.sexualFlaw !== "hates women") {
-		V.REFeminizationCheckinIDs.push(slave.ID);
-	}
-	if (slave.actualAge > 35 && slave.face < 40 && slave.analSkill <= 30) {
-		V.REMILFCheckinIDs.push(slave.ID);
-	}
-	if (slave.attrXY <= 60 && slave.attrXX > 60 ) {
-		V.REOrientationCheckinIDs.push(slave.ID);
-	}
-	if (slave.face < -10) {
-		V.REUglyCheckinIDs.push(slave.ID);
-	}
-	if (slave.anus < 2) {
-		V.REButtholeCheckinIDs.push(slave.ID);
-	}
-	if (slave.boobs < 800) {
-		V.REReductionCheckinIDs.push(slave.ID);
-	}
-
-	generatePronouns(slave);
-	SetBellySize(slave);
-	addSlave(slave);
-
-	if (slave.origin !== "She was your slave, but you freed her, which she repaid by participating in a coup attempt against you. It failed, and she is again your chattel." && slave.ID !== V.boomerangSlave.ID) {
-		V.genePool.push(slave);
-	} else {
-		if (V.genePool.findIndex(function(s) { return s.ID === slave.ID; }) === -1) {
-			V.genePool.push(slave);
-		}
-	}
-
-	/* add to facilities array if needed */
-	if (slave.assignment !== "rest") {
-		assignJob(slave, slave.assignment);
-	}
-
-	/** do not run the Rules Assistant before adding the new slave to the slaves list! **/
-	if (V.ui !== "start" && V.universalRulesNewSlavesRA === 1 && V.rulesAssistantAuto !== 0) {
-		DefaultRules(slave);
-	}
-};
-
-window.newChild = function newChild(child) {
-	const V = State.variables;
-
-	child.age = 0; /* not sure if this is the correct way to do this or if more is required */
-	child.birthWeek = 0; /* Child comes out at 0,0. That's all that's needed. The specifics are defined later.*/
-
-	if (child.override_Eye_Color != 1) {
-		switch (child.eyeColor) {
-			case "blind blue":
-				child.origEye = "deep blue";
-				break;
-			case "milky white":
-			case "implant":
-				child.origEye = jsEither(["blue", "green", "brown", "hazel", "light blue", "light green", "dark green", "dark blue"]);
-				break;
-			default:
-				child.origEye = child.eyeColor;
-				break;
-		}
-	}
-
-	if (child.override_Race != 1) {
-		child.origRace = child.race;
-	}
-	if (child.override_H_Color != 1) {
-		child.origHColor = child.hColor;
-	}
-	if (child.override_Arm_H_Color != 1) {
-		child.underArmHColor = child.hColor;
-	}
-	if (child.override_Pubic_H_Color != 1) {
-		child.pubicHColor = child.hColor;
-	}
-	if (child.override_Brow_H_Color != 1) {
-		child.eyebrowHColor = child.hColor;
-	}
-	if (child.override_Skin != 1) {
-		child.origSkin = child.skin;
-	}
-
-	child.override_Race = 0;
-	child.override_H_Color = 0;
-	child.override_Arm_H_Color = 0;
-	child.override_Pubic_H_Color = 0;
-	child.override_Brow_H_Color = 0;
-	child.override_Skin = 0;
-	child.override_Eye_Color = 0;
-
-	if (V.surnamesForbidden === 1) {
-		child.childSurname = 0;
-	}
-
-	if (child.clone !== 0) {
-		child.canRecruit = 0;
-	}
-
-	if (child.fuckdoll > 0) {
-		child.pronoun = "it";
-		child.possessivePronoun = "its";
-		child.possessive = "its";
-		child.object = "it";
-		child.objectReflexive = "itself";
-		child.noun = "toy";
-	} else if (child.dick > 0 && child.vagina === -1 && V.diversePronouns === 1) {
-		child.pronoun = "he";
-		child.possessivePronoun = "his";
-		child.possessive = "his";
-		child.object = "him";
-		child.objectReflexive = "himself";
-		child.noun = "boy";
-	} else {
-		child.pronoun = "she";
-		child.possessivePronoun = "hers";
-		child.possessive = "her";
-		child.object = "her";
-		child.objectReflexive = "herself";
-		child.noun = "girl";
-	}
-	State.variables.cribs.push(child);
-	State.variables.nurseryBabies++;
-};
-
-window.addSlave = function addSlave(slave) {
-	State.variables.slaves.push(slave);
-	State.variables.slaveIndices[slave.ID] = State.variables.slaves.length - 1;
-};
-window.removeSlave = function removeSlave(index) {
-	const ret = State.variables.slaves.deleteAt(index);
-	State.variables.slaveIndices = slaves2indices();
-	return ret;
-};
-window.removeChild = function removeChild(index) {
-	const ret = State.variables.cribs.deleteAt(index);
-	return ret;
-};
-window.slaves2indices = function slaves2indices() {
-	const obj = {};
-	State.variables.slaves.forEach((slave, i) => obj[slave.ID] = i);
-	return obj;
-};
-window.getSlave = function getSlave(ID) {
-	const index = State.variables.slaveIndices[ID];
-	if (index === undefined) return undefined;
-	else return State.variables.slaves[index];
-};
-window.getChild = function getChild(ID) {
-	return V.cribs.find(function(s) { return s.ID == ID; });
-};
-window.getPronouns = function getPronouns(slave) {
-	return {
-		pronoun: slave.pronoun,
-		possessivePronoun: slave.possessivePronoun,
-		possessive: slave.possessive,
-		object: slave.object,
-		objectReflexive: slave.objectReflexive,
-		noun: slave.noun };
-};
-
-window.SlavePronouns = function SlavePronouns(slave) {
-	const V = State.variables;
-	const pronouns = getPronouns(slave);
-	V.pronoun = pronouns.pronoun;
-	V.pronounCap = capFirstChar(pronouns.pronoun);
-	V.possessive = pronouns.possessive;
-	V.possessiveCap = capFirstChar(pronouns.possessive);
-	V.object = pronouns.object;
-};
-
-window.WrittenMaster = function WrittenMaster(slave) {
-	const V = State.variables;
-	if (slave !== undefined)
-		Enunciate(slave);
-	else if (V.titleEnunciate === undefined)
-		Enunciate(V.activeSlave);
-	return V.writtenTitle;
-};
-
-window.Enunciate = function Enunciate(slave) {
-	const V = State.variables;
-	if (SlaveStatsChecker.checkForLisp(slave)) {
-		if (V.PC.customTitleLisp !== undefined)
-			V.titleEnunciate = V.PC.customTitleLisp;
-		else if (V.PC.title !== 0)
-			V.titleEnunciate = "Mathter";
-		else
-			V.titleEnunciate = "Mithtreth";
-		if (V.allowFamilyTitles === 1) {
-			if (slave.father === -1) {
-				if (slave.actualAge < 4 && slave.physicalAge < 4)
-					V.titleEnunciate = "Dadda";
-				else if (slave.actualAge < 9)
-					V.titleEnunciate = "Daddy";
-				else
-					V.titleEnunciate = "Dad";
-			} else if (slave.mother === -1) {
-				if (slave.actualAge < 4 && slave.physicalAge < 4)
-					V.titleEnunciate = "Mama";
-				else if (slave.actualAge < 9)
-					V.titleEnunciate = "Mommy";
-				else
-					V.titleEnunciate = "Mom";
-			} else if (V.PC.mother === slave.ID || V.PC.father === slave.ID) {
-				if (V.PC.title === 1)
-					V.titleEnunciate = "Thon";
-				else if (V.PC.title === 0)
-					V.titleEnunciate = "Daughter";
-			} else if (areSisters(slave, V.PC) > 0) {
-				if (V.PC.title === 1) {
-					if (slave.actualAge < 18)
-						V.titleEnunciate = "Bro";
-					else
-						V.titleEnunciate = "Brother";
-				} else if (V.PC.title === 0) {
-					if (slave.actualAge < 18)
-						V.titleEnunciate = "Thith";
-					else
-						V.titleEnunciate = "Thithter";
-				}
-			}
-		}
-		if (slave.customTitleLisp && slave.customTitleLisp !== "")
-			V.titleEnunciate = slave.customTitleLisp;
-		V.sayEnunciate = "lisp";
-		V.sEnunciate = "th";
-		V.SEnunciate = "Th";
-		V.ssEnunciate = "th";
-		V.cEnunciate = "th";
-		V.CEnunciate = "Ch";
-		V.ccEnunciate = "kth";
-		V.zEnunciate = "th";
-		V.ZEnunciate = "Th";
-		V.chEnunciate = "th";
-		V.ChEnunciate = "Th";
-		V.shEnunciate = "th";
-		V.ShEnunciate = "Th";
-		V.scEnunciate = "th";
-		V.ScEnunciate = "Th";
-		V.xEnunciate = "kth";
-		V.XEnunciate = "Th";
-	} else {
-		if (V.PC.customTitle !== undefined)
-			V.titleEnunciate = V.PC.customTitle;
-		else if (V.PC.title !== 0)
-			V.titleEnunciate = "Master";
-		else
-			V.titleEnunciate = "Mistress";
-		if (V.allowFamilyTitles === 1) {
-			if (slave.father === -1) {
-				if (slave.actualAge < 4 && slave.physicalAge < 4)
-					V.titleEnunciate = "Dadda";
-				else if (slave.actualAge < 9)
-					V.titleEnunciate = "Daddy";
-				else
-					V.titleEnunciate = "Dad";
-			} else if (slave.mother === -1) {
-				if (slave.actualAge < 4 && slave.physicalAge < 4)
-					V.titleEnunciate = "Mama";
-				else if (slave.actualAge < 9)
-					V.titleEnunciate = "Mommy";
-				else
-					V.titleEnunciate = "Mom";
-			} else if (V.PC.mother === slave.ID || V.PC.father === slave.ID) {
-				if (V.PC.title === 1)
-					V.titleEnunciate = "Son";
-				else if (V.PC.title === 0)
-					V.titleEnunciate = "Daughter";
-			} else if (areSisters(slave, V.PC) > 0) {
-				if (V.PC.title === 1) {
-					if (slave.actualAge < 18)
-						V.titleEnunciate = "Bro";
-					else
-						V.titleEnunciate = "Brother";
-				} else if (V.PC.title === 0) {
-					if (slave.actualAge < 18)
-						V.titleEnunciate = "Sis";
-					else
-						V.titleEnunciate = "Sister";
-				}
-			}
-		}
-		if (slave.customTitle !== undefined && slave.customTitle !== "")
-			V.titleEnunciate = slave.customTitle;
-		if (V.PC.customTitle !== undefined)
-			V.writtenTitle = V.PC.customTitle;
-		else if (V.PC.title !== 0)
-			V.writtenTitle = "Master";
-		else
-			V.writtenTitle = "Mistress";
-		if (slave.customTitle !== undefined && slave.customTitle !== "" && slave.rudeTitle === 0)
-			V.writtenTitle = slave.customTitle;
-		V.sayEnunciate = "say";
-		V.sEnunciate = "s";
-		V.SEnunciate = "S";
-		V.ssEnunciate = "ss";
-		V.cEnunciate = "c";
-		V.CEnunciate = "C";
-		V.ccEnunciate = "cc";
-		V.zEnunciate = "z";
-		V.ZEnunciate = "Z";
-		V.chEnunciate = "ch";
-		V.ChEnunciate = "Ch";
-		V.shEnunciate = "sh";
-		V.ShEnunciate = "Sh";
-		V.scEnunciate = "sc";
-		V.ScEnunciate = "Sc";
-		V.xEnunciate = "x";
-		V.XEnunciate = "X";
-	}
-};
-
-window.fetishChangeChance = function fetishChangeChance(slave) {
-	const V = State.variables;
-	var chance = 0, sex = 0;
-
-	if (slave.clitSetting !== slave.fetish) {
-		if (slave.balls) {
-			sex = V.potencyAge - slave.actualAge;
-		}
-		else if (slave.ovaries || slave.mpreg) {
-			sex = V.fertilityAge - slave.actualAge;
-		}
-		chance = Math.trunc(Math.clamp((slave.devotion/4)-(slave.fetishStrength/4)-(Math.max(sex,0)*10), 0, 100));
-	}
-
-	return chance;
-};
-
-window.SlaveFullName = function SlaveFullName(slave) {
-	const V = State.variables;
-	const pair = slave.slaveSurname ? [slave.slaveName, slave.slaveSurname] : [slave.slaveName];
-	if (V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality))
-		pair.reverse();
-	return pair.join(" ");
-};
-
-window.SlaveFullBirthName = function SlaveFullBirthName(slave) {
-	const V = State.variables;
-	const pair = slave.birthSurname ? [slave.birthName, slave.birthSurname] : [slave.birthName];
-	if (V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality))
-		pair.reverse();
-	return pair.join(" ");
-};
-
-window.PlayerName = function PlayerName() {
-	const V = State.variables;
-	const surnamesFirstCountries = [
-		"Cambodian",
-		"Chinese",
-		"Hungarian",
-		"Japanese",
-		"Korean",
-		"Mongolian",
-		"Taiwanese",
-		"Vietnamese"];
-	let names = V.PC.surname ? [V.PC.name, V.PC.surname] : [V.PC.name];
-	if ((V.surnameOrder !== 1) && (surnamesFirstCountries.includes(V.PC.nationality)))
-		names.reverse();
-	return names.join(" ");
-};
-
-window.PCTitle = function PCTitle() {
-	const V = State.variables;
-	let titles = [];
-
-	V.PCTitle = PlayerName();
-
-	if (V.cheater === 1) {
-		V.PCTitle = (V.PCTitle + " the Cheater");
-	} else if (V.arcologies[0].FSRestart > 10) {
-		V.PCTitle = (V.PCTitle + " of the Societal Elite");
-	} else if (V.rep > 18000) {
-		V.PCTitle = (V.PCTitle + " the Great");
-	} else if (V.rep > 17000) {
-		V.PCTitle = ("the exalted " + V.PCTitle);
-	} else if (V.rep > 16000) {
-		V.PCTitle = ("the illustrious " + V.PCTitle);
-	} else if (V.rep > 15000) {
-		V.PCTitle = ("the prestigious " + V.PCTitle);
-	} else if (V.rep > 14000) {
-		V.PCTitle = ("the renowned " + V.PCTitle);
-	} else if (V.rep > 13000) {
-		V.PCTitle = ("the famed " + V.PCTitle);
-	} else if (V.rep > 12000) {
-		V.PCTitle = ("the celebrated " + V.PCTitle);
-	} else if (V.rep > 11000) {
-		V.PCTitle = ("the honored " + V.PCTitle);
-	} else if (V.rep > 10000) {
-		V.PCTitle = ("the acclaimed " + V.PCTitle);
-	} else if (V.rep > 9000) {
-		V.PCTitle = ("the eminent " + V.PCTitle);
-	} else if (V.rep > 8250) {
-		V.PCTitle = ("the prominent " + V.PCTitle);
-	} else if (V.rep > 7500) {
-		V.PCTitle = ("the distinguished " + V.PCTitle);
-	} else if (V.rep > 6750) {
-		V.PCTitle = ("the admired " + V.PCTitle);
-	} else if (V.rep > 6000) {
-		V.PCTitle = ("the esteemed " + V.PCTitle);
-	} else if (V.rep > 5250) {
-		V.PCTitle = ("the respected " + V.PCTitle);
-	} else if (V.rep > 4500) {
-		V.PCTitle = ("the known " + V.PCTitle);
-	} else if (V.rep > 3750) {
-		V.PCTitle = ("the recognized " + V.PCTitle);
-	} else if (V.rep > 3000) {
-		V.PCTitle = ("the rumored " + V.PCTitle);
-	}
-
-	V.PCTitle = (V.PCTitle + ", ");
-
-	if (V.PC.name === "FC Dev") {
-		titles.push("the Creator");
-	}
-
-	if (V.plot === 1) {
-		if (V.invasionVictory === 3) {
-			if (V.PC.title === 1) {
-				titles.push("Hero of the City");
-			} else {
-				titles.push("Heroine of the City");
-			}
-		} else if (V.invasionVictory === 2) {
-			titles.push("Defender of the City");
-		}
-		if (V.daughtersVictory === 3) {
-			titles.push("Destroyer of the Daughters");
-		} else if (V.daughtersVictory === 2) {
-			if (V.PC.title === 1) {
-				titles.push("Victor over the Daughters");
-			} else {
-				titles.push("Victrix over the Daughters");
-			}
-		}
-	}
-
-	if (V.SF.Active < -1) {
-		switch(V.SF.BadOutcome) {
-			case "lockdown":
-				titles.push("The War Host");
-				break;
-			case "Revolt":
-				titles.push("The Betrayed");
-				break;
-			case "Exodus":
-			titles.push("The Abandoned");
-			break;
-		}
-	}
-
-	if (V.mercenaries >= 5) {
-		if (V.mercenariesTitle === "Evocati") {
-			titles.push("Princeps of the " + V.mercenariesTitle);
-		} else if (V.mercenariesTitle === "Knights") {
-			if (V.PC.title === 1) {
-				titles.push("Lord Commander of the " + V.mercenariesTitle);
-			} else {
-				titles.push("Lady Commander of the " + V.mercenariesTitle);
-			}
-		} else if (V.mercenariesTitle === "Immortals") {
-			titles.push("Tyrant of the " + V.mercenariesTitle);
-		} else {
-			titles.push("Commander of the " + V.mercenariesTitle);
-		}
-	} else if (V.mercenaries >= 1) {
-		titles.push("Commander of the Mercenaries");
-	}
-
-	if (V.dispensary === 1) {
-		if (V.PC.title === 1) {
-			titles.push("Pharmacologos");
-		} else {
-			titles.push("Pharmacologes");
-		}
-	}
-
-	if (V.arcologies[0].FSSupremacist >= V.FSLockinLevel * 0.9) {
-		titles.push("Grand Champion of the Blood");
-	} else if (V.arcologies[0].FSSupremacist >= V.FSLockinLevel * 0.6) {
-		titles.push("Champion of the Blood");
-	} else if (V.arcologies[0].FSSupremacist >= V.FSLockinLevel * 0.3) {
-		titles.push("Defender of the Blood");
-	}
-
-	if (V.arcologies[0].FSSubjugationist >= V.FSLockinLevel * 0.9) {
-		titles.push("Grand Overseer of the Inferior Race");
-	} else if (V.arcologies[0].FSSubjugationist >= V.FSLockinLevel * 0.6) {
-		titles.push("Overseer of the Inferior Race");
-	} else if (V.arcologies[0].FSSubjugationist >= V.FSLockinLevel * 0.3) {
-		titles.push("Subduer of the Inferior Race");
-	}
-
-	if (V.arcologies[0].FSGenderRadicalist >= V.FSLockinLevel * 0.9) {
-		titles.push("Buttfucker of All Slaves");
-	} else if (V.arcologies[0].FSGenderRadicalist >= V.FSLockinLevel * 0.6) {
-		titles.push("Sodomizer of the Traps");
-	} else if (V.arcologies[0].FSGenderRadicalist >= V.FSLockinLevel * 0.3) {
-		if (V.PC.title === 1) {
-			titles.push("Penetrator of the Sissies");
-		} else {
-			titles.push("Penetratrix of the Sissies");
-		}
-	}
-
-	if (V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("Father to the City");
-		} else {
-			titles.push("Mother to the City");
-		}
-	} else if (V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel * 0.6) {
-		titles.push("Defender of Women");
-	} else if (V.arcologies[0].FSGenderFundamentalist >= V.FSLockinLevel * 0.3) {
-		titles.push("Restorer of Morals");
-	}
-
-	if (V.arcologies[0].FSPaternalist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("Protector to All Slaves");
-		} else {
-			titles.push("Protectrix to All Slaves");
-		}
-	} else if (V.arcologies[0].FSPaternalist >= V.FSLockinLevel * 0.6) {
-		if (V.PC.title === 1) {
-			titles.push("Benefactor of Slaves");
-		} else {
-			titles.push("Benefactrix of Slaves");
-		}
-	} else if (V.arcologies[0].FSPaternalist >= V.FSLockinLevel * 0.3) {
-		titles.push("Pursuer of Justice");
-	}
-
-	if (V.arcologies[0].FSRepopulationFocus >= V.FSLockinLevel * 0.9) {
-		titles.push("the Savior of the Future");
-	} else if (V.arcologies[0].FSRepopulationFocus >= V.FSLockinLevel * 0.6) {
-		titles.push("the Holder of the Future");
-	} else if (V.arcologies[0].FSRepopulationFocus >= V.FSLockinLevel * 0.3) {
-		titles.push("the Repopulist");
-	}
-
-	if (V.arcologies[0].FSDegradationist >= V.FSLockinLevel * 0.9) {
-		titles.push("Holder of the Rod and the Lash");
-	} else if (V.arcologies[0].FSDegradationist >= V.FSLockinLevel * 0.6) {
-		titles.push("Subduer of Slaves");
-	} else if (V.arcologies[0].FSDegradationist >= V.FSLockinLevel * 0.3) {
-		titles.push("Pursuer of Justice");
-	}
-
-	if (V.arcologies[0].FSBodyPurist >= V.FSLockinLevel * 0.9) {
-		titles.push("the Purifier of the Breasts");
-	} else if (V.arcologies[0].FSBodyPurist >= V.FSLockinLevel * 0.6) {
-		titles.push("the Discerning");
-	} else if (V.arcologies[0].FSBodyPurist >= V.FSLockinLevel * 0.3) {
-		titles.push("the Tasteful");
-	}
-
-	if (V.arcologies[0].FSAssetExpansionist >= V.FSLockinLevel * 0.9) {
-		titles.push("the Expander of the Breasts");
-	} else if (V.arcologies[0].FSAssetExpansionist >= V.FSLockinLevel * 0.6) {
-		titles.push("the Expander");
-	} else if (V.arcologies[0].FSAssetExpansionist >= V.FSLockinLevel * 0.3) {
-		if (V.PC.title === 1) {
-			titles.push("the Implantor");
-		} else {
-			titles.push("the Implantrix");
-		}
-	}
-
-	if (V.arcologies[0].FSPastoralist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("the Master of Stock");
-		} else {
-			titles.push("the Mistress of Stock");
-		}
-	} else if (V.arcologies[0].FSPastoralist >= V.FSLockinLevel * 0.6) {
-		titles.push("the Rancher");
-	} else if (V.arcologies[0].FSPastoralist >= V.FSLockinLevel * 0.3) {
-		titles.push("the Farmer");
-	}
-
-	if (V.arcologies[0].FSPhysicalIdealist >= V.FSLockinLevel * 0.9) {
-		titles.push("beloved of Brodin");
-	} else if (V.arcologies[0].FSPhysicalIdealist >= V.FSLockinLevel * 0.6) {
-		if (V.PC.title === 1) {
-			titles.push("he of the godlike Body");
-		} else {
-			titles.push("she of the godlike Body");
-		}
-	} else if (V.arcologies[0].FSPhysicalIdealist >= V.FSLockinLevel * 0.3) {
-		titles.push("advancer of Gains");
-	}
-
-	if (V.arcologies[0].FSHedonisticDecadence >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("Master of Softness");
-		} else {
-			titles.push("Lady of Softness");
-		}
-	} else if (V.arcologies[0].FSHedonisticDecadence >= V.FSLockinLevel * 0.6) {
-		titles.push("Thickness Enthusiast");
-	} else if (V.arcologies[0].FSHedonisticDecadence >= V.FSLockinLevel * 0.3) {
-		titles.push("the Feeder");
-	}
-
-	if (V.arcologies[0].FSMaturityPreferentialist >= V.FSLockinLevel * 0.9) {
-		titles.push("Grand Preserver of MILFS");
-	} else if (V.arcologies[0].FSMaturityPreferentialist >= V.FSLockinLevel * 0.6) {
-		titles.push("Fucker of MILFS");
-	} else if (V.arcologies[0].FSMaturityPreferentialist >= V.FSLockinLevel * 0.3) {
-		if (V.PC.title === 1) {
-			titles.push("he of the notorious MILF preference");
-		} else {
-			titles.push("she of the notorious MILF preference");
-		}
-	}
-
-	if (V.arcologies[0].FSYouthPreferentialist >= V.FSLockinLevel * 0.9) {
-		titles.push("Keeper of the Magnificent Young Harem");
-	} else if (V.arcologies[0].FSYouthPreferentialist >= V.FSLockinLevel * 0.6) {
-		titles.push("Keeper of Virgins");
-	} else if (V.arcologies[0].FSYouthPreferentialist >= V.FSLockinLevel * 0.3) {
-		titles.push("the Virginbreaker");
-	}
-
-	if (V.arcologies[0].FSChattelReligionistLaw === 1) {
-		titles.push("the Prophet");
-	} else if (V.arcologies[0].FSChattelReligionist >= V.FSLockinLevel * 0.9) {
-		titles.push("Keeper of the Blade and Chalice");
-	} else if (V.arcologies[0].FSChattelReligionist >= V.FSLockinLevel * 0.6) {
-		titles.push("Champion of the Faith");
-	} else if (V.arcologies[0].FSChattelReligionist >= V.FSLockinLevel * 0.3) {
-		titles.push("the Holy");
-	}
-
-	if (V.arcologies[0].FSRomanRevivalist >= V.FSLockinLevel * 0.9) {
-		titles.push("First Consul");
-	} else if (V.arcologies[0].FSRomanRevivalist >= V.FSLockinLevel * 0.6) {
-		titles.push("Aedile");
-	} else if (V.arcologies[0].FSRomanRevivalist >= V.FSLockinLevel * 0.3) {
-		titles.push("Quaestor");
-	}
-
-	if (V.arcologies[0].FSAztecRevivalist >= V.FSLockinLevel * 0.9) {
-		titles.push("Tlatcani");
-	} else if (V.arcologies[0].FSAztecRevivalist >= V.FSLockinLevel * 0.6) {
-		titles.push("Cihuacoatl");
-	} else if (V.arcologies[0].FSAztecRevivalist >= V.FSLockinLevel * 0.3) {
-		titles.push("Tlatoani");
-	}
-
-	if (V.arcologies[0].FSEgyptianRevivalist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("the Living God");
-		} else {
-			titles.push("the Living Goddess");
-		}
-	} else if (V.arcologies[0].FSEgyptianRevivalist >= V.FSLockinLevel * 0.6) {
-		titles.push("Pharaoh");
-	} else if (V.arcologies[0].FSEgyptianRevivalist >= V.FSLockinLevel * 0.3) {
-		if (V.PC.title === 1) {
-			titles.push("Prince of the Nile");
-		} else {
-			titles.push("Princess of the Nile");
-		}
-	}
-
-	if (V.arcologies[0].FSEdoRevivalist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("Emperor and Descendant of Amaterasu");
-		} else {
-			titles.push("Amaterasu Reborn");
-		}
-	} else if (V.arcologies[0].FSEdoRevivalist >= V.FSLockinLevel * 0.6) {
-		titles.push("Shogun");
-	} else if (V.arcologies[0].FSEdoRevivalist >= V.FSLockinLevel * 0.3) {
-		titles.push("Daimyo");
-	}
-
-	if (V.arcologies[0].FSArabianRevivalist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("Caliph");
-		} else {
-			titles.push("Handmaiden of Allah");
-		}
-	} else if (V.arcologies[0].FSArabianRevivalist >= V.FSLockinLevel * 0.6) {
-		if (V.PC.title === 1) {
-			titles.push("Sultan");
-		} else {
-			titles.push("Sultana");
-		}
-	} else if (V.arcologies[0].FSArabianRevivalist >= V.FSLockinLevel * 0.3) {
-		titles.push("Beloved of Allah");
-	}
-
-	if (V.arcologies[0].FSChineseRevivalist >= V.FSLockinLevel * 0.9) {
-		if (V.PC.title === 1) {
-			titles.push("Emperor and Holder of the Mandate of Heaven");
-		} else {
-			titles.push("Empress and Holder of the Mandate of Heaven");
-		}
-	} else if (V.arcologies[0].FSChineseRevivalist >= V.FSLockinLevel * 0.6) {
-		if (V.PC.title === 1) {
-			titles.push("Emperor");
-		} else {
-			titles.push("Empress");
-		}
-	} else if (V.arcologies[0].FSChineseRevivalist >= V.FSLockinLevel * 0.3) {
-		if (V.PC.title === 1) {
-			titles.push("Governor of the Province");
-		} else {
-			titles.push("Governess of the Province");
-		}
-	}
-
-	if (V.brothelSlaves >= 15) {
-		if (V.PC.title === 1) {
-			titles.push("Procurator of the Brothel");
-		} else {
-			titles.push("Procuratrix of the Brothel");
-		}
-	}
-
-	if (V.clubSlaves >= 15) {
-		titles.push("First on the Club");
-	}
-	if (V.dairySlaves >= 15) {
-		titles.push("Keeper of the Cattle");
-	}
-	if (V.cumSlaves >= 15) {
-		if (V.PC.title === 1) {
-			titles.push("Extractor of the Ejaculate");
-		} else {
-			titles.push("Extractrix of the Ejaculate");
-		}
-	}
-	if (V.servantsQuartersSlaves >= 15) {
-		if (V.PC.title === 1) {
-			titles.push("Director of the Servants");
-		} else {
-			titles.push("Directrix of the Servants");
-		}
-	}
-	if (V.schoolroomSlaves >= 10) {
-		if (V.PC.title === 1) {
-			titles.push("Educator of the Slaves");
-		} else {
-			titles.push("Educatrix of the Slaves");
-		}
-	}
-	if (V.spaSlaves >= 10) {
-		titles.push("Order of the Bath");
-	}
-	if (V.arcadeSlaves >= 15) {
-		titles.push("Comptroller of the Arcade");
-	}
-	if (V.nurseryBabies >= 10) {
-		titles.push("Caretaker of the Youth");
-	}
-
-	let schoolsPresent = [], schoolsPerfected = [], schoolTitle = "";
-	if (V.TSS.schoolProsperity >= 10) {
-		schoolsPerfected.push("The Slave School");
-	} else if (V.TSS.schoolPresent === 1) {
-		schoolsPresent.push("The Slave School");
-	}
-	if (V.GRI.schoolProsperity >= 10) {
-		schoolsPerfected.push("The Growth Research Institute");
-	} else if (V.GRI.schoolPresent === 1) {
-		schoolsPresent.push("The Growth Research Institute");
-	}
-	if (V.SCP.schoolProsperity >= 10) {
-		schoolsPerfected.push("St. Claver Preparatory");
-	} else if (V.SCP.schoolPresent === 1) {
-		schoolsPresent.push("St. Claver Preparatory");
-	}
-	if (V.LDE.schoolProsperity >= 10) {
-		schoolsPerfected.push("L'École des Enculées");
-	} else if (V.LDE.schoolPresent === 1) {
-		schoolsPresent.push("L'École des Enculées");
-	}
-	if (V.TGA.schoolProsperity >= 10) {
-		schoolsPerfected.push("The Gymnasium-Academy");
-	} else if (V.TGA.schoolPresent === 1) {
-		schoolsPresent.push("The Gymnasium-Academy");
-	}
-	if (V.HA.schoolProsperity >= 10) {
-		schoolsPerfected.push("The Hippolyta Academy");
-	} else if (V.HA.schoolPresent === 1) {
-		schoolsPresent.push("The Hippolyta Academy");
-	}
-	if (V.TCR.schoolProsperity >= 10) {
-		schoolsPerfected.push("The Cattle Ranch");
-	} else if (V.TCR.schoolPresent === 1) {
-		schoolsPresent.push("The Cattle Ranch");
-	}
-	if (schoolsPerfected.length > 0) {
-		if (V.PC.title === 1) {
-			schoolTitle = "Benefactor of ";
-		} else {
-			schoolTitle = "Benefactrix of ";
-		}
-		if (schoolsPerfected.length === 1) {
-			schoolTitle += schoolsPerfected[0];
-		} else if (schoolsPerfected.length === 2) {
-			schoolTitle += schoolsPerfected[0] + " and " + schoolsPerfected[1];
-		} else {
-			schoolsPerfected[schoolsPerfected.length - 1] = "and " + schoolsPerfected[schoolsPerfected.length - 1];
-			schoolTitle += schoolsPerfected.join(", ");
-		}
-		titles.push(schoolTitle);
-	}
-
-	if (schoolsPresent.length > 0) {
-		schoolTitle = "Supporter of ";
-		if (schoolsPresent.length === 1) {
-			schoolTitle += schoolsPresent[0];
-		} else if (schoolsPresent.length === 2) {
-			schoolTitle += schoolsPresent[0] + " and " + schoolsPresent[1];
-		} else {
-			schoolsPresent[schoolsPresent.length - 1] = "and " + schoolsPresent[schoolsPresent.length - 1];
-			schoolTitle += schoolsPresent.join(", ");
-		}
-		titles.push(schoolTitle);
-	}
-
-	if (V.TFS.schoolProsperity >= 10) {
-		titles.push("Honorary Sibling of the Futanari Sisters");
-	} else if (V.TFS.schoolPresent === 1) {
-		if (V.PC.title === 1) {
-			titles.push("Protector of the Futanari Sisters");
-		} else {
-			titles.push("Protectrix of the Futanari Sisters");
-		}
-	}
-
-	if (V.slaves.length > 50) {
-		if (V.PC.title === 1) {
-			titles.push("Master of Slaves");
-		} else {
-			titles.push("Mistress of Slaves");
-		}
-	} else if (V.slaves.length > 40) {
-		titles.push("Holder of Slaves");
-	} else if (V.slaves.length > 30) {
-		titles.push("Keeper of Slaves");
-	} else if (V.slaves.length > 20) {
-		titles.push("Manager of Slaves");
-	} else if (V.slaves.length > 10) {
-		titles.push("owner of slaves");
-	}
-
-	if (V.corpValue > 500000) {
-		titles.push("Corporate Titan");
-	} else if (V.corpValue > 250000) {
-		titles.push("corporate innovator");
-	} else if (V.corpValue > 100000) {
-		titles.push("corporate founder");
-	} else if (V.corpValue > 0) {
-		if (V.PC.title === 1) {
-			titles.push("noted corporate businessman");
-		} else {
-			titles.push("noted corporate businesswoman");
-		}
-	}
-
-	if (V.rep > 18000) {
-		if (V.PC.title === 1) {
-			titles.push("unquestioned Master of the Arcology");
-		} else {
-			titles.push("unquestioned Mistress of the Arcology");
-		}
-	} else if (V.rep > 15000) {
-		if (V.PC.title === 1) {
-			titles.push("Lord of the Arcology");
-		} else {
-			titles.push("Lady of the Arcology");
-		}
-	} else if (V.rep > 12000) {
-		titles.push("Ruler of the Arcology");
-	} else if (V.rep > 9000) {
-		titles.push("chief officer of the arcology");
-	} else {
-		titles.push("owner of the arcology");
-	}
-
-	if (titles.length === 1) {
-		V.PCTitle += titles[0];
-	} else if (titles.length === 2) {
-		V.PCTitle += titles[0] + " and " + titles[1];
-	} else {
-		titles[titles.length - 1] = "and " + titles[titles.length - 1];
-		V.PCTitle += titles.join(", ");
-	}
-};
-
-window.PoliteRudeTitle = function PoliteRudeTitle(slave) {
-	const V = State.variables, PC = V.PC, s = V.sEnunciate, ss = V.ssEnunciate;
-
-	var r = "";
-	if (slave.nationality === "Japanese") {
-		if (slave.trust > 0) {
-			r += `${PC.name}${PC.title > 0 ? "kun" : "chan"}`;
-		} else {
-			r += (PC.surname ? PC.surname : `${PC.name}${s}an`);
-		}
-	} else {
-		if (slave.intelligence+slave.intelligenceImplant < -95) {
-			r += V.titleEnunciate;
-		} else if (slave.intelligence+slave.intelligenceImplant > 50) {
-			r += (PC.title > 0 ? `Ma${s}ter` : `Mi${s}tre${ss}`);
-		} else if (slave.trust > 0) {
-			r += PC.name;
-		} else {
-			r += (PC.surname ? PC.surname : PC.name);
-		}
-	}
-	return r;
-};
-
-window.SlaveTitle = function SlaveTitle(slave) {
-	const V = State.variables;
-	let r = "";
-	if (V.newDescriptions === 1) {
-		if (slave.dick > 0 && slave.balls > 0 && slave.boobs > 300 && slave.vagina > -1 && slave.ovaries === 1) {
-			if (jsRandom(1,100) > 50) {
-				r = "futanari";
-			} else {
-				r = "herm";
-			}
-		} else if (slave.dick > 0 && slave.balls === 0 && slave.boobs > 300 && slave.vagina > -1 && slave.ovaries === 1) {
-			r = "dickgirl";
-		} else if (slave.dick > 0 && slave.vagina > -1 && slave.ovaries === 0) {
-			r = "shemale";
-		} else if (slave.dick > 0 && slave.balls === 0 && slave.vagina === -1 && slave.ovaries === 0) {
-			r = "eunuch";
-		} else if (slave.dick > 0 && slave.balls > 0 && slave.vagina === -1 && slave.ovaries === 0) {
-			if (slave.face > 10 && slave.hips > -1 && slave.shoulders < 1 && slave.faceShape !== "masculine") {
-				r = "trap";
-			} else if (slave.boobs > 800) {
-				r = "tittyboy";
-			} else if (slave.dick === 1 && slave.balls === 1) {
-				r = "sissy";
-			} else if (slave.dick > 1 && slave.balls > 1 && slave.height < 165 && slave.muscles < 5 && slave.visualAge < 19 && slave.faceShape !== "masculine") {
-				r = "twink";
-			} else if (slave.dick > 1 && slave.balls > 1 && slave.height < 160 && slave.muscles < 5 && slave.visualAge < 19) {
-				r = "boytoy";
-			} else if (slave.muscles > 95 && slave.height >= 185) {
-				r = "titan";
-			} else if (slave.muscles > 30) {
-				r = "muscleboy";
-			} else {
-				r = "slaveboy";
-			}
-		} else if (slave.dick === 0 && slave.balls === 0 && slave.vagina > -1) {
-			if ((slave.shoulders > slave.hips || slave.faceShape === "masculine") && slave.boobs < 400 && slave.genes === "XY") {
-				r = "cuntboy";
-			} else if (slave.ovaries === 0 && slave.genes === "XY") {
-				r = "tranny";
-			} else if (slave.weight > 10 && slave.boobs > 800 && slave.birthsTotal > 0 && slave.physicalAge > 59) {
-				r = "GMILF";
-			} else if (slave.weight > 10 && slave.boobs > 800 && slave.birthsTotal > 0 && slave.physicalAge > 35) {
-				r = "MILF";
-			} else if (slave.lips > 70 && slave.boobs > 2000 && slave.butt > 3) {
-				r = "bimbo";
-			} else if (slave.hips > 1 && slave.boobs > 2000 && slave.butt > 3 && slave.waist < 50) {
-				r = "hourglass";
-			} else if (slave.muscles > 95 && slave.height >= 185) {
-				r = "amazon";
-			} else if (slave.muscles > 30) {
-				r = "musclegirl";
-			} else {
-				r = "slavegirl";
-			}
-		} else if (slave.dick === 0 && slave.balls === 0 && slave.vagina === -1) {
-			r = "neuter";
-		} else if (slave.dick === 0 && slave.vagina === -1) {
-			r = "ballslave";
-		} else {
-			r = "slave";
-		}
-
-		if (slave.visualAge < 13) {
-			if (slave.genes === "XY" && slave.vagina === -1) {
-				r = "shota " + r;
-			} else {
-				r = "loli " + r;
-			}
-		}
-
-		if (slave.dick > 9 && slave.balls > 9 && slave.boobs > 12000) {
-			r = "hyper " + r;
-		}
-
-		if (slave.boobs > 4000 && slave.lactation > 0) {
-			if (slave.physicalAge < 13) {
-				r = r + " calf";
-			} else {
-				r = r + " cow";
-			}
-		} else if (slave.lactation > 0) {
-			r = "milky " + r;
-		}
-
-		if (slave.boobs > 20000) {
-			r = "supermassive titted " + r;
-		} else if (slave.boobs > 10000) {
-			r = "giant titted " + r;
-		} else if (slave.boobs > 4000) {
-			r = "huge titted " + r;
-		} else if (slave.boobs > 1000) {
-			r = "busty " + r;
-		}
-
-		if (slave.dick > 5 && slave.balls > 5) {
-			r = "womb filling " + r;
-		} else if (slave.dick > 5) {
-			r = "well hung " + r;
-		}
-
-		if (slave.butt >= 12) {
-			r = "colossal assed " + r;
-		} else if (slave.butt >= 12) {
-			r = "massive assed " + r;
-		} else if (slave.butt >= 8) {
-			r = "fat assed " + r;
-		} else if (slave.butt >= 6) {
-			r = "bottom heavy " + r;
-		} else if (slave.butt >= 4) {
-			r = "big bottomed " + r;
-		}
-
-		if (slave.weight > 10 && slave.weight < 100 && slave.boobs > 5000 && slave.butt > 5 && slave.hips >= 2 && slave.bellyPreg >= 30000 && slave.births >= 10) {
-			r = r + " fertility goddess";
-		} else if (slave.births >= 6) {
-			r = r + " broodmother";
-		} else if (slave.births >= 3) {
-			r = r + " breeder";
-		}
-
-		if (slave.indenture > -1) {
-			r = "indentured " + r;
-		}
-
-		if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown === 1) {
-			r = "pregnant " + r;
-		} else if (slave.bellyFluid >= 5000) {
-			r = "bloated " + r;
-		} else if (slave.belly >= 5000) {
-			r = "gravid " + r;
-		}
-
-		if (slave.fuckdoll > 0) {
-			r = r + " fuckdoll";
-		}
-	} else {
-		r = "slave"; /* I don't tihnk there is an 'else'? */
-		if ((slave.dick === 0) && (slave.vagina === -1)) { /* NULLS */
-			r = "null";
-				if ((slave.lactation > 0) && (slave.boobs > 2000)) {
-					r = r + " cow";
-				} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-					r = r + " bimbo ";
-				} else if (slave.boobs > 6000) {
-					r = r + " boob";
-				} else if (slave.butt > 6) {
-					r = r + " ass";
-				} else if ((slave.muscles > 30) && (slave.height < 185)) {
-						r = r + " muscle";
-				}
-					if (slave.visualAge > 55) {
-						r = r + "GILF";
-					} else if (slave.visualAge > 35) {
-						r = r + "MILF";
-					} else if (slave.visualAge >= 25) {
-						r = r + "slave";
-					} else {
-						r = r + "girl";
-					}
-		}
-
-		if ((slave.dick === 0) && (slave.vagina !== -1)) { /* FEMALES */
-			if (slave.visualAge > 55) {
-				r = "GILF";
-			} else if (slave.visualAge > 35) {
-				r = "MILF";
-			} else if (slave.visualAge >= 25) {
-				r = "slave";
-			} else {
-				r = "slavegirl";
-			}
-				if ((slave.muscles > 30) && (slave.height < 185)) {
-					r = "muscle " + r;
-				} else if ((slave.lactation > 0) && (slave.boobs > 2000)) {
-					r = r + " cow";
-				} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-					r = r + " bimbo";
-				} else if (slave.boobs > 6000) {
-					r = "boob" + r;
-				} else if (slave.butt > 6) {
-					r = "ass" + r;
-				}
-		}
-
-		if ((slave.dick !== 0) && (slave.vagina !== -1)) {
-				if (slave.balls > 0) { /* FUTANARI: cock & balls & vagina */
-					r = "futanari ";
-				} else { /* FUTANARI: cock & vagina */
-					r = "futa ";
-				}
-					if ((slave.lactation > 0) && (slave.boobs > 2000)) {
-						r = r + "cow";
-					} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-						r = r + "bimbo ";
-					} else if (slave.boobs > 6000) {
-						r = r + "boob";
-					} else if (slave.butt > 6) {
-						r = r + "ass";
-					} else if ((slave.muscles > 30) && (slave.height < 185)) {
-						r = r + "muscle";
-					}
-						if (slave.visualAge > 55) {
-							r = r + "GILF";
-						} else if (slave.visualAge > 35) {
-							r = r + "MILF";
-						} else if (slave.visualAge >= 25) {
-							r = r + "slave";
-						} else {
-							r = r + "girl";
-						}
-							if (slave.dick > 5 && slave.balls > 5 && slave.boobs > 5000) {
-								r = "hyper " + r;
-							}
-		}
-
-		if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0) && (slave.boobs > 300) && (slave.butt > 2)) { /* SHEMALES: cock & balls, T&A above minimum */
-			if (slave.visualAge > 55) {
-				r = "sheGILF";
-			} else if (slave.visualAge > 35) {
-				r = "sheMILF";
-			} else if (slave.visualAge >= 25) {
-				r = "shemale";
-			} else {
-				r = "tgirl";
-			}
-				if ((slave.muscles > 30) && (slave.height < 185)) {
-					r = "muscle" + r;
-				} else if ((slave.lactation > 0) && (slave.boobs > 2000)) {
-					r = r + " cow";
-				} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-					r = r + " bimbo";
-				} else if (slave.boobs > 6000) {
-					r = "topheavy " + r;
-				} else if (slave.butt > 6) {
-					r = "bottomheavy " + r;
-				}
-		}
-
-		if ((slave.boobs < 300) || (slave.butt < 2)) {
-			if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0)) {
-				if ((slave.shoulders < 1) || (slave.muscles <= 30)) {
-					if ((slave.faceShape === "masculine") || (slave.faceShape === "androgynous")) { /* SISSIES: feminine shoulders or muscles, masculine faces */
-						if (slave.visualAge > 55) {
-							r = "sissyGILF";
-						} else if (slave.visualAge > 35) {
-							r = "sissyMILF";
-						} else {
-							r = "sissy";
-						}
-					} else { /* TRAPS: feminine shoulders or muscles, feminine faces */
-						if (slave.visualAge > 55) {
-							r = "trapGILF";
-						} else if (slave.visualAge > 35) {
-							r = "trapMILF";
-						} else if (slave.visualAge >= 25) {
-							r = "trap";
-						} else {
-							r = "trapgirl";
-						}
-					}
-						if (slave.lactation > 0) {
-							r = r + " cow";
-						} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-							r = r + " bimbo";
-						}
-				}
-			}
-		}
-
-		if ((slave.boobs < 300) || (slave.butt < 2)) {
-			if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0)) {
-				if ((slave.shoulders > 1) || (slave.muscles >= 30)) { /* BITCHES: masculine shoulders or muscles */
-					r = "bitch";
-						if ((slave.muscles > 30) && (slave.height < 185)) {
-							r = "muscle" + r;
-						} else if (slave.lactation > 0) {
-							r = r + "cow";
-						} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-							r = "bimbo " + r;
-						}
-						if (slave.visualAge > 55) {
-							r = "aged " + r;
-						} else if (slave.visualAge > 35) {
-							r = "mature " + r;
-						} else if (slave.visualAge < 25) {
-							r = "young " + r;
-						}
-				}
-			}
-		}
-
-		if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls === 0)) {
-			r = "dick";
-				if (slave.visualAge > 55) {
-					r = r + "GILF";
-				} else if (slave.visualAge > 35) {
-					r = r + "MILF";
-				} else if (slave.visualAge >= 25) {
-					r = r + "slave";
-				} else {
-					r = r + "girl";
-				}
-					if ((slave.muscles > 30) && (slave.height < 185)) {
-						r = "muscle" + r;
-					} else if ((slave.lactation > 0) && (slave.boobs > 2000)) {
-						r = r + " cow";
-					} else if ((slave.boobsImplant > 0) && (slave.buttImplant > 0)) {
-						r = r + " bimbo";
-					} else if (slave.boobs > 6000) {
-						r = "boob " + r;
-					} else if (slave.butt > 6) {
-						r = "ass " + r;
-					}
-		}
-
-		if ((slave.muscles > 30) && (slave.height > 185)) {
-			r = "amazon " + r;
-		} else if ((slave.muscles < 30) && (slave.height > 185)) {
-			r = "statuesque " + r;
-		} else if ((slave.boobs < 800) && (slave.height < 150)) {
-			r = "petite " + r;
-		} else if ((slave.boobs > 800) && (slave.height < 150)) {
-			r = "shortstack " + r;
-		}
-
-		if (slave.births >= 5) {
-			r = r + " broodmother";
-		} else if (slave.births >= 2) {
-			r = r + " breeder";
-		}
-
-		if (slave.indenture > -1) {
-			r = "indentured " + r;
-		}
-
-		if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown === 1) {
-			r = "pregnant " + r;
-		} else if (slave.bellyFluid >= 5000) {
-			r = "bloated " + r;
-		} else if (slave.belly >= 5000) {
-			r = "gravid " + r;
-		}
-
-		if (slave.fuckdoll > 0) {
-			r = r + " fuckdoll";
-		}
-	}
-	return r;
-};
-
-window.DegradingName = function DegradingName(slave) {
-	const V = State.variables;
-	const leadershipPosition = [
-		"be the Attendant",
-		"be the Matron",
-		"be the Stewardess",
-		"be the Milkmaid",
-		"be the Farmer",
-		"be the DJ",
-		"be your Concubine",
-		"be the Madam",
-		"be the Schoolteacher",
-		"be the Wardeness",
-		"be the Nurse",
-		"be your Head Girl",
-		"guard you",
-		"recruit girls"];
-	let names = [];
-	let suffixes = [];
-
-	if (slave.fuckdoll > 0) {
-		slave.slaveName = "Fuckdoll No. " + slave.ID;
-		slave.slaveSurname = 0;
-	} else if (slave.assignment === "work in the dairy" && V.dairyRestraintsSetting >= 2) {
-		slave.slaveName = "Bioreactor No. " + slave.ID;
-		slave.slaveSurname = 0;
-	} else {
-		if (V.seeRace === 1) {
-			switch (slave.race) {
-				case "white":
-					names.push("Pale", "White");
-					break;
-				case "asian":
-					names.push("Asian", "Yellow");
-					break;
-				case "latina":
-					names.push("Brown", "Latina");
-					break;
-				case "black":
-					names.push("Black", "Dark");
-					break;
-				case "pacific islander":
-					names.push("Islander", "Pacific", "Sea");
-					break;
-				case "malay":
-					names.push("Cinnamon", "Pinoy", "Spice");
-					break;
-				case "southern european":
-					names.push("Mediterranean", "Olive");
-					break;
-				case "amerindian":
-					names.push("Indian", "Reservation");
-					break;
-				case "semitic":
-					names.push("Semite", "Semitic");
-					break;
-				case "middle eastern":
-					names.push("Arab", "Sand");
-					break;
-				case "indo-aryan":
-					names.push("Brown", "Indian");
-					break;
-				case "mixed race":
-					names.push("Mixed", "Mulatto", "Mutt");
-					break;
-			}
-		}
-		names.push(slave.hColor);
-		if (slave.eyes === -2) {
-			names.push("Blind", "Eyeless", "Sightless");
-		}
-		if (slave.hears === -2) {
-			names.push("Deaf", "Earless", "Unhearing");
-		}
-		if (slave.boobs >= 2000) {
-			suffixes.push("Boob", "Boobs", "Titty");
-		}
-		if (slave.boobs < 500 && slave.butt < 3) {
-			names.push("Girly", "Slim", "Thin");
-		}
-		if (slave.boobs < 300) {
-			names.push("Flat");
-		}
-		if (slave.anus > 2 || slave.vagina > 2) {
-			names.push("Gaping", "Hallway", "Slit", "Wideopen");
-		}
-		if (slave.weight > 160) {
-			names.push("Blimp", "Cow", "Fat", "Fatass", "Whale");
-		} else if (slave.weight > 30) {
-			names.push("Chubby", "Fat", "Whale");
-		} else if (slave.weight <= -30) {
-			names.push("Bony", "Rail", "Skinny");
-		}
-		if (slave.muscles > 30) {
-			names.push("Huge", "Muscles", "Ripped", "Strong");
-		}
-		if (slave.fetishKnown === 1) {
-			if (slave.fetish === "buttslut") {
-				names.push("Anal", "Sodomy");
-			}
-			if (slave.fetish === "cumslut") {
-				names.push("Cum", "Dicksuck", "Sucker");
-			}
-			if (slave.fetish === "humiliation") {
-				names.push("Rape");
-			}
-			if (slave.fetish === "masochist") {
-				names.push("Pain", "Rape", "Struggle");
-			}
-			if (slave.fetish === "pregnancy") {
-				names.push("Fertile");
-			}
-		}
-		if (slave.boobs*slave.lactation > 1000) {
-			names.push("Creamy", "Milky");
-			suffixes.push("Cow");
-		}
-		if (slave.oralSkill <= 30 && slave.analSkill <= 30) {
-			names.push("Cheap", "Fail", "Gutter");
-		}
-		if (slave.nipples === "fuckable") {
-			names.push("Nipplefuck", "Nipplecunt");
-		} else if (slave.nipples !== "tiny" && slave.nipples !== "cute") {
-			names.push("Pointy", "Titclit");
-			suffixes.push("Nipples");
-		}
-		if (slave.visualAge > 35) {
-			names.push("Mature");
-			suffixes.push("Cougar", "MILF");
-		} else if (slave.visualAge < 25) {
-			names.push("Girly", "Thin", "Young");
-		}
-		if (slave.amp === 1) {
-			names.push("Stumpy");
-			suffixes.push("Stumpy");
-		}
-		if (slave.boobsImplant > 1000 || slave.buttImplant > 3) {
-			names.push("Fake", "Plastic", "Silicone");
-		}
-		if (slave.dick > 5 && slave.balls > 5) {
-			names.push("Potent");
-			suffixes.push("Cannon", "Daddy");
-		}
-		if (slave.preg > slave.pregData.normalBirth/1.33) {
-			if (slave.broodmother === 2) {
-				names.push("Bursting", "Seeded");
-				suffixes.push("Factory", "Nursery");
-			} else if (slave.broodmother === 1) {
-				names.push("Bloated", "Stuffed");
-				suffixes.push("Breeder", "Factory");
-			}
-		}
-		if (slave.bellyPreg >= 450000) {
-			names.push("Bulging", "Squirming");
-		}
-		if (slave.bellyPreg >= 5000) {
-			names.push("Preg");
-			suffixes.push("Belly", "Mommy");
-		}
-		if (slave.belly > 150000) {
-			suffixes.push("Balloon");
-		}
-		if (slave.belly > 1500) {
-			suffixes.push("Belly");
-		}
-		if (slave.dick > 0) {
-			if (slave.dick > 4) {
-				names.push("Dangle", "Hung");
-				suffixes.push("Cock", "Dick");
-			}
-			if (slave.balls === 0) {
-				names.push("Cut", "Gelded", "Soft");
-			} else {
-				names.push("Erect", "Hard", "Stiff");
-			}
-		}
-		if (slave.dick === 1) {
-			names.push("Micro", "Tiny");
-			suffixes.push("Bitch");
-		}
-		if (slave.height >= 185) {
-			names.push("Tall", "Top");
-			suffixes.push("Tower");
-		} else if (slave.height < 150) {
-			names.push("Stumpy", "Tiny");
-			suffixes.push("Shortstack", "Stumpy");
-		}
-		if (slave.whoreSkill > 95) {
-			names.push("Money", "Street");
-			suffixes.push("Whore");
-		}
-		if (slave.entertainSkill > 95) {
-			names.push("Easy", "Club");
-			suffixes.push("Slut");
-		}
-		if (slave.oralSkill > 95) {
-			names.push("Suck");
-			suffixes.push("Throat");
-		}
-		if (slave.vaginalSkill > 95) {
-			suffixes.push("Channel", "Kegel", "Pussy");
-		}
-		if (slave.analSkill > 95) {
-			suffixes.push("Asspussy", "Sphincter");
-		}
-		if (slave.intelligence+slave.intelligenceImplant > 50) {
-			names.push("Bright", "Clever", "Smart");
-			if (slave.intelligenceImplant >= 15) {
-				names.push("College", "Graduate", "Nerdy");
-			}
-		} else if (slave.intelligence+slave.intelligenceImplant < -50) {
-			names.push("Cretin", "Dumb", "Retarded", "Stupid");
-		}
-		if (slave.vagina === 1 && slave.vaginaSkill <= 10) {
-			names.push("Fresh", "New", "Tight");
-		}
-		if (slave.devotion < -75) {
-			names.push("Angry", "Biter", "Caged");
-		} else if (slave.devotion < -50) {
-			names.push("Cell", "Cuffs");
-		} else if (slave.devotion < -20) {
-			names.push("Bag", "Box");
-		} else if (slave.devotion <= 20) {
-			names.push("Sad", "Whiner");
-		} else if (slave.devotion > 50) {
-			names.push("Prize");
-			if (slave.visualAge > 35) {
-				names.push("Queen");
-			} else if (slave.visualAge < 25) {
-				names.push("Princess");
-			}
-		}
-		if (slave.trust < -50) {
-			names.push("Screaming");
-			suffixes.push("Sobber");
-		} else if (slave.trust < -20) {
-			names.push("Crying");
-			suffixes.push("Meat", "Tears", "Thing", "Weeper");
-		} else if (slave.trust < 20) {
-			names.push("Begging");
-		}
-
-		if (slave.dick === 0) {
-			if (slave.vagina === -1) {
-				suffixes.push("Null");
-			} else {
-				if (slave.visualAge < 25) {
-					suffixes.push("Girl");
-				}
-			}
-		} else {
-			if (slave.vagina !== -1) {
-				suffixes.push("Futa");
-			} else {
-				if (slave.balls > 0) {
-					if (slave.boobs > 300 && slave.butt > 2) { /* SHEMALES: cock & balls, T&A above minimum */
-						suffixes.push("Shemale");
-					} else {
-						if (slave.shoulders < 1 && slave.muscles <= 30) {
-							if (slave.faceShape === "masculine" || slave.faceShape === "androgynous") { /* SISSIES: feminine shoulders or muscles, masculine faces */
-								suffixes.push("Sissy");
-							} else { /* TRAPS: feminine shoulders or muscles, feminine faces */
-								suffixes.push("Trap");
-							}
-						} else { /* BITCHES: masculine shoulders or muscles */
-							suffixes.push("Bitch");
-						}
-					}
-				} else {
-					if (slave.visualAge > 35) {
-						suffixes.push("DickMILF");
-					} else if (slave.visualAge >= 25) {
-						suffixes.push("Dickslave");
-					} else {
-						suffixes.push("Dickgirl");
-					}
-				}
-			}
-		}
-		if (slave.anus > 0) {
-			suffixes.push("Anus", "Asshole", "Backdoor", "Butt", "Butthole");
-		}
-		if (slave.anus === 1) {
-			suffixes.push("Tightass", "Tightbutt");
-		}
-		if (slave.vagina > 0) {
-			suffixes.push("Cunt", "Pussy", "Vagina");
-		}
-		if (slave.boobs < 500 && slave.butt < 3 && slave.dick > 0) {
-			suffixes.push("Bitch", "Bottom", "Sissy", "Trap");
-		}
-		if (slave.energy > 95) {
-			suffixes.push("Fuck", "Fuckaddict", "Nympho", "Sexaddict");
-		}
-		if (slave.fetishKnown === 1) {
-			if (slave.fetish === "humiliation") {
-				suffixes.push("Rapebait", "Showgirl");
-			}
-			if (slave.fetish === "submissive") {
-				suffixes.push("Bottom", "Fuckee", "Rapebait");
-			}
-			if (slave.fetish === "dom") {
-				suffixes.push("Dom", "Fucker", "Top");
-			}
-			if (slave.fetish === "pregnancy") {
-				suffixes.push("Breeder", "Mommy");
-			}
-			if (slave.fetish === "boobs") {
-				suffixes.push("Boob", "Boobie", "Tit", "Titty");
-			}
-		}
-		if (slave.births >= 2) {
-			suffixes.push("Breeder");
-			if (slave.births >= 5) {
-				suffixes.push("Broodmother");
-			}
-		}
-		if (slave.areolae > 2) {
-			suffixes.push("Areolas", "Headlights");
-		}
-		if (slave.lips > 40) {
-			suffixes.push("Lips", "Pillows");
-		}
-		if (slave.labia > 1) {
-			suffixes.push("Curtains", "Flower", "Lips");
-		}
-		if (slave.breedingMark === 1 && V.propOutcome === 1) {
-			suffixes.push("Breeder", "Oven", "Womb");
-		}
-		if (slave.butt > 5) {
-			suffixes.push("Ass", "Bottom", "Butt");
-		}
-		if (slave.vagina === 0) {
-			suffixes.push("Virgin");
-		}
-
-		slave.slaveName = jsEither(names);
-	}
-	if (leadershipPosition.includes(slave.assignment)) {
-		switch (slave.assignment) {
-			case "be the Attendant":
-				slave.slaveName = jsEither(["Bath", "Spa"]);
-				break;
-			case "be the Matron":
-				slave.slaveName = jsEither(["Nursery", "Matron"]);
-				break;
-			case "be the Stewardess":
-				slave.slaveName = jsEither(["Servant", "Maid"]);
-				break;
-			case "be the Milkmaid":
-				if (V.cumSlaves > 3) {
-					slave.slaveName = jsEither(["Fucker", "Milker"]);
-				} else {
-					slave.slaveName = jsEither(["Dairy", "Farm"]);
-				}
-				break;
-			case "be the Farmer":
-				slave.slaveName = jsEither(["Farmhand", "Farmer"]);
-				break;
-			case "be the DJ":
-				slave.slaveName = jsEither(["Bass", "Booth"]);
-				break;
-			case "be your Concubine":
-				slave.slaveName = jsEither(["Bed", "Master"]);
-				break;
-			case "be the Madam":
-				slave.slaveName = jsEither(["Madam", "Pimp"]);
-				break;
-			case "be the Schoolteacher":
-				slave.slaveName = jsEither(["Classroom", "Teacher"]);
-				break;
-			case "be the Wardeness":
-				slave.slaveName = jsEither(["Jail", "Prison"]);
-				break;
-			case "be the Nurse":
-				slave.slaveName = jsEither(["Clinic", "Nurse"]);
-				break;
-			case "be your Head Girl":
-				slave.slaveName = jsEither(["Chief", "Head"]);
-				break;
-			case "guard you":
-				slave.slaveName = jsEither(["Battle", "Guard"]);
-				break;
-			case "recruit girls":
-				slave.slaveName = jsEither(["Cam", "Recruiter"]);
-				break;
-		}
-	}
-	let surname = jsEither(suffixes);
-	if (typeof surname === "string" && surname.toLowerCase() === slave.slaveName.toLowerCase()) {
-		DegradingName(slave);
-	}
-	slave.slaveName = capFirstChar(slave.slaveName);
-	slave.slaveSurname = surname;
-};
-
-window.SlaveSort = function SlaveSort(slaves, main=false) {
-	const V = State.variables;
-	if (main) {
-		switch (V.sortSlavesBy) {
-		case "name":
-			if (V.sortSlavesOrder === "ascending")
-				slaves = slaves.sort((a, b) => a.slaveName < b.slaveName ? -1 : 1);
-			else
-				slaves = slaves.sort((a, b) => a.slaveName > b.slaveName ? -1 : 1);
-			break;
-		case "assignment":
-			if (V.sortSlavesOrder === "ascending")
-				slaves = slaves.sort((a, b) => a.assignment < b.assignment ? -1 : 1);
-			else
-				slaves = slaves.sort((a, b) => a.assignment > b.assignment ? -1 : 1);
-			break;
-		case "seniority":
-			if (V.sortSlavesOrder === "ascending")
-				slaves = slaves.sort((a, b) => b.weekAcquired - a.weekAcquired);
-			else
-				slaves = slaves.sort((a, b) => a.weekAcquired - b.weekAcquired);
-			break;
-		case "actualAge":
-			if (V.sortSlavesOrder === "ascending")
-				slaves = slaves.sort((a, b) => a.actualAge - b.actualAge);
-			else
-				slaves = slaves.sort((a, b) => b.actualAge - a.actualAge);
-			break;
-		case "visualAge":
-			if (V.sortSlavesOrder === "ascending")
-				slaves = slaves.sort((a, b) => a.visualAge - b.visualAge);
-			else
-				slaves = slaves.sort((a, b) => b.visualAge - a.visualAge);
-			break;
-		case "physicalAge":
-			if (V.sortSlavesOrder === "physicalAge")
-				slaves = slaves.sort((a, b) => a.physicalAge - b.physicalAge);
-			else
-				slaves = slaves.sort((a, b) => b.physicalAge - a.physicalAge);
-			break;
-		default:
-			if (V.sortSlavesOrder === "ascending")
-				slaves = slaves.sort((a, b) => a.devotion - b.devotion);
-			else
-				slaves = slaves.sort((a, b) => b.devotion - a.devotion);
-			break;
-		}
-		V.slaveIndices = slaves2indices();
-	} else {
-		V.slaveIndices = slaves2indices();
-		filterInPlace(slaves, s => V.slaveIndices[s] !== undefined);
-		slaves.sort((a, b) => V.slaveIndices[a] - V.slaveIndices[b]);
-	}
-};
-
-window.slaveSortMinor = function slaveSortMinor(slaves) {
-	slaves = slaves.sort((a, b) => a.slaveName < b.slaveName ? -1 : 1);
-}
-
-window.MenialPopCap = function MenialPopCap () {
-	const V = State.variables;
-	let popCap = 500;
-	let r = "";
-
-	for (let mwi = 20; mwi < V.sectors.length; mwi++) {
-		if (V.sectors[mwi].type === "Pens") {
-			popCap += 500;
-		}
-	}
-	let overMenialCap = V.menials + V.fuckdolls + V.menialBioreactors - popCap;
-	if (overMenialCap > 0) {
-		let price = menialSlaveCost(-overMenialCap);
-		if (V.menials > 0) {
-			if (V.menials > overMenialCap) {
-				cashX((overMenialCap * price), "menialTrades");
-				V.menialDemandFactor -= overMenialCap;
-				V.menials -= overMenialCap;
-				overMenialCap = 0;
-				r += "You don't have enough room for all your menials and are obliged to sell some.";
-			} else {
-				cashX((V.menials * price), "menialTrades");
-				V.menialDemandFactor -= V.menials;
-				overMenialCap -= V.menials;
-				V.menials = 0;
-				r += "You don't have enough room for your menials and are obliged to sell them.";
-			}
-		}
-		if (overMenialCap > 0 && V.fuckdolls > 0) {
-			if (V.fuckdolls > overMenialCap) {
-				cashX(overMenialCap * (price * 2), "menialTrades");
-				V.menialDemandFactor -= overMenialCap;
-				V.fuckdolls -= overMenialCap;
-				overMenialCap = 0;
-				r += "You don't have enough room for all your Fuckdolls and are obliged to sell some.";
-			} else {
-				cashX(V.fuckdolls * (price * 2), "menialTrades");
-				V.menialDemandFactor -= V.fuckdolls;
-				overMenialCap -= V.fuckdolls;
-				V.fuckdolls = 0;
-				r += "You don't have enough room for your Fuckdolls and are obliged to sell them.";
-			}
-		}
-		if (overMenialCap > 0 && V.menialBioreactors > 0) {
-			cashX(overMenialCap * (price - 100), "menialTrades");
-			V.menialDemandFactor -= overMenialCap;
-			V.menialBioreactors -= overMenialCap;
-			r += "You don't have enough room for all your menial bioreactors and are obliged to sell some.";
-		}
-	}
-	V.PopCap = popCap;
-	return r;
-};
-
-window.faceIncrease = function faceIncrease(slave, amount) {
-	const pronouns = getPronouns(slave);
-	const his = pronouns.possessive;
-	const His = capFirstChar(his);
-	let r = "";
-	if (slave.face <= -95)
-		r += `<span class="green">${His} face is no longer horrifying,</span> and is now merely ugly.`;
-	else if (slave.face <= -40 && slave.face + amount > -40)
-		r += `<span class="green">${His} face is no longer ugly,</span> and is now merely unattractive.`;
-	else if (slave.face <= -10 && slave.face + amount > -10)
-		r += `<span class="green">${His} face is no longer unattractive,</span> and is now somewhat tolerable.`;
-	else if (slave.face <= 10 && slave.face + amount > 10)
-		r += `<span class="green">${His} face is now decently attractive,</span> rather than merely tolerable.`;
-	else if (slave.face <= 40 && slave.face + amount > 40)
-		r += `<span class="green">${His} face is now quite beautiful,</span> rather than merely pretty.`;
-	else if (slave.face <= 95 && slave.face + amount > 95)
-		r += `<span class="green">${His} face is now perfect.</span> It's difficult to imagine how it could be any more beautiful.`;
-	slave.face = Math.clamp(slave.face + amount,-100,100);
-	if (slave.face > 95) slave.face = 100;
-	return r;
-};
-
-window.Deadliness = function Deadliness(slave) {
-	const V = State.variables;
-	let deadliness = 2;
-
-	if (slave.combatSkill > 0) {
-		deadliness += 2;
-	}
-
-	if (setup.bodyguardCareers.includes(slave.career)) {
-		deadliness += 1;
-	} else if (slave.skillBG >= V.masteredXP) {
-		deadliness += 1;
-	}
-
-	if (slave.muscles > 30 && slave.muscles <= 95) {
-		deadliness += 1;
-	} else if (slave.muscles > 95 && slave.height >= 185) {
-		deadliness += 2;
-	} else if (slave.muscles > 95) {
-		deadliness -= 1;
-	} else if (slave.muscles < -95) {
-		deadliness -= 20;
-	} else if (slave.muscles < -30) {
-		deadliness -= 7;
-	} else if (slave.muscles < -5) {
-		deadliness -= 3;
-	}
-
-	if (slave.height >= 170) {
-		deadliness += 1;
-	}
-
-	if (slave.health > 50) {
-		deadliness += 1;
-	}
-
-	if (slave.boobs > 4000) {
-		deadliness -= 2;
-	} else if (slave.boobs > 2000) {
-		deadliness -= 1;
-	}
-
-	if (slave.butt > 6) {
-		deadliness -= 1;
-	}
-
-	if (slave.hips > 2) {
-		deadliness -= 1;
-	}
-
-	if (slave.weight > 190) {
-		deadliness -= 20;
-	} else if (slave.weight > 160) {
-		deadliness -= 10;
-	} else if (slave.weight > 130) {
-		deadliness -= 3;
-	} else if (slave.weight > 30 || slave.weight < -10) {
-		deadliness -= 1;
-	}
-
-	if (slave.health < -50) {
-		deadliness -= 1;
-	}
-
-	if (slave.bellyFluid >= 10000) {
-		deadliness -= 3;
-	} else if (slave.bellyFluid >= 5000) {
-		deadliness -= 2;
-	} else if (slave.bellyFluid >= 2000) {
-		deadliness -= 1;
-	}
-
-	if (slave.pregKnown === 1 || slave.bellyPreg >= 1500 || slave.bellyImplant >= 1500) {
-		if (slave.belly >= 750000) {
-			deadliness -= 50;
-		} else if (slave.belly >= 600000) {
-			deadliness -= 25;
-		} else if (slave.belly >= 450000) {
-			deadliness -= 15;
-		} else if (slave.belly >= 300000) {
-			deadliness -= 10;
-		} else if (slave.belly >= 150000) {
-			deadliness -= 8;
-		} else if (slave.belly >= 100000) {
-			deadliness -= 7;
-		} else if (slave.belly >= 10000) {
-			deadliness -= 3;
-		} else if (slave.belly >= 5000) {
-			deadliness -= 2;
-		} else {
-			deadliness -= 1;
-		}
-	}
-
-	if (slave.labor === 1) {
-		deadliness -= 15;
-	} else if (slave.preg >= slave.pregData.normalBirth && slave.pregControl !== "labor suppressors") {
-		deadliness -= 5;
-	}
-
-	if (slave.balls >= 15) {
-		deadliness -= 1;
-	}
-
-	if (slave.dick >= 10) {
-		deadliness -= 1;
-	}
-
-	if (slave.amp === 0) {
-		if (!canWalk(slave)) {
-			deadliness -= 20;
-		}
-	} else if (slave.amp === 1) {
-		deadliness -= 20;
-	} else if (slave.amp === -5) {
-		deadliness += 10;
-	} else if (slave.amp === -4) {
-		deadliness += 5;
-	} else {
-		deadliness -= 1;
-	}
-
-	if (!canSee(slave)) {
-		deadliness -= 8;
-	} else if ((slave.eyes === -1 && !["corrective glasses", "corrective contacts"].includes(slave.eyewear)) || (slave.eyes === 1 && ["blurring glasses", "blurring contacts"].includes(slave.eyewear))) {
-		deadliness -= 1;
-	}
-
-	if (!canHear(slave)) {
-		deadliness -= 4;
-	} else if ((slave.hears == -1 && slave.earwear !== "hearing aids") || (slave.hears == 0 && slave.earwear === "muffling ear plugs")) {
-		deadliness -= 1;
-	}
-
-	return Math.max(deadliness, 1);
-};
-
-/*:: Summary Widgets JS [script]*/
-
-window.SlaveStatClamp = function SlaveStatClamp(slave) {
-	slave.energy = Math.clamp(slave.energy, 0, 100);
-	const V = State.variables;
-
-	if (slave.devotion > 100) {
-		if (slave.trust < -95)
-			slave.trust = -100;
-		else if ((slave.trust < 100) && (slave.trust > 20))
-			slave.trust += (Math.trunc((slave.devotion-100)*5)/10);
-		else
-			V.rep += 10*(slave.devotion-100);
-		slave.devotion = 100;
-	} else if (slave.devotion < -95)
-		slave.devotion = -100;
-	if (slave.trust > 100) {
-		if (slave.devotion < -95)
-			slave.devotion = -100;
-		else if (slave.devotion < 100 && slave.devotion > 20)
-			slave.devotion += Math.trunc(slave.trust-100);
-		else
-			V.rep += 10*(slave.trust-100);
-		slave.trust = 100;
-	} else if (slave.trust < -95)
-		slave.trust = -100;
-	if (slave.trust < -100)
-		slave.trust = -100;
-	if (slave.devotion < -100)
-		slave.devotion = -100;
-	if (isNaN(slave.oralCount)) {
-		slave.oralCount = 0;
-		alert("Oral count has broken, report what you just did!");
-	}
-	if (isNaN(slave.analCount)) {
-		slave.analCount = 0;
-		alert("Anal count has broken, report what you just did!");
-	}
-	if (isNaN(slave.vaginalCount)) {
-		slave.vaginalCount = 0;
-		alert("Vaginal count has broken, report what you just did!");
-	}
-	if (isNaN(slave.mammaryCount)) {
-		slave.mammaryCount = 0;
-		alert("Titfuck count has broken, report what you just did!");
-	}
-	if (isNaN(slave.penetrativeCount)) {
-		slave.penetrativeCount = 0;
-		alert("Penetration count has broken, report what you just did!");
-	}
-	if (slave.foreskin === undefined)
-		slave.foreskin = 0;
-	if (slave.amp != 0 && slave.heels == 1)
-		slave.heels = 0;
-	if (slave.vagina < 0 && slave.mpreg == 0 && slave.preg == -1) {
-		slave.preg = 0;
-		WombFlush(slave);
-	}
-
-};
-
-/*:: assignJob [script]*/
-
-window.assignJob = function assignJob(slave, job) {
-	"use strict";
-	const V = State.variables;
-	let r = "";
-
-	if (job === "Pit" || job === "Coursing Association")
-		return r;
-
-	removeJob(slave, slave.assignment);
-	const idx = V.slaveIndices[slave.ID];
-
-	/* use .toLowerCase() to get rid of a few dupe conditions. */
-	switch (job.toLowerCase()) {
-		case "be confined in the arcade":
-		case "arcade":
-			slave.assignment = "be confined in the arcade";
-			slave.assignmentVisible = 0;
-			V.arcadeSlaves++;
-			V.ArcadeiIDs.push(slave.ID);
-			slave.clothing = "none";
-			slave.shoes = "none";
-			slave.collar = "none";
-			slave.livingRules = "spare";
-			break;
-
-		case "work in the brothel":
-		case "brothel":
-			slave.assignment = "work in the brothel";
-			slave.assignmentVisible = 0;
-			V.brothelSlaves++;
-			V.BrothiIDs.push(slave.ID);
-			switch (V.brothelDecoration) {
-				case "Degradationist":
-				case "standard":
-					slave.livingRules = "spare";
-					break;
-				default:
-					slave.livingRules = "normal";
-					break;
-			}
-			break;
-
-		case "be confined in the cellblock":
-		case "cellblock":
-			slave.assignment = "be confined in the cellblock";
-			slave.assignmentVisible = 0;
-			V.cellblockSlaves++;
-			V.CellBiIDs.push(slave.ID);
-			switch (V.cellblockDecoration) {
-				case "Paternalist":
-					slave.livingRules = "normal";
-					break;
-				default:
-					slave.livingRules = "spare";
-					break;
-			}
-			break;
-
-		case "get treatment in the clinic":
-		case "clinic":
-			slave.assignment = "get treatment in the clinic";
-			slave.assignmentVisible = 0;
-			V.clinicSlaves++;
-			V.CliniciIDs.push(slave.ID);
-			switch (V.clinicDecoration) {
-				case "Repopulation Focus":
-				case "Eugenics":
-				case "Gender Radicalist":
-				case "Gender Fundamentalist":
-				case "Paternalist":
-				case "Maturity Preferentialist":
-				case "Youth Preferentialist":
-				case "Slimness Enthusiast":
-				case "Hedonistic":
-					slave.livingRules = "luxurious";
-					break;
-
-				case "Roman Revivalist":
-				case "Aztec Revivalist":
-				case "Egyptian Revivalist":
-				case "Arabian Revivalist":
-				case "Chinese Revivalist":
-				case "Chattel Religionist":
-				case "Edo Revivalist":
-					slave.livingRules = "normal";
-					break;
-
-				default:
-					slave.livingRules = "spare";
-					break;
-			}
-			break;
-
-		case "serve in the club":
-		case "club":
-			slave.assignment = "serve in the club";
-			slave.assignmentVisible = 0;
-			V.clubSlaves++;
-			V.ClubiIDs.push(slave.ID);
-			slave.livingRules = "normal";
-			break;
-
-		case "work in the dairy":
-		case "dairy":
-			slave.assignment = "work in the dairy";
-			slave.assignmentVisible = 0;
-			V.dairySlaves++;
-			V.DairyiIDs.push(slave.ID);
-			switch (V.dairyDecoration) {
-				case "Roman Revivalist":
-				case "Aztec Revivalist":
-				case "Chinese Revivalist":
-				case "Chattel Religionist":
-				case "Edo Revivalist":
-				case "Arabian Revivalist":
-				case "Egyptian Revivalist":
-				case "Supremacist":
-				case "Subjugationist":
-				case "Degradationist":
-					slave.livingRules = "spare";
-					break;
-				default:
-					slave.livingRules = "normal";
-					break;
-			}
-			break;
-
-		case "work as a farmhand":
-		case "farmyard":
-			slave.assignment = "work as a farmhand";
-			slave.assignmentVisible = 0;
-			V.farmyardSlaves++;
-			V.FarmyardiIDs.push(slave.ID);
-			switch (V.farmyardDecoration) {
-				case "Aztec Revivalist":
-				case "Chinese Revivalist":
-				case "Chattel Religionist":
-				case "Edo Revivalist":
-				case "Arabian Revivalist":
-				case "Egyptian Revivalist":
-				case "Supremacist":
-				case "Subjugationist":
-				case "Degradationist":
-					slave.livingRules = "spare";
-					break;
-				case "Roman Revivalist":
-					slave.livingRules = "luxurious";
-					break;
-				default:
-					slave.livingRules = "normal";
-					break;
-			}
-			break;
-
-		case "live with your head girl":
-		case "head girl suite":
-		case "hgsuite":
-			slave.assignment = "live with your Head Girl";
-			slave.assignmentVisible = 0;
-			V.HGSuiteSlaves++;
-			V.HGSuiteiIDs.push(slave.ID);
-			slave.livingRules = "luxurious";
-			break;
-
-		case "serve in the master suite":
-		case "master suite":
-		case "mastersuite":
-			slave.assignment = "serve in the master suite";
-			slave.assignmentVisible = 0;
-			V.masterSuiteSlaves++;
-			V.MastSiIDs.push(slave.ID);
-			if(V.masterSuiteUpgradeLuxury > 0)
-				slave.livingRules = "luxurious";
-			else
-				slave.livingRules = "spare";
-			break;
-
-		case "learn in the schoolroom":
-		case "schoolroom":
-			slave.assignment = "learn in the schoolroom";
-			slave.assignmentVisible = 0;
-			V.schoolroomSlaves++;
-			V.SchlRiIDs.push(slave.ID);
-			slave.livingRules = "normal";
-			break;
-
-		case "work as a servant":
-		case "servants' quarters":
-		case "servantsquarters":
-			slave.assignment = "work as a servant";
-			slave.assignmentVisible = 0;
-			V.servantsQuartersSlaves++;
-			V.ServQiIDs.push(slave.ID);
-			switch (V.servantsQuartersDecoration) {
-				case "Roman Revivalist":
-				case "Aztec Revivalist":
-				case "Chinese Revivalist":
-				case "Chattel Religionist":
-				case "Edo Revivalist":
-				case "Supremacist":
-				case "Subjugationist":
-				case "Degradationist":
-				case "Arabian Revivalist":
-				case "Egyptian Revivalist":
-					slave.livingRules = "spare";
-					break;
-				default:
-					slave.livingRules = "normal";
-					break;
-			}
-			break;
-
-		case "rest in the spa":
-		case "spa":
-			slave.assignment = "rest in the spa";
-			slave.assignmentVisible = 0;
-			V.spaSlaves++;
-			V.SpaiIDs.push(slave.ID);
-			switch (V.spaDecoration) {
-				case "Chattel Religionist":
-				case "Chinese Revivalist":
-					slave.livingRules = "normal";
-					break;
-				case "Degradationist":
-					slave.livingRules = "spare";
-					break;
-				default:
-					slave.livingRules = "luxurious";
-					break;
-			}
-			break;
-
-		case "work as a nanny":
-		case "nursery":
-			slave.assignment = "work as a nanny";
-			slave.assignmentVisible = 0;
-			V.nurserySlaves++;
-			V.NurseryiIDs.push(slave.ID);
-			slave.livingRules = "normal";
-			break;
-
-		case "be the attendant":
-		case "be the matron":
-		case "be the dj":
-		case "be the madam":
-		case "be the milkmaid":
-		case "be the farmer":
-		case "be the nurse":
-		case "be the schoolteacher":
-		case "be the stewardess":
-		case "be the wardeness":
-		case "be the matron":
-			slave.assignment = job;
-			slave.assignmentVisible = 0; /* non-visible leadership roles */
-			slave.livingRules = "luxurious";
-			break;
-
-		case "be your concubine":
-			slave.assignment = job;
-			slave.assignmentVisible = 0; /* non-visible leadership roles */
-			if(V.masterSuiteUpgradeLuxury > 0)
-				slave.livingRules = "luxurious";
-			else
-				slave.livingRules = "normal";
-			break;
-
-		case "be your head girl":
-			slave.assignment = job;
-			if (V.HGSuite === 1) {
-				slave.livingRules = "luxurious";
-			}
-			break;
-
-		case "guard you":
-			slave.assignment = job;
-			if (V.dojo > 1) {
-				slave.livingRules = "luxurious";
-			}
-			if (V.pitBG == 1 && V.fighterIDs.includes(slave.ID))
-				V.fighterIDs.delete(slave.ID);
-			break;
-
-		case "be your agent":
-		case "live with your agent":
-			slave.assignment = job;
-			slave.assignmentVisible = 0;
-			slave.useRulesAssistant = 0; /* non-visible roles exempt from Rules Assistant */
-			if (job === "be your agent") {
-				V.leaders.push(slave);
-			}
-			break;
-
-		case "choose her own job":
-			slave.assignment = job;
-			slave.choosesOwnAssignment = 1; /* removeJob already set assignmentVisible = 1 */
-			break;
-
-		default:
-			slave.assignment = job; /* removeJob already set assignmentVisible = 1 and choosesOwnAssignment = 0 */
-			break;
-	}
-
-	if (slave.assignmentVisible === 0 && Array.isArray(V.personalAttention)) {
-		const awi = V.personalAttention.findIndex(function(s) { return s.ID === slave.ID; });
-		if (awi != -1) {
-			V.personalAttention.deleteAt(awi);
-			if (V.personalAttention.length === 0) {
-				if (V.PC.career === "escort")
-					V.personalAttention = "whoring";
-				else if (V.PC.career === "servant")
-					V.personalAttention = "upkeep";
-				else
-					V.personalAttention = "business";
-				r += `${slave.slaveName} no longer has your personal attention; you plan to focus on ${V.personalAttention}.`;
-			} else
-				r += `${slave.slaveName} no longer has your personal attention.`;
-		}
-	}
-	if (idx >= 0)
-		V.slaves[idx] = slave;
-
-	return r;
-};
-
-window.removeJob = function removeJob(slave, assignment) {
-	"use strict";
-	const V = State.variables;
-	let r = "";
-
-	const idx = V.slaveIndices[slave.ID];
-
-	if (assignment === "Pit")
-		V.fighterIDs.delete(slave.ID);
-
-	else if (assignment === "Coursing Association")
-		V.Lurcher = 0;
-
-	else {
-		if (V.HeadGirl !== 0 && slave.ID === V.HeadGirl.ID)
-			V.HeadGirl = 0;
-		else if (V.Recruiter !== 0 && slave.ID === V.Recruiter.ID)
-			V.Recruiter = 0;
-		else if (V.Bodyguard !== 0 && slave.ID === V.Bodyguard.ID)
-			V.Bodyguard = 0;
-		else if (V.Madam !== 0 && slave.ID === V.Madam.ID)
-			V.Madam = 0;
-		else if (V.DJ !== 0 && slave.ID === V.DJ.ID)
-			V.DJ = 0;
-		else if (V.Milkmaid !== 0 && slave.ID === V.Milkmaid.ID)
-			V.Milkmaid = 0;
-		else if (V.Farmer !== 0 && slave.ID === V.Farmer.ID)
-			V.Farmer = 0;
-		else if (V.Schoolteacher !== 0 && slave.ID === V.Schoolteacher.ID)
-			V.Schoolteacher = 0;
-		else if (V.Attendant !== 0 && slave.ID === V.Attendant.ID)
-			V.Attendant = 0;
-		else if (V.Matron !== 0 && slave.ID === V.Matron.ID)
-			V.Matron = 0;
-		else if (V.Nurse !== 0 && slave.ID === V.Nurse.ID)
-			V.Nurse = 0;
-		else if (V.Stewardess !== 0 && slave.ID === V.Stewardess.ID)
-			V.Stewardess = 0;
-		else if (V.Wardeness !== 0 && slave.ID === V.Wardeness.ID)
-			V.Wardeness = 0;
-		else if (V.Concubine !== 0 && slave.ID === V.Concubine.ID)
-			V.Concubine = 0;
-		else if (V.Collectrix !== 0 && slave.ID === V.Collectrix.ID)
-			V.Collectrix = 0;
-
-		/* use .toLowerCase() to get rid of a few dupe conditions. */
-		switch (assignment.toLowerCase()) {
-		case "be confined in the arcade":
-		case "arcade":
-			slave.assignment = "work a glory hole";
-			V.ArcadeiIDs.delete(slave.ID);
-			V.arcadeSlaves--;
-			break;
-
-		case "work in the brothel":
-		case "brothel":
-			slave.assignment = "whore";
-			V.BrothiIDs.delete(slave.ID);
-			V.brothelSlaves--;
-			break;
-
-		case "be confined in the cellblock":
-		case "cellblock":
-			slave.assignment = "rest";
-			if (slave.inflation > 0) {
-				slave.inflation = 0;
-				slave.inflationType = "none";
-				slave.inflationMethod = 0;
-				SetBellySize(slave);
-			}
-			V.CellBiIDs.delete(slave.ID);
-			V.cellblockSlaves--;
-			break;
-
-		case "get treatment in the clinic":
-		case "clinic":
-			slave.assignment = "rest";
-			V.CliniciIDs.delete(slave.ID);
-			V.clinicSlaves--;
-			break;
-
-		case "serve in the club":
-		case "club":
-			slave.assignment = "serve the public";
-			V.ClubiIDs.delete(slave.ID);
-			V.clubSlaves--;
-			break;
-
-		case "work in the dairy":
-		case "dairy":
-			slave.assignment = "get milked";
-			V.DairyiIDs.delete(slave.ID);
-			V.dairySlaves--;
-			break;
-
-		case "work as a farmhand":
-		case "farmyard":
-			slave.assignment = "rest";
-			V.FarmyardiIDs.delete(slave.ID);
-			V.farmyardSlaves--;
-			break;
-
-		case "learn in the schoolroom":
-		case "schoolroom":
-			slave.assignment = "rest";
-			V.SchlRiIDs.delete(slave.ID);
-			V.schoolroomSlaves--;
-			break;
-
-		case "rest in the spa":
-		case "spa":
-			slave.assignment = "rest";
-			V.SpaiIDs.delete(slave.ID);
-			V.spaSlaves--;
-			break;
-
-		case "work as a servant":
-		case "servants' quarters":
-		case "servantsquarters":
-			slave.assignment = "be a servant";
-			V.ServQiIDs.delete(slave.ID);
-			V.servantsQuartersSlaves--;
-			break;
-
-		case "serve in the master suite":
-		case "master suite":
-		case "mastersuite":
-			slave.assignment = "please you";
-			V.MastSiIDs.delete(slave.ID);
-			V.masterSuiteSlaves--;
-			break;
-
-		case "live with your head girl":
-		case "head girl suite":
-		case "hgsuite":
-			slave.assignment = "rest";
-			V.HGSuiteiIDs.delete(slave.ID);
-			V.HGSuiteSlaves--;
-			break;
-
-		case "work as a nanny":
-		case "nursery":
-			slave.assignment = "rest";
-			V.NurseryiIDs.delete(slave.ID);
-			V.nurserySlaves--;
-			break;
-
-		case "be your head girl":
-			slave.assignment = "rest";
-			if (V.HGSuiteEquality === 0 && V.personalAttention === "HG") {
-				if (V.PC.career === "escort")
-					V.personalAttention = "whoring";
-				else if (V.PC.career === "servant")
-					V.personalAttention = "upkeep";
-				else
-					V.personalAttention = "business";
-
-				r += `You no longer have a slave assigned to be your Head Girl, so you turn your personal attention to focus on ${V.personalAttention}.`;
-			}
-			break;
-
-		case "be your agent":
-		case "live with your agent":
-			slave.assignment = "rest";
-			const _leaderIndex = V.leaders.findIndex(function(x) { return x.ID === slave.ID; });
-			if (_leaderIndex !== -1)
-				V.leaders.deleteAt(_leaderIndex);
-
-			if (slave.relationshipTarget > 0) { /* following code assumes there can be at most one companion */
-				const _lover = V.slaves.findIndex(function(s) { return haveRelationshipP(s, slave) && s.assignment === "live with your agent"; });
-				if (_lover !== -1) {
-					V.slaves[_lover].assignment = "rest";
-					V.slaves[_lover].assignmentVisible = 1;
-				}
-			}
-			break;
-
-		default:
-			slave.assignment = "rest";
-			break;
-		}
-
-		if (slave.livingRules === "luxurious" && slave.assignmentVisible !== 1)
-			slave.livingRules = "normal";
-
-		slave.assignmentVisible = 1;
-		slave.choosesOwnAssignment = 0;
-		slave.sentence = 0;
-	}
-	if (idx >= 0)
-		V.slaves[idx] = slave;
-
-	return r;
-};
-
-/*:: birthJS [script]*/
-
-window.BirthDestinationText = function(choice,slave) {
-	var pronouns = getPronouns(slave);
-	var he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	var He = capFirstChar(he), His = capFirstChar(his);
-	const V = State.variables,T = State.temporary, sn = SlaveFullName(slave);
-	var child = T.count > 1 ? 'children' : 'child';
-	var r = ``;
-	if (T.call !== 1) { if (choice !== "Private") r += `sent to one of ${V.arcologies[0].name}'s `;
-	} else { if (choice !== "Sold") r += ` ${sn} `;
-	}
-	switch(choice) {
-		case "Breeder":
-			if (T.call !== 1) r += `future minded schools, to be administered fertility and virility treatments as well as be brought up to take pride in reproduction. ${sn} `;
-			if (slave.fetish == "mindbroken" || slave.fuckdoll > 0) {
-				r += `has few thoughts about the matter.`;
-			} else if (slave.devotion > 95) {
-				r += `loves you already, but ${he}'ll <span class='hotpink'>love you even more</span> for this. ${He} can't wait to see ${his} ${child} proudly furthering your cause.`;
-				slave.devotion += 4;
-			} else if (slave.devotion > 50) {
-				r += `heard about these and will be <span class='hotpink;happy that ${his} ${child} will have a purpose in your society other than slavery.</span> ${He} will miss ${his} ${child}, but ${he} expected that.`;
-				slave.devotion += 4;
-			} else if (slave.devotion > 20) {
-				r += `will naturally miss ${his} ${child}, but will is broken enough to hope that ${his} offspring will have a better life, or at least an enjoyable one.`;
-			} else {
-				r += `will of course <span class='mediumorchid'>hate you for this.</span> The mere thought of ${his} ${V.fertilityAge} year old daughter${T.count > 1 ? 's':''} swollen with life, and proud of it, fills ${him} with <span class='gold'>disdain.</span>`;
-				slave.devotion -= 4, slave.trust -= 4;
-			}
-			break;
-		case "Orphanage":
-			if (slave.fetish == "mindbroken" || slave.fuckdoll > 0) {
-			r += `has few thoughts about the matter.`;
-			} else if (slave.devotion > 95) {
-				r += `worships you so completely that ${he} will not resent this.`;
-			} else if ( slave.devotion > 50) {
-				r += `is devoted to you, but ${he} will <span class='mediumorchid'>struggle to accept this.</span>`;
-				slave.devotion -= 2;
-			} else if ( slave.devotion > 20) {
-				r += `has accepted being a sex slave, but ${he} will <span class='mediumorchid'>resent this intensely.</span>`;
-				slave.devotion -= 3;
-			} else {
-				r += `will of course <span class='mediumorchid'>hate you for this.</span>`;
-				slave.devotion -= 4;
-			}
-			break;
-		case "Citizen":
-			if (T.call !== 1) r += `citizen schools, to be brought up coequal with the arcology's other young people. ${sn} `;
-			if (slave.fetish == "mindbroken" || slave.fuckdoll > 0) {
-			r += `has few thoughts about the matter.`;
-			} else if (slave.devotion > 95) {
-				r += `loves you already, but ${he}'ll <span class='hotpink'>love you even more</span> for this.`;
-			} else if (slave.devotion > 50) {
-				r += `knows about these and will be <span class='hotpink'>overjoyed,</span> ${he} will miss ${his} ${child}, but ${he} expected that.`;
-			} else if (slave.devotion > 20) {
-				r += `will naturally miss ${his} ${child}, but will <span class='hotpink;take comfort@@ in the hope that ${his} offspring will have a better life.`;
-			} else {
-				r += `will naturally retain some resentment over being separated from ${his} ${child}, but this should be balanced by hope that ${his} offspring will have a better life.`;
-			}
-			break;
-		case "Private":
-			if (T.call !== 1) r += `${T.count > 1 ? 'ren are':' is'} sent to be privately raised, to be brought up as a future high class citizen. ${sn} `;
-			if (slave.fetish == "mindbroken" || slave.fuckdoll > 0) {
-				r += `has few thoughts about the matter.`;
-			} else if (slave.devotion > 95) {
-				r += `will <span class='hotpink'>worship you utterly</span> for this.`;
-			} else if (slave.devotion > 50) {
-				r += `understands that this is the best possible outcome for the offspring of a slave, and will be <span class='hotpink'>overjoyed.</span>`;
-			} else if (slave.devotion > 20) {
-				r += `will miss ${his} ${child}, but will be <span class='hotpink'>very grateful,</span> since ${he}'ll understand this is the best possible outcome for a slave mother.`;
-			} else {
-				r += `will resent being separated from ${his} ${child}, but <span class='hotpink'>should understand and be grateful</span> that this is the best possible outcome here.`;
-			}
-			r += ` The ${child} will be raised privately, with expert care and tutoring, an expensive proposition.`;
-			break;
-		case "Sold":
-			r += `${T.call !== 1 ? "${V.his} ${T.count > 1 ? 'babies':'baby'}":"Where they"} `;
-			if (slave.prestige > 1 || slave.pornPrestige > 2) {
-				T.babyCost = jsRandom(-12,100);
-				if (slave.prematureBirth > 0) { T.babyCost = jsRandom(-32,40); }
-				r += `went for ${T.curBabies > 1 ? ' a total ':'a'} bid of`;
-			} else {
-				T.babyCost = jsRandom(-12,12);
-				if (slave.prematureBirth > 0) { T.babyCost = -45; }
-				r += `sold for ${T.curBabies > 1 ? ' a total of':''}`;
-			}
-			const cash = cashFormat(T.count*(50+T.babyCost));r += ` <span class='yellowgreen'>${cash}.</span>`;
-			if (slave.prematureBirth > 0) r += ` A low price due to the added costs of caring for ${T.count > 1 ? 'them':'it'}.`;
-			if (slave.devotion > 20) r += ` ${sn} `;
-			if (slave.fetish == "mindbroken" || slave.fuckdoll > 0) {
-				r += `has few thoughts about the matter.`;
-			} else if (slave.devotion > 95) {
-				r += `adheres to your thoughts so strongly that even though you backed out of caring for ${his} ${child}, ${he} still truly believes you are doing ${him} an honor.`;
-			} else if (slave.devotion > 50) {
-				r += `is <span class='mediumorchid'>deeply hurt</span> by your sudden decision to sell ${his} ${child} instead of having ${T.count > 1 ? 'them':'it'} cared for. ${His} trust in your words <span class='gold'>wavers</span> as ${he} thinks of ${his} ${child}'s future.`;
-				slave.trust -= 5, slave.devotion -= 5;
-			} else if (slave.devotion > 20) {
-				r += `is <span class='mediumorchid'>devastated</span> by your sudden decision to sell ${his} ${child} instead of having ${T.count > 1 ? 'them':'it'} cared for. ${His} mind struggles to comprehend <span class='gold'>such betrayal.</span>`;
-				slave.trust -= 10, slave.devotion -= 10;
-			} else {
-				r += `For a moment, ${he} saw a glimmer of good in you; <span class='mediumorchid'>${He} was clearly wrong.</span> ${His} mind struggles to comprehend <span class='gold'>why ${he} could ever even think of trusting such a person.</span>`;
-				slave.trust -= 30, slave.devotion -= 30;
-			}
-			cashX(T.curBabies*(50+T.babyCost), "slaveTransfer", slave);
-			break;
-	}
-	return r;
-};
-
-/*:: generateGenetics [script]*/
-
-// Generates a child's genetics based off mother and father and returns it as an object to be attached to an ovum
-window.generateGenetics = (function() {
-	"use strict";
-	let genes;
-	let mother;
-	let activeMother;
-	let father;
-	let activeFather;
-	let V;
-
-	function generateGenetics(actor1, actor2, x) {
-		V = State.variables;
-		genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, faceShape: "cute", eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", clone: 0, cloneID: 0, geneticQuirks: 0};
-		if (actor1.ID > 0) {
-			mother = V.genePool.find(function(s) { return s.ID == actor1.ID; });
-			if (mother === undefined) {
-				mother = actor1;
-			}
-			activeMother = V.slaves[V.slaveIndices[actor1]];
-			if (activeMother === undefined) {
-				activeMother = actor1;
-			}
-		} else {
-			activeMother = V.PC;
-			mother = V.PC;
-		}
-		if (actor2 > 0) {
-			father = V.genePool.find(function(s) { return s.ID == actor2.ID; });
-			activeFather = V.slaves[V.slaveIndices[actor2]];
-			if (father === undefined) {
-				father = V.slaves[V.slaveIndices[actor2]];
-				activeFather = V.slaves[V.slaveIndices[actor2]];
-			}
-			if (father === undefined) {
-				if (V.incubator > 0) {
-					father = V.tanks.find(function(s) { return s.ID == actor2.ID; });
-					activeFather = 0; // activeFather = father?
-				}
-			}
-			if (father === undefined) {
-				if (V.nursery > 0) {
-					father = V.cribs.find(function(s) { return s.ID == actor2.ID; });
-					activeFather = 0; // activeFather = father?
-				}
-			}
-			if (father === undefined) {
-				father = 0;
-				activeFather = 0;
-			}
-		} else if (actor2 == -1) {
-			father = V.PC;
-			activeFather = V.PC;
-		} else {
-			father = 0;
-			activeFather = 0;
-		}
-
-		genes.gender = setGender(father, mother);
-		genes.name = setName(x);
-		genes.mother = setMotherID(actor1.ID);
-		genes.motherName = setMotherName(activeMother);
-		genes.father = setFatherID(actor2);
-		genes.fatherName = setFatherName(father, activeFather, actor2);
-		genes.nationality = setNationality(father, mother);
-		genes.skin = setSkin(father, mother);
-		genes.race = setRace(father, mother, actor2);
-		genes.intelligence = setIntelligence(father, mother, activeMother, actor2);
-		genes.face = setFace(father, mother, activeMother, actor2);
-		genes.faceShape = setFaceShape(father, mother);
-		genes.eyeColor = setEyeColor(father, mother, actor2);
-		genes.hColor = setHColor(father, mother, actor2);
-		genes.underArmHStyle = setUnderArmHStyle(father, mother);
-		genes.pubicHStyle = setPubicHStyle(father, mother);
-		genes.markings = setMarkings(father, mother);
-		genes.sexualFlaw = setSexualFlaw(father, mother);
-		genes.behavioralFlaw = setBehavioralFlaw(father, mother);
-		genes.fetish = setFetish(father, mother);
-		genes.geneticQuirks = setGeneticQuirks(father, mother, genes.gender);
-
-		return genes;
-	}
-
-	// gender
-	function setGender(father, mother) {
-		let gender;
-		if (V.seeDicksAffectsPregnancy == 1) {
-			gender = Math.floor(Math.random()*100) < V.seeDicks ? "XY" : "XX";
-		} else if (V.adamPrinciple == 1) {
-			if (father !== 0) {
-				if (father.genes == "XX" && mother.genes == "XX") {
-					gender = "XX";
-				} else if (father.genes != mother.genes) {
-					gender = jsEither(["XX", "XY"]);
-				} else {
-					gender = jsEither(["XX", "XY", "XY", "YY"]);
-				}
-			} else {
-				gender = jsEither(["XX", "XY"]);
-			}
-		} else {
-			gender = jsEither(["XX", "XY"]);
-		}
-		return gender;
-	}
-
-	// name
-	function setName(x) {
-		return "ovum" + x;
-	}
-
-	// motherID
-	function setMotherID(actor1ID) {
-		return actor1ID;
-	}
-
-	// motherName
-	function setMotherName(activeMother) {
-		let motherName;
-		if (activeMother.ID == -1) {
-			motherName = activeMother.name;
-			if (activeMother.surname !== 0 && activeMother.surname !== "") { motherName + " " + activeMother.surname; }
-		} else {
-			motherName = activeMother.slaveName;
-			if (activeMother.slaveSurname !== 0 && activeMother.slaveSurname !== "") { motherName + " " + activeMother.slaveSurname; }
-		}
-		return motherName;
-	}
-
-	// fatherID
-	function setFatherID(actor2) {
-		return actor2;
-	}
-
-	// fatherName
-	function setFatherName(father, activeFather, actor2) {
-		let fatherName;
-		if (father !== 0) {
-			if (father.ID == -1) {
-				fatherName = activeFather.name;
-				if (activeFather.surname !== 0 && activeFather.surname !== "") { fatherName + " " + activeFather.surname; }
-			} else {
-				fatherName = activeFather.slaveName;
-				if (activeFather.slaveSurname !== 0 && activeFather.slaveSurname !== "") { fatherName + " " + activeFather.slaveSurname; }
-			}
-		} else {
-			switch(actor2) {
-				case -2:
-				case -5:
-					fatherName = "citizen";
-					break;
-				case -3:
-					fatherName = "Your Master";
-					break;
-				case -4:
-					fatherName = "Another arcology owner";
-					break;
-				case -6:
-					fatherName = "The Societal Elite";
-					break;
-				case -7:
-					fatherName = "Lab designed";
-					break;
-				default:
-					fatherName = "Unknown";
-			}
-		}
-		return fatherName;
-	}
-
-	// nationality
-	function setNationality(father, mother) {
-		return (father === 0) ? "Stateless"
-			: (father.nationality == mother.nationality) ? mother.nationality
-			: "Stateless";
-	}
-
-	// race
-	function setRace(father, mother, actor2) {
-		let race;
-		if (father !== 0) {
-			race = (mother.origRace == father.origRace) ? mother.origRace
-			: (jsRandom(1,4)) == 4 ? jsEither([father.origRace, mother.origRace])
-			: "mixed race";
-		} else if (actor2 == -2 || actor2 == -5) {
-			if (V.arcologies[0].FSSupremacist != "unset") {
-				race = jsEither([mother.origRace, V.arcologies[0].FSSupremacistRace, V.arcologies[0].FSSupremacistRace]);
-				if (mother.origRace != V.arcologies[0].FSSupremacistRace) {
-					if (jsRandom(1,100) > 50) {
-						race = "mixed race";
-					}
-				}
-			} else {
-				race = mother.origRace;
-			}
-		} else {
-			race = mother.origRace;
-		}
-		return race;
-	}
-
-	//skin
-	function setSkin(father, mother) {
-		let skinToMelanin = {
-			'pure black': 21,
-			ebony: 20,
-			black: 19,
-			'dark brown': 18,
-			brown: 17,
-			'light brown': 16,
-			dark: 15,
-			'dark olive': 14,
-			bronze: 13,
-			tan: 12,
-			tan: 11,
-			olive: 10,
-			'light olive': 9,
-			light: 8,
-			white: 7,
-			fair: 6,
-			'very fair': 5,
-			'extremely fair': 4,
-			pale: 3,
-			'extremely pale': 2,
-			'pure white': 1
-		};
-		let momSkinIndex = mother ? (skinToMelanin[mother.origSkin] || 11) : 8;
-		let dadSkinIndex = father !== 0 ? (skinToMelanin[father.origSkin] || 11) : 8;
-		let skinIndex = Math.round(Math.random() * (dadSkinIndex - momSkinIndex) + momSkinIndex);
-		return [
-			'pure white',
-			'pure white',
-			'extremely pale',
-			'pale',
-			'extremely fair',
-			'very fair',
-			'fair',
-			'white',
-			'light',
-			'light olive',
-			'olive',
-			'natural',
-			'tan',
-			'tan',
-			'bronze',
-			'dark olive',
-			'dark',
-			'light brown',
-			'brown',
-			'dark brown',
-			'ebony',
-			'black',
-			'pure black'
-		][skinIndex];
-	};
-
-	// eyeColor
-	function setEyeColor(father, mother, actor2) {
-		let eyeColor;
-		if (father !== 0) {
-			if (mother.origEye == father.origEye) {
-				eyeColor = mother.origEye;
-			} else if (mother.origEye == "red" || mother.origEye == "pale red" || mother.origEye == "light red" || mother.origEye == "pale gray" || mother.origEye == "milky white") {
-				eyeColor = father.origEye;
-			} else if (father.origEye == "red" || father.origEye == "pale red" || father.origEye == "light red" || father.origEye == "pale gray" || father.origEye == "milky white") {
-				eyeColor = mother.origEye;
-			} else if (mother.origEye == "blue") {
-				if (jsRandom(1,4) == 2) {
-					eyeColor = mother.origEye;
-				} else {
-					eyeColor = father.origEye;
-				}
-			} else if (father.origEye == "blue") {
-				if (jsRandom(1,4) == 2) {
-					eyeColor = father.origEye;
-				} else {
-					eyeColor = mother.origEye;
-				}
-			} else {
-				eyeColor = jsEither([mother.origEye, father.origEye]);
-			}
-		} else if (actor2 === -2 || actor2 === 0 || actor2 === -5) {
-			eyeColor = jsEither([mother.origEye, "brown", "blue", "brown", "green", "hazel", "green"]);
-		} else {
-			eyeColor = mother.origEye;
-		}
-		//just in case something wrong gets through
-		switch (eyeColor) {
-			case "blind blue":
-				eyeColor = "deep blue";
-				break;
-			case "milky white":
-			case "implant":
-				eyeColor = jsEither(["blue", "green", "brown", "hazel", "light blue", "light green", "dark green", "dark blue"]);
-				break;
-		}
-		return eyeColor;
-	}
-
-	// hColor
-	function setHColor(father, mother, actor2) {
-		let hairColor;
-		if (father !== 0) {
-			if (mother.origHColor == father.origHColor) {
-				hairColor = mother.origHColor;
-			} else if (mother.origHColor == "white") {
-				hairColor = jsRandom(1,100) == 69 ? mother.origHColor : father.origHColor;
-			} else if (father.origHColor == "white") {
-				hairColor = jsRandom(1,100) == 69 ? father.origHColor : mother.origHColor;
-			} else if (mother.origHColor == "black") {
-				hairColor = jsEither([mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, father.origHColor]);
-			} else if (father.origHColor == "black") {
-				hairColor = jsEither([father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, mother.origHColor]);
-			} else if (mother.origHColor == "brown") {
-				hairColor = jsEither([mother.origHColor, mother.origHColor, mother.origHColor, father.origHColor]);
-			} else if (father.origHColor == "brown") {
-				hairColor = jsEither([father.origHColor, father.origHColor, father.origHColor, mother.origHColor]);
-			} else {
-				hairColor = jsEither([mother.origHColor, father.origHColor]);
-			}
-		} else if (actor2 === -2 || actor2 === 0 || actor2 === -5) {
-			hairColor = jsEither([mother.origHColor, "brown", "blonde", "black", "brown", "black", "brown", "black"]);
-		} else {
-			hairColor = mother.origHColor;
-		}
-		return hairColor;
-	}
-
-	// underArmHairStyle
-	function setUnderArmHStyle(father, mother) {
-		let hair;
-		if (father !== 0) {
-			if (mother.underArmHStyle == "hairless" && father.underArmHStyle == "hairless") {
-				hair = "hairless";
-			} else if (mother.underArmHStyle == "hairless" || father.underArmHStyle == "hairless") {
-				hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-			} else {
-				hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-			}
-		} else if (mother.underArmHStyle == "hairless") {
-			hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-		} else {
-			hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-		}
-		return hair;
-	}
-
-	// pubicHairStyle
-	function setPubicHStyle(father, mother) {
-		let hair;
-		if (father !== 0) {
-			if (mother.pubicHStyle == "hairless" && father.pubicHStyle == "hairless") {
-				hair = "hairless";
-			} else if (mother.pubicHStyle == "hairless" || father.pubicHStyle == "hairless") {
-				hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-			} else {
-				hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-			}
-		} else if (mother.pubicHStyle == "hairless") {
-			hair = (jsRandom(1,5) == 3) ? "hairless" : jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-		} else {
-			hair = jsEither(["bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless"]);
-		}
-		return hair;
-	}
-
-	// markings
-	function setMarkings(father, mother) {
-		let markings;
-		if (jsRandom(1,8) == 1) {
-			markings = jsEither(["beauty mark", "birthmark"]);
-		} else {
-			markings = "none";
-		}
-		if (markings == "none") {
-			if (father !== 0) {
-				markings = jsEither([mother.markings, father.markings, "none", "none"]);
-			} else {
-				markings = jsEither([mother.markings, mother.markings, "none", "none"]);
-			}
-		}
-		return markings;
-	}
-
-	// sexualFlaw
-	function setSexualFlaw(father, mother) {
-		let flaw;
-		if (father !== 0) {
-			flaw = jsEither([mother.sexualFlaw, father.sexualFlaw, "none", "none"]);
-		} else {
-			flaw = jsEither([mother.sexualFlaw, mother.sexualFlaw, "none", "none"]);
-		}
-		return flaw;
-	}
-
-	// behavioralFlaw
-	function setBehavioralFlaw(father, mother) {
-		let flaw;
-		if (father !== 0) {
-			flaw = jsEither([mother.behavioralFlaw, father.behavioralFlaw, "none", "none"]);
-		} else {
-			flaw = jsEither([mother.behavioralFlaw, mother.behavioralFlaw, "none", "none"]);
-		}
-		return flaw;
-	}
-
-	// fetish
-	function setFetish(father, mother) {
-		let fetish;
-		if (father !== 0) {
-			fetish = jsEither(["none", "none", "none", "none", "none", father.fetish, mother.fetish]);
-		} else {
-			fetish = jsEither(["none", "none", "none", "none", "none", mother.fetish, mother.fetish]);
-		}
-		if (fetish == "mindbroken") { fetish = "none"; }
-		return fetish;
-	}
-
-	//intelligence
-	function setIntelligence(father, mother, activeMother, actor2) {
-		let smarts;
-		if (mother.ID == -1) {
-			if (actor2 == -6) {
-				smarts = jsRandom(90,100);
-			} else if (father !== 0) {
-				if (father.intelligence < mother.intelligence) {
-					smarts = jsRandom(father.intelligence, mother.intelligence);
-				} else {
-					smarts = jsRandom(mother.intelligence, father.intelligence);
-				}
-				if (smarts <= 50) {
-					smarts += 30;
-				}
-			} else {
-				smarts = jsRandom(50,100);
-			}
-		} else if (father !== 0) {
-			if (father.intelligence < mother.intelligence) {
-				smarts = jsRandom(father.intelligence, mother.intelligence);
-			} else {
-				smarts = jsRandom(mother.intelligence, father.intelligence);
-			}
-			if (activeMother.breedingMark == 1 && smarts <= 50) {
-				smarts = jsRandom(60,100);
-			}
-		} else {
-			smarts = mother.intelligence;
-		}
-		if (V.inbreeding == 1) {
-			if (mother.ID != -1) {
-				if (father !== 0 && father.ID == -1 && activeMother.breedingMark != 1) {
-					if (smarts >= -95 && jsRandom(1,100) < 40) {
-						smarts -= jsRandom(1,10);
-						if (smarts >= -95 && jsRandom(1,100) < 20) {
-							smarts -= jsRandom(1,5);
-						}
-					}
-				} else {
-					if (smarts >= -95 && jsRandom(1,100) < 50) {
-						smarts -= jsRandom(1,15);
-						if (smarts >= -95 && jsRandom(1,100) < 30) {
-							smarts -= jsRandom(1,15);
-						}
-					}
-				}
-			}
-		}
-		return Math.clamp(smarts, -100, 100);
-	}
-
-	//face
-	function setFace(father, mother, activeMother, actor2) {
-		let face;
-		if (mother.ID == -1) {
-			if (actor2 == -6) {
-				face = jsRandom(90,100);
-			} else if (father !== 0) {
-				if (father.face < mother.face) {
-					face = jsRandom(father.face, mother.face);
-				} else {
-					face = jsRandom(mother.face, father.face);
-				}
-				if (face <= 40) {
-					face += jsRandom(5,20);
-				}
-			} else {
-				face = jsRandom(20,100);
-			}
-		} else if (father !== 0) {
-			if (father.face < mother.face) {
-				face = jsRandom(father.face, mother.face);
-			} else {
-				face = jsRandom(mother.face, father.face);
-			}
-			if (activeMother.breedingMark == 1 && face < 60) {
-				face = jsRandom(60,100);
-			}
-		} else {
-			face = mother.face;
-		}
-		if (V.inbreeding == 1) {
-			if (mother.ID != -1) {
-				if (father !== 0 && father.ID == -1 && activeMother.breedingMark != 1) {
-					if (face > -100 && jsRandom(1,100) > 60) {
-						face -= jsRandom(2,20);
-					}
-				} else {
-					if (face > -100 && jsRandom(1,100) < 50) {
-						face -= jsRandom(1,15);
-						if (face >= -95 && jsRandom(1,100) < 30) {
-							face -= jsRandom(5,20);
-						}
-					}
-				}
-			}
-		}
-		return Math.clamp(face, -100, 100);
-	}
-
-	// face shape
-	function setFaceShape(father, mother) {
-		let shape;
-		if (father !== 0) {
-			if (mother.faceShape == father.faceShape) {
-				shape = mother.faceShape;
-			} else {
-				shape = jsEither(["androgynous", "androgynous", "cute", "cute", "exotic", "normal", "normal", "sensual", mother.faceShape, mother.faceShape]);
-			}
-		} else {
-			shape = jsEither(["androgynous", "androgynous", "cute", "cute", "exotic", "normal", "normal", "sensual", mother.faceShape, mother.faceShape]);
-		}
-		return shape;
-	}
-
-	// genetic quirks
-	function setGeneticQuirks(father, mother, sex) {
-		let quirks = {macromastia: 0, gigantomastia: 0, fertility: 0, hyperFertility: 0, superfetation: 0, gigantism: 0, dwarfism: 0, pFace: 0, uFace: 0, albinism: 0, rearLipedema: 0, wellHung: 0, wGain: 0, wLoss: 0, androgyny: 0};
-		let chance = 0;
-
-		// fertility
-		if (mother.geneticQuirks.fertility == 2) {
-			if (sex == "XX") {
-				quirks.fertility = 2;
-			} else {
-				quirks.fertility = 1;
-			}
-		} else if (mother.geneticQuirks.fertility == 1) {
-			chance = jsRandom(0, 1000);
-			if (father !== 0) {
-				if (father.geneticQuirks.fertility >= 1) {
-					if (sex == "XX") {
-						if (chance > 500) {
-							quirks.fertility = 2;
-						} else if (chance > 50) {
-							quirks.fertility = 1;
-						}
-					} else {
-						if (chance > 500) {
-							quirks.fertility = 1;
-						}
-					}
-				}
-			} else {
-				if (sex == "XX") {
-					if (chance > 950) {
-						quirks.fertility = 2;
-					} else if (chance > 200) {
-						quirks.fertility = 1;
-					}
-				} else {
-					if (chance > 500) {
-						quirks.fertility = 1;
-					}
-				}
-			}
-		}
-
-		// hyper fertility
-		if (mother.geneticQuirks.hyperFertility == 2) {
-			if (sex == "XX") {
-				quirks.hyperFertility = 2;
-			} else {
-				quirks.hyperFertility = 1;
-			}
-		} else if (mother.geneticQuirks.hyperFertility == 1) {
-			chance = jsRandom(0, 1000);
-			if (father !== 0) {
-				if (father.geneticQuirks.hyperFertility >= 1) {
-					if (sex == "XX") {
-						if (chance > 750) {
-							quirks.hyperFertility = 2;
-						} else if (chance > 500) {
-							quirks.hyperFertility = 1;
-						}
-					} else {
-						if (chance > 500) {
-							quirks.hyperFertility = 1;
-						}
-					}
-				}
-			} else {
-				if (sex == "XX") {
-					if (chance > 950) {
-						quirks.hyperFertility = 2;
-					} else if (chance > 700) {
-						quirks.hyperFertility = 1;
-					}
-				} else {
-					if (chance > 700) {
-						quirks.hyperFertility = 1;
-					}
-				}
-			}
-		}
-
-		return clone(quirks);
-	}
-
-	return generateGenetics;
-
-})();
-
-window.generateChild = function(mother, ova, destination) {
-
-	let V = State.variables;
-	let genes = ova.genetics; //maybe just argument this? We'll see.
-	let pregUpgrade = V.pregnancyMonitoringUpgrade;
-	let child = {};
-
-	if (!destination) { //does extra work for the incubator if defined, otherwise builds a simple object
-		if (genes.gender == "XX") {
-			child.genes = "XX";
-			child.slaveSurname = genes.surname;
-			if (!pregUpgrade) {
-				if (genes.mother == -1) {
-					if (genes.father <= 0) {
-						child.slaveName = "Your daughter";
-					} else {
-						child.slaveName = `Your and ${genes.fatherName}'s daughter`;
-					}
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveName = `${genes.motherName} and your daughter`;
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						child.slaveName = `${genes.motherName} and ${genes.fatherName}'s daughter`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						child.slaveName = `${genes.motherName}'s bastard daughter`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			} else {
-				let childName = genes.name;
-				if (childName.indexOf("ovum") == 0) {
-					if (genes.mother == -1) {
-						if (genes.father <= 0) {
-							child.slaveName = "Your son";
-						} else {
-							child.slaveName = `Your and ${genes.fatherName}'s son`;
-						}
-					} else {
-						if (genes.father == -1) {
-							child.slaveName = `${genes.motherName} and your son`;
-						} else if (genes.father > 0) {
-							child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`;
-						} else {
-							child.slaveName = `${genes.motherName}'s bastard son`;
-						}
-					}
-				} else {
-					child.slaveName = genes.name;
-				}
-				if (genes.mother == -1) {
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			}
-		} else {
-			child.genes = "XY";
-			child.slaveSurname = genes.surname;
-			if (!pregUpgrade) {
-				if (genes.mother == -1) {
-					if (genes.father <= 0) {
-						child.slaveName = "Your son";
-					} else {
-						child.slaveName = `Your and ${genes.fatherName}'s son`;
-					}
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveName = `${genes.motherName} and your son`;
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						child.slaveName = `${genes.motherName}'s bastard son`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			} else {
-				let childName = genes.name;
-				if (childName.indexOf("ovum") == 0) {
-					if (genes.mother == -1) {
-						if (genes.father <= 0) {
-							child.slaveName = "Your son";
-						} else {
-							child.slaveName = `Your and ${genes.fatherName}'s son`;
-						}
-					} else {
-						if (genes.father == -1) {
-							child.slaveName = `${genes.motherName} and your son`;
-						} else if (genes.father > 0) {
-							child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`;
-						} else {
-							child.slaveName = `${genes.motherName}'s bastard son`;
-						}
-					}
-				} else {
-					child.slaveName = genes.name;
-				}
-				if (genes.mother == -1) {
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			}
-		}
-
-		child.mother = genes.mother;
-		child.father = genes.father;
-		child.nationality = genes.nationality;
-		child.skin = genes.skin;
-		child.race = genes.race;
-		child.intelligence = genes.intelligence;
-		if (mother.prematureBirth > 0) {
-			if (child.intelligence >= -90) {
-				child.intelligence -= jsRandom(0,10)
-			}
-			child.premature = 1;
-		}
-		child.face = genes.face;
-		child.eyeColor = genes.eyeColor;
-		child.hColor = genes.hColor;
-		child.underArmHStyle = genes.underArmHStyle;
-		child.pubicHStyle = genes.pubicHStyle;
-		child.markings = genes.markings;
-		child.sexualFlaw = genes.sexualFlaw;
-		child.behavioralFlaw = genes.behavioralFlaw;
-		child.fetish = genes.fetish;
-		child.geneticQuirks = clone(genes.geneticQuirks);
-		child.pubicHColor = child.hColor;
-		child.underArmHColor = child.hColor;
-		child.eyebrowHColor = child.hColor;
-		child.birthWeek = 0;
-		if (genes.faceShape !== undefined) {
-			child.faceShape = genes.faceShape;
-		}
-		if (mother.addict > 0) {
-			child.addict = Math.trunc(mother.addict/2);
-		}
-		child.weekAcquired = V.week;
-		if (child.nationality == "Stateless") {
-			if (V.arcologies[0].FSRomanRevivalist > 90) {
-				child.nationality = "Roman Revivalist";
-			} else if (V.arcologies[0].FSAztecRevivalist > 90) {
-				child.nationality = "Aztec Revivalist";
-			} else if (V.arcologies[0].FSEgyptianRevivalist > 90) {
-				child.nationality = "Ancient Egyptian Revivalist";
-			} else if (V.arcologies[0].FSEdoRevivalist > 90) {
-				child.nationality = "Edo Revivalist";
-			} else if (V.arcologies[0].FSArabianRevivalist > 90) {
-				child.nationality = "Arabian Revivalist";
-			} else if (V.arcologies[0].FSChineseRevivalist > 90) {
-				child.nationality = "Ancient Chinese Revivalist";
-			}
-		}
-
-	} else {
-
-		V.activeSlaveOneTimeMinAge = V.targetAge;
-		V.activeSlaveOneTimeMaxAge = V.targetAge;
-		V.one_time_age_overrides_pedo_mode = 1;
-		V.ageAdjustOverride = 1;
-
-		if (genes.gender == "XX") {
-			GenerateNewSlave("XX");
-			child = V.activeSlave;
-			child.slaveSurname = genes.surname;
-			if (!pregUpgrade) {
-				if (genes.mother == -1) {
-					if (genes.father <= 0) {
-						child.slaveName = "Your daughter";
-					} else {
-						child.slaveName = `Your and ${genes.fatherName}'s daughter`;
-					}
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveName = `${genes.motherName} and your daughter`;
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						child.slaveName = `${genes.motherName} and ${genes.fatherName}'s daughter`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						child.slaveName = `${genes.motherName}'s bastard daughter`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			} else {
-				let childName = genes.name;
-				if (childName.indexOf("ovum") == 0) {
-					if (genes.mother == -1) {
-						if (genes.father <= 0) {
-							child.slaveName = "Your daughter";
-						} else {
-							child.slaveName = `Your and ${genes.fatherName}'s daughter`;
-						}
-					} else {
-						if (genes.father == -1) {
-							child.slaveName = `${genes.motherName} and your daughter`;
-						} else if (genes.father > 0) {
-							child.slaveName = `${genes.motherName} and ${genes.fatherName}'s daughter`;
-						} else {
-							child.slaveName = `${genes.motherName}'s bastard daughter`;
-						}
-					}
-				} else {
-					child.slaveName = genes.name;
-				}
-				if (genes.mother == -1) {
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			}
-		} else {
-			GenerateNewSlave("XY");
-			child = V.activeSlave;
-			child.slaveSurname = genes.surname;
-			if (!pregUpgrade) {
-				if (genes.mother == -1) {
-					if (genes.father <= 0) {
-						child.slaveName = "Your son";
-					} else {
-						child.slaveName = `Your and ${genes.fatherName}'s son`;
-					}
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveName = `${genes.motherName} and your son`;
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						child.slaveName = `${genes.motherName}'s bastard son`;
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			} else {
-				let childName = genes.name;
-				if (childName.indexOf("ovum") == 0) {
-					if (genes.mother == -1) {
-						if (genes.father <= 0) {
-							child.slaveName = "Your son";
-						} else {
-							child.slaveName = `Your and ${genes.fatherName}'s son`;
-						}
-					} else {
-						if (genes.father == -1) {
-							child.slaveName = `${genes.motherName} and your son`;
-						} else if (genes.father > 0) {
-							child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`;
-						} else {
-							child.slaveName = `${genes.motherName}'s bastard son`;
-						}
-					}
-				} else {
-					child.slaveName = genes.name;
-				}
-				if (genes.mother == -1) {
-					child.slaveSurname = V.PC.surname;
-				} else {
-					if (genes.father == -1) {
-						child.slaveSurname = V.PC.surname;
-					} else if (genes.father > 0) {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						} else {
-							let currentFather = getSlave(genes.father);
-							if (currentFather !== undefined) {
-								if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") {
-									child.slaveSurname = currentFather.slaveSurname;
-								}
-							}
-						}
-					} else {
-						let currentMother = getSlave(genes.mother);
-						if (currentMother !== undefined) {
-							if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") {
-								child.slaveSurname = currentMother.slaveSurname;
-							}
-						}
-					}
-				}
-			}
-		}
-
-		if (genes.clone !== undefined) {
-			child.clone = genes.clone;
-			child.cloneID = genes.cloneID;
-		}
-
-		child.mother = genes.mother;
-		child.father = genes.father;
-		child.nationality = genes.nationality;
-		child.skin = genes.skin;
-		child.origSkin = child.skin;
-		child.race = genes.race;
-		child.origRace = child.race;
-		child.intelligence = genes.intelligence;
-		if (mother.prematureBirth > 0) {
-			if (child.intelligence >= -90) {
-				child.intelligence -= jsRandom(0,10)
-			}
-			child.premature = 1;
-		}
-		child.face = genes.face;
-		child.eyeColor = genes.eyeColor;
-		child.origEye = child.eyeColor;
-		child.hColor = genes.hColor;
-		child.origHColor = child.HColor;
-		child.underArmHStyle = genes.underArmHStyle;
-		child.pubicHStyle = genes.pubicHStyle;
-		child.markings = genes.markings;
-		child.sexualFlaw = genes.sexualFlaw;
-		child.behavioralFlaw = genes.behavioralFlaw;
-		child.fetish = genes.fetish;
-		child.geneticQuirks = clone(genes.geneticQuirks);
-		child.pubicHColor = child.hColor;
-		child.underArmHColor = child.hColor;
-		child.eyebrowHColor = child.hColor;
-		child.birthWeek = 0;
-		child.energy = 0;
-		child.anus = 0;
-		if (child.vagina > 0) {child.vagina = 0;}
-		if (child.fetish != "none") {child.fetishStrength = 20;}
-		if (child.dick > 0) {
-			child.foreskin = 1;
-			child.balls = 1;
-			child.scrotum = 1;
-		}
-		if (genes.faceShape !== undefined) {
-			child.faceShape = genes.faceShape;
-		}
-		if (mother.addict > 0) {
-			child.addict = Math.trunc(mother.addict/2);
-		}
-		child.career = "a slave since birth";
-		child.birthName = child.slaveName;
-		child.birthSurname = child.slaveSurname;
-		child.devotion = 0;
-		child.trust = 0;
-		child.weekAcquired = V.week;
-		if (child.nationality == "Stateless") {
-			if (V.arcologies[0].FSRomanRevivalist > 90) {
-				child.nationality = "Roman Revivalist";
-			} else if (V.arcologies[0].FSAztecRevivalist > 90) {
-				child.nationality = "Aztec Revivalist";
-			} else if (V.arcologies[0].FSEgyptianRevivalist > 90) {
-				child.nationality = "Ancient Egyptian Revivalist";
-			} else if (V.arcologies[0].FSEdoRevivalist > 90) {
-				child.nationality = "Edo Revivalist";
-			} else if (V.arcologies[0].FSArabianRevivalist > 90) {
-				child.nationality = "Arabian Revivalist";
-			} else if (V.arcologies[0].FSChineseRevivalist > 90) {
-				child.nationality = "Ancient Chinese Revivalist";
-			}
-		}
-
-		child.weight = -100;
-		child.muscles = -100;
-		child.boobs = 0;
-		child.butt = 0;
-		child.chem = 990;
-		child.areolaePiercing = 0;
-		child.corsetPiercing = 0;
-		child.boobsImplant = 0;
-		child.boobsImplantType = 0;
-		child.nipplesPiercing = 0;
-		child.areolaePiercing = 0;
-		child.lactation = 0;
-		child.hipsImplant = 0;
-		child.buttImplant = 0;
-		child.buttImplantType = 0;
-		child.lipsImplant = 0;
-		child.lipsPiercing = 0;
-		child.tonguePiercing = 0;
-		child.vaginaPiercing = 0;
-		child.preg = 0;
-		child.pregType = 0;
-		child.pregKnown = 0;
-		child.belly = 0;
-		child.bellyPreg = 0;
-		child.bellyFluid = 0;
-		child.bellyImplant = -1;
-		child.cervixImplant = 0;
-		child.clitPiercing = 0;
-		child.dickPiercing = 0;
-		child.makeup = 0;
-		child.nails = 0;
-		child.earPiercing = 0;
-		child.nosePiercing = 0;
-		child.eyebrowPiercing = 0;
-		child.stampTat = 0;
-		child.bellyTat = 0;
-		child.anusPiercing = 0;
-		child.anusTat = 0;
-		child.shouldersTat = 0;
-		child.armsTat = 0;
-		child.legsTat = 0;
-		child.backTat = 0;
-		child.combatSkill = 0;
-		child.whoreSkill = 0;
-		child.entertainSkill = 0;
-		child.oralSkill = 0;
-		child.analSkill = 0;
-		child.vaginalSkill = 0;
-		child.accent = 4;
-		child.canRecruit = 0;
-		child.hStyle = "long";
-		child.hLength = 300;
-		if (V.incubatorImprintSetting == "terror") {
-			child.origin = "She was conditioned from birth into mindless terror in an aging tank.";
-			child.tankBaby = 2;
-		} else {
-			child.origin = "She was conditioned from birth into trusting obedience in an aging tank.";
-			child.tankBaby = 1;
-		}
-		child.intelligenceImplant = 0;
-		child.navelPiercing = 0;
-	}
-	return child;
-}
-
-/*:: wombJS [script]*/
-
-/*
-This is a womb processor/simulator script. It takes care of calculation of belly sizes based on individual fetus sizes, with full support of broodmothers implant random turning on and off possibility. Also this can be expanded to store more parents data in each individual fetus in future.
-Design limitations:
-- Mother can't gestate children with different speeds at same time. All speed changes apply to all fetuses.
-- Sizes of individual fetuses updated only on call of WombGetVolume - not every time as called WombProgress. This is for better overall code speed.
-- For broodmothers we need actual "new ova release" code now. But it's possible to control how many children will be added each time, and so - how much children is ready to birth each time.
-
-Usage from sugarcube code (samples):
-
-WombInit($slave) - before first pregnancy, at slave creation, of as backward compatibility update.
-
-WombImpregnate($slave, $fetus_count, $fatherID, $initial_age) - should be added after normal impregnation code, with already calculated fetus count. ID of father - can be used in future for processing children from different fathers in one pregnancy. Initial age normally 1 (as .preg normally set to 1), but can be raised if needed. Also should be called at time as broodmother implant add another fetus(es), or if new fetuses added from other sources in future (transplanting maybe?)
-
-WombProgress($slave, $time_to_add_to_fetuses) - after code that update $slave.preg, time to add should be the same.
-
-$isReady = WombBirthReady($slave, $birth_ready_age) - how many children ready to be birthed if their time to be ready is $birth_ready_age (40 is for normal length pregnancy). Return int - count of ready to birth children, or 0 if no ready exists.
-
-$children = WombBirth($slave, $birth_ready_age) - for actual birth. Return array with fetuses objects that birthed (can be used in future) and remove them from womb array of $slave. Should be called at actual birth code in sugarcube. fetuses that not ready remained in womb (array).
-
-WombFlush($slave) - clean womb (array). Can be used at broodmother birthstorm or abortion situations in game. But birthstorm logically should use WombBirth($slave, 35) or so before - some children in this event is live capable, others is not.
-
-$slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volume in CC - for updating $slave.bellyPreg, or if need to update individual fetuses sizes.
-
-*/
-
-//Init womb system.
-window.WombInit = function(actor) {
-
-	if (!Array.isArray(actor.womb)) {
-		//alert("creating new womb"); //debugging
-		actor.womb = [];
-	}
-
-	//console.log("broodmother:" + typeof actor.broodmother);
-
-	if ( typeof actor.broodmother != "number" ) {
-		actor.broodmother = 0;
-		actor.broodmotherFetuses = 0;
-	}
-
-	if ( typeof actor.readyOva != "number" ) {
-		actor.readyOva = 0;
-	}
-
-	if ( actor.pregData == undefined)
-	{
-		actor.pregData = clone( setup.pregData.human );
-		//Setup should be through deep copy, so in future, if we like, these values can be changed individually. Gameplay expansion possibilities. But for dev time to simplify debugging:
-		//actor.pregData = setup.pregData.human;  // any changes in setup pregData template will be applied immediately to all. But can't be made separate changes.
-	}
-
-	//backward compatibility setup. Fully accurate for normal pregnancy only.
-	if (actor.womb.length > 0 && actor.womb[0].genetics == undefined && actor.eggType == "human") {
-		var i=0
-		actor.womb.forEach(function(ft){
-			ft.genetics = generateGenetics(actor, actor.pregSource, i);
-			i++;
-		});
-	} else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother == 0) {
-		WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg);
-	} else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) {
-		//sorry but for already present broodmothers it's impossible to calculate fully, approximation used.
-		var i, pw = actor.preg, bCount, bLeft;
-		if (pw > actor.pregData.normalBirth) pw = actor.pregData.normalBirth; //to avoid disaster.
-		bCount = Math.floor(actor.pregType/pw);
-		bLeft = actor.pregType - (bCount*pw);
-		if (pw > actor.pregType) {
-			pw = actor.pregType; // low children count broodmothers not supported here. It's emergency/backward compatibility code, and they not in game anyway. So minimum is 1 fetus in week.
-			actor.preg = pw; // fixing initial pregnancy week.
-		}
-		for (i=0; i<pw; i++) {
-			WombImpregnate(actor, bCount, actor.pregSource, i); // setting fetuses for every week, up to 40 week at max.
-		}
-
-		if (bLeft > 0) {
-			WombImpregnate(actor, bLeft, actor.pregSource, i+1); // setting up leftover of fetuses.
-		}
-	}
-};
-
-window.WombImpregnate = function(actor, fCount, fatherID, age, surrogate) {
-	var i;
-	var tf;
-	for (i=0; i<fCount; i++) {
-		tf = {}; //new Object
-		tf.age = age; //initial age
-		tf.fatherID = fatherID; //We can store who is father too.
-		tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call.
-		tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept.
-		tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call.
-		tf.splitted = 0; //marker for already splitted fetus.
-		if (surrogate) {
-			tf.motherID = surrogate.ID; //Initial biological mother ID setup.
-			if(actor.eggType == "human"){
-				tf.genetics = generateGenetics(surrogate, fatherID, i+1); //Stored genetic information.
-			}
-		} else {
-			tf.motherID = actor.ID; //Initial biological mother ID setup.
-			if(actor.eggType == "human"){
-				tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information.
-			}
-		}
-		tf.ID = generateNewID();
-
-		try {
-			if (actor.womb.length == 0) {
-				actor.pregWeek = age;
-				actor.preg = age;
-			}
-			actor.womb.push(tf);
-		} catch(err){
-			WombInit(actor);
-			actor.womb.push(tf);
-			alert("WombImpregnate warning - " + actor.slaveName+" "+err);
-		}
-
-	}
-	MissingParentIDCorrection(actor);
-};
-
-window.WombSurrogate = function(actor, fCount, mother, fatherID, age) {
-	WombImpregnate(actor, fCount, fatherID, age, mother);
-};
-
-window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age) {
-	var i;
-	var tf;
-	for (i=0; i<fCount; i++) {
-		tf = {}; //new Object
-		tf.age = age; //initial age
-		tf.fatherID = mother.ID; //We can store who is father too.
-		tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call.
-		tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept.
-		tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call.
-		tf.splitted = 0; //marker for already splitted fetus.
-		tf.motherID = mother.ID; //Initial biological mother ID setup.
-		tf.genetics = generateGenetics(mother, mother.ID, i+1); //Stored genetic information.
-		tf.ID = generateNewID();
-
-		//Welcome to having to set up common relatives for the slave and her clone
-		if (mother.father === 0 || (mother.father < -1 && mother.father >= -20 && mother.father !== -3)) {
-			mother.father = State.variables.missingParentID;
-			State.variables.missingParentID--;
-		}
-		if (mother.mother === 0 || (mother.mother < -1 && mother.mother >= -20 && mother.mother !== -3)) {
-			mother.mother = State.variables.missingParentID;
-			State.variables.missingParentID--;
-		}
-
-		//gene corrections
-		tf.fatherID = -7;
-		tf.genetics.gender = mother.genes;
-		tf.genetics.mother = mother.mother;
-		tf.genetics.father = mother.father;
-		if (mother.ID == -1) {
-			tf.genetics.motherName = mother.name;
-			tf.genetics.fatherName = mother.name;
-			tf.genetics.clone = PlayerName(mother);
-			tf.genetics.cloneID = -1;
-		} else {
-			tf.genetics.motherName = mother.slaveName;
-			tf.genetics.fatherName = mother.slaveName;
-			tf.genetics.clone = SlaveFullName(mother);
-			tf.genetics.cloneID = mother.ID;
-		}
-		tf.genetics.intelligence = motherOriginal.intelligence;
-		tf.genetics.face = motherOriginal.face;
-		tf.genetics.faceShape = motherOriginal.faceShape;
-		tf.genetics.geneticQuirks = clone(motherOriginal.geneticQuirks);
-		tf.genetics.skin = motherOriginal.skin;
-
-		try {
-			if (actor.womb.length == 0) {
-				actor.pregWeek = age;
-				actor.preg = age;
-				actor.pregSource = -7;
-			}
-			actor.womb.push(tf);
-		} catch(err){
-			WombInit(actor);
-			actor.womb.push(tf);
-			alert("WombImpregnate warning - " + actor.slaveName+" "+err);
-		}
-
-	}
-};
-
-window.WombProgress = function(actor, ageToAdd) {
-	var i, ft;
-	ageToAdd = Math.ceil(ageToAdd*10)/10;
-	try {
-		actor.womb.forEach(ft => ft.age += ageToAdd);
-	} catch(err){
-		WombInit(actor);
-		alert("WombProgress warning - " + actor.slaveName+" "+err);
-	}
-};
-
-window.WombBirth = function(actor, readyAge) {
-	try {
-		WombSort(actor); //For normal processing fetuses that more old should be first. Now - they are.
-		} catch(err){
-		WombInit(actor);
-		alert("WombBirth warning - " + actor.slaveName+" "+err);
-		}
-
-	var birthed = [];
-	var ready = WombBirthReady(actor, readyAge);
-	var i;
-
-	for (i=0; i<ready; i++) { //here can't be used "for .. in .." syntax.
-		birthed.push(actor.womb.shift());
-	}
-
-	return birthed;
-};
-
-window.WombFlush = function(actor) {
-	actor.womb = [];
-};
-
-window.WombBirthReady = function(actor, readyAge) {
-	var i, ft;
-	var readyCnt = 0;
-	try {
-		readyCnt += actor.womb.filter(ft => ft.age >= readyAge).length;
-	} catch(err){
-		WombInit(actor);
-		alert("WombBirthReady warning - " + actor.slaveName+" "+err);
-		return 0;
-	}
-
-	return readyCnt;
-};
-
-window.WombGetVolume = function(actor) { //most legacy code from pregJS.tw with minor adaptation.
-
-
-	if (actor.pregData.sizeType == 0)
-		return getVolByLen(actor);
-	else if (actor.pregData.sizeType == 1)
-		return getVolByWeight(actor);
-	else if (actor.pregData.sizeType == 2)
-		return getVolByRaw(actor);
-	else
-		return 0;
-
-	function getCurData(actor, age)
-	{
-		let i = 0;
-		let min, max, ageMin, ageMax, rateMin, rateMax, one, rateOne, rate, cage, csize;
-		let data = {};
-
-		while (actor.pregData.fetusWeek[i+1] < age && i < actor.pregData.fetusWeek.length-1)
-			i++;
-
-		min = actor.pregData.fetusSize[i];
-		max = actor.pregData.fetusSize[i+1];
-		ageMin = actor.pregData.fetusWeek[i];
-		ageMax = actor.pregData.fetusWeek[i+1];
-		rateMin = actor.pregData.fetusRate[i];
-		rateMax = actor.pregData.fetusRate[i+1];
-
-		cage = age - ageMin;
-
-		one = (max - min) / (ageMax - ageMin);
-		rateOne = (rateMax - rateMin) / (ageMax - ageMin);
-
-		rate = rateMin + (rateOne * cage);
-
-		csize = (min + (one * cage));
-		//console.log("min:"+min+"  max:"+max+"  ageMin:"+ageMin+"  ageMax:"+ageMax+"  one:"+one+"  rateOne:"+rateOne+"  cage:"+cage+"  rate:"+rate+"  csize:"+csize+"  final size:"+csize*rate);
-
-		data.size = csize;
-		data.rate = rate;
-
-		return data; //csize * rate;
-		//maybe not very effective code, but simple and easy to debug. May be optimized more in future.
-	}
-
-	function getVolByLen(actor){
-
-	try {
-
-			var phi = 1.618;
-			var targetData, targetLen;
-			var wombSize = 0;
-
-			actor.womb.forEach(ft => {
-
-				/* legacy block for debug only
-				let gestastionWeek = ft.age;
-				let oldLen;
-				let oldVol;
-				if (gestastionWeek <= 32) {
-					oldLen = (0.00006396 * Math.pow(gestastionWeek, 4)) -
-						(0.005501 * Math.pow(gestastionWeek, 3)) +
-						(0.161 * Math.pow(gestastionWeek, 2)) -
-						(0.76 * gestastionWeek) +
-						0.208;
-				} else if (gestastionWeek <= 106) {
-					oldLen = (-0.0000004675 * Math.pow(gestastionWeek, 4)) +
-						(0.0001905 * Math.pow(gestastionWeek, 3)) -
-						(0.029 * Math.pow(gestastionWeek, 2)) +
-						(2.132 * gestastionWeek) -
-						16.575;
-				} else {
-					oldLen = (-0.00003266 * Math.pow(gestastionWeek,2)) +
-						(0.076 * gestastionWeek) +
-						43.843;
-				}
-				*/
-
-				targetData = getCurData(actor, ft.age);
-				targetLen = targetData.size * targetData.rate;
-
-				ft.volume = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3)));
-				wombSize += ft.volume;
-
-				//oldVol = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((oldLen / 2), 3))); //for debug
-
-				//console.log("fetus.age:" + ft.age + "  oldLen:"+oldLen+"  targetLen:"+targetLen+"  ft.volume:"+ft.volume+ "  old volume:"+oldVol );
-				/*
-					I found, that previous targetLen calculation not exactly accurate if compared to the actual medical data chart for fetal length. It's been rough approximation based only on pregnancy week (giving smaller fetus size then it should in most cases). So I need all this debug code to compare data and verify calculations. After final tweaking I will remove or comment out legacy code. Please not touch this before it.
-					Pregmodfan.
-				*/
-			});
-		} catch(err){
-			WombInit(actor);
-			alert("WombGetVolume warning - " + actor.slaveName + " " + err);
-		}
-		if (wombSize < 0) //catch for strange cases, to avoid messing with outside code.
-			wombSize = 0;
-
-		return wombSize;
-
-	}
-
-
-	function getVolByWeight(actor)
-	{
-		var targetData;
-		var wombSize = 0;
-
-		actor.womb.forEach(ft => {
-
-			targetData = getCurData(actor, ft.age);
-
-			wombSize += targetData.size * targetData.rate;
-
-		});
-
-		if (wombSize < 0) //catch for strange cases, to avoid messing with outside code.
-			wombSize = 0;
-
-		return wombSize;
-	}
-
-
-	function getVolByRaw(actor)
-	{
-		var targetData;
-		var wombSize = 0;
-
-		actor.womb.forEach(ft => {
-
-			targetData = getCurData(actor, ft.age);
-
-			wombSize += targetData.size;
-
-		});
-
-		if (wombSize < 0) //catch for strange cases, to avoid messing with outside code.
-			wombSize = 0;
-
-		return wombSize;
-	}
-
-};
-
-window.WombUpdatePregVars = function(actor) {
-	WombSort(actor);
-	if (actor.womb.length > 0) {
-		if (actor.preg > 0 && actor.womb[0].age > 0) {
-			actor.preg = actor.womb[0].age;
-		}
-		actor.pregType = actor.womb.length;
-		actor.bellyPreg = WombGetVolume(actor);
-	}
-};
-
-window.WombMinPreg = function(actor) {
-	WombSort(actor);
-	if (actor.womb.length > 0)
-		return actor.womb[actor.womb.length-1].age;
-	else
-		return 0;
-};
-
-window.WombMaxPreg = function(actor) {
-	WombSort(actor);
-	if (actor.womb.length > 0)
-		return actor.womb[0].age;
-	else
-		return 0;
-};
-
-window.WombNormalizePreg = function(actor)
-{
-	// console.log("New actor: " + actor.slaveName + " ===============" + actor.name);
-	WombInit(actor);
-
-	// this is broodmother on hold.
-	if (actor.womb.length == 0 && actor.broodmother >= 1) {
-		actor.pregType = 0;
-		actor.pregKnown = 0;
-
-		// to avoid legacy code conflicts - broodmother on hold
-		// can't be impregnated, but she not on normal contraceptives.
-		// So we set this for special case.
-		if (actor.preg >= 0)
-			actor.preg = 0.1;
-
-		if (actor.pregSource > 0)
-			actor.pregSource = 0;
-
-		if (actor.pregWeek > 0)
-			actor.pregWeek = 0;
-
-		actor.broodmotherCountDown = 0;
-	}
-
-	if (actor.womb.length > 0) {
-		var max = WombMaxPreg(actor);
-		// console.log("max: " + max);
-		// console.log(".preg: "+ actor.preg);
-		if (actor.pregWeek < 1 )
-			actor.pregWeek = 1;
-
-		if (max < actor.preg) {
-			WombProgress(actor, actor.preg - max);
-			// console.log("progressin womb");
-		}
-		else if ( max > actor.preg) {
-			actor.preg = max;
-			// console.log("advancing .preg");
-		}
-
-		actor.pregType = actor.womb.length;
-		actor.pregSource = actor.womb[0].fatherID;
-	} else if (actor.womb.length == 0 && actor.broodmother < 1) {
-		//not broodmother
-		// console.log("preg fixing");
-		actor.pregType = 0;
-		actor.pregKnown = 0;
-
-		if (actor.preg > 0)
-			actor.preg = 0;
-
-		if (actor.pregSource > 0)
-			actor.pregSource = 0;
-
-		// We can't properly set postpartum here,
-		// but can normalize obvious error with forgotten property.
-		if (actor.pregWeek > 0)
-			actor.pregWeek = 0;
-	}
-	actor.bellyPreg = WombGetVolume(actor);
-};
-
-window.WombZeroID = function(actor, id) {
-	WombInit(actor);
-	actor.womb
-		.filter(ft => ft.fatherID === id)
-		.forEach(ft => ft.fatherID = 0);
-	WombNormalizePreg(actor);
-};
-
-window.WombChangeID = function(actor, fromID, toID) {
-	WombInit(actor);
-	actor.womb
-		.filter(ft => ft.fatherID === fromID)
-		.forEach(ft => ft.fatherID = toID);
-	WombNormalizePreg(actor);
-};
-
-window.WombChangeGeneID = function(actor, fromID, toID) {
-	WombInit(actor);
-	actor.womb
-		.filter(ft => ft.genetics.father === fromID)
-		.forEach(ft => ft.genetics.father = toID);
-	actor.womb
-		.filter(ft => ft.genetics.mother === fromID)
-		.forEach(ft => ft.genetics.mother = toID);
-	WombNormalizePreg(actor);
-};
-
-/* Sorts the womb object by age with oldest and thus soonest to be born, first. This will be needed in the future once individual fertilization is a possibility.*/
-window.WombSort = function(actor) {
-	actor.womb.sort((a, b) => { return b.age - a.age; });
-};
-
-//now function work with chance. Literary we give it "one from X" as chance.
-window.fetalSplit = function(actor, chance) {
-	var i, ft;
-	var nft;
-
-	actor.womb.forEach(function(s){
-		if ((jsRandom(1,chance) >= chance) && s.splitted !== 1)
-		{
-			nft = {};
-			nft.age = s.age;
-			nft.fatherID = s.fatherID;
-			nft.motherID = s.motherID;
-			nft.volume = s.volume;
-			nft.reserve = ""; //splitted fetus is new separate, reserve - it's not genetic to split.
-			nft.genetics = clone(s.genetics);
-			s.splitted = 1; //this is marker that this is already splitted fetus (to not split second time in loop), only source fetus needed it.
-			nft.identical = 1; //this is marker that this fetus has at least one twin.
-			s.identical = 1; //this is marker that this fetus has at least one twin.
-
-			if (s.twinID == "" || s.twinID == undefined)
-				s.twinID = generateNewID();
-
-			nft.twinID = s.twinID;
-
-			actor.womb.push(nft);
-
-		}
-	});
-	WombNormalizePreg(actor);
-};
-
-//safe alternative to .womb.length.
-window.WombFetusCount = function(actor)
-{
-	WombInit(actor);
-	return actor.womb.length;
-}
-
-//give reference to fetus object, but not remove fetus, use for manipulation in the womb.
-window.WombGetFetus = function(actor, fetusNum)
-{
-	WombInit(actor);
-	if (actor.womb.length >= fetusNum)
-		return actor.womb[fetusNum];
-	else
-		return null;
-}
-
-//give reference to fetus object, and remove it form the womb.
-window.WombRemoveFetus = function(actor, fetusNum)
-{
-	WombInit(actor);
-	if (actor.womb.length >= fetusNum){
-		let ft = actor.womb[fetusNum];
-		actor.womb.splice(fetusNum, 1);
-		WombSort(actor);
-		actor.pregType = actor.womb.length;
-		return ft;
-	}
-	else
-		return null;
-}
-
-/*to add fetus object in the womb. Be warned - you can add one single fetus to many wombs, or even add it many times to one womb. It's will not show error, but behavior become strange, as fetus object will be the same - it's reference, not full copies. If this not desired - use clone() on fetus before adding.*/
-window.WombAddFetus = function(actor, fetus)
-{
-	WombInit(actor);
-	actor.womb.push(fetus);
-	WombSort(actor);
-}
-
-// change property for all fetuses. Like fetus.age = X.
-window.WombChangeFetus = function(actor, propName, newValue)
-{
-	WombInit(actor);
-	actor.womb.forEach(ft => ft[propName] = newValue);
-}
-
-// change genetic property of all fetuses. Like fetus.genetic.intelligence = X
-window.WombChangeGene = function(actor, geneName, newValue)
-{
-	WombInit(actor);
-	actor.womb.forEach(ft => ft.genetics[geneName] = newValue);
-}
-
-// replaces untraceable fatherIDs with missingParentID. Required for concurrent pregnancy to differentiate between siblings.
-window.MissingParentIDCorrection = function(actor) {
-	WombInit(actor);
-	actor.womb
-		.filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20 && ft.genetics.father !== -3)))
-		.forEach(ft => ft.genetics.father = State.variables.missingParentID);
-	State.variables.missingParentID--;
-}
-
-window.WombCleanYYFetuses = function(actor)
-{
-	var reserved = [];
-
-	var i = actor.womb.length-1;
-	var ft;
-
-	while (i >= 0)
-	{
-		ft = actor.womb[i];
-
-		if (ft.genetics.gender == "YY")
-		{
-			reserved.push(ft);
-			actor.womb.splice(i, 1);
-		}
-
-		i--;
-	}
-	actor.pregType = actor.womb.length;
-
-	return reserved;
-}
-
-window.FetusGlobalReserveCount = function(reserveType)
-{
-	var cnt = 0;
-	var SV = State.variables;
-
-	if (typeof reserveType != 'string' )
-		return 0;
-
-	SV.slaves.forEach(function(slave){
-		slave.womb.forEach(function(ft){
-			if (ft.reserve == reserveType)
-				cnt++;
-			});
-		});
-
-	SV.PC.womb.forEach(function(ft){
-		if (ft.reserve == reserveType)
-			cnt++;
-		});
-
-	return cnt;
-}
-
-window.WombSetGenericReserve = function(actor, type, count)
-{
-	//console.log ("actor: " + actor + "  type: " + type + "  typeof: " + typeof type + "  count: " + count);
-	actor.womb.forEach(function(ft){
-		//console.log ("  type: " + ft.reserve + "  typeof: " + typeof ft.reserve);
-		if ((ft.reserve == "" || ft.reserve == type) && count > 0)
-		{
-			//console.log ("!trigger");
-			ft.reserve = type;
-			count--;
-		}
-
-	});
-}
-
-window.WombAddToGenericReserve = function(actor, type, count)
-{
-
-	WombSetGenericReserve(actor, type, (WombReserveCount(actor, type)+count));
-
-}
-
-window.WombChangeReserveType = function(actor, oldType, newType)
-{
-
-	var count = 0;
-
-	actor.womb.forEach(function(ft){
-		if (ft.reserve == oldType)
-		{
-			ft.reserve = newType;
-			count++;
-		}
-	});
-
-	return count;
-}
-
-window.WombCleanGenericReserve = function(actor, type, count)
-{
-
-	actor.womb.forEach(function(ft){
-
-		if (ft.reserve == type && count > 0)
-		{
-			ft.reserve = "";
-			count--;
-		}
-
-	});
-}
-
-window.WombReserveCount = function(actor, type)
-{
-
-	var cnt = 0;
-
-	actor.womb.forEach(function(ft){
-
-		if (ft.reserve == type) /* the lazy equality will catch "" case */
-		{
-			cnt++;
-		}
-
-	});
-
-	return cnt;
-}
-
-window.WombGetReservedFetuses = function(actor, type)
-{
-	var reserved = [];
-
-	actor.womb.forEach(function(ft){
-
-		if (ft.reserve == type)
-		{
-			reserved.push(ft);
-		}
-
-	});
-
-	return reserved;
-}
-
-window.WombRemoveReservedFetuses = function(actor, type)
-{
-	var reserved = [];
-
-	var i = actor.womb.length-1;
-	var ft;
-
-	while (i >= 0)
-	{
-		ft = actor.womb[i];
-
-		if (ft.reserve == type)
-		{
-			reserved.push(ft);
-			actor.womb.splice(i, 1);
-		}
-
-		i--;
-	}
-
-	return reserved;
-}
-
-window.WombCleanAllReserve = function(actor)
-{
-
-	actor.womb.forEach(function(ft){
-		ft.reserve = "";
-	});
-
-}
-
-window.BCReserveInit = function()
-{
-	var SV = State.variables;
-
-	SV.slaves.forEach(function(slave)
-	{
-		slave.womb.forEach(function(ft)
-		{
-			if (typeof ft.reserve != 'string')
-				ft.reserve = "";
-				if (typeof ft.motherID != 'number') //setting missing biological mother ID for fetus.
-					ft.motherID = slave.ID;
-
-				if (ft.ID == undefined)
-					ft.ID = generateNewID();
-
-		});
-	});
-
-	SV.PC.womb.forEach(function(ft){
-		if (typeof ft.reserve != 'string')
-			ft.reserve = "";
-			ft.motherID = SV.PC.ID;
-		});
-
-}
-
-/* alt
-window.fetalSplit = function(actor, chance)
-{
-	var i, ft, nft;
-
-	actor.womb.forEach(function(s){
-		if ((jsRandom(1,chance) >= chance) && s.identical !== 1)
-		{
-			nft = clone(s);
-			actor.womb.push(nft);
-			s.identical = 1;
-		}
-	});
-	WombNormalizePreg(actor);
-
-}
-*/
-
-/*:: saChoosesOwnClothes [script]*/
-
-window.saChoosesOwnClothes = (function() {
-	"use strict";
-	let V;
-	let player;
-	let r;
-	let pronouns;
-	let he;
-	let him;
-	let his;
-	let hers;
-	let himself;
-	let boy;
-	let He;
-	let His;
-
-	function saChoosesOwnClothes(slave) {
-		V = State.variables;
-		player = V.PC;
-		r = "";
-		if (slave.choosesOwnClothes !== 1) return r;
-		pronouns = getPronouns(slave);
-		he = pronouns.pronoun;
-		him = pronouns.object;
-		his = pronouns.possessive;
-		hers = pronouns.possessivePronoun;
-		himself = pronouns.objectReflexive;
-		boy = pronouns.noun;
-		He = capFirstChar(he);
-		His = capFirstChar(his);
-
-		if (slave.fetish === "mindbroken") {
-			let corsetChoice = todaysCorset(slave);
-			let clothingChoice = todaysOutfit(slave);
-			slave.bellyAccessory = corsetChoice.bellyAccessory;
-			slave.clothes = clothingChoice.clothes;
-			r += `${He} is fundamentally broken, but still follows some faint memories of standing within the wardrobe. `;
-			if (slave.amp !== 1) {
-				let shoeChoice = todaysShoes(slave);
-				r += `${shoeChoice.text} `;
-				slave.shoes = shoeChoice.shoes;
-			}
-			r += `${corsetChoice.text} Faced with so many choices and no thought on the matter; ${clothingChoice.text}. `;
-		} else if (slave.devotion <= 20) {
-			let clothingChoice = todaysOutfit(slave);
-			slave.clothes = clothingChoice.clothes;
-			r += `${clothingChoice.text} `;
-			if (slave.amp !== 1) {
-				let shoeChoice = todaysShoes(slave);
-				r += `${shoeChoice.text} `;
-				slave.shoes = shoeChoice.shoes;
-			}
-			r += `<span class="mediumorchid">increasing ${his} independence.</span>`;
-			slave.devotion -= 5;
-		} else {
-			let neckChoice = todaysCollar(slave);
-			let corsetChoice = todaysCorset(slave);
-			let clothingChoice = todaysOutfit(slave);
-			slave.collar = neckChoice.collar;
-			slave.bellyAccessory = corsetChoice.bellyAccessory;
-			slave.clothes = clothingChoice.clothes;
-			r += `${He} <span class="hotpink">loves</span> being able to dress ${himself}, ${neckChoice.text} ${corsetChoice.text} ${clothingChoice.text} `;
-			slave.devotion += 1;
-
-			if (V.arcologies[0].FSRestart !== "unset" && slave.choosesOwnChastity == 1) {
-				if (slave.vagina > -1 && slave.breedingMark === 1 && (slave.vaginalAccessory === "chastity belt" || slave.vaginalAccessory === "combined chastity")) {
-					r += `${He} unfastens ${his} chastity belt knowing full well ${his} role in life is to carry ${his} ${WrittenMaster(slave)}'s children. `;
-					slave.vaginalAccessory = "none";
-				} else if (slave.vagina > -1 && slave.ovaries === 1 && slave.preg === 0 && slave.vaginalAccessory !== "chastity belt") {
-					r += `${He} also affixes a chastity belt over ${his} vagina to discourage use of ${his} reproductive organ. `;
-					slave.vaginalAccessory = "chastity belt";
-				} else if (slave.vagina > -1 && (slave.ovaries === 0 || slave.preg < -1) && slave.vaginalAccessory === "chastity belt") {
-					r += `${He} removes ${his} chastity belt since no matter how hard someone tries, ${he} can never become pregnant. `;
-					slave.vaginalAccessory = "none";
-				}
-				if (slave.dick > 0 && slave.balls > 0 && slave.dickAccessory !== "chastity") {
-					r += `${He} also affixes a chastity cage onto ${his} dick to discourage use of ${his} reproductive organ. `;
-					slave.dickAccessory = "chastity";
-				} else if (slave.dick > 0 && slave.balls === 0 && slave.dickAccessory === "chastity") {
-					r += `${He} removes ${his} chastity cage since even if ${he} could get erect, ${he} only shoots blanks. `;
-					slave.dickAccessory = "none";
-				}
-			}
-
-			if (slave.amp !== 1) {
-				let shoeChoice = todaysShoes(slave);
-				r += `${shoeChoice.text}`;
-				slave.shoes = shoeChoice.shoes;
-			}
-		}
-		return r;
-	}
-
-	function todaysOutfit(slave) {
-		let clothing = [];
-		let chosenClothing;
-		let wardrobeAssignment = [];
-		let wardrobeFS = [];
-		let wardrobeTastes = [];
-		let selection;
-
-		if(slave.fetish == 'mindbroken') {
-			if(V.arcologies[0].FSChattelReligionist > 0) {
-				selection = {text: `${he} commonly sees others wearing chattel habits and is drawn to doing so ${himself}.`, clothes: "a chattel habit"};
-			} else {
-				clothing.push('panties');
-				if(V.arcologies[0].FSEgyptianRevivalist > 0) {
-					clothing.push('egyptian');
-				} else if(V.arcologies[0].FSRomanRevivalist > 0) {
-					clothing.push('roman');
-				} else if(V.arcologies[0].FSAztecRevivalist > 0) {
-					clothing.push('aztec');
-				} else if(V.arcologies[0].FSEdoRevivalist > 0) {
-					clothing.push('edo');
-				} else if(V.arcologies[0].FSArabianRevivalist > 0) {
-					clothing.push('arabic');
-				} else if(V.arcologies[0].FSChineseRevivalist > 0) {
-					clothing.push('chinese');
-				}
-				if(V.arcologies[0].FSGenderFundamentalist > 0) {
-					clothing.push('genderFund');
-				}
-				if(V.arcologies[0].FSPaternalist > 0) {
-					clothing.push('paternalist');
-				} else if(V.arcologies[0].FSDegradationist > 0) {
-					clothing.push('degradationist');
-				}
-				if(V.arcologies[0].FSMaturityPreferentialist > 0) {
-					clothing.push('mature');
-				} else if(V.arcologies[0].FSYouthPreferentialist > 0) {
-					clothing.push('youth');
-				}
-				if(V.arcologies[0].FSPhysicalIdealist > 0) {
-					clothing.push('physicalIdealist');
-				}
-				if(V.arcologies[0].FSPastoralist > 0) {
-					clothing.push('pastoralist');
-				}
-				if(V.arcologies[0].FSBodyPurist > 0) {
-					clothing.push('bodyPurist');
-				}
-				chosenClothing = jsEither(clothing);
-				switch(chosenClothing) {
-				case 'egyptian':
-					selection = {text: `${he} commonly sees others wearing nothing but jewelry and is drawn to doing so ${himself}.`, clothes: "slutty jewelry"};
-					break;
-				case 'roman':
-					selection = {text: `${he} commonly sees others wearing togas and is drawn to doing so ${himself}.`, clothes: "a toga"};
-					break;
-				case 'aztec':
-					selection = {text: `${he} commonly sees others wearing huipils and is drawn to doing so ${himself}.`, clothes: "a huipil"};
-					break;
-				case 'edo':
-					selection = {text: `${he} commonly sees others wearing kimonos and is drawn to doing so ${himself}.`, clothes: "a kimono"};
-					break;
-				case 'arabic':
-					selection = {text: `${he} commonly sees others wearing silk and is drawn to doing so ${himself}.`, clothes: "harem gauze"};
-					break;
-				case 'chinese':
-					selection = {text: `${he} commonly sees others wearing qipaos and is drawn to doing so ${himself}.`, clothes: "a slutty qipao"};
-					break;
-				case 'genderFund':
-					if(jsRandom(1,2) == 1) {
-						selection = {text: `${he} commonly sees cheerleaders around and instinctually follows along.`, clothes: jsEither(['a cheerleader outfit', 'a schoolgirl outfit'])};
-					} else {
-						selection = {text: `${he} commonly sees bunnies around and instinctually follows along.`, clothes: "a bunny outfit"};
-					}
-					break;
-				case 'paternalist':
-					selection = {text: `${he} commonly sees others wearing normal clothing and is drawn to doing so ${himself}.`, clothes: "conservative clothing"};
-					break;
-				case 'degradationist':
-					selection = {text: `${he} commonly sees others wearing chains and is drawn to doing so ${himself}.`, clothes: jsEither(['chains', 'uncomfortable straps', 'shibari ropes'])};
-					break;
-				case 'mature':
-					selection = {text: `${he} commonly sees others wearing suits and is drawn to doing so ${himself}.`, clothes: jsEither(['slutty business attire', 'a nice maid outfit', 'nice business attire'])};
-					break;
-				case 'youth':
-					selection = {text: `${he} commonly sees schoolgirls around and instinctually follows along.`, clothes: jsEither(['a schoolgirl outfit', 'a cheerleader outfit'])};
-					break;
-				case 'physicalIdealist':
-					selection = {text: `${he} commonly sees naked girls around and seldom realizes they are coated in oil.`, clothes: jsEither(['body oil', 'no clothing', 'no clothing'])};
-					break;
-				case 'pastoralist':
-					selection = {text: `${he} commonly sees cowgirls around and instinctually follows along.`, clothes: "Western clothing"};
-					break;
-				case 'bodyPurist':
-					selection = {text: `${he} commonly sees others wearing tight, form-fitting clothes and is drawn to doing so ${himself}.`, clothes: jsEither(['a leotard', 'a string bikini', 'a slave gown', 'a comfortable bodysuit', 'restrictive latex', 'clubslut netting', 'a leotard', 'a halter top dress'])};
-					break;
-				default:
-					selection = {text: `${he} chooses to put on underwear, the reasons lost to ${him}, and moves on.`, clothes: jsEither(['attractive lingerie', 'panties'])};
-					break;
-				}
-			}
-		} else if(slave.devotion <= 20) {
-			clothing.push({text: `${He} uses the ability to select outfits to cover up with comfortable cutoffs and a t-shirt.`, clothes: "cutoffs and a t-shirt"});
-			if(isItemAccessible("a hijab and blouse")) {
-				clothing.push({text: `${He} uses the ability to select outfits to cover up with the most conservative clothing ${he} can find.`, clothes: "a hijab and blouse"});
-			}
-			if(isItemAccessible("conservative clothing")) {
-				clothing.push({text: `${He} uses the ability to select outfits to cover up with the most conservative clothing ${he} can find.`, clothes: "conservative clothing"});
-			}
-			if(isItemAccessible("a kimono")) {
-				clothing.push({text: `${He} uses the ability to select outfits to cover ${himself} with a kimono.`, clothes: "a kimono"});
-			}
-			if(isItemAccessible("stretch pants and a crop-top")) {
-				clothing.push({text: `${He} uses the ability to select outfits to cover up with stretch pants and a crop-top, though ${he} wishes it didn't have lewd comments printed on it.`, clothes: "stretch pants and a crop-top"});
-			}
-			selection = jsEither(clothing);
-		} else {
-			if(V.arcologies[0].FSChattelReligionist > 0) {
-				clothing.push({text: `and wears a chattel habit to conform to your arcology's culture.`, clothes: "a chattel habit"});
-			}
-			/*Chooses clothes according to assignment (no exceptions)*/
-			else if(slave.assignment == "be the Nurse") {
-				if(slave.energy > 95 || slave.need > 100) {
-					wardrobeAssignment.push({text: `and wears a slutty nurse outfit to make it clear just how much this nurse needs ${his} daily lay.`, clothes: "a slutty nurse outfit"});
-				} else if(slave.energy > 80) {
-					wardrobeAssignment.push({text: `and wears a slutty nurse outfit to show off ${his} body and arouse ${his} patients.`, clothes: "a slutty nurse outfit"});
-					if(isItemAccessible("a nice nurse outfit")) {
-						wardrobeAssignment.push({text: `and wears a nice nurse outfit to look professional before ${his} patients.`, clothes: "a nice nurse outfit"});
-					}
-					wardrobeAssignment.push({text: `and wears a slutty nurse outfit to show to a little skin as ${he} cares for ${his} patients.`, clothes: "a slutty nurse outfit"});
-				} else {
-					if(isItemAccessible("a nice nurse outfit")) {
-						wardrobeAssignment.push({text: `and wears a nice nurse outfit to look professional before ${his} patients.`, clothes: "a nice nurse outfit"});
-					}
-					wardrobeAssignment.push({text: `and wears a slutty nurse outfit to show to a little skin as ${he} cares for ${his} patients.`, clothes: "a slutty nurse outfit"});
-				}
-			} else if(slave.assignment == "be the Madam") {
-				if(slave.energy > 95 || slave.need > 100) {
-					wardrobeAssignment.push({text: `and wears a slutty suit to be certain nothing blocks ${him} from getting the sex ${he} needs.`, clothes: "slutty business attire"});
-				} else if(slave.energy > 80) {
-					if(isItemAccessible("nice business attire")) {
-						wardrobeAssignment.push({text: `and wears a nice suit to show ${he} means business.`, clothes: "nice business attire"});
-					}
-					wardrobeAssignment.push({text: `and wears a slutty suit to entice and arouse while still looking managerial.`, clothes: "slutty business attire"});
-					wardrobeAssignment.push({text: `and wears a slutty suit to entice and arouse while still looking managerial.`, clothes: "slutty business attire"});
-				} else {
-					if(isItemAccessible("nice business attire")) {
-						wardrobeAssignment.push({text: `and wears a nice suit to show ${he} means business.`, clothes: "nice business attire"});
-					}
-					wardrobeAssignment.push({text: `and wears a slutty suit to entice and arouse while still looking managerial.`, clothes: "slutty business attire"});
-				}
-			} else if(slave.assignment == "be the Milkmaid") {
-				if(slave.energy > 95 || slave.need > 100) {
-					if(isItemAccessible("body oil")) {
-						wardrobeAssignment.push({text: `and coats ${himself} with oil to better slip between ${his} cows as ${he} pleasures them.`, clothes: "body oil"});
-					}
-					wardrobeAssignment.push({text: `but goes nude to not be slowed down while moving between ${his} charges.`, clothes: "no clothing"});
-				} else {
-					if(isItemAccessible("a nice maid outfit")) {
-						wardrobeAssignment.push({text: `and wears a sturdy maid outfit, since anything else might be damaged by ${his} hard work with the cows.`, clothes: "a nice maid outfit"});
-					}
-					wardrobeAssignment.push({text: `and decides to call it Casual Friday and wear nothing but cutoffs and a t-shirt. Not like the cows will mind.`, clothes: "cutoffs and a t-shirt"});
-					wardrobeAssignment.push({text: `and opts to don a cheerleader outfit to help cheer the cows on.`, clothes: "a cheerleader outfit"});
-					wardrobeAssignment.push({text: `and dresses up as a succubus since ${he}'ll be drawing plenty of fluids.`, clothes: "a succubus outfit"});
-					wardrobeAssignment.push({text: `and slips into some spats and a tank top since ${he} feels a workout coming on.`, clothes: "spats and a tank top"});
-					if(isItemAccessible("Western clothing")) {
-						wardrobeAssignment.push({text: `and wears an appropriate cowgirl outfit. ${His} bare ass walking past is sure to amuse ${his} charges.`, clothes: "Western clothing"});
-					}
-					if(isItemAccessible("stretch pants and a crop-top")) {
-						wardrobeAssignment.push({text: `and slips into some comfy stretch pants to relax as ${he} works the cows.`, clothes: "stretch pants and a crop-top"});
-					}
-					if(State.variables.cumSlaves > 2) {
-						wardrobeAssignment.push({text: `and wears a slutty nurse outfit to help keep ${his} charges hard.`, clothes: "a slutty nurse outfit"});
-						wardrobeAssignment.push({text: `and wears nothing but sexy lingerie to help keep ${his} charges hard.`, clothes: "attractive lingerie"});
-						wardrobeAssignment.push({text: `and wears the skimpiest bikini on hand to help keep ${his} charges hard.`, clothes: "a string bikini"});
-						if(isItemAccessible("body oil")) {
-							wardrobeAssignment.push({text: `and coats ${himself} in oil for ${his} charges to savor.`, clothes: "body oil"});
-						}
-					}
-				}
-			} else if(slave.assignment == "be your Head Girl") {
-				if(isItemAccessible("a military uniform")) {
-					wardrobeAssignment.push({text: `and wears a military uniform to give ${him} that extra touch of authority.`, clothes: "a military uniform"});
-				}
-				if(isItemAccessible("a schutzstaffel uniform")) {
-					wardrobeAssignment.push({text: `and wears a schutzstaffel uniform to give ${him} that extra touch of authority.`, clothes: "a schutzstaffel uniform"});
-					wardrobeAssignment.push({text: `and wears a slutty schutzstaffel uniform to give ${him} that extra touch of authority.`, clothes: "a slutty schutzstaffel uniform"});
-				}
-				if(isItemAccessible("a red army uniform")) {
-					wardrobeAssignment.push({text: `and wears a red army uniform to give ${him} that extra touch of authority.`, clothes: "a red army uniform"});
-				}
-				if(isItemAccessible("a mounty outfit")) {
-					wardrobeAssignment.push({text: `and wears a mounty outfit to give ${him} that extra touch of authority.`, clothes: "a mounty outfit"});
-				}
-				if(isItemAccessible("nice business attire")) {
-					wardrobeAssignment.push({text: `and wears a handsome suit to give ${him} that extra touch of authority.`, clothes: "nice business attire"});
-				}
-				if(canPenetrate(slave)){
-					wardrobeAssignment.push({text: `and wears a slutty suit to make it perfectly clear that ${his} dick is ${his} main tool in ${his} job.`, clothes: "slutty business attire"});
-				}
-				wardrobeAssignment.push({text: `and wears a slutty suit to make it perfectly clear that ${his} dick is ${his} main tool in ${his} job.`, clothes: "slutty business attire"});
-			} else if(slave.assignment == "be the Schoolteacher") {
-				if(isItemAccessible("nice business attire")) {
-					wardrobeAssignment.push({text: `and wears a handsome suit to give ${him} that teacherly authority.`, clothes: "nice business attire"});
-				}
-				wardrobeAssignment.push({text: `and wears a slutty suit to give ${him} an air of authority will keeping all eyes focused on ${him}.`, clothes: "slutty business attire"});
-				wardrobeAssignment.push({text: `and wears a schoolgirl outfit to help keep ${his} charges focused on ${him}.`, clothes: "a schoolgirl outfit"});
-				wardrobeAssignment.push({text: `and dresses up as a succubus to give ${his} sex lessons an extra kick.`, clothes: "a succubus outfit"});
-				if(isItemAccessible("conservative clothing")) {
-					wardrobeAssignment.push({text: `and wears conservative clothes to not detract from this week's lesson.`, clothes: "conservative clothing"});
-				}
-				if(isItemAccessible("a toga")) {
-					wardrobeAssignment.push({text: `and wraps ${himself} in a toga to model ${himself} after the philosophers of yore.`, clothes: "a toga"});
-				}
-				if(isItemAccessible("a maternity dress") && slave.belly >= 10000) {
-					wardrobeAssignment.push({text: `and settles for a comfortable maternity dress to support ${his} middle while ${he} lectures in front of the class all week.`, clothes: "a maternity dress"});
-				}
-			} else if(slave.assignment == "be the Wardeness") {
-				if(isItemAccessible("battledress")) {
-					wardrobeAssignment.push({text: `and dons battledress, the better to intimidate the prisoners.`, clothes: "battledress"});
-				}
-				wardrobeAssignment.push({text: `and slips into a scalemail bikini, the better to intimidate the prisoners.`, clothes: "a scalemail bikini"});
-				wardrobeAssignment.push({text: `and dons a scandalous habit to make it perfectly clear that crossing this nun will result in sexual punishment.`, clothes: "a fallen nuns habit"});
-				if(isItemAccessible("a military uniform")) {
-					wardrobeAssignment.push({text: `and wears a military uniform to look even more brutal and authoritative.`, clothes: "a military uniform"});
-				}
-				if(isItemAccessible("a schutzstaffel uniform")) {
-					wardrobeAssignment.push({text: `and wears a schutzstaffel uniform to look even more brutal and authoritative.`, clothes: "a schutzstaffel uniform"});
-					wardrobeAssignment.push({text: `and wears a slutty schutzstaffel uniform to look even more brutal and authoritative.`, clothes: "a slutty schutzstaffel uniform"});
-				}
-				if(isItemAccessible("a red army uniform")) {
-					wardrobeAssignment.push({text: `and wears a red army uniform to look even more brutal and authoritative.`, clothes: "a red army uniform"});
-				}
-				if(isItemAccessible("stretch pants and a crop-top")) {
-					wardrobeAssignment.push({text: `and decides to take it easy by slipping into some stretch pants. They come off just as quickly as they come on, just in case.`, clothes: "stretch pants and a crop-top"});
-				}
-			} else if(slave.assignment == "be the Attendant") {
-				wardrobeAssignment.push({text: `and wears a string bikini, since it's all ${he} can wear that won't be ruined by all the moisture in the spa.`, clothes: "a string bikini"});
-				if(isItemAccessible("a monokini")) {
-					wardrobeAssignment.push({text: `and wears an one-piece swimsuit, since it's all ${he} can wear that won't be ruined by all the moisture in the spa.`, clothes: "a monokini"});
-				}
-				if(isItemAccessible("one-piece swimsuit")) {
-					wardrobeAssignment.push({text: `and wears a one-piece swimsuit, since it's all ${he} can wear that won't be ruined by all the moisture in the spa.`, clothes: "one-piece swimsuit"});
-				}
-				if(isItemAccessible("a burkini")) {
-					wardrobeAssignment.push({text: `and wears a modest swimsuit, since it's all ${he} can wear that won't be ruined by all the moisture in the spa.`, clothes: "a burkini"});
-				}
-				wardrobeAssignment.push({text: `but decides to go nude, since ${he}'ll be spending so much time in the water.`, clothes: "no clothing"});
-			} else if(slave.assignment == "rest") {
-				wardrobeAssignment.push({text: `and wears a comfortable t-shirt and cutoffs to relax.`, clothes: "cutoffs and a t-shirt"});
-				wardrobeAssignment.push({text: `and slips into some attractive lingerie to enjoy ${himself} as ${he} unwinds.`, clothes: "attractive lingerie"});
-				wardrobeAssignment.push({text: `and slips into nothing more than a pair of panties.`, clothes: "panties"});
-				wardrobeAssignment.push({text: `but decides that clothing takes too much work and would rather sleep nude.`, clothes: "no clothing"});
-				if(isItemAccessible("stretch pants and a crop-top")) {
-					wardrobeAssignment.push({text: `and slips into some comfy stretch pants to relax.`, clothes: "stretch pants and a crop-top"});
-				}
-				if(isItemAccessible("attractive lingerie for a pregnant woman") && slave.belly >= 1500) {
-					wardrobeAssignment.push({text: `and slips into some attractive lingerie to enjoy ${himself} as ${he} unwinds.`, clothes: "attractive lingerie for a pregnant woman"});
-				}
-				if(slave.fetish == "submissive") {
-					wardrobeAssignment.push({text: `and decides the best way to relax is tied up nice and tight.`, clothes: "shibari ropes"});
-				}
-			} else if(slave.assignment == "get milked" || slave.assignment == "work in the dairy") {
-				wardrobeAssignment.push({text: `and wears sturdy lingerie to offer the best support to ${his} sore, milk-filled udders.`, clothes: "attractive lingerie"});
-				if(isItemAccessible("attractive lingerie for a pregnant woman") && slave.belly >= 1500) {
-					wardrobeAssignment.push({text: `and wears lingerie designed for milky mothers.`, clothes: "attractive lingerie for a pregnant woman"});
-				}
-				if(isItemAccessible("a maternity dress") && slave.belly >= 10000) {
-					wardrobeAssignment.push({text: `and chooses a maternity dress since it is easy to free ${his} breasts from.`, clothes: "a maternity dress"});
-				}
-				wardrobeAssignment.push({text: `and wears a string bikini for easy access to ${his} udders.`, clothes: "a string bikini"});
-				if(slave.lactation > 1) {
-					wardrobeAssignment.push({text: `but goes nude. There's no time for clothing, ${his} udders need to be drained now!`, clothes: "no clothing"});
-				}
-				wardrobeAssignment.push({text: `and dons a slutty outfit. If ${his} breasts are going to hang out, might as well wear something to complement them.`, clothes: "a slutty outfit"});
-			} else if(slave.assignment == "guard you") {
-				wardrobeAssignment.push({text: `and wears a bodysuit to show off ${his} curves without hindering ${his} deadliness.`, clothes: "a comfortable bodysuit"});
-				if(isItemAccessible("a military uniform")) {
-					wardrobeAssignment.push({text: `and wears a military uniform to look the part of the honor guard.`, clothes: "a military uniform"});
-				}
-				if(isItemAccessible("a schutzstaffel uniform")) {
-					wardrobeAssignment.push({text: `and wears a schutzstaffel uniform to look the part of the honor guard.`, clothes: "a schutzstaffel uniform"});
-					wardrobeAssignment.push({text: `and wears a slutty schutzstaffel uniform to look the part of the honor guard.`, clothes: "a slutty schutzstaffel uniform"});
-				}
-				if(isItemAccessible("a red army uniform")) {
-					wardrobeAssignment.push({text: `and wears a red army uniform to look the part of the honor guard.`, clothes: "a red army uniform"});
-				}
-				if(isItemAccessible("nice business attire")) {
-					wardrobeAssignment.push({text: `and wears a nice suit to make it clear you mean business.`, clothes: "nice business attire"});
-				}
-				if(isItemAccessible("a mounty outfit")) {
-					wardrobeAssignment.push({text: `and wears a mounty outfit to make it clear you mean business.`, clothes: "a mounty outfit"});
-				}
-				wardrobeAssignment.push({text: `and wears a scalemail bikini to make ${himself} look fierce.`, clothes: "a scalemail bikini"});
-				if(isItemAccessible("a kimono")) {
-					wardrobeAssignment.push({text: `and wears a nice kimono to add an air of elegance to your presence.`, clothes: "a kimono"});
-				}
-			} else {
-				/*Chooses clothes according to assignment (exceptions allowed)*/
-				if(slave.assignment == "recruit girls") {
-					if(isItemAccessible("a mini dress")) {
-						wardrobeAssignment.push({text: `and wears a flattering mini dress to appear sexy and carefree before those desperately seeking a better life.`, clothes: "a mini dress"});
-					}
-					wardrobeAssignment.push({text: `and wears a cutoffs and a t-shirt to appear sexy and carefree before those desperately seeking a better life.`, clothes: "cutoffs and a t-shirt"});
-					if(isItemAccessible("nice business attire")) {
-						wardrobeAssignment.push({text: `and wears a nice suit to appear trustworthy before those desperately seeking a better life.`, clothes: "nice business attire"});
-					}
-					wardrobeAssignment.push({text: `and wears a schoolgirl outfit to appear sexy and carefree before those desperately seeking a better life.`, clothes: "a schoolgirl outfit"});
-					if(isItemAccessible("a ball gown")) {
-						wardrobeAssignment.push({text: `and wears an opulent gown to showcase your wealth before those desperately seeking a better life.`, clothes: "a ball gown"});
-					}
-					wardrobeAssignment.push({text: `and dresses as a succubus to attempt to lure any potential catches.`, clothes: "a succubus outfit"});
-					if(isItemAccessible("harem gauze")) {
-						wardrobeAssignment.push({text: `and dons ${his} finest silks to showcase the luxuries waiting would-be slaves.`, clothes: "harem gauze"});
-					}
-					if(isItemAccessible("stretch pants and a crop-top")) {
-						wardrobeAssignment.push({text: `and wears comfortable stretch pants to and crop-top to appear carefree before those desperately seeking a better life.`, clothes: "stretch pants and a crop-top"});
-					}
-					if(isItemAccessible("conservative clothing")) {
-						wardrobeAssignment.push({text: `and wears normal clothing to suggest to those desperately seeking a better life that they can find it here with you.`, clothes: "conservative clothing"});
-					}
-				} else if(slave.assignment == "be the DJ") {
-					wardrobeAssignment.push({text: `and wears clubslut netting to look like the perfect easy club girl.`, clothes: "clubslut netting"});
-					wardrobeAssignment.push({text: `and wears cutoffs and a t-shirt to look like the perfect easy club girl.`, clothes: "cutoffs and a t-shirt"});
-					wardrobeAssignment.push({text: `and wears the slutty outfit ${he} can find to look like the perfect easy club girl.`, clothes: "a slutty outfit"});
-					wardrobeAssignment.push({text: `and wears nothing but slutty jewelry since ${he} loves the way it jingles to ${his} moves.`, clothes: "slutty jewelry"});
-					wardrobeAssignment.push({text: `and wears a skin tight bodysuit so nothing gets in the way of ${his} moves.`, clothes: "a comfortable bodysuit"});
-					if(slave.boobs > 1000) {
-						wardrobeAssignment.push({text: `but decides to go naked and let ${his} girls bounce free as ${he} dances.`, clothes: "no clothing"});
-					}
-					if(isItemAccessible("harem gauze")) {
-						wardrobeAssignment.push({text: `and wears the finest available silks to give ${his} moves a sensual grace.`, clothes: "harem gauze"});
-					}
-				} else if(slave.assignment == "be your Concubine") {
-					wardrobeAssignment.push({text: `and goes naked, since it's ${his} honored role to be the chief object of your desire.`, clothes: "no clothing"});
-					wardrobeAssignment.push({text: `and dresses as a slutty nurse as your genitals are always in need of ${his} special treatment.`, clothes: "a slutty nurse outfit"});
-					wardrobeAssignment.push({text: `and dresses as a schoolgirl in the hopes that you teach ${him} how to be a woman.`, clothes: "a schoolgirl outfit"});
-					wardrobeAssignment.push({text: `and dresses as a cheerleader so ${he} may cheer you on as you blow ${his} mind.`, clothes: "a cheerleader outfit"});
-					if(player.dick == 1) {
-						wardrobeAssignment.push({text: `and dresses as a slutty maid as you always come home with a stiff package that needs a thorough polishing.`, clothes: "a slutty maid outfit"});
-					}
-					wardrobeAssignment.push({text: `and, since you personally see that ${he} never goes hungry, ${he} dresses like the sex demoness ${he} is.`, clothes: "a succubus outfit"});
-					if(isItemAccessible("attractive lingerie for a pregnant woman") && slave.belly >= 10000 && slave.pregSource == -1) {
-						wardrobeAssignment.push({text: `and chooses attractive lingerie to showcase the body you've given ${him} in the hopes that you ravish ${him}.`, clothes: "attractive lingerie for a pregnant woman"});
-					}
-					if(slave.toyHole == "dick" && canPenetrate(slave)) {
-						wardrobeAssignment.push({text: `and slips into a scalemail bikini so ${he} can act the role of your conqueror as ${he} bends you over.`, clothes: "a scalemail bikini"});
-					}
-				} else if(slave.assignment == "be a subordinate slave") {
-					wardrobeAssignment.push({text: `but gives up and goes naked after the other slaves constantly tear whatever ${he}'s wearing off ${him}.`, clothes: "no clothing"});
-					if(isItemAccessible("Western clothing")) {
-						wardrobeAssignment.push({text: `and chooses a pair of crotchless chaps so your other slaves don't have to waste time undressing ${him}.`, clothes: "Western clothing"});
-					}
-					if(slave.fetish == "submissive") {
-						wardrobeAssignment.push({text: `and chooses to slip on a pair of spats and a tank top in the hopes that ${he} gets to be a violated schoolgirl.`, clothes: "spats and a tank top"});
-						wardrobeAssignment.push({text: `and chooses to slip on a schoolgirl outfit in the hope that ${he} gets held down and raped.`, clothes: "a schoolgirl outfit"});
-						wardrobeAssignment.push({text: `and chooses to wear the sluttiest outfit available to make it clear what ${he} wants done to ${him}.`, clothes: "a slutty outfit"});
-					}
-				} else if(slave.assignment == "work a glory hole") {
-					wardrobeAssignment.push({text: `but doesn't bother wearing anything, since no one can see ${his} clothing when ${he}'s immured inside a glory hole.`, clothes: "no clothing"});
-				} else if(slave.assignment == "take classes" || slave.assignment == "learn in the schoolroom") {
-					wardrobeAssignment.push({text: `and wears a schoolgirl outfit, since it seems most appropriate.`, clothes: "a schoolgirl outfit"});
-					wardrobeAssignment.push({text: `and wears a cheerleader outfit, since ${he} might as well be one of the popular girls.`, clothes: "a cheerleader outfit"});
-					if(isItemAccessible("conservative clothing")) {
-						wardrobeAssignment.push({text: `and wears normal clothing to not distract from ${his} lessons.`, clothes: "conservative clothing"});
-					}
-				} else if((slave.assignment == "whore") || (slave.assignment == "work in the brothel")) {
-					if(slave.belly >= 5000 && isItemAccessible("attractive lingerie for a pregnant woman")) {
-						wardrobeAssignment.push({text: `and wears pretty lingerie to show off ${his} merchandise and accentuate ${his} pregnancy while still looking a little classy.`, clothes: "attractive lingerie for a pregnant woman"});
-					}
-					wardrobeAssignment.push({text: `and wears pretty lingerie to show off ${his} merchandise and still look a little classy.`, clothes: "attractive lingerie"});
-					if(isItemAccessible("kitty lingerie")) {
-						wardrobeAssignment.push({text: `and wears pretty lingerie to show off ${his} merchandise and still look a little cute.`, clothes: "kitty lingerie"});
-					}
-					if(isItemAccessible("harem gauze")) {
-						wardrobeAssignment.push({text: `and dresses ${himself} with harem gauze to add an exotic charm to ${his} display.`, clothes: "harem gauze"});
-					}
-					if(isItemAccessible("a kimono")) {
-						wardrobeAssignment.push({text: `and wraps ${himself} in a kimono to add some elegance to ${his} display.`, clothes: "a kimono"});
-					}
-					if(isItemAccessible("a slave gown")) {
-						wardrobeAssignment.push({text: `and adorns ${himself} in fine dress to show off how much of a high class whore ${he} is.`, clothes: "a slave gown"});
-					}
-					wardrobeAssignment.push({text: `and dresses ${himself} in a slutty suit to show ${he}'s in it for the ¤.`, clothes: "slutty business attire"});
-					if(isItemAccessible("a mini dress")) {
-						wardrobeAssignment.push({text: `and wears a flattering mini dress to really strut ${his} stuff.`, clothes: "a mini dress"});
-					}
-				} else if(slave.assignment == "serve the public" || slave.assignment == "serve in the club") {
-					wardrobeAssignment.push({text: `and wears string lingerie to look fun and fuckable.`, clothes: "a string bikini"});
-					wardrobeAssignment.push({text: `and throws together the sluttiest outfit since if you're going to slut you might as well go all out.`, clothes: "a slutty outfit"});
-					wardrobeAssignment.push({text: `and tosses on a slutty suit that screams ${he} needs a good fuck after a long day.`, clothes: "slutty business attire"});
-					wardrobeAssignment.push({text: `and dresses up as a slutty nurse; ${he} has just the technique to cure penile swelling.`, clothes: "a slutty nurse outfit"});
-					wardrobeAssignment.push({text: `and wears a cheerleader outfit to look energetic and fuckable.`, clothes: "a cheerleader outfit"});
-					if(isItemAccessible("a bunny outfit")) {
-						wardrobeAssignment.push({text: `and slips into a teddy to add some class to ${his} post.`, clothes: "a bunny outfit"});
-					}
-					wardrobeAssignment.push({text: `and dresses up as a succubus to clearly advertise ${his} promiscuity.`, clothes: "a succubus outfit"});
-					if(slave.bellyPreg >= 10000) {
-						wardrobeAssignment.push({text: `and struggles into a schoolgirl outfit. ${His} gravid belly just screams that ${he} is a slutty little student who cares more for dick than lessons.`, clothes: "a succubus outfit"});
-					}
-				} else if(slave.assignment == "be a servant" || slave.assignment == "work as a servant") {
-					if(slave.energy > 95 || slave.need > 100) {
-						wardrobeAssignment.push({text: `and wears a skimpy maid outfit hoping that someone sneaks up behind ${him} as ${he} works and fulfills ${his} desires.`, clothes: "a slutty maid outfit"});
-						wardrobeAssignment.push({text: `and wears nothing more than an apron in the hopes that someone sneaks up behind ${him} as ${he} works and fulfills ${his} desires.`, clothes: "an apron"});
-					} else if(slave.energy > 80) {
-						wardrobeAssignment.push({text: `and wears a skimpy maid outfit to tempt anyone watching ${his} work.`, clothes: "a slutty maid outfit"});
-						if(isItemAccessible("a nice maid outfit")) {
-							wardrobeAssignment.push({text: `and wears a sturdy maid outfit, since anything else might be damaged by ${his} hard work around the penthouse.`, clothes: "a nice maid outfit"});
-						}
-						wardrobeAssignment.push({text: `and wears a skimpy maid outfit to tempt anyone watching ${his} work.`, clothes: "a slutty maid outfit"});
-						wardrobeAssignment.push({text: `and wears nothing more than an apronto tempt anyone watching ${his} work.`, clothes: "an apron"});
-					} else {
-						if(isItemAccessible("a nice maid outfit")) {
-							wardrobeAssignment.push({text: `and wears a sturdy maid outfit, since anything else might be damaged by ${his} hard work around the penthouse.`, clothes: "a nice maid outfit"});
-						}
-						wardrobeAssignment.push({text: `and wears a skimpy maid outfit to tempt anyone watching ${his} work.`, clothes: "a slutty maid outfit"});
-						wardrobeAssignment.push({text: `and wears nothing more than an apronto tempt anyone watching ${his} work.`, clothes: "an apron"});
-					}
-				}
-
-				/* Chooses clothes according to FS*/
-				if(V.arcologies[0].FSEgyptianRevivalist > 0) {
-					wardrobeFS.push({text: `and complements it with golden bangles, since no clothing is necessary for a sex slave in your warm and sunny arcology.`, clothes: "slutty jewelry"});
-				} else if(V.arcologies[0].FSRomanRevivalist > 0) {
-					wardrobeFS.push({text: `and wears a toga to take part in your Roman revivalism.`, clothes: "a toga"});
-				} else if(V.arcologies[0].FSEdoRevivalist > 0) {
-					wardrobeFS.push({text: `and wears a kimono, overjoyed that such lovely clothing is now appropriate.`, clothes: "a kimono"});
-				} else if(V.arcologies[0].FSArabianRevivalist > 0) {
-					wardrobeFS.push({text: `and wears a harem outfit to look like a slave girl fit for a Sultan.`, clothes: "harem gauze"});
-				} else if(V.arcologies[0].FSChineseRevivalist > 0) {
-					wardrobeFS.push({text: `and wears a brief qipao to show off and look Chinese at the same time.`, clothes: "a slutty qipao"});
-					wardrobeFS.push({text: `and wears a long qipao to show off and look Chinese at the same time.`, clothes: "a long qipao"});
-				} else if(V.arcologies[0].FSAztecRevivalist > 0) {
-					wardrobeFS.push({text: `and drapes a huipil over ${himself} to fit in with your Aztec revivalism.`, clothes: "a huipil"});
-				}
-				if(V.arcologies[0].FSGenderFundamentalist > 0) {
-					wardrobeFS.push({text: `and wears a schoolgirl outfit to look like a hot slut.`, clothes: "a schoolgirl outfit"});
-					wardrobeFS.push({text: `and wears a cheerleader outfit to look like a hot slut.`, clothes: "a cheerleader outfit"});
-					wardrobeFS.push({text: `and wears a bunny outfit to look like a slut from the glory days.`, clothes: "a bunny outfit"});
-					wardrobeFS.push({text: `and wears only an apron, making ${him} look like a slutty housewife.`, clothes: "an apron"});
-					if(slave.bellyPreg >= 5000) {
-						wardrobeFS.push({text: `but decides to wear nothing at all; ${he}'s already pregnant, so ${he} just needs to be barefoot and naked to complete ${his} look.`, clothes: "no clothing"});
-					}
-				} else if(V.arcologies[0].FSGenderRadicalist > 0) {
-					wardrobeFS.push({text: `and eagerly slips into a skimpy maid outfit so ${he} can take advantage of its short skirt and ${his} lack of underwear`, clothes: "a slutty maid outfit"});
-					wardrobeFS.push({text: `and wears a cheerleader outfit that clearly shows off ${his} ass.`, clothes: "a cheerleader outfit"});
-					wardrobeFS.push({text: `and settles for some sexy succubutt.`, clothes: "a succubus outfit"});
-				}
-				if(V.arcologies[0].FSPaternalist > 0) {
-					wardrobeFS.push({text: `and wears conservative clothing, as permitted by your paternalism.`, clothes: "conservative clothing"});
-					if(isItemAccessible("a hijab and blouse") && slave.race == "middle eastern") {
-						wardrobeFS.push({text: `and wears very conservative clothing, as permitted by your paternalism.`, clothes: "a hijab and blouse"});
-					}
-					if(isItemAccessible("stretch pants and a crop-top")) {
-						wardrobeFS.push({text: `and wears the most comfortable stretch pants ${he} can find.`, clothes: "stretch pants and a crop-top"});
-					}
-				} else if(V.arcologies[0].FSDegradationist > 0) {
-					wardrobeFS.push({text: `and wears chains, to degrade ${himself} as required by your societal goals.`, clothes: "chains"});
-					wardrobeFS.push({text: `and binds ${himself} with a set of uncomfortable straps.`, clothes: "uncomfortable straps"});
-					wardrobeFS.push({text: `and binds ${himself} with a set of uncomfortable ropes.`, clothes: "shibari ropes"});
-				}
-				if(V.arcologies[0].FSMaturityPreferentialist > 0) {
-					if(slave.visualAge >= 30) {
-						if(isItemAccessible("nice business attire")) {
-							wardrobeFS.push({text: `and wears a formal suit to look like the ideal older woman.`, clothes: "nice business attire"});
-						}
-						wardrobeFS.push({text: `and wears a slutty suit to look like the ideal horny older woman.`, clothes: "slutty business attire"});
-						wardrobeFS.push({text: `and wears only an apron to make ${himself} seem more matronly.`, clothes: "an apron"});
-					} else {
-						if(isItemAccessible("nice business attire")) {
-							wardrobeFS.push({text: `and wears a formal suit to look more mature.`, clothes: "nice business attire"});
-						}
-						wardrobeFS.push({text: `and wears only an apron in an attempt to make ${himself} seem more matronly.`, clothes: "an apron"});
-					}
-				} else if(V.arcologies[0].FSYouthPreferentialist > 0) {
-					wardrobeFS.push({text: `and wears a schoolgirl outfit to look younger.`, clothes: "a schoolgirl outfit"});
-					wardrobeFS.push({text: `and wears a cheerleader outfit to look younger and more energetic.`, clothes: "a cheerleader outfit"});
-					wardrobeFS.push({text: `and wears spats and a tank top to look younger and more energetic.`, clothes: "spats and a tank top"});
-				}
-				if(V.arcologies[0].FSPhysicalIdealist > 0) {
-					wardrobeFS.push({text: `and coats ${himself} in body oil to show off how ${he}'s part of your physical idealism.`, clothes: "body oil"});
-					wardrobeFS.push({text: `and goes totally nude to show off how ${he}'s part of your physical idealism.`, clothes: "no clothing"});
-					wardrobeFS.push({text: `and slips into a leotard for ${his} next workout.`, clothes: "a leotard"});
-					wardrobeFS.push({text: `and slips into some spats for ${his} next workout.`, clothes: "spats and a tank top"});
-				} else if(V.arcologies[0].FSHedonisticDecadence > 0) {
-					wardrobeFS.push({text: `and throws on a very casual getup.`, clothes: "stretch pants and a crop-top"});
-					wardrobeFS.push({text: `but decides against putting forth the effort and goes nude.`, clothes: "no clothing"});
-				}
-				if(V.arcologies[0].FSPastoralist > 0) {
-					wardrobeFS.push({text: `and wears Western clothing, since ${he} thinks it fits with pastoralism.`, clothes: "Western clothing"});
-					if(isItemAccessible("a monokini")) {
-						wardrobeFS.push({text: `and wears a swimsuit that leaves ${his} breasts uncovered.`, clothes: "a monokini"});
-					}
-					if(isItemAccessible("pasties")) {
-						wardrobeFS.push({text: `and wears nothing more than a pair of pasties over ${his} nipples.`, clothes: "pasties"});
-					}
-					if(slave.lactation > 0) {
-						wardrobeFS.push({text: `and dresses up as a slutty wet nurse.`, clothes: "a slutty nurse outfit"});
-					}
-					wardrobeFS.push({text: `but decides to let ${his} breasts be free. Clothes will just get in the way.`, clothes: "no clothing"});
-				}
-				if(V.arcologies[0].FSBodyPurist > 0) {
-					wardrobeFS.push({text: `and wears a leotard to show off the purity of ${his} body.`, clothes: "a leotard"});
-					wardrobeFS.push({text: `but decides ${his} body is too nice to hide with clothing.`, clothes: "no clothing"});
-					if(isItemAccessible("body oil")) {
-						wardrobeFS.push({text: `and coats ${his} pure body in oil to make it stand out.`, clothes: "body oil"});
-					}
-				} else if(V.arcologies[0].FSTransformationFetishist > 0) {
-					wardrobeFS.push({text: `and decides squeezing into a latex suit will only complement ${his} unnatural appearance.`, clothes: "restrictive latex"});
-					wardrobeFS.push({text: `and decides to go nude, ensuring everyone sees ${his} assets.`, clothes: "no clothing"});
-					if(isItemAccessible("body oil")) {
-						wardrobeFS.push({text: `and coats ${his} assets in body oil to give them some extra shine.`, clothes: "body oil"});
-					}
-				}
-				if(V.arcologies[0].FSAssetExpansioninst > 0) {
-					wardrobeFS.push({text: `and decides to dress up like a young man's wet dream.`, clothes: "a succubus outfit"});
-					wardrobeFS.push({text: `and decides to wear a skimpy bikini to make ${his} assets look even larger.`, clothes: "a string bikini"});
-					wardrobeFS.push({text: `and decides to throw together a slutty outfit that highlight ${his} assets.`, clothes: "a slutty outfit"});
-					if(isItemAccessible("a monokini")) {
-						wardrobeFS.push ({text: `and decides to wear a monokini that clings to the assets it actually does conceal.`, clothes: "a monokini"});
-					}
-				} else if(V.arcologies[0].FSSlimnessEnthusiast > 0) {
-					if(slave.boobs < 300) {
-						wardrobeFS.push({text: `and wears a string bikini to show off just how flat ${he} is.`, clothes: "a string bikini"});
-						if(isItemAccessible("a monokini")) {
-							wardrobeFS.push({text: `and wears a monokini that leaves ${his} flat chest bare.`, clothes: "a monokini"});
-						}
-						wardrobeFS.push({text: `and wears only panties, leaving ${his} flat chest bare.`, clothes: "panties"});
-					}
-					if(slave.boobs < 600 && slave.butt < 3) {
-						wardrobeFS.push({text: `and wears a leotard to show off ${his} lithe body.`, clothes: "a leotard"});
-						wardrobeFS.push({text: `and wears a form fitting bodysuit to show off ${his} lithe figure.`, clothes: "a comfortable bodysuit"});
-						wardrobeFS.push({text: `and wears spats to hug ${his} tight butt.`, clothes: "spats and a tank top"});
-						wardrobeFS.push({text: `and wears an apron that covers ${his} front while leaving ${his} rear free.`, clothes: "an apron"});
-					} else {
-						wardrobeFS.push({text: `and squeezes into a form fitting bodysuit in the hopes that it squishes down ${his} assets.`, clothes: "restrictive latex"});
-					}
-				}
-				if(V.arcologies[0].FSSupremacist > 0) {
-					if(V.arcologies[0].FSSupremacistRace == "white") {
-						if(isItemAccessible("a dirndl")) {
-							wardrobeFS.push({text: `and wears one of the beautiful folk costumes of the white race.`, clothes: "a dirndl"});
-						}
-						if(isItemAccessible("lederhosen")) {
-							wardrobeFS.push({text: `and wears one of the beautiful folk costumes of the white race.`, clothes: "lederhosen"});
-						}
-					} else if(V.arcologies[0].FSSupremacistRace == "asian") {
-						if(isItemAccessible("a biyelgee costume")) {
-							wardrobeFS.push({text: `and wears one of the beautiful folk costumes of the asian race.`, clothes: "a biyelgee costume"});
-						}
-						if(isItemAccessible("a long qipao")) {
-							wardrobeFS.push({text: `and wears one of the beautiful folk costumes of the asian race.`, clothes: "a long qipao"});
-						}
-						if(isItemAccessible("a kimono")) {
-							wardrobeAssignment.push({text: `and wears one of the beautiful folk costumes of the asian race.`, clothes: "a kimono"});
-						}
-					}
-				}
-
-				/*Chooses clothes according to fetishes, quirks, etc.*/
-				if(slave.attrXY > 70) {
-					if(slave.attrKnown == 1) {
-						wardrobeTastes.push({text: `and wears a schoolgirl outfit to show off a some T&A to attract boys.`, clothes: "a schoolgirl outfit"});
-						wardrobeTastes.push({text: `and wears nothing but pretty lingerie to attract boys.`, clothes: "attractive lingerie"});
-						wardrobeTastes.push({text: `and selects a slutty outfit that's sure to have men drooling.`, clothes: "a slutty outfit"});
-						if(slave.butt > 3){
-							wardrobeTastes.push({text: `and slips on some cutoffs that are sure to have men checking out ${his} ass.`, clothes: "cutoffs and a t-shirt"});
-						}
-						if(isItemAccessible("a bunny outfit")) {
-							wardrobeTastes.push({text: `and slips into a bunny outfit that ${he} knows will have men lining up.`, clothes: "a bunny outfit"});
-						}
-						if(slave.boobs > 800) {
-							wardrobeTastes.push({text: `and dresses up as a busty succubus that pulls eyes to ${his} chest and leaves pants feeling tight.`, clothes: "a succubus outfit"});
-						}
-					} else {
-						wardrobeTastes.push({text: `and selects a schoolgirl outfit that shows off some T&A.`, clothes: "a schoolgirl outfit"});
-						wardrobeTastes.push({text: `and wears pretty lingerie that shows off ${his} body.`, clothes: "attractive lingerie"});
-						wardrobeTastes.push({text: `and selects a slutty outfit that's sure to draw attention.`, clothes: "a slutty outfit"});
-						if(slave.butt > 3){
-							wardrobeTastes.push({text: `and slips on some cutoffs that shows off ${his} ass.`, clothes: "cutoffs and a t-shirt"});
-						}
-						if(isItemAccessible("a bunny outfit")) {
-							wardrobeTastes.push({text: `and slips into a bunny outfit that hugs ${his} curves.`, clothes: "a bunny outfit"});
-						}
-						if(slave.boobs > 800) {
-							wardrobeTastes.push({text: `and dresses up as a busty succubus that's sure to draw eyes.`, clothes: "a succubus outfit"});
-						}
-					}
-				}
-				if(slave.attrXX > 70) {
-					if(slave.attrKnown == 1) {
-						if(isItemAccessible("a slave gown")) {
-							wardrobeTastes.push({text: `and wears a fashionable gown, since girls appreciate nice clothes.`, clothes: "a slave gown"});
-						}
-						wardrobeTastes.push({text: `and wears nothing but pretty lingerie to give the girls a show.`, clothes: "attractive lingerie"});
-						if(isItemAccessible("nice business attire")) {
-							wardrobeTastes.push({text: `and wears a nice suit, since girls appreciate nice clothes.`, clothes: "nice business attire"});
-						}
-					} else {
-						if(isItemAccessible("a slave gown")) {
-							wardrobeTastes.push({text: `and wears a fashionable gown.`, clothes: "a slave gown"});
-						}
-						wardrobeTastes.push({text: `and wears pretty lingerie that shows off ${his} body.`, clothes: "attractive lingerie"});
-						if(isItemAccessible("nice business attire")) {
-							wardrobeTastes.push({text: `and wears a nice suit, the reasons not entirely clear to you.`, clothes: "nice business attire"});
-						}
-					}
-				}
-
-				/* need */
-				if(slave.need > 90) {
-					wardrobeTastes.push({text: `but goes naked. ${He} needs sex now and clothing will only get in the way.`, clothes: "no clothing"});
-					wardrobeTastes.push({text: `and throws on a slutty suit. ${He} hopes that it gets the point across that ${he} needs sex now.`, clothes: "slutty business attire"});
-					wardrobeTastes.push({text: `and dons a slutty nurse outfit. ${He}'s been infected and the only cure is a strong dicking.`, clothes: "a slutty nurse outfit"});
-					wardrobeTastes.push({text: `and dresses up as a slutty maid. Maybe if ${he} does ${his} job poorly enough, someone will bend ${him} over and fuck some sense into ${him}.`, clothes: "a slutty maid outfit"});
-					wardrobeTastes.push({text: `and dresses up as a succubus in the hopes it screams that ${he} needs sex now.`, clothes: "a succubus outfit"});
-				}
-
-				/* quirks n flaws */
-				if(slave.behavioralFlaw == "arrogant") {
-					if(isItemAccessible("a ball gown")) {
-						wardrobeTastes.push({text: `and chooses a formal dress that makes ${him} feel like royalty.`, clothes: "a ball gown"});
-					}
-				} else if(slave.behavioralFlaw == "devout") {
-					wardrobeTastes.push({text: `and wears something more appropriate for a monastery than a whorehouse.`, clothes: "a penitent nuns habit"});
-				}
-
-				if(slave.behavioralQuirk == "sinful") {
-					wardrobeTastes.push({text: `and dresses up like a succubus because it makes ${him} feel naughty.`, clothes: "a succubus outfit"});
-				} else if(slave.behavioralQuirk == "fitness") {
-					wardrobeTastes.push({text: `and wears spats and a tank top to give ${himself} a sporty look.`, clothes: "spats and a tank top"});
-				}
-
-				if(slave.sexualFlaw == "shamefast") {
-					wardrobeTastes.push({text: `and chooses an outfit that covers ${him} up as much as possible.`, clothes: "a hijab and abaya"});
-				} else if(slave.sexualFlaw == "breeder") {
-					if(isItemAccessible("attractive lingerie for a pregnant woman")) {
-						wardrobeTastes.push({text: `and wears lingerie designed to accommodate pregnancies, hoping that others get the hint.`, clothes: "attractive lingerie for a pregnant woman"});
-					}
-				} else if(slave.sexualFlaw == "malicious") {
-					if(isItemAccessible("a schutzstaffel uniform")) {
-						wardrobeTastes.push({text: `and chooses an outfit that is commonly associated with wanton cruelty.`, clothes: "a schutzstaffel uniform"});
-						wardrobeTastes.push({text: `and chooses a skimpy outfit that is commonly associated with wanton cruelty.`, clothes: "a slutty schutzstaffel uniform"});
-					}
-				}
-
-				if(slave.sexualQuirk == "romantic") {
-					if(isItemAccessible("a halter top dress")) {
-						wardrobeTastes.push({text: `and dresses up like ${he}'s about to go on a date.`, clothes: "a halter top dress"});
-					}
-				} else if(slave.sexualQuirk == "tease") {
-					if(isItemAccessible("kitty lingerie")) {
-						wardrobeTastes.push({text: `and wears a set of provocatively designed lingerie.`, clothes: "kitty lingerie"});
-					}
-					if(isItemAccessible("panties and pasties")) {
-						wardrobeTastes.push({text: `and wears the skimpiest outfit ${he} can find.`, clothes: "panties and pasties"});
-					}
-				}
-
-				/* age stuff */
-				if(slave.actualAge < 10) {
-					if(isItemAccessible("a ball gown")) {
-						wardrobeTastes.push({text: `and puts on a pretty dress so ${he} can be a princess.`, clothes: "a ball gown"});
-					}
-					wardrobeTastes.push({text: `and dresses up like a cheerleader since ${he} thinks it looks cute.`, clothes: "a cheerleader outfit"});
-					if(isItemAccessible("a kimono")) {
-						wardrobeTastes.push({text: `and wraps ${himself} in a kimono, since it feels so good on ${his} skin.`, clothes: "a kimono"});
-					}
-				} else if(slave.actualAge < 18) {
-					wardrobeTastes.push({text: `and chooses an outfit that somewhat resembles one of ${his} school uniforms.`, clothes: "a schoolgirl outfit"});
-				}
-
-				/* fetishes */
-				if(slave.fetishKnown == 1) {
-					if(slave.fetish == "submissive") {
-						wardrobeTastes.push({text: `and wears restrictive latex to encourage others to dominate ${him}.`, clothes: "restrictive latex"});
-						wardrobeTastes.push({text: `and wears shibari ropes to encourage others to dominate ${him}.`, clothes: "shibari ropes"});
-					} else if(slave.fetish == "dom") {
-						if(isItemAccessible("nice business attire")) {
-							wardrobeTastes.push({text: `and wears a handsome suit, since ${he} likes other slaves to look up to ${him}.`, clothes: "nice business attire"});
-						}
-						if(isItemAccessible("a latex catsuit")) {
-							wardrobeTastes.push({text: `and wears a full body latex catsuit to look the part of the whip cracking dom.`, clothes: "a latex catsuit"});
-						}
-						wardrobeTastes.push({text: `and wears a scalemail bikini to make ${himself} look tough.`, clothes: "a scalemail bikini"});
-					} else if(slave.fetish == "masochist") {
-						wardrobeTastes.push({text: `and wears painfully restrictive bondage gear, since ${he} likes the torment.`, clothes: "uncomfortable straps"});
-						if(isItemAccessible("chains")) {
-							wardrobeTastes.push({text: `and wears painfully tight chains, since ${he} likes the torment.`, clothes: "chains"});
-						}
-					} else if(slave.fetish == "sadist") {
-						if(isItemAccessible("a slave gown")) {
-							wardrobeTastes.push({text: `and wears an elegant gown, since ${he} thinks it makes ${him} look the part of the femme fatale.`, clothes: "a slave gown"});
-						}
-						wardrobeTastes.push({text: `and wears a scalemail bikini, since ${he} thinks it makes ${him} look fierce.`, clothes: "a scalemail bikini"});
-					} else if(slave.fetish == "cumslut") {
-						wardrobeTastes.push({text: `and wears cutoffs and a t-shirt, because the fun yet relatively conservative outfit seems to encourage others to ask ${him} for blowjobs.`, clothes: "cutoffs and a t-shirt"});
-					} else if(slave.fetish == "humiliation") {
-						wardrobeTastes.push({text: `and wears leather straps with rings over ${his} private parts because ${he} enjoys the embarrassment such a humiliating outfit causes ${him}.`, clothes: "uncomfortable straps"});
-					} else if(slave.fetish == "buttslut") {
-						wardrobeTastes.push({text: `and wears nothing other than slutty bangles, because ${he} likes to catch the eye without putting anything between cocks and ${his} rear end.`, clothes: "slutty jewelry"});
-						wardrobeTastes.push({text: `and wears nothing other than an apron, because ${he} likes to catch the eye without putting anything between cocks and ${his} rear end.`, clothes: "an apron"});
-					} else if(slave.fetish == "pregnancy") {
-						wardrobeTastes.push({text: `and wears a short maid dress, because ${he} wants to look motherly and fuckable at the same time.`, clothes: "a slutty maid outfit"});
-						if(isItemAccessible("a maternity dress") && canGetPregnant(slave)) {
-							wardrobeTastes.push({text: `and wears a maternity dress in the hope someone fills out its middle.`, clothes: "a maternity dress"});
-						}
-					} else if(slave.fetish == "boobs") {
-						wardrobeTastes.push({text: `and wears a cheerleader outfit, since ${he} loves the way it hugs ${his} tits as ${he} moves.`, clothes: "a cheerleader outfit"});
-						if(isItemAccessible("a monokini")) {
-							wardrobeTastes.push({text: `and wears a monokini, since ${he} loves how it leaves ${his} breasts totally bare.`, clothes: "a monokini"});
-						}
-						if(isItemAccessible("kitty lingerie")) {
-							wardrobeTastes.push({text: `and chooses a lingerie set that leaves ${his} cleavage on public display.`, clothes: "kitty lingerie"});
-						}
-						if(isItemAccessible("pasties")) {
-							wardrobeTastes.push({text: `and wears nothing but a pair of pasties to draw eyes straight to ${his} nipples.`, clothes: "pasties"});
-						}
-						if(isItemAccessible("a bra")) {
-							wardrobeTastes.push({text: `and wears nothing but a bra in the hopes that the outlandish get up fixes eyes on ${his} chest.`, clothes: "a bra"});
-						}
-						wardrobeTastes.push({text: `and wears nothing but a pair of panties so ${his} tits can bounce freely.`, clothes: "panties"});
-					}
-				} else {
-					if(slave.fetish == "submissive") {
-						wardrobeTastes.push({text: `and strangely opts for restrictive latex.`, clothes: "restrictive latex"});
-						wardrobeTastes.push({text: `and strangely opts for shibari ropes.`, clothes: "shibari ropes"});
-					} else if(slave.fetish == "dom") {
-						if(isItemAccessible("nice business attire")) {
-							wardrobeTastes.push({text: `and wears a handsome suit; ${he} seems to think highly of ${himself} in it.`, clothes: "nice business attire"});
-						}
-						if(isItemAccessible("a latex catsuit")) {
-							wardrobeTastes.push({text: `and wears a full body latex catsuit; there is a strange look on ${his} face as ${he} wears it.`, clothes: "a latex catsuit"});
-						}
-						wardrobeTastes.push({text: `and wears a scalemail bikini; ${he} keeps flexing and acting tough to ${himself}.`, clothes: "a scalemail bikini"});
-					} else if(slave.fetish == "masochist") {
-						wardrobeTastes.push({text: `and strangely opts for painfully restrictive bondage gear.`, clothes: "uncomfortable straps"});
-						if(isItemAccessible("chains")) {
-							wardrobeTastes.push({text: `and strangely opts for painfully tight chains.`, clothes: "chains"});
-						}
-					} else if(slave.fetish == "sadist") {
-						if(isItemAccessible("a slave gown")) {
-							wardrobeTastes.push({text: `and wears an elegant gown for some reason.`, clothes: "a slave gown"});
-						}
-						wardrobeTastes.push({text: `and wears a scalemail bikini; an odd choice.`, clothes: "a scalemail bikini"});
-					} else if(slave.fetish == "cumslut") {
-						wardrobeTastes.push({text: `and wears cutoffs and a t-shirt; ${he} can't stop licking ${his} lips.`, clothes: "cutoffs and a t-shirt"});
-					} else if(slave.fetish == "humiliation") {
-						wardrobeTastes.push({text: `and strangely opts for leather straps with rings over ${his} private parts.`, clothes: "uncomfortable straps"});
-					} else if(slave.fetish == "buttslut") {
-						wardrobeTastes.push({text: `and wears nothing other than slutty bangles, an odd choice; ${his} ass is completely exposed.`, clothes: "slutty jewelry"});
-						wardrobeTastes.push({text: `and wears nothing other than an apron, an odd choice; ${his} ass is completely exposed.`, clothes: "an apron"});
-					} else if(slave.fetish == "pregnancy") {
-						wardrobeTastes.push({text: `and wears a short maid dress; you frequently notice ${him} observing ${his} stomach.`, clothes: "a slutty maid outfit"});
-						if(isItemAccessible("a maternity dress") && canGetPregnant(slave)) {
-							wardrobeTastes.push({text: `and wears a maternity dress even though ${he} isn't pregnant.`, clothes: "a maternity dress"});
-						}
-					} else if(slave.fetish == "boobs") {
-						wardrobeTastes.push({text: `and wears a cheerleader outfit; ${he} seems to enjoy jiggling ${his} breasts in it.`, clothes: "a cheerleader outfit"});
-						if(isItemAccessible("a monokini")) {
-							wardrobeTastes.push({text: `and strangely decides to wear a monokini, which leaves ${his} breasts totally bare.`, clothes: "a monokini"});
-						}
-						if(isItemAccessible("kitty lingerie")) {
-							wardrobeTastes.push({text: `and oddly chooses a lingerie set with a cleavage cutout in the bra.`, clothes: "kitty lingerie"});
-						}
-						if(isItemAccessible("pasties")) {
-							wardrobeTastes.push({text: `and oddly opts for just a pair of pasties attached to ${his} nipples.`, clothes: "pasties"});
-						}
-						if(isItemAccessible("a bra")) {
-							wardrobeTastes.push({text: `and oddly opts for nothing more than a bra.`, clothes: "a bra"});
-						}
-						wardrobeTastes.push({text: `and wears nothing but a pair of panties; ${he} seems to enjoy the way ${his} breasts bounce freely.`, clothes: "panties"});
-					}
-				}
-
-				/* energy */
-				if(slave.energy > 95) {
-					wardrobeTastes.push({text: `but goes nude, since as a nympho ${he} gets plenty of attention anyway, and considers clothes an unnecessary hindrance.`, clothes: "no clothing"});
-				} else if(slave.energy > 60) {
-					wardrobeTastes.push({text: `and puts on some daring lingerie to draw attention to ${himself}.`, clothes: "attractive lingerie"});
-					wardrobeTastes.push({text: `and goes toplesss to draw attention to ${himself}.`, clothes: "panties"});
-					if(isItemAccessible("kitty lingerie")) {
-						wardrobeTastes.push({text: `and puts on some decorative lingerie to draw attention to ${himself}.`, clothes: "kitty lingerie"});
-					}
-				}
-
-				/* pregnancy */
-				if(slave.belly >= 5000) {
-					wardrobeTastes.push({text: `and wears pretty lingerie to show off ${his} merchandise while giving ${his} protruding belly plenty of room to hang free.`, clothes: "attractive lingerie"});
-					wardrobeTastes.push({text: `and wears only panties. Something so easy to slit on is appreciable with such a big belly in the way.`, clothes: "panties"});
-					if(isItemAccessible("kitty lingerie")) {
-						wardrobeTastes.push({text: `and wears cute lingerie to show off ${his} merchandise while giving ${his} protruding belly plenty of room to hang free.`, clothes: "kitty lingerie"});
-					}
-					if(isItemAccessible("attractive lingerie for a pregnant woman") && slave.energy > 70) {
-						wardrobeTastes.push({text: `and wears pretty lingerie to show off ${his} merchandise and accentuate ${his} pregnancy while giving it plenty of room to hang free.`, clothes: "attractive lingerie for a pregnant woman"});
-					} else if(isItemAccessible("a maternity dress")) {
-						wardrobeTastes.push({text: `and wears a conservative dress with plenty of give for ${his} belly to stretch it.`, clothes: "a maternity dress"});
-					}
-					wardrobeTastes.push({text: `and wears string lingerie to look fun and fuckable while giving ${his} protruding belly plenty of room to hang free.`, clothes: "a string bikini"});
-				} else {
-					wardrobeTastes.push({text: `and wears string lingerie to show off ${his} body.`, clothes: "a string bikini"});
-				}
-
-				if(slave.nationality == "Canadian") {
-					if(isItemAccessible("a mounty outfit")) {
-						wardrobeTastes.push({text: `and chooses an outfit that makes ${him} feel oddly nostalgic.`, clothes: "a mounty outfit"});
-					}
-				} else if(slave.nationality == "Japanese") {
-					if(isItemAccessible("a kimono")) {
-						wardrobeTastes.push({text: `and chooses an outfit that makes ${him} feel oddly nostalgic.`, clothes: "a kimono"});
-					}
-				}
-			}
-			/*Separated in three categories in case you want to, say, increase the probability of choosing _wardrobeAssignment to look more professional*/
-			/*clothing = clothing.concat(wardrobeAssignment, wardrobeFS, wardrobeTastes); better version should the above never amount to anything*/
-			if(wardrobeAssignment.length > 0) {
-				for (let i = 0; i < wardrobeAssignment.length; i++) {
-					clothing.push(wardrobeAssignment[i]);
-				}
-			}
-			if(wardrobeFS.length > 0) {
-				for (let i = 0; i < wardrobeFS.length; i++) {
-					clothing.push(wardrobeFS[i]);
-				}
-			}
-			if(wardrobeTastes.length > 0) {
-				for (let i = 0; i < wardrobeTastes.length; i++) {
-					clothing.push(wardrobeTastes[i]);
-				}
-			}
-			selection = jsEither(clothing);
-		}
-
-		return selection;
-	};
-
-	function todaysShoes(slave) {
-		let shoes = [];
-
-		if(slave.fetish == 'mindbroken') {
-			if(slave.amp != 1 && slave.heels == 1) {
-				shoes.push({text: `${He} finds ${he} can inexplicably walk if ${he} wears heels; a daily lesson for ${him}, as ${he} forgets shortly after leaving.`, shoes: jsEither(["heels", "pumps", "extreme heels", "boots"])});
-			}
-			shoes.push({text: `${He} vaguely remembers putting things on ${his} feet, so ${he} does.`, shoes: jsEither(["heels", "pumps", "extreme heels", "boots", "flats"])});
-			shoes.push({text: `${He} entered without shoes, and will leave the same.`, shoes: "none"});
-		} else if(slave.devotion <= 20) {
-			if(slave.heels == 0) {
-				shoes.push({text: `and wears comfortable flats,`, shoes: "flats"});
-			} else {
-				shoes.push({text: `and angrily wears the heels ${he} needs to walk,`, shoes: "heels"});
-			}
-		} else {
-			if(slave.fetishKnown == 1 && slave.fetish == "dom") {
-				shoes.push({text: `${He} wears boots to look like a proper dominant.`, shoes: "boots"});
-			} else if(slave.fetishKnown == 1 && slave.fetish == "sadist") {
-				shoes.push({text: `${He} wears boots, since ${he} thinks they make ${him} look dangerous.`, shoes: "boots"});
-			} else if(slave.fetishKnown == 1 && slave.fetish == "masochist") {
-				shoes.push({text: `${He} wears painfully tall heels, since ${he} enjoys the twinge of pain with each step.`, shoes: "extreme heels"});
-			} else if(slave.heels == 1) {
-				shoes.push({text: `${He} wears the heels ${he} needs to walk.`, shoes: "heels"});
-			} else if(slave.fetishKnown == 1 && slave.fetish == "pregnancy" && slave.bellyPreg >= 500) {
-				shoes.push({text: `${He} goes barefoot to complement ${his} pregnancy.`, shoes: "none"});
-			} else if(slave.fetishKnown == 1 && slave.fetish == "none") {
-				shoes.push({text: `${He} wears comfortable flats, since ${he} doesn't have a fetish to show off.`, shoes: "flats"});
-			} else if(slave.actualAge < 13){
-				shoes.push({text: `${He} puts on boots so ${he} can stomp around.`, shoes: "boots"});
-				shoes.push({text: `${He} playfully puts on heels to be like all the other girls.`, shoes: "heels"});
-				shoes.push({text: `${He} wears flats as they are comfortable and easy to take on and off.`, shoes: "flats"});
-				shoes.push({text: `Going barefoot is fun, so no shoes for ${him}.`, shoes: "none"});
-			} else {
-				shoes.push({text: `${He} wears heels to strut ${his} stuff.`, shoes: "heels"});
-				shoes.push({text: `${He} wears comfortable flats to take it easy.`, shoes: "flats"});
-				shoes.push({text: `${He} goes barefoot to show off ${his} toes.`, shoes: "none"});
-			}
-		}
-		return jsEither(shoes);
-	};
-
-	function todaysCollar(slave) {
-		let neck = [];
-
-		if(slave.fetish == 'mindbroken') {
-
-		} else if(slave.devotion <= 20) {
-
-		} else {
-			if(V.arcologies[0].FSEgyptianRevivalist > 0) {
-				neck.push({text: `dons a wesekh to support your ancient Egyptian pretensions,`, collar: "ancient Egyptian"});
-			}
-			if(slave.fetish == "masochist") {
-				neck.push({text: `dons a tight steel collar around ${his} neck,`, collar: "tight steel"});
-				neck.push({text: `dons a painful leather collar,`, collar: "uncomfortable leather"});
-				neck.push({text: `dons a painfully tight neck corset,`, collar: "neck corset"});
-			} else if(slave.fetish == "pregnancy" && (canGetPregnant(slave) || slave.pregKnown == 1)) {
-				neck.push({text: `dons a digital display that tells everything about ${his} womb,`, collar: "preg biometrics"});
-			} else if(slave.fetish == "boobs" && slave.boobs >= 1000) {
-				neck.push({text: `dons a cowbell to draw attention to ${his} luscious udders,`, collar: "leather with cowbell"});
-			}
-			neck.push({text: `decides ${his} neck needs no accenting,`, collar: "none"});
-			neck.push({text: `dons some pretty jewelry,`, collar: "pretty jewelry"});
-			neck.push({text: `dons a lovely gold collar,`, collar: "heavy gold"});
-			neck.push({text: `dons a simple silk ribbon around ${his} neck,`, collar: "silk ribbon"});
-		}
-		return jsEither(neck);
-	};
-
-	function todaysCorset(slave) {
-		let belly = [];
-		const empathyBellies = ["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"];
-
-		if(slave.fetish == 'mindbroken') {
-			if(V.arcologies[0].FSRepopulationFocus > 0 && slave.belly < 1500) {
-				if(slave.weight > 130) {
-					belly.push({text: `${He} notices the fake bellies; since every girl ${he} has ever met has a rounded middle, it's only natural ${he} is compelled to wear one. ${He} struggles to fit it around ${his} huge gut, only stopping when another slave takes it away from ${him} so ${he} moves on and stops blocking the wardrobe with ${his} fat ass.`, bellyAccessory: "none"});
-				} else {
-					belly.push({text: `${He} notices the fake bellies; since every girl ${he} has ever met has a rounded middle, it's only natural ${he} is compelled to wear one.`, bellyAccessory: jsEither(["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"])});
-				}
-			} else {
-				belly.push({text: "", bellyAccessory: slave.bellyAccessory}); /*compatibility for no output, will likely get deprecated in the future as content is added*/
-			}
-		} else if(slave.devotion <= 20) {
-			if(slave.belly > 10000 && (slave.pregAdaptation*800 <= slave.belly) && slave.bellyAccessory != "a support band"){
-				belly.push({text: `slips a pregnancy support band around ${his} middle to help alleviate some of the discomfort,`, bellyAccessory: "a support band"});
-			} else if (slave.belly < 8000 && slave.bellyAccessory == "a support band") {
-				belly.push({text: `removes ${his} support band since ${he} no longer needs it,`, bellyAccessory: "none"});
-			}
-		} else {
-			if(V.arcologies[0].FSRepopulationFocus > 0 && slave.belly < 1500 && slave.sexualFlaw != "breeder") {
-				if(slave.weight > 130) {
-					belly.push({text: `struggles to fit a fake pregnant belly around ${his} gut before giving up and hoping ${he} can pass as fecund,`, bellyAccessory: "none"});
-				} else {
-					belly.push({text: `straps on a fake pregnant belly to fit in with all the other pregnant girls,`, bellyAccessory: jsEither(["a small empathy belly", "a medium empathy belly", "a large empathy belly"])});
-				}
-			} else if(slave.belly < 1500 && slave.fetish == "pregnancy" && isItemAccessible("a small empathy belly") && slave.sexualFlaw != "breeder" && slave.weight <= 130) {
-				if(slave.fetishStrength <= 30) {
-					belly.push({text: `straps on a 1st trimester belly to sate ${his} curiosity,`, bellyAccessory: "a small empathy belly"});
-					belly.push({text: `straps on a 2nd trimester belly to sate ${his} curiosity,`, bellyAccessory: "a medium empathy belly"});
-					belly.push({text: `straps on a 3rd trimester belly to sate ${his} curiosity,`, bellyAccessory: "a large empathy belly"});
-				} else if(slave.fetishStrength <= 95) {
-					belly.push({text: `straps on a 3rd trimester belly to satisfy ${his} pregnancy fetish,`, bellyAccessory: "a large empathy belly"});
-				} else if(slave.fetishStrength > 95) {
-					belly.push({text: `straps on the largest belly ${he} can find to satisfy ${his} pregnancy fetish,`, bellyAccessory: "a huge empathy belly"});
-				}
-			} else if(slave.belly > 10000 && (slave.pregAdaptation*1200 <= slave.belly) && slave.bellyAccessory != "a support band"){
-				belly.push({text: `slips a pregnancy support band around ${his} middle to better handle ${his} fecund mound,`, bellyAccessory: "a support band"});
-			} else if(empathyBellies.includes(slave.bellyAccessory) && slave.fetish != "pregnancy") {
-				belly.push({text: `removes ${his} fake belly, since ${he} dislikes it,`, bellyAccessory: "none"});
-			} else if(empathyBellies.includes(slave.bellyAccessory) && slave.sexualFlaw == "breeder") {
-				belly.push({text: `pulls ${his} fake belly off, disgusted by it,`, bellyAccessory: "none"});
-			} else if (slave.belly < 8000 && slave.bellyAccessory == "a support band") {
-				belly.push({text: `removes ${his} support band since ${he} no longer needs it,`, bellyAccessory: "none"});
-			} else {
-				belly.push({text: "", bellyAccessory: slave.bellyAccessory}); /*compatibility for no output, will likely get deprecated in the future as content is added*/
-			}
-		}
-		return jsEither(belly);
-	};
-
-	return saChoosesOwnClothes;
-
-})();
-
-/* End Week Passage Conversions */
-
-/*:: SA rest [script]*/
-
-window.saRest = function saRest(slave) {
-
-	var pronouns = getPronouns(slave);
-	var he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	var He = capFirstChar(he), His = capFirstChar(his);
-	var V = State.variables;
-
-	var t = " takes the week off.";
-
-	if (slave.fuckdoll > 0) {
-		t += " ${He} has nothing to do but ";
-		if (slave.amp == 0) {
-			t += "lie ";
-		} else {
-			t += "stand ";
-		}
-		t += "in place.";
-	}
-
-	if (slave.health > 90) {
-		t += ` ${His} health is so outstanding that rest does not improve it.`;
-	} else if (slave.health > -100) {
-		t += ` ${His} <span class='green'>health recovers</span> with rest.`;
-		slave.health += 10;
-		if (!(canHear(slave))) {
-			t += ` Since ${he} is deaf, the hustle and bustle of daily life in the penthouse <span class='green'>didn't bother ${him} at all.</span>`;
-			slave.health += 3;
-		} else if ((slave.hears == -1 && slave.earwear != "hearing aids") || (slave.hears == 0 && slave.earwear == "muffling ear plugs")) {
-			t += ` Since ${he} is hard of hearing, the hustle and bustle of daily life in the penthouse <span class='green'>didn't disturb ${his} rest as much.</span>`;
-			slave.health += 1;
-		}
-	}
-
-	if (slave.fuckdoll == 0 && slave.fetish != "mindbroken") {
-		if (slave.devotion > 20) {
-			if (slave.trust <= 20) {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>reduces ${his} fear</span> of you.`;
-				slave.trust += 4;
-			} else if (slave.trust <= 50) {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>builds ${his} trust</span> in you.`;
-				slave.trust += 2;
-			} else {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>confirms ${his} trust</span> in you.`;
-				slave.trust += 2;
-			}
-		} else {
-			if (slave.trust < -20) {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>reduces ${his} fear</span> of you.`;
-				slave.trust += 4;
-			}
-		}
-	}
-
-	if (V.showVignettes == 1 && slave.assignment === Job.REST) {
-		var _vignette = GetVignette(slave);
-		t += ` __This week__ ${_vignette.text} `;
-		if (_vignette.type == "cash") {
-			if (_vignette.effect > 0) {
-				t += `<span class='yellowgreen'>making you an extra ${cashFormat(Math.trunc(V.FResult*_vignette.effect))}.</span>`;
-			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*_vignette.effect)))}.</span>`;
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			cashX(Math.trunc(V.FResult*_vignette.effect), "rest", slave);
-		} else if (_vignette.type == "devotion") {
-			if (_vignette.effect > 0) {
-				if (slave.devotion > 50) {
-					t += `<span class='hotpink'>increasing ${his} devotion to you.</span>`;
-				} else if (slave.devotion >= -20) {
-					t += `<span class='hotpink'>increasing ${his} acceptance of you.</span>`;
-				} else if (slave.devotion > -10) {
-					t += `<span class='hotpink'>reducing ${his} dislike of you.</span>`;
-				} else {
-					t += `<span class='hotpink'>reducing ${his} hatred of you.</span>`;
-				}
-			} else if (_vignette.effect < 0) {
-				if (slave.devotion > 50) {
-					t += `<span class='mediumorchid'>reducing ${his} devotion to you.</span>`;
-				} else if (slave.devotion >= -20) {
-					t += `<span class='mediumorchid'>reducing ${his} acceptance of you.</span>`;
-				} else if (slave.devotion > -10) {
-					t += `<span class='mediumorchid'>increasing ${his} dislike of you.</span>`;
-				} else {
-					t += `<span class='mediumorchid'>increasing ${his} hatred of you.</span>`;
-				}
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			slave.devotion += (1*_vignette.effect);
-		} else if (_vignette.type == "trust") {
-			if (_vignette.effect > 0) {
-				if (slave.trust > 20) {
-					t += `<span class='mediumaquamarine'>increasing ${his} trust in you.</span>`;
-				} else if (slave.trust > -10) {
-					t += `<span class='mediumaquamarine'>reducing ${his} fear of you.</span>`;
-				} else {
-					t += `<span class='mediumaquamarine'>reducing ${his} terror of you.</span>`;
-				}
-			} else if (_vignette.effect < 0) {
-				if (slave.trust > 20) {
-					t += `<span class='gold'>reducing ${his} trust in you.</span>`;
-				} else if (slave.trust >= -20) {
-					t += `<span class='gold'>increasing ${his} fear of you.</span>`;
-				} else {
-					t += `<span class='gold'>increasing ${his} terror of you.</span>`;
-				}
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			slave.trust += (1*_vignette.effect);
-		} else if (_vignette.type == "health") {
-			if (_vignette.effect > 0) {
-				t += `<span class='green'>improving ${his} health.</span>`;
-			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>affecting ${his} health.</span>`;
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			slave.health += (2*_vignette.effect);
-		} else {
-			if (_vignette.effect > 0) {
-				t += `<span class='green'>gaining you a bit of reputation.</span>`;
-			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you a bit of reputation.</span>`;
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			V.rep += Math.trunc(V.FResult*_vignette.effect*0.1);
-		}
-	}
-
-	return t;
-};
-
-/*:: SA servant [script]*/
-
-window.saServant = function saServant(slave) {
-
-	var pronouns = getPronouns(slave);
-	var he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	var He = capFirstChar(he), His = capFirstChar(his);
-	var V = State.variables;
-
-	var t = `works as a servant. ${He} performs the lowest jobs in your penthouse, cleaning up after your other slaves, bathing them, helping them dress, and giving them sexual relief.`;
-
-	if (V.servantsQuarters > 0) {
-		if ((V.universalRulesFacilityWork == 1 && slave.assignment == "be a servant" && V.servantsQuartersSpots > 0) || (slave.assignment == "work as a servant")) {
-			if (slave.assignment == "be a servant") {
-				t += ` Since there's extra space in the servants' quarters, ${V.assistantName} attaches ${him} to the cadre of maids there.`;
-				V.servantsQuartersSpots--;
-			}
-			if (V.Stewardess != 0) {
-				t += ` This brings ${him} under ${V.Stewardess.slaveName}'s supervision. The Stewardess `;
-				if (slave.devotion < -20) {
-					t += `subjects ${him} to <span class='gold'>corrective rape</span> when ${his} service is imperfect, <span class='hotpink'>when ${he} steps out of line</span>, or when the Stewardess just feels like raping ${him}, forcing the poor slave to <span class='yellowgreen'>find refuge in work.</span>`;
-					slave.devotion += 2;
-					slave.trust -= 2;
-				} else if (slave.devotion <= 20) {
-					t += `molests ${him}, encouraging the poor slave to <span class='hotpink'>keep ${his} head down</span> and <span class='yellowgreen'>work harder.</span>`;
-					slave.devotion += 2;
-				} else {
-					t += `uses <span class='hotpink'>sex as a reward</span>, getting ${him} off when ${he} <span class='yellowgreen'>works harder.</span>`;
-					slave.devotion++;
-				}
-				if (!(canHear(slave))) {
-					t += ` However, ${his} inability to hear often leaves ${him} oblivious to ${V.Stewardess.slaveName}'s orders, limiting their meaningful interactions.`;
-					cashX(V.stewardessBonus/4, "servantsQuarters", slave);
-				} else if ((slave.hears == -1 && slave.earwear != "hearing aids") || (slave.hears == 0 && slave.earwear == "muffling ear plugs")) {
-					t += ` However, ${he} often doesn't catch what ${V.Stewardess.slaveName} says, leading to frustration, confusion and less work done.`;
-					cashX(V.stewardessBonus/2, "servantsQuarters", slave);
-				} else {
-					cashX(V.stewardessBonus, "servantsQuarters", slave);
-				}
-			}
-		}
-	}
-
-	t += ` ${He} is `;
-	if (slave.trust < -20) {
-		t += "frightened of punishment and works very hard, <span class='yellowgreen'>reducing the upkeep</span> of your slaves.";
-	} else if (slave.devotion < -20) {
-		if (slave.trust >= 20) {
-			t += `uninterested in doing such work and barely lifts a finger to <span class='yellowgreen'>reduce the upkeep</span> of your slaves.`;
-		} else {
-			t += `reluctant, requiring your other slaves to force ${his} services, and does not <span class='yellowgreen'>reduce upkeep</span> of your slaves much.`;
-		}
-	} else if (slave.devotion <= 20) {
-		t += `hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class='yellowgreen'>reduces upkeep</span> of your slaves.`;
-	} else if (slave.devotion <= 50) {
-		t += `obedient, offering your other slaves ${his} services, and moderately <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
-	} else if (slave.devotion <= 95) {
-		t += `devoted, happily giving your other slaves ${his} services, and <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
-	} else {
-		t += `so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
-	}
-
-	let _oral = jsRandom(5,10);
-	slave.oralCount += _oral;
-	V.oralTotal += _oral;
-
-	if (slave.relationship == -2) {
-		t += ` ${He} does ${his} best to perfect your domesticity due to ${his} emotional bond to you.`;
-	} else if (slave.relationship == -3 && slave.devotion > 50) {
-		t += ` ${He} does ${his} very best to be the perfect housewife, making ${him} an outstanding servant.`;
-	}
-
-	if (setup.servantCareers.includes(slave.career)) {
-		t += ` ${He} has experience with house keeping from ${his} life before ${he} was a slave, making ${him} more effective.`;
-	} else if (slave.skillS >= V.masteredXP) {
-		t += ` ${He} has experience with house keeping from working for you, making ${him} more effective.`;
-	} else {
-		slave.skillS += jsRandom(1,Math.ceil((slave.intelligence+slave.intelligenceImplant)/15) + 8);
-	}
-
-	if (slave.fetishStrength > 60) {
-		if (slave.fetish == "submissive" && slave.fetishKnown == 1) {
-			t += ` ${His} natural affinity for submission increases ${his} effectiveness.`;
-		} else if (slave.fetishKnown == 1 && slave.fetish == "dom") {
-			t += ` ${His} sexual appetite for domination reduces ${his} effectiveness.`;
-		}
-	}
-
-	if (slave.energy < 20) {
-		t += ` ${His} frigidity allows ${him} to ignore the intercourse all around ${him}, making ${him} very efficient.`;
-	} else if (slave.energy < 40) {
-		t += ` ${His} low sex drive keeps ${him} from becoming too distracted by the intercourse all around ${him}, making ${him} more efficient.`;
-	}
-
-	if ((slave.eyes <= -1 && slave.eyewear != "corrective glasses" && slave.eyewear != "corrective contacts") || (slave.eyewear == "blurring glasses") || (slave.eyewear == "blurring contacts")) {
-		t += ` ${His} bad vision makes ${him} a worse servant.`;
-	}
-
-	if (slave.lactation > 0) {
-		t += ` Since ${he} is lactating, `;
-		if (slave.devotion > 20 || slave.trust < -20) {
-			t += ` ${he} serves `;
-		} else {
-			t += `and disobedient, ${he} is restrained to serve `;
-		}
-		t += `as a drink dispenser at mealtimes, and makes a meaningful contribution to ${his} fellow slaves' nutrition in concert with the feeding systems.`;
-		slave.lactationDuration = 2;
-		if (slave.boobsMilk > 0) {
-			slave.boobs -= slave.boobsMilk;
-			slave.boobsMilk = 0;
-		}
-	}
-
-	if (V.showVignettes == 1 && (slave.assignment === Job.SERVANT || slave.assignment === Job.SERVER)) {
-		var _vignette = GetVignette(slave);
-		t += ` __This week__ ${_vignette.text} `;
-		if (_vignette.type == "cash") {
-			if (_vignette.effect > 0) {
-				t += `<span class='yellowgreen'>making you an extra ${cashFormat(Math.trunc(V.FResult*_vignette.effect))}.</span>`;
-			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*_vignette.effect)))}.</span>`;
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			cashX(Math.trunc(V.FResult*_vignette.effect), "servantsQuarters", slave);
-		} else if (_vignette.type == "devotion") {
-			if (_vignette.effect > 0) {
-				if (slave.devotion > 50) {
-					t += `<span class='hotpink'>increasing ${his} devotion to you.</span>`;
-				} else if (slave.devotion >= -20) {
-					t += `<span class='hotpink'>increasing ${his} acceptance of you.</span>`;
-				} else if (slave.devotion > -10) {
-					t += `<span class='hotpink'>reducing ${his} dislike of you.</span>`;
-				} else {
-					t += `<span class='hotpink'>reducing ${his} hatred of you.</span>`;
-				}
-			} else if (_vignette.effect < 0) {
-				if (slave.devotion > 50) {
-					t += `<span class='mediumorchid'>reducing ${his} devotion to you.</span>`;
-				} else if (slave.devotion >= -20) {
-					t += `<span class='mediumorchid'>reducing ${his} acceptance of you.</span>`;
-				} else if (slave.devotion > -10) {
-					t += `<span class='mediumorchid'>increasing ${his} dislike of you.</span>`;
-				} else {
-					t += `<span class='mediumorchid'>increasing ${his} hatred of you.</span>`;
-				}
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			slave.devotion += (1*_vignette.effect);
-		} else if (_vignette.type == "trust") {
-			if (_vignette.effect > 0) {
-				if (slave.trust > 20) {
-					t += `<span class='mediumaquamarine'>increasing ${his} trust in you.</span>`;
-				} else if (slave.trust > -10) {
-					t += `<span class='mediumaquamarine'>reducing ${his} fear of you.</span>`;
-				} else {
-					t += `<span class='mediumaquamarine'>reducing ${his} terror of you.</span>`;
-				}
-			} else if (_vignette.effect < 0) {
-				if (slave.trust > 20) {
-					t += `<span class='gold'>reducing ${his} trust in you.</span>`;
-				} else if (slave.trust >= -20) {
-					t += `<span class='gold'>increasing ${his} fear of you.</span>`;
-				} else {
-					t += `<span class='gold'>increasing ${his} terror of you.</span>`;
-				}
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			slave.trust += (1*_vignette.effect);
-		} else if (_vignette.type == "health") {
-			if (_vignette.effect > 0) {
-				t += `<span class='green'>improving ${his} health.</span>`;
-			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>affecting ${his} health.</span>`;
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			slave.health += (2*_vignette.effect);
-		} else {
-			if (_vignette.effect > 0) {
-				t += `<span class='green'>gaining you a bit of reputation.</span>`;
-			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you a bit of reputation.</span>`;
-			} else {
-				t += `an incident without lasting effect.`;
-			}
-			V.rep += Math.trunc(V.FResult*_vignette.effect*0.1);
-		}
-	}
-
-	return t;
-};
-
-/*:: SA stay confined [script]*/
-
-window.saStayConfined = function saStayConfined(slave) {
-
-	var pronouns = getPronouns(slave);
-	var he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	var He = capFirstChar(he), His = capFirstChar(his);
-	var V = State.variables;
-
-	var t = "";
-
-	if (slave.fetish != "mindbroken") {
-		if (slave.devotion < -50) {
-			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. ${He} still hates ${his} place in the world, but being forced to rely on slave life as ${his} only human contact <span class='hotpink'>grinds down ${his} resistance.</span>`;
-			slave.devotion += 2;
-		} else if (slave.devotion <= 20) {
-			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. With nothing to do but look forward to the next time ${he}'s let out to serve, <span class='hotpink'>${he} begins to rely on servitude.</span>`;
-			slave.devotion += 1;
-		} else if (slave.devotion <= 50) {
-			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. Since ${he} is obedient, the mental torture neither breaks ${him} further nor causes ${him} to hate you.`;
-		} else {
-			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. ${He} spends ${his} time wondering hopelessly how ${he} has failed you, <span class='mediumorchid'>damaging ${his} devotion to you.</span>`;
-			slave.devotion -= 2;
-		}
-
-		if (slave.trust < -50) {
-			t += ` ${He} is so terrified of you that this confinement does not make ${him} fear you any more.`;
-		} else if (slave.trust < -20) {
-			t += ` ${He} is already afraid of you, but this confinement makes ${him} <span class='gold'>fear you even more.</span>`;
-			slave.trust -= 2;
-		} else if (slave.trust <= 20) {
-			t += ` This confinement makes ${him} <span class='gold'>fear your power</span> over ${him}.`;
-			slave.trust -= 4;
-		} else {
-			t += ` This confinement makes ${him} <span class='gold'>trust you less,</span> and fear you more.`;
-			slave.trust -= 5;
-		}
-
-		if (slave.assignment == "be confined in the cellblock") {
-			if ((slave.hears == -1 && slave.earwear != "hearing aids") || (slave.hears == 0 && slave.earwear == "muffling ear plugs") || (slave.hears == -2)) {
-				t += ` ${His} hearing impairment spares ${him} the sounds of ${his} peers getting punished, lightening the impact of ${his} imprisonment.`;
-			}
-		}
-
-		t += ` The stress of confinement <span class='red'>damages ${his} health.</span>`;
-		slave.health -= 10;
-	} else {
-		t += `is oblivious to ${his} confinement.`;
-	}
-
-	if (V.Wardeness !== 0 && (V.Wardeness.sexualFlaw == "malicious" || V.Wardeness.sexualFlaw == "abusive" || V.Wardeness.sexualFlaw == "breast growth") && slave.lactation == 1 && slave.lactationDuration == 0) {
-		t += ` ${V.Wardeness.slaveName} `
-		if (V.Wardeness.sexualFlaw == "malicious") {
-			t += `savors the torment brought about by ${his} milk-bloated chest and makes sure to milk ${him} thoroughly every other week to maximize ${his} suffering.`
-		} else if (V.Wardeness.sexualFlaw == "abusive") {
-			t += `enjoys neglecting ${his} milk-bloated chest until it gets big and painfully swollen; only then does the abusive jail-keeper roughly drain ${his} sensitive mounds.`
-		} else if (V.Wardeness.sexualFlaw == "breast growth") {
-			t += `loves watching ${his} breasts steadily swell with pent-up milk and only milks ${him} in order to reset the process.`
-		}
-	}
-
-	if (slave.sentence == 0 && (slave.devotion > 20 || (slave.devotion >= -20 && slave.trust < -20) || (slave.devotion >= -50 && slave.trust < -50) || slave.fetish == "mindbroken")) {
-		if (slave.fetish == "mindbroken") {
-			t += ` ${His} broken mind hinges entirely on other's guidance,`;
-		} else {
-			t += ` ${He} is now willing to <span class='hotpink'>do as ${he}'s told,</span>`;
-		}
-		t += ` so <span class='yellow'>${his} assignment has defaulted to rest.</span>`;
-		if (slave.assignment == "be confined in the cellblock") {
-			State.temporary.brokenSlaves++;
-			State.temporary.DL--;
-			State.temporary.dI--;
-		}
-		removeJob(slave, slave.assignment);
-	}
-
-	return t;
-};
-
-/*:: Assistant Art JS [script]*/
-
-/*
-Displays assistant images. Currently passage-based.
-sizePlacement: Image size/center.
-	3: Large, right. Example: description.
-	2: Medium, right. Example: random events.
-*/
-window.assistantArt = function assistantArt(sizePlacement) {
-	const V = State.variables;
-	let fileName = "";
-
-	if (V.seeAvatar !== 1 || V.imageChoice === 1) {return}
-
-	if (V.imageChoice === 0 || V.imageChoice === 1) {
-		if (V.imageChoice === 1) {
-
-		} else /* V.imageChoice === 0*/ {
-			fileName += "'resources/renders/assistant ";
-			switch (V.assistantAppearance) {
-				case "monstergirl":
-					fileName += "monstergirl.png'";
-					break;
-				case "shemale":
-					fileName += "shemale.png'";
-					break;
-				case "amazon":
-					fileName += "amazon.png'";
-					break;
-				case "businesswoman":
-					fileName += "businesswoman.png'";
-					break;
-				case "goddess":
-					fileName += "goddess.png'";
-					break;
-				case "schoolgirl":
-					fileName += "schoolgirl.png'";
-					break;
-				case "angel":
-					fileName += "angel.png'";
-					break;
-				case "cherub":
-					fileName += "cherub.png'";
-					break;
-				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
-					fileName += "corrupt.png'";
-					break;
-				case "fairy":
-					fileName += "fairy.png'";
-					break;
-				case "imp":
-					fileName += "imp.png'";
-					break;
-				case "incubus":
-					fileName += "incubus.png'";
-					break;
-				case "pregnant fairy":
-					fileName += "pfairy.png'";
-					break;
-				case "succubus":
-					fileName += "succubus.png'";
-					break;
-				case "witch":
-					fileName += "witch.png'";
-					break;
-				default:
-					fileName += "default.png'";
-			}
-		}
-
-		if (sizePlacement === 3) {
-			fileName = `<img src=${fileName} style='float:right; border:3px hidden'/>`;
-		} else if (V.imageChoice === 1) {
-			fileName = `<img src=${fileName} style='float:right; border:3px hidden' width='282' height='602'/>`;
-		} else /* V.imageChoice === 0 */ {
-			fileName = `<img src=${fileName} style='float:right; border:3px hidden' width='300' height='300'/>`;
-		}
-	}
-	return fileName;
-};
-
-/*:: DTreeJS [script]*/
-/* This is the minified version of lodash, d3 and dTree */
-;
-(function (window, define, exports) {
-/**
- * @license
- * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
- */
-;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function i(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););
-return n}function o(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function f(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function c(n,t){return!(null==n||!n.length)&&-1<d(n,t,0)}function a(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function l(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function s(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];
-return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function p(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function _(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function d(n,t,r){if(t===t)n:{
---r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=g(n,b,r);return n}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n){return n!==n}function x(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:P}function j(n){return function(t){return null==t?F:t[n]}}function w(n){return function(t){return null==n?F:n[t]}}function m(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;
-return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return l(t,function(t){return[t,n[t]]})}function S(n){return function(t){return n(t)}}function I(n,t){return l(t,function(t){return n[t]})}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function W(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function B(n){
-return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function U(n,t){return function(r){return n(t(r))}}function C(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function T(n){if(Bn.test(n)){
-for(var t=zn.lastIndex=0;zn.test(n);)++t;n=t}else n=tt(n);return n}function $(n){return Bn.test(n)?n.match(zn)||[]:n.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};
-Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
-var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,
-Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;
-n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I",
-"\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C",
-"\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i",
-"\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S",
-"\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe",
-"\u0149":"'n","\u017f":"s"}),et=w({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),ut=w({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
-this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Pn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){
-this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Re(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[cr(0,t-1)]:F}function ot(n,t){return Te(Mr(n),gt(t,0,n.length))}function ft(n){return Te(Mr(n))}function ct(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||_t(n,t,r);
-}function at(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||_t(n,t,r)}function lt(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function st(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function ht(n,t){return n&&Tr(t,Lu(t),n)}function pt(n,t){return n&&Tr(t,Uu(t),n)}function _t(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function vt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);return u;
-}function gt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),
-i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
-if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function wt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function mt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function At(n,t){var r=[];return oo(n,function(n,e,u){
-t(n,e,u)&&r.push(n)}),r}function kt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ie),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?kt(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Et(n,t){return n&&co(n,t,Lu)}function Ot(n,t){return n&&ao(n,t,Lu)}function St(n,t){return f(t,function(t){return gu(n[t])})}function It(n,t){t=Rr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function Rt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function zt(n){if(null==n)n=n===F?"[object Undefined]":"[object Null]";else if(ki&&ki in ni(n)){
-var t=ci.call(n,ki),r=n[ki];try{n[ki]=F;var e=true}catch(n){}var u=si.call(n);e&&(t?n[ki]=r:delete n[ki]),n=u}else n=si.call(n);return n}function Wt(n,t){return n>t}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;
-if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ct(n,t,r){var e={};return Et(n,function(n,u,i){t(e,r(n),u,i)}),e}function Dt(n,t,e){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{
-var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),
-i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Ft(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
-u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Nt(n){return xu(n)&&"[object Map]"==yo(n)}function Pt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Ft(l,a,3,e,f):!s)return false}}return true}function Zt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function qt(n){
-return xu(n)&&"[object RegExp]"==zt(n)}function Vt(n){return xu(n)&&"[object Set]"==yo(n)}function Kt(n){return xu(n)&&yu(n.length)&&!!Cn[zt(n)]}function Gt(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?Xt(n[0],n[1]):Qt(n):Vu(n)}function Ht(n){if(!Le(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Jt(n,t){return n<t}function Yt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Qt(n){
-var t=me(n);return 1==t.length&&t[0][2]?Ue(t[0][0],t[0][1]):function(r){return r===n||Pt(r,n,t)}}function Xt(n,t){return We(n)&&t===t&&!bu(t)?Ue($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Ft(t,e,3)}}function nr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)ct(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Mr(c):p?(s=false,l=Wr(a,true)):_?(s=false,l=Lr(a,true)):l=[]:wu(a)||cf(a)?(l=c,
-cf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=Oe(a))):s=false}s&&(f.set(a,l),nr(l,a,r,e,f),f.delete(a)),ct(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),ct(n,o,f)},Uu)}function tr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Ur(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);
-break n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=It(n,o);r(f,o)&&pr(i,Rr(o,n),f)}return i}function ir(n){return function(t){return It(t,n)}}function or(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Mr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function fr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];
-if(r==e||u!==i){var i=u;Re(u)?wi.call(n,u,1):mr(n,u)}}}function cr(n,t){return n+zi(Fi()*(t-n+1))}function ar(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function lr(n,t){return wo(Ce(n,t,Nu),n+"")}function sr(n){return tt(Du(n))}function hr(n,t){var r=Du(n);return Te(r,gt(t,0,r.length))}function pr(n,t,r,e){if(!bu(n))return n;t=Rr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;
-a===F&&(a=bu(l)?l:Re(t[u+1])?[]:{})}at(f,c,a),f=f[c]}return n}function _r(n){return Te(Du(n))}function vr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e<u;)r[e]=n[e+t];return r}function gr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function dr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return yr(n,t,Nu,r);
-}function yr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Mi(i,4294967294)}function br(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(n){return typeof n=="number"?n:Au(n)?P:+n}function jr(n){if(typeof n=="string")return n;
-if(af(n))return l(n,jr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function wr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(n,t){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),
-null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?vr(n,e?0:i,e?i+1:u):vr(n,e?i+1:0,e?u:i)}function kr(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Er(n,t,r){var e=n.length;if(2>e)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=jt(i[u]||o,n[f],t,r));return wr(kt(i,1),t,r)}function Or(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);
-return o}function Sr(n){return _u(n)?n:[]}function Ir(n){return typeof n=="function"?n:Nu}function Rr(n,t){return af(n)?n:We(n,t)?[n]:mo(zu(n))}function zr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){
-if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Dr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(l+a);
-for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Mr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function Tr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?_t(r,f,c):at(r,f,c)}return r}function $r(n,t){return Tr(n,vo(n),t)}function Fr(n,t){return Tr(n,go(n),t)}function Nr(n,t){return function(r,u){var i=af(r)?e:st,o=t?t():{};return i(r,n,je(u,2),o);
-}}function Pr(n){return lr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&ze(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Zr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function qr(n){return function(t,r,e){var u=-1,i=ni(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
-}return t}}function Vr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Hr(n);return e}function Kr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?zr(r,1).join(""):t.slice(1),e[n]()+t}}function Gr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Hr(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:
-return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Jr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=xe(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?fe(n,t,Xr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
-}var i=Hr(n);return u}function Yr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=je(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Qr(n){return ge(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==be(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=be(i),f="wrapper"==u?_o(i):F,o=f&&Be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[be(f[0])].apply(o,f[3]):1==i.length&&Be(i)?o[u]():o.thru(i);
-return function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Xr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=xe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Cr(y,e,u,_)),i&&(y=Dr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),fe(n,t,Xr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Mi(f.length,x),m=Mr(y);w--;){
-var A=f[w];y[w]=Re(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Hr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Hr(n);return l}function ne(n,t){return function(r,e){return Ct(r,n,t(e))}}function te(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=jr(r),e=jr(e)):(r=xr(r),e=xr(e)),u=n(r,e)}return u}}function re(n){return ge(function(t){
-return t=l(t,S(je())),lr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ee(n,t){t=t===F?" ":jr(t);var r=t.length;return 2>r?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Hr(n);return i}function ie(n){return function(t,r,e){
-e&&typeof e!="number"&&ze(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function oe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function fe(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),Be(n)&&xo(r,u),r.placeholder=e,De(r,n,t)}function ce(n){
-var t=Xu[n];return function(n,r){if(n=Iu(n),r=null==r?0:Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ae(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function le(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),a-=u?u.length:0,64&t){
-var l=e,s=u;e=u=F}var h=c?F:_o(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],
-r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;
-for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function ve(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new di(n),new di(t)))break;
-return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=_e(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function ge(n){return wo(Ce(n,F,Ve),n+"")}function de(n){
-return Rt(n,Lu,vo)}function ye(n){return Rt(n,Uu,go)}function be(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function xe(n){return(ci.call(On,"placeholder")?On:n).placeholder}function je(){var n=On.iteratee||Pu,n=n===Pu?Gt:n;return arguments.length?n(arguments[0],arguments[1]):n}function we(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
-}function me(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t}function Ae(n,t){var r=null==n?F:n[t];return Zt(r)?r:F}function ke(n,t,r){t=Rr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&yu(u)&&Re(o,u)&&(af(n)||cf(n)))}function Ee(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Oe(n){
-return typeof n.constructor!="function"||Le(n)?{}:io(bi(n))}function Se(r,e,u,i){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Br(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Br(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
-case"[object Uint16Array]":case"[object Uint32Array]":return Lr(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Ie(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Re(n,t){return t=null==t?9007199254740991:t,
-!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function ze(n,t,r){if(!bu(r))return false;var e=typeof t;return!!("number"==e?pu(r)&&Re(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function We(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function Be(n){var t=be(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function Le(n){var t=n&&n.constructor;
-return n===(typeof t=="function"&&t.prototype||ii)}function Ue(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)))}}function Ce(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
-e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=cr(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";
-}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Mr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
-g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
-return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
-r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
-a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),
-r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);
-}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
-}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);
-if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
-n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
-if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){
-var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){
-return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){
-try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
-function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
-this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
---this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<lt(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=lt(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);
-},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
-return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
-return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){
-var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){
-t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),
-r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),
-Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=ge(function(n){function t(t){return vt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Re(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),
-n})):this.thru(t)}),No=Nr(function(n,t,r){ci.call(n,r)?++n[r]:_t(n,r,1)}),Po=Yr(Ze),Zo=Yr(qe),qo=Nr(function(n,t,r){ci.call(n,r)?n[r].push(t):_t(n,r,[t])}),Vo=lr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Dt(n,t,e)}),o}),Ko=Nr(function(n,t,r){_t(n,r,t)}),Go=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=lr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&ze(n,t[0],t[1])?t=[]:2<r&&ze(t[0],t[1],t[2])&&(t=[t[0]]),
-rr(n,kt(t,1),[])}),Jo=Si||function(){return Zn.Date.now()},Yo=lr(function(n,t,r){var e=1;if(r.length)var u=C(r,xe(Yo)),e=32|e;return le(n,e,t,r,u)}),Qo=lr(function(n,t,r){var e=3;if(r.length)var u=C(r,xe(Qo)),e=32|e;return le(t,e,n,r,u)}),Xo=lr(function(n,t){return xt(n,1,t)}),nf=lr(function(n,t,r){return xt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=lr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(je())):l(kt(t,1),S(je()));var e=t.length;return lr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);
-return r(n,this,u)})}),rf=lr(function(n,t){return le(n,32,F,t,C(t,xe(rf)))}),ef=lr(function(n,t){return le(n,64,F,t,C(t,xe(ef)))}),uf=ge(function(n,t){return le(n,256,F,F,F,t)}),of=oe(Wt),ff=oe(function(n,t){return n>=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){
-if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){
-var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1<t.length),t}),Tr(n,ye(n),r),e&&(r=dt(r,7,pe));for(var u=t.length;u--;)mr(r,t[u]);return r}),Wf=ge(function(n,t){return null==n?{}:er(n,t)}),Bf=ae(Lu),Lf=ae(Uu),Uf=Gr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Gr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Gr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Kr("toLowerCase"),Tf=Gr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
-}),$f=Gr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Gr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Nf=Kr("toUpperCase"),Pf=lr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=ge(function(n,t){return u(t,function(t){t=$e(t),_t(n,t,Yo(n[t],n))}),n}),qf=Qr(),Vf=Qr(true),Kf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Gf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),Hf=re(l),Jf=re(o),Yf=re(_),Qf=ie(),Xf=ie(true),nc=te(function(n,t){return n+t},0),tc=ce("ceil"),rc=te(function(n,t){
-return n/t},1),ec=ce("floor"),uc=te(function(n,t){return n*t},1),ic=ce("round"),oc=te(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},
-On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=vr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Mr(r):[r],kt(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=je();return n=t?l(n,function(n){
-if("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],lr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return yt(dt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:ht(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;
-return e?(t=r||t===F?1:Ou(t),vr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;
-return n},On.filter=function(n,t){return(af(n)?f:At)(n,je(t,3))},On.flatMap=function(n,t){return kt(uu(n,t),1)},On.flatMapDeep=function(n,t){return kt(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),kt(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?kt(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),kt(n,t)):[]},On.flip=function(n){return le(n,512)},On.flow=qf,On.flowRight=Vf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){
-var u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){return null==n?[]:St(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:St(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?vr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){
-var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,e,t(n,e,u))}),r},On.matches=function(n){return Qt(dt(n,1))},On.matchesProperty=function(n,t){return Xt(n,dt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),lr(function(t){return tr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(je(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),
-r=e?F:r,af(r)||(r=null==r?[]:[r]),rr(n,t,r))},On.over=Hf,On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:It(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,je(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){
-return(af(n)?f:At)(n,su(je(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=je(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return fr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),lr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),(af(n)?ot:hr)(n,t)},On.set=function(n,t,r){return null==n?n:pr(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,
-null==n?n:pr(n,t,r,e)},On.shuffle=function(n){return(af(n)?ft:_r)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&ze(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),vr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?br(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?br(n,je(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&ze(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),
-!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
-return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,
-On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);
-},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);
-},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},
-On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));
-},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);
-},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n<Di(t,r)},On.invoke=Sf,On.isArguments=cf,On.isArray=af,On.isArrayBuffer=lf,On.isArrayLike=pu,On.isArrayLikeObject=_u,
-On.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==zt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(Le(n))return!Ht(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Ft(n,t);
-},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Ft(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Pt(n,t,me(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Pt(n,t,me(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
-return Zt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){
-return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){
-return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){
-n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ee(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ee(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&ze(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);
-},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;
-}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:sr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Ht(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:gr;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3))},On.sortedIndex=function(n,t){return dr(n,t)},On.sortedIndexBy=function(n,t,r){return yr(n,t,je(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
-var e=dr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return dr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return yr(n,t,je(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=dr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=null==r?0:gt(Ou(r),0,n.length),t=jr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,je(t,2)):0;
-},On.template=function(n,t,r){var e=On.templateSettings;r&&ze(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,se),r=jf({},t.imports,e.imports,se);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),
-e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Pf(function(){return Qu(o,l+"return "+a).apply(F,f)}),t.source=a,vu(t))throw t;return t},On.times=function(n,t){if(n=Ou(n),1>n||9007199254740991<n)return[];
-var r=4294967295,e=Mi(n,4294967295);for(t=je(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return n?gt(Ou(n),-9007199254740991,9007199254740991):0===n?n:0},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=jr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,zr(n,t,r).join("")):n;
-},On.trimEnd=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=jr(t))?(n=$(n),t=W(n,$(t))+1,zr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=jr(t))?(n=$(n),t=z(n,$(t)),zr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?jr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;
-if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,
-Zu(On,function(){var n={};return Et(On,function(t,r){ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){r=r===F?1:Di(Ou(r),0);var e=this.__filtered__&&!t?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=Mi(r,e.__takeCount__):e.__views__.push({size:Mi(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){
-return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);
-}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
-t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);
-l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){
-var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),
-n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Mi(n,f+s);break;case"takeRight":f=Di(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,
-o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Mi(n,this.__takeCount__),!e||!u&&i==n&&l==n)return kr(t,this.__actions__);e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));
-var n=this.__index__>=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);
-},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);
-
-// https://d3js.org Version 4.8.0. Copyright 2017 Mike Bostock.
-(function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})})(this,function(t){"use strict";function n(t){return function(n,e){return Rs(t(n),e)}}function e(t,n){return[t,n]}function r(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Qs?10:o>=Ks?5:o>=tf?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Qs?10:o>=Ks?5:o>=tf?2:1)}function i(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Qs?i*=10:o>=Ks?i*=5:o>=tf&&(i*=2),n<t?-i:i}function o(t){return t.length}function u(t){return"translate("+t+",0)"}function a(t){return"translate(0,"+t+")"}function c(t){var n=t.bandwidth()/2;return t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function s(){return!this.__axis}function f(t,n){function e(e){var u=null==o?n.ticks?n.ticks.apply(n,i):n.domain():o,a=null==f?n.tickFormat?n.tickFormat.apply(n,i):xf:f,g=Math.max(l,0)+p,y=n.range(),m=y[0]+.5,x=y[y.length-1]+.5,b=(n.bandwidth?c:xf)(n.copy()),w=e.selection?e.selection():e,M=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(u,n).order(),S=T.exit(),N=T.enter().append("g").attr("class","tick"),k=T.select("line"),E=T.select("text");M=M.merge(M.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),T=T.merge(N),k=k.merge(N.append("line").attr("stroke","#000").attr(r+"2",d*l).attr(v+"1",.5).attr(v+"2",.5)),E=E.merge(N.append("text").attr("fill","#000").attr(r,d*g).attr(v,.5).attr("dy",t===bf?"0em":t===Mf?"0.71em":"0.32em")),e!==w&&(M=M.transition(e),T=T.transition(e),k=k.transition(e),E=E.transition(e),S=S.transition(e).attr("opacity",Sf).attr("transform",function(t){return isFinite(t=b(t))?_(t):this.getAttribute("transform")}),N.attr("opacity",Sf).attr("transform",function(t){var n=this.parentNode.__axis;return _(n&&isFinite(n=n(t))?n:b(t))})),S.remove(),M.attr("d",t===Tf||t==wf?"M"+d*h+","+m+"H0.5V"+x+"H"+d*h:"M"+m+","+d*h+"V0.5H"+x+"V"+d*h),T.attr("opacity",1).attr("transform",function(t){return _(b(t))}),k.attr(r+"2",d*l),E.attr(r,d*g).text(a),w.filter(s).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wf?"start":t===Tf?"end":"middle"),w.each(function(){this.__axis=b})}var r,i=[],o=null,f=null,l=6,h=6,p=3,d=t===bf||t===Tf?-1:1,v=t===Tf||t===wf?(r="x","y"):(r="y","x"),_=t===bf||t===Mf?u:a;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return i=mf.call(arguments),e},e.tickArguments=function(t){return arguments.length?(i=null==t?[]:mf.call(t),e):i.slice()},e.tickValues=function(t){return arguments.length?(o=null==t?null:mf.call(t),e):o&&o.slice()},e.tickFormat=function(t){return arguments.length?(f=t,e):f},e.tickSize=function(t){return arguments.length?(l=h=+t,e):l},e.tickSizeInner=function(t){return arguments.length?(l=+t,e):l},e.tickSizeOuter=function(t){return arguments.length?(h=+t,e):h},e.tickPadding=function(t){return arguments.length?(p=+t,e):p},e}function l(t){return f(bf,t)}function h(t){return f(wf,t)}function p(t){return f(Mf,t)}function d(t){return f(Tf,t)}function v(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new _(r)}function _(t){this._=t}function g(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function y(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function m(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Nf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function x(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===kf&&n.documentElement.namespaceURI===kf?n.createElement(t):n.createElementNS(e,t)}}function b(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function w(){return new M}function M(){this._="@"+(++zf).toString(36)}function T(t,n,e){return t=S(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function S(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function N(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function k(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function E(t,n,e){var r=Uf.hasOwnProperty(t.type)?T:S;return function(i,o,u){var a,c=this.__on,s=r(n,o,u);if(c)for(var f=0,l=c.length;f<l;++f)if((a=c[f]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=s,a.capture=e),void(a.value=n);this.addEventListener(t.type,s,e),a={type:t.type,name:t.name,value:n,listener:s,capture:e},c?c.push(a):this.__on=[a]}}function A(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}}function C(){}function z(){return[]}function P(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function L(t,n,e,r,i,o){for(var u,a=0,c=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new P(t,o[a]);for(;a<c;++a)(u=n[a])&&(i[a]=u)}function R(t,n,e,r,i,o,u){var a,c,s,f={},l=n.length,h=o.length,p=new Array(l);for(a=0;a<l;++a)(c=n[a])&&(p[a]=s=Zf+u.call(c,c.__data__,a,n),s in f?i[a]=c:f[s]=c);for(a=0;a<h;++a)s=Zf+u.call(t,o[a],a,o),(c=f[s])?(r[a]=c,c.__data__=o[a],f[s]=null):e[a]=new P(t,o[a]);for(a=0;a<l;++a)(c=n[a])&&f[p[a]]===c&&(i[a]=c)}function q(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function U(t){return function(){this.removeAttribute(t)}}function D(t){return function(){this.removeAttributeNS(t.space,t.local)}}function O(t,n){return function(){this.setAttribute(t,n)}}function F(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function I(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Y(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function B(t){return function(){this.style.removeProperty(t)}}function j(t,n,e){return function(){this.style.setProperty(t,n,e)}}function H(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function X(t){return function(){delete this[t]}}function V(t,n){return function(){this[t]=n}}function $(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function W(t){return t.trim().split(/^|\s+/)}function Z(t){return t.classList||new G(t)}function G(t){this._node=t,this._names=W(t.getAttribute("class")||"")}function J(t,n){for(var e=Z(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Q(t,n){for(var e=Z(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function K(t){return function(){J(this,t)}}function tt(t){return function(){Q(this,t)}}function nt(t,n){return function(){(n.apply(this,arguments)?J:Q)(this,t)}}function et(){this.textContent=""}function rt(t){return function(){this.textContent=t}}function it(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ot(){this.innerHTML=""}function ut(t){return function(){this.innerHTML=t}}function at(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function ct(){this.nextSibling&&this.parentNode.appendChild(this)}function st(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ft(){return null}function lt(){var t=this.parentNode;t&&t.removeChild(this)}function ht(t,n,e){var r=cl(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function pt(t,n){return function(){return ht(this,t,n)}}function dt(t,n){return function(){return ht(this,t,n.apply(this,arguments))}}function vt(t,n){this._groups=t,this._parents=n}function _t(){return new vt([[document.documentElement]],bl)}function gt(){t.event.stopImmediatePropagation()}function yt(t,n){var e=t.document.documentElement,r=wl(t).on("dragstart.drag",null);n&&(r.on("click.drag",Nl,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function mt(t,n,e,r,i,o,u,a,c,s){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=u,this.dx=a,this.dy=c,this._=s}function xt(){return!t.event.button}function bt(){return this.parentNode}function wt(n){return null==n?{x:t.event.x,y:t.event.y}:n}function Mt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Tt(){}function St(t){var n;return t=(t+"").trim().toLowerCase(),(n=Rl.exec(t))?(n=parseInt(n[1],16),new Ct(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=ql.exec(t))?Nt(parseInt(n[1],16)):(n=Ul.exec(t))?new Ct(n[1],n[2],n[3],1):(n=Dl.exec(t))?new Ct(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Ol.exec(t))?kt(n[1],n[2],n[3],n[4]):(n=Fl.exec(t))?kt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Il.exec(t))?zt(n[1],n[2]/100,n[3]/100,1):(n=Yl.exec(t))?zt(n[1],n[2]/100,n[3]/100,n[4]):Bl.hasOwnProperty(t)?Nt(Bl[t]):"transparent"===t?new Ct(NaN,NaN,NaN,0):null}function Nt(t){return new Ct(t>>16&255,t>>8&255,255&t,1)}function kt(t,n,e,r){return r<=0&&(t=n=e=NaN),new Ct(t,n,e,r)}function Et(t){return t instanceof Tt||(t=St(t)),t?(t=t.rgb(),new Ct(t.r,t.g,t.b,t.opacity)):new Ct}function At(t,n,e,r){return 1===arguments.length?Et(t):new Ct(t,n,e,null==r?1:r)}function Ct(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function zt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Rt(t,n,e,r)}function Pt(t){if(t instanceof Rt)return new Rt(t.h,t.s,t.l,t.opacity);if(t instanceof Tt||(t=St(t)),!t)return new Rt;if(t instanceof Rt)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=c<.5?o+i:2-o-i,u*=60):a=c>0&&c<1?0:u,new Rt(u,a,c,t.opacity)}function Lt(t,n,e,r){return 1===arguments.length?Pt(t):new Rt(t,n,e,null==r?1:r)}function Rt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Ut(t){if(t instanceof Ot)return new Ot(t.l,t.a,t.b,t.opacity);if(t instanceof Xt){var n=t.h*jl;return new Ot(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Ct||(t=Et(t));var e=Bt(t.r),r=Bt(t.g),i=Bt(t.b),o=Ft((.4124564*e+.3575761*r+.1804375*i)/Xl),u=Ft((.2126729*e+.7151522*r+.072175*i)/Vl);return new Ot(116*u-16,500*(o-u),200*(u-Ft((.0193339*e+.119192*r+.9503041*i)/$l)),t.opacity)}function Dt(t,n,e,r){return 1===arguments.length?Ut(t):new Ot(t,n,e,null==r?1:r)}function Ot(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Ft(t){return t>Jl?Math.pow(t,1/3):t/Gl+Wl}function It(t){return t>Zl?t*t*t:Gl*(t-Wl)}function Yt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Bt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function jt(t){if(t instanceof Xt)return new Xt(t.h,t.c,t.l,t.opacity);t instanceof Ot||(t=Ut(t));var n=Math.atan2(t.b,t.a)*Hl;return new Xt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ht(t,n,e,r){return 1===arguments.length?jt(t):new Xt(t,n,e,null==r?1:r)}function Xt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Vt(t){if(t instanceof Wt)return new Wt(t.h,t.s,t.l,t.opacity);t instanceof Ct||(t=Et(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(oh*r+rh*n-ih*e)/(oh+rh-ih),o=r-i,u=(eh*(e-i)-th*o)/nh,a=Math.sqrt(u*u+o*o)/(eh*i*(1-i)),c=a?Math.atan2(u,o)*Hl-120:NaN;return new Wt(c<0?c+360:c,a,i,t.opacity)}function $t(t,n,e,r){return 1===arguments.length?Vt(t):new Wt(t,n,e,null==r?1:r)}function Wt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Zt(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}function Gt(t,n){return function(e){return t+e*n}}function Jt(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Qt(t,n){var e=n-t;return e?Gt(t,e>180||e<-180?e-360*Math.round(e/360):e):dh(isNaN(t)?n:t)}function Kt(t){return 1==(t=+t)?tn:function(n,e){return e-n?Jt(n,e,t):dh(isNaN(n)?e:n)}}function tn(t,n){var e=n-t;return e?Gt(t,e):dh(isNaN(t)?n:t)}function nn(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=At(n[e]),o[e]=r.r||0,u[e]=r.g||0,a[e]=r.b||0;return o=t(o),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=u(t),r.b=a(t),r+""}}}function en(t){return function(){return t}}function rn(t){return function(n){return t(n)+""}}function on(t){return"none"===t?Eh:(uh||(uh=document.createElement("DIV"),ah=document.documentElement,ch=document.defaultView),uh.style.transform=t,t=ch.getComputedStyle(ah.appendChild(uh),null).getPropertyValue("transform"),ah.removeChild(uh),t=t.slice(7,-1).split(","),Ah(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function un(t){return null==t?Eh:(sh||(sh=document.createElementNS("http://www.w3.org/2000/svg","g")),sh.setAttribute("transform",t),(t=sh.transform.baseVal.consolidate())?(t=t.matrix,Ah(t.a,t.b,t.c,t.d,t.e,t.f)):Eh)}function an(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function o(t,r,i,o,u,a){if(t!==i||r!==o){var c=u.push("translate(",null,n,null,e);a.push({i:c-4,x:xh(t,i)},{i:c-2,x:xh(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}function u(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:xh(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function a(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:xh(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function c(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:xh(t,e)},{i:a-2,x:xh(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),u(n.rotate,e.rotate,r,i),a(n.skewX,e.skewX,r,i),c(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e<o;)r[(n=i[e]).i]=n.x(t);return r.join("")}}}function cn(t){return((t=Math.exp(t))+1/t)/2}function sn(t){return((t=Math.exp(t))-1/t)/2}function fn(t){return((t=Math.exp(2*t))-1)/(t+1)}function ln(t){return function(n,e){var r=t((n=Lt(n)).h,(e=Lt(e)).h),i=tn(n.s,e.s),o=tn(n.l,e.l),u=tn(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=u(t),n+""}}}function hn(t,n){var e=tn((t=Dt(t)).l,(n=Dt(n)).l),r=tn(t.a,n.a),i=tn(t.b,n.b),o=tn(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function pn(t){return function(n,e){var r=t((n=Ht(n)).h,(e=Ht(e)).h),i=tn(n.c,e.c),o=tn(n.l,e.l),u=tn(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=u(t),n+""}}}function dn(t){return function n(e){function r(n,r){var i=t((n=$t(n)).h,(r=$t(r)).h),o=tn(n.s,r.s),u=tn(n.l,r.l),a=tn(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}function vn(){return Vh||(Zh(_n),Vh=Wh.now()+$h)}function _n(){Vh=0}function gn(){this._call=this._time=this._next=null}function yn(t,n,e){var r=new gn;return r.restart(t,n,e),r}function mn(){vn(),++Yh;for(var t,n=fh;n;)(t=Vh-n._time)>=0&&n._call.call(null,t),n=n._next;--Yh}function xn(){Vh=(Xh=Wh.now())+$h,Yh=Bh=0;try{mn()}finally{Yh=0,wn(),Vh=0}}function bn(){var t=Wh.now(),n=t-Xh;n>Hh&&($h-=n,Xh=t)}function wn(){for(var t,n,e=fh,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:fh=n);lh=t,Mn(r)}function Mn(t){if(!Yh){Bh&&(Bh=clearTimeout(Bh));var n=t-Vh;n>24?(t<1/0&&(Bh=setTimeout(xn,n)),jh&&(jh=clearInterval(jh))):(jh||(Xh=Vh,jh=setInterval(bn,Hh)),Yh=1,Zh(xn))}}function Tn(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>tp)throw new Error("too late");return e}function Sn(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>ep)throw new Error("too late");return e}function Nn(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function kn(t,n,e){function r(t){e.state=np,e.timer.restart(i,e.delay,e.time),e.delay<=t&&i(t-e.delay)}function i(r){var s,f,l,h;if(e.state!==np)return u();for(s in c)if(h=c[s],h.name===e.name){if(h.state===rp)return Gh(i);h.state===ip?(h.state=up,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete c[s]):+s<n&&(h.state=up,h.timer.stop(),delete c[s])}if(Gh(function(){e.state===rp&&(e.state=ip,e.timer.restart(o,e.delay,e.time),o(r))}),e.state=ep,e.on.call("start",t,t.__data__,e.index,e.group),e.state===ep){for(e.state=rp,a=new Array(l=e.tween.length),s=0,f=-1;s<l;++s)(h=e.tween[s].value.call(t,t.__data__,e.index,e.group))&&(a[++f]=h);a.length=f+1}}function o(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=op,1),i=-1,o=a.length;++i<o;)a[i].call(null,r);e.state===op&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){e.state=up,e.timer.stop(),delete c[n];for(var r in c)return;delete t.__transition}var a,c=t.__transition;c[n]=e,e.timer=yn(r,0,e.time)}function En(t,n){var e,r;return function(){var i=Sn(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function An(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Sn(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},c=0,s=i.length;c<s;++c)if(i[c].name===n){i[c]=a;break}c===s&&i.push(a)}o.tween=i}}function Cn(t,n,e){var r=t._id;return t.each(function(){var t=Sn(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return Nn(t,r).value[n]}}function zn(t){return function(){this.removeAttribute(t)}}function Pn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ln(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Rn(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function qn(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttribute(t):(u=this.getAttribute(t),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function Un(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function Dn(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function On(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function Fn(t,n){return function(){Tn(this,t).delay=+n.apply(this,arguments)}}function In(t,n){return n=+n,function(){Tn(this,t).delay=n}}function Yn(t,n){return function(){Sn(this,t).duration=+n.apply(this,arguments)}}function Bn(t,n){return n=+n,function(){Sn(this,t).duration=n}}function jn(t,n){if("function"!=typeof n)throw new Error;return function(){Sn(this,t).ease=n}}function Hn(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function Xn(t,n,e){var r,i,o=Hn(n)?Tn:Sn;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function Vn(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function $n(t,n){var e,r,i;return function(){var o=cl(this).getComputedStyle(this,null),u=o.getPropertyValue(t),a=(this.style.removeProperty(t),o.getPropertyValue(t));return u===a?null:u===e&&a===r?i:i=n(e=u,r=a)}}function Wn(t){return function(){this.style.removeProperty(t)}}function Zn(t,n,e){var r,i;return function(){var o=cl(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Gn(t,n,e){var r,i,o;return function(){var u=cl(this).getComputedStyle(this,null),a=u.getPropertyValue(t),c=e(this);return null==c&&(this.style.removeProperty(t),c=u.getPropertyValue(t)),a===c?null:a===r&&c===i?o:o=n(r=a,i=c)}}function Jn(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function Qn(t){return function(){this.textContent=t}}function Kn(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function te(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ne(t){return _t().transition(t)}function ee(){return++Ap}function re(t){return+t}function ie(t){return t*t}function oe(t){return t*(2-t)}function ue(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ae(t){return t*t*t}function ce(t){return--t*t*t+1}function se(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function fe(t){return 1-Math.cos(t*qp)}function le(t){return Math.sin(t*qp)}function he(t){return(1-Math.cos(Rp*t))/2}function pe(t){return Math.pow(2,10*t-10)}function de(t){return 1-Math.pow(2,-10*t)}function ve(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function _e(t){return 1-Math.sqrt(1-t*t)}function ge(t){return Math.sqrt(1- --t*t)}function ye(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function me(t){return 1-xe(1-t)}function xe(t){return(t=+t)<Up?Xp*t*t:t<Op?Xp*(t-=Dp)*t+Fp:t<Yp?Xp*(t-=Ip)*t+Bp:Xp*(t-=jp)*t+Hp}function be(t){return((t*=2)<=1?1-xe(1-t):xe(t-1)+1)/2}function we(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Kp.time=vn(),Kp;return e}function Me(){t.event.stopImmediatePropagation()}function Te(t){return{type:t}}function Se(){return!t.event.button}function Ne(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ke(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ee(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ae(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ce(){return Pe(fd)}function ze(){return Pe(ld)}function Pe(n){function e(t){var e=t.property("__brush",a).selectAll(".overlay").data([Te("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pd.overlay).merge(e).each(function(){var t=ke(this).extent;wl(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),t.selectAll(".selection").data([Te("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pd.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=t.selectAll(".handle").data(n.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return pd[t.type]}),t.each(r).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",u)}function r(){var t=wl(this),n=ke(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?n[1][0]-h/2:n[0][0]-h/2}).attr("y",function(t){return"s"===t.type[0]?n[1][1]-h/2:n[0][1]-h/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+h:h}).attr("height",function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+h:h})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function i(t,n){return t.__brush.emitter||new o(t,n)}function o(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function u(){function e(){var t=If(T);!U||w||M||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?M=!0:w=!0),O=t,b=!0,od(),o()}function o(){var t;switch(m=O[0]-D[0],x=O[1]-D[1],N){case ad:case ud:k&&(m=Math.max(P-l,Math.min(R-v,m)),h=l+m,_=v+m),E&&(x=Math.max(L-p,Math.min(q-g,x)),d=p+x,y=g+x);break;case cd:k<0?(m=Math.max(P-l,Math.min(R-l,m)),h=l+m,_=v):k>0&&(m=Math.max(P-v,Math.min(R-v,m)),h=l,_=v+m),E<0?(x=Math.max(L-p,Math.min(q-p,x)),d=p+x,y=g):E>0&&(x=Math.max(L-g,Math.min(q-g,x)),d=p,y=g+x);break;case sd:k&&(h=Math.max(P,Math.min(R,l-m*k)),_=Math.max(P,Math.min(R,v+m*k))),E&&(d=Math.max(L,Math.min(q,p-x*E)),y=Math.max(L,Math.min(q,g+x*E)))}_<h&&(k*=-1,t=l,l=v,v=t,t=h,h=_,_=t,S in dd&&Y.attr("cursor",pd[S=dd[S]])),y<d&&(E*=-1,t=p,p=g,g=t,t=d,d=y,y=t,S in vd&&Y.attr("cursor",pd[S=vd[S]])),A.selection&&(z=A.selection),w&&(h=z[0][0],_=z[1][0]),M&&(d=z[0][1],y=z[1][1]),z[0][0]===h&&z[0][1]===d&&z[1][0]===_&&z[1][1]===y||(A.selection=[[h,d],[_,y]],r.call(T),F.brush())}function u(){if(Me(),t.event.touches){if(t.event.touches.length)return;c&&clearTimeout(c),c=setTimeout(function(){c=null},500),I.on("touchmove.brush touchend.brush touchcancel.brush",null)}else yt(t.event.view,b),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),Y.attr("cursor",pd.overlay),A.selection&&(z=A.selection),Ee(z)&&(A.selection=null,r.call(T)),F.end()}function a(){switch(t.event.keyCode){case 16:U=k&&E;break;case 18:N===cd&&(k&&(v=_-m*k,l=h+m*k),E&&(g=y-x*E,p=d+x*E),N=sd,o());break;case 32:N!==cd&&N!==sd||(k<0?v=_-m:k>0&&(l=h-m),E<0?g=y-x:E>0&&(p=d-x),N=ad,Y.attr("cursor",pd.selection),o());break;default:return}od()}function s(){switch(t.event.keyCode){case 16:U&&(w=M=U=!1,o());break;case 18:N===sd&&(k<0?v=_:k>0&&(l=h),E<0?g=y:E>0&&(p=d),N=cd,o());break;case 32:N===ad&&(t.event.altKey?(k&&(v=_-m*k,l=h+m*k),E&&(g=y-x*E,p=d+x*E),N=sd):(k<0?v=_:k>0&&(l=h),E<0?g=y:E>0&&(p=d),N=cd),Y.attr("cursor",pd[S]),o());break;default:return}od()}if(t.event.touches){if(t.event.changedTouches.length<t.event.touches.length)return od()}else if(c)return;if(f.apply(this,arguments)){var l,h,p,d,v,_,g,y,m,x,b,w,M,T=this,S=t.event.target.__data__.type,N="selection"===(t.event.metaKey?S="overlay":S)?ud:t.event.altKey?sd:cd,k=n===ld?null:_d[S],E=n===fd?null:gd[S],A=ke(T),C=A.extent,z=A.selection,P=C[0][0],L=C[0][1],R=C[1][0],q=C[1][1],U=k&&E&&t.event.shiftKey,D=If(T),O=D,F=i(T,arguments).beforestart();"overlay"===S?A.selection=z=[[l=n===ld?P:D[0],p=n===fd?L:D[1]],[v=n===ld?R:l,g=n===fd?q:p]]:(l=z[0][0],p=z[0][1],v=z[1][0],g=z[1][1]),h=l,d=p,_=v,y=g;var I=wl(T).attr("pointer-events","none"),Y=I.selectAll(".overlay").attr("cursor",pd[S]);if(t.event.touches)I.on("touchmove.brush",e,!0).on("touchend.brush touchcancel.brush",u,!0);else{var B=wl(t.event.view).on("keydown.brush",a,!0).on("keyup.brush",s,!0).on("mousemove.brush",e,!0).on("mouseup.brush",u,!0);kl(t.event.view)}Me(),cp(T),r.call(T),F.start()}}function a(){var t=this.__brush||{selection:null};return t.extent=s.apply(this,arguments),t.dim=n,t}var c,s=Ne,f=Se,l=v(e,"start","brush","end"),h=6;return e.move=function(t,e){t.selection?t.on("start.brush",function(){i(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){i(this,arguments).end()}).tween("brush",function(){function t(t){u.selection=1===t&&Ee(s)?null:f(t),r.call(o),a.brush()}var o=this,u=o.__brush,a=i(o,arguments),c=u.selection,s=n.input("function"==typeof e?e.apply(this,arguments):e,u.extent),f=Sh(c,s);return c&&s?t:t(1)}):t.each(function(){var t=this,o=arguments,u=t.__brush,a=n.input("function"==typeof e?e.apply(t,o):e,u.extent),c=i(t,o).beforestart();cp(t),u.selection=null==a||Ee(a)?null:a,r.call(t),c.start().brush().end()})},o.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){A(new id(e,t,n.output(this.state.selection)),l.apply,l,[t,this.that,this.args])}},e.extent=function(t){return arguments.length?(s="function"==typeof t?t:rd([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),e):s},e.filter=function(t){return arguments.length?(f="function"==typeof t?t:rd(!!t),e):f},e.handleSize=function(t){return arguments.length?(h=+t,e):h},e.on=function(){var t=l.on.apply(l,arguments);return t===l?e:t},e}function Le(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}function Re(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function qe(){return new Re}function Ue(t){return t.source}function De(t){return t.target}function Oe(t){return t.radius}function Fe(t){return t.startAngle}function Ie(t){return t.endAngle}function Ye(){}function Be(t,n){var e=new Ye;if(t instanceof Ye)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function je(){return{}}function He(t,n,e){t[n]=e}function Xe(){return Be()}function Ve(t,n,e){t.set(n,e)}function $e(){}function We(t,n){var e=new $e;if(t instanceof $e)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}function Ze(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Ge(t,n){var e=Ze(t);return function(r,i){return n(e(r),i,t)}}function Je(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function Qe(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,c,s,f,l,h,p=t._root,d={data:r},v=t._x0,_=t._y0,g=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=n>=(o=(v+g)/2))?v=o:g=o,(f=e>=(u=(_+y)/2))?_=u:y=u,i=p,!(p=p[l=f<<1|s]))return i[l]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),n===a&&e===c)return d.next=p,i?i[l]=d:t._root=d,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(s=n>=(o=(v+g)/2))?v=o:g=o,(f=e>=(u=(_+y)/2))?_=u:y=u}while((l=f<<1|s)==(h=(c>=u)<<1|a>=o));return i[h]=p,i[l]=d,t}function Ke(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,s=1/0,f=-1/0,l=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(u[e]=r,a[e]=i,r<c&&(c=r),r>f&&(f=r),i<s&&(s=i),i>l&&(l=i));for(f<c&&(c=this._x0,f=this._x1),l<s&&(s=this._y0,l=this._y1),this.cover(c,s).cover(f,l),e=0;e<o;++e)Qe(this,u[e],a[e],t[e]);return this}function tr(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function nr(t){return t[0]}function er(t){return t[1]}function rr(t,n,e){var r=new ir(null==n?nr:n,null==e?er:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ir(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function or(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function ur(t){return t.x+t.vx}function ar(t){return t.y+t.vy}function cr(t){return t.index}function sr(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function fr(t){return t.x}function lr(t){return t.y}function hr(t){return new pr(t)}function pr(t){if(!(n=Ev.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),f=n[9]||"";"n"===f?(c=!0,
-f="g"):kv[f]||(f=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=a,this.comma=c,this.precision=s,this.type=f}function dr(n){return Av=Pv(n),t.format=Av.format,t.formatPrefix=Av.formatPrefix,Av}function vr(){this.reset()}function _r(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}function gr(t){return t>1?0:t<-1?__:Math.acos(t)}function yr(t){return t>1?g_:t<-1?-g_:Math.asin(t)}function mr(t){return(t=C_(t/2))*t}function xr(){}function br(t,n){t&&q_.hasOwnProperty(t.type)&&q_[t.type](t,n)}function wr(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function Mr(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)wr(t[e],n,1);n.polygonEnd()}function Tr(){F_.point=Nr}function Sr(){kr(Dv,Ov)}function Nr(t,n){F_.point=kr,Dv=t,Ov=n,t*=b_,n*=b_,Fv=t,Iv=S_(n=n/2+y_),Yv=C_(n)}function kr(t,n){t*=b_,n*=b_,n=n/2+y_;var e=t-Fv,r=e>=0?1:-1,i=r*e,o=S_(n),u=C_(n),a=Yv*u,c=Iv*o+a*S_(i),s=a*r*C_(i);D_.add(T_(s,c)),Fv=t,Iv=o,Yv=u}function Er(t){return[T_(t[1],t[0]),yr(t[2])]}function Ar(t){var n=t[0],e=t[1],r=S_(e);return[r*S_(n),r*C_(n),C_(e)]}function Cr(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function zr(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Pr(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Lr(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Rr(t){var n=P_(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function qr(t,n){Gv.push(Jv=[Bv=t,Hv=t]),n<jv&&(jv=n),n>Xv&&(Xv=n)}function Ur(t,n){var e=Ar([t*b_,n*b_]);if(Zv){var r=zr(Zv,e),i=[r[1],-r[0],0],o=zr(i,r);Rr(o),o=Er(o);var u,a=t-Vv,c=a>0?1:-1,s=o[0]*x_*c,f=w_(a)>180;f^(c*Vv<s&&s<c*t)?(u=o[1]*x_)>Xv&&(Xv=u):(s=(s+360)%360-180,f^(c*Vv<s&&s<c*t)?(u=-o[1]*x_)<jv&&(jv=u):(n<jv&&(jv=n),n>Xv&&(Xv=n))),f?t<Vv?Br(Bv,t)>Br(Bv,Hv)&&(Hv=t):Br(t,Hv)>Br(Bv,Hv)&&(Bv=t):Hv>=Bv?(t<Bv&&(Bv=t),t>Hv&&(Hv=t)):t>Vv?Br(Bv,t)>Br(Bv,Hv)&&(Hv=t):Br(t,Hv)>Br(Bv,Hv)&&(Bv=t)}else Gv.push(Jv=[Bv=t,Hv=t]);n<jv&&(jv=n),n>Xv&&(Xv=n),Zv=e,Vv=t}function Dr(){B_.point=Ur}function Or(){Jv[0]=Bv,Jv[1]=Hv,B_.point=qr,Zv=null}function Fr(t,n){if(Zv){var e=t-Vv;Y_.add(w_(e)>180?e+(e>0?360:-360):e)}else $v=t,Wv=n;F_.point(t,n),Ur(t,n)}function Ir(){F_.lineStart()}function Yr(){Fr($v,Wv),F_.lineEnd(),w_(Y_)>v_&&(Bv=-(Hv=180)),Jv[0]=Bv,Jv[1]=Hv,Zv=null}function Br(t,n){return(n-=t)<0?n+360:n}function jr(t,n){return t[0]-n[0]}function Hr(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function Xr(t,n){t*=b_,n*=b_;var e=S_(n);Vr(e*S_(t),e*C_(t),C_(n))}function Vr(t,n,e){++Qv,t_+=(t-t_)/Qv,n_+=(n-n_)/Qv,e_+=(e-e_)/Qv}function $r(){H_.point=Wr}function Wr(t,n){t*=b_,n*=b_;var e=S_(n);l_=e*S_(t),h_=e*C_(t),p_=C_(n),H_.point=Zr,Vr(l_,h_,p_)}function Zr(t,n){t*=b_,n*=b_;var e=S_(n),r=e*S_(t),i=e*C_(t),o=C_(n),u=T_(P_((u=h_*o-p_*i)*u+(u=p_*r-l_*o)*u+(u=l_*i-h_*r)*u),l_*r+h_*i+p_*o);Kv+=u,r_+=u*(l_+(l_=r)),i_+=u*(h_+(h_=i)),o_+=u*(p_+(p_=o)),Vr(l_,h_,p_)}function Gr(){H_.point=Xr}function Jr(){H_.point=Kr}function Qr(){ti(s_,f_),H_.point=Xr}function Kr(t,n){s_=t,f_=n,t*=b_,n*=b_,H_.point=ti;var e=S_(n);l_=e*S_(t),h_=e*C_(t),p_=C_(n),Vr(l_,h_,p_)}function ti(t,n){t*=b_,n*=b_;var e=S_(n),r=e*S_(t),i=e*C_(t),o=C_(n),u=h_*o-p_*i,a=p_*r-l_*o,c=l_*i-h_*r,s=P_(u*u+a*a+c*c),f=yr(s),l=s&&-f/s;u_+=l*u,a_+=l*a,c_+=l*c,Kv+=f,r_+=f*(l_+(l_=r)),i_+=f*(h_+(h_=i)),o_+=f*(p_+(p_=o)),Vr(l_,h_,p_)}function ni(t,n){return[t>__?t-m_:t<-__?t+m_:t,n]}function ei(t,n,e){return(t%=m_)?n||e?$_(ii(t),oi(n,e)):ii(t):n||e?oi(n,e):ni}function ri(t){return function(n,e){return n+=t,[n>__?n-m_:n<-__?n+m_:n,e]}}function ii(t){var n=ri(t);return n.invert=ri(-t),n}function oi(t,n){function e(t,n){var e=S_(n),a=S_(t)*e,c=C_(t)*e,s=C_(n),f=s*r+a*i;return[T_(c*o-f*u,a*r-s*i),yr(f*o+c*u)]}var r=S_(t),i=C_(t),o=S_(n),u=C_(n);return e.invert=function(t,n){var e=S_(n),a=S_(t)*e,c=C_(t)*e,s=C_(n),f=s*o-c*u;return[T_(c*o+s*u,a*r+f*i),yr(f*r-a*i)]},e}function ui(t,n,e,r,i,o){if(e){var u=S_(n),a=C_(n),c=r*e;null==i?(i=n+r*m_,o=n-c/2):(i=ai(u,i),o=ai(u,o),(r>0?i<o:i>o)&&(i+=r*m_));for(var s,f=i;r>0?f>o:f<o;f-=c)s=Er([u,-a*S_(f),-a*C_(f)]),t.point(s[0],s[1])}}function ai(t,n){n=Ar(n),n[0]-=t,Rr(n);var e=gr(-n[1]);return((-n[2]<0?-e:e)+m_-v_)%m_}function ci(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function si(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function fi(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,a,s){var f=0,l=0;if(null==i||(f=u(i,a))!==(l=u(o,a))||c(i,o)<0^a>0)do{s.point(0===f||3===f?t:e,f>1?r:n)}while((f=(f+a+4)%4)!==l);else s.point(o[0],o[1])}function u(r,i){return w_(r[0]-t)<v_?i>0?0:3:w_(r[0]-e)<v_?i>0?2:1:w_(r[1]-n)<v_?i>0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){function c(t,n){i(t,n)&&N.point(t,n)}function s(){for(var n=0,e=0,i=_.length;e<i;++e)for(var o,u,a=_[e],c=1,s=a.length,f=a[0],l=f[0],h=f[1];c<s;++c)o=l,u=h,f=a[c],l=f[0],h=f[1],u<=r?h>r&&(l-o)*(r-u)>(h-u)*(t-o)&&++n:h<=r&&(l-o)*(r-u)<(h-u)*(t-o)&&--n;return n}function f(){N=k,v=[],_=[],S=!0}function l(){var t=s(),n=S&&t,e=(v=lf(v)).length;(n||e)&&(u.polygonStart(),n&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),e&&fg(v,a,t,o,u),u.polygonEnd()),N=u,v=_=g=null}function h(){E.point=d,_&&_.push(g=[]),T=!0,M=!1,b=w=NaN}function p(){v&&(d(y,m),x&&M&&k.rejoin(),v.push(k.result())),E.point=c,M&&N.lineEnd()}function d(o,u){var a=i(o,u);if(_&&g.push([o,u]),T)y=o,m=u,x=a,T=!1,a&&(N.lineStart(),N.point(o,u));else if(a&&M)N.point(o,u);else{var c=[b=Math.max(hg,Math.min(lg,b)),w=Math.max(hg,Math.min(lg,w))],s=[o=Math.max(hg,Math.min(lg,o)),u=Math.max(hg,Math.min(lg,u))];cg(c,s,t,n,e,r)?(M||(N.lineStart(),N.point(c[0],c[1])),N.point(s[0],s[1]),a||N.lineEnd(),S=!1):a&&(N.lineStart(),N.point(o,u),S=!1)}b=o,w=u,M=a}var v,_,g,y,m,x,b,w,M,T,S,N=u,k=ag(),E={point:c,lineStart:h,lineEnd:p,polygonStart:f,polygonEnd:l};return E}}function li(){gg.point=pi,gg.lineEnd=hi}function hi(){gg.point=gg.lineEnd=xr}function pi(t,n){t*=b_,n*=b_,W_=t,Z_=C_(n),G_=S_(n),gg.point=di}function di(t,n){t*=b_,n*=b_;var e=C_(n),r=S_(n),i=w_(t-W_),o=S_(i),u=C_(i),a=r*u,c=G_*e-Z_*r*o,s=Z_*e+G_*r*o;_g.add(T_(P_(a*a+c*c),s)),W_=t,Z_=e,G_=r}function vi(t,n){return!(!t||!Mg.hasOwnProperty(t.type))&&Mg[t.type](t,n)}function _i(t,n){return 0===bg(t,n)}function gi(t,n){var e=bg(t[0],t[1]);return bg(t[0],n)+bg(n,t[1])<=e+v_}function yi(t,n){return!!vg(t.map(mi),xi(n))}function mi(t){return t=t.map(xi),t.pop(),t}function xi(t){return[t[0]*b_,t[1]*b_]}function bi(t,n,e){var r=Js(t,n-v_,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function wi(t,n,e){var r=Js(t,n-v_,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function Mi(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return Js(N_(o/_)*_,i,_).map(h).concat(Js(N_(s/g)*g,c,g).map(p)).concat(Js(N_(r/d)*d,e,d).filter(function(t){return w_(t%_)>v_}).map(f)).concat(Js(N_(a/v)*v,u,v).filter(function(t){return w_(t%g)>v_}).map(l))}var e,r,i,o,u,a,c,s,f,l,h,p,d=10,v=d,_=90,g=360,y=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(c).slice(1),h(i).reverse().slice(1),p(s).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.extentMajor(n).extentMinor(n):t.extentMinor()},t.extentMajor=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],s=+n[0][1],c=+n[1][1],o>i&&(n=o,o=i,i=n),s>c&&(n=s,s=c,c=n),t.precision(y)):[[o,s],[i,c]]},t.extentMinor=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],a=+n[0][1],u=+n[1][1],r>e&&(n=r,r=e,e=n),a>u&&(n=a,a=u,u=n),t.precision(y)):[[r,a],[e,u]]},t.step=function(n){return arguments.length?t.stepMajor(n).stepMinor(n):t.stepMinor()},t.stepMajor=function(n){return arguments.length?(_=+n[0],g=+n[1],t):[_,g]},t.stepMinor=function(n){return arguments.length?(d=+n[0],v=+n[1],t):[d,v]},t.precision=function(n){return arguments.length?(y=+n,f=bi(a,u,90),l=wi(r,e,y),h=bi(s,c,90),p=wi(o,i,y),t):y},t.extentMajor([[-180,-90+v_],[180,90-v_]]).extentMinor([[-180,-80-v_],[180,80+v_]])}function Ti(){return Mi()()}function Si(){Ag.point=Ni}function Ni(t,n){Ag.point=ki,J_=K_=t,Q_=tg=n}function ki(t,n){Eg.add(tg*t-K_*n),K_=t,tg=n}function Ei(){ki(J_,Q_)}function Ai(t,n){t<Cg&&(Cg=t),t>Pg&&(Pg=t),n<zg&&(zg=n),n>Lg&&(Lg=n)}function Ci(t,n){qg+=t,Ug+=n,++Dg}function zi(){Hg.point=Pi}function Pi(t,n){Hg.point=Li,Ci(rg=t,ig=n)}function Li(t,n){var e=t-rg,r=n-ig,i=P_(e*e+r*r);Og+=i*(rg+t)/2,Fg+=i*(ig+n)/2,Ig+=i,Ci(rg=t,ig=n)}function Ri(){Hg.point=Ci}function qi(){Hg.point=Di}function Ui(){Oi(ng,eg)}function Di(t,n){Hg.point=Oi,Ci(ng=rg=t,eg=ig=n)}function Oi(t,n){var e=t-rg,r=n-ig,i=P_(e*e+r*r);Og+=i*(rg+t)/2,Fg+=i*(ig+n)/2,Ig+=i,i=ig*t-rg*n,Yg+=i*(rg+t),Bg+=i*(ig+n),jg+=3*i,Ci(rg=t,ig=n)}function Fi(t){this._context=t}function Ii(t,n){Jg.point=Yi,Vg=Wg=t,$g=Zg=n}function Yi(t,n){Wg-=t,Zg-=n,Gg.add(P_(Wg*Wg+Zg*Zg)),Wg=t,Zg=n}function Bi(){this._string=[]}function ji(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Hi(t){return t.length>1}function Xi(t,n){return((t=t.x)[0]<0?t[1]-g_-v_:g_-t[1])-((n=n.x)[0]<0?n[1]-g_-v_:g_-n[1])}function Vi(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?__:-__,c=w_(o-e);w_(c-__)<v_?(t.point(e,r=(r+u)/2>0?g_:-g_),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&c>=__&&(w_(e-i)<v_&&(e-=i*v_),w_(o-a)<v_&&(o-=a*v_),r=$i(e,r,o,u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=o,r=u),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}function $i(t,n,e,r){var i,o,u=C_(t-e);return w_(u)>v_?M_((C_(n)*(o=S_(r))*C_(e)-C_(r)*(i=S_(n))*C_(t))/(i*o*u)):(n+r)/2}function Wi(t,n,e,r){var i;if(null==t)i=e*g_,r.point(-__,i),r.point(0,i),r.point(__,i),r.point(__,0),r.point(__,-i),r.point(0,-i),r.point(-__,-i),r.point(-__,0),r.point(-__,i);else if(w_(t[0]-n[0])>v_){var o=t[0]<n[0]?__:-__;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}function Zi(t){return function(n){var e=new Gi;for(var r in t)e[r]=t[r];return e.stream=n,e}}function Gi(){}function Ji(t,n,e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),U_(e,t.stream(Rg));var u=Rg.result(),a=Math.min(r/(u[1][0]-u[0][0]),i/(u[1][1]-u[0][1])),c=+n[0][0]+(r-a*(u[1][0]+u[0][0]))/2,s=+n[0][1]+(i-a*(u[1][1]+u[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*a).translate([c,s])}function Qi(t,n,e){return Ji(t,[[0,0],n],e)}function Ki(t){return Zi({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function to(t,n){function e(r,i,o,u,a,c,s,f,l,h,p,d,v,_){var g=s-r,y=f-i,m=g*g+y*y;if(m>4*n&&v--){var x=u+h,b=a+p,w=c+d,M=P_(x*x+b*b+w*w),T=yr(w/=M),S=w_(w_(w)-1)<v_||w_(o-l)<v_?(o+l)/2:T_(b,x),N=t(S,T),k=N[0],E=N[1],A=k-r,C=E-i,z=y*A-g*C;(z*z/m>n||w_((g*A+y*C)/m-.5)>.3||u*h+a*p+c*d<iy)&&(e(r,i,o,u,a,c,k,E,S,x/=M,b/=M,w,v,_),_.point(k,E),e(k,E,S,x,b,w,s,f,l,h,p,d,v,_))}}return function(n){function r(e,r){e=t(e,r),n.point(e[0],e[1])}function i(){g=NaN,w.point=o,n.lineStart()}function o(r,i){var o=Ar([r,i]),u=t(r,i);e(g,y,_,m,x,b,g=u[0],y=u[1],_=r,m=o[0],x=o[1],b=o[2],ry,n),n.point(g,y)}function u(){w.point=r,n.lineEnd()}function a(){i(),w.point=c,w.lineEnd=s}function c(t,n){o(f=t,n),l=g,h=y,p=m,d=x,v=b,w.point=o}function s(){e(g,y,_,m,x,b,l,h,f,p,d,v,ry,n),w.lineEnd=u,u()}var f,l,h,p,d,v,_,g,y,m,x,b,w={point:r,lineStart:i,lineEnd:u,polygonStart:function(){n.polygonStart(),w.lineStart=a},polygonEnd:function(){n.polygonEnd(),w.lineStart=i}};return w}}function no(t){return eo(function(){return t})()}function eo(t){function n(t){return t=f(t[0]*b_,t[1]*b_),[t[0]*_+a,c-t[1]*_]}function e(t){return(t=f.invert((t[0]-a)/_,(c-t[1])/_))&&[t[0]*x_,t[1]*x_]}function r(t,n){return t=u(t,n),[t[0]*_+a,c-t[1]*_]}function i(){f=$_(s=ei(b,w,M),u);var t=u(m,x);return a=g-t[0]*_,c=y+t[1]*_,o()}function o(){return d=v=null,n}var u,a,c,s,f,l,h,p,d,v,_=150,g=480,y=250,m=0,x=0,b=0,w=0,M=0,T=null,S=ty,N=null,k=Ng,E=.5,A=oy(r,E);return n.stream=function(t){return d&&v===t?d:d=uy(S(s,A(k(v=t))))},n.clipAngle=function(t){return arguments.length?(S=+t?ny(T=t*b_,6*b_):(T=null,ty),o()):T*x_},n.clipExtent=function(t){return arguments.length?(k=null==t?(N=l=h=p=null,Ng):fi(N=+t[0][0],l=+t[0][1],h=+t[1][0],p=+t[1][1]),o()):null==N?null:[[N,l],[h,p]]},n.scale=function(t){return arguments.length?(_=+t,i()):_},n.translate=function(t){return arguments.length?(g=+t[0],y=+t[1],i()):[g,y]},n.center=function(t){return arguments.length?(m=t[0]%360*b_,x=t[1]%360*b_,i()):[m*x_,x*x_]},n.rotate=function(t){return arguments.length?(b=t[0]%360*b_,w=t[1]%360*b_,M=t.length>2?t[2]%360*b_:0,i()):[b*x_,w*x_,M*x_]},n.precision=function(t){return arguments.length?(A=oy(r,E=t*t),o()):P_(E)},n.fitExtent=function(t,e){return Ji(n,t,e)},n.fitSize=function(t,e){return Qi(n,t,e)},function(){return u=t.apply(this,arguments),n.invert=u.invert&&e,i()}}function ro(t){var n=0,e=__/3,r=eo(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*b_,e=t[1]*b_):[n*x_,e*x_]},i}function io(t){function n(t,n){return[t*e,C_(n)/e]}var e=S_(t);return n.invert=function(t,n){return[t/e,yr(n*e)]},n}function oo(t,n){function e(t,n){var e=P_(o-2*i*C_(n))/i;return[e*C_(t*=i),u-e*S_(t)]}var r=C_(t),i=(r+C_(n))/2;if(w_(i)<v_)return io(t);var o=1+r*(2*i-r),u=P_(o)/i;return e.invert=function(t,n){var e=u-n;return[T_(t,w_(e))/i*z_(e),yr((o-(t*t+e*e)*i*i)/(2*i))]},e}function uo(t){var n=t.length;return{point:function(e,r){for(var i=-1;++i<n;)t[i].point(e,r)},sphere:function(){for(var e=-1;++e<n;)t[e].sphere()},lineStart:function(){for(var e=-1;++e<n;)t[e].lineStart()},lineEnd:function(){for(var e=-1;++e<n;)t[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<n;)t[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<n;)t[e].polygonEnd()}}}function ao(t){return function(n,e){var r=S_(n),i=S_(e),o=t(r*i);return[o*i*C_(n),o*C_(e)]}}function co(t){return function(n,e){var r=P_(n*n+e*e),i=t(r),o=C_(i),u=S_(i);return[T_(n*o,r*u),yr(r&&e*o/r)]}}function so(t,n){return[t,E_(L_((g_+n)/2))]}function fo(t){function n(){var n=__*a(),u=o(og(o.rotate()).invert([0,0]));return s(null==f?[[u[0]-n,u[1]-n],[u[0]+n,u[1]+n]]:t===so?[[Math.max(u[0]-n,f),e],[Math.min(u[0]+n,r),i]]:[[f,Math.max(u[1]-n,e)],[r,Math.min(u[1]+n,i)]])}var e,r,i,o=no(t),u=o.center,a=o.scale,c=o.translate,s=o.clipExtent,f=null;return o.scale=function(t){return arguments.length?(a(t),n()):a()},o.translate=function(t){return arguments.length?(c(t),n()):c()},o.center=function(t){return arguments.length?(u(t),n()):u()},o.clipExtent=function(t){return arguments.length?(null==t?f=e=r=i=null:(f=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),n()):null==f?null:[[f,e],[r,i]]},n()}function lo(t){return L_((g_+t)/2)}function ho(t,n){function e(t,n){o>0?n<-g_+v_&&(n=-g_+v_):n>g_-v_&&(n=g_-v_);var e=o/A_(lo(n),i);return[e*C_(i*t),o-e*S_(i*t)]}var r=S_(t),i=t===n?C_(t):E_(r/S_(n))/E_(lo(n)/lo(t)),o=r*A_(lo(t),i)/i;return i?(e.invert=function(t,n){var e=o-n,r=z_(i)*P_(t*t+e*e);return[T_(t,w_(e))/i*z_(e),2*M_(A_(o/r,1/i))-g_]},e):so}function po(t,n){return[t,n]}function vo(t,n){function e(t,n){var e=o-n,r=i*t;return[e*C_(r),o-e*S_(r)]}var r=S_(t),i=t===n?C_(t):(r-S_(n))/(n-t),o=r/i+t;return w_(i)<v_?po:(e.invert=function(t,n){var e=o-n;return[T_(t,w_(e))/i*z_(e),o-z_(i)*P_(t*t+e*e)]},e)}function _o(t,n){var e=S_(n),r=S_(t)*e;return[e*C_(t)/r,C_(n)/r]}function go(t,n,e,r){return 1===t&&1===n&&0===e&&0===r?Ng:Zi({point:function(i,o){this.stream.point(i*t+e,o*n+r)}})}function yo(t,n){return[S_(n)*C_(t),C_(n)]}function mo(t,n){var e=S_(n),r=1+S_(t)*e;return[e*C_(t)/r,C_(n)/r]}function xo(t,n){return[E_(L_((g_+n)/2)),-t]}function bo(t,n){return t.parent===n.parent?1:2}function wo(t){return t.reduce(Mo,0)/t.length}function Mo(t,n){return t+n.x}function To(t){return 1+t.reduce(So,0)}function So(t,n){return Math.max(t,n.y)}function No(t){for(var n;n=t.children;)t=n[0];return t}function ko(t){for(var n;n=t.children;)t=n[n.length-1];return t}function Eo(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function Ao(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function Co(t,n){var e,r,i,o,u,a=new qo(t),c=+t.value&&(a.value=t.value),s=[a];for(null==n&&(n=Po);e=s.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)s.push(r=e.children[o]=new qo(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(Ro)}function zo(){return Co(this).eachBefore(Lo)}function Po(t){return t.children}function Lo(t){t.data=t.data.data}function Ro(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function qo(t){this.data=t,this.depth=this.height=0,this.parent=null}function Uo(t){this._=t,this.next=null}function Do(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r-n.r;return i*i+1e-6>e*e+r*r}function Oo(t,n){var e,r,i,o=null,u=t.head;switch(n.length){case 1:e=Fo(n[0]);break;case 2:e=Io(n[0],n[1]);break;case 3:e=Yo(n[0],n[1],n[2])}for(;u;)i=u._,r=u.next,e&&Do(e,i)?o=u:(o?(t.tail=o,o.next=null):t.head=t.tail=null,n.push(i),e=Oo(t,n),n.pop(),t.head?(u.next=t.head,t.head=u):(u.next=null,t.head=t.tail=u),o=t.tail,o.next=r),u=r;return t.tail=o,e}function Fo(t){return{x:t.x,y:t.y,r:t.r}}function Io(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,u=n.y,a=n.r,c=o-e,s=u-r,f=a-i,l=Math.sqrt(c*c+s*s);return{x:(e+o+c/l*f)/2,y:(r+u+s/l*f)/2,r:(l+i+a)/2}}function Yo(t,n,e){var r=t.x,i=t.y,o=t.r,u=n.x,a=n.y,c=n.r,s=e.x,f=e.y,l=e.r,h=2*(r-u),p=2*(i-a),d=2*(c-o),v=r*r+i*i-o*o-u*u-a*a+c*c,_=2*(r-s),g=2*(i-f),y=2*(l-o),m=r*r+i*i-o*o-s*s-f*f+l*l,x=_*p-h*g,b=(p*m-g*v)/x-r,w=(g*d-p*y)/x,M=(_*v-h*m)/x-i,T=(h*y-_*d)/x,S=w*w+T*T-1,N=2*(b*w+M*T+o),k=b*b+M*M-o*o,E=(-N-Math.sqrt(N*N-4*S*k))/(2*S);return{x:b+w*E+r,y:M+T*E+i,r:E}}function Bo(t,n,e){var r=t.x,i=t.y,o=n.r+e.r,u=t.r+e.r,a=n.x-r,c=n.y-i,s=a*a+c*c;if(s){var f=.5+((u*=u)-(o*=o))/(2*s),l=Math.sqrt(Math.max(0,2*o*(u+s)-(u-=s)*u-o*o))/(2*s);e.x=r+f*a+l*c,e.y=i+f*c-l*a}else e.x=r+u,e.y=i}function jo(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i-1e-6>e*e+r*r}function Ho(t,n,e){var r=t._,i=t.next._,o=r.r+i.r,u=(r.x*i.r+i.x*r.r)/o-n,a=(r.y*i.r+i.y*r.r)/o-e;return u*u+a*a}function Xo(t){this._=t,this.next=null,this.previous=null}function Vo(t){if(!(i=t.length))return 0;var n,e,r,i;if(n=t[0],n.x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Bo(e,n,r=t[2]);var o,u,a,c,s,f,l,h=n.r*n.r,p=e.r*e.r,d=r.r*r.r,v=h+p+d,_=h*n.x+p*e.x+d*r.x,g=h*n.y+p*e.y+d*r.y;n=new Xo(n),e=new Xo(e),r=new Xo(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a<i;++a){Bo(n._,e._,r=t[a]),r=new Xo(r),c=e.next,s=n.previous,f=e._.r,l=n._.r;do{if(f<=l){if(jo(c._,r._)){e=c,n.next=e,e.previous=n,--a;continue t}f+=c._.r,c=c.next}else{if(jo(s._,r._)){n=s,n.next=e,e.previous=n,--a;continue t}l+=s._.r,s=s.previous}}while(c!==s.next);for(r.previous=n,r.next=e,n.next=e.previous=e=r,v+=d=r._.r*r._.r,_+=d*r._.x,g+=d*r._.y,h=Ho(n,o=_/v,u=g/v);(r=r.next)!==e;)(d=Ho(r,o,u))<h&&(n=r,h=d);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=Uy(n),a=0;a<i;++a)n=t[a],n.x-=r.x,n.y-=r.y;return r.r}function $o(t){return null==t?null:Wo(t)}function Wo(t){if("function"!=typeof t)throw new Error;return t}function Zo(){return 0}function Go(t){return Math.sqrt(t.value)}function Jo(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function Qo(t,n){return function(e){if(r=e.children){var r,i,o,u=r.length,a=t(e)*n||0;if(a)for(i=0;i<u;++i)r[i].r+=a;if(o=Vo(r),a)for(i=0;i<u;++i)r[i].r-=a;e.r=o+a}}}function Ko(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function tu(t){return t.id}function nu(t){return t.parentId}function eu(t,n){return t.parent===n.parent?1:2}function ru(t){var n=t.children;return n?n[0]:t.t}function iu(t){var n=t.children;return n?n[n.length-1]:t.t}function ou(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function uu(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)n=i[o],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function au(t,n,e){return t.a.parent===n.parent?t.a:e}function cu(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function su(t){for(var n,e,r,i,o,u=new cu(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(e=n.children[i]=new cu(r[i],i)),e.parent=n;return(u.parent=new cu(null,0)).children=[u],u}function fu(t,n,e,r,i,o){for(var u,a,c,s,f,l,h,p,d,v,_,g=[],y=n.children,m=0,x=0,b=y.length,w=n.value;m<b;){c=i-e,s=o-r;do{f=y[x++].value}while(!f&&x<b);for(l=h=f,v=Math.max(s/c,c/s)/(w*t),_=f*f*v,d=Math.max(h/_,_/l);x<b;++x){if(f+=a=y[x].value,a<l&&(l=a),a>h&&(h=a),_=f*f*v,(p=Math.max(h/_,_/l))>d){f-=a;break}d=p}g.push(u={value:f,dice:c<s,children:y.slice(m,x)}),u.dice?Yy(u,e,r,i,w?r+=s*f/w:o):Wy(u,e,r,w?e+=c*f/w:i,o),w-=f,m=x}return g}function lu(t,n){return t[0]-n[0]||t[1]-n[1]}function hu(t){for(var n=t.length,e=[0,1],r=2,i=2;i<n;++i){for(;r>1&&rm(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function pu(t){if(!(t>=1))throw new Error;this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function du(t){if(!t._start)try{vu(t)}catch(n){if(t._tasks[t._ended+t._active-1])gu(t,n);else if(!t._data)throw n}}function vu(t){for(;t._start=t._waiting&&t._active<t._size;){var n=t._ended+t._active,e=t._tasks[n],r=e.length-1,i=e[r];e[r]=_u(t,n),--t._waiting,++t._active,e=i.apply(null,e),t._tasks[n]&&(t._tasks[n]=e||cm)}}function _u(t,n){return function(e,r){t._tasks[n]&&(--t._active,++t._ended,t._tasks[n]=null,null==t._error&&(null!=e?gu(t,e):(t._data[n]=r,t._waiting?du(t):yu(t))))}}function gu(t,n){var e,r=t._tasks.length;for(t._error=n,t._data=void 0,t._waiting=NaN;--r>=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,yu(t)}function yu(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function mu(t){return new pu(arguments.length?+t:1/0)}function xu(t){return function(n,e){t(null==n?e:null)}}function bu(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function wu(t,n){return function(e){return t(e.responseText,n)}}function Mu(t){function n(n){var o=n+"",u=e.get(o);if(!u){if(i!==km)return i;e.set(o,u=r.push(n))}return t[(u-1)%t.length]}var e=Be(),r=[],i=km;return t=null==t?[]:Nm.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=Be();for(var i,o,u=-1,a=t.length;++u<a;)e.has(o=(i=t[u])+"")||e.set(o,r.push(i));return n},n.range=function(e){return arguments.length?(t=Nm.call(e),n):t.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return Mu().domain(r).range(t).unknown(i)},n}function Tu(){function t(){var t=i().length,r=u[1]<u[0],l=u[r-0],h=u[1-r];n=(h-l)/Math.max(1,t-c+2*s),a&&(n=Math.floor(n)),l+=(h-l-n*(t-c))*f,e=n*(1-c),a&&(l=Math.round(l),e=Math.round(e));var p=Js(t).map(function(t){return l+n*t});return o(r?p.reverse():p)}var n,e,r=Mu().unknown(void 0),i=r.domain,o=r.range,u=[0,1],a=!1,c=0,s=0,f=.5;return delete r.unknown,r.domain=function(n){return arguments.length?(i(n),t()):i()},r.range=function(n){return arguments.length?(u=[+n[0],+n[1]],t()):u.slice()},r.rangeRound=function(n){return u=[+n[0],+n[1]],a=!0,t()},r.bandwidth=function(){return e},r.step=function(){return n},r.round=function(n){return arguments.length?(a=!!n,t()):a},r.padding=function(n){return arguments.length?(c=s=Math.max(0,Math.min(1,n)),t()):c},r.paddingInner=function(n){return arguments.length?(c=Math.max(0,Math.min(1,n)),t()):c},r.paddingOuter=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),t()):s},r.align=function(n){return arguments.length?(f=Math.max(0,Math.min(1,n)),t()):f},r.copy=function(){return Tu().domain(i()).range(u).round(a).paddingInner(c).paddingOuter(s).align(f)},t()}function Su(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Su(n())},t}function Nu(){return Su(Tu().paddingInner(1))}function ku(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:Em(n)}function Eu(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}function Au(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}function Cu(t,n,e,r){var i=t[0],o=t[1],u=n[0],a=n[1];return o<i?(i=e(o,i),u=r(a,u)):(i=e(i,o),u=r(u,a)),function(t){return u(i(t))}}function zu(t,n,e,r){var i=Math.min(t.length,n.length)-1,o=new Array(i),u=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<i;)o[a]=e(t[a],t[a+1]),u[a]=r(n[a],n[a+1]);return function(n){var e=Ds(t,n,1,i)-1;return u[e](o[e](n))}}function Pu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function Lu(t,n){function e(){return i=Math.min(a.length,c.length)>2?zu:Cu,o=u=null,r}function r(n){return(o||(o=i(a,c,f?Eu(t):t,s)))(+n)}var i,o,u,a=Cm,c=Cm,s=Sh,f=!1;return r.invert=function(t){return(u||(u=i(c,a,ku,f?Au(n):n)))(+t)},r.domain=function(t){return arguments.length?(a=Sm.call(t,Am),e()):a.slice()},r.range=function(t){return arguments.length?(c=Nm.call(t),e()):c.slice()},r.rangeRound=function(t){return c=Nm.call(t),s=Nh,e()},r.clamp=function(t){return arguments.length?(f=!!t,e()):f},r.interpolate=function(t){return arguments.length?(s=t,e()):s},e()}function Ru(t){var n=t.domain;return t.ticks=function(t){var e=n();return nf(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return zm(n(),t,e)},t.nice=function(e){var r=n(),o=r.length-1,u=null==e?10:e,a=r[0],c=r[o],s=i(a,c,u);return s&&(s=i(Math.floor(a/s)*s,Math.ceil(c/s)*s,u),r[0]=Math.floor(a/s)*s,r[o]=Math.ceil(c/s)*s,n(r)),t},t}function qu(){var t=Lu(ku,xh);return t.copy=function(){return Pu(t,qu())},Ru(t)}function Uu(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=Sm.call(e,Am),t):n.slice()},t.copy=function(){return Uu().domain(n)},Ru(t)}function Du(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:Em(n)}function Ou(t,n){return t<0?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function Fu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Iu(t){return 10===t?Fu:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function Yu(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function Bu(t){return function(n){return-t(-n)}}function ju(){function n(){return o=Yu(i),u=Iu(i),r()[0]<0&&(o=Bu(o),u=Bu(u)),e}var e=Lu(Du,Ou).domain([1,10]),r=e.domain,i=10,o=Yu(10),u=Iu(10);return e.base=function(t){return arguments.length?(i=+t,n()):i},e.domain=function(t){return arguments.length?(r(t),n()):r()},e.ticks=function(t){var n,e=r(),a=e[0],c=e[e.length-1];(n=c<a)&&(h=a,a=c,c=h);var s,f,l,h=o(a),p=o(c),d=null==t?10:+t,v=[];if(!(i%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,a>0){for(;h<p;++h)for(f=1,s=u(h);f<i;++f)if(!((l=s*f)<a)){if(l>c)break;v.push(l)}}else for(;h<p;++h)for(f=i-1,s=u(h);f>=1;--f)if(!((l=s*f)<a)){if(l>c)break;v.push(l)}}else v=nf(h,p,Math.min(p-h,d)).map(u);return n?v.reverse():v},e.tickFormat=function(n,r){if(null==r&&(r=10===i?".0e":","),"function"!=typeof r&&(r=t.format(r)),n===1/0)return r;null==n&&(n=10);var a=Math.max(1,i*n/e.ticks().length);return function(t){var n=t/u(Math.round(o(t)));return n*i<i-.5&&(n*=i),n<=a?r(t):""}},e.nice=function(){return r(Pm(r(),{floor:function(t){return u(Math.floor(o(t)))},ceil:function(t){return u(Math.ceil(o(t)))}}))},e.copy=function(){return Pu(e,ju().base(i))},e}function Hu(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function Xu(){function t(t,n){return(n=Hu(n,e)-(t=Hu(t,e)))?function(r){return(Hu(r,e)-t)/n}:Em(n)}function n(t,n){return n=Hu(n,e)-(t=Hu(t,e)),function(r){return Hu(t+n*r,1/e)}}var e=1,r=Lu(t,n),i=r.domain;return r.exponent=function(t){return arguments.length?(e=+t,i(i())):e},r.copy=function(){return Pu(r,Xu().exponent(e))},Ru(r)}function Vu(){return Xu().exponent(.5)}function $u(){function t(){var t=0,o=Math.max(1,r.length);for(i=new Array(o-1);++t<o;)i[t-1]=of(e,t/o);return n}function n(t){if(!isNaN(t=+t))return r[Ds(i,t)]}var e=[],r=[],i=[];return n.invertExtent=function(t){var n=r.indexOf(t);return n<0?[NaN,NaN]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},n.domain=function(n){if(!arguments.length)return e.slice();e=[];for(var r,i=0,o=n.length;i<o;++i)null==(r=n[i])||isNaN(r=+r)||e.push(r);return e.sort(Rs),t()},n.range=function(n){return arguments.length?(r=Nm.call(n),t()):r.slice()},n.quantiles=function(){return i.slice()},n.copy=function(){return $u().domain(e).range(r)},n}function Wu(){function t(t){if(t<=t)return u[Ds(o,t,0,i)]}function n(){var n=-1;for(o=new Array(i);++n<i;)o[n]=((n+1)*r-(n-i)*e)/(i+1);return t}var e=0,r=1,i=1,o=[.5],u=[0,1];return t.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n()):[e,r]},t.range=function(t){return arguments.length?(i=(u=Nm.call(t)).length-1,n()):u.slice()},t.invertExtent=function(t){var n=u.indexOf(t);return n<0?[NaN,NaN]:n<1?[e,o[0]]:n>=i?[o[i-1],r]:[o[n-1],o[n]]},t.copy=function(){return Wu().domain([e,r]).range(u)},Ru(t)}function Zu(){function t(t){if(t<=t)return e[Ds(n,t,0,r)]}var n=[.5],e=[0,1],r=1;return t.domain=function(i){return arguments.length?(n=Nm.call(i),r=Math.min(n.length,e.length-1),t):n.slice()},t.range=function(i){return arguments.length?(e=Nm.call(i),r=Math.min(n.length,e.length-1),t):e.slice()},t.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},t.copy=function(){return Zu().domain(n).range(e)},t}function Gu(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var u=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return u;do{u.push(new Date(+e))}while(n(e,o),t(e),e<r);return u},i.filter=function(e){return Gu(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return Lm.setTime(+n),Rm.setTime(+r),t(Lm),t(Rm),Math.floor(e(Lm,Rm))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}function Ju(t){return Gu(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Dm)/Om})}function Qu(t){return Gu(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/Om})}function Ku(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ta(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function na(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function ea(t){function n(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(c,a)),null!=(i=Ux[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),u.push(r),c=a+1);return u.push(t.slice(c,a)),u.join("")}}function e(t,n){return function(e){var i=na(1900)
-;if(r(i,t,e+="",0)!=e.length)return null;if("p"in i&&(i.H=i.H%12+12*i.p),"W"in i||"U"in i){"w"in i||(i.w="W"in i?1:0);var o="Z"in i?ta(na(i.y)).getUTCDay():n(na(i.y)).getDay();i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7}return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,ta(i)):n(i)}}function r(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u<a;){if(r>=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=B[i in Ux?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=C.exec(n.slice(e));return r?(t.p=z[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=R.exec(n.slice(e));return r?(t.w=q[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=P.exec(n.slice(e));return r?(t.w=L[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=O.exec(n.slice(e));return r?(t.m=F[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){var r=U.exec(n.slice(e));return r?(t.m=D[r[0].toLowerCase()],e+r[0].length):-1}function s(t,n,e){return r(t,w,n,e)}function f(t,n,e){return r(t,M,n,e)}function l(t,n,e){return r(t,T,n,e)}function h(t){return k[t.getDay()]}function p(t){return N[t.getDay()]}function d(t){return A[t.getMonth()]}function v(t){return E[t.getMonth()]}function _(t){return S[+(t.getHours()>=12)]}function g(t){return k[t.getUTCDay()]}function y(t){return N[t.getUTCDay()]}function m(t){return A[t.getUTCMonth()]}function x(t){return E[t.getUTCMonth()]}function b(t){return S[+(t.getUTCHours()>=12)]}var w=t.dateTime,M=t.date,T=t.time,S=t.periods,N=t.days,k=t.shortDays,E=t.months,A=t.shortMonths,C=oa(S),z=ua(S),P=oa(N),L=ua(N),R=oa(k),q=ua(k),U=oa(E),D=ua(E),O=oa(A),F=ua(A),I={a:h,A:p,b:d,B:v,c:null,d:ba,e:ba,H:wa,I:Ma,j:Ta,L:Sa,m:Na,M:ka,p:_,S:Ea,U:Aa,w:Ca,W:za,x:null,X:null,y:Pa,Y:La,Z:Ra,"%":Za},Y={a:g,A:y,b:m,B:x,c:null,d:qa,e:qa,H:Ua,I:Da,j:Oa,L:Fa,m:Ia,M:Ya,p:b,S:Ba,U:ja,w:Ha,W:Xa,x:null,X:null,y:Va,Y:$a,Z:Wa,"%":Za},B={a:o,A:u,b:a,B:c,c:s,d:da,e:da,H:_a,I:_a,j:va,L:ma,m:pa,M:ga,p:i,S:ya,U:ca,w:aa,W:sa,x:f,X:l,y:la,Y:fa,Z:ha,"%":xa};return I.x=n(M,I),I.X=n(T,I),I.c=n(w,I),Y.x=n(M,Y),Y.X=n(T,Y),Y.c=n(w,Y),{format:function(t){var e=n(t+="",I);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",Ku);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",Y);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,ta);return n.toString=function(){return t},n}}}function ra(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function ia(t){return t.replace(Fx,"\\$&")}function oa(t){return new RegExp("^(?:"+t.map(ia).join("|")+")","i")}function ua(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function aa(t,n,e){var r=Dx.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function ca(t,n,e){var r=Dx.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function sa(t,n,e){var r=Dx.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function fa(t,n,e){var r=Dx.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function la(t,n,e){var r=Dx.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function ha(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function pa(t,n,e){var r=Dx.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function da(t,n,e){var r=Dx.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function va(t,n,e){var r=Dx.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function _a(t,n,e){var r=Dx.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ga(t,n,e){var r=Dx.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ya(t,n,e){var r=Dx.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function ma(t,n,e){var r=Dx.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function xa(t,n,e){var r=Ox.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ba(t,n){return ra(t.getDate(),n,2)}function wa(t,n){return ra(t.getHours(),n,2)}function Ma(t,n){return ra(t.getHours()%12||12,n,2)}function Ta(t,n){return ra(1+Xm.count(sx(t),t),n,3)}function Sa(t,n){return ra(t.getMilliseconds(),n,3)}function Na(t,n){return ra(t.getMonth()+1,n,2)}function ka(t,n){return ra(t.getMinutes(),n,2)}function Ea(t,n){return ra(t.getSeconds(),n,2)}function Aa(t,n){return ra($m.count(sx(t),t),n,2)}function Ca(t){return t.getDay()}function za(t,n){return ra(Wm.count(sx(t),t),n,2)}function Pa(t,n){return ra(t.getFullYear()%100,n,2)}function La(t,n){return ra(t.getFullYear()%1e4,n,4)}function Ra(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+ra(n/60|0,"0",2)+ra(n%60,"0",2)}function qa(t,n){return ra(t.getUTCDate(),n,2)}function Ua(t,n){return ra(t.getUTCHours(),n,2)}function Da(t,n){return ra(t.getUTCHours()%12||12,n,2)}function Oa(t,n){return ra(1+vx.count(Lx(t),t),n,3)}function Fa(t,n){return ra(t.getUTCMilliseconds(),n,3)}function Ia(t,n){return ra(t.getUTCMonth()+1,n,2)}function Ya(t,n){return ra(t.getUTCMinutes(),n,2)}function Ba(t,n){return ra(t.getUTCSeconds(),n,2)}function ja(t,n){return ra(gx.count(Lx(t),t),n,2)}function Ha(t){return t.getUTCDay()}function Xa(t,n){return ra(yx.count(Lx(t),t),n,2)}function Va(t,n){return ra(t.getUTCFullYear()%100,n,2)}function $a(t,n){return ra(t.getUTCFullYear()%1e4,n,4)}function Wa(){return"+0000"}function Za(){return"%"}function Ga(n){return Rx=ea(n),t.timeFormat=Rx.format,t.timeParse=Rx.parse,t.utcFormat=Rx.utcFormat,t.utcParse=Rx.utcParse,Rx}function Ja(t){return t.toISOString()}function Qa(t){var n=new Date(t);return isNaN(n)?null:n}function Ka(t){return new Date(t)}function tc(t){return t instanceof Date?+t:+new Date(+t)}function nc(t,n,e,r,o,u,a,c,s){function f(i){return(a(i)<i?v:u(i)<i?_:o(i)<i?g:r(i)<i?y:n(i)<i?e(i)<i?m:x:t(i)<i?b:w)(i)}function l(n,e,r,o){if(null==n&&(n=10),"number"==typeof n){var u=Math.abs(r-e)/n,a=qs(function(t){return t[2]}).right(M,u);a===M.length?(o=i(e/Wx,r/Wx,n),n=t):a?(a=M[u/M[a-1][2]<M[a][2]/u?a-1:a],o=a[1],n=a[0]):(o=i(e,r,n),n=c)}return null==o?n:n.every(o)}var h=Lu(ku,xh),p=h.invert,d=h.domain,v=s(".%L"),_=s(":%S"),g=s("%I:%M"),y=s("%I %p"),m=s("%a %d"),x=s("%b %d"),b=s("%B"),w=s("%Y"),M=[[a,1,Bx],[a,5,5*Bx],[a,15,15*Bx],[a,30,30*Bx],[u,1,jx],[u,5,5*jx],[u,15,15*jx],[u,30,30*jx],[o,1,Hx],[o,3,3*Hx],[o,6,6*Hx],[o,12,12*Hx],[r,1,Xx],[r,2,2*Xx],[e,1,Vx],[n,1,$x],[n,3,3*$x],[t,1,Wx]];return h.invert=function(t){return new Date(p(t))},h.domain=function(t){return arguments.length?d(Sm.call(t,tc)):d().map(Ka)},h.ticks=function(t,n){var e,r=d(),i=r[0],o=r[r.length-1],u=o<i;return u&&(e=i,i=o,o=e),e=l(t,i,o,n),e=e?e.range(i,o+1):[],u?e.reverse():e},h.tickFormat=function(t,n){return null==n?f:s(n)},h.nice=function(t,n){var e=d();return(t=l(t,e[0],e[e.length-1],n))?d(Pm(e,t)):h},h.copy=function(){return Pu(h,nc(t,n,e,r,o,u,a,c,s))},h}function ec(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function rc(t){function n(n){var o=(n-e)/(r-e);return t(i?Math.max(0,Math.min(1,o)):o)}var e=0,r=1,i=!1;return n.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n):[e,r]},n.clamp=function(t){return arguments.length?(i=!!t,n):i},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return rc(t).domain([e,r]).clamp(i)},Ru(n)}function ic(t){return t>1?0:t<-1?xb:Math.acos(t)}function oc(t){return t>=1?bb:t<=-1?-bb:Math.asin(t)}function uc(t){return t.innerRadius}function ac(t){return t.outerRadius}function cc(t){return t.startAngle}function sc(t){return t.endAngle}function fc(t){return t&&t.padAngle}function lc(t,n,e,r,i,o,u,a){var c=e-t,s=r-n,f=u-i,l=a-o,h=(f*(n-o)-l*(t-i))/(l*c-f*s);return[t+h*c,n+h*s]}function hc(t,n,e,r,i,o,u){var a=t-e,c=n-r,s=(u?o:-o)/yb(a*a+c*c),f=s*c,l=-s*a,h=t+f,p=n+l,d=e+f,v=r+l,_=(h+d)/2,g=(p+v)/2,y=d-h,m=v-p,x=y*y+m*m,b=i-o,w=h*v-d*p,M=(m<0?-1:1)*yb(vb(0,b*b*x-w*w)),T=(w*m-y*M)/x,S=(-w*y-m*M)/x,N=(w*m+y*M)/x,k=(-w*y+m*M)/x,E=T-_,A=S-g,C=N-_,z=k-g;return E*E+A*A>C*C+z*z&&(T=N,S=k),{cx:T,cy:S,x01:-f,y01:-l,x11:T*(i/b-1),y11:S*(i/b-1)}}function pc(t){this._context=t}function dc(t){return t[0]}function vc(t){return t[1]}function _c(t){this._curve=t}function gc(t){function n(n){return new _c(t(n))}return n._curve=t,n}function yc(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(gc(t)):n()._curve},t}function mc(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function xc(t){this._context=t}function bc(t){this._context=t}function wc(t){this._context=t}function Mc(t,n){this._basis=new xc(t),this._beta=n}function Tc(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Sc(t,n){this._context=t,this._k=(1-n)/6}function Nc(t,n){this._context=t,this._k=(1-n)/6}function kc(t,n){this._context=t,this._k=(1-n)/6}function Ec(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>mb){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>mb){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,u=(u*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Ac(t,n){this._context=t,this._alpha=n}function Cc(t,n){this._context=t,this._alpha=n}function zc(t,n){this._context=t,this._alpha=n}function Pc(t){this._context=t}function Lc(t){return t<0?-1:1}function Rc(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(Lc(o)+Lc(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function qc(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Uc(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function Dc(t){this._context=t}function Oc(t){this._context=new Fc(t)}function Fc(t){this._context=t}function Ic(t){return new Dc(t)}function Yc(t){return new Oc(t)}function Bc(t){this._context=t}function jc(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,u[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,u[n]-=e*u[n-1];for(i[r-1]=u[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function Hc(t,n){this._context=t,this._t=n}function Xc(t){return new Hc(t,0)}function Vc(t){return new Hc(t,1)}function $c(t,n){return t[n]}function Wc(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}function Zc(t){return t[0]}function Gc(t){return t[1]}function Jc(){this._=null}function Qc(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Kc(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ts(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ns(t){for(;t.L;)t=t.L;return t}function es(t,n,e,r){var i=[null,null],o=Ew.push(i)-1;return i.left=t,i.right=n,e&&is(i,t,n,e),r&&is(i,n,t,r),Nw[t.index].halfedges.push(o),Nw[n.index].halfedges.push(o),i}function rs(t,n,e){var r=[n,e];return r.left=t,r}function is(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function os(t,n,e,r,i){var o,u=t[0],a=t[1],c=u[0],s=u[1],f=a[0],l=a[1],h=0,p=1,d=f-c,v=l-s;if(o=n-c,d||!(o>0)){if(o/=d,d<0){if(o<h)return;o<p&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=r-c,d||!(o<0)){if(o/=d,d<0){if(o>p)return;o>h&&(h=o)}else if(d>0){if(o<h)return;o<p&&(p=o)}if(o=e-s,v||!(o>0)){if(o/=v,v<0){if(o<h)return;o<p&&(p=o)}else if(v>0){if(o>p)return;o>h&&(h=o)}if(o=i-s,v||!(o<0)){if(o/=v,v<0){if(o>p)return;o>h&&(h=o)}else if(v>0){if(o<h)return;o<p&&(p=o)}return!(h>0||p<1)||(h>0&&(t[0]=[c+h*d,s+h*v]),p<1&&(t[1]=[c+p*d,s+p*v]),!0)}}}}}function us(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],s=t.left,f=t.right,l=s[0],h=s[1],p=f[0],d=f[1],v=(l+p)/2,_=(h+d)/2;if(d===h){if(v<n||v>=r)return;if(l>p){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]<e)return}else c=[v,i];o=[v,e]}}else if(u=(l-p)/(d-h),a=_-u*v,u<-1||u>1)if(l>p){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]<e)return}else c=[(i-a)/u,i];o=[(e-a)/u,e]}else if(h<d){if(c){if(c[0]>=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]<n)return}else c=[r,u*r+a];o=[n,u*n+a]}return t[0]=c,t[1]=o,!0}function as(t,n,e,r){for(var i,o=Ew.length;o--;)us(i=Ew[o],t,n,e,r)&&os(i,t,n,e,r)&&(Math.abs(i[0][0]-i[1][0])>zw||Math.abs(i[0][1]-i[1][1])>zw)||delete Ew[o]}function cs(t){return Nw[t.index]={site:t,halfedges:[]}}function ss(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function fs(t,n){return n[+(n.left!==t.site)]}function ls(t,n){return n[+(n.left===t.site)]}function hs(){for(var t,n,e,r,i=0,o=Nw.length;i<o;++i)if((t=Nw[i])&&(r=(n=t.halfedges).length)){var u=new Array(r),a=new Array(r);for(e=0;e<r;++e)u[e]=e,a[e]=ss(t,Ew[n[e]]);for(u.sort(function(t,n){return a[n]-a[t]}),e=0;e<r;++e)a[e]=n[u[e]];for(e=0;e<r;++e)n[e]=a[e]}}function ps(t,n,e,r){var i,o,u,a,c,s,f,l,h,p,d,v,_=Nw.length,g=!0;for(i=0;i<_;++i)if(o=Nw[i]){for(u=o.site,c=o.halfedges,a=c.length;a--;)Ew[c[a]]||c.splice(a,1);for(a=0,s=c.length;a<s;)p=ls(o,Ew[c[a]]),d=p[0],v=p[1],f=fs(o,Ew[c[++a%s]]),l=f[0],h=f[1],(Math.abs(d-l)>zw||Math.abs(v-h)>zw)&&(c.splice(a,0,Ew.push(rs(u,p,Math.abs(d-t)<zw&&r-v>zw?[t,Math.abs(l-t)<zw?h:r]:Math.abs(v-r)<zw&&e-d>zw?[Math.abs(h-r)<zw?l:e,r]:Math.abs(d-e)<zw&&v-n>zw?[e,Math.abs(l-e)<zw?h:n]:Math.abs(v-n)<zw&&d-t>zw?[Math.abs(h-n)<zw?l:t,n]:null))-1),++s);s&&(g=!1)}if(g){var y,m,x,b=1/0;for(i=0,g=null;i<_;++i)(o=Nw[i])&&(u=o.site,y=u[0]-t,m=u[1]-n,(x=y*y+m*m)<b&&(b=x,g=o));if(g){var w=[t,n],M=[t,r],T=[e,r],S=[e,n];g.halfedges.push(Ew.push(rs(u=g.site,w,M))-1,Ew.push(rs(u,M,T))-1,Ew.push(rs(u,T,S))-1,Ew.push(rs(u,S,w))-1)}}for(i=0;i<_;++i)(o=Nw[i])&&(o.halfedges.length||delete Nw[i])}function ds(){Qc(this),this.x=this.y=this.arc=this.site=this.cy=null}function vs(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var u=i[0],a=i[1],c=r[0]-u,s=r[1]-a,f=o[0]-u,l=o[1]-a,h=2*(c*l-s*f);if(!(h>=-Pw)){var p=c*c+s*s,d=f*f+l*l,v=(l*p-s*d)/h,_=(c*d-f*p)/h,g=Aw.pop()||new ds;g.arc=t,g.site=i,g.x=v+u,g.y=(g.cy=_+a)+Math.sqrt(v*v+_*_),t.circle=g;for(var y=null,m=kw._;m;)if(g.y<m.y||g.y===m.y&&g.x<=m.x){if(!m.L){y=m.P;break}m=m.L}else{if(!m.R){y=m;break}m=m.R}kw.insert(y,g),y||(Tw=g)}}}}function _s(t){var n=t.circle;n&&(n.P||(Tw=n.N),kw.remove(n),Aw.push(n),Qc(n),t.circle=null)}function gs(){Qc(this),this.edge=this.site=this.circle=null}function ys(t){var n=Cw.pop()||new gs;return n.site=t,n}function ms(t){_s(t),Sw.remove(t),Cw.push(t),Qc(t)}function xs(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],o=t.P,u=t.N,a=[t];ms(t);for(var c=o;c.circle&&Math.abs(e-c.circle.x)<zw&&Math.abs(r-c.circle.cy)<zw;)o=c.P,a.unshift(c),ms(c),c=o;a.unshift(c),_s(c);for(var s=u;s.circle&&Math.abs(e-s.circle.x)<zw&&Math.abs(r-s.circle.cy)<zw;)u=s.N,a.push(s),ms(s),s=u;a.push(s),_s(s);var f,l=a.length;for(f=1;f<l;++f)s=a[f],c=a[f-1],is(s.edge,c.site,s.site,i);c=a[0],s=a[l-1],s.edge=es(c.site,s.site,null,i),vs(c),vs(s)}function bs(t){for(var n,e,r,i,o=t[0],u=t[1],a=Sw._;a;)if((r=ws(a,u)-o)>zw)a=a.L;else{if(!((i=o-Ms(a,u))>zw)){r>-zw?(n=a.P,e=a):i>-zw?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}cs(t);var c=ys(t);if(Sw.insert(n,c),n||e){if(n===e)return _s(n),e=ys(n.site),Sw.insert(c,e),c.edge=e.edge=es(n.site,c.site),vs(n),void vs(e);if(!e)return void(c.edge=es(n.site,c.site));_s(n),_s(e);var s=n.site,f=s[0],l=s[1],h=t[0]-f,p=t[1]-l,d=e.site,v=d[0]-f,_=d[1]-l,g=2*(h*_-p*v),y=h*h+p*p,m=v*v+_*_,x=[(_*y-p*m)/g+f,(h*m-v*y)/g+l];is(e.edge,s,d,x),c.edge=es(s,t,null,x),e.edge=es(t,d,null,x),vs(n),vs(e)}}function ws(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;e=u.site;var a=e[0],c=e[1],s=c-n;if(!s)return a;var f=a-r,l=1/o-1/s,h=f/s;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*s)-c+s/2+i-o/2)))/l+r:(r+a)/2}function Ms(t,n){var e=t.N;if(e)return ws(e,n);var r=t.site;return r[1]===n?r[0]:1/0}function Ts(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function Ss(t,n){return n[1]-t[1]||n[0]-t[0]}function Ns(t,n){var e,r,i,o=t.sort(Ss).pop();for(Ew=[],Nw=new Array(t.length),Sw=new Jc,kw=new Jc;;)if(i=Tw,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===e&&o[1]===r||(bs(o),e=o[0],r=o[1]),o=t.pop();else{if(!i)break;xs(i.arc)}if(hs(),n){var u=+n[0][0],a=+n[0][1],c=+n[1][0],s=+n[1][1];as(u,a,c,s),ps(u,a,c,s)}this.edges=Ew,this.cells=Nw,Sw=kw=Ew=Nw=null}function ks(t,n,e){this.target=t,this.type=n,this.transform=e}function Es(t,n,e){this.k=t,this.x=n,this.y=e}function As(t){return t.__zoom||qw}function Cs(){t.event.stopImmediatePropagation()}function zs(){return!t.event.button}function Ps(){var t,n,e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,t=e.width.baseVal.value,n=e.height.baseVal.value):(t=e.clientWidth,n=e.clientHeight),[[0,0],[t,n]]}function Ls(){return this.__zoom||qw}var Rs=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},qs=function(t){return 1===t.length&&(t=n(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}},Us=qs(Rs),Ds=Us.right,Os=Us.left,Fs=function(t,n){null==n&&(n=e);for(var r=0,i=t.length-1,o=t[0],u=new Array(i<0?0:i);r<i;)u[r]=n(o,o=t[++r]);return u},Is=function(t,n,r){var i,o,u,a,c=t.length,s=n.length,f=new Array(c*s);for(null==r&&(r=e),i=u=0;i<c;++i)for(a=t[i],o=0;o<s;++o,++u)f[u]=r(a,n[o]);return f},Ys=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},Bs=function(t){return null===t?NaN:+t},js=function(t,n){var e,r,i=t.length,o=0,u=-1,a=0,c=0;if(null==n)for(;++u<i;)isNaN(e=Bs(t[u]))||(r=e-a,a+=r/++o,c+=r*(e-a));else for(;++u<i;)isNaN(e=Bs(n(t[u],u,t)))||(r=e-a,a+=r/++o,c+=r*(e-a));if(o>1)return c/(o-1)},Hs=function(t,n){var e=js(t,n);return e?Math.sqrt(e):e},Xs=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u<o;)if(null!=(e=t[u])&&e>=e)for(r=i=e;++u<o;)null!=(e=t[u])&&(r>e&&(r=e),i<e&&(i=e))}else for(;++u<o;)if(null!=(e=n(t[u],u,t))&&e>=e)for(r=i=e;++u<o;)null!=(e=n(t[u],u,t))&&(r>e&&(r=e),i<e&&(i=e));return[r,i]},Vs=Array.prototype,$s=Vs.slice,Ws=Vs.map,Zs=function(t){return function(){return t}},Gs=function(t){return t},Js=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o},Qs=Math.sqrt(50),Ks=Math.sqrt(10),tf=Math.sqrt(2),nf=function(t,n,e){var i,o,u,a=n<t,c=-1;if(a&&(i=t,t=n,n=i),0===(u=r(t,n,e))||!isFinite(u))return[];if(u>0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++c<i;)o[c]=(t+c)*u;else for(t=Math.floor(t*u),n=Math.ceil(n*u),o=new Array(i=Math.ceil(t-n+1));++c<i;)o[c]=(t-c)/u;return a&&o.reverse(),o},ef=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},rf=function(){function t(t){var o,u,a=t.length,c=new Array(a);for(o=0;o<a;++o)c[o]=n(t[o],o,t);var s=e(c),f=s[0],l=s[1],h=r(c,f,l);Array.isArray(h)||(h=i(f,l,h),h=Js(Math.ceil(f/h)*h,Math.floor(l/h)*h,h));for(var p=h.length;h[0]<=f;)h.shift(),--p;for(;h[p-1]>l;)h.pop(),--p;var d,v=new Array(p+1);for(o=0;o<=p;++o)d=v[o]=[],d.x0=o>0?h[o-1]:f,d.x1=o<p?h[o]:l;for(o=0;o<a;++o)u=c[o],f<=u&&u<=l&&v[Ds(h,u,0,p)].push(t[o]);return v}var n=Gs,e=Xs,r=ef;return t.value=function(e){return arguments.length?(n="function"==typeof e?e:Zs(e),t):n},t.domain=function(n){return arguments.length?(e="function"==typeof n?n:Zs([n[0],n[1]]),t):e},t.thresholds=function(n){return arguments.length?(r="function"==typeof n?n:Zs(Array.isArray(n)?$s.call(n):n),t):r},t},of=function(t,n,e){if(null==e&&(e=Bs),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}},uf=function(t,n,e){return t=Ws.call(t,Bs).sort(Rs),Math.ceil((e-n)/(2*(of(t,.75)-of(t,.25))*Math.pow(t.length,-1/3)))},af=function(t,n,e){return Math.ceil((e-n)/(3.5*Hs(t)*Math.pow(t.length,-1/3)))},cf=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r},sf=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o<r;)isNaN(e=Bs(t[o]))?--i:u+=e;else for(;++o<r;)isNaN(e=Bs(n(t[o],o,t)))?--i:u+=e;if(i)return u/i},ff=function(t,n){var e,r=t.length,i=-1,o=[];if(null==n)for(;++i<r;)isNaN(e=Bs(t[i]))||o.push(e);else for(;++i<r;)isNaN(e=Bs(n(t[i],i,t)))||o.push(e);return of(o.sort(Rs),.5)},lf=function(t){for(var n,e,r,i=t.length,o=-1,u=0;++o<i;)u+=t[o].length;for(e=new Array(u);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--u]=r[n];return e},hf=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&r>e&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&r>e&&(r=e);return r},pf=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},df=function(t,n){if(e=t.length){var e,r,i=0,o=0,u=t[o];for(null==n&&(n=Rs);++i<e;)(n(r=t[i],u)<0||0!==n(u,u))&&(u=r,o=i);return 0===n(u,u)?o:void 0}},vf=function(t,n,e){for(var r,i,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},_f=function(t,n){var e,r=t.length,i=-1,o=0;if(null==n)for(;++i<r;)(e=+t[i])&&(o+=e);else for(;++i<r;)(e=+n(t[i],i,t))&&(o+=e);return o},gf=function(t){if(!(i=t.length))return[];for(var n=-1,e=hf(t,o),r=new Array(e);++n<e;)for(var i,u=-1,a=r[n]=new Array(i);++u<i;)a[u]=t[u][n];return r},yf=function(){return gf(arguments)},mf=Array.prototype.slice,xf=function(t){return t},bf=1,wf=2,Mf=3,Tf=4,Sf=1e-6,Nf={value:function(){}};_.prototype=v.prototype={constructor:_,on:function(t,n){var e,r=this._,i=g(t+"",r),o=-1,u=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=m(r[e],t.name,n);else if(null==n)for(e in r)r[e]=m(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=y(r[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new _(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],o=0,e=r.length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var kf="http://www.w3.org/1999/xhtml",Ef={svg:"http://www.w3.org/2000/svg",xhtml:kf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Af=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ef.hasOwnProperty(n)?{space:Ef[n],local:t}:t},Cf=function(t){var n=Af(t);return(n.local?b:x)(n)},zf=0;M.prototype=w.prototype={constructor:M,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Pf=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Lf=document.documentElement;if(!Lf.matches){var Rf=Lf.webkitMatchesSelector||Lf.msMatchesSelector||Lf.mozMatchesSelector||Lf.oMatchesSelector;Pf=function(t){return function(){return Rf.call(this,t)}}}}var qf=Pf,Uf={};if(t.event=null,"undefined"!=typeof document){"onmouseenter"in document.documentElement||(Uf={mouseenter:"mouseover",mouseleave:"mouseout"})}var Df=function(t,n,e){var r,i,o=N(t+""),u=o.length;{if(!(arguments.length<2)){for(a=n?E:k,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var c,s=0,f=a.length;s<f;++s)for(r=0,c=a[s];r<u;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value}},Of=function(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e},Ff=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},If=function(t){var n=Of();return n.changedTouches&&(n=n.changedTouches[0]),Ff(t,n)},Yf=function(t){return null==t?C:function(){return this.querySelector(t)}},Bf=function(t){"function"!=typeof t&&(t=Yf(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],c=a.length,s=r[i]=new Array(c),f=0;f<c;++f)(o=a[f])&&(u=t.call(o,o.__data__,f,a))&&("__data__"in o&&(u.__data__=o.__data__),s[f]=u);return new vt(r,this._parents)},jf=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},Hf=function(t){"function"!=typeof t&&(t=jf(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],c=a.length,s=0;s<c;++s)(u=a[s])&&(r.push(t.call(u,u.__data__,s,a)),i.push(u));return new vt(r,i)},Xf=function(t){"function"!=typeof t&&(t=qf(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,c=r[i]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&c.push(o);return new vt(r,this._parents)},Vf=function(t){return new Array(t.length)},$f=function(){return new vt(this._enter||this._groups.map(Vf),this._parents)};P.prototype={constructor:P,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Wf=function(t){return function(){return t}},Zf="$",Gf=function(t,n){if(!t)return p=new Array(this.size()),s=-1,this.each(function(t){p[++s]=t}),p;var e=n?R:L,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Wf(t));for(var o=i.length,u=new Array(o),a=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],l=i[s],h=l.length,p=t.call(f,f&&f.__data__,s,r),d=p.length,v=a[s]=new Array(d),_=u[s]=new Array(d);e(f,l,v,_,c[s]=new Array(h),p,n);for(var g,y,m=0,x=0;m<d;++m)if(g=v[m]){for(m>=x&&(x=m+1);!(y=_[x])&&++x<d;);g._next=y||null}}return u=new vt(u,r),u._enter=a,u._exit=c,u},Jf=function(){return new vt(this._exit||this._groups.map(Vf),this._parents)},Qf=function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var c,s=n[a],f=e[a],l=s.length,h=u[a]=new Array(l),p=0;p<l;++p)(c=s[p]||f[p])&&(h[p]=c);for(;a<r;++a)u[a]=n[a];return new vt(u,this._parents)},Kf=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},tl=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=q);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],c=a.length,s=i[o]=new Array(c),f=0;f<c;++f)(u=a[f])&&(s[f]=u);s.sort(n)}return new vt(i,this._parents).order()},nl=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},el=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},rl=function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},il=function(){var t=0;return this.each(function(){++t}),t},ol=function(){return!this.node()},ul=function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},al=function(t,n){var e=Af(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?D:U:"function"==typeof n?e.local?Y:I:e.local?F:O)(e,n))},cl=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},sl=function(t,n,e){var r;return arguments.length>1?this.each((null==n?B:"function"==typeof n?H:j)(t,n,null==e?"":e)):cl(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},fl=function(t,n){return arguments.length>1?this.each((null==n?X:"function"==typeof n?$:V)(t,n)):this.node()[t]};G.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ll=function(t,n){var e=W(t+"");if(arguments.length<2){for(var r=Z(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?nt:n?K:tt)(e,n))},hl=function(t){return arguments.length?this.each(null==t?et:("function"==typeof t?it:rt)(t)):this.node().textContent},pl=function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?at:ut)(t)):this.node().innerHTML},dl=function(){return this.each(ct)},vl=function(){return this.each(st)},_l=function(t){var n="function"==typeof t?t:Cf(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},gl=function(t,n){var e="function"==typeof t?t:Cf(t),r=null==n?ft:"function"==typeof n?n:Yf(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},yl=function(){return this.each(lt)},ml=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},xl=function(t,n){return this.each(("function"==typeof n?dt:pt)(t,n))},bl=[null];vt.prototype=_t.prototype={constructor:vt,select:Bf,selectAll:Hf,filter:Xf,data:Gf,enter:$f,exit:Jf,merge:Qf,order:Kf,sort:tl,call:nl,nodes:el,node:rl,size:il,empty:ol,each:ul,attr:al,style:sl,property:fl,classed:ll,text:hl,html:pl,raise:dl,lower:vl,append:_l,insert:gl,remove:yl,datum:ml,on:Df,dispatch:xl};var wl=function(t){return"string"==typeof t?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],bl)},Ml=function(t){return"string"==typeof t?new vt([document.querySelectorAll(t)],[document.documentElement]):new vt([null==t?[]:t],bl)},Tl=function(t,n,e){arguments.length<3&&(e=n,n=Of().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return Ff(t,r);return null},Sl=function(t,n){null==n&&(n=Of().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=Ff(t,n[e]);return i},Nl=function(){t.event.preventDefault(),t.event.stopImmediatePropagation()},kl=function(t){var n=t.document.documentElement,e=wl(t).on("dragstart.drag",Nl,!0);"onselectstart"in n?e.on("selectstart.drag",Nl,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")},El=function(t){return function(){return t}};mt.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Al=function(){function n(t){t.on("mousedown.drag",e).on("touchstart.drag",o).on("touchmove.drag",u).on("touchend.drag touchcancel.drag",a).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!f&&l.apply(this,arguments)){var n=c("mouse",h.apply(this,arguments),If,this,arguments);n&&(wl(t.event.view).on("mousemove.drag",r,!0).on("mouseup.drag",i,!0),kl(t.event.view),gt(),s=!1,n("start"))}}function r(){Nl(),s=!0,d.mouse("drag")}function i(){
-wl(t.event.view).on("mousemove.drag mouseup.drag",null),yt(t.event.view,s),Nl(),d.mouse("end")}function o(){if(l.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=h.apply(this,arguments),o=r.length;for(n=0;n<o;++n)(e=c(r[n].identifier,i,Tl,this,arguments))&&(gt(),e("start"))}}function u(){var n,e,r=t.event.changedTouches,i=r.length;for(n=0;n<i;++n)(e=d[r[n].identifier])&&(Nl(),e("drag"))}function a(){var n,e,r=t.event.changedTouches,i=r.length;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),n=0;n<i;++n)(e=d[r[n].identifier])&&(gt(),e("end"))}function c(e,r,i,o,u){var a,c,s,f=i(r,e),l=_.copy();if(A(new mt(n,"beforestart",a,e,g,f[0],f[1],0,0,l),function(){return null!=(t.event.subject=a=p.apply(o,u))&&(c=a.x-f[0]||0,s=a.y-f[1]||0,!0)}))return function t(h){var p,v=f;switch(h){case"start":d[e]=t,p=g++;break;case"end":delete d[e],--g;case"drag":f=i(r,e),p=g}A(new mt(n,h,a,e,p,f[0]+c,f[1]+s,f[0]-v[0],f[1]-v[1],l),l.apply,l,[h,o,u])}}var s,f,l=xt,h=bt,p=wt,d={},_=v("start","drag","end"),g=0;return n.filter=function(t){return arguments.length?(l="function"==typeof t?t:El(!!t),n):l},n.container=function(t){return arguments.length?(h="function"==typeof t?t:El(t),n):h},n.subject=function(t){return arguments.length?(p="function"==typeof t?t:El(t),n):p},n.on=function(){var t=_.on.apply(_,arguments);return t===_?n:t},n},Cl=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},zl="\\s*([+-]?\\d+)\\s*",Pl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ll="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Rl=/^#([0-9a-f]{3})$/,ql=/^#([0-9a-f]{6})$/,Ul=new RegExp("^rgb\\("+[zl,zl,zl]+"\\)$"),Dl=new RegExp("^rgb\\("+[Ll,Ll,Ll]+"\\)$"),Ol=new RegExp("^rgba\\("+[zl,zl,zl,Pl]+"\\)$"),Fl=new RegExp("^rgba\\("+[Ll,Ll,Ll,Pl]+"\\)$"),Il=new RegExp("^hsl\\("+[Pl,Ll,Ll]+"\\)$"),Yl=new RegExp("^hsla\\("+[Pl,Ll,Ll,Pl]+"\\)$"),Bl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Cl(Tt,St,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Cl(Ct,At,Mt(Tt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ct(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ct(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Cl(Rt,Lt,Mt(Tt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Ct(qt(t>=240?t-240:t+120,i,r),qt(t,i,r),qt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var jl=Math.PI/180,Hl=180/Math.PI,Xl=.95047,Vl=1,$l=1.08883,Wl=4/29,Zl=6/29,Gl=3*Zl*Zl,Jl=Zl*Zl*Zl;Cl(Ot,Dt,Mt(Tt,{brighter:function(t){return new Ot(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ot(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=Vl*It(t),n=Xl*It(n),e=$l*It(e),new Ct(Yt(3.2404542*n-1.5371385*t-.4985314*e),Yt(-.969266*n+1.8760108*t+.041556*e),Yt(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Cl(Xt,Ht,Mt(Tt,{brighter:function(t){return new Xt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Xt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ut(this).rgb()}}));var Ql=-.14861,Kl=1.78277,th=-.29227,nh=-.90649,eh=1.97294,rh=eh*nh,ih=eh*Kl,oh=Kl*th-nh*Ql;Cl(Wt,$t,Mt(Tt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Wt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Wt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*jl,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Ct(255*(n+e*(Ql*r+Kl*i)),255*(n+e*(th*r+nh*i)),255*(n+e*(eh*r)),this.opacity)}}));var uh,ah,ch,sh,fh,lh,hh=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return Zt((e-r/n)*n,u,i,o,a)}},ph=function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return Zt((e-r/n)*n,i,o,u,a)}},dh=function(t){return function(){return t}},vh=function t(n){function e(t,n){var e=r((t=At(t)).r,(n=At(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),u=tn(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}var r=Kt(n);return e.gamma=t,e}(1),_h=nn(hh),gh=nn(ph),yh=function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(r),u=new Array(r);for(e=0;e<i;++e)o[e]=Sh(t[e],n[e]);for(;e<r;++e)u[e]=n[e];return function(t){for(e=0;e<i;++e)u[e]=o[e](t);return u}},mh=function(t,n){var e=new Date;return t=+t,n-=t,function(r){return e.setTime(t+n*r),e}},xh=function(t,n){return t=+t,n-=t,function(e){return t+n*e}},bh=function(t,n){var e,r={},i={};null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={});for(e in n)e in t?r[e]=Sh(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},wh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mh=new RegExp(wh.source,"g"),Th=function(t,n){var e,r,i,o=wh.lastIndex=Mh.lastIndex=0,u=-1,a=[],c=[];for(t+="",n+="";(e=wh.exec(t))&&(r=Mh.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:xh(e,r)})),o=Mh.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?c[0]?rn(c[0].x):en(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)a[(e=c[r]).i]=e.x(t);return a.join("")})},Sh=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?dh(n):("number"===r?xh:"string"===r?(e=St(n))?(n=e,vh):Th:n instanceof St?vh:n instanceof Date?mh:Array.isArray(n)?yh:isNaN(n)?bh:xh)(t,n)},Nh=function(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}},kh=180/Math.PI,Eh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ah=function(t,n,e,r,i,o){var u,a,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r<n*e&&(t=-t,n=-n,c=-c,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*kh,skewX:Math.atan(c)*kh,scaleX:u,scaleY:a}},Ch=an(on,"px, ","px)","deg)"),zh=an(un,", ",")",")"),Ph=Math.SQRT2,Lh=function(t,n){var e,r,i=t[0],o=t[1],u=t[2],a=n[0],c=n[1],s=n[2],f=a-i,l=c-o,h=f*f+l*l;if(h<1e-12)r=Math.log(s/u)/Ph,e=function(t){return[i+t*f,o+t*l,u*Math.exp(Ph*t*r)]};else{var p=Math.sqrt(h),d=(s*s-u*u+4*h)/(2*u*2*p),v=(s*s-u*u-4*h)/(2*s*2*p),_=Math.log(Math.sqrt(d*d+1)-d),g=Math.log(Math.sqrt(v*v+1)-v);r=(g-_)/Ph,e=function(t){var n=t*r,e=cn(_),a=u/(2*p)*(e*fn(Ph*n+_)-sn(_));return[i+a*f,o+a*l,u*e/cn(Ph*n+_)]}}return e.duration=1e3*r,e},Rh=ln(Qt),qh=ln(tn),Uh=pn(Qt),Dh=pn(tn),Oh=dn(Qt),Fh=dn(tn),Ih=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},Yh=0,Bh=0,jh=0,Hh=1e3,Xh=0,Vh=0,$h=0,Wh="object"==typeof performance&&performance.now?performance:Date,Zh="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};gn.prototype=yn.prototype={constructor:gn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?vn():+e)+(null==n?0:+n),this._next||lh===this||(lh?lh._next=this:fh=this,lh=this),this._call=t,this._time=e,Mn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Mn())}};var Gh=function(t,n,e){var r=new gn;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},Jh=function(t,n,e){var r=new gn,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?vn():+e,r.restart(function o(u){u+=i,r.restart(o,i+=n,e),t(u)},n,e),r)},Qh=v("start","end","interrupt"),Kh=[],tp=0,np=1,ep=2,rp=3,ip=4,op=5,up=6,ap=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};kn(t,e,{name:n,index:r,group:i,on:Qh,tween:Kh,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:tp})},cp=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>ep&&e.state<op,e.state=up,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},sp=function(t){return this.each(function(){cp(this,t)})},fp=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Nn(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?En:An)(e,t,n))},lp=function(t,n){var e;return("number"==typeof n?xh:n instanceof St?vh:(e=St(n))?(n=e,vh):Th)(t,n)},hp=function(t,n){var e=Af(t),r="transform"===e?zh:lp;return this.attrTween(t,"function"==typeof n?(e.local?Un:qn)(e,r,Cn(this,"attr."+t,n)):null==n?(e.local?Pn:zn)(e):(e.local?Rn:Ln)(e,r,n+""))},pp=function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Af(t);return this.tween(e,(r.local?Dn:On)(r,n))},dp=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Fn:In)(n,t)):Nn(this.node(),n).delay},vp=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Yn:Bn)(n,t)):Nn(this.node(),n).duration},_p=function(t){var n=this._id;return arguments.length?this.each(jn(n,t)):Nn(this.node(),n).ease},gp=function(t){"function"!=typeof t&&(t=qf(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,c=r[i]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&c.push(o);return new te(r,this._parents,this._name,this._id)},yp=function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var c,s=n[a],f=e[a],l=s.length,h=u[a]=new Array(l),p=0;p<l;++p)(c=s[p]||f[p])&&(h[p]=c);for(;a<r;++a)u[a]=n[a];return new te(u,this._parents,this._name,this._id)},mp=function(t,n){var e=this._id;return arguments.length<2?Nn(this.node(),e).on.on(t):this.each(Xn(e,t,n))},xp=function(){return this.on("end.remove",Vn(this._id))},bp=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Yf(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,c,s=r[u],f=s.length,l=o[u]=new Array(f),h=0;h<f;++h)(a=s[h])&&(c=t.call(a,a.__data__,h,s))&&("__data__"in a&&(c.__data__=a.__data__),l[h]=c,ap(l[h],n,e,h,l,Nn(a,e)));return new te(o,this._parents,n,e)},wp=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=jf(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var c,s=r[a],f=s.length,l=0;l<f;++l)if(c=s[l]){for(var h,p=t.call(c,c.__data__,l,s),d=Nn(c,e),v=0,_=p.length;v<_;++v)(h=p[v])&&ap(h,n,e,v,p,d);o.push(p),u.push(c)}return new te(o,u,n,e)},Mp=_t.prototype.constructor,Tp=function(){return new Mp(this._groups,this._parents)},Sp=function(t,n,e){var r="transform"==(t+="")?Ch:lp;return null==n?this.styleTween(t,$n(t,r)).on("end.style."+t,Wn(t)):this.styleTween(t,"function"==typeof n?Gn(t,r,Cn(this,"style."+t,n)):Zn(t,r,n+""),e)},Np=function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Jn(t,n,null==e?"":e))},kp=function(t){return this.tween("text","function"==typeof t?Kn(Cn(this,"text",t)):Qn(null==t?"":t+""))},Ep=function(){for(var t=this._name,n=this._id,e=ee(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],c=a.length,s=0;s<c;++s)if(u=a[s]){var f=Nn(u,n);ap(u,t,e,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new te(r,this._parents,t,e)},Ap=0,Cp=_t.prototype;te.prototype=ne.prototype={constructor:te,select:bp,selectAll:wp,filter:gp,merge:yp,selection:Tp,transition:Ep,call:Cp.call,nodes:Cp.nodes,node:Cp.node,size:Cp.size,empty:Cp.empty,each:Cp.each,on:mp,attr:hp,attrTween:pp,style:Sp,styleTween:Np,text:kp,remove:xp,tween:fp,delay:dp,duration:vp,ease:_p};var zp=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),Pp=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),Lp=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Rp=Math.PI,qp=Rp/2,Up=4/11,Dp=6/11,Op=8/11,Fp=.75,Ip=9/11,Yp=10/11,Bp=.9375,jp=21/22,Hp=63/64,Xp=1/Up/Up,Vp=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),$p=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),Wp=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),Zp=2*Math.PI,Gp=function t(n,e){function r(t){return n*Math.pow(2,10*--t)*Math.sin((i-t)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Zp);return r.amplitude=function(n){return t(n,e*Zp)},r.period=function(e){return t(n,e)},r}(1,.3),Jp=function t(n,e){function r(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Zp);return r.amplitude=function(n){return t(n,e*Zp)},r.period=function(e){return t(n,e)},r}(1,.3),Qp=function t(n,e){function r(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((i-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((i+t)/e))/2}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Zp);return r.amplitude=function(n){return t(n,e*Zp)},r.period=function(e){return t(n,e)},r}(1,.3),Kp={time:null,delay:0,duration:250,ease:se},td=function(t){var n,e;t instanceof te?(n=t._id,t=t._name):(n=ee(),(e=Kp).time=vn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],c=a.length,s=0;s<c;++s)(u=a[s])&&ap(u,t,n,s,a,e||we(u,n));return new te(r,this._parents,t,n)};_t.prototype.interrupt=sp,_t.prototype.transition=td;var nd=[null],ed=function(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>np&&e.name===n)return new te([[t]],nd,n,+r)}return null},rd=function(t){return function(){return t}},id=function(t,n,e){this.target=t,this.type=n,this.selection=e},od=function(){t.event.preventDefault(),t.event.stopImmediatePropagation()},ud={name:"drag"},ad={name:"space"},cd={name:"handle"},sd={name:"center"},fd={name:"x",handles:["e","w"].map(Te),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ld={name:"y",handles:["n","s"].map(Te),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},hd={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Te),input:function(t){return t},output:function(t){return t}},pd={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},dd={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},vd={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},_d={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},gd={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1},yd=function(){return Pe(hd)},md=Math.cos,xd=Math.sin,bd=Math.PI,wd=bd/2,Md=2*bd,Td=Math.max,Sd=function(){function t(t){var o,u,a,c,s,f,l=t.length,h=[],p=Js(l),d=[],v=[],_=v.groups=new Array(l),g=new Array(l*l);for(o=0,s=-1;++s<l;){for(u=0,f=-1;++f<l;)u+=t[s][f];h.push(u),d.push(Js(l)),o+=u}for(e&&p.sort(function(t,n){return e(h[t],h[n])}),r&&d.forEach(function(n,e){n.sort(function(n,i){return r(t[e][n],t[e][i])})}),o=Td(0,Md-n*l)/o,c=o?n:Md/l,u=0,s=-1;++s<l;){for(a=u,f=-1;++f<l;){var y=p[s],m=d[y][f],x=t[y][m],b=u,w=u+=x*o;g[m*l+y]={index:y,subindex:m,startAngle:b,endAngle:w,value:x}}_[y]={index:y,startAngle:a,endAngle:u,value:h[y]},u+=c}for(s=-1;++s<l;)for(f=s-1;++f<l;){var M=g[f*l+s],T=g[s*l+f];(M.value||T.value)&&v.push(M.value<T.value?{source:T,target:M}:{source:M,target:T})}return i?v.sort(i):v}var n=0,e=null,r=null,i=null;return t.padAngle=function(e){return arguments.length?(n=Td(0,e),t):n},t.sortGroups=function(n){return arguments.length?(e=n,t):e},t.sortSubgroups=function(n){return arguments.length?(r=n,t):r},t.sortChords=function(n){return arguments.length?(null==n?i=null:(i=Le(n))._=n,t):i&&i._},t},Nd=Array.prototype.slice,kd=function(t){return function(){return t}},Ed=Math.PI,Ad=2*Ed,Cd=Ad-1e-6;Re.prototype=qe.prototype={constructor:Re,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,u=this._y1,a=e-t,c=r-n,s=o-t,f=u-n,l=s*s+f*f;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>1e-6)if(Math.abs(f*a-c*s)>1e-6&&i){var h=e-o,p=r-u,d=a*a+c*c,v=h*h+p*p,_=Math.sqrt(d),g=Math.sqrt(l),y=i*Math.tan((Ed-Math.acos((d+l-v)/(2*_*g)))/2),m=y/g,x=y/_;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*s)+","+(n+m*f)),this._+="A"+i+","+i+",0,0,"+ +(f*h>s*p)+","+(this._x1=t+x*a)+","+(this._y1=n+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,e=+e;var u=e*Math.cos(r),a=e*Math.sin(r),c=t+u,s=n+a,f=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+s:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+c+","+s),e&&(l<0&&(l=l%Ad+Ad),l>Cd?this._+="A"+e+","+e+",0,1,"+f+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+f+","+(this._x1=c)+","+(this._y1=s):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Ed)+","+f+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var zd=function(){function t(){var t,a=Nd.call(arguments),c=n.apply(this,a),s=e.apply(this,a),f=+r.apply(this,(a[0]=c,a)),l=i.apply(this,a)-wd,h=o.apply(this,a)-wd,p=f*md(l),d=f*xd(l),v=+r.apply(this,(a[0]=s,a)),_=i.apply(this,a)-wd,g=o.apply(this,a)-wd;if(u||(u=t=qe()),u.moveTo(p,d),u.arc(0,0,f,l,h),l===_&&h===g||(u.quadraticCurveTo(0,0,v*md(_),v*xd(_)),u.arc(0,0,v,_,g)),u.quadraticCurveTo(0,0,p,d),u.closePath(),t)return u=null,t+""||null}var n=Ue,e=De,r=Oe,i=Fe,o=Ie,u=null;return t.radius=function(n){return arguments.length?(r="function"==typeof n?n:kd(+n),t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:kd(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:kd(+n),t):o},t.source=function(e){return arguments.length?(n=e,t):n},t.target=function(n){return arguments.length?(e=n,t):e},t.context=function(n){return arguments.length?(u=null==n?null:n,t):u},t};Ye.prototype=Be.prototype={constructor:Ye,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var Pd=function(){function t(n,i,u,a){if(i>=o.length)return null!=r?r(n):null!=e?n.sort(e):n;for(var c,s,f,l=-1,h=n.length,p=o[i++],d=Be(),v=u();++l<h;)(f=d.get(c=p(s=n[l])+""))?f.push(s):d.set(c,[s]);return d.each(function(n,e){a(v,e,t(n,i,u,a))}),v}function n(t,e){if(++e>o.length)return t;var i,a=u[e-1];return null!=r&&e>=o.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:n(t,e)})})),null!=a?i.sort(function(t,n){return a(t.key,n.key)}):i}var e,r,i,o=[],u=[];return i={object:function(n){return t(n,0,je,He)},map:function(n){return t(n,0,Xe,Ve)},entries:function(e){return n(t(e,0,Xe,Ve),0)},key:function(t){return o.push(t),i},sortKeys:function(t){return u[o.length-1]=t,i},sortValues:function(t){return e=t,i},rollup:function(t){return r=t,i}}},Ld=Be.prototype;$e.prototype=We.prototype={constructor:$e,has:Ld.has,add:function(t){return t+="",this["$"+t]=t,this},remove:Ld.remove,clear:Ld.clear,values:Ld.keys,size:Ld.size,empty:Ld.empty,each:Ld.each};var Rd=function(t){var n=[];for(var e in t)n.push(e);return n},qd=function(t){var n=[];for(var e in t)n.push(t[e]);return n},Ud=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},Dd=function(t){function n(t,n){var r,i,o=e(t,function(t,e){if(r)return r(t,e-1);i=t,r=n?Ge(t,n):Ze(t)});return o.columns=i,o}function e(t,n){function e(){if(f>=s)return u;if(i)return i=!1,o;var n,e=f;if(34===t.charCodeAt(e)){for(var r=e;r++<s;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return f=r+2,n=t.charCodeAt(r+1),13===n?(i=!0,10===t.charCodeAt(r+2)&&++f):10===n&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;f<s;){var a=1;if(10===(n=t.charCodeAt(f++)))i=!0;else if(13===n)i=!0,10===t.charCodeAt(f)&&(++f,++a);else if(n!==c)continue;return t.slice(e,f-a)}return t.slice(e)}for(var r,i,o={},u={},a=[],s=t.length,f=0,l=0;(r=e())!==u;){for(var h=[];r!==o&&r!==u;)h.push(r),r=e();n&&null==(h=n(h,l++))||a.push(h)}return a}function r(n,e){return null==e&&(e=Je(n)),[e.map(u).join(t)].concat(n.map(function(n){return e.map(function(t){return u(n[t])}).join(t)})).join("\n")}function i(t){return t.map(o).join("\n")}function o(n){return n.map(u).join(t)}function u(t){return null==t?"":a.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),c=t.charCodeAt(0);return{parse:n,parseRows:e,format:r,formatRows:i}},Od=Dd(","),Fd=Od.parse,Id=Od.parseRows,Yd=Od.format,Bd=Od.formatRows,jd=Dd("\t"),Hd=jd.parse,Xd=jd.parseRows,Vd=jd.format,$d=jd.formatRows,Wd=function(t,n){function e(){var e,i,o=r.length,u=0,a=0;for(e=0;e<o;++e)i=r[e],u+=i.x,a+=i.y;for(u=u/o-t,a=a/o-n,e=0;e<o;++e)i=r[e],i.x-=u,i.y-=a}var r;return null==t&&(t=0),null==n&&(n=0),e.initialize=function(t){r=t},e.x=function(n){return arguments.length?(t=+n,e):t},e.y=function(t){return arguments.length?(n=+t,e):n},e},Zd=function(t){return function(){return t}},Gd=function(){return 1e-6*(Math.random()-.5)},Jd=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Qe(this.cover(n,e),n,e,t)},Qd=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{if(!(e>t||t>i||r>n||n>o))return this;var u,a,c=i-e,s=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{u=new Array(4),u[a]=s,s=u}while(c*=2,i=e+c,o=r+c,t>i||n>o);break;case 1:do{u=new Array(4),u[a]=s,s=u}while(c*=2,e=i-c,o=r+c,e>t||n>o);break;case 2:do{u=new Array(4),u[a]=s,s=u}while(c*=2,i=e+c,r=o-c,t>i||r>n);break;case 3:do{u=new Array(4),u[a]=s,s=u}while(c*=2,e=i-c,r=o-c,e>t||r>n)}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Kd=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},tv=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},nv=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i},ev=function(t,n,e){var r,i,o,u,a,c,s,f=this._x0,l=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new nv(v,f,l,h,p)),null==e?e=1/0:(f=t-e,l=n-e,h=t+e,p=n+e,e*=e);c=d.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(o=c.y0)>p||(u=c.x1)<f||(a=c.y1)<l))if(v.length){var _=(i+u)/2,g=(o+a)/2;d.push(new nv(v[3],_,g,u,a),new nv(v[2],i,g,_,a),new nv(v[1],_,o,u,g),new nv(v[0],i,o,_,g)),(s=(n>=g)<<1|t>=_)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=c)}else{var y=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=y*y+m*m;if(x<e){var b=Math.sqrt(e=x);f=t-b,l=n-b,h=t+b,p=n+b,r=v.data}}return r},rv=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,i,o,u,a,c,s,f,l,h,p=this._root,d=this._x0,v=this._y0,_=this._x1,g=this._y1;if(!p)return this;if(p.length)for(;;){if((s=o>=(a=(d+_)/2))?d=a:_=a,(f=u>=(c=(v+g)/2))?v=c:g=c,n=p,!(p=p[l=f<<1|s]))return this;if(!p.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},iv=function(){return this._root},ov=function(){var t=0;return this.visit(function(n){if(!n.length)do{++t}while(n=n.next)}),t},uv=function(t){var n,e,r,i,o,u,a=[],c=this._root;for(c&&a.push(new nv(c,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,u=n.y1)&&c.length){var s=(r+o)/2,f=(i+u)/2;(e=c[3])&&a.push(new nv(e,s,f,o,u)),(e=c[2])&&a.push(new nv(e,r,f,s,u)),(e=c[1])&&a.push(new nv(e,s,i,o,f)),(e=c[0])&&a.push(new nv(e,r,i,s,f))}return this},av=function(t){var n,e=[],r=[];for(this._root&&e.push(new nv(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,u=n.x0,a=n.y0,c=n.x1,s=n.y1,f=(u+c)/2,l=(a+s)/2;(o=i[0])&&e.push(new nv(o,u,a,f,l)),(o=i[1])&&e.push(new nv(o,f,a,c,l)),(o=i[2])&&e.push(new nv(o,u,l,f,s)),(o=i[3])&&e.push(new nv(o,f,l,c,s))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},cv=function(t){return arguments.length?(this._x=t,this):this._x},sv=function(t){return arguments.length?(this._y=t,this):this._y},fv=rr.prototype=ir.prototype;fv.copy=function(){var t,n,e=new ir(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=or(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=or(n));return e},fv.add=Jd,fv.addAll=Ke,fv.cover=Qd,fv.data=Kd,fv.extent=tv,fv.find=ev,fv.remove=rv,fv.removeAll=tr,fv.root=iv,fv.size=ov,fv.visit=uv,fv.visitAfter=av,fv.x=cv,fv.y=sv;var lv,hv=function(t){function n(){function t(t,n,e,r,i){var o=t.data,a=t.r,p=l+a;{if(!o)return n>s+p||r<s-p||e>f+p||i<f-p;if(o.index>c.index){var d=s-o.x-o.vx,v=f-o.y-o.vy,_=d*d+v*v;_<p*p&&(0===d&&(d=Gd(),_+=d*d),0===v&&(v=Gd(),_+=v*v),_=(p-(_=Math.sqrt(_)))/_*u,c.vx+=(d*=_)*(p=(a*=a)/(h+a)),c.vy+=(v*=_)*p,o.vx-=d*(p=1-p),o.vy-=v*p)}}}for(var n,r,c,s,f,l,h,p=i.length,d=0;d<a;++d)for(r=rr(i,ur,ar).visitAfter(e),n=0;n<p;++n)c=i[n],l=o[c.index],h=l*l,s=c.x+c.vx,f=c.y+c.vy,r.visit(t)}function e(t){if(t.data)return t.r=o[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function r(){if(i){var n,e,r=i.length;for(o=new Array(r),n=0;n<r;++n)e=i[n],o[e.index]=+t(e,n,i)}}var i,o,u=1,a=1;return"function"!=typeof t&&(t=Zd(null==t?1:+t)),n.initialize=function(t){i=t,r()},n.iterations=function(t){return arguments.length?(a=+t,n):a},n.strength=function(t){return arguments.length?(u=+t,n):u},n.radius=function(e){return arguments.length?(t="function"==typeof e?e:Zd(+e),r(),n):t},n},pv=function(t){function n(t){return 1/Math.min(s[t.source.index],s[t.target.index])}function e(n){for(var e=0,r=t.length;e<d;++e)for(var i,o,c,s,l,h,p,v=0;v<r;++v)i=t[v],o=i.source,c=i.target,s=c.x+c.vx-o.x-o.vx||Gd(),l=c.y+c.vy-o.y-o.vy||Gd(),h=Math.sqrt(s*s+l*l),h=(h-a[v])/h*n*u[v],s*=h,l*=h,c.vx-=s*(p=f[v]),c.vy-=l*p,o.vx+=s*(p=1-p),o.vy+=l*p}function r(){if(c){var n,e,r=c.length,h=t.length,p=Be(c,l);for(n=0,s=new Array(r);n<h;++n)e=t[n],e.index=n,"object"!=typeof e.source&&(e.source=sr(p,e.source)),"object"!=typeof e.target&&(e.target=sr(p,e.target)),s[e.source.index]=(s[e.source.index]||0)+1,s[e.target.index]=(s[e.target.index]||0)+1;for(n=0,f=new Array(h);n<h;++n)e=t[n],f[n]=s[e.source.index]/(s[e.source.index]+s[e.target.index]);u=new Array(h),i(),a=new Array(h),o()}}function i(){if(c)for(var n=0,e=t.length;n<e;++n)u[n]=+h(t[n],n,t)}function o(){if(c)for(var n=0,e=t.length;n<e;++n)a[n]=+p(t[n],n,t)}var u,a,c,s,f,l=cr,h=n,p=Zd(30),d=1;return null==t&&(t=[]),e.initialize=function(t){c=t,r()},e.links=function(n){return arguments.length?(t=n,r(),e):t},e.id=function(t){return arguments.length?(l=t,
-e):l},e.iterations=function(t){return arguments.length?(d=+t,e):d},e.strength=function(t){return arguments.length?(h="function"==typeof t?t:Zd(+t),i(),e):h},e.distance=function(t){return arguments.length?(p="function"==typeof t?t:Zd(+t),o(),e):p},e},dv=10,vv=Math.PI*(3-Math.sqrt(5)),_v=function(t){function n(){e(),p.call("tick",o),u<a&&(h.stop(),p.call("end",o))}function e(){var n,e,r=t.length;for(u+=(s-u)*c,l.each(function(t){t(u)}),n=0;n<r;++n)e=t[n],null==e.fx?e.x+=e.vx*=f:(e.x=e.fx,e.vx=0),null==e.fy?e.y+=e.vy*=f:(e.y=e.fy,e.vy=0)}function r(){for(var n,e=0,r=t.length;e<r;++e){if(n=t[e],n.index=e,isNaN(n.x)||isNaN(n.y)){var i=dv*Math.sqrt(e),o=e*vv;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function i(n){return n.initialize&&n.initialize(t),n}var o,u=1,a=.001,c=1-Math.pow(a,1/300),s=0,f=.6,l=Be(),h=yn(n),p=v("tick","end");return null==t&&(t=[]),r(),o={tick:e,restart:function(){return h.restart(n),o},stop:function(){return h.stop(),o},nodes:function(n){return arguments.length?(t=n,r(),l.each(i),o):t},alpha:function(t){return arguments.length?(u=+t,o):u},alphaMin:function(t){return arguments.length?(a=+t,o):a},alphaDecay:function(t){return arguments.length?(c=+t,o):+c},alphaTarget:function(t){return arguments.length?(s=+t,o):s},velocityDecay:function(t){return arguments.length?(f=1-t,o):1-f},force:function(t,n){return arguments.length>1?(null==n?l.remove(t):l.set(t,i(n)),o):l.get(t)},find:function(n,e,r){var i,o,u,a,c,s=0,f=t.length;for(null==r?r=1/0:r*=r,s=0;s<f;++s)a=t[s],i=n-a.x,o=e-a.y,(u=i*i+o*o)<r&&(c=a,r=u);return c},on:function(t,n){return arguments.length>1?(p.on(t,n),o):p.on(t)}}},gv=function(){function t(t){var n,a=i.length,c=rr(i,fr,lr).visitAfter(e);for(u=t,n=0;n<a;++n)o=i[n],c.visit(r)}function n(){if(i){var t,n,e=i.length;for(a=new Array(e),t=0;t<e;++t)n=i[t],a[n.index]=+c(n,t,i)}}function e(t){var n,e,r,i,o,u=0;if(t.length){for(r=i=o=0;o<4;++o)(n=t[o])&&(e=n.value)&&(u+=e,r+=e*n.x,i+=e*n.y);t.x=r/u,t.y=i/u}else{n=t,n.x=n.data.x,n.y=n.data.y;do{u+=a[n.data.index]}while(n=n.next)}t.value=u}function r(t,n,e,r){if(!t.value)return!0;var i=t.x-o.x,c=t.y-o.y,h=r-n,p=i*i+c*c;if(h*h/l<p)return p<f&&(0===i&&(i=Gd(),p+=i*i),0===c&&(c=Gd(),p+=c*c),p<s&&(p=Math.sqrt(s*p)),o.vx+=i*t.value*u/p,o.vy+=c*t.value*u/p),!0;if(!(t.length||p>=f)){(t.data!==o||t.next)&&(0===i&&(i=Gd(),p+=i*i),0===c&&(c=Gd(),p+=c*c),p<s&&(p=Math.sqrt(s*p)));do{t.data!==o&&(h=a[t.data.index]*u/p,o.vx+=i*h,o.vy+=c*h)}while(t=t.next)}}var i,o,u,a,c=Zd(-30),s=1,f=1/0,l=.81;return t.initialize=function(t){i=t,n()},t.strength=function(e){return arguments.length?(c="function"==typeof e?e:Zd(+e),n(),t):c},t.distanceMin=function(n){return arguments.length?(s=n*n,t):Math.sqrt(s)},t.distanceMax=function(n){return arguments.length?(f=n*n,t):Math.sqrt(f)},t.theta=function(n){return arguments.length?(l=n*n,t):Math.sqrt(l)},t},yv=function(t){function n(t){for(var n,e=0,u=r.length;e<u;++e)n=r[e],n.vx+=(o[e]-n.x)*i[e]*t}function e(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;n<e;++n)i[n]=isNaN(o[n]=+t(r[n],n,r))?0:+u(r[n],n,r)}}var r,i,o,u=Zd(.1);return"function"!=typeof t&&(t=Zd(null==t?0:+t)),n.initialize=function(t){r=t,e()},n.strength=function(t){return arguments.length?(u="function"==typeof t?t:Zd(+t),e(),n):u},n.x=function(r){return arguments.length?(t="function"==typeof r?r:Zd(+r),e(),n):t},n},mv=function(t){function n(t){for(var n,e=0,u=r.length;e<u;++e)n=r[e],n.vy+=(o[e]-n.y)*i[e]*t}function e(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;n<e;++n)i[n]=isNaN(o[n]=+t(r[n],n,r))?0:+u(r[n],n,r)}}var r,i,o,u=Zd(.1);return"function"!=typeof t&&(t=Zd(null==t?0:+t)),n.initialize=function(t){r=t,e()},n.strength=function(t){return arguments.length?(u="function"==typeof t?t:Zd(+t),e(),n):u},n.y=function(r){return arguments.length?(t="function"==typeof r?r:Zd(+r),e(),n):t},n},xv=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},bv=function(t){return t=xv(Math.abs(t)),t?t[1]:NaN},wv=function(t,n){return function(e,r){for(var i=e.length,o=[],u=0,a=t[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(e.substring(i-=a,i+a)),!((c+=a+1)>r));)a=t[u=(u+1)%t.length];return o.reverse().join(n)}},Mv=function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}},Tv=function(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},Sv=function(t,n){var e=xv(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(lv=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+xv(t,Math.max(0,n+o-1))[0]},Nv=function(t,n){var e=xv(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},kv={"":Tv,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Nv(100*t,n)},r:Nv,s:Sv,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Ev=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;hr.prototype=pr.prototype,pr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Av,Cv=function(t){return t},zv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Pv=function(t){function n(t){function n(t){var n,i,a,f=_,x=g;if("c"===v)x=y(t)+x,t="";else{t=+t;var b=t<0;if(t=y(Math.abs(t),d),b&&0==+t&&(b=!1),f=(b?"("===s?s:"-":"-"===s||"("===s?"":s)+f,x=x+("s"===v?zv[8+lv/3]:"")+(b&&"("===s?")":""),m)for(n=-1,i=t.length;++n<i;)if(48>(a=t.charCodeAt(n))||a>57){x=(46===a?o+t.slice(n+1):t.slice(n))+x,t=t.slice(0,n);break}}p&&!l&&(t=r(t,1/0));var w=f.length+t.length+x.length,M=w<h?new Array(h-w+1).join(e):"";switch(p&&l&&(t=r(M+t,M.length?h-x.length:1/0),M=""),c){case"<":t=f+t+x+M;break;case"=":t=f+M+t+x;break;case"^":t=M.slice(0,w=M.length>>1)+f+t+x+M.slice(w);break;default:t=M+f+t+x}return u(t)}t=hr(t);var e=t.fill,c=t.align,s=t.sign,f=t.symbol,l=t.zero,h=t.width,p=t.comma,d=t.precision,v=t.type,_="$"===f?i[0]:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",g="$"===f?i[1]:/[%p]/.test(v)?a:"",y=kv[v],m=!v||/[defgprs%]/.test(v);return d=null==d?v?6:12:/[gprs]/.test(v)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=hr(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(bv(e)/3))),o=Math.pow(10,-i),u=zv[8+i/3];return function(t){return r(o*t)+u}}var r=t.grouping&&t.thousands?wv(t.grouping,t.thousands):Cv,i=t.currency,o=t.decimal,u=t.numerals?Mv(t.numerals):Cv,a=t.percent||"%";return{format:n,formatPrefix:e}};dr({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Lv=function(t){return Math.max(0,-bv(Math.abs(t)))},Rv=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(bv(n)/3)))-bv(Math.abs(t)))},qv=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,bv(n)-bv(t))+1},Uv=function(){return new vr};vr.prototype={constructor:vr,reset:function(){this.s=this.t=0},add:function(t){_r(d_,t,this.t),_r(this,d_.s,this.s),this.s?this.t+=d_.t:this.s=d_.t},valueOf:function(){return this.s}};var Dv,Ov,Fv,Iv,Yv,Bv,jv,Hv,Xv,Vv,$v,Wv,Zv,Gv,Jv,Qv,Kv,t_,n_,e_,r_,i_,o_,u_,a_,c_,s_,f_,l_,h_,p_,d_=new vr,v_=1e-6,__=Math.PI,g_=__/2,y_=__/4,m_=2*__,x_=180/__,b_=__/180,w_=Math.abs,M_=Math.atan,T_=Math.atan2,S_=Math.cos,N_=Math.ceil,k_=Math.exp,E_=Math.log,A_=Math.pow,C_=Math.sin,z_=Math.sign||function(t){return t>0?1:t<0?-1:0},P_=Math.sqrt,L_=Math.tan,R_={Feature:function(t,n){br(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)br(e[r].geometry,n)}},q_={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){wr(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)wr(e[r],n,0)},Polygon:function(t,n){Mr(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Mr(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)br(e[r],n)}},U_=function(t,n){t&&R_.hasOwnProperty(t.type)?R_[t.type](t,n):br(t,n)},D_=Uv(),O_=Uv(),F_={point:xr,lineStart:xr,lineEnd:xr,polygonStart:function(){D_.reset(),F_.lineStart=Tr,F_.lineEnd=Sr},polygonEnd:function(){var t=+D_;O_.add(t<0?m_+t:t),this.lineStart=this.lineEnd=this.point=xr},sphere:function(){O_.add(m_)}},I_=function(t){return O_.reset(),U_(t,F_),2*O_},Y_=Uv(),B_={point:qr,lineStart:Dr,lineEnd:Or,polygonStart:function(){B_.point=Fr,B_.lineStart=Ir,B_.lineEnd=Yr,Y_.reset(),F_.polygonStart()},polygonEnd:function(){F_.polygonEnd(),B_.point=qr,B_.lineStart=Dr,B_.lineEnd=Or,D_<0?(Bv=-(Hv=180),jv=-(Xv=90)):Y_>v_?Xv=90:Y_<-v_&&(jv=-90),Jv[0]=Bv,Jv[1]=Hv}},j_=function(t){var n,e,r,i,o,u,a;if(Xv=Hv=-(Bv=jv=1/0),Gv=[],U_(t,B_),e=Gv.length){for(Gv.sort(jr),n=1,r=Gv[0],o=[r];n<e;++n)i=Gv[n],Hr(r,i[0])||Hr(r,i[1])?(Br(r[0],i[1])>Br(r[0],r[1])&&(r[1]=i[1]),Br(i[0],r[1])>Br(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(u=-1/0,e=o.length-1,n=0,r=o[e];n<=e;r=i,++n)i=o[n],(a=Br(r[1],i[0]))>u&&(u=a,Bv=i[0],Hv=r[1])}return Gv=Jv=null,Bv===1/0||jv===1/0?[[NaN,NaN],[NaN,NaN]]:[[Bv,jv],[Hv,Xv]]},H_={sphere:xr,point:Xr,lineStart:$r,lineEnd:Gr,polygonStart:function(){H_.lineStart=Jr,H_.lineEnd=Qr},polygonEnd:function(){H_.lineStart=$r,H_.lineEnd=Gr}},X_=function(t){Qv=Kv=t_=n_=e_=r_=i_=o_=u_=a_=c_=0,U_(t,H_);var n=u_,e=a_,r=c_,i=n*n+e*e+r*r;return i<1e-12&&(n=r_,e=i_,r=o_,Kv<v_&&(n=t_,e=n_,r=e_),(i=n*n+e*e+r*r)<1e-12)?[NaN,NaN]:[T_(e,n)*x_,yr(r/P_(i))*x_]},V_=function(t){return function(){return t}},$_=function(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e};ni.invert=ni;var W_,Z_,G_,J_,Q_,K_,tg,ng,eg,rg,ig,og=function(t){function n(n){return n=t(n[0]*b_,n[1]*b_),n[0]*=x_,n[1]*=x_,n}return t=ei(t[0]*b_,t[1]*b_,t.length>2?t[2]*b_:0),n.invert=function(n){return n=t.invert(n[0]*b_,n[1]*b_),n[0]*=x_,n[1]*=x_,n},n},ug=function(){function t(t,n){e.push(t=r(t,n)),t[0]*=x_,t[1]*=x_}function n(){var t=i.apply(this,arguments),n=o.apply(this,arguments)*b_,c=u.apply(this,arguments)*b_;return e=[],r=ei(-t[0]*b_,-t[1]*b_,0).invert,ui(a,n,c,1),t={type:"Polygon",coordinates:[e]},e=r=null,t}var e,r,i=V_([0,0]),o=V_(90),u=V_(6),a={point:t};return n.center=function(t){return arguments.length?(i="function"==typeof t?t:V_([+t[0],+t[1]]),n):i},n.radius=function(t){return arguments.length?(o="function"==typeof t?t:V_(+t),n):o},n.precision=function(t){return arguments.length?(u="function"==typeof t?t:V_(+t),n):u},n},ag=function(){var t,n=[];return{point:function(n,e){t.push([n,e])},lineStart:function(){n.push(t=[])},lineEnd:xr,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},cg=function(t,n,e,r,i,o){var u,a=t[0],c=t[1],s=n[0],f=n[1],l=0,h=1,p=s-a,d=f-c;if(u=e-a,p||!(u>0)){if(u/=p,p<0){if(u<l)return;u<h&&(h=u)}else if(p>0){if(u>h)return;u>l&&(l=u)}if(u=i-a,p||!(u<0)){if(u/=p,p<0){if(u>h)return;u>l&&(l=u)}else if(p>0){if(u<l)return;u<h&&(h=u)}if(u=r-c,d||!(u>0)){if(u/=d,d<0){if(u<l)return;u<h&&(h=u)}else if(d>0){if(u>h)return;u>l&&(l=u)}if(u=o-c,d||!(u<0)){if(u/=d,d<0){if(u>h)return;u>l&&(l=u)}else if(d>0){if(u<l)return;u<h&&(h=u)}return l>0&&(t[0]=a+l*p,t[1]=c+l*d),h<1&&(n[0]=a+h*p,n[1]=c+h*d),!0}}}}},sg=function(t,n){return w_(t[0]-n[0])<v_&&w_(t[1]-n[1])<v_},fg=function(t,n,e,r,i){var o,u,a=[],c=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],u=t[n];if(sg(r,u)){for(i.lineStart(),o=0;o<n;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a.push(e=new ci(r,t,null,!0)),c.push(e.o=new ci(r,null,e,!1)),a.push(e=new ci(u,t,null,!1)),c.push(e.o=new ci(u,null,e,!0))}}),a.length){for(c.sort(n),si(a),si(c),o=0,u=c.length;o<u;++o)c[o].e=e=!e;for(var s,f,l=a[0];;){for(var h=l,p=!0;h.v;)if((h=h.n)===l)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,u=s.length;o<u;++o)i.point((f=s[o])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,o=s.length-1;o>=0;--o)i.point((f=s[o])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,s=h.z,p=!p}while(!h.v);i.lineEnd()}}},lg=1e9,hg=-lg,pg=function(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=fi(r,i,o,u)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],u=+a[1][1],t=n=null,e):[[r,i],[o,u]]}}},dg=Uv(),vg=function(t,n){var e=n[0],r=n[1],i=[C_(e),-S_(e),0],o=0,u=0;dg.reset();for(var a=0,c=t.length;a<c;++a)if(f=(s=t[a]).length)for(var s,f,l=s[f-1],h=l[0],p=l[1]/2+y_,d=C_(p),v=S_(p),_=0;_<f;++_,h=y,d=x,v=b,l=g){var g=s[_],y=g[0],m=g[1]/2+y_,x=C_(m),b=S_(m),w=y-h,M=w>=0?1:-1,T=M*w,S=T>__,N=d*x;if(dg.add(T_(N*M*C_(T),v*b+N*S_(T))),o+=S?w+M*m_:w,S^h>=e^y>=e){var k=zr(Ar(l),Ar(g));Rr(k);var E=zr(i,k);Rr(E);var A=(S^w>=0?-1:1)*yr(E[2]);(r>A||r===A&&(k[0]||k[1]))&&(u+=S^w>=0?1:-1)}}return(o<-v_||o<v_&&dg<-v_)^1&u},_g=Uv(),gg={sphere:xr,point:xr,lineStart:li,lineEnd:xr,polygonStart:xr,polygonEnd:xr},yg=function(t){return _g.reset(),U_(t,gg),+_g},mg=[null,null],xg={type:"LineString",coordinates:mg},bg=function(t,n){return mg[0]=t,mg[1]=n,yg(xg)},wg={Feature:function(t,n){return vi(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(vi(e[r].geometry,n))return!0;return!1}},Mg={Sphere:function(){return!0},Point:function(t,n){return _i(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(_i(e[r],n))return!0;return!1},LineString:function(t,n){return gi(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(gi(e[r],n))return!0;return!1},Polygon:function(t,n){return yi(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(yi(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(vi(e[r],n))return!0;return!1}},Tg=function(t,n){return(t&&wg.hasOwnProperty(t.type)?wg[t.type]:vi)(t,n)},Sg=function(t,n){var e=t[0]*b_,r=t[1]*b_,i=n[0]*b_,o=n[1]*b_,u=S_(r),a=C_(r),c=S_(o),s=C_(o),f=u*S_(e),l=u*C_(e),h=c*S_(i),p=c*C_(i),d=2*yr(P_(mr(o-r)+u*c*mr(i-e))),v=C_(d),_=d?function(t){var n=C_(t*=d)/v,e=C_(d-t)/v,r=e*f+n*h,i=e*l+n*p,o=e*a+n*s;return[T_(i,r)*x_,T_(o,P_(r*r+i*i))*x_]}:function(){return[e*x_,r*x_]};return _.distance=d,_},Ng=function(t){return t},kg=Uv(),Eg=Uv(),Ag={point:xr,lineStart:xr,lineEnd:xr,polygonStart:function(){Ag.lineStart=Si,Ag.lineEnd=Ei},polygonEnd:function(){Ag.lineStart=Ag.lineEnd=Ag.point=xr,kg.add(w_(Eg)),Eg.reset()},result:function(){var t=kg/2;return kg.reset(),t}},Cg=1/0,zg=Cg,Pg=-Cg,Lg=Pg,Rg={point:Ai,lineStart:xr,lineEnd:xr,polygonStart:xr,polygonEnd:xr,result:function(){var t=[[Cg,zg],[Pg,Lg]];return Pg=Lg=-(zg=Cg=1/0),t}},qg=0,Ug=0,Dg=0,Og=0,Fg=0,Ig=0,Yg=0,Bg=0,jg=0,Hg={point:Ci,lineStart:zi,lineEnd:Ri,polygonStart:function(){Hg.lineStart=qi,Hg.lineEnd=Ui},polygonEnd:function(){Hg.point=Ci,Hg.lineStart=zi,Hg.lineEnd=Ri},result:function(){var t=jg?[Yg/jg,Bg/jg]:Ig?[Og/Ig,Fg/Ig]:Dg?[qg/Dg,Ug/Dg]:[NaN,NaN];return qg=Ug=Dg=Og=Fg=Ig=Yg=Bg=jg=0,t}};Fi.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,m_)}},result:xr};var Xg,Vg,$g,Wg,Zg,Gg=Uv(),Jg={point:xr,lineStart:function(){Jg.point=Ii},lineEnd:function(){Xg&&Yi(Vg,$g),Jg.point=xr},polygonStart:function(){Xg=!0},polygonEnd:function(){Xg=null},result:function(){var t=+Gg;return Gg.reset(),t}};Bi.prototype={_circle:ji(4.5),pointRadius:function(t){return this._circle=ji(t),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}}};var Qg=function(t,n){function e(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),U_(t,r(i))),i.result()}var r,i,o=4.5;return e.area=function(t){return U_(t,r(Ag)),Ag.result()},e.measure=function(t){return U_(t,r(Jg)),Jg.result()},e.bounds=function(t){return U_(t,r(Rg)),Rg.result()},e.centroid=function(t){return U_(t,r(Hg)),Hg.result()},e.projection=function(n){return arguments.length?(r=null==n?(t=null,Ng):(t=n).stream,e):t},e.context=function(t){return arguments.length?(i=null==t?(n=null,new Bi):new Fi(n=t),"function"!=typeof o&&i.pointRadius(o),e):n},e.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),e):o},e.projection(t).context(n)},Kg=function(t,n,e,r){return function(i,o){function u(n,e){var r=i(n,e);t(n=r[0],e=r[1])&&o.point(n,e)}function a(t,n){var e=i(t,n);_.point(e[0],e[1])}function c(){b.point=a,_.lineStart()}function s(){b.point=u,_.lineEnd()}function f(t,n){v.push([t,n]);var e=i(t,n);m.point(e[0],e[1])}function l(){m.lineStart(),v=[]}function h(){f(v[0][0],v[0][1]),m.lineEnd();var t,n,e,r,i=m.clean(),u=y.result(),a=u.length;if(v.pop(),p.push(v),v=null,a)if(1&i){if(e=u[0],(n=e.length-1)>0){for(x||(o.polygonStart(),x=!0),o.lineStart(),t=0;t<n;++t)o.point((r=e[t])[0],r[1]);o.lineEnd()}}else a>1&&2&i&&u.push(u.pop().concat(u.shift())),d.push(u.filter(Hi))}var p,d,v,_=n(o),g=i.invert(r[0],r[1]),y=ag(),m=n(y),x=!1,b={point:u,lineStart:c,lineEnd:s,polygonStart:function(){b.point=f,b.lineStart=l,b.lineEnd=h,d=[],p=[]},polygonEnd:function(){b.point=u,b.lineStart=c,b.lineEnd=s,d=lf(d);var t=vg(p,g);d.length?(x||(o.polygonStart(),x=!0),fg(d,Xi,t,e,o)):t&&(x||(o.polygonStart(),x=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),d=p=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return b}},ty=Kg(function(){return!0},Vi,Wi,[-__,-g_]),ny=function(t,n){function e(e,r,i,o){ui(o,t,n,i,e,r)}function r(t,n){return S_(t)*S_(n)>a}function i(t){var n,e,i,a,f;return{lineStart:function(){a=i=!1,f=1},point:function(l,h){var p,d=[l,h],v=r(l,h),_=c?v?0:u(l,h):v?u(l+(l<0?__:-__),h):0;if(!n&&(a=i=v)&&t.lineStart(),v!==i&&(p=o(n,d),(sg(n,p)||sg(d,p))&&(d[0]+=v_,d[1]+=v_,v=r(d[0],d[1]))),v!==i)f=0,v?(t.lineStart(),p=o(d,n),t.point(p[0],p[1])):(p=o(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(s&&n&&c^v){var g;_&e||!(g=o(d,n,!0))||(f=0,c?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1])))}!v||n&&sg(n,d)||t.point(d[0],d[1]),n=d,i=v,e=_},lineEnd:function(){i&&t.lineEnd(),n=null},clean:function(){return f|(a&&i)<<1}}}function o(t,n,e){var r=Ar(t),i=Ar(n),o=[1,0,0],u=zr(r,i),c=Cr(u,u),s=u[0],f=c-s*s;if(!f)return!e&&t;var l=a*c/f,h=-a*s/f,p=zr(o,u),d=Lr(o,l);Pr(d,Lr(u,h));var v=p,_=Cr(d,v),g=Cr(v,v),y=_*_-g*(Cr(d,d)-1);if(!(y<0)){var m=P_(y),x=Lr(v,(-_-m)/g);if(Pr(x,d),x=Er(x),!e)return x;var b,w=t[0],M=n[0],T=t[1],S=n[1];M<w&&(b=w,w=M,M=b);var N=M-w,k=w_(N-__)<v_,E=k||N<v_;if(!k&&S<T&&(b=T,T=S,S=b),E?k?T+S>0^x[1]<(w_(x[0]-w)<v_?T:S):T<=x[1]&&x[1]<=S:N>__^(w<=x[0]&&x[0]<=M)){var A=Lr(v,(-_+m)/g);return Pr(A,d),[x,Er(A)]}}}function u(n,e){var r=c?t:__-t,i=0;return n<-r?i|=1:n>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var a=S_(t),c=a>0,s=w_(a)>v_;return Kg(r,i,e,c?[0,-t]:[-__,t-__])},ey=function(t){return{stream:Zi(t)}};Gi.prototype={constructor:Gi,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ry=16,iy=S_(30*b_),oy=function(t,n){return+n?to(t,n):Ki(t)},uy=Zi({point:function(t,n){this.stream.point(t*b_,n*b_)}}),ay=function(){return ro(oo).scale(155.424).center([0,33.6442])},cy=function(){return ay().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])},sy=function(){function t(t){var n=t[0],e=t[1];return a=null,i.point(n,e),a||(o.point(n,e),a)||(u.point(n,e),a)}function n(){return e=r=null,t}var e,r,i,o,u,a,c=cy(),s=ay().rotate([154,0]).center([-2,58.5]).parallels([55,65]),f=ay().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){a=[t,n]}};return t.invert=function(t){var n=c.scale(),e=c.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?f:c).invert(t)},t.stream=function(t){return e&&r===t?e:e=uo([c.stream(r=t),s.stream(t),f.stream(t)])},t.precision=function(t){return arguments.length?(c.precision(t),s.precision(t),f.precision(t),n()):c.precision()},t.scale=function(n){return arguments.length?(c.scale(n),s.scale(.35*n),f.scale(n),t.translate(c.translate())):c.scale()},t.translate=function(t){if(!arguments.length)return c.translate();var e=c.scale(),r=+t[0],a=+t[1];return i=c.translate(t).clipExtent([[r-.455*e,a-.238*e],[r+.455*e,a+.238*e]]).stream(l),o=s.translate([r-.307*e,a+.201*e]).clipExtent([[r-.425*e+v_,a+.12*e+v_],[r-.214*e-v_,a+.234*e-v_]]).stream(l),u=f.translate([r-.205*e,a+.212*e]).clipExtent([[r-.214*e+v_,a+.166*e+v_],[r-.115*e-v_,a+.234*e-v_]]).stream(l),n()},t.fitExtent=function(n,e){return Ji(t,n,e)},t.fitSize=function(n,e){return Qi(t,n,e)},t.scale(1070)},fy=ao(function(t){return P_(2/(1+t))});fy.invert=co(function(t){return 2*yr(t/2)});var ly=function(){return no(fy).scale(124.75).clipAngle(179.999)},hy=ao(function(t){return(t=gr(t))&&t/C_(t)});hy.invert=co(function(t){return t});var py=function(){return no(hy).scale(79.4188).clipAngle(179.999)};so.invert=function(t,n){return[t,2*M_(k_(n))-g_]};var dy=function(){return fo(so).scale(961/m_)},vy=function(){return ro(ho).scale(109.5).parallels([30,30])};po.invert=po;var _y=function(){return no(po).scale(152.63)},gy=function(){return ro(vo).scale(131.154).center([0,13.9389])};_o.invert=co(M_);var yy=function(){return no(_o).scale(144.049).clipAngle(60)},my=function(){function t(){return i=o=null,u}var n,e,r,i,o,u,a=1,c=0,s=0,f=1,l=1,h=Ng,p=null,d=Ng;return u={stream:function(t){return i&&o===t?i:i=h(d(o=t))},clipExtent:function(i){return arguments.length?(d=null==i?(p=n=e=r=null,Ng):fi(p=+i[0][0],n=+i[0][1],e=+i[1][0],r=+i[1][1]),t()):null==p?null:[[p,n],[e,r]]},scale:function(n){return arguments.length?(h=go((a=+n)*f,a*l,c,s),t()):a},translate:function(n){return arguments.length?(h=go(a*f,a*l,c=+n[0],s=+n[1]),t()):[c,s]},reflectX:function(n){return arguments.length?(h=go(a*(f=n?-1:1),a*l,c,s),t()):f<0},reflectY:function(n){return arguments.length?(h=go(a*f,a*(l=n?-1:1),c,s),t()):l<0},fitExtent:function(t,n){return Ji(u,t,n)},fitSize:function(t,n){return Qi(u,t,n)}}};yo.invert=co(yr);var xy=function(){return no(yo).scale(249.5).clipAngle(90+v_)};mo.invert=co(function(t){return 2*M_(t)});var by=function(){return no(mo).scale(250).clipAngle(142)};xo.invert=function(t,n){return[-n,2*M_(k_(t))-g_]};var wy=function(){var t=fo(xo),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90]).scale(159.155)},My=function(){function t(t){var o,u=0;t.eachAfter(function(t){var e=t.children;e?(t.x=wo(e),t.y=To(e)):(t.x=o?u+=n(t,o):0,t.y=0,o=t)});var a=No(t),c=ko(t),s=a.x-n(a,c)/2,f=c.x+n(c,a)/2;return t.eachAfter(i?function(n){n.x=(n.x-t.x)*e,n.y=(t.y-n.y)*r}:function(n){n.x=(n.x-s)/(f-s)*e,n.y=(1-(t.y?n.y/t.y:1))*r})}var n=bo,e=1,r=1,i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(n){return arguments.length?(i=!1,e=+n[0],r=+n[1],t):i?null:[e,r]},t.nodeSize=function(n){return arguments.length?(i=!0,e=+n[0],r=+n[1],t):i?[e,r]:null},t},Ty=function(){return this.eachAfter(Eo)},Sy=function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)u.push(e[r])}while(u.length);return this},Ny=function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},ky=function(t){for(var n,e,r,i=this,o=[i],u=[];i=o.pop();)if(u.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=u.pop();)t(i);return this},Ey=function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},Ay=function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},Cy=function(t){for(var n=this,e=Ao(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},zy=function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},Py=function(){var t=[];return this.each(function(n){t.push(n)}),t},Ly=function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},Ry=function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n};qo.prototype=Co.prototype={constructor:qo,count:Ty,each:Sy,eachAfter:ky,eachBefore:Ny,sum:Ey,sort:Ay,path:Cy,ancestors:zy,descendants:Py,leaves:Ly,links:Ry,copy:zo};var qy=function(t){for(var n=(t=t.slice()).length,e=null,r=e;n;){var i=new Uo(t[n-1]);r=r?r.next=i:e=i,t[void 0]=t[--n]}return{head:e,tail:r}},Uy=function(t){return Oo(qy(t),[])},Dy=function(t){return Vo(t),t},Oy=function(t){return function(){return t}},Fy=function(){function t(t){return t.x=e/2,t.y=r/2,n?t.eachBefore(Jo(n)).eachAfter(Qo(i,.5)).eachBefore(Ko(1)):t.eachBefore(Jo(Go)).eachAfter(Qo(Zo,1)).eachAfter(Qo(i,t.r/Math.min(e,r))).eachBefore(Ko(Math.min(e,r)/(2*t.r))),t}var n=null,e=1,r=1,i=Zo;return t.radius=function(e){return arguments.length?(n=$o(e),t):n},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i="function"==typeof n?n:Oy(+n),t):i},t},Iy=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Yy=function(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,s=t.value&&(r-n)/t.value;++a<c;)o=u[a],o.y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*s},By=function(){function t(t){var u=t.height+1;return t.x0=t.y0=i,t.x1=e,t.y1=r/u,t.eachBefore(n(r,u)),o&&t.eachBefore(Iy),t}function n(t,n){return function(e){e.children&&Yy(e,e.x0,t*(e.depth+1)/n,e.x1,t*(e.depth+2)/n);var r=e.x0,o=e.y0,u=e.x1-i,a=e.y1-i;u<r&&(r=u=(r+u)/2),a<o&&(o=a=(o+a)/2),e.x0=r,e.y0=o,e.x1=u,e.y1=a}}var e=1,r=1,i=0,o=!1;return t.round=function(n){return arguments.length?(o=!!n,t):o},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i=+n,t):i},t},jy="$",Hy={depth:-1},Xy={},Vy=function(){function t(t){var r,i,o,u,a,c,s,f=t.length,l=new Array(f),h={};for(i=0;i<f;++i)r=t[i],a=l[i]=new qo(r),null!=(c=n(r,i,t))&&(c+="")&&(s=jy+(a.id=c),h[s]=s in h?Xy:a);for(i=0;i<f;++i)if(a=l[i],null!=(c=e(t[i],i,t))&&(c+="")){if(!(u=h[jy+c]))throw new Error("missing: "+c);if(u===Xy)throw new Error("ambiguous: "+c);u.children?u.children.push(a):u.children=[a],a.parent=u}else{if(o)throw new Error("multiple roots");o=a}if(!o)throw new Error("no root");if(o.parent=Hy,o.eachBefore(function(t){t.depth=t.parent.depth+1,--f}).eachBefore(Ro),o.parent=null,f>0)throw new Error("cycle");return o}var n=tu,e=nu;return t.id=function(e){return arguments.length?(n=Wo(e),t):n},t.parentId=function(n){return arguments.length?(e=Wo(n),t):e},t};cu.prototype=Object.create(qo.prototype);var $y=function(){function t(t){var r=su(t);if(r.eachAfter(n),r.parent.m=-r.z,r.eachBefore(e),c)t.eachBefore(i);else{var s=t,f=t,l=t;t.eachBefore(function(t){t.x<s.x&&(s=t),t.x>f.x&&(f=t),t.depth>l.depth&&(l=t)});var h=s===f?1:o(s,f)/2,p=h-s.x,d=u/(f.x+h+p),v=a/(l.depth||1);t.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return t}function n(t){var n=t.children,e=t.parent.children,i=t.i?e[t.i-1]:null;if(n){uu(t);var u=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-u):t.z=u}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||e[0])}function e(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,n,e){if(n){for(var r,i=t,u=t,a=n,c=i.parent.children[0],s=i.m,f=u.m,l=a.m,h=c.m;a=iu(a),i=ru(i),a&&i;)c=ru(c),u=iu(u),u.a=t,r=a.z+l-i.z-s+o(a._,i._),r>0&&(ou(au(a,t,e),t,r),s+=r,f+=r),l+=a.m,s+=i.m,h+=c.m,f+=u.m;a&&!iu(u)&&(u.t=a,u.m+=l-f),i&&!ru(c)&&(c.t=i,c.m+=s-h,e=t)}return e}function i(t){t.x*=u,t.y=t.depth*a}var o=eu,u=1,a=1,c=null;return t.separation=function(n){return arguments.length?(o=n,t):o},t.size=function(n){return arguments.length?(c=!1,u=+n[0],a=+n[1],t):c?null:[u,a]},t.nodeSize=function(n){return arguments.length?(c=!0,u=+n[0],a=+n[1],t):c?[u,a]:null},t},Wy=function(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,s=t.value&&(i-e)/t.value;++a<c;)o=u[a],o.x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*s},Zy=(1+Math.sqrt(5))/2,Gy=function t(n){function e(t,e,r,i,o){fu(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(Zy),Jy=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(n),u=[0],r&&t.eachBefore(Iy),t}function n(t){var n=u[t.depth],r=t.x0+n,i=t.y0+n,o=t.x1-n,h=t.y1-n;o<r&&(r=o=(r+o)/2),h<i&&(i=h=(i+h)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=h,t.children&&(n=u[t.depth+1]=a(t)/2,r+=l(t)-n,i+=c(t)-n,o-=s(t)-n,h-=f(t)-n,o<r&&(r=o=(r+o)/2),h<i&&(i=h=(i+h)/2),e(t,r,i,o,h))}var e=Gy,r=!1,i=1,o=1,u=[0],a=Zo,c=Zo,s=Zo,f=Zo,l=Zo;return t.round=function(n){return arguments.length?(r=!!n,t):r},t.size=function(n){return arguments.length?(i=+n[0],o=+n[1],t):[i,o]},t.tile=function(n){return arguments.length?(e=Wo(n),t):e},t.padding=function(n){return arguments.length?t.paddingInner(n).paddingOuter(n):t.paddingInner()},t.paddingInner=function(n){return arguments.length?(a="function"==typeof n?n:Oy(+n),t):a},t.paddingOuter=function(n){return arguments.length?t.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n):t.paddingTop()},t.paddingTop=function(n){return arguments.length?(c="function"==typeof n?n:Oy(+n),t):c},t.paddingRight=function(n){return arguments.length?(s="function"==typeof n?n:Oy(+n),t):s},t.paddingBottom=function(n){return arguments.length?(f="function"==typeof n?n:Oy(+n),t):f},t.paddingLeft=function(n){return arguments.length?(l="function"==typeof n?n:Oy(+n),t):l},t},Qy=function(t,n,e,r,i){function o(t,n,e,r,i,u,a){if(t>=n-1){var s=c[t];return s.x0=r,s.y0=i,s.x1=u,s.y1=a,void 0}for(var l=f[t],h=e/2+l,p=t+1,d=n-1;p<d;){var v=p+d>>>1;f[v]<h?p=v+1:d=v}h-f[p-1]<f[p]-h&&t+1<p&&--p;var _=f[p]-l,g=e-_;if(u-r>a-i){var y=(r*g+u*_)/e;o(t,p,_,r,i,y,a),o(p,n,g,y,i,u,a)}else{var m=(i*g+a*_)/e;o(t,p,_,r,i,u,m),o(p,n,g,r,m,u,a)}}var u,a,c=t.children,s=c.length,f=new Array(s+1);for(f[0]=a=u=0;u<s;++u)f[u+1]=a+=c[u].value;o(0,s,t.value,n,e,r,i)
-},Ky=function(t,n,e,r,i){(1&t.depth?Wy:Yy)(t,n,e,r,i)},tm=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,s,f,l=-1,h=u.length,p=t.value;++l<h;){for(a=u[l],c=a.children,s=a.value=0,f=c.length;s<f;++s)a.value+=c[s].value;a.dice?Yy(a,e,r,i,r+=(o-r)*a.value/p):Wy(a,e,r,e+=(i-e)*a.value/p,o),p-=a.value}else t._squarify=u=fu(n,t,e,r,i,o),u.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(Zy),nm=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2},em=function(t){for(var n,e,r=-1,i=t.length,o=0,u=0,a=t[i-1],c=0;++r<i;)n=a,a=t[r],c+=e=n[0]*a[1]-a[0]*n[1],o+=(n[0]+a[0])*e,u+=(n[1]+a[1])*e;return c*=3,[o/c,u/c]},rm=function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])},im=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(lu),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=hu(r),u=hu(i),a=u[0]===o[0],c=u[u.length-1]===o[o.length-1],s=[];for(n=o.length-1;n>=0;--n)s.push(t[r[o[n]][2]]);for(n=+a;n<u.length-c;++n)s.push(t[r[u[n]][2]]);return s},om=function(t,n){for(var e,r,i=t.length,o=t[i-1],u=n[0],a=n[1],c=o[0],s=o[1],f=!1,l=0;l<i;++l)o=t[l],e=o[0],r=o[1],r>a!=s>a&&u<(c-e)*(a-r)/(s-r)+e&&(f=!f),c=e,s=r;return f},um=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r<i;)n=u,e=a,o=t[r],u=o[0],a=o[1],n-=u,e-=a,c+=Math.sqrt(n*n+e*e);return c},am=[].slice,cm={};pu.prototype=mu.prototype={constructor:pu,defer:function(t){if("function"!=typeof t||this._call)throw new Error;if(null!=this._error)return this;var n=am.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),du(this),this},abort:function(){return null==this._error&&gu(this,new Error("abort")),this},await:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=function(n,e){t.apply(null,[n].concat(e))},yu(this),this},awaitAll:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=t,yu(this),this}};var sm=function(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return Math.random()*n+t}},fm=function(t,n){var e,r;return t=null==t?0:+t,n=null==n?1:+n,function(){var i;if(null!=e)i=e,e=null;else do{e=2*Math.random()-1,i=2*Math.random()-1,r=e*e+i*i}while(!r||r>1);return t+n*i*Math.sqrt(-2*Math.log(r)/r)}},lm=function(){var t=fm.apply(this,arguments);return function(){return Math.exp(t())}},hm=function(t){return function(){for(var n=0,e=0;e<t;++e)n+=Math.random();return n}},pm=function(t){var n=hm(t);return function(){return n()/t}},dm=function(t){return function(){return-Math.log(1-Math.random())/t}},vm=function(t,n){function e(t){var n,e=s.status;if(!e&&bu(s)||e>=200&&e<300||304===e){if(o)try{n=o.call(r,s)}catch(t){return void a.call("error",r,t)}else n=s;a.call("load",r,n)}else a.call("error",r,t)}var r,i,o,u,a=v("beforesend","progress","load","error"),c=Be(),s=new XMLHttpRequest,f=null,l=null,h=0;if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=e:s.onreadystatechange=function(t){s.readyState>3&&e(t)},s.onprogress=function(t){a.call("progress",r,t)},r={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?c.get(t):(null==n?c.remove(t):c.set(t,n+""),r)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",r):i},responseType:function(t){return arguments.length?(u=t,r):u},timeout:function(t){return arguments.length?(h=+t,r):h},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",r)},password:function(t){return arguments.length<1?l:(l=null==t?null:t+"",r)},response:function(t){return o=t,r},get:function(t,n){return r.send("GET",t,n)},post:function(t,n){return r.send("POST",t,n)},send:function(n,e,o){return s.open(n,t,!0,f,l),null==i||c.has("accept")||c.set("accept",i+",*/*"),s.setRequestHeader&&c.each(function(t,n){s.setRequestHeader(n,t)}),null!=i&&s.overrideMimeType&&s.overrideMimeType(i),null!=u&&(s.responseType=u),h>0&&(s.timeout=h),null==o&&"function"==typeof e&&(o=e,e=null),null!=o&&1===o.length&&(o=xu(o)),null!=o&&r.on("error",o).on("load",function(t){o(null,t)}),a.call("beforesend",r,s),s.send(null==e?null:e),r},abort:function(){return s.abort(),r},on:function(){var t=a.on.apply(a,arguments);return t===a?r:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return r.get(n)}return r},_m=function(t,n){return function(e,r){var i=vm(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},gm=_m("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)}),ym=_m("application/json",function(t){return JSON.parse(t.responseText)}),mm=_m("text/plain",function(t){return t.responseText}),xm=_m("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n}),bm=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=vm(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(wu(n,r=t)):r},o.row(r),i?o.get(i):o}},wm=bm("text/csv",Fd),Mm=bm("text/tab-separated-values",Hd),Tm=Array.prototype,Sm=Tm.map,Nm=Tm.slice,km={name:"implicit"},Em=function(t){return function(){return t}},Am=function(t){return+t},Cm=[0,1],zm=function(n,e,r){var o,u=n[0],a=n[n.length-1],c=i(u,a,null==e?10:e);switch(r=hr(null==r?",f":r),r.type){case"s":var s=Math.max(Math.abs(u),Math.abs(a));return null!=r.precision||isNaN(o=Rv(c,s))||(r.precision=o),t.formatPrefix(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=qv(c,Math.max(Math.abs(u),Math.abs(a))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=Lv(c))||(r.precision=o-2*("%"===r.type))}return t.format(r)},Pm=function(t,n){t=t.slice();var e,r=0,i=t.length-1,o=t[r],u=t[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),t[r]=n.floor(o),t[i]=n.ceil(u),t},Lm=new Date,Rm=new Date,qm=Gu(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});qm.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Gu(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):qm:null};var Um=qm.range,Dm=6e4,Om=6048e5,Fm=Gu(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),Im=Fm.range,Ym=Gu(function(t){t.setTime(Math.floor(t/Dm)*Dm)},function(t,n){t.setTime(+t+n*Dm)},function(t,n){return(n-t)/Dm},function(t){return t.getMinutes()}),Bm=Ym.range,jm=Gu(function(t){var n=t.getTimezoneOffset()*Dm%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),Hm=jm.range,Xm=Gu(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Dm)/864e5},function(t){return t.getDate()-1}),Vm=Xm.range,$m=Ju(0),Wm=Ju(1),Zm=Ju(2),Gm=Ju(3),Jm=Ju(4),Qm=Ju(5),Km=Ju(6),tx=$m.range,nx=Wm.range,ex=Zm.range,rx=Gm.range,ix=Jm.range,ox=Qm.range,ux=Km.range,ax=Gu(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),cx=ax.range,sx=Gu(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});sx.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Gu(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var fx=sx.range,lx=Gu(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Dm)},function(t,n){return(n-t)/Dm},function(t){return t.getUTCMinutes()}),hx=lx.range,px=Gu(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),dx=px.range,vx=Gu(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),_x=vx.range,gx=Qu(0),yx=Qu(1),mx=Qu(2),xx=Qu(3),bx=Qu(4),wx=Qu(5),Mx=Qu(6),Tx=gx.range,Sx=yx.range,Nx=mx.range,kx=xx.range,Ex=bx.range,Ax=wx.range,Cx=Mx.range,zx=Gu(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),Px=zx.range,Lx=Gu(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Lx.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Gu(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var Rx,qx=Lx.range,Ux={"-":"",_:" ",0:"0"},Dx=/^\s*\d+/,Ox=/^%/,Fx=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;Ga({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ix=Date.prototype.toISOString?Ja:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),Yx=+new Date("2000-01-01T00:00:00.000Z")?Qa:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ"),Bx=1e3,jx=60*Bx,Hx=60*jx,Xx=24*Hx,Vx=7*Xx,$x=30*Xx,Wx=365*Xx,Zx=function(){return nc(sx,ax,$m,Xm,jm,Ym,Fm,qm,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},Gx=function(){return nc(Lx,zx,gx,vx,px,lx,Fm,qm,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},Jx=function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})},Qx=Jx("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Kx=Jx("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),tb=Jx("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),nb=Jx("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),eb=Fh($t(300,.5,0),$t(-240,.5,1)),rb=Fh($t(-100,.75,.35),$t(80,1.5,.8)),ib=Fh($t(260,.75,.35),$t(80,1.5,.8)),ob=$t(),ub=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return ob.h=360*t-100,ob.s=1.5-1.5*n,ob.l=.8-.9*n,ob+""},ab=ec(Jx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),cb=ec(Jx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sb=ec(Jx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fb=ec(Jx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),lb=function(t){return function(){return t}},hb=Math.abs,pb=Math.atan2,db=Math.cos,vb=Math.max,_b=Math.min,gb=Math.sin,yb=Math.sqrt,mb=1e-12,xb=Math.PI,bb=xb/2,wb=2*xb,Mb=function(){function t(){var t,s,f=+n.apply(this,arguments),l=+e.apply(this,arguments),h=o.apply(this,arguments)-bb,p=u.apply(this,arguments)-bb,d=hb(p-h),v=p>h;if(c||(c=t=qe()),l<f&&(s=l,l=f,f=s),l>mb)if(d>wb-mb)c.moveTo(l*db(h),l*gb(h)),c.arc(0,0,l,h,p,!v),f>mb&&(c.moveTo(f*db(p),f*gb(p)),c.arc(0,0,f,p,h,v));else{var _,g,y=h,m=p,x=h,b=p,w=d,M=d,T=a.apply(this,arguments)/2,S=T>mb&&(i?+i.apply(this,arguments):yb(f*f+l*l)),N=_b(hb(l-f)/2,+r.apply(this,arguments)),k=N,E=N;if(S>mb){var A=oc(S/f*gb(T)),C=oc(S/l*gb(T));(w-=2*A)>mb?(A*=v?1:-1,x+=A,b-=A):(w=0,x=b=(h+p)/2),(M-=2*C)>mb?(C*=v?1:-1,y+=C,m-=C):(M=0,y=m=(h+p)/2)}var z=l*db(y),P=l*gb(y),L=f*db(b),R=f*gb(b);if(N>mb){var q=l*db(m),U=l*gb(m),D=f*db(x),O=f*gb(x);if(d<xb){var F=w>mb?lc(z,P,D,O,q,U,L,R):[L,R],I=z-F[0],Y=P-F[1],B=q-F[0],j=U-F[1],H=1/gb(ic((I*B+Y*j)/(yb(I*I+Y*Y)*yb(B*B+j*j)))/2),X=yb(F[0]*F[0]+F[1]*F[1]);k=_b(N,(f-X)/(H-1)),E=_b(N,(l-X)/(H+1))}}M>mb?E>mb?(_=hc(D,O,z,P,l,E,v),g=hc(q,U,L,R,l,E,v),c.moveTo(_.cx+_.x01,_.cy+_.y01),E<N?c.arc(_.cx,_.cy,E,pb(_.y01,_.x01),pb(g.y01,g.x01),!v):(c.arc(_.cx,_.cy,E,pb(_.y01,_.x01),pb(_.y11,_.x11),!v),c.arc(0,0,l,pb(_.cy+_.y11,_.cx+_.x11),pb(g.cy+g.y11,g.cx+g.x11),!v),c.arc(g.cx,g.cy,E,pb(g.y11,g.x11),pb(g.y01,g.x01),!v))):(c.moveTo(z,P),c.arc(0,0,l,y,m,!v)):c.moveTo(z,P),f>mb&&w>mb?k>mb?(_=hc(L,R,q,U,f,-k,v),g=hc(z,P,D,O,f,-k,v),c.lineTo(_.cx+_.x01,_.cy+_.y01),k<N?c.arc(_.cx,_.cy,k,pb(_.y01,_.x01),pb(g.y01,g.x01),!v):(c.arc(_.cx,_.cy,k,pb(_.y01,_.x01),pb(_.y11,_.x11),!v),c.arc(0,0,f,pb(_.cy+_.y11,_.cx+_.x11),pb(g.cy+g.y11,g.cx+g.x11),v),c.arc(g.cx,g.cy,k,pb(g.y11,g.x11),pb(g.y01,g.x01),!v))):c.arc(0,0,f,b,x,v):c.lineTo(L,R)}else c.moveTo(0,0);if(c.closePath(),t)return c=null,t+""||null}var n=uc,e=ac,r=lb(0),i=null,o=cc,u=sc,a=fc,c=null;return t.centroid=function(){var t=(+n.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +u.apply(this,arguments))/2-xb/2;return[db(r)*t,gb(r)*t]},t.innerRadius=function(e){return arguments.length?(n="function"==typeof e?e:lb(+e),t):n},t.outerRadius=function(n){return arguments.length?(e="function"==typeof n?n:lb(+n),t):e},t.cornerRadius=function(n){return arguments.length?(r="function"==typeof n?n:lb(+n),t):r},t.padRadius=function(n){return arguments.length?(i=null==n?null:"function"==typeof n?n:lb(+n),t):i},t.startAngle=function(n){return arguments.length?(o="function"==typeof n?n:lb(+n),t):o},t.endAngle=function(n){return arguments.length?(u="function"==typeof n?n:lb(+n),t):u},t.padAngle=function(n){return arguments.length?(a="function"==typeof n?n:lb(+n),t):a},t.context=function(n){return arguments.length?(c=null==n?null:n,t):c},t};pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Tb=function(t){return new pc(t)},Sb=function(){function t(t){var a,c,s,f=t.length,l=!1;for(null==i&&(u=o(s=qe())),a=0;a<=f;++a)!(a<f&&r(c=t[a],a,t))===l&&((l=!l)?u.lineStart():u.lineEnd()),l&&u.point(+n(c,a,t),+e(c,a,t));if(s)return u=null,s+""||null}var n=dc,e=vc,r=lb(!0),i=null,o=Tb,u=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:lb(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:lb(+n),t):e},t.defined=function(n){return arguments.length?(r="function"==typeof n?n:lb(!!n),t):r},t.curve=function(n){return arguments.length?(o=n,null!=i&&(u=o(i)),t):o},t.context=function(n){return arguments.length?(null==n?i=u=null:u=o(i=n),t):i},t},Nb=function(){function t(t){var n,f,l,h,p,d=t.length,v=!1,_=new Array(d),g=new Array(d);for(null==a&&(s=c(p=qe())),n=0;n<=d;++n){if(!(n<d&&u(h=t[n],n,t))===v)if(v=!v)f=n,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),l=n-1;l>=f;--l)s.point(_[l],g[l]);s.lineEnd(),s.areaEnd()}v&&(_[n]=+e(h,n,t),g[n]=+i(h,n,t),s.point(r?+r(h,n,t):_[n],o?+o(h,n,t):g[n]))}if(p)return s=null,p+""||null}function n(){return Sb().defined(u).curve(c).context(a)}var e=dc,r=null,i=lb(0),o=vc,u=lb(!0),a=null,c=Tb,s=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:lb(+n),r=null,t):e},t.x0=function(n){return arguments.length?(e="function"==typeof n?n:lb(+n),t):e},t.x1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:lb(+n),t):r},t.y=function(n){return arguments.length?(i="function"==typeof n?n:lb(+n),o=null,t):i},t.y0=function(n){return arguments.length?(i="function"==typeof n?n:lb(+n),t):i},t.y1=function(n){return arguments.length?(o=null==n?null:"function"==typeof n?n:lb(+n),t):o},t.lineX0=t.lineY0=function(){return n().x(e).y(i)},t.lineY1=function(){return n().x(e).y(o)},t.lineX1=function(){return n().x(r).y(i)},t.defined=function(n){return arguments.length?(u="function"==typeof n?n:lb(!!n),t):u},t.curve=function(n){return arguments.length?(c=n,null!=a&&(s=c(a)),t):c},t.context=function(n){return arguments.length?(null==n?a=s=null:s=c(a=n),t):a},t},kb=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},Eb=function(t){return t},Ab=function(){function t(t){var a,c,s,f,l,h=t.length,p=0,d=new Array(h),v=new Array(h),_=+i.apply(this,arguments),g=Math.min(wb,Math.max(-wb,o.apply(this,arguments)-_)),y=Math.min(Math.abs(g)/h,u.apply(this,arguments)),m=y*(g<0?-1:1);for(a=0;a<h;++a)(l=v[d[a]=a]=+n(t[a],a,t))>0&&(p+=l);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=r&&d.sort(function(n,e){return r(t[n],t[e])}),a=0,s=p?(g-h*m)/p:0;a<h;++a,_=f)c=d[a],l=v[c],f=_+(l>0?l*s:0)+m,v[c]={data:t[c],index:a,value:l,startAngle:_,endAngle:f,padAngle:y};return v}var n=Eb,e=kb,r=null,i=lb(0),o=lb(wb),u=lb(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:lb(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,r=null,t):e},t.sort=function(n){return arguments.length?(r=n,e=null,t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:lb(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:lb(+n),t):o},t.padAngle=function(n){return arguments.length?(u="function"==typeof n?n:lb(+n),t):u},t},Cb=gc(Tb);_c.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var zb=function(){return yc(Sb().curve(Cb))},Pb=function(){var t=Nb().curve(Cb),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return yc(e())},delete t.lineX0,t.lineEndAngle=function(){return yc(r())},delete t.lineX1,t.lineInnerRadius=function(){return yc(i())},delete t.lineY0,t.lineOuterRadius=function(){return yc(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(gc(t)):n()._curve},t},Lb={draw:function(t,n){var e=Math.sqrt(n/xb);t.moveTo(e,0),t.arc(0,0,e,0,wb)}},Rb={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},qb=Math.sqrt(1/3),Ub=2*qb,Db={draw:function(t,n){var e=Math.sqrt(n/Ub),r=e*qb;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Ob=Math.sin(xb/10)/Math.sin(7*xb/10),Fb=Math.sin(wb/10)*Ob,Ib=-Math.cos(wb/10)*Ob,Yb={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=Fb*e,i=Ib*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=wb*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},Bb={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},jb=Math.sqrt(3),Hb={draw:function(t,n){var e=-Math.sqrt(n/(3*jb));t.moveTo(0,2*e),t.lineTo(-jb*e,-e),t.lineTo(jb*e,-e),t.closePath()}},Xb=-.5,Vb=Math.sqrt(3)/2,$b=1/Math.sqrt(12),Wb=3*($b/2+1),Zb={draw:function(t,n){var e=Math.sqrt(n/Wb),r=e/2,i=e*$b,o=r,u=e*$b+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(Xb*r-Vb*i,Vb*r+Xb*i),t.lineTo(Xb*o-Vb*u,Vb*o+Xb*u),t.lineTo(Xb*a-Vb*c,Vb*a+Xb*c),t.lineTo(Xb*r+Vb*i,Xb*i-Vb*r),t.lineTo(Xb*o+Vb*u,Xb*u-Vb*o),t.lineTo(Xb*a+Vb*c,Xb*c-Vb*a),t.closePath()}},Gb=[Lb,Rb,Db,Bb,Yb,Hb,Zb],Jb=function(){function t(){var t;if(r||(r=t=qe()),n.apply(this,arguments).draw(r,+e.apply(this,arguments)),t)return r=null,t+""||null}var n=lb(Lb),e=lb(64),r=null;return t.type=function(e){return arguments.length?(n="function"==typeof e?e:lb(e),t):n},t.size=function(n){return arguments.length?(e="function"==typeof n?n:lb(+n),t):e},t.context=function(n){return arguments.length?(r=null==n?null:n,t):r},t},Qb=function(){};xc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mc(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Kb=function(t){return new xc(t)};bc.prototype={areaStart:Qb,areaEnd:Qb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:mc(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var tw=function(t){return new bc(t)};wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:mc(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var nw=function(t){return new wc(t)};Mc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var ew=function t(n){function e(t){return 1===n?new xc(t):new Mc(t,n)}return e.beta=function(n){return t(+n)},e}(.85);Sc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tc(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Tc(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var rw=function t(n){function e(t){return new Sc(t,n)}return e.tension=function(n){return t(+n)},e}(0);Nc.prototype={areaStart:Qb,areaEnd:Qb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tc(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var iw=function t(n){function e(t){return new Nc(t,n)}return e.tension=function(n){return t(+n)},e}(0);kc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tc(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ow=function t(n){function e(t){return new kc(t,n)}return e.tension=function(n){return t(+n)},e}(0);Ac.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,
-this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Ec(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var uw=function t(n){function e(t){return n?new Ac(t,n):new Sc(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Cc.prototype={areaStart:Qb,areaEnd:Qb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Ec(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var aw=function t(n){function e(t){return n?new Cc(t,n):new Nc(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ec(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var cw=function t(n){function e(t){return n?new zc(t,n):new kc(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Pc.prototype={areaStart:Qb,areaEnd:Qb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var sw=function(t){return new Pc(t)};Dc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Uc(this,this._t0,qc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Uc(this,qc(this,e=Rc(this,t,n)),e);break;default:Uc(this,this._t0,e=Rc(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Oc.prototype=Object.create(Dc.prototype)).point=function(t,n){Dc.prototype.point.call(this,n,t)},Fc.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},Bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=jc(t),i=jc(n),o=0,u=1;u<e;++o,++u)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[u],n[u]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var fw=function(t){return new Bc(t)};Hc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var lw=function(t){return new Hc(t,.5)},hw=Array.prototype.slice,pw=function(t,n){if((r=t.length)>1)for(var e,r,i=1,o=t[n[0]],u=o.length;i<r;++i){e=o,o=t[n[i]];for(var a=0;a<u;++a)o[a][1]+=o[a][0]=isNaN(e[a][1])?e[a][0]:e[a][1]}},dw=function(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e},vw=function(){function t(t){var o,u,a=n.apply(this,arguments),c=t.length,s=a.length,f=new Array(s);for(o=0;o<s;++o){for(var l,h=a[o],p=f[o]=new Array(c),d=0;d<c;++d)p[d]=l=[0,+i(t[d],h,d,t)],l.data=t[d];p.key=h}for(o=0,u=e(f);o<s;++o)f[u[o]].index=o;return r(f,u),f}var n=lb([]),e=dw,r=pw,i=$c;return t.keys=function(e){return arguments.length?(n="function"==typeof e?e:lb(hw.call(e)),t):n},t.value=function(n){return arguments.length?(i="function"==typeof n?n:lb(+n),t):i},t.order=function(n){return arguments.length?(e=null==n?dw:"function"==typeof n?n:lb(hw.call(n)),t):e},t.offset=function(n){return arguments.length?(r=null==n?pw:n,t):r},t},_w=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,u=t[0].length;o<u;++o){for(i=e=0;e<r;++e)i+=t[e][o][1]||0;if(i)for(e=0;e<r;++e)t[e][o][1]/=i}pw(t,n)}},gw=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r<o;++r){for(var u=0,a=0;u<e;++u)a+=t[u][r][1]||0;i[r][1]+=i[r][0]=-a/2}pw(t,n)}},yw=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;u<r;++u){for(var a=0,c=0,s=0;a<i;++a){for(var f=t[n[a]],l=f[u][1]||0,h=f[u-1][1]||0,p=(l-h)/2,d=0;d<a;++d){var v=t[n[d]];p+=(v[u][1]||0)-(v[u-1][1]||0)}c+=l,s+=p*l}e[u-1][1]+=e[u-1][0]=o,c&&(o-=s/c)}e[u-1][1]+=e[u-1][0]=o,pw(t,n)}},mw=function(t){var n=t.map(Wc);return dw(t).sort(function(t,e){return n[t]-n[e]})},xw=function(t){return mw(t).reverse()},bw=function(t){var n,e,r=t.length,i=t.map(Wc),o=dw(t).sort(function(t,n){return i[n]-i[t]}),u=0,a=0,c=[],s=[];for(n=0;n<r;++n)e=o[n],u<a?(u+=i[e],c.push(e)):(a+=i[e],s.push(e));return s.reverse().concat(c)},ww=function(t){return dw(t).reverse()},Mw=function(t){return function(){return t}};Jc.prototype={constructor:Jc,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=ns(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Kc(this,e),t=e,e=t.U),e.C=!1,r.C=!0,ts(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(ts(this,e),t=e,e=t.U),e.C=!1,r.C=!0,Kc(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,u=t.R;if(e=o?u?ns(u):o:u,i?i.L===t?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==u?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=u,u.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,Kc(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,ts(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Kc(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,ts(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Kc(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,ts(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Tw,Sw,Nw,kw,Ew,Aw=[],Cw=[],zw=1e-6,Pw=1e-12;Ns.prototype={constructor:Ns,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return fs(n,t[e])});return e.data=n.site.data,e})},triangles:function(){var t=[],n=this.edges;return this.cells.forEach(function(e,r){if(o=(i=e.halfedges).length)for(var i,o,u,a=e.site,c=-1,s=n[i[o-1]],f=s.left===a?s.right:s.left;++c<o;)u=f,s=n[i[c]],f=s.left===a?s.right:s.left,u&&f&&r<u.index&&r<f.index&&Ts(a,u,f)<0&&t.push([a.data,u.data,f.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,n,e){for(var r,i,o=this,u=o._found||0,a=o.cells.length;!(i=o.cells[u]);)if(++u>=a)return null;var c=t-i.site[0],s=n-i.site[1],f=c*c+s*s;do{i=o.cells[r=u],u=null,i.halfedges.forEach(function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],s=n-a[1],l=c*c+s*s;l<f&&(f=l,u=a.index)}})}while(null!==u);return o._found=r,null==e||f<=e*e?i.site:null}};var Lw=function(){function t(t){return new Ns(t.map(function(r,i){var o=[Math.round(n(r,i,t)/zw)*zw,Math.round(e(r,i,t)/zw)*zw];return o.index=i,o.data=r,o}),r)}var n=Zc,e=Gc,r=null;return t.polygons=function(n){return t(n).polygons()},t.links=function(n){return t(n).links()},t.triangles=function(n){return t(n).triangles()},t.x=function(e){return arguments.length?(n="function"==typeof e?e:Mw(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:Mw(+n),t):e},t.extent=function(n){return arguments.length?(r=null==n?null:[[+n[0][0],+n[0][1]],[+n[1][0],+n[1][1]]],t):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},t.size=function(n){return arguments.length?(r=null==n?null:[[0,0],[+n[0],+n[1]]],t):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},t},Rw=function(t){return function(){return t}};Es.prototype={constructor:Es,scale:function(t){return 1===t?this:new Es(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Es(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var qw=new Es(1,0,0);As.prototype=Es.prototype;var Uw=function(){t.event.preventDefault(),t.event.stopImmediatePropagation()},Dw=function(){function n(t){}function e(t,n){return n=Math.max(x,Math.min(b,n)),n===t.k?t:new Es(n,t.x,t.y)}function r(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Es(t.k,r,i)}function i(t,n){var e=t.invertX(n[0][0])-w,r=t.invertX(n[1][0])-M,i=t.invertY(n[0][1])-T,o=t.invertY(n[1][1])-S;return t.translate(r>e?(e+r)/2:Math.min(0,e)||Math.max(0,r),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function o(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function u(t,n,e){t.on("start.zoom",function(){a(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){a(this,arguments).end()}).tween("zoom",function(){var t=this,r=arguments,i=a(t,r),u=m.apply(t,r),c=e||o(u),s=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,l="function"==typeof n?n.apply(t,r):n,h=k(f.invert(c).concat(s/f.k),l.invert(c).concat(s/l.k));return function(t){if(1===t)t=l;else{var n=h(t),e=s/n[2];t=new Es(e,c[0]-n[0]*e,c[1]-n[1]*e)}i.zoom(null,t)}})}function a(t,n){for(var e,r=0,i=E.length;r<i;++r)if((e=E[r]).that===t)return e;return new c(t,n)}function c(t,n){this.that=t,this.args=n,this.index=-1,this.active=0,this.extent=m.apply(t,n)}function s(){function n(){o.wheel=null,o.end()}if(y.apply(this,arguments)){var o=a(this,arguments),u=this.__zoom,c=Math.max(x,Math.min(b,u.k*Math.pow(2,-t.event.deltaY*(t.event.deltaMode?120:1)/500))),s=If(this);if(o.wheel)o.mouse[0][0]===s[0]&&o.mouse[0][1]===s[1]||(o.mouse[1]=u.invert(o.mouse[0]=s)),clearTimeout(o.wheel);else{if(u.k===c)return;o.mouse=[s,u.invert(s)],cp(this),o.start()}Uw(),o.wheel=setTimeout(n,P),o.zoom("mouse",i(r(e(u,c),o.mouse[0],o.mouse[1]),o.extent))}}function f(){function n(){Uw(),o.moved=!0,o.zoom("mouse",i(r(o.that.__zoom,o.mouse[0]=If(o.that),o.mouse[1]),o.extent))}function e(){u.on("mousemove.zoom mouseup.zoom",null),yt(t.event.view,o.moved),Uw(),o.end()}if(!g&&y.apply(this,arguments)){var o=a(this,arguments),u=wl(t.event.view).on("mousemove.zoom",n,!0).on("mouseup.zoom",e,!0),c=If(this);kl(t.event.view),Cs(),o.mouse=[c,this.__zoom.invert(c)],cp(this),o.start()}}function l(){if(y.apply(this,arguments)){var o=this.__zoom,a=If(this),c=o.invert(a),s=o.k*(t.event.shiftKey?.5:2),f=i(r(e(o,s),a,c),m.apply(this,arguments));Uw(),N>0?wl(this).transition().duration(N).call(u,f,a):wl(this).call(n.transform,f)}}function h(){if(y.apply(this,arguments)){var n,e,r,i,o=a(this,arguments),u=t.event.changedTouches,c=u.length;for(Cs(),e=0;e<c;++e)r=u[e],i=Tl(this,u,r.identifier),i=[i,this.__zoom.invert(i),r.identifier],o.touch0?o.touch1||(o.touch1=i):(o.touch0=i,n=!0);if(_&&(_=clearTimeout(_),!o.touch1))return o.end(),void((i=wl(this).on("dblclick.zoom"))&&i.apply(this,arguments));n&&(_=setTimeout(function(){_=null},z),cp(this),o.start())}}function p(){var n,o,u,c,s=a(this,arguments),f=t.event.changedTouches,l=f.length;for(Uw(),_&&(_=clearTimeout(_)),n=0;n<l;++n)o=f[n],u=Tl(this,f,o.identifier),s.touch0&&s.touch0[2]===o.identifier?s.touch0[0]=u:s.touch1&&s.touch1[2]===o.identifier&&(s.touch1[0]=u);if(o=s.that.__zoom,s.touch1){var h=s.touch0[0],p=s.touch0[1],d=s.touch1[0],v=s.touch1[1],g=(g=d[0]-h[0])*g+(g=d[1]-h[1])*g,y=(y=v[0]-p[0])*y+(y=v[1]-p[1])*y;o=e(o,Math.sqrt(g/y)),u=[(h[0]+d[0])/2,(h[1]+d[1])/2],c=[(p[0]+v[0])/2,(p[1]+v[1])/2]}else{if(!s.touch0)return;u=s.touch0[0],c=s.touch0[1]}s.zoom("touch",i(r(o,u,c),s.extent))}function d(){var n,e,r=a(this,arguments),i=t.event.changedTouches,o=i.length;for(Cs(),g&&clearTimeout(g),g=setTimeout(function(){g=null},z),n=0;n<o;++n)e=i[n],r.touch0&&r.touch0[2]===e.identifier?delete r.touch0:r.touch1&&r.touch1[2]===e.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0?r.touch0[1]=this.__zoom.invert(r.touch0[0]):r.end()}var _,g,y=zs,m=Ps,x=0,b=1/0,w=-b,M=b,T=w,S=M,N=250,k=Lh,E=[],C=v("start","zoom","end"),z=500,P=150;return n.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",Ls),t!==e?u(t,n):e.interrupt().each(function(){a(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},n.scaleBy=function(t,e){n.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)})},n.scaleTo=function(t,u){n.transform(t,function(){var t=m.apply(this,arguments),n=this.__zoom,a=o(t),c=n.invert(a);return i(r(e(n,"function"==typeof u?u.apply(this,arguments):u),a,c),t)})},n.translateBy=function(t,e,r){n.transform(t,function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),m.apply(this,arguments))})},c.prototype={start:function(){return 1==++this.active&&(this.index=E.push(this)-1,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(E.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){A(new ks(n,t,this.that.__zoom),C.apply,C,[t,this.that,this.args])}},n.filter=function(t){return arguments.length?(y="function"==typeof t?t:Rw(!!t),n):y},n.extent=function(t){return arguments.length?(m="function"==typeof t?t:Rw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),n):m},n.scaleExtent=function(t){return arguments.length?(x=+t[0],b=+t[1],n):[x,b]},n.translateExtent=function(t){return arguments.length?(w=+t[0][0],M=+t[1][0],T=+t[0][1],S=+t[1][1],n):[[w,T],[M,S]]},n.duration=function(t){return arguments.length?(N=+t,n):N},n.interpolate=function(t){return arguments.length?(k=t,n):k},n.on=function(){var t=C.on.apply(C,arguments);return t===C?n:t},n};t.version="4.8.0",t.bisect=Ds,t.bisectRight=Ds,t.bisectLeft=Os,t.ascending=Rs,t.bisector=qs,t.cross=Is,t.descending=Ys,t.deviation=Hs,t.extent=Xs,t.histogram=rf,t.thresholdFreedmanDiaconis=uf,t.thresholdScott=af,t.thresholdSturges=ef,t.max=cf,t.mean=sf,t.median=ff,t.merge=lf,t.min=hf,t.pairs=Fs,t.permute=pf,t.quantile=of,t.range=Js,t.scan=df,t.shuffle=vf,t.sum=_f,t.ticks=nf,t.tickIncrement=r,t.tickStep=i,t.transpose=gf,t.variance=js,t.zip=yf,t.axisTop=l,t.axisRight=h,t.axisBottom=p,t.axisLeft=d,t.brush=yd,t.brushX=Ce,t.brushY=ze,t.brushSelection=Ae,t.chord=Sd,t.ribbon=zd,t.nest=Pd,t.set=We,t.map=Be,t.keys=Rd,t.values=qd,t.entries=Ud,t.color=St,t.rgb=At,t.hsl=Lt,t.lab=Dt,t.hcl=Ht,t.cubehelix=$t,t.dispatch=v,t.drag=Al,t.dragDisable=kl,t.dragEnable=yt,t.dsvFormat=Dd,t.csvParse=Fd,t.csvParseRows=Id,t.csvFormat=Yd,t.csvFormatRows=Bd,t.tsvParse=Hd,t.tsvParseRows=Xd,t.tsvFormat=Vd,t.tsvFormatRows=$d,t.easeLinear=re,t.easeQuad=ue,t.easeQuadIn=ie,t.easeQuadOut=oe,t.easeQuadInOut=ue,t.easeCubic=se,t.easeCubicIn=ae,t.easeCubicOut=ce,t.easeCubicInOut=se,t.easePoly=Lp,t.easePolyIn=zp,t.easePolyOut=Pp,t.easePolyInOut=Lp,t.easeSin=he,t.easeSinIn=fe,t.easeSinOut=le,t.easeSinInOut=he,t.easeExp=ve,t.easeExpIn=pe,t.easeExpOut=de,t.easeExpInOut=ve,t.easeCircle=ye,t.easeCircleIn=_e,t.easeCircleOut=ge,t.easeCircleInOut=ye,t.easeBounce=xe,t.easeBounceIn=me,t.easeBounceOut=xe,t.easeBounceInOut=be,t.easeBack=Wp,t.easeBackIn=Vp,t.easeBackOut=$p,t.easeBackInOut=Wp,t.easeElastic=Jp,t.easeElasticIn=Gp,t.easeElasticOut=Jp,t.easeElasticInOut=Qp,t.forceCenter=Wd,t.forceCollide=hv,t.forceLink=pv,t.forceManyBody=gv,t.forceSimulation=_v,t.forceX=yv,t.forceY=mv,t.formatDefaultLocale=dr,t.formatLocale=Pv,t.formatSpecifier=hr,t.precisionFixed=Lv,t.precisionPrefix=Rv,t.precisionRound=qv,t.geoArea=I_,t.geoBounds=j_,t.geoCentroid=X_,t.geoCircle=ug,t.geoClipExtent=pg,t.geoContains=Tg,t.geoDistance=bg,t.geoGraticule=Mi,t.geoGraticule10=Ti,t.geoInterpolate=Sg,t.geoLength=yg,t.geoPath=Qg,t.geoAlbers=cy,t.geoAlbersUsa=sy,t.geoAzimuthalEqualArea=ly,t.geoAzimuthalEqualAreaRaw=fy,t.geoAzimuthalEquidistant=py,t.geoAzimuthalEquidistantRaw=hy,t.geoConicConformal=vy,t.geoConicConformalRaw=ho,t.geoConicEqualArea=ay,t.geoConicEqualAreaRaw=oo,t.geoConicEquidistant=gy,t.geoConicEquidistantRaw=vo,t.geoEquirectangular=_y,t.geoEquirectangularRaw=po,t.geoGnomonic=yy,t.geoGnomonicRaw=_o,t.geoIdentity=my,t.geoProjection=no,t.geoProjectionMutator=eo,t.geoMercator=dy,t.geoMercatorRaw=so,t.geoOrthographic=xy,t.geoOrthographicRaw=yo,t.geoStereographic=by,t.geoStereographicRaw=mo,t.geoTransverseMercator=wy,t.geoTransverseMercatorRaw=xo,t.geoRotation=og,t.geoStream=U_,t.geoTransform=ey,t.cluster=My,t.hierarchy=Co,t.pack=Fy,t.packSiblings=Dy,t.packEnclose=Uy,t.partition=By,t.stratify=Vy,t.tree=$y,t.treemap=Jy,t.treemapBinary=Qy,t.treemapDice=Yy,t.treemapSlice=Wy,t.treemapSliceDice=Ky,t.treemapSquarify=Gy,t.treemapResquarify=tm,t.interpolate=Sh,t.interpolateArray=yh,t.interpolateBasis=hh,t.interpolateBasisClosed=ph,t.interpolateDate=mh,t.interpolateNumber=xh,t.interpolateObject=bh,t.interpolateRound=Nh,t.interpolateString=Th,t.interpolateTransformCss=Ch,t.interpolateTransformSvg=zh,t.interpolateZoom=Lh,t.interpolateRgb=vh,t.interpolateRgbBasis=_h,t.interpolateRgbBasisClosed=gh,t.interpolateHsl=Rh,t.interpolateHslLong=qh,t.interpolateLab=hn,t.interpolateHcl=Uh,t.interpolateHclLong=Dh,t.interpolateCubehelix=Oh,t.interpolateCubehelixLong=Fh,t.quantize=Ih,t.path=qe,t.polygonArea=nm,t.polygonCentroid=em;t.polygonHull=im,t.polygonContains=om,t.polygonLength=um,t.quadtree=rr,t.queue=mu,t.randomUniform=sm,t.randomNormal=fm,t.randomLogNormal=lm,t.randomBates=pm,t.randomIrwinHall=hm,t.randomExponential=dm,t.request=vm,t.html=gm,t.json=ym,t.text=mm,t.xml=xm,t.csv=wm,t.tsv=Mm,t.scaleBand=Tu,t.scalePoint=Nu,t.scaleIdentity=Uu,t.scaleLinear=qu,t.scaleLog=ju,t.scaleOrdinal=Mu,t.scaleImplicit=km,t.scalePow=Xu,t.scaleSqrt=Vu,t.scaleQuantile=$u,t.scaleQuantize=Wu,t.scaleThreshold=Zu,t.scaleTime=Zx,t.scaleUtc=Gx,t.schemeCategory10=Qx,t.schemeCategory20b=Kx,t.schemeCategory20c=tb,t.schemeCategory20=nb,t.interpolateCubehelixDefault=eb,t.interpolateRainbow=ub,t.interpolateWarm=rb,t.interpolateCool=ib,t.interpolateViridis=ab,t.interpolateMagma=cb,t.interpolateInferno=sb,t.interpolatePlasma=fb,t.scaleSequential=rc,t.creator=Cf,t.local=w,t.matcher=qf,t.mouse=If,t.namespace=Af,t.namespaces=Ef,t.select=wl,t.selectAll=Ml,t.selection=_t,t.selector=Yf,t.selectorAll=jf,t.touch=Tl,t.touches=Sl,t.window=cl,t.customEvent=A,t.arc=Mb,t.area=Nb,t.line=Sb,t.pie=Ab,t.radialArea=Pb,t.radialLine=zb,t.symbol=Jb,t.symbols=Gb,t.symbolCircle=Lb,t.symbolCross=Rb,t.symbolDiamond=Db,t.symbolSquare=Bb,t.symbolStar=Yb,t.symbolTriangle=Hb,t.symbolWye=Zb,t.curveBasisClosed=tw,t.curveBasisOpen=nw,t.curveBasis=Kb,t.curveBundle=ew,t.curveCardinalClosed=iw,t.curveCardinalOpen=ow,t.curveCardinal=rw,t.curveCatmullRomClosed=aw,t.curveCatmullRomOpen=cw,t.curveCatmullRom=uw,t.curveLinearClosed=sw,t.curveLinear=Tb,t.curveMonotoneX=Ic,t.curveMonotoneY=Yc,t.curveNatural=fw,t.curveStep=lw,t.curveStepAfter=Vc,t.curveStepBefore=Xc,t.stack=vw,t.stackOffsetExpand=_w,t.stackOffsetNone=pw,t.stackOffsetSilhouette=gw,t.stackOffsetWiggle=yw,t.stackOrderAscending=mw,t.stackOrderDescending=xw,t.stackOrderInsideOut=bw,t.stackOrderNone=dw,t.stackOrderReverse=ww,t.timeInterval=Gu,t.timeMillisecond=qm,t.timeMilliseconds=Um,t.utcMillisecond=qm,t.utcMilliseconds=Um,t.timeSecond=Fm,t.timeSeconds=Im,t.utcSecond=Fm,t.utcSeconds=Im,t.timeMinute=Ym,t.timeMinutes=Bm,t.timeHour=jm,t.timeHours=Hm,t.timeDay=Xm,t.timeDays=Vm,t.timeWeek=$m,t.timeWeeks=tx,t.timeSunday=$m,t.timeSundays=tx,t.timeMonday=Wm,t.timeMondays=nx,t.timeTuesday=Zm,t.timeTuesdays=ex,t.timeWednesday=Gm,t.timeWednesdays=rx,t.timeThursday=Jm,t.timeThursdays=ix,t.timeFriday=Qm,t.timeFridays=ox,t.timeSaturday=Km,t.timeSaturdays=ux,t.timeMonth=ax,t.timeMonths=cx,t.timeYear=sx,t.timeYears=fx,t.utcMinute=lx,t.utcMinutes=hx,t.utcHour=px,t.utcHours=dx,t.utcDay=vx,t.utcDays=_x,t.utcWeek=gx,t.utcWeeks=Tx,t.utcSunday=gx,t.utcSundays=Tx,t.utcMonday=yx,t.utcMondays=Sx,t.utcTuesday=mx,t.utcTuesdays=Nx,t.utcWednesday=xx,t.utcWednesdays=kx,t.utcThursday=bx,t.utcThursdays=Ex,t.utcFriday=wx,t.utcFridays=Ax,t.utcSaturday=Mx,t.utcSaturdays=Cx,t.utcMonth=zx,t.utcMonths=Px,t.utcYear=Lx,t.utcYears=qx,t.timeFormatDefaultLocale=Ga,t.timeFormatLocale=ea,t.isoFormat=Ix,t.isoParse=Yx,t.now=vn,t.timer=yn,t.timerFlush=mn,t.timeout=Gh,t.interval=Jh,t.transition=ne,t.active=ed,t.interrupt=cp,t.voronoi=Lw,t.zoom=Dw,t.zoomTransform=As,t.zoomIdentity=qw,Object.defineProperty(t,"__esModule",{value:!0})});
-
-function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.dTree=t()}(this,function(){"use strict";var e=function(){function e(t,n,r){_classCallCheck(this,e),e.DEBUG_LEVEL=r.debug?1:0,this.root=t,this.siblings=n,this.opts=r,this.allNodes=this._flatten(this.root);var a=_.filter(this.allNodes,function(e){return!e.hidden});this.nodeSize=r.callbacks.nodeSize(a,r.nodeWidth,r.callbacks.textRenderer)}return _createClass(e,[{key:"create",value:function(){var e=this.opts,t=(this.allNodes,this.nodeSize),n=e.width+e.margin.left+e.margin.right,r=e.height+e.margin.top+e.margin.bottom,a=d3.zoom().scaleExtent([.1,10]).on("zoom",function(){i.attr("transform",d3.event.transform.translate(n/2,0))}),i=this.svg=d3.select(e.target).append("svg").attr("width",n).attr("height",r).call(a).append("g").attr("transform","translate("+n/2+",0)");this.tree=d3.tree().nodeSize([2*t[0],2.5*t[1]]),this.tree.separation(function(e,t){return e.data.hidden||t.data.hidden?.3:.6}),this._update(this.root)}},{key:"_update",value:function(e){var t=this.opts,n=(this.allNodes,this.nodeSize),r=this.tree(e),a=r.links();this.svg.selectAll(".link").data(a).enter().filter(function(e){return!e.target.data.noParent}).append("path").attr("class",t.styles.linage).attr("d",this._elbow);var i=this.svg.selectAll(".node").data(r.descendants()).enter();this._linkSiblings(),this.svg.selectAll(".sibling").data(this.siblings).enter().append("path").attr("class",t.styles.marriage).attr("d",_.bind(this._siblingLine,this)),i.append("foreignObject").filter(function(e){return!e.data.hidden}).attr("x",function(e){return e.x-e.cWidth/2+"px"}).attr("y",function(e){return e.y-e.cHeight/2+"px"}).attr("width",function(e){return e.cWidth+"px"}).attr("height",function(e){return e.cHeight+"px"}).attr("id",function(e){return e.id}).html(function(e){return t.callbacks.nodeRenderer(e.data.name,e.x,e.y,n[0],n[1],e.data.extra,e.data.id,e.data["class"],e.data.textClass,t.callbacks.textRenderer)}).on("click",function(e){e.data.hidden||t.callbacks.nodeClick(e.data.name,e.data.extra,e.data.id)})}},{key:"_flatten",value:function(e){function t(e){e.children&&e.children.forEach(t),e.id||(e.id=++r),n.push(e)}var n=[],r=0;return t(e),n}},{key:"_elbow",value:function(e,t){if(e.target.data.noParent)return"M0,0L0,0";var n=e.target.y+.5*(e.source.y-e.target.y),r=[{x:e.target.x,y:e.target.y},{x:e.target.x,y:n},{x:e.source.x,y:e.source.y}],a=d3.line().curve(d3.curveStepAfter).x(function(e){return e.x}).y(function(e){return e.y});return a(r)}},{key:"_linkSiblings",value:function(){var e=this.allNodes;_.forEach(this.siblings,function(t){var n=e.filter(function(e){return t.source.id==e.data.id}),r=e.filter(function(e){return t.target.id==e.data.id});t.source.x=n[0].x,t.source.y=n[0].y,t.target.x=r[0].x,t.target.y=r[0].y})}},{key:"_siblingLine",value:function(e,t){var n=e.target.y+.5*(e.source.y-e.target.y),r=this.nodeSize[0],a=this.nodeSize[1];e.number>0&&(n-=8*a/10);var i=[{x:e.source.x,y:e.source.y},{x:e.source.x+6*r/10,y:e.source.y},{x:e.source.x+6*r/10,y:n},{x:e.target.x-6*r/10,y:n},{x:e.target.x-6*r/10,y:e.target.y},{x:e.target.x,y:e.target.y}],s=d3.line().curve(d3.curveStepAfter).x(function(e){return e.x}).y(function(e){return e.y});return s(i)}}],[{key:"_nodeSize",value:function(e,t,n){var r=0,a=document.createElement("svg");return document.body.appendChild(a),_.map(e,function(e){var i=document.createElement("div");i.setAttribute("class",e.data["class"]),i.style.visibility="hidden",i.style.maxWidth=t+"px";var s=n(e.data.name,e.data.extra,e.data.textClass);i.innerHTML=s,a.appendChild(i);var o=16;a.removeChild(i),r=Math.max(r,o),e.cHeight=o,e.cWidth=t}),document.body.removeChild(a),[t,r]}},{key:"_nodeRenderer",value:function(e,t,n,r,a,i,s,o,d,c){var l="";return l+="<div ",l+='style="height:100%;width:100%;" ',l+='class="'+o+'" ',l+='id="node'+s+'">\n',l+=c(e,i,d),l+="</div>"}},{key:"_textRenderer",value:function(e,t,n){var r="";return r+="<p ",r+='align="center" ',r+='class="'+n+'">\n',r+=e,r+="</p>\n"}},{key:"_debug",value:function(t){e.DEBUG_LEVEL>0&&console.log(t)}}]),e}(),t={VERSION:"2.0.1",init:function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=_.defaultsDeep(n||{},{target:"#graph",debug:!1,width:600,height:600,callbacks:{nodeClick:function(e,t,n){},nodeRenderer:function(t,n,r,a,i,s,o,d,c,l){return e._nodeRenderer(t,n,r,a,i,s,o,d,c,l)},nodeSize:function(t,n,r){return e._nodeSize(t,n,r)},nodeSorter:function(e,t,n,r){return 0},textRenderer:function(t,n,r){return e._textRenderer(t,n,r)}},margin:{top:0,right:0,bottom:0,left:0},nodeWidth:100,styles:{node:"node",linage:"linage",marriage:"marriage",text:"nodeText"}}),t=this._preprocess(t,r),a=new e(t.root,t.siblings,r);a.create()},_preprocess:function(e,n){var r=[],a=0,i={name:"",id:a++,hidden:!0,children:[]},s=function o(e,s){var d={name:e.name,id:a++,hidden:!1,children:[],extra:e.extra,textClass:e.textClass?e.textClass:n.styles.text,"class":e["class"]?e["class"]:n.styles.node};s==i&&(d.noParent=!0);for(var c=0;c<e.depthOffset;c++){var l={name:"",id:a++,hidden:!0,children:[],noParent:d.noParent};s.children.push(l),s=l}t._sortPersons(e.children,n),_.forEach(e.children,function(e){o(e,d)}),s.children.push(d),t._sortMarriages(e.marriages,n),_.forEach(e.marriages,function(e,i){var c={name:"",id:a++,hidden:!0,noParent:!0,children:[],extra:e.extra},l=e.spouse,u={name:l.name,id:a++,hidden:!1,noParent:!0,children:[],textClass:l.textClass?l.textClass:n.styles.text,"class":l["class"]?l["class"]:n.styles.node,extra:l.extra};s.children.push(c,u),t._sortPersons(e.children,n),_.forEach(e.children,function(e){o(e,c)}),r.push({source:{id:d.id},target:{id:u.id},number:i})})};return _.forEach(e,function(e){s(e,i)}),{root:d3.hierarchy(i),siblings:r}},_sortPersons:function(e,t){return void 0!=e&&e.sort(function(e,n){return t.callbacks.nodeSorter(e.name,e.extra,n.name,n.extra)}),e},_sortMarriages:function(e,t){return void 0!=e&&Array.isArray(e)&&e.sort(function(e,n){var r=e.spouse,a=n.spouse;return t.callbacks.nodeSorter(r.name,r.extra,a.name,a.extra)}),e}};return t});
-}).call(window,window)
-
-/*:: FamilyTreeJS [script]*/
-'use strict';
-
-var lastActiveSlave, lastSlaves, lastPC;
-
-window.renderFamilyTree = function(slaves, filterID) {
-
-	var ftreeWidth,ftreeHeight;
-	var chartWidth, chartHeight;
-	var margin;
-	d3.select('#ftree-canvas').remove();
-	var svg = d3.select('#familyTree')
-		.append('svg')
-		.attr('id','ftree-canvas');
-	var chartLayer = svg.append('g').classed('chartLayer', true);
-
-	var range = 100;
-	var data = buildFamilyTree(slaves, filterID);
-
-	initFtreeSVG(data);
-	runFtreeSim(data);
-
-	function initFtreeSVG(data) {
-		ftreeWidth = data.nodes.length * 45;
-		ftreeHeight = data.nodes.length * 35;
-		if(ftreeWidth < 600) {
-			ftreeWidth = 600;
-		} else if(ftreeWidth > 1920) {
-			ftreeWidth = 1920;
-		}
-		if(ftreeHeight < 480) {
-			ftreeHeight = 480;
-		} else if(ftreeHeight > 1200) {
-			ftreeHeight = 1200;
-		}
-
-		margin = {top:0, left:0, bottom:0, right:0 }
-
-
-		chartWidth = ftreeWidth - (margin.left+margin.right)
-		chartHeight = ftreeHeight - (margin.top+margin.bottom)
-
-		svg.attr('width', ftreeWidth).attr('height', ftreeHeight)
-
-		var defs = svg.append('defs');
-
-		svg.append('defs').append('marker')
-			.attr('id','arrowhead')
-			.attr('viewBox','-0 -5 10 10')
-			.attr('refX',13)
-			.attr('refY',0)
-			.attr('orient','auto')
-			.attr('markerWidth',13)
-			.attr('markerHeight',13)
-			.attr('xoverflow','visible')
-			.append('svg:path')
-			.attr('d', 'M 0,-1 L 5,0 L 0,1')
-			.attr('fill', '#a1a1a1')
-			.style('stroke','none');
-
-		chartLayer
-			.attr('width', chartWidth)
-			.attr('height', chartHeight)
-			.attr('transform', 'translate('+[margin.left, margin.top]+')')
-	}
-
-	function runFtreeSim(data) {
-		var simulation = d3.forceSimulation()
-			.force('link', d3.forceLink().id(function(d) { return d.index }))
-			.force('collide',d3.forceCollide( function(d){ return 60; }).iterations(4) )
-			.force('charge', d3.forceManyBody().strength(-200).distanceMin(100).distanceMax(1000))
-			.force('center', d3.forceCenter(chartWidth / 2, chartHeight / 2))
-			.force('y', d3.forceY(100))
-			.force('x', d3.forceX(200))
-
-		var link = svg.append('g')
-			.attr('class', 'link')
-			.selectAll('link')
-			.data(data.links)
-			.enter()
-			.append('line')
-			.attr('marker-end','url(#arrowhead)')
-			.attr('stroke', function(d) {
-				if(d.type == 'homologous') {
-					return '#862d59';
-				} else if(d.type == 'paternal') {
-					return '#24478f';
-				} else {
-					return '#aa909b';
-				}
-			})
-			.attr('stroke-width', 2)
-			.attr('fill', 'none');
-
-		var node = svg.selectAll('.node')
-			.data(data.nodes)
-			.enter().append('g')
-			.attr('class', 'node')
-			.call(d3.drag()
-			.on('start', dragstarted)
-			.on('drag', dragged)
-			.on('end', dragended));
-
-		node.append('circle')
-			.attr('r', function(d){ return d.r })
-			.attr('stroke', function(d) {
-				if(d.ID == filterID) {
-					return '#ffff20';
-				} else {
-					return '#5a5a5a';
-				}
-			})
-			.attr('class', 'node-circle')
-			.attr('r', 20);
-
-		node.append('text')
-			.text(function(d) {
-				var ssym;
-				if(d.ID == -1) {
-					if(d.dick == 1 && d.vagina == 1) {
-						ssym = '☿'
-					} else if (d.dick == 1) {
-						ssym = '♂';
-					} else if (d.vagina == 1) {
-						ssym = '♀';
-					}
-				} else if (d.dick > 0 && d.vagina > -1) {
-					ssym = '☿'
-				} else if (d.dick > 0) {
-					ssym = '♂';
-				} else if (d.vagina > -1) {
-					ssym = '♀';
-				} else {
-					ssym = '?';
-				}
-				return d.name + '('+ssym+')';
-			})
-			.attr('dy', 4)
-			.attr('dx', function(d) { return -(8*d.name.length)/2; })
-			.attr('class', 'node-text')
-			.style('fill', function(d) {
-				if(d.is_mother && d.is_father) {
-					return '#b84dff';
-				} else if(d.is_father) {
-					return '#00ffff';
-				} else if(d.is_mother) {
-					return '#ff3399';
-				} else if(d.unborn) {
-					return '#a3a3c2';
-				} else {
-					return '#66cc66';
-				}
-			});
-
-		var circles = svg.selectAll('.node-circle');
-		var texts = svg.selectAll('.node-text');
-
-		var ticked = function() {
-			link
-				.attr('x1', function(d) { return d.source.x; })
-				.attr('y1', function(d) { return d.source.y; })
-				.attr('x2', function(d) { return d.target.x; })
-				.attr('y2', function(d) { return d.target.y; });
-
-			node
-				.attr("transform", function (d) {return "translate(" + d.x + ", " + d.y + ")";});
-		}
-
-		simulation.nodes(data.nodes)
-			.on('tick', ticked);
-
-		simulation.force('link')
-			.links(data.links);
-
-		function dragstarted(d) {
-			if (!d3.event.active) simulation.alphaTarget(0.3).restart();
-			d.fx = d.x;
-			d.fy = d.y;
-		}
-
-		function dragged(d) {
-			d.fx = d3.event.x;
-			d.fy = d3.event.y;
-		}
-
-		function dragended(d) {
-			if (!d3.event.active) simulation.alphaTarget(0);
-			d.fx = null;
-			d.fy = null;
-		}
-
-	}
-};
-
-window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
-	var family_graph = {
-		nodes: [],
-		links: []
-	};
-	var node_lookup = {};
-	var preset_lookup = {
-		'-2': 'A citizen',
-		'-3': 'Former master',
-		'-4': 'An arcology owner',
-		'-5': 'Client',
-		'-6': 'Social elite',
-		'-7': 'Gene lab'
-	};
-	var outdads = {};
-	var outmoms = {};
-	var kids = {};
-
-	var fake_pc = {
-		slaveName: State.variables.PC.name + '(You)',
-		mother: State.variables.PC.mother,
-		father: State.variables.PC.father,
-		dick: State.variables.PC.dick,
-		vagina: State.variables.PC.vagina,
-		ID: State.variables.PC.ID
-	};
-	var charList = [fake_pc];
-	charList.push.apply(charList, slaves);
-	charList.push.apply(charList, State.variables.tanks);
-
-	var unborn = {};
-	for(var i = 0; i < State.variables.tanks.length; i++) {
-		unborn[State.variables.tanks[i].ID] = true;
-	}
-	for (var i = 0; i < State.variables.cribs.length; i++) {
-		unborn[State.variables.cribs[i].ID] = true;
-	}
-
-	for(var i = 0; i < charList.length; i++) {
-		var mom = charList[i].mother;
-		var dad = charList[i].father;
-
-		if(mom) {
-			if(!kids[mom]) {
-				kids[mom] = {};
-			}
-			kids[mom].mother = true;
-		}
-		if(dad) {
-			if(!kids[dad]) {
-				kids[dad] = {};
-			}
-			kids[dad].father = true;
-		}
-	}
-
-	for(var i = 0; i < charList.length; i++) {
-		var character = charList[i];
-		if(character.mother == 0 && character.father == 0 && !kids[character.ID]) {
-			continue;
-		}
-		var mom = character.mother;
-		if(mom < -6) {
-			if (mom in State.variables.missingTable && State.variables.showMissingSlaves) {
-				node_lookup[mom] = family_graph.nodes.length;
-				var missing = State.variables.missingTable[mom];
-				charList.push({ID: mom, mother: 0, father: 0, is_mother: true, dick: missing.dick, vagina: missing.vagina, slaveName: missing.slaveName});
-			} else {
-				if(typeof outmoms[mom] == 'undefined') {
-					outmoms[mom] = [];
-				}
-				outmoms[mom].push(character.slaveName);
-			}
-		} else if(mom < 0 && typeof node_lookup[mom] == 'undefined' && typeof preset_lookup[mom] != 'undefined') {
-			node_lookup[mom] = family_graph.nodes.length;
-			charList.push({ID: mom, mother: 0, father: 0, is_father: true, dick: 0, vagina: 1, slaveName: preset_lookup[mom]});
-		}
-
-		var dad = character.father;
-		if(dad < -6) {
-			if (dad in State.variables.missingTable && State.variables.showMissingSlaves) {
-				node_lookup[dad] = family_graph.nodes.length;
-				var missing = State.variables.missingTable[dad];
-				charList.push({ID: dad, mother: 0, father: 0, is_father: true, dick: missing.dick, vagina: missing.vagina, slaveName: missing.slaveName});
-			} else {
-				if(typeof outdads[dad] == 'undefined') {
-					outdads[dad] = [];
-				}
-				outdads[dad].push(character.slaveName);
-			}
-		} else if(dad < 0 && typeof node_lookup[dad] == 'undefined' && typeof preset_lookup[dad] != 'undefined') {
-			node_lookup[dad] = family_graph.nodes.length;
-			charList.push({ID: dad, mother: 0, father: 0, is_father: true, dick: 1, vagina: -1, slaveName: preset_lookup[dad]});
-		}
-	}
-	var mkeys = Object.keys(outmoms);
-	for(var i = 0; i < mkeys.length; i++) {
-		var name;
-		var key = mkeys[i];
-		var names = outmoms[key];
-		if(names.length == 1) {
-			name = names[0];
-		} else if(names.length == 2) {
-			name = names.join(' and ');
-		} else {
-			names[-1] = 'and '+names[-1];
-			name = names.join(', ');
-		}
-		node_lookup[key] = family_graph.nodes.length;
-		//Outside extant slaves set
-		charList.push({ID: key, mother: 0, father: 0, is_mother: true, dick: 0, vagina: 1, slaveName: name+"'s mother"});
-	}
-
-	var dkeys = Object.keys(outdads);
-	for(var i = 0; i < dkeys.length; i++) {
-		var name;
-		var key = dkeys[i];
-		var names = outdads[key];
-		if(names.length == 1) {
-			name = names[0];
-		} else if(names.length == 2) {
-			name = names.join(' and ');
-		} else {
-			names[-1] = 'and '+names[-1];
-			name = names.join(', ');
-		}
-		node_lookup[key] = family_graph.nodes.length;
-		//Outside extant slaves set
-		charList.push({ID: key, mother: 0, father: 0, is_father: true, dick: 1, vagina: -1, slaveName: name+"'s father"});
-	}
-
-	var charHash = {};
-	for(var i = 0; i < charList.length; i++) {
-		charHash[charList[i].ID] = charList[i];
-	}
-
-	var related = {};
-	var seen = {};
-	var saveTree = {};
-	function relatedTo(character, targetID, relIDs = {tree: {}, related: false}) {
-		relIDs.tree[character.ID] = true;
-		if(related[character.ID]) {
-			relIDs.related = true;
-			return relIDs;
-		}
-		if(character.ID == targetID) {
-			relIDs.related = true;
-		}
-		if(seen[character.ID]) {
-			return relIDs;
-		}
-		seen[character.ID] = true;
-		if(character.mother != 0) {
-			if(charHash[character.mother]) {
-				relatedTo(charHash[character.mother], targetID, relIDs);
-			}
-		}
-		if(character.father != 0) {
-			if(charHash[character.father]) {
-				relatedTo(charHash[character.father], targetID, relIDs);
-			}
-		}
-		return relIDs;
-	}
-	if(filterID) {
-		if(charHash[filterID]) {
-			var relIDs = relatedTo(charHash[filterID], filterID);
-			for(var k in relIDs.tree) {
-				related[k] = true;
-			}
-			for(var i = 0; i < charList.length; i++) {
-				if(charHash[charList[i].ID]) {
-					var pRelIDs = relatedTo(charHash[charList[i].ID], filterID);
-					if(pRelIDs.related) {
-						for(var k in pRelIDs.tree) {
-							related[k] = true;
-							if(saveTree[k]) {
-								for(var k2 in saveTree[k].tree) {
-									related[k2] = true;
-								}
-							}
-						}
-					}
-					saveTree[charList[i].ID] = pRelIDs;
-				}
-			}
-		}
-	}
-
-	for(var i = 0; i < charList.length; i++) {
-		var character = charList[i];
-		var char_id = character.ID;
-		if(character.mother == 0 && character.father == 0 && !kids[char_id]) {
-			continue;
-		}
-		if(filterID && !related[char_id]) {
-			continue;
-		}
-		node_lookup[char_id] = family_graph.nodes.length;
-		var char_obj = {
-			ID: char_id,
-			name: character.slaveName,
-			dick: character.dick,
-			unborn: !!unborn[char_id],
-			vagina: character.vagina
-		};
-		if(kids[char_id]) {
-			char_obj.is_mother = !!kids[char_id].mother;
-			char_obj.is_father = !!kids[char_id].father;
-		} else {
-			char_obj.is_mother = false;
-			char_obj.is_father = false;
-		}
-		family_graph.nodes.push(char_obj);
-	}
-
-	for(var i = 0; i < charList.length; i++) {
-		var character = charList[i];
-		var char_id = character.ID;
-		if(character.mother == 0 && character.father == 0 && !kids[char_id]) {
-			continue;
-		}
-		if(filterID && !related[char_id]) {
-			if(related[character.mother]) {
-				console.log('wtf, mom');
-			}
-			if(related[character.father]) {
-				console.log('wtf, dad');
-			}
-			continue;
-		}
-		if(typeof node_lookup[character.mother] != 'undefined') {
-			var ltype;
-			if(character.mother == character.father) {
-				ltype = 'homologous';
-			} else {
-				ltype = 'maternal';
-			}
-			family_graph.links.push({
-				type: ltype,
-				target: node_lookup[char_id]*1,
-				source: node_lookup[character.mother]*1
-			});
-		}
-		if(character.mother == character.father) {
-			continue;
-		}
-		if(typeof node_lookup[character.father] != 'undefined') {
-			family_graph.links.push({
-				type: 'paternal',
-				target: node_lookup[char_id]*1,
-				source: node_lookup[character.father]*1
-			});
-		}
-	}
-	return family_graph;
-};
-
-window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastSlaves, PC = lastPC) {
-	lastActiveSlave = activeSlave;
-	lastSlaves = slaves;
-	lastPC = PC;
-	var treeDepth = 0;
-	var numTreeNodes = 0;
-
-	var graphElement = document.getElementById("graph");
-	if(!graphElement)
-		return;
-	graphElement.innerHTML = "";
-
-	/* The way this code works is that we start with the activeSlave then we call
-		slaveInfo() recursively to work our way up the tree finding their parents.
-
-	*/
-
-	function getSlave(id, expectedGenes) {
-		if(id == -1) {
-			return {"slaveName":"YOU", "ID":id, "physicalAge":PC.physicalAge, "genes":PC.genes, father:PC.father, mother:PC.mother};
-		}
-		if(id == 0) {
-			return {"slaveName":"-", "ID":id, "genes":expectedGenes};
-		}
-		if(id == activeSlave.ID) {
-			return activeSlave;
-		}
-		for(var i = 0; i < slaves.length; ++i) {
-			if(slaves[i].ID == id)
-				return slaves[i];
-			}
-		return {"slaveName":"-", "ID":id, "genes":expectedGenes};
-		}
-
-	function slaveInfo(slave, activeSlaveId, recursionProtectSlaveId = {}) {
-	numTreeNodes = 0;
-	treeDepth = 0;
-	if(recursionProtectSlaveId[slave.ID]) {
-		console.log("Recursion protection");
-		return slaveInfo_(slave, activeSlaveId);
-	}
-	recursionProtectSlaveId[slave.ID] = true;
-
-	if(typeof slave.father == "undefined" || typeof slave.mother == "undefined")
-		return slaveInfo_(slave, activeSlaveId);
-
-	if(slave.father == -1 || slave.mother == -1) {
-		return slaveInfo(getSlave(-1), activeSlaveId, recursionProtectSlaveId);
-	}
-	if(slave.father != 0) {
-		return slaveInfo(getSlave(slave.father, "unknownXY"), activeSlaveId, recursionProtectSlaveId);
-	}
-
-	if(slave.mother != 0) {
-		return slaveInfo(getSlave(slave.mother, "unknownXX"), activeSlaveId, recursionProtectSlaveId);
-	}
-	return slaveInfo_(slave, activeSlaveId);
-	}
-	function slaveInfo_(slave, activeSlaveId, slavesAdded={}, depth = 1) {
-	numTreeNodes += 1;
-	treeDepth = Math.max(treeDepth, depth);
-	var shouldAddChildren = false;
-	if(!slavesAdded[slave.ID]) {
-		shouldAddChildren = true;
-		slavesAdded[slave.ID] = true;
-	}
-	var data = {
-		"name": slave.slaveName + (slave.physicalAge?("&nbsp;(" + slave.physicalAge + ")"):""),
-		"class" : slave.genes,
-		"textClass": (activeSlaveId == slave.ID)?"emphasis":"",
-		"marriages": [],
-	};
-
-	var spouseToChild = {};
-
-	function maybeAddSpouseToChild(child) {
-		if(child.ID == slave.ID)
-		return;
-		if (child.father == slave.ID) {
-		if(!spouseToChild[child.mother]) {
-			spouseToChild[child.mother] = []
-		}
-		spouseToChild[child.mother].push(child);
-		} else if (child.mother == slave.ID) {
-		if(!spouseToChild[child.father]) {
-			spouseToChild[child.father] = []
-		}
-		spouseToChild[child.father].push(child);
-		}
-	}
-
-	if(activeSlave.ID != PC.ID)
-		maybeAddSpouseToChild(activeSlave);
-		maybeAddSpouseToChild(getSlave(-1));
-
-	for(var i = 0; i < slaves.length; ++i) {
-		var child = slaves[i];
-		if(child.ID != activeSlave.ID)
-		maybeAddSpouseToChild(child);
-	}
-
-	for(var key in spouseToChild) {
-		if(spouseToChild.hasOwnProperty(key)) {
-			var children = shouldAddChildren?spouseToChild[key]:[];
-			var spouse = getSlave(key, (slaves.genes=="XX")?"unknownXY":(slaves.genes=="XY")?"unknownXX":"unknown");
-			var spouseName;
-			if (spouse.ID != slave.ID){
-				spouseName = spouse.slaveName + (spouse.physicalAge?("&nbsp;(" + spouse.physicalAge + ")"):"")
-			} else {
-				spouseName = (spouse.ID==-1)?"(yourself)":"(themselves)";
-			}
-			var marriage = {
-				"spouse": {"name": spouseName, "class": spouse.genes},
-				"children": children.map(function(x) { return slaveInfo_(x, activeSlaveId, slavesAdded, depth+1)} ),
-			};
-			data.marriages.push(marriage);
-			}
-		}
-	return data;
-	}
-
-	if(activeSlave == PC || activeSlave == null)
-		activeSlave = getSlave(-1)
-		const treeData = [slaveInfo(activeSlave, activeSlave.ID)];
-		console.log("Family tree is", treeData, 'and has:', numTreeNodes);
-
-		var parentWidth = document.getElementById('editFamily').offsetWidth;
-
-		console.log(parentWidth, document.getElementById('passages').offsetWidth);
-		if(!parentWidth)
-			parentWidth = document.body.offsetWidth - 483;
-
-			console.log(parentWidth, Math.min(200 + 40*numTreeNodes,parentWidth-200) + 200);
-
-			dTree.init(treeData, {
-			target: "#graph",
-			debug: true,
-			height: 50 + 50*treeDepth, /* very rough heuristics */
-			width: Math.min(200 + 40*numTreeNodes,
-					parentWidth-200) + 200,
-			callbacks: {
-				nodeClick: function(name, extra) {
-			}
-		}
-	});
-
-};
-
-/*:: heroCreator.tw [script]*/
-
-window.getHeroSlave = function(heroSlave, baseHeroSlave) {
-	var newSlave = clone(baseHeroSlave);
-	for (var attrname in heroSlave) {
-		newSlave[attrname] = heroSlave[attrname];
-	};
-	return newSlave;
-}
-
-/*:: colorModeJS [script]*/
-
-window.flipColors = function (lightColorMap){
-	if ( !window.savedColorMap ){
-		window.savedColorMap = setColors(lightColorMap);
-	} else {
-		restoreColors(window.savedColorMap);
-		window.savedColorMap = null;
-	}
-}
-
-window.setColors = function(colorMap){
-	let originalState = [];
-	let props = ["color","backgroundColor","backgroundImage"];
-	let styleSheetArray = Array.from(document.styleSheets);
-	styleSheetArray.forEach( styleSheet => {
-		let cssRules = Array.from(styleSheet.cssRules);
-		cssRules.forEach( cssRule => {
-			if ( cssRule.type === 1 ){
-				props.forEach( propName => {
-					let currentValue = cssRule.style[propName];
-					if (
-						currentValue != "" &&
-						currentValue != "inherit" &&
-						currentValue != "transparent"){
-						let newVal = colorMap[currentValue];
-						if ( typeof newVal != "undefined" ){
-							cssRule.style[propName] = newVal;
-							originalState.push(
-								{
-									element: cssRule,
-									propName: propName,
-									value: currentValue
-								}
-							);
-						}
-					}
-				})
-			}
-		});
-	});
-	return originalState;
-}
-
-window.restoreColors = function(styleMap){
-	styleMap.forEach(
-		item => {
-			item.element.style[item.propName] = item.value
-		}
-	)
-}
-
-/*:: HTAG Macro JS [script]*/
-
-/*
- * <<htag>> macro
- * A simple macro which allows to create wrapping html elements with dynamic IDs.
- *	idea blatantly robbed from the spanMacroJS.tw but expanded to a more generic
- *	case, allowing <div>, <button> or whatever you want. elements, default is for
- *	the div though. In addition, you can pass an object in as the first argument
- *	instead of an id, and each of the object's attributes will become attributes
- *	of the generate tag.
- *
- * Usage: <<htag id>>...<</htag>>
- * Usage: <<htag id tag>>...<</htag>>
- * Usage: <<htag attributes>>...<</htag>>
- * Usage: <<htag attributes tag>>...<</htag>>
- */
-Macro.add('htag', {
-	tags: null,
-	handler() {
-		const payload = this.payload[0].contents.replace(/(^\n+|\n+$)/, '');
-		let htag = 'div';
-		let attributes;
-		function munge (val, key) {
-			return key + '="' + val + '"';
-		}
-
-		if (1 > this.args.length)
-			return this.error('invalid syntax, format: <<htag [id [ tag ] | attributes [ tag ] >>');
-		if (1 < this.args.length)
-			htag = String(this.args[1]).trim();
-		if ("object" === typeof this.args[0])
-			attributes = $.map(this.args[0], munge).join(" ");
-		else
-			attributes = 'id="' + String(this.args[0]).trim() + '"';
-		if (Config.debug)
-			this.debugView.modes({block: true});
-
-		jQuery('<' + htag + ' ' + attributes + ' />')
-			.wiki(payload)
-			.appendTo(this.output);
-	}
-});
-
-/*:: Quick List [script]*/
-
-window.sortDomObjects = function (objects, attrName, reverse = 0) {
-	reverse = (reverse) ? -1 : 1;
-	function sortingByAttr (a, b) {
-		var aVal = a.getAttribute(attrName);
-		var bVal = b.getAttribute(attrName);
-		var aInt = parseInt(aVal);
-		if (!isNaN(aInt))
-			return ((parseInt(bVal) - aInt) * reverse);
-		else if (bVal > aVal)
-			return -1 * reverse;
-		return ((aVal == bVal) ? 0 : 1) * reverse;
-	}
-	return objects.toArray().sort(sortingByAttr);
-};
-
-window.sortButtonsByDevotion = function () {
-	var $sortedButtons = $('#qlWrapper button').remove();
-	$sortedButtons = sortDomObjects($sortedButtons, 'data-devotion');
-	$($sortedButtons).appendTo($('#qlWrapper'));
-	quickListBuildLinks();
-};
-
-window.sortButtonsByTrust = function () {
-	var $sortedButtons = $('#qlWrapper button').remove();
-	$sortedButtons = sortDomObjects($sortedButtons, 'data-trust');
-	$($sortedButtons).appendTo($('#qlWrapper'));
-	quickListBuildLinks();
-};
-
-window.quickListBuildLinks = function () {
-	$("[data-scroll-to]").click(function() {
-		var $this = $(this), $toElement = $this.attr('data-scroll-to');
-		// note the * 1 enforces $offset to be an integer, without
-		// it we scroll to True, which goes nowhere fast.
-				var $offset = $this.attr('data-scroll-offset') * 1 || 0;
-				var $speed = $this.attr('data-scroll-speed') * 1 || 500;
-		// Use javascript scrollTop animation for in page navigation.
-		$('html, body').animate({
-			scrollTop: $($toElement).offset().top + $offset
-		}, $speed);
-	});
-};
-
-window.sortIncubatorPossiblesByName = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
-	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-name');
-	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
-};
-
-window.sortIncubatorPossiblesByPregnancyWeek = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
-	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-preg-week');
-	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
-};
-
-window.sortIncubatorPossiblesByPregnancyCount = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
-	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-preg-count');
-	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
-};
-
-window.sortIncubatorPossiblesByReservedSpots = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
-	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-reserved-spots');
-	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
-};
-
-window.sortIncubatorPossiblesByPreviousSort = function () {
-	var sort = State.variables.sortIncubatorList;
-	console.log(State.variables);
-	console.log('sort', sort);
-	if ('unsorted' !== sort) {
-		console.log("sort isn't unsorted", sort);
-		if ('Name' === sort) {
-			console.log("sort is name", sort);
-			sortIncubatorPossiblesByName();
-		} else if ('Reserved Incubator Spots' === sort) {
-			console.log("sort is spots", sort);
-			sortIncubatorPossiblesByReservedSpots();
-		} else if ('Pregnancy Week' === sort) {
-			console.log("sort is week", sort);
-			sortIncubatorPossiblesByPregnancyWeek();
-		} else if ('Number of Children' === sort) {
-			console.log("sort is count", sort);
-			sortIncubatorPossiblesByPregnancyCount();
-		}
-	}
-};
-
-window.sortNurseryPossiblesByName = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
-	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-name');
-	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
-};
-
-window.sortNurseryPossiblesByPregnancyWeek = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
-	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-preg-week');
-	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
-};
-
-window.sortNurseryPossiblesByPregnancyCount = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
-	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-preg-count');
-	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
-};
-
-window.sortNurseryPossiblesByReservedSpots = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
-	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-reserved-spots');
-	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
-};
-
-window.sortNurseryPossiblesByPreviousSort = function () {
-	var sort = State.variables.sortNurseryList;
-	console.log(State.variables);
-	console.log('sort', sort);
-	if ('unsorted' !== sort) {
-		console.log("sort isn't unsorted", sort);
-		if ('Name' === sort) {
-			console.log("sort is name", sort);
-			sortNurseryPossiblesByName();
-		} else if ('Reserved Nursery Spots' === sort) {
-			console.log("sort is spots", sort);
-			sortNurseryPossiblesByReservedSpots();
-		} else if ('Pregnancy Week' === sort) {
-			console.log("sort is week", sort);
-			sortNurseryPossiblesByPregnancyWeek();
-		} else if ('Number of Children' === sort) {
-			console.log("sort is count", sort);
-			sortNurseryPossiblesByPregnancyCount();
-		}
-	}
-};
-
-/*:: DefaultRules [script]*/
-// this code applies RA rules onto slaves
-
-window.DefaultRules = (function() {
-	"use strict";
-	let V;
-	let r;
-
-	function DefaultRules(slave) {
-		if (slave.useRulesAssistant === 0) return r; //exempted
-
-		V = State.variables;
-		r = "";
-		let rule = MergeRules(slave);
-		if (Object.keys(rule).length === 0) return r; // no rules apply
-
-		AssignJobToSlave(slave, rule);
-		if(slave.fuckdoll === 0) {
-			ProcessClothing(slave, rule);
-			ProcessCollar(slave, rule);
-			ProcessEyewear(slave, rule);
-			ProcessEarwear(slave, rule);
-			ProcessDildos(slave, rule);
-			ProcessDickAccessories(slave, rule);
-			ProcessAnalAccessories(slave, rule);
-			ProcessShoes(slave, rule);
-			ProcessBellyAccessories(slave, rule);
-			ProcessLegAccessory(slave, rule);
-		}
-		ProcessBellyImplant(slave, rule);
-		if (isFertile(slave))
-			ProcessContraceptives(slave, rule);
-		ProcessOtherDrugs(slave, rule);
-		ProcessAssetGrowthDrugs(slave, rule);
-		ProcessEnema(slave, rule);
-		ProcessDiet(slave, rule);
-		ProcessCuratives(slave, rule);
-		ProcessAphrodisiacs(slave, rule);
-		ProcessPenisHormones(slave, rule);
-		ProcessFemaleHormones(slave, rule);
-		ProcessPregnancyDrugs(slave, rule);
-		if(slave.fuckdoll === 0) {
-			ProcessLivingStandard(slave, rule);
-			ProcessSpeech(slave, rule);
-			ProcessRelationship(slave, rule);
-			ProcessRelease(slave, rule);
-			ProcessPunishment(slave, rule);
-			ProcessReward(slave, rule);
-		}
-		ProcessToyHole(slave, rule);
-		ProcessDietCum(slave, rule);
-		ProcessDietMilk(slave, rule);
-		if (V.arcologies[0].FSHedonisticDecadenceResearch === 1)
-			ProcessSolidFood(slave, rule);
-		ProcessTeeth(slave, rule);
-		ProcessStyle(slave, rule);
-		ProcessPiercings(slave, rule);
-		ProcessSmartPiercings(slave, rule);
-		ProcessTattoos(slave, rule);
-		ProcessPornFeedEnabled(slave, rule);
-		ProcessPorn(slave, rule);
-		ProcessLabel(slave, rule);
-		return r;
-	}
-
-	function MergeRules(slave) {
-		// merge all rules applying on a slave into one big rule
-		const rules = V.defaultRules.filter(x => ruleAppliesP(x.condition, slave));
-		slave.currentRules = rules.map(x => x.ID);
-		return mergeRules(rules.map(x => ProcessAssignments(slave, Object.assign({}, x.set))));
-	}
-
-	function ProcessAssignments(slave, rule) {
-		// Before merging rules, we process assignments for each rule separately so we can remove slaves from facilities when they no longer qualify, even if the final "winning" rule assigns them elsewhere
-		// We also ignore inapplicable assignments for the current slave, so we only merge assignments that are valid
-		switch (rule.setAssignment) {
-			case "no default setting":
-				delete rule.setAssignment;
-				break;
-
-			case "rest":
-			case "please you":
-			case "choose her own job":
-				// slaves always qualify for this assignment
-				break;
-
-			case "live with your Head Girl":
-				if ((V.HGSuiteSlaves < 1 && slave.indentureRestrictions <= 0))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "be confined in the arcade":
-				if ((V.arcadeSlaves < V.arcade && slave.indentureRestrictions <= 0 && (slave.breedingMark != 1 || V.propOutcome === 0)))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "serve in the master suite":
-				if ((V.masterSuiteSlaves < V.masterSuite && (slave.devotion > 20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20))))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "get treatment in the clinic":
-				if ((V.clinicSlaves < V.clinic && (slave.health < 20 || (slave.chem > 15 && V.Nurse !== 0 && V.clinicUpgradeFilters == 1)) || ((slave.bellyImplant > -1) && (V.bellyImplants == 1)) || slave.preg > 1))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "rest in the spa":
-				if ((V.spaSlaves < V.spa) && (slave.health < 20) || (slave.trust < 60) || (slave.devotion <= 60) || (slave.fetish == "mindbroken") && (slave.devotion >= -20))
-					break;
-				else {
-					RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "work as a nanny":
-				if ((V.nurserySlaves < V.nursery) && !slave.fuckdoll && (slave.devotion > 20 || slave.trust > 20))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "work in the brothel":
-				if ((V.brothelSlaves < V.brothel && (slave.devotion > 50 || slave.trust > 50 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)) && (slave.breedingMark != 1 || V.propOutcome === 0)))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "serve in the club":
-				if ((V.clubSlaves < V.club && (slave.devotion > 50 || slave.trust > 50 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)) && (slave.breedingMark != 1 || V.propOutcome === 0)))
-					break;
-				else {
-					RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "work in the dairy":
-				if ((V.dairy > V.dairySlaves+V.bioreactorsXY+V.bioreactorsXX+V.bioreactorsHerm+V.bioreactorsBarren)) {
-					if ((slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1))
-						break;
-					else if (((slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) || (slave.breedingMark == 1 && V.propOutcome == 1 && V.dairyRestriantsSettings > 0) || ((V.dairyPregSetting > 0) && ((slave.bellyImplant != -1) || (slave.broodmother !== 0))))
-						break;
-					else {
-						if ((slave.lactation > 0 || ((V.dairySlimMaintainUpgrade === 0 || V.dairySlimMaintain === 0) && (slave.boobs > 300 || slave.dick === 0 || V.dairyImplantsSetting == 1) && V.dairyImplantsSetting != 2)) || (slave.balls > 0)) {
-							if ((slave.devotion > 20) || ((slave.devotion >= -50) && (slave.trust < -20)) || (slave.trust < -50) || (slave.amp == 1) || (V.dairyRestraintsUpgrade == 1)) {
-								if ((V.dairyStimulatorsSetting < 2) || (slave.anus > 2) || (V.dairyPrepUpgrade == 1)) {
-									if ((V.dairyPregSetting < 2) || (slave.vagina > 2) || (slave.ovaries === 0) || (V.dairyPrepUpgrade == 1))
-										break;
-									else {
-										RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-										delete rule.setAssignment;
-									}
-								} else {
-									RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-									delete rule.setAssignment;
-								}
-							} else {
-								RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-								delete rule.setAssignment;
-							}
-						} else {
-							RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-							delete rule.setAssignment;
-						}
-					}
-				}
-				break;
-
-			case "work as a farmhand":
-				if ((V.farmyardSlaves < V.farmyard)) //TODO: rework these requirements
-					break;
-				else {
-					RAFacilityRemove(slave, rule);
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "work as a servant":
-				if ((V.servantsQuartersSlaves < V.servantsQuarters && canSee(slave) && canWalk(slave) && (slave.devotion >= -20 || slave.trust < -20 || (slave.devotion >= -50 && slave.trust <= 20))))
-					break;
-				else {
-					RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "learn in the schoolroom":
-				if ((V.schoolroomSlaves < V.schoolroom && slave.fetish != "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20))))
-					if ((slave.intelligenceImplant < 30) || (slave.voice !== 0 && slave.accent+V.schoolroomUpgradeLanguage > 2) || (slave.oralSkill <= 10+V.schoolroomUpgradeSkills*20) || (slave.whoreSkill <= 10+V.schoolroomUpgradeSkills*20) || (slave.entertainSkill <= 10+V.schoolroomUpgradeSkills*20) || (slave.analSkill < 10+V.schoolroomUpgradeSkills*20) || ((slave.vagina >= 0) && (slave.vaginalSkill < 10+V.schoolroomUpgradeSkills*20)))
-						break;
-					else {
-						RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-						delete rule.setAssignment;
-					}
-				else {
-					RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "be confined in the cellblock":
-				if ((V.cellblockSlaves < V.cellblock && ((slave.devotion < -20 && slave.trust >= -20) || (slave.devotion < -50 && slave.trust >= -50))))
-					break;
-				else {
-					RAFacilityRemove(slave,rule); // before deleting rule.setAssignment
-					delete rule.setAssignment;
-				}
-				break;
-
-			case "take classes":
-				if (slave.intelligenceImplant < 15 && slave.fetish != "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.trust < -20 && slave.devotion >= -50)))
-					break;
-				else
-					delete rule.setAssignment;
-				break;
-
-			case "choose her own job":
-				if ((slave.fetish != "mindbroken"))
-					break;
-				else
-					delete rule.setAssignment;
-				break;
-
-			case "get milked":
-				if ((slave.lactation > 0 || slave.balls > 0))
-					break;
-				else
-					delete rule.setAssignment;
-				break;
-
-			case "be a servant":
-				if ((canWalk(slave) && canSee(slave) && (slave.devotion >= -20 || slave.trust < -50 || (slave.trust < -20 && slave.devotion >= -50))))
-					break;
-				else
-					delete rule.setAssignment;
-				break;
-
-			case "work a glory hole":
-				if (slave.indentureRestrictions <= 0 && (slave.breedingMark != 1 || V.propOutcome === 0))
-					break;
-				else
-					delete rule.setAssignment;
-				break;
-
-			case "whore":
-			case "serve the public":
-			case "stay confined":
-				if ((slave.fuckdoll === 0) && (slave.breedingMark != 1 || V.propOutcome === 0))
-					break;
-				else
-					delete rule.setAssignment;
-				break;
-
-			default:
-				r += `<span class="red">raWidgets missing case for assignment 'V.{rule.setAssignment}'</span>.`;
-				break;
-		}
-		return rule;
-	}
-
-	function AssignJobToSlave(slave, rule) {
-		// place slave on assignment defined by the rule
-		if ((rule.setAssignment !== undefined && rule.setAssignment != "no default setting")) {
-			if (((rule.setAssignment == "choose her own job" && !slave.choosesOwnAssignment) || rule.setAssignment != slave.assignment)) {
-				switch (rule.setAssignment) {
-					case "live with your Head Girl":
-						r += `<br>${slave.slaveName} has been automatically assigned to live in your Head Girl's private suite.`;
-						break;
-					case "be confined in the arcade":
-						r += `<br>${slave.slaveName} has been automatically assigned to be confined in ${V.arcadeName}.`;
-						break;
-					case "serve in the master suite":
-						r += `<br>${slave.slaveName} has been automatically assigned to ${V.masterSuiteName}.`;
-						break;
-					case "get treatment in the clinic":
-						r += `<br>${slave.slaveName} has been automatically assigned to get treatment in ${V.clinicName}.`;
-						break;
-					case "rest in the spa":
-						r += `<br>${slave.slaveName} has been automatically assigned to rest in ${V.spaName}.`;
-						break;
-					case "work as a nanny":
-						r += `<br>${slave.slaveName} has been automatically assigned to work in ${V.nurseryName}.`;
-						break;
-					case "work in the brothel":
-						r += `<br>${slave.slaveName} has been automatically assigned to work in ${V.brothelName}.`;
-						break;
-					case "serve in the club":
-						r += `<br>${slave.slaveName} has been automatically assigned to serve in ${V.clubName}.`;
-						break;
-					case "work in the dairy":
-						r += `<br>${slave.slaveName} has been automatically assigned to be milked in ${V.dairyName}.`;
-						break;
-					case "work as a farmhand":
-						r += `<br>${slave.slaveName} has been automatically assigned to work in ${V.farmyardName}.`;
-						break;
-					case "work as a servant":
-						r += `<br>${slave.slaveName} has been automatically assigned to work in ${V.servantsQuartersName}.`;
-						break;
-					case "learn in the schoolroom":
-						r += `<br>${slave.slaveName} has been automatically assigned to study in ${V.schoolroomName}.`;
-						break;
-					case "be confined in the cellblock":
-						r += `<br>${slave.slaveName} has been automatically assigned to be confined in ${V.cellblockName}.`;
-						break;
-					case "choose her own job":
-						r += `<br>${slave.slaveName} is now allowed to select her own assignments.`;
-						break;
-					default:
-						r += `<br>${slave.slaveName} has been automatically assigned to ${rule.setAssignment}.`;
-						break;
-				}
-				assignJob(slave, rule.setAssignment);
-			}
-		}
-	}
-
-	function ProcessClothing(slave, rule) {
-		// apply clothes to slave
-		if ((rule.clothes !== undefined) && (rule.clothes !== "no default setting")) {
-			if ((rule.clothes == "choosing her own clothes")) {
-				if ((slave.choosesOwnClothes === 0)) {
-					slave.clothes = "choosing her own clothes";
-					slave.choosesOwnClothes = 1;
-					r += `<br>${slave.slaveName} is now allowed to choose her own clothes.`;
-				}
-			} else if ((slave.clothes !== rule.clothes)) {
-				slave.clothes = rule.clothes;
-				slave.choosesOwnClothes = 0;
-				r += `<br>${slave.slaveName} is now wearing ${slave.clothes}.`;
-			}
-		}
-	}
-
-	function ProcessCollar(slave, rule) {
-		// apply collar to slave
-		if ((rule.collar !== undefined) && (rule.collar != "no default setting")) {
-			if ((slave.collar !== rule.collar)) {
-				r += '<br>';
-				if (rule.collar == "preg biometrics" && slave.preg <= -1 && slave.ovaries === 0 && slave.mpreg === 0) {
-					slave.collar = "none";
-					r += `${slave.slaveName} cannot utilize preg biometrics. `;
-				} else if ((rule.collar == "massive dildo gag" && slave.oralSkill <= 50)) {
-					slave.collar = "none";
-					r += `${slave.slaveName} lacks the oral skill to successfully keep the massive dildo gag in her throat. `;
-				} else
-					slave.collar = rule.collar;
-				if ((slave.collar == "none"))
-					r += `${slave.slaveName} has been given no collar.`;
-				else if ((slave.collar == "pretty jewelry"))
-					r += `${slave.slaveName} has been given ${slave.collar}.`;
-				else if ((["dildo gag", "massive dildo gag", "ball gag", "bit gag", "neck corset", "porcelain mask", "bell collar", "bowtie"].includes(slave.collar)))
-					r += `${slave.slaveName} has been given a ${slave.collar}.`;
-				else
-					r += `${slave.slaveName} has been given a ${slave.collar} collar.`;
-			}
-		}
-	}
-
-	function ProcessEyewear(slave, rule) {
-		// apply glasses, contacts to slave
-		if ((rule.eyewear !== undefined) && (rule.eyewear !== "no default setting")) {
-			switch (rule.eyewear) {
-				case "correct with glasses":
-					if (slave.eyes == -1) {
-						if (slave.eyewear != "corrective glasses") {
-							slave.eyewear = "corrective glasses";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given corrective glasses.`;
-						}
-					} else {
-						if (slave.eyewear != "none") {
-							slave.eyewear = "none";
-							r += `<br>${slave.slaveName}'s eyewear has been removed.`;
-						}
-					}
-					break;
-
-				case "correct with contacts":
-					if (slave.eyes == -1) {
-						if (slave.eyewear != "corrective contacts") {
-							slave.eyewear = "corrective contacts";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given corrective contacts.`;
-						}
-					} else {
-						if (slave.eyewear != "none") {
-							slave.eyewear = "none";
-							r += `<br>${slave.slaveName}'s eyewear has been removed.`;
-						}
-					}
-					break;
-
-				case "blur with glasses":
-					if (slave.eyes > -1) {
-						if (slave.eyewear != "blurring glasses") {
-							slave.eyewear = "blurring glasses";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given blurring glasses.`;
-						}
-					} else {
-						if (slave.eyewear != "none") {
-							slave.eyewear = "none";
-							r += `<br>${slave.slaveName}'s eyewear has been removed.`;
-						}
-					}
-					break;
-
-				case "blur with contacts":
-					if (slave.eyes > -1) {
-						if (slave.eyewear != "blurring contacts") {
-							slave.eyewear = "blurring contacts";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given blurring contacts.`;
-						}
-					} else {
-						if (slave.eyewear != "none") {
-							slave.eyewear = "none";
-							r += `<br>${slave.slaveName}'s eyewear has been removed.`;
-						}
-					}
-					break;
-
-				case "universal glasses":
-					if (slave.eyes == -1) {
-						if (slave.eyewear != "corrective glasses") {
-							slave.eyewear = "corrective glasses";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given corrective glasses.`;
-						}
-					} else {
-						if (slave.eyewear != "glasses") {
-							slave.eyewear = "glasses";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given decorative glasses.`;
-						}
-					}
-					break;
-
-				default:
-					if (slave.eyewear != "none") {
-						slave.eyewear = "none";
-						r += `<br>${slave.slaveName}'s eyewear has been removed.`;
-					}
-					break;
-			}
-		}
-	}
-
-	function ProcessEarwear(slave, rule) {
-		// apply earplugs to slave
-		if ((rule.earwear !== undefined) && (rule.earwear !== "no default setting")) {
-			switch (rule.earwear) {
-				case "correct with hearing aids":
-					if (slave.hears == -1) {
-						if (slave.earwear != "hearing aids") {
-							slave.earwear = "hearing aids";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given hearing aids.`;
-						}
-					} else {
-						if (slave.earwear != "none") {
-							slave.earwear = "none";
-							r += `<br>${slave.slaveName}'s earwear has been removed.`;
-						}
-					}
-					break;
-
-				case "muffle with ear plugs":
-					if (slave.hears > -1) {
-						if (slave.earwear != "muffling ear plugs") {
-							slave.earwear = "muffling ear plugs";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given muffling ear plugs.`;
-						}
-					} else {
-						if (slave.earwear != "none") {
-							slave.earwear = "none";
-							r += `<br>${slave.slaveName}'s earwear has been removed.`;
-						}
-					}
-					break;
-
-				case "deafen with ear plugs":
-					if (slave.hears > -2) {
-						if (slave.earwear != "deafening ear plugs") {
-							slave.earwear = "deafening ear plugs";
-							cashX(forceNeg(V.modCost), "slaveMod", slave);
-							r += `<br>${slave.slaveName} has been given deafening ear plugs.`;
-						}
-					} else {
-						if (slave.earwear != "none") {
-							slave.earwear = "none";
-							r += `<br>${slave.slaveName}'s earwear has been removed.`;
-						}
-					}
-					break;
-
-				default:
-					if (slave.earwear != "none") {
-						slave.earwear = "none";
-						r += `<br>${slave.slaveName}'s earwear has been removed.`;
-					}
-					break;
-			}
-		}
-	}
-
-	function ProcessDildos(slave, rule) {
-		// apply vaginal dildos to slave
-		if (slave.vagina === 0)
-			ProcessVVirginDildos(slave, rule);
-		else if ((slave.vagina > 0) && (slave.anus === 0))
-			ProcessAVirginDildos(slave, rule);
-		else if (slave.vagina > 0)
-			ProcessNonVirginDildos(slave, rule);
-	}
-
-	function ProcessVVirginDildos(slave, rule) {
-		// apply vaginal dildos to varginal virgins
-		if ((rule.virginAccessory !== undefined) && (rule.virginAccessory !== "no default setting")) {
-			if (slave.vaginalAccessory !== rule.virginAccessory) {
-				slave.vaginalAccessory = rule.virginAccessory;
-				switch (slave.vaginalAccessory) {
-					case "huge dildo":
-						r += `<br>${slave.slaveName} is a virgin and has been given a `;
-						if (slave.vagina >= 2)
-							r += `massive dildo to permanently gape her cunt.`;
-						else {
-							r += `large dildo for her pussy, since it must be stretched before it can accommodate a huge one.`;
-							slave.vaginalAccessory = "large dildo";
-						}
-						break;
-
-					case "long dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length dildo for her pussy.`;
-							slave.vaginalAccessory = "dildo";
-						}
-						break;
-
-					case "long, large dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length large dildo for her pussy.`;
-							slave.vaginalAccessory = "large dildo";
-						}
-						break;
-
-					case "long, huge dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length huge dildo for her pussy.`;
-							slave.vaginalAccessory = "huge dildo";
-						} else {
-							r += `<br>slave.slaveName is a virgin and has been given a `;
-							if (slave.vagina >= 2)
-								r += `massive and oversized dildo to permanently gape her cunt.`;
-							else {
-								r += `long, large dildo for her pussy, since it must be stretched before it can accommodate a huge one.`;
-								slave.vaginalAccessory = "long, large dildo";
-							}
-						}
-						break;
-
-					case "none":
-						r += `<br>${slave.slaveName} is a virgin and has been instructed not to use a vaginal accessory.`;
-						break;
-
-					default:
-						r += `<br>${slave.slaveName} is a virgin and has been given a ${slave.vaginalAccessory} for her pussy.`;
-						break;
-				}
-			}
-		}
-	}
-
-	function ProcessAVirginDildos(slave, rule) {
-		// apply vaginal dildos to anal virgins
-		if ((rule.aVirginAccessory !== undefined) && (rule.aVirginAccessory !== "no default setting")) {
-			if (slave.vaginalAccessory !== rule.aVirginAccessory) {
-				slave.vaginalAccessory = rule.aVirginAccessory;
-				switch (slave.vaginalAccessory) {
-					case "huge dildo":
-						r += `<br>${slave.slaveName} is a virgin and has been given a `;
-						if (slave.vagina >= 2)
-							r += `massive dildo to permanently gape her cunt.`;
-						else {
-							r += `large dildo for her pussy, since it must be stretched before it can accommodate a huge one.`;
-							slave.vaginalAccessory = "large dildo";
-						}
-						break;
-
-					case "long dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length dildo for her pussy.`;
-							slave.vaginalAccessory = "dildo";
-						}
-						break;
-
-					case "long, large dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length large dildo for her pussy.`;
-							slave.vaginalAccessory = "large dildo";
-						}
-						break;
-
-					case "long, huge dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so the virgin ${slave.slaveName} has been given a standard length huge dildo for her pussy.`;
-							slave.vaginalAccessory = "huge dildo";
-						} else {
-							r += `<br>${slave.slaveName} is a virgin and has been given a `;
-							if (slave.vagina >= 2)
-								r += `massive and oversized dildo to permanently gape her cunt.`;
-							else {
-								r += `long, large dildo for her pussy, since it must be stretched before it can accommodate a huge one.`;
-								slave.vaginalAccessory = "long, large dildo";
-							}
-						}
-						break;
-
-					case "none":
-						r += `<br>slave.slaveName is a virgin and has been instructed not to use a vaginal accessory.`;
-						break;
-
-					default:
-						r += `<br>slave.slaveName is a virgin and has been given a ${slave.vaginalAccessory} for her pussy.`;
-						break;
-				}
-			}
-		}
-	}
-
-	function ProcessNonVirginDildos(slave, rule) {
-		// apply vaginal dildos to non-virgins
-		if ((rule.vaginalAccessory !== undefined) && (rule.vaginalAccessory !== "no default setting")) {
-			if (slave.vaginalAccessory !== rule.vaginalAccessory) {
-				slave.vaginalAccessory = rule.vaginalAccessory;
-				switch (slave.vaginalAccessory) {
-					case "huge dildo":
-						r += `<br>${slave.slaveName} has been given a `;
-						if (slave.vagina >= 2)
-							r += `massive dildo to permanently gape her cunt.`;
-						else {
-							r += `large dildo for her pussy, since it must be stretched before it can accommodate a huge one.`;
-							slave.vaginalAccessory = "large dildo";
-						}
-						break;
-
-					case "long dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so ${slave.slaveName} has been given a standard length dildo for her pussy.`;
-							slave.vaginalAccessory = "dildo";
-						}
-						break;
-
-					case "long, large dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so ${slave.slaveName} has been given a standard length large dildo for her pussy.`;
-							slave.vaginalAccessory = "large dildo";
-						}
-						break;
-
-					case "long, huge dildo":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of cervix penetrating dildos on marked slaves, so ${slave.slaveName} has been given a standard length huge dildo for her pussy.`;
-							slave.vaginalAccessory = "huge dildo";
-						} else {
-							r += `<br>${slave.slaveName} has been given a `;
-							if (slave.vagina >= 2)
-								r += `massive and oversized dildo to permanently gape her cunt.`;
-							else {
-								r += `long, large dildo for her pussy, since it must be stretched before it can accommodate a huge one.`;
-								slave.vaginalAccessory = "long, large dildo";
-							}
-						}
-						break;
-					case "none":
-						r += `<br>${slave.slaveName} has been instructed not to use a vaginal accessory.`;
-						break;
-
-					default:
-						r += `<br>${slave.slaveName} has been given a ${slave.vaginalAccessory} for her pussy.`;
-						break;
-				}
-			}
-		}
-	}
-
-	function ProcessDickAccessories(slave, rule) {
-		// apply dick accessories to slave
-		if ((slave.dick > 0)) {
-			if (slave.anus === 0) {
-				if ((rule.aVirginDickAccessory !== undefined) && (rule.aVirginDickAccessory !== "no default setting")) {
-					if ((slave.dickAccessory !== rule.aVirginDickAccessory)) {
-						slave.dickAccessory = rule.aVirginDickAccessory;
-						if (slave.dickAccessory == "none")
-							r += `<br>${slave.slaveName} is a virgin and has been instructed not to wear a dick accessory.`;
-						else
-							r += `<br>${slave.slaveName} is a virgin and has been given a ${slave.dickAccessory} accessory for her cock.`;
-					}
-				}
-			} else {
-				if ((rule.dickAccessory !== undefined) && (rule.dickAccessory !== "no default setting")) {
-					if ((slave.dickAccessory !== rule.dickAccessory)) {
-						slave.dickAccessory = rule.dickAccessory;
-						if (slave.dickAccessory == "none")
-							r += `<br>${slave.slaveName} has been instructed not to wear a dick accessory.`;
-						else
-							r += `<br>${slave.slaveName} has been given a ${slave.dickAccessory} accessory for her cock.`;
-					}
-				}
-			}
-		}
-	}
-
-	function ProcessShoes(slave, rule) {
-		// apply shoes to slave
-		if ((rule.shoes !== undefined) && (rule.shoes !== "no default setting")) {
-			if ((slave.shoes !== rule.shoes)) {
-				if ((slave.amp != 1)) {
-					slave.shoes = rule.shoes;
-					r += `<br>${slave.slaveName}'s shoes have been set to ${slave.shoes}.`;
-				}
-			}
-		}
-	}
-
-	function ProcessBellyAccessories(slave, rule) {
-		// apply belly accessories to slave
-		if ((rule.bellyAccessory !== undefined) && (rule.bellyAccessory !== "no default setting")) {
-			if ((slave.bellyAccessory !== rule.bellyAccessory)) {
-				if ((slave.belly >= 1500 || slave.weight >= 130) && setup.fakeBellies.includes(rule.bellyAccessory)) {
-					r += `<br>${slave.slaveName}'s natural belly is too big to properly wear an empathy belly.`;
-					slave.bellyAccessory = "none";
-				} else {
-					slave.bellyAccessory = rule.bellyAccessory;
-					if (slave.bellyAccessory == "none")
-						r += `<br>${slave.slaveName} has been instructed not to wear a torso accessory.`;
-					else
-						r += `<br>${slave.slaveName} has been given ${slave.bellyAccessory} to wear.`;
-				}
-			}
-		}
-	}
-
-	function ProcessLegAccessory(slave, rule) {
-		if (rule.legAccessory !== undefined && rule.legAccessory !== "no default setting" && slave.amp !== 1 && slave.legAccessory !== rule.legAccessory) {
-			slave.legAccessory = rule.legAccessory;
-			r += `<br>${slave.slaveName}'s leg accessory was set to ${rule.legAccessory}.`;
-		}
-	}
-
-	function ProcessAnalAccessories(slave, rule) {
-		// apply buttplugs and buttplug accessories to slave
-		if ((slave.vaginalAccessory !== "anal chastity") && (slave.vaginalAccessory !== "combined chastity") && (slave.dickAccessory !== "anal chastity") && (slave.dickAccessory !== "combined chastity")) {
-			if (slave.anus === 0)
-				ProcessAnalVirginButtplugs(slave, rule);
-			else
-				ProcessNonVirginButtplugs(slave, rule);
-		}
-		ProcessButtplugAttachments(slave, rule);
-	}
-
-	function ProcessAnalVirginButtplugs(slave, rule) {
-		// apply buttplugs to virgins
-		if ((rule.aVirginButtplug !== undefined) && (rule.aVirginButtplug !== "no default setting")) {
-			if ((slave.buttplug !== rule.aVirginButtplug)) {
-				slave.buttplug = rule.aVirginButtplug;
-				switch (slave.buttplug) {
-					case "huge plug":
-						r += `<br>${slave.slaveName} is an anal virgin and has been given a `;
-						if ((slave.anus >= 2))
-							r += `massive plug to permanently gape her asshole.`;
-						else {
-							slave.buttplug = "large plug";
-							r += `large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.`;
-						}
-						break;
-
-					case "long plug":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so the anal virgin ${slave.slaveName} has been given a standard length plug for her anus.`;
-							slave.buttplug = "plug";
-						}
-						break;
-
-					case "long, large plug":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so the anal virgin ${slave.slaveName} has been given a standard length large plug for her anus.`;
-							slave.buttplug = "large plug";
-						}
-						break;
-
-					case "long, huge plug":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so the anal virgin ${slave.slaveName} has been given a standard length huge plug for her anus.`;
-							slave.buttplug = "huge plug";
-						} else {
-							r += `<br>slave.slaveName is an anal virgin and has been given a `;
-							if (slave.anus >= 2)
-								r += `massive and oversized plug to permanently gape her asshole.`;
-							else {
-								r += `long, large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.`;
-								slave.buttplug = "long, large plug";
-							}
-						}
-						break;
-
-					case "none":
-						r += `<br>${slave.slaveName} is an anal virgin and has been instructed not to use an anal accessory.`;
-						break;
-
-					default:
-						r += `<br>${slave.slaveName} is an anal virgin and has been given a ${slave.buttplug} for her asshole.`;
-						break;
-				}
-			}
-		}
-	}
-
-	function ProcessNonVirginButtplugs(slave, rule) {
-		// apply buttplugs to non-virgins
-		if ((rule.buttplug !== undefined) && (rule.buttplug !== "no default setting")) {
-			if ((slave.buttplug !== rule.buttplug)) {
-				slave.buttplug = rule.buttplug;
-				switch (slave.buttplug) {
-					case "huge plug":
-						r += `<br>${slave.slaveName} has been given a `;
-						if ((slave.anus >= 2))
-							r += `massive plug to permanently gape her asshole.`;
-						else {
-							slave.buttplug = "large plug";
-							r += `large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.`;
-						}
-						break;
-
-					case "long plug":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so ${slave.slaveName} has been given a standard length plug for her anus.`;
-							slave.buttplug = "plug";
-						}
-						break;
-
-					case "long, large plug":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so ${slave.slaveName} has been given a standard length large plug for her anus.`;
-							slave.buttplug = "large plug";
-						}
-						break;
-
-					case "long, huge plug":
-						if (slave.breedingMark == 1 && V.propOutcome == 1) {
-							r += `<br>Breeding regulations forbid the use of anal plugs that can damage a growing fetus on marked slaves, so ${slave.slaveName} has been given a standard length huge plug for her anus.`;
-							slave.buttplug = "huge plug";
-						} else {
-							r += `<br>${slave.slaveName} has been given a `;
-							if (slave.anus >= 2)
-								r += `massive and oversized plug to permanently gape her asshole.`;
-							else {
-								r += `long, large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.`;
-								slave.buttplug = "long, large plug";
-							}
-						}
-						break;
-
-					case "none":
-						r += `<br>${slave.slaveName} has been instructed not to use an anal accessory.`;
-						break;
-
-					default:
-						r += `<br>${slave.slaveName} has been given a ${slave.buttplug} for her asshole.`;
-						break;
-				}
-			}
-		}
-	}
-
-	function ProcessButtplugAttachments(slave, rule) {
-		// apply buttplug accessories to slaves
-		if (slave.buttplug === "none" && slave.buttplugAttachment !== "none") {
-			slave.buttplugAttachment = "none"; //clears buttplug attachments when buttplugs are removed above
-		} else if ((rule.buttplugAttachment !== undefined) && (rule.buttplugAttachment !== "no default setting")) {
-			if ((slave.buttplugAttachment !== rule.buttplugAttachment)) {
-				slave.buttplugAttachment = rule.buttplugAttachment;
-				switch (slave.buttplugAttachment) {
-
-					case "none":
-						r += `<br>${slave.slaveName} has been instructed not to use an attachment for her anal accessory.`;
-						break;
-
-					default:
-						r += `<br>${slave.slaveName} has been given a ${slave.buttplugAttachment} to attach to her buttplug.`;
-						break;
-				}
-			}
-		}
-	}
-
-	function ProcessBellyImplant(slave, rule) {
-		// Here is belly implant size control, it's used in Surgery Degradation passage to setup devotion and trust changes.
-		// silent calls to surgery degradation have been replaced with a js function, which is less hacky
-		if ((rule.bellyImplantVol !== undefined) && slave.bellyImplant >= 0 && rule.bellyImplantVol >= 0) {
-			r += "<br>";
-			if (slave.health > -10 ) {
-				let diff = rule.bellyImplantVol - slave.bellyImplant;
-				if (diff >= 5000 && slave.bellyPain === 0 && slave.health > 50) {
-					r += `${slave.slaveName}'s belly is way too small, so she has been directed to have intensive belly implant filling procedures throughout this week.`;
-					slave.bellyImplant += 1000;
-					slave.bellyPain += 2;
-					BellySurgery(slave, diff);
-				} else if (diff >= 500 && slave.bellyPain < 2 ) {
-					r += `${slave.slaveName}'s belly has not reached the desired size, so she has been directed to have belly implant filling procedures throughout this week.`;
-					slave.bellyImplant += 500;
-					slave.bellyPain += 1;
-					BellySurgery(slave, diff);
-				} else if (diff <= -5000 ) {
-					r += `${slave.slaveName}'s belly is way too big, so she has been directed to have intensive belly implant draining procedures throughout this week.`;
-					slave.bellyImplant -= 1000;
-					BellySurgery(slave, diff);
-				} else if (diff <= -500 ) {
-					r += `${slave.slaveName}'s belly is too big, so she has been directed to have belly implant draining procedures throughout this week.`;
-					slave.bellyImplant -= 500;
-					BellySurgery(slave, diff);
-				}
-			} else {
-				r += `${slave.slaveName} is not healthy enough to safely adjust her belly implant.`;
-			}
-		}
-	}
-
-	function BellySurgery(slave, volume) {
-		// this is a port of the belly implant portion of surgeryDegradation.tw
-		// that way, we don't have to use ugly hacks
-		// the original still exists, and may be worth replacing
-		if (volume > 0) { // bellyUp
-			SetBellySize(slave);
-			if (slave.bellyPain === 1) {
-				if (slave.devotion > 50) {
-					slave.devotion += 4;
-				} else if (slave.devotion >= -20) {
-					slave.trust -= 5;
-				} else {
-					slave.trust -= 10;
-					slave.devotion -= 5;
-				}
-			} else if (slave.bellyPain === 2) {
-				if (slave.devotion > 50) {
-					slave.devotion += 2;
-				} else if (slave.devotion >= -20) {
-					slave.trust -= 7;
-				} else {
-					slave.trust -= 12;
-					slave.devotion -= 7;
-				}
-			}
-		} else { // bellyDown
-			if (slave.bellyImplant < 0)
-				slave.bellyImplant = 0;
-			SetBellySize(slave);
-			if (slave.devotion > 50) {
-				slave.devotion += 3;
-				slave.trust += 3;
-			} else if (slave.devotion >= -20) {
-				slave.trust += 2;
-			} else {
-				slave.devotion += 1;
-				slave.trust -= 10;
-			}
-		}
-	}
-
-	function ProcessContraceptives(slave, rule) {
-		if ((rule.preg !== undefined) && (rule.preg !== "no default setting")) {
-			if (rule.preg === true && slave.preg === 0) {
-				r += `<br>${slave.slaveName} is being given contraceptives.`;
-				slave.preg = -1;
-			} else if (slave.preg === -1 && rule.preg === false) {
-				r += `<br>${slave.slaveName} is no longer being put on contraceptives.`;
-				slave.preg = 0;
-			}
-		}
-	}
-
-	function ProcessAssetGrowthDrugs(slave, rule) {
-		// Asset Growth
-		const growth_drugs = new Set(["breast injections", "breast redistributors", "butt injections", "butt redistributors", "hyper breast injections", "hyper butt injections", "hyper penis enhancement", "hyper testicle enhancement", "intensive breast injections", "intensive butt injections", "intensive penis enhancement", "intensive testicle enhancement", "lip atrophiers", "lip injections", "penis atrophiers", "penis enhancement", "testicle atrophiers", "testicle enhancement"]);
-		if ((slave.drugs == "super fertility drugs" || slave.drugs == "fertility drugs") && isFertile(slave)) {
-			r += `<br>${slave.slaveName} is on ${slave.drugs} and will not be considered for drug enhancement until that regime is complete.`;
-			return;
-		} else if ((rule.growth_boobs == "no default setting" && rule.growth_butt == "no default setting" && rule.growth_lips == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_balls == "no default setting")) {
-			return;
-		}
-		if (!rule.hyper_drugs) { // More resource intensive version with prioritizing.
-			let _priorities = [];
-			if (rule.growth_boobs != "no default setting") {
-				let _priority;
-				if (slave.boobs < rule.growth_boobs) {
-					_priority = {drug: "breast injections", weight: (rule.growth_boobs-slave.boobs)/rule.growth_boobs};
-					_priorities.push(_priority);
-				} else if ((slave.boobs > parseInt(rule.growth_boobs)+200) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) {
-					_priority = {
-						drug: "breast redistributors",
-						weight: (1+((slave.boobs-slave.boobsImplant-slave.boobsMilk-rule.growth_boobs)/rule.growth_boobs)) };
-					_priorities.push(_priority);
-				}
-			}
-			if (rule.growth_butt != "no default setting") {
-				let _priority;
-				if (slave.butt < rule.growth_butt) {
-					_priority = {drug: "butt injections", weight: (rule.growth_butt-slave.butt)/rule.growth_butt};
-					_priorities.push(_priority);
-				} else if ((Math.trunc(slave.butt) > rule.growth_butt) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) {
-					_priority = {
-						drug: "butt redistributors",
-						weight: (1+((slave.butt-slave.buttImplant-rule.growth_butt)/rule.growth_butt)) };
-					_priorities.push(_priority);
-				}
-			}
-			if (rule.growth_lips != "no default setting") {
-				let _priority;
-				if (slave.lips < rule.growth_lips) {
-					_priority = {drug: "lip injections", weight: (rule.growth_lips-slave.lips)/rule.growth_lips};
-					_priorities.push(_priority);
-				} else if ((slave.lips > rule.growth_lips) && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) {
-					_priority = {
-						drug: "lip atrophiers",
-						weight: (1+((slave.lips-slave.lipsImplant-rule.growth_lips)/rule.growth_lips))};
-					_priorities.push(_priority);
-				}
-			}
-			if (rule.growth_dick != "no default setting" && slave.dick) {
-				let _priority;
-				if (slave.dick < rule.growth_dick) {
-					_priority = {drug: "penis enhancement", weight: (rule.growth_dick-slave.dick)/rule.growth_dick};
-					_priorities.push(_priority);
-				} else if ((slave.dick > rule.growth_dick) && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) {
-					_priority = {
-						drug: "penis atrophiers",
-						weight: (1+((slave.dick-rule.growth_dick)/rule.growth_dick))};
-					_priorities.push(_priority);
-				}
-			}
-			if (rule.growth_balls != "no default setting" && slave.balls) {
-				let _priority;
-				if (slave.balls < rule.growth_balls) {
-					_priority = {drug: "testicle enhancement", weight: (rule.growth_balls-slave.balls)/rule.growth_balls};
-					_priorities.push(_priority);
-				} else if ((slave.balls > rule.growth_balls) && (V.arcologies[0].FSSlimnessEnthusiastResearch == 1)) {
-					_priority = {
-						drug: "testicle atrophiers",
-						weight: (1+((slave.balls-rule.growth_balls)/rule.growth_balls))};
-					_priorities.push(_priority);
-				}
-			}
-			if (_priorities.length > 1) {
-				_priorities = _priorities.sort(function(a, b){if(a.weight > b.weight) return -1; if(a.weight < b.weight) return 1; return 0;});
-				if (slave.drugs != _priorities[0].drug) {
-					slave.drugs = _priorities[0].drug;
-					r += `<br>${slave.slaveName} has been put on `;
-					if (rule.growth_intensity && slave.drugs != "lip injections" && slave.health > 0) {
-						slave.drugs = "intensive " + slave.drugs;
-						r += `${slave.drugs}, since she's healthy enough to take them, and `;
-					} else {
-						r += `${slave.drugs}, since `;
-					}
-					r += `that part of her body is ${Math.trunc(_priorities[0].weight*100)}% `;
-					if (_priorities[0].weight < 1) r+= "below ";
-					else r+= "above ";
-					r += "the targeted size.";
-				}
-				return;
-			} else if (_priorities.length > 0) {
-				if (slave.drugs != _priorities[0].drug) {
-					slave.drugs = _priorities[0].drug;
-					r += `<br>${slave.slaveName} has been put on `;
-					if (rule.growth_intensity && slave.drugs != "lip injections" && slave.health > 0) {
-						slave.drugs = "intensive " + slave.drugs;
-						r += `${slave.drugs}, since she's healthy enough to take them, and `;
-					} else
-						r += `${slave.drugs}, since `;
-					r += `that is the only part of her body that does not meet the targeted size.`;
-				}
-				return;
-			} else if (growth_drugs.has(slave.drugs)) {
-				slave.drugs = "no drugs";
-				r += `<br>${slave.slaveName}'s body has met all relevant growth targets, so her pharmaceutical regime has been ended.`;
-				return;
-			}
-		} else {
-			if (rule.growth_boobs != "no default setting") {
-				if (slave.boobs < rule.growth_boobs) {
-					if (slave.drugs != "hyper breast injections") {
-						slave.drugs = "hyper breast injections";
-						r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-					}
-					return;
-				}
-			}
-			if (rule.growth_butt != "no default setting") {
-				if (slave.butt < rule.growth_butt) {
-					if (slave.drugs != "hyper butt injections") {
-						slave.drugs = "hyper butt injections";
-						r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-					}
-					return;
-				}
-			}
-			if (rule.growth_lips != "no default setting") {
-				if (slave.lips < rule.growth_lips) {
-					if (slave.drugs != "lip injections") {
-						slave.drugs = "lip injections";
-						r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-					}
-					return;
-				}
-			}
-			if (rule.growth_dick != "no default setting" && slave.dick) {
-				if (slave.dick < rule.growth_dick) {
-					if (slave.drugs != "hyper penis enhancement") {
-						slave.drugs = "hyper penis enhancement";
-						r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-					}
-					return;
-				}
-			}
-			if (rule.growth_balls != "no default setting" && slave.balls) {
-				if (slave.balls < rule.growth_balls) {
-					if (slave.drugs != "hyper testicle enhancement") {
-						slave.drugs = "hyper testicle enhancement";
-						r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-					}
-					return;
-				}
-			}
-			if (V.arcologies[0].FSSlimnessEnthusiastResearch == 1) {
-				if (rule.growth_boobs != "no default setting") {
-					if (slave.boobs-slave.boobsImplant-slave.boobsMilk > parseInt(rule.growth_boobs)+200 && slave.weight < 100) {
-						if (slave.drugs != "breast redistributors") {
-							slave.drugs = "breast redistributors";
-							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-						}
-						return;
-					}
-				}
-				if (rule.growth_butt != "no default setting") {
-					if (Math.trunc(slave.butt-slave.buttImplant) > rule.growth_butt && slave.weight < 100) {
-						if (slave.drugs != "butt redistributors") {
-							slave.drugs = "butt redistributors";
-							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-						}
-						return;
-					}
-				}
-				if (rule.growth_lips != "no default setting") {
-					if (slave.lips-slave.lipsImplant > rule.growth_lips) {
-						if (slave.drugs != "lip atrophiers") {
-							slave.drugs = "lip atrophiers";
-							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-						}
-						return;
-					}
-				}
-				if (rule.growth_dick != "no default setting" && slave.dick) {
-					if (slave.dick > rule.growth_dick) {
-						if (slave.drugs != "penis atrophiers") {
-							slave.drugs = "penis atrophiers";
-							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-						}
-						return;
-					}
-				}
-				if (rule.growth_balls != "no default setting" && slave.balls) {
-					if (slave.balls > rule.growth_balls) {
-						if (slave.drugs != "testicle atrophiers") {
-							slave.drugs = "testicle atrophiers";
-							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-						}
-						return;
-					}
-				}
-			}
-			if (growth_drugs.has(slave.drugs)) {
-				slave.drugs = "no drugs";
-				r += `<br>${slave.slaveName} has met all relevant growth targets, so her pharmaceutical regime has been ended.`;
-				return;
-			}
-		}
-	}
-
-	function ProcessOtherDrugs(slave, rule) {
-		// Other Drugs
-		if (slave.indentureRestrictions < 2 && rule.drug !== "no default setting" && slave.drugs !== rule.drug) {
-			let flag = true;
-			switch (rule.drug) {
-			case "anti-aging cream":
-				if (slave.visualAge < 18)
-					flag = false;
-				break;
-
-			case "growth stimulants":
-				if (!(slave.height < 274 && slave.height < Math.clamp((Height.mean(slave) * 1.25),0,274)))
-					flag = false;
-				break;
-
-			case "sag-B-gone":
-				if (!(slave.boobs > 250 && slave.boobShape != "saggy"))
-					flag = false;
-				break;
-
-			case "female hormone injections":
-				if (!((slave.breedingMark != 1 || V.propOutcome == 0) && (slave.ovaries == 1 || slave.mpreg == 1) && slave.pubertyXX === 0))
-					flag = false;
-				break;
-
-			case "male hormone injections":
-				if (!((slave.breedingMark != 1 || V.propOutcome == 0) && slave.balls > 0 && slave.pubertyXY === 0))
-					flag = false;
-				break;
-
-			case "psychosuppressants":
-				if (!(slave.intelligence > -100 && slave.indentureRestrictions < 1))
-					flag = false;
-				break;
-
-			case "breast injections":
-				if (!(slave.boobs < 48000))
-					flag = false;
-				break;
-
-			case "hyper breast injections":
-				if (!(slave.boobs < 25000))
-					flag = false;
-				break;
-
-			case "breast redistributors":
-				if (!(slave.boobs - slave.boobsImplant > 100))
-					flag = false;
-				break;
-
-			case "butt injections":
-				if (!(slave.butt < 9))
-					flag = false;
-				break;
-
-			case "hyper butt injections":
-				if (!(slave.butt < 20))
-					flag = false;
-				break;
-
-			case "nipple atrophiers":
-				if (!(["huge", "puffy", "cute"].includes(slave.nipples)))
-					flag = false;
-				break;
-
-			case "butt redistributors":
-				if (!(slave.buttImplant > 0))
-					flag = false;
-				break;
-
-			case "lip injections":
-				if (!(slave.lips <= 95 || (slave.lips <= 85 && V.seeExtreme !== 1)))
-					flag = false;
-				break;
-
-			case "lip atrophiers":
-				if (!(slave.lips - slave.lipsImplant > 0))
-					flag = false;
-				break;
-
-			case "super fertility drugs":
-				if (!(slave.indentureRestrictions < 1 && (slave.breedingMark !== 1 || V.propOutcome == 0)))
-					flag = false;
-				break;
-
-			case "penis enhancement":
-				if (!((slave.dick > 0 && slave.dick < 10) || slave.clit < 5))
-					flag = false;
-				break;
-
-			case "hyper penis enhancement":
-				if (!((slave.dick > 0 && slave.dick < 31) || slave.clit < 5))
-					flag = false;
-				break;
-
-			case "penis atrophiers":
-				if (!(slave.dick > 1))
-					flag = false;
-				break;
-
-			case "testicle enhancement":
-				if (!(slave.balls > 0))
-					flag = false;
-				break;
-
-			case "hyper testicle enhancement":
-				if (!(slave.balls > 0))
-					flag = false;
-				break;
-
-			case "testicle atrophiers":
-				if (!(slave.balls > 1))
-					flag = false;
-				break;
-
-			case "clitoris atrophiers":
-				if (!(slave.clit > 0))
-					flag = false;
-				break;
-
-			case "labia atrophiers":
-				if (!(slave.labia > 0))
-					flag = false;
-				break;
-
-			case "appetite suppressors":
-				if (!(slave.weight <= -95))
-					flag = false;
-				break;
-
-			case "female hormone injections":
-				if (!((slave.breedingMark !== 1 || V.propOutcome == 0) && (slave.ovaries === 1 || slave.mpreg === 1) && slave.pubertyXX === 0))
-					flag = false;
-				break;
-
-			case "male hormone injections":
-				if (!(slave.balls > 0 && slave.pubertyXY === 0))
-					flag = false;
-				break;
-
-			default:
-				break;
-			}
-			if (flag) {
-				slave.drugs = rule.drug;
-				r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
-			} else {
-				slave.drugs = "no drugs";
-				r += `<br>${slave.slaveName} cannot benefit from her assigned drug and has been defaulted to ${slave.drugs}`;
-			}
-		}
-	}
-
-	function ProcessEnema(slave, rule) {
-		if ((rule.inflationType !== undefined) && (rule.inflationType !== "no default setting")) {
-			if (slave.inflationType !== rule.inflationType) {
-				if ((slave.inflationType === "curative" && slave.health > 90) || (slave.inflationType === "tightener" && slave.anus <= 1 && slave.vagina <= 1)) {
-					r += `<br>${slave.slaveName} cannot benefit from her assigned enema and has been defaulted to none.`;
-					slave.inflation = 0;
-					slave.inflationType = "none";
-					slave.inflationMethod = 0;
-					slave.milkSource = 0;
-					slave.cumSource = 0;
-					SetBellySize(slave);
-				} else if ((rule.inflationType === "curative" && slave.health > 90) || (rule.inflationType === "tightener" && slave.anus <= 1 && slave.vagina <= 1)) {
-				} else {
-					r += `<br>${slave.slaveName}'s current enema regimen has been set to ${rule.inflationType}.`;
-					slave.inflation = 1;
-					slave.inflationType = rule.inflationType;
-					slave.inflationMethod = 2;
-					slave.milkSource = 0;
-					slave.cumSource = 0;
-					SetBellySize(slave);
-				}
-			}
-			if (slave.inflationType !== "none" && slave.inflation > 1 && slave.health < -50) {
-				r += `<br>${slave.slaveName}'s current enema regimen risks death, so it has been reduced to a less threatening level.`;
-				slave.inflation = 1;
-				SetBellySize(slave);
-			} else if (slave.inflation > 1 && (slave.bellyPreg >= 1500 || slave.bellyImplant >= 1500)) {
-				r += `<br>${slave.slaveName}'s current enema is too much for her body, so it has been reduced.`;
-				slave.inflation = 1;
-				SetBellySize(slave);
-			} else if (slave.inflationType === "none") {
-				slave.inflation = 0;
-				slave.inflationMethod = 0;
-				slave.milkSource = 0;
-				slave.cumSource = 0;
-				SetBellySize(slave);
-			}
-		}
-	}
-
-	function ProcessDiet(slave, rule) {
-		// Diet Setting
-		if (rule.diet !== undefined && rule.diet !== "no default setting") {
-			/*
-			if ((slave.boobs >= 1600) && (slave.muscles <= 5) && (slave.amp != 1) && ((rule.muscles == "no default setting") || (rule.muscles === 0))) {
-				if ((slave.diet !== "muscle building")) {
-					slave.diet = "muscle building"
-					r += `<br>${slave.slaveName} has big tits and no back muscles, so she's been assigned to gain some.`
-				}
-			} else if ((slave.boobs >= 1600) && (slave.muscles > 5) && (slave.diet == "muscle building") && ((rule.muscles == "no default setting") || (rule.muscles === 0))) {
-			*/
-			if (rule.diet === "healthy" && slave.diet !== "healthy") {
-				slave.diet = "healthy";
-				r += `<br>${slave.slaveName} has been assigned to a healthy diet.`;
-			} else if ((slave.boobs >= 1600) && (slave.muscles > 5) && (slave.diet == "muscle building") && ((rule.muscles == "no default setting") || (rule.muscles === 0))) {
-				slave.diet = "healthy";
-				r += `<br>${slave.slaveName} has huge boobs, but she already has the back muscles to bear them, so she's been assigned to stop working out so hard.`;
-			} else if ((rule.dietGrowthSupport == 1) && ((slave.drugs == "breast injections") || (slave.drugs == "butt injections")) && (slave.weight <= 95)) {
-				if (slave.diet !== "fattening") {
-					slave.diet = "fattening";
-					r += `<br>${slave.slaveName} is on drugs designed to expand major body parts, so she's been put on a fattening diet to provide her body as much fuel for growth as possible.`;
-				}
-			} else {
-				if (!(isNaN(rule.diet))) {
-					if ((slave.weight - rule.diet) > 5) {
-						if ((slave.diet !== "restricted")) {
-							slave.diet = "restricted";
-							r += `<br>${slave.slaveName} is too fat so her diet has been set to restricted.`;
-						}
-
-					} else if ((slave.weight - rule.diet) < -5) {
-						if ((slave.diet !== "fattening")) {
-							slave.diet = "fattening";
-							r += `<br>${slave.slaveName} is too skinny so her diet has been set to fattening.`;
-						}
-					} else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp != 1)) {
-						if ((slave.muscles >= rule.muscles+8)) {
-							if ((slave.diet !== "slimming")) {
-								slave.diet = "slimming";
-								r += `<br>${slave.slaveName} has been put on a slimming exercise regime.`;
-							}
-						} else if ((slave.muscles <= rule.muscles-2)) {
-							if ((slave.diet !== "muscle building")) {
-								slave.diet = "muscle building";
-								r += `<br>${slave.slaveName} has been put on a muscle building exercise regime.`;
-							}
-						} else {
-							if ((slave.diet !== "healthy")) {
-								slave.diet = "healthy";
-								r += `<br>${slave.slaveName} is at the target weight, so her diet has been normalized.`;
-							}
-						}
-					} else {
-						if ((slave.diet !== "healthy")) {
-							slave.diet = "healthy";
-							r += `<br>${slave.slaveName} is at the target weight, so her diet has been normalized.`;
-						}
-					}
-				} else if ((rule.diet == "attractive")) {
-					if (((slave.weight > 95) || ((slave.weight > 30) && (slave.hips < 2)))) {
-						if ((slave.diet !== "restricted")) {
-							slave.diet = "restricted";
-							r += `<br>${slave.slaveName} is too fat so her diet has been set to restricted.`;
-						}
-					} else if (((slave.weight < -95) || ((slave.weight < -30) && (slave.hips > -2)))) {
-						if ((slave.diet !== "fattening")) {
-							slave.diet = "fattening";
-							r += `<br>${slave.slaveName} is too skinny so her diet has been set to fattening.`;
-						}
-					} else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp != 1)) {
-						if ((slave.muscles >= rule.muscles+8)) {
-							if ((slave.diet !== "slimming")) {
-								slave.diet = "slimming";
-								r += `<br>${slave.slaveName} has been put on a slimming exercise regime.`;
-							}
-						} else if ((slave.muscles <= rule.muscles-2)) {
-							if ((slave.diet !== "muscle building")) {
-								slave.diet = "muscle building";
-								r += `<br>${slave.slaveName} has been put on a muscle building exercise regime.`;
-							}
-						} else {
-							if ((slave.diet !== "healthy")) {
-								slave.diet = "healthy";
-								r += `<br>${slave.slaveName} is at the target weight, so her diet has been normalized.`;
-							}
-						}
-					} else {
-						if ((slave.diet !== "healthy")) {
-							slave.diet = "healthy";
-							r += `<br>${slave.slaveName} is at the target weight, so her diet has been normalized.`;
-						}
-					}
-				} else if ((rule.diet == "XX")) {
-					if ((slave.diet !== "XX")) {
-						slave.diet = "XX";
-						r += `<br>${slave.slaveName} has been put on a diet that favors feminine development.`;
-					}
-				} else if ((rule.diet == "XY")) {
-					if ((slave.diet !== "XY")) {
-						slave.diet = "XY";
-						r += `<br>${slave.slaveName} has been put on a diet that favors masculine development.`;
-					}
-				} else if ((rule.diet == "XXY")) {
-					if (slave.balls > 0 && (slave.ovaries == 1 || slave.mpreg == 1)) {
-						if ((slave.diet !== "XXY")) {
-							slave.diet = "XXY";
-							r += `<br>${slave.slaveName} has been put on a diet that enhances a herm's unique sexuality.`;
-						}
-					} else {
-						if ((slave.diet !== "healthy")) {
-							slave.diet = "healthy";
-							r += `<br>${slave.slaveName} has been put on a standard diet since she is not a hermaphrodite.`;
-						}
-					}
-				} else if ((rule.diet == "cleansing")) {
-					if ((slave.diet !== "cleansing") && (slave.health < 90 || slave.chem >= 10)) {
-						slave.diet = "cleansing";
-						r += `<br>${slave.slaveName} has been put on a diet of cleansers.`;
-					}
-				} else if ((rule.diet == "fertility")) {
-					if (canGetPregnant(slave)) {
-						if ((slave.diet !== "fertility")) {
-							slave.diet = "fertility";
-							r += `<br>${slave.slaveName} has been put on a diet to enhance fertility.`;
-						}
-					} else {
-						if ((slave.diet !== "healthy")) {
-							slave.diet = "healthy";
-							if (slave.pregKnown === 0 && slave.preg > 0) {
-								r += `<br>${slave.slaveName} has been put on a standard diet since tests reveal she has become pregnant.`;
-								slave.pregKnown = 1;
-							} else {
-								r += `<br>${slave.slaveName} has been put on a standard diet since she is currently unable to become pregnant.`;
-							}
-						}
-					}
-				} else if ((rule.diet == "cum production")) {
-					if ((slave.balls > 0)) {
-						if ((slave.diet !== "cum production")) {
-							slave.diet = "cum production";
-							r += `<br>${slave.slaveName} has been put on a diet to promote cum production.`;
-						}
-					} else {
-						if ((slave.diet !== "healthy")) {
-							slave.diet = "healthy";
-							r += `<br>${slave.slaveName} has been put on a standard diet since she is no longer able to produce cum.`;
-						}
-					}
-				}
-			}
-		} else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp != 1)) { // no diet rule, muscles only
-			if ((slave.muscles >= rule.muscles+8)) {
-				if ((slave.diet !== "slimming")) {
-					slave.diet = "slimming";
-					r += `<br>${slave.slaveName} has been put on a slimming exercise regime.`;
-				}
-			} else if ((slave.muscles <= rule.muscles-2)) {
-				if ((slave.diet !== "muscle building")) {
-					slave.diet = "muscle building";
-					r += `<br>${slave.slaveName} has been put on a muscle building exercise regime.`;
-				}
-			} else {
-				if ((slave.diet !== "healthy")) {
-					slave.diet = "healthy";
-					r += `<br>${slave.slaveName} has achieved the target musculature, so her exercise regime has been normalized.`;
-				}
-			}
-		}
-
-		if (slave.drugs === "appetite suppressors" && slave.diet !== "restricted") {
-			slave.drugs = "no drugs";
-			r += `<br>${slave.slaveName} is no longer losing weight, so she's no longer being given appetite suppressors.`;
-		} else if (slave.diet === "restricted" && V.arcologies[0].FSSlimnessEnthusiastResearch == 1 && (slave.drugs == "no drugs" || slave.drugs == "none")) {
-			slave.drugs = "appetite suppressors";
-			r += `<br>${slave.slaveName} is losing weight so she will be given weight loss pills.`;
-		}
-	}
-
-	function ProcessCuratives(slave, rule) {
-		if ((rule.curatives !== undefined) && (rule.curatives !== "no default setting")) {
-			if (slave.curatives !== rule.curatives) {
-				if (rule.curatives === 2) {
-					if (slave.health > 100) {
-						if ((slave.curatives != 1)) {
-							r += `<br>${slave.slaveName} has been put on preventatives, since curatives cannot improve her health further.`;
-							slave.curatives = 1;
-						}
-					} else {
-						r += `<br>${slave.slaveName} has been put on curatives.`;
-						slave.curatives = rule.curatives;
-					}
-				} else {
-					r += `<br>${slave.slaveName} has been ${rule.curatives > 0 ? `put on preventatives` : `taken off health drugs`}`;
-					slave.curatives = rule.curatives;
-				}
-			}
-		}
-	}
-
-	function ProcessAphrodisiacs(slave, rule) {
-		if ((rule.aphrodisiacs !== undefined) && (rule.aphrodisiacs != "no default setting")) {
-			if (slave.aphrodisiacs != rule.aphrodisiacs) {
-				r += `<br>${slave.slaveName} has been ${rule.aphrodisiacs > 0 ? `put on the proper` : `taken off`} aphrodisiacs.`;
-				slave.aphrodisiacs = rule.aphrodisiacs;
-			}
-		}
-	}
-
-	function ProcessPenisHormones(slave, rule) {
-		if ((slave.dick > 0)) {
-			if ((slave.balls === 0)) {
-				if ((rule.gelding !== undefined) && (rule.gelding !== "no default setting")) {
-					if ((slave.hormones !== rule.gelding)) {
-						const _oldHormones = slave.hormones;
-						slave.hormones = rule.gelding;
-						if (slave.indentureRestrictions >= 2) {
-							slave.hormones = Math.clamp(slave.hormones, -1, 1);
-						}
-						if (slave.hormones != _oldHormones) {
-							r += `<br>${slave.slaveName} is a gelding, so she has been put on the appropriate hormonal regime.`;
-						}
-					}
-				}
-			} else if ((slave.balls > 0)) {
-				if ((rule.XY !== undefined) && (rule.XY !== "no default setting")) {
-					if ((slave.hormones !== rule.XY)) {
-						if ((slave.assignment != "recruit girls")) {
-							if ((slave.assignment != "be the Wardeness")) {
-								if ((slave.assignment != "be the Madam")) {
-									const _oldHormones = slave.hormones;
-									slave.hormones = rule.XY;
-									if (slave.indentureRestrictions >= 2) {
-										slave.hormones = Math.clamp(slave.hormones, -1, 1);
-									}
-									if (slave.hormones != _oldHormones) {
-										r += `<br>${slave.slaveName} is a shemale, so she has been put on the appropriate hormonal regime.`;
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	function ProcessFemaleHormones(slave, rule) {
-		if ((slave.vagina > -1) && (slave.dick === 0) && (rule.XX !== undefined) && (rule.XX !== "no default setting")) {
-			if ((slave.hormones !== rule.XX)) {
-				const _oldHormones = slave.hormones;
-				slave.hormones = rule.XX;
-				if (slave.indentureRestrictions >= 2) {
-					slave.hormones = Math.clamp(slave.hormones, -1, 1);
-				}
-				if (slave.hormones != _oldHormones) {
-					r += `<br>${slave.slaveName} is a female, so she has been put on the appropriate hormonal regime.`;
-				}
-			}
-		}
-	}
-
-	function ProcessPregnancyDrugs(slave, rule) {
-		if (slave.pregKnown == 1 && rule.pregSpeed != "no default setting" && (slave.breedingMark != 1 || V.propOutcome == 0) && slave.indentureRestrictions < 1 && slave.broodmother === 0) {
-			if (rule.pregSpeed == "slow" && slave.preg < slave.pregData.minLiveBirth) {
-				slave.pregControl = "slow gestation";
-				r += `<br>${slave.slaveName} is pregnant, so she has been put on the gestation slowing agents.`;
-			} else if (rule.pregSpeed == "fast" && slave.preg < slave.pregData.minLiveBirth && slave.health > -50) {
-				slave.pregControl = "speed up";
-				r += `<br>${slave.slaveName} is pregnant, so she has been put on rapid gestation agents. CAUTION! Can be dangerous. Clinic supervision is recommended.`;
-			} else if (rule.pregSpeed == "suppress" && slave.preg >= slave.pregData.minLiveBirth && slave.health > -50) {
-				slave.pregControl = "labor suppressors";
-				r += `<br>${slave.slaveName} is ready to birth, so she has been put on labor suppressing agents.`;
-			} else if (rule.pregSpeed == "stimulate" && slave.preg > slave.pregData.minLiveBirth && slave.health > -50) {
-				slave.labor = 1;
-				slave.induce = 1;
-				V.birthee = 1;
-				r += `<br>${slave.slaveName} is ready to birth, so her labor has been stimulated.`;
-			} else if (rule.pregSpeed == "fast" && slave.pregControl == "speed up" && slave.health <= -50) {
-				slave.pregControl = "none";
-				r += `<br>${slave.slaveName} is on rapid gestation agents and dangerously unhealthy, so her agent regimen has been stopped.`;
-			} else if (rule.pregSpeed == "suppress" && slave.pregControl == "labor suppressors" && slave.health <= -50) {
-				slave.pregControl = "none";
-				r += `<br>${slave.slaveName} is on labor suppression agents and unhealthy, so her agent regimen has been stopped.`;
-			}
-		}
-	}
-
-	function ProcessLivingStandard(slave, rule) {
-		if ((rule.livingRules !== undefined) && (rule.livingRules !== "no default setting")) {
-			if (setup.facilityCareers.includes(slave.assignment)) {
-				r += ``; // `<br>${slave.slaveName}'s living standards are controlled by her assignment.`;
-			} else if (((slave.assignment == "be your Head Girl") && (V.HGSuite == 1)) || ((slave.assignment == "guard you") && (V.dojo > 1))) {
-				r += `<br>${slave.slaveName} has a private room.`;
-			} else if ((slave.fetish == "mindbroken")) {
-				if ((slave.livingRules !== "spare")) {
-					slave.livingRules = "spare";
-					r += `<br>Since ${slave.slaveName} is mindbroken her living standard has been set to spare.`;
-				}
-			} else if (slave.livingRules !== rule.livingRules) {
-				if (rule.livingRules !== "luxurious") {
-					if (V.roomsPopulation <= V.rooms-0.5) {
-						slave.livingRules = rule.livingRules;
-						r += `<br>${slave.slaveName}'s living standard has been set to ${rule.livingRules}.`;
-						if (slave.relationship >= 4)
-							V.roomsPopulation += 0.5;
-						else
-							V.roomsPopulation += 1;
-					} else {
-						slave.livingRules = "normal";
-						r += `<br>${slave.slaveName}'s living standard has been set to normal, since there is no room for her to occupy.`;
-					}
-				} else {
-					slave.livingRules = rule.livingRules;
-					r += `<br>${slave.slaveName}'s living standard has been set to ${rule.livingRules}.`;
-				}
-			}
-		}
-	}
-
-	function ProcessSpeech(slave, rule) {
-		if ((rule.speechRules !== undefined) && (rule.speechRules !== "no default setting")) {
-			if (slave.fetish == "mindbroken") {
-				if ((slave.speechRules !== "restrictive")) {
-					slave.speechRules = "restrictive";
-					r += `<br>Since ${slave.slaveName} is mindbroken her speech rules have been set to restrictive.`;
-				}
-			} else if (slave.accent == 4) {
-				if (rule.speechRules === "accent elimination" && slave.speechRules !== "language lessons") {
-					slave.speechRules = "language lessons";
-					r += `<br>Since ${slave.slaveName} does not know how to talk, her speech rules have been set to language learning.`;
-				} else {
-					slave.speechRules = "restrictive";
-					r += `<br>Since ${slave.slaveName} does not know how to talk, her speech rules have been set to restrictive.`;
-				}
-			} else if (rule.speechRules === "accent elimination") {
-				if (slave.accent > 0) {
-					slave.speechRules = "accent elimination";
-					r += `<br>${slave.slaveName}'s speech rules have been set to ${rule.speechRules}.`;
-				} else {
-					slave.speechRules = "restrictive";
-					r += `<br>Since ${slave.slaveName} has no accent her speech rules have been set to restrictive.`;
-				}
-			} else if (slave.speechRules !== rule.speechRules) {
-				slave.speechRules = rule.speechRules;
-				r += `<br>${slave.slaveName}'s speech rules have been set to ${rule.speechRules}.`;
-			}
-		}
-	}
-
-	function ProcessRelationship(slave, rule) {
-		if ((slave.fetish !== "mindbroken")) {
-			if ((rule.relationshipRules !== undefined) && (rule.relationshipRules !== "no default setting")) {
-				if ((slave.relationshipRules !== rule.relationshipRules )) {
-					slave.relationshipRules = rule.relationshipRules ;
-					r += `<br>${slave.slaveName}'s relationship rules have been set to ${rule.relationshipRules}.`;
-				}
-			}
-		}
-	}
-
-	function ProcessRelease(slave, rule) {
-		if ((rule.releaseRules !== undefined) && (rule.releaseRules !== "no default setting")) {
-			let _release = 0;
-			if (rule.releaseRules === "restrictive" &&
-				!(["serve the public", "serve in the club", "whore", "work in the brothel", "please you", "serve in the master suite", "be a subordinate slave", "work a glory hole", "be confined in the arcade", "get milked", "work in the dairy", "work as a farmhand", "be your Head Girl"].contains(slave.assignment)))
-				_release = 1;
-			else
-				_release = 1;
-			if ((slave.fetish == "mindbroken") && (slave.releaseRules !== "permissive")) {
-				slave.releaseRules = "permissive";
-				r += `<br>Since ${slave.slaveName} is mindbroken her masturbation rules have been set to permissive.`;
-			} else if ((slave.amp === 1 || slave.fuckdoll > 0) && (slave.releaseRules === "masturbation")) {
-				slave.releaseRules = "restrictive";
-				r += `<br>Since ${slave.slaveName} is unable to masturbate, her masturbation rules have been set to restrictive.`;
-			} else if ((_release !== 0) && (slave.releaseRules !== rule.releaseRules)) {
-				slave.releaseRules = rule.releaseRules;
-				r += `<br>${slave.slaveName}'s masturbation rules have been set to ${rule.releaseRules}.`;
-			}
-		}
-	}
-
-	function ProcessPunishment(slave, rule) {
-		if ((rule.standardPunishment !== undefined) && (rule.standardPunishment !== "no default setting")) {
-			if ((slave.standardPunishment !== rule.standardPunishment)) {
-				slave.standardPunishment = rule.standardPunishment ;
-				r += `<br>${slave.slaveName}'s typical punishment has been updated to ${rule.standardPunishment}.`;
-			}
-		}
-	}
-
-	function ProcessReward(slave, rule) {
-		if ((rule.standardReward !== undefined) && (rule.standardReward !== "no default setting")) {
-			if ((slave.standardReward !== rule.standardReward)) {
-				slave.standardReward = rule.standardReward ;
-				r += `<br>${slave.slaveName}'s typical reward has been updated to ${rule.standardReward}.`;
-			}
-		}
-	}
-
-	function ProcessToyHole(slave, rule) {
-		if ((rule.toyHole !== undefined) && (rule.toyHole !== "no default setting")) {
-			if (rule.toyHole === "pussy") {
-				if (slave.vagina > 0 && canDoVaginal(slave)) {
-					slave.toyHole = rule.toyHole ;
-					r += `<br>${slave.slaveName} has been instructed to use her ${rule.toyHole} to please you.`;
-				} else if (slave.toyHole !== "all her holes") {
-					slave.toyHole = "all her holes" ;
-					r += `<br>${slave.slaveName}'s hole preference has defaulted to all her holes.`;
-				}
-			} else if (rule.toyHole === "ass") {
-				if (slave.anus > 0 && canDoAnal(slave)) {
-					slave.toyHole = rule.toyHole ;
-					r += `<br>${slave.slaveName} has been instructed to use her ${rule.toyHole} to please you.`;
-				} else if (slave.toyHole !== "all her holes") {
-					slave.toyHole = "all her holes" ;
-					r += `<br>${slave.slaveName}'s hole preference has defaulted to all her holes.`;
-				}
-			} else if (rule.toyHole === "dick") {
-				if (slave.dick > 0 && canPenetrate(slave)) {
-					slave.toyHole = rule.toyHole ;
-					r += `<br>${slave.slaveName} has been instructed to use her ${rule.toyHole} to please you.`;
-				} else if (slave.toyHole !== "all her holes") {
-					slave.toyHole = "all her holes" ;
-					r += `<br>${slave.slaveName}'s hole preference has defaulted to all her holes.`;
-				}
-			} else if ((slave.toyHole !== rule.toyHole)) {
-				slave.toyHole = rule.toyHole ;
-				r += `<br>${slave.slaveName} has been instructed to use her ${rule.toyHole} to please you.`;
-			}
-		}
-	}
-
-	function ProcessDietCum(slave, rule) {
-		if ((rule.dietCum !== undefined) && (rule.dietCum !== "no default setting")) {
-			if (slave.dietCum != rule.dietCum) {
-				slave.dietCum = rule.dietCum;
-				if (slave.dietCum == 2) {
-					r += `<br>${slave.slaveName} has been put on a diet based on cum.`;
-					slave.dietMilk = 0;
-				}
-				if (slave.dietCum == 1)
-					r += `<br>${slave.slaveName} has had cum added to her diet.`;
-				else
-					r += `<br>${slave.slaveName} has had cum removed from her diet.`;
-			}
-		}
-	}
-
-	function ProcessDietMilk(slave, rule) {
-		if ((rule.dietMilk !== undefined) && (rule.dietMilk !== "no default setting")) {
-			if (slave.dietMilk != rule.dietMilk) {
-				slave.dietMilk = rule.dietMilk;
-				if (slave.dietMilk == 2) {
-					r += `<br>${slave.slaveName} has been put on a diet based on human milk.`;
-					slave.dietCum = 0;
-				}
-				if (slave.dietMilk == 1)
-					r += `<br>${slave.slaveName} has had human milk added to her diet.`;
-				else
-					r += `<br>${slave.slaveName} has had human milk removed from her diet.`;
-			}
-		}
-	}
-
-	function ProcessSolidFood(slave, rule) {
-		if ((rule.onDiet !== undefined) && (rule.onDiet !== "no default setting")) {
-			if ((slave.onDiet !== rule.onDiet)) {
-				slave.onDiet = rule.onDiet ;
-				if (slave.onDiet == 1)
-					r += `<br>${slave.slaveName} is not permitted to eat the solid slave food.`;
-				else
-					r += `<br>${slave.slaveName} is permitted to eat the solid slave food.`;
-			}
-		}
-	}
-
-	function ProcessTeeth(slave, rule) {
-		if ((rule.teeth !== undefined) && (rule.teeth !== "no default setting")) {
-			if ((rule.teeth == "universal")) {
-				if ((slave.teeth == "crooked")) {
-					slave.teeth = "straightening braces";
-					cashX(forceNeg(V.modCost), "slaveSurgery", slave);
-					r += `<br>${slave.slaveName} has been given braces for her crooked teeth.`;
-				} else if (slave.teeth == "gapped") {
-					slave.teeth = "straightening braces";
-					cashX(forceNeg(V.modCost), "slaveSurgery", slave);
-					r += `<br>${slave.slaveName} has been given braces to close the gap in her teeth.`;
-				} else if ((slave.teeth == "normal")) {
-					slave.teeth = "cosmetic braces";
-					cashX(forceNeg(V.modCost), "slaveSurgery", slave);
-					r += `<br>${slave.slaveName} has been given cosmetic braces.`;
-				}
-			} else if ((rule.teeth == "straighten")) {
-				if ((slave.teeth == "crooked")) {
-					slave.teeth = "straightening braces";
-					cashX(forceNeg(V.modCost), "slaveSurgery", slave);
-					r += `<br>${slave.slaveName} has been given braces for her crooked teeth.`;
-				} else if (slave.teeth == "gapped") {
-					slave.teeth = "straightening braces";
-					cashX(forceNeg(V.modCost), "slaveSurgery", slave);
-					r += `<br>${slave.slaveName} has been given braces to close the gap in her teeth.`;
-				} else if ((slave.teeth == "cosmetic braces")) {
-					slave.teeth = "normal";
-					r += `<br>${slave.slaveName} has gotten her braces off, since her teeth are straight.`;
-				}
-			} else if ((rule.teeth == "none")) {
-				if ((slave.teeth == "straightening braces")) {
-					slave.teeth = "crooked";
-					r += `<br>${slave.slaveName} has gotten her braces off.`;
-				} else if ((slave.teeth == "cosmetic braces")) {
-					slave.teeth = "normal";
-					r += `<br>${slave.slaveName} has gotten her braces off.`;
-				}
-			}
-		}
-	}
-
-	function ProcessStyle(slave, rule) {
-		if (rule.eyeColor !== undefined && (rule.eyeColor !== "no default setting")) {
-			if ((slave.eyeColor !== rule.eyeColor)) {
-				slave.eyeColor = rule.eyeColor;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName} has been given ${slave.eyeColor} contact lenses.`;
-			}
-		}
-
-		if (rule.makeup !== undefined && (rule.makeup !== "no default setting")) {
-			if ((slave.makeup !== rule.makeup)) {
-				slave.makeup = rule.makeup;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName} has been assigned the standard makeup.`;
-			}
-		}
-
-		if ((slave.amp != 1)) {
-			if (rule.nails !== undefined && (rule.nails !== "no default setting")) {
-				if ((slave.nails !== rule.nails)) {
-					slave.nails = rule.nails;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName} has been assigned the standard nails.`;
-				}
-			}
-		}
-
-		if (rule.hColor !== undefined && (rule.hColor !== "no default setting")) {
-			if (slave.bald != 1) {
-				if ((slave.hColor !== rule.hColor)) {
-					slave.hColor = rule.hColor;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s hair has been dyed ${rule.hColor}.`;
-				}
-			}
-		}
-
-		if (rule.hStyle !== undefined && (rule.hStyle !== "no default setting")) {
-			if (slave.bald != 1) {
-				if ((slave.hStyle !== rule.hStyle)) {
-					slave.hStyle = rule.hStyle;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					if ((rule.hStyle == "shaved")) {
-						slave.hLength = 0;
-						r += `<br>${slave.slaveName}'s hair has been shaved.`;
-					} else
-						r += `<br>${slave.slaveName}'s hair has been restyled.`;
-				}
-			}
-		}
-
-		if (rule.hLength !== undefined && (rule.hLength !== "no default setting")) {
-			if (slave.bald != 1) {
-				if ((slave.hLength !== rule.hLength)) {
-					if ((slave.hLength > rule.hLength)) {
-						cashX(forceNeg(V.modCost), "slaveMod", slave);
-						r += `<br>${slave.slaveName}'s hair has been cut; it `;
-					} else {
-						cashX(forceNeg(V.modCost*Math.trunc((rule.hLength-slave.hLength)/10)), "slaveMod");
-						r += `<br>${slave.slaveName} has been given extensions; her hair `;
-					}
-				r += `is now ${lengthToEitherUnit(rule.hLength)} long.`;
-				slave.hLength = rule.hLength;
-				}
-			}
-		}
-
-		if (rule.haircuts !== undefined && (rule.haircuts !== "no default setting")) {
-			if (slave.bald != 1) {
-				if (rule.haircuts === 1 && slave.haircuts !== 1) {
-					r += `<br>${slave.slaveName}'s hair will now be maintained at ${lengthToEitherUnit(slave.hLength)} long.`;
-					slave.haircuts = 1;
-				} else if (rule.haircuts === 0 && slave.haircuts !== 0) {
-					r += `<br>${slave.slaveName}'s hair length will no longer be maintained.`;
-					slave.haircuts = 0;
-				}
-			}
-		}
-
-		if (rule.eyebrowHColor !== undefined && (rule.eyebrowHColor !== "no default setting")) {
-			if (slave.eyebrowHStyle != "bald" && slave.eyebrowHStyle != "hairless") {
-				if ((slave.eyebrowHColor !== rule.eyebrowHColor)) {
-					slave.eyebrowHColor = rule.eyebrowHColor;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrow hair, if present, has been dyed ${rule.eyebrowHColor}.`;
-				}
-			}
-		}
-
-		if (rule.eyebrowHStyle !== undefined && (rule.eyebrowHStyle !== "no default setting")) {
-			if (slave.eyebrowHStyle != "bald" && slave.eyebrowHStyle != "hairless") {
-				if ((slave.eyebrowHStyle !== rule.eyebrowHStyle)) {
-					slave.eyebrowHStyle = rule.eyebrowHStyle;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrow hair has been restyled; they are now ${rule.eyebrowHStyle}.`;
-				}
-			}
-		}
-
-		if (rule.eyebrowFullness !== undefined && (rule.eyebrowFullness !== "no default setting")) {
-			if (slave.eyebrowHStyle != "bald" && slave.eyebrowHStyle != "hairless") {
-				if ((slave.eyebrowFullness !== rule.eyebrowFullness)) {
-					slave.eyebrowFullness = rule.eyebrowFullness;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrow hair thickness has been adjusted; they are now ${rule.eyebrowFullness}.`;
-				}
-			}
-		}
-
-		if (rule.pubicHColor !== undefined && (rule.pubicHColor !== "no default setting")) {
-			if (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless") {
-				if ((slave.pubicHColor !== rule.pubicHColor)) {
-					slave.pubicHColor = rule.pubicHColor;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s pubic hair, if present, has been dyed ${rule.pubicHColor}.`;
-				}
-			}
-		}
-
-		if (rule.pubicHStyle !== undefined && (rule.pubicHStyle !== "no default setting")) {
-			if (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless") {
-				if ((slave.pubicHStyle !== rule.pubicHStyle)) {
-					slave.pubicHStyle = rule.pubicHStyle;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s pubic hair has been restyled; it is now ${rule.pubicHStyle}.`;
-				}
-			}
-		}
-
-		if (rule.underArmHColor !== undefined && (rule.underArmHColor !== "no default setting")) {
-			if (slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") {
-				if ((slave.underArmHColor !== rule.underArmHColor)) {
-					slave.underArmHColor = rule.underArmHColor;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s underarm hair, if present, has been dyed ${rule.underArmHColor}.`;
-				}
-			}
-		}
-
-		if (rule.underArmHStyle !== undefined && (rule.underArmHStyle !== "no default setting")) {
-			if (slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") {
-				if ((slave.underArmHStyle !== rule.underArmHStyle)) {
-					slave.underArmHStyle = rule.underArmHStyle;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s underarm hair has been restyled; it is now ${rule.underArmHStyle}.`;
-				}
-			}
-		}
-
-		if (rule.eyebrowHColor !== undefined && (rule.eyebrowHColor !== "no default setting")) {
-			if (slave.eyebrowHStyle != "bald") {
-				if ((slave.eyebrowHColor !== rule.eyebrowHColor)) {
-					slave.eyebrowHColor = rule.eyebrowHColor;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrow hair, if present, has been dyed ${rule.eyebrowHColor}.`;
-				}
-			}
-		}
-
-		if (rule.eyebrowHStyle !== undefined && (rule.eyebrowHStyle !== "no default setting")) {
-			if (slave.eyebrowHStyle != "bald") {
-				if ((slave.eyebrowHStyle !== rule.eyebrowHStyle)) {
-					slave.eyebrowHStyle = rule.eyebrowHStyle;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrow hair has been restyled; it is now ${rule.eyebrowHStyle}.`;
-				}
-			}
-		}
-
-		if (rule.eyebrowFullness !== undefined && (rule.eyebrowFullness !== "no default setting")) {
-			if (slave.eyebrowHStyle != "bald") {
-				if ((slave.eyebrowFullness !== rule.eyebrowFullness)) {
-					slave.eyebrowFullness = rule.eyebrowFullness;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrow hair has been reshaped; it is now ${rule.eyebrowFullness}.`;
-				}
-			}
-		}
-
-		if (rule.skinColor !== undefined && rule.skinColor !== "no default setting" && rule.skinColor !== slave.skin) {
-			slave.skin = rule.skinColor;
-			r += `<br>${slave.slaveName}'s skin color has been set to ${rule.skinColor}.`;
-		}
-	}
-
-	function ProcessPiercings(slave, rule) {
-		if (rule.nipplesPiercing !== undefined && (rule.nipplesPiercing !== "no default setting")) {
-			if ((slave.nipplesPiercing !== rule.nipplesPiercing)) {
-				if ((rule.nipplesPiercing === 0)) {
-					slave.nipplesPiercing = 0;
-					r += `<br>${slave.slaveName}'s nipple piercings have been removed.`;
-				} else if (slave.nipples !== "fuckable") {
-					slave.nipplesPiercing = rule.nipplesPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s nipples have been pierced.`;
-				} else {
-					r += `<br>${slave.slaveName}'s nipples are inverted and cannot be pierced.`;
-				}
-			}
-		}
-
-		if (rule.areolaePiercing !== undefined && (rule.areolaePiercing !== "no default setting")) {
-			if ((slave.areolaePiercing !== rule.areolaePiercing)) {
-				if ((rule.areolaePiercing === 0)) {
-					slave.areolaePiercing = 0;
-					r += `<br>${slave.slaveName}'s areolae piercings have been removed.`;
-				} else {
-					slave.areolaePiercing = rule.areolaePiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s areolae have been given stud piercings.`;
-				}
-			}
-		}
-
-		if (rule.clitPiercing !== undefined && (rule.clitPiercing !== "no default setting")) {
-			if ((slave.clitPiercing !== rule.clitPiercing)) {
-				if ((rule.clitPiercing === 0)) {
-					slave.clitPiercing = 0;
-					if (slave.dick > 0)
-						r += `<br>${slave.slaveName}'s frenulum piercing has been removed.`;
-					else
-						r += `<br>${slave.slaveName}'s clit piercing has been removed.`;
-
-				} else if ((slave.vagina != -1) || (slave.dick !== 0)) {
-					slave.clitPiercing = rule.clitPiercing;
-					if (slave.dick > 0)
-						r += `<br>${slave.slaveName}'s frenulum has been pierced.`;
-					else
-						r += `<br>${slave.slaveName}'s clit has been pierced.`;
-
-					if (rule.clitPiercing == 3)
-						cashX(-1000, "slaveMod");
-					else
-						cashX(forceNeg(V.modCost), "slaveMod", slave);
-				}
-			}
-		}
-
-		if ((slave.vagina != -1)) {
-			if (rule.vaginaPiercing !== undefined && (rule.vaginaPiercing !== "no default setting")) {
-				if ((slave.vaginaPiercing !== rule.vaginaPiercing)) {
-					if ((rule.vaginaPiercing === 0)) {
-						slave.vaginaPiercing = 0;
-						r += `<br>${slave.slaveName}'s labia piercings have been removed.`;
-					} else {
-						slave.vaginaPiercing = rule.vaginaPiercing;
-						cashX(forceNeg(V.modCost), "slaveMod", slave);
-						r += `<br>${slave.slaveName}'s pussylips have been pierced.`;
-					}
-				}
-			}
-		}
-
-		if ((slave.dick > 0)) {
-			if (rule.dickPiercing !== undefined && (rule.dickPiercing !== "no default setting")) {
-				if ((slave.dickPiercing !== rule.dickPiercing)) {
-					if ((rule.dickPiercing === 0)) {
-						slave.dickPiercing = 0;
-						r += `<br>${slave.slaveName}'s shaft piercings have been removed.`;
-					} else {
-						slave.dickPiercing = rule.dickPiercing;
-						cashX(forceNeg(V.modCost), "slaveMod", slave);
-						r += `<br>${slave.slaveName}'s shaft has been pierced.`;
-					}
-				}
-			}
-		}
-
-		if (rule.anusPiercing !== undefined && (rule.anusPiercing !== "no default setting")) {
-			if ((slave.anusPiercing !== rule.anusPiercing)) {
-				if ((rule.anusPiercing === 0)) {
-					slave.anusPiercing = 0;
-					r += `<br>${slave.slaveName}'s asshole piercings have been removed.`;
-				} else {
-					slave.anusPiercing = rule.anusPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s asshole has been pierced.`;
-				}
-			}
-		}
-
-		if (rule.lipsPiercing !== undefined && (rule.lipsPiercing !== "no default setting")) {
-			if ((slave.lipsPiercing !== rule.lipsPiercing)) {
-				if ((rule.lipsPiercing === 0)) {
-					slave.lipsPiercing = 0;
-					r += `<br>${slave.slaveName}'s lip piercings have been removed.`;
-				} else {
-					slave.lipsPiercing = rule.lipsPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s lips have been pierced.`;
-				}
-			}
-		}
-
-		if (rule.tonguePiercing !== undefined && (rule.tonguePiercing !== "no default setting")) {
-			if ((slave.tonguePiercing !== rule.tonguePiercing)) {
-				if ((rule.tonguePiercing === 0)) {
-					slave.tonguePiercing = 0;
-					r += `<br>${slave.slaveName}'s tongue piercings have been removed.`;
-				} else {
-					slave.tonguePiercing = rule.tonguePiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s tongue has been pierced.`;
-				}
-			}
-		}
-
-		if (rule.earPiercing !== undefined && (rule.earPiercing !== "no default setting")) {
-			if ((slave.earPiercing !== rule.earPiercing)) {
-				if ((rule.earPiercing === 0)) {
-					slave.earPiercing = 0;
-					r += `<br>${slave.slaveName}'s ear piercings have been removed.`;
-				} else {
-					slave.earPiercing = rule.earPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s ears have been pierced.`;
-				}
-			}
-		}
-
-		if (rule.nosePiercing !== undefined && (rule.nosePiercing !== "no default setting")) {
-			if ((slave.nosePiercing !== rule.nosePiercing)) {
-				if ((rule.nosePiercing === 0)) {
-					slave.nosePiercing = 0;
-					r += `<br>${slave.slaveName}'s nose piercing has been removed.`;
-				} else {
-					slave.nosePiercing = rule.nosePiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s nose has been pierced.`;
-				}
-			}
-		}
-
-		if (rule.eyebrowPiercing !== undefined && (rule.eyebrowPiercing !== "no default setting")) {
-			if ((slave.eyebrowPiercing !== rule.eyebrowPiercing)) {
-				if ((rule.eyebrowPiercing === 0)) {
-					slave.eyebrowPiercing = 0;
-					r += `<br>${slave.slaveName}'s eyebrow piercings have been removed.`;
-				} else {
-					slave.eyebrowPiercing = rule.eyebrowPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s eyebrows have been pierced.`;
-				}
-			}
-		}
-
-		if (rule.navelPiercing !== undefined && (rule.navelPiercing !== "no default setting")) {
-			if ((slave.navelPiercing !== rule.navelPiercing)) {
-				if ((rule.navelPiercing === 0)) {
-					slave.navelPiercing = 0;
-					r += `<br>${slave.slaveName}'s navel piercing have been removed.`;
-				} else {
-					slave.navelPiercing = rule.navelPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s navel has been pierced.`;
-				}
-			}
-		}
-
-		if (rule.corsetPiercing !== undefined && (rule.corsetPiercing !== "no default setting")) {
-			if ((slave.corsetPiercing !== rule.corsetPiercing)) {
-				if ((rule.corsetPiercing === 0)) {
-					slave.corsetPiercing = 0;
-					r += `<br>${slave.slaveName}'s corset piercings have been removed.`;
-				} else {
-					slave.corsetPiercing = rule.corsetPiercing;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName} has been given a set of corset piercings.`;
-				}
-			}
-		}
-	}
-
-	function ProcessSmartPiercings(slave, rule) {
-		if ((slave.clitPiercing == 3)) {
-			let _used = 0;
-			if (rule.clitSetting !== undefined && (rule.clitSetting !== "no default setting")) {
-				if (slave.clitSetting !== rule.clitSetting) {
-					slave.clitSetting = rule.clitSetting;
-					_used = 1;
-					r += `<br>${slave.slaveName}'s smart piercing has been set to ${slave.clitSetting}.`;
-				} else if (slave.fetishStrength < 100) {
-					_used = 1;
-				}
-			}
-			if (_used === 0) {
-				if (rule.clitSettingEnergy !== undefined && (rule.clitSettingEnergy !== "no default setting")) {
-					if (slave.energy < rule.clitSettingEnergy) {
-						if (slave.clitSetting !== "all") {
-							r += `<br>${slave.slaveName}'s smart piercing has been set to enhance libido.`;
-						}
-						slave.clitSetting = "all";
-						_used = 1;
-					} else if (slave.energy >= rule.clitSettingEnergy + 10) {
-						if (slave.clitSetting !== "none") {
-							r += `<br>${slave.slaveName}'s smart piercing has been set to suppress libido.`;
-						}
-						slave.clitSetting = "none";
-						_used = 1;
-					}
-				}
-			}
-			if (_used === 0) {
-				if (rule.clitSettingXY !== undefined && (rule.clitSettingXY !== "no default setting")) {
-					if (slave.attrXY < rule.clitSettingXY) {
-						if (slave.clitSetting !== "men") {
-							r += `<br>${slave.slaveName}'s smart piercing has been set to encourage attraction to men.`;
-						}
-						slave.clitSetting = "men";
-						_used = 1;
-					} else if (slave.attrXY >= rule.clitSettingXY + 10) {
-						if (slave.clitSetting !== "anti-men") {
-							r += `<br>${slave.slaveName}'s smart piercing has been set to discourage attraction to men.`;
-						}
-						slave.clitSetting = "anti-men";
-						_used = 1;
-					}
-				}
-			}
-			if (_used === 0) {
-				if (rule.clitSettingXX !== undefined && (rule.clitSettingXX !== "no default setting")) {
-					if (slave.attrXX < rule.clitSettingXX) {
-						if (slave.clitSetting !== "women") {
-							r += `<br>${slave.slaveName}'s smart piercing has been set to encourage attraction to women.`;
-						}
-						slave.clitSetting = "women";
-						_used = 1;
-					} else if (slave.attrXX >= rule.clitSettingXX + 10) {
-						if (slave.clitSetting !== "anti-women") {
-							r += `<br>${slave.slaveName}'s smart piercing has been set to discourage attraction to women.`;
-						}
-						slave.clitSetting = "anti-women";
-						_used = 1;
-					}
-				}
-			}
-		}
-	}
-
-	function ProcessTattoos(slave, rule) {
-		if (rule.boobsTat !== undefined && (rule.boobsTat !== "no default setting")) {
-			if ((slave.boobsTat !== rule.boobsTat)) {
-				slave.boobsTat = rule.boobsTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s chest has been tattooed.`;
-			}
-		}
-
-		if (rule.buttTat !== undefined && (rule.buttTat !== "no default setting")) {
-			if ((slave.buttTat !== rule.buttTat)) {
-				slave.buttTat = rule.buttTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s butt has been tattooed.`;
-			}
-		}
-
-		if (rule.vaginaTat !== undefined && (rule.vaginaTat !== "no default setting")) {
-			if ((slave.vaginaTat !== rule.vaginaTat)) {
-				slave.vaginaTat = rule.vaginaTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s abdomen has been tattooed.`;
-			}
-		}
-
-		if ((slave.dick > 0)) {
-			if (rule.dickTat !== undefined && (rule.dickTat !== "no default setting")) {
-				if ((slave.dickTat !== rule.dickTat)) {
-					slave.dickTat = rule.dickTat;
-					cashX(forceNeg(V.modCost), "slaveMod", slave);
-					r += `<br>${slave.slaveName}'s dick has been tattooed.`;
-				}
-			}
-		}
-
-		if (rule.lipsTat !== undefined && (rule.lipsTat !== "no default setting")) {
-			if ((slave.lipsTat !== rule.lipsTat)) {
-				slave.lipsTat = rule.lipsTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s face has been tattooed.`;
-			}
-		}
-
-		if (rule.anusTat !== undefined && (rule.anusTat !== "no default setting")) {
-			if ((slave.anusTat !== rule.anusTat)) {
-				slave.anusTat = rule.anusTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s asshole has been modded.`;
-			}
-		}
-
-		if (rule.shouldersTat !== undefined && (rule.shouldersTat !== "no default setting")) {
-			if ((slave.shouldersTat !== rule.shouldersTat)) {
-				slave.shouldersTat = rule.shouldersTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s shoulders have been tattooed.`;
-			}
-		}
-
-		if (rule.armsTat !== undefined && (rule.armsTat !== "no default setting")) {
-			if ((slave.armsTat !== rule.armsTat)) {
-				slave.armsTat = rule.armsTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s arms have been tattooed.`;
-			}
-		}
-
-		if (rule.legsTat !== undefined && (rule.legsTat !== "no default setting")) {
-			if ((slave.legsTat !== rule.legsTat)) {
-				slave.legsTat = rule.legsTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s legs have been tattooed.`;
-			}
-		}
-
-		if (rule.stampTat !== undefined && (rule.stampTat !== "no default setting")) {
-			if ((slave.stampTat !== rule.stampTat)) {
-				slave.stampTat = rule.stampTat;
-				cashX(forceNeg(V.modCost), "slaveMod", slave);
-				r += `<br>${slave.slaveName}'s lower back has been tattooed.`;
-			}
-		}
-		if ((rule.autoBrand == 1)) {
-			if ((slave.brand === 0)) {
-				if ((slave.health > -20)) {
-					slave.brand = V.brandDesign;
-					slave.brandLocation = V.brandTarget;
-					if ((slave.devotion < 18))
-						slave.devotion -= 5;
-					slave.trust -= 5;
-					slave.health -= 10;
-					r += `<br>${slave.slaveName} has been branded, with <span class="gold">fear</span>${slave.devotion < 18? `, <span class="mediumorchid">regard,</span>`:``} and <span class="red">health</span> consequences.`;
-				}
-			}
-		}
-	}
-
-	function ProcessPornFeedEnabled(slave, rule) {
-		if (rule.pornFeed === undefined || rule.pornFeed === "no default setting") {
-			return;
-		}
-		if (rule.pornFeed === slave.pornFeed) {
-			return;
-		}
-		slave.pornFeed = rule.pornFeed;
-		let yesno = slave.pornFeed ? "are now" : "are no longer";
-		if (slave.pornFeed === 0) {slave.pornFameSpending = 0};
-		r += `<br>Highlights of ${slave.slaveName}'s sex life ${yesno} being released.`;
-	}
-
-	function ProcessPorn(slave, rule) {
-		if ((rule.pornFameSpending !== undefined) && (rule.pornFameSpending !== "no default setting")) {
-			if ((slave.pornPrestige < 3)) {
-				if ((slave.pornFameSpending !== rule.pornFameSpending)) {
-					slave.pornFameSpending = rule.pornFameSpending;
-					r += `<br>${slave.slaveName}'s porn publicity has been corrected.`;
-				}
-			}
-		}
-	}
-
-	function ProcessLabel(slave, rule) {
-		if (rule.label !== "no default setting" && !slave.customLabel.includes("["+rule.label+"]")) {
-			slave.customLabel = slave.customLabel + "[" + rule.label + "]";
-			r += `<br>${slave.slaveName} has been tagged as ${rule.label}`;
-		}
-
-		if (rule.removeLabel !== "no default setting" && slave.customLabel.includes("["+rule.removeLabel+"]")) {
-			slave.customLabel = slave.customLabel.replace("["+rule.removeLabel+"]", "");
-			r += `<br>${slave.slaveName}'s tag [${rule.removeLabel}] is removed.`;
-		}
-	}
-
-	return DefaultRules;
-})();
-
-
-/*:: Rules Assistant Options [script]*/
-// rewrite of the rules assistant options page in javascript
-// uses an object-oriented widget pattern
-// wrapped in a closure so as not to pollute the global namespace
-// the widgets are generic enough to be reusable; if similar user interfaces are ported to JS, we could move the classes to the global scope
-
-window.rulesAssistantOptions = (function() {
-	"use strict";
-	let V, current_rule;
-
-	function rulesAssistantOptions(element) {
-		V = State.variables;
-		V.nextButton = "Back to Main";
-		V.nextLink = "Main";
-		V.returnTo = "Main";
-		V.showEncyclopedia = 1;
-		V.encyclopedia = "Personal Assistant";
-		if (V.currentRule !== null) {
-			const idx = V.defaultRules.findIndex(rule => rule.ID === V.currentRule);
-			if (idx === -1)
-				current_rule = V.defaultRules[0];
-			else
-				current_rule = V.defaultRules[idx];
-		}
-		const root = new Root(element);
-	}
-
-	function returnP(e) { return e.keyCode === 13; }
-
-	function newRule(root) {
-		const rule = emptyDefaultRule();
-		V.defaultRules.push(rule);
-		V.currentRule = rule.ID;
-		reload(root);
-	}
-
-	function removeRule(root) {
-		const idx = V.defaultRules.findIndex(rule => rule.ID === current_rule.ID);
-		V.defaultRules.splice(idx, 1);
-		if (V.defaultRules.length > 0) {
-			const new_idx = idx < V.defaultRules.length ? idx : V.defaultRules.length - 1;
-			V.currentRule = V.defaultRules[new_idx].ID;
-		} else V.currentRule = null;
-		reload(root);
-	}
-
-	function lowerPriority(root) {
-		if (V.defaultRules.length === 1) return; // nothing to swap with
-		const idx = V.defaultRules.findIndex(rule => rule.ID === current_rule.ID);
-		if (idx === 0) return; // no lower rule
-		arraySwap(V.defaultRules, idx, idx-1);
-		reload(root);
-	}
-
-	function higherPriority(root) {
-		if (V.defaultRules.length === 1) return; // nothing to swap with
-		const idx = V.defaultRules.findIndex(rule => rule.ID === current_rule.ID);
-		if (idx === V.defaultRules.length - 1) return; // no higher rule
-		arraySwap(V.defaultRules, idx, idx+1);
-		reload(root);
-	}
-
-	function changeName(name, root) {
-		if (name === current_rule.name) return;
-		current_rule.name = name;
-		reload(root);
-	}
-
-	// reload the passage
-	function reload(root) {
-		const elem = root.element;
-		elem.innerHTML = "";
-		rulesAssistantOptions(elem);
-	}
-
-	const parse = {
-		integer(string) {
-			let n = parseInt(string, 10);
-			return isNaN(n)? 0: n;
-		},
-		boobs(string) {
-			return Math.clamp(parse.integer(string), 0, 48000);
-		},
-		butt(string) {
-			return Math.clamp(parse.integer(string), 0, 20);
-		},
-		lips(string) {
-			return Math.clamp(parse.integer(string), 0, 100);
-		},
-		dick(string) {
-			return Math.clamp(parse.integer(string), 0, 30);
-		},
-		balls(string) {
-			return Math.clamp(parse.integer(string), 0, 125);
-		},
-	};
-
-	// the Element class wraps around a DOM element and adds extra functionality
-	// this is safer than extending DOM objects directly
-	// it also turns DOM manipulation into an implementation detail
-	class Element {
-		constructor(...args) {
-			this.parent = null;
-			this.element = this.render(...args);
-			this.children = [];
-		}
-
-		appendChild(child) {
-			child.parent = this;
-			this.children.push(child);
-			this.element.appendChild(child.element);
-		}
-
-		// return the first argument to simplify creation of basic container items
-		render(...args) {
-			return args[0];
-		}
-
-		remove() {
-			const idx = this.parent.children.findIndex(child => child === this);
-			this.parent.children.slice(idx, 1);
-			this.element.remove();
-		}
-	}
-
-	class Section extends Element {
-		constructor(header, hidden=false) {
-			super(header);
-			this.hidey = this.element.querySelector("div");
-			if (hidden) this.toggle_hidey();
-		}
-
-		render(header) {
-			const section = document.createElement("section");
-			section.classList.add("rajs-section");
-			const h1 = document.createElement("h1");
-			h1.onclick = () => { this.toggle_hidey(); };
-			h1.innerHTML = header;
-			const hidey = document.createElement("div");
-			section.appendChild(h1);
-			section.appendChild(hidey);
-			return section;
-		}
-
-		appendChild(child) {
-			child.parent = this;
-			this.children.push(child);
-			this.hidey.appendChild(child.element);
-		}
-
-		toggle_hidey() {
-			switch(this.hidey.style.display) {
-				case "none":
-					this.hidey.style.display = "initial";
-					break;
-				default:
-					this.hidey.style.display = "none";
-					break;
-			}
-		}
-	}
-
-	// list of clickable elements
-	// has a short explanation (the prefix) and a value display
-	// value display can optionally be an editable text input field
-	// it can be "bound" to a variable by setting its "onchange" method
-	class List extends Element {
-		constructor(prefix, data=[], textinput=false) {
-			super(prefix + ": ", textinput);
-			this.selectedItem = null;
-			data.forEach(item => this.appendChild(new ListItem(...item)));
-		}
-
-		render(prefix, textinput) {
-			const elem = document.createElement("div");
-			const label = document.createElement("span");
-			label.innerHTML = prefix;
-			let value;
-			if (textinput) {
-				value = document.createElement("input");
-				value.setAttribute("type", "text");
-				value.classList.add("rajs-value"); //
-				// call the variable binding when the input field is no longer being edited, and when the enter key is pressed
-				value.onblur = () => {this.inputEdited(); };
-				value.onkeypress = (e) => { if (returnP(e)) this.inputEdited(); };
-			} else {
-				value = document.createElement("strong");
-			}
-			this.value = value;
-			elem.appendChild(label);
-			elem.appendChild(value);
-			elem.classList.add("rajs-list");
-			return elem;
-		}
-
-		inputEdited() {
-			if (this.selectedItem) this.selectedItem.deselect();
-			this.propagateChange();
-		}
-
-		selectItem(item) {
-			if (this.selectedItem) this.selectedItem.deselect();
-			this.selectedItem = item;
-			this.setValue(item.data);
-			this.propagateChange();
-		}
-
-		setValue(what) {
-			if (this.value.tagName === "INPUT")
-				this.value.value = ""+what;
-			else
-				this.value.innerHTML = ""+what;
-		}
-
-		getData(what) {
-			return (this.value.tagName === "INPUT" ? this.parse(this.value.value): this.selectedItem.data);
-		}
-
-		// customisable input field parser / sanity checker
-		parse(what) { return what; }
-
-		propagateChange() {
-			if (this.onchange instanceof Function)
-				this.onchange(this.getData());
-		}
-	}
-
-	// a clickable item of a list
-	class ListItem extends Element {
-		constructor(displayvalue, data) {
-			super(displayvalue);
-			this.data = data !== undefined ? data: displayvalue;
-			this.selected = false;
-		}
-
-		render(displayvalue) {
-			const elem = document.createElement("span");
-			elem.classList.add("rajs-listitem");
-			elem.innerHTML = displayvalue;
-			elem.onclick = () => { return this.select(); };
-			return elem;
-		}
-
-		select() {
-			if (this.selected) return false;
-			this.parent.selectItem(this);
-			this.element.classList.add("selected");
-			this.selected = true;
-			return true;
-		}
-
-		deselect() {
-			this.element.classList.remove("selected");
-			this.selected = false;
-		}
-	}
-
-	// a way to organize lists with too many elements in subsections
-	// children are bound to the master list
-	class ListSubSection extends Element {
-		constructor(parent, label, pairs) {
-			super(label);
-			this.parent = parent;
-			pairs.forEach(item => this.appendChild(new ListItem(...item)));
-		}
-
-		render(label) {
-			const elem = document.createElement("div");
-			const lelem = document.createElement("em");
-			lelem.innerText = label + ": ";
-			elem.appendChild(lelem);
-			return elem;
-		}
-
-		appendChild(child) {
-			super.appendChild(child);
-			child.parent = this.parent;
-			this.parent.children.push(child);
-		}
-	}
-
-	// similar to list, but is just a collection of buttons
-	class Options extends Element {
-		constructor(elements=[]) {
-			super();
-			elements.forEach(element => { this.appendChild(element); });
-		}
-
-		render() {
-			const elem = document.createElement("div");
-			elem.classList.add("rajs-list");
-			return elem;
-		}
-	}
-
-	// options equivalent of ListItem
-	class OptionsItem extends Element {
-		constructor(label, onclick) {
-			super(label);
-			this.label = label;
-			this.onclick = onclick;
-		}
-		render(label, onclick) {
-			const elem = document.createElement("span");
-			elem.classList.add("rajs-listitem");
-			elem.innerHTML = label;
-			elem.onclick = () => { return this.onclick(this); };
-			return elem;
-		}
-	}
-
-	class ButtonList extends Element {
-		render(label) {
-			const elem = document.createElement("div");
-			const labelel = document.createElement("span");
-			labelel.innerHTML = label += ": ";
-			elem.appendChild(labelel);
-			return elem;
-		}
-
-		getSelection() {
-			return (this.children
-				.filter(child => child.selected)
-				.map(child => child.setvalue)
-			);
-		}
-
-		onchange() { return; }
-	}
-
-	class ButtonItem extends Element {
-		constructor(label, setvalue, selected=false) {
-			super(label, selected);
-			this.selected = selected;
-			this.setvalue = setvalue ? setvalue : label;
-		}
-
-		render(label, selected) {
-			const container = document.createElement("div");
-			container.classList.add("rajs-listitem");
-
-			const labelel = document.createElement("span");
-			labelel.innerHTML = label;
-
-			const button = document.createElement("input");
-			button.setAttribute("type", "checkbox");
-			button.checked = selected;
-			button.onchange = () => this.onchange(button.checked);
-			labelel.onclick = () => button.click();
-
-			container.appendChild(labelel);
-			container.appendChild(button);
-
-			return container;
-		}
-
-		onchange(value) {
-			this.selected = value;
-			this.parent.onchange(this);
-		}
-	}
-
-	// rule import field
-	class NewRuleField extends Element {
-		constructor(root) {
-			super();
-			this.root = root;
-		}
-
-		render() {
-			let element = document.getElementById("importfield");
-			if (element !== null) { return element; }
-			const container = document.createElement("div");
-			container.id = "importfield";
-			const textarea = document.createElement("textarea");
-			textarea.placeholder = "Paste your rule here";
-			container.appendChild(textarea);
-			this.textarea = textarea;
-			const button = document.createElement("button");
-			button.name = "Load";
-			button.innerHTML = "Load";
-			button.onclick = () => { this.loadNewRule(); };
-			container.appendChild(button);
-			return container;
-		}
-
-		loadNewRule() {
-			const text = this.textarea.value;
-			try {
-				const rule = JSON.parse(text);
-				if (rule instanceof Array)
-					rule.forEach(r => V.defaultRules.push(r));
-				else
-					V.defaultRules.push(rule);
-				reload(this.root);
-			} catch (e) {
-				alert("Couldn't import that rule:\n" + e.message);
-			}
-		}
-	}
-
-	// the base element, parent of all elements
-	class Root extends Element {
-		constructor(element) {
-			super(element);
-			if(V.defaultRules.length === 0) {
-				const paragraph = document.createElement("p");
-				paragraph.innerHTML = "<strong>No rules</strong>";
-				this.appendChild(new Element(paragraph));
-				this.appendChild(new NoRules(this));
-				return;
-			}
-			this.appendChild(new RuleSelector(this));
-			this.appendChild(new RuleOptions(this));
-			this.appendChild(new ConditionEditor(this));
-			this.appendChild(new EffectEditor(this));
-		}
-
-		render(element) {
-			const greeting = document.createElement("p");
-			greeting.innerHTML = `<em>${properTitle()}, I will review your slaves and make changes that will have a beneficial effect. Apologies, ${properTitle()}, but this function is... not fully complete. It may have some serious limitations. Please use the 'no default setting' option to identify areas I should not address.</em>`;
-			element.appendChild(greeting);
-			return element;
-		}
-	}
-
-	// optoins displayed when there are no rules
-	class NoRules extends Options {
-		constructor(root) {
-			super();
-			this.root = root;
-			const newrule = new OptionsItem("Add a new rule", () => { newRule(this.root); });
-			this.appendChild(newrule);
-			const importrule = new OptionsItem("Import a rule", () => { this.root.appendChild(new NewRuleField(this.root)); });
-			this.appendChild(importrule);
-		}
-	}
-
-	// buttons for selecting the current rule
-	class RuleSelector extends List {
-		constructor(root) {
-			super("Current rule", V.defaultRules.map(i => [i.name, i]));
-			this.setValue(current_rule.name);
-			this.onchange = function (rule) {
-				V.currentRule = rule.ID;
-				reload(root);
-			};
-		}
-	}
-
-	// buttons for doing transformations on rules
-	class RuleOptions extends Options {
-		constructor(root) {
-			super();
-			this.appendChild(new OptionsItem("New Rule", () => newRule(root)));
-			this.appendChild(new OptionsItem("Remove Rule", () => removeRule(root)));
-			this.appendChild(new OptionsItem("Apply rules", () => this.appendChild(new ApplicationLog())));
-			this.appendChild(new OptionsItem("Lower Priority", () => lowerPriority(root)));
-			this.appendChild(new OptionsItem("Higher Priority", () => higherPriority(root)));
-			this.appendChild(new OptionsItem("Rename", () => this.appendChild(new RenameField(root))));
-			this.appendChild(new OptionsItem("Export this rule", () => this.appendChild(new ExportField(current_rule))));
-			this.appendChild(new OptionsItem("Export all rules", () => this.appendChild(new ExportField(...V.defaultRules))));
-			this.appendChild(new OptionsItem("Import rule(s)", () => this.appendChild(new NewRuleField(root))));
-		}
-	}
-
-	class ApplicationLog extends Element {
-		render() {
-			const elem = document.querySelector("#application-log") || document.createElement("div");
-			elem.id = "application-log";
-			clearSummaryCache();
-			elem.innerHTML = V.slaves.map(slave => DefaultRules(slave)).join("");
-			return elem;
-		}
-	}
-
-	class RenameField extends Element {
-		constructor(root) {
-			super();
-			this.element.onblur = () => changeName(this.element.value, root);
-			this.element.onkeypress = (e) => { if (returnP(e)) changeName(this.element.value, root); };
-		}
-
-		render() {
-			const elem = document.createElement("input");
-			elem.setAttribute("type", "text");
-			elem.setAttribute("value", current_rule.name);
-			return elem;
-		}
-	}
-
-	class ExportField extends Element {
-		render(...args) {
-			let element = document.getElementById("exportfield");
-			if (element === null) {
-				element = document.createElement("textarea");
-				element.id = "exportfield";
-			}
-			element.value = JSON.stringify(args, null, 2);
-			return element;
-		}
-	}
-
-	// parent section for condition editing
-	class ConditionEditor extends Section {
-		constructor() {
-			super("Activation Condition");
-			this.appendChild(new ConditionFunction());
-			this.appendChild(new AssignmentInclusion());
-			this.appendChild(new SpecialExclusion());
-			this.appendChild(new SpecificInclusionExclusion());
-		}
-	}
-
-	class ConditionFunction extends Element {
-		constructor() {
-			super();
-			const items = [
-				["Never", false],
-				["Always", true],
-				["Custom", "custom"],
-				["Devotion", "devotion"],
-				["Trust", "trust"],
-				["Health", "health"],
-				["Sex", "genes"],
-				["Sex drive", "energy"],
-				["Height", "height"],
-				["Weight", "weight"],
-				["Age", "actualAge"],
-				["Body Age", "physicalAge"],
-				["Visible Age", "visualAge"],
-				["Muscles", "muscles"],
-				["Lactation", "lactation"],
-				["Pregnancy", "preg"],
-				["Pregnancy Multiples", "pregType"],
-				["Belly Implant", "bellyImplant"],
-				["Belly Size", "belly"],
-				["Education", "intelligenceImplant"],
-				["Intelligence", "intelligence"],
-				["Fetish", "fetish"],
-				["Accent", "accent"],
-				["Waist", "waist"],
-				["Amputation", "amp"],
-			];
-			this.fnlist = new List("Activation function", items);
-			this.fnlist.setValue(current_rule.condition.function === "between" ? current_rule.condition.data.attribute : current_rule.condition.function);
-			this.fnlist.onchange = (value) => this.fnchanged(value);
-			this.appendChild(this.fnlist);
-			this.fneditor = null;
-
-			switch(current_rule.condition.function) {
-				case false:
-				case true:
-					break;
-				case "custom":
-					this.show_custom_editor(CustomEditor, current_rule.condition.data);
-					break;
-				case "between":
-					this.show_custom_editor(RangeEditor, current_rule.condition.function, current_rule.condition.data);
-					break;
-				case "belongs":
-					this.show_custom_editor(ItemEditor, current_rule.condition.function, current_rule.condition.data);
-					break;
-			}
-		}
-
-		betweenP(attribute) {
-			return [
-				"devotion",
-				"trust",
-				"health",
-				"energy",
-				"height",
-				"weight",
-				"actualAge",
-				"physicalAge",
-				"visualAge",
-				"muscles",
-				"lactation",
-				"preg",
-				"pregType",
-				"bellyImplant",
-				"belly",
-				"intelligenceImplant",
-				"intelligence",
-				"accent",
-				"waist",
-			].includes(attribute);
-		}
-
-		belongsP(attribute) {
-			return [
-				"fetish",
-				"amp",
-				"genes",
-			].includes(attribute);
-		}
-
-		show_custom_editor(what, ...args) {
-			if (this.custom_editor !== null) this.hide_custom_editor();
-			this.custom_editor = new what(...args);
-			this.appendChild(this.custom_editor);
-		}
-
-		hide_custom_editor() {
-			if (this.custom_editor) {
-				this.custom_editor.remove();
-				this.custom_editor = null;
-			}
-		}
-
-		render() {
-			const elem = document.createElement("div");
-			return elem;
-		}
-
-		fnchanged(value) {
-			if (this.fneditor !== null) {
-				this.fneditor.element.remove();
-				this.fneditor = null;
-			}
-			if (value === true || value === false) {
-				current_rule.condition.function = value;
-				current_rule.condition.data = {};
-				this.hide_custom_editor();
-			} else if (value === "custom") {
-				current_rule.condition.function = "custom";
-				current_rule.condition.data = "";
-				this.show_custom_editor(CustomEditor, current_rule.condition.data);
-			} else if (this.betweenP(value)) {
-				current_rule.condition.function = "between";
-				current_rule.condition.data = { attribute: value, value: [null, null] };
-				this.show_custom_editor(RangeEditor, current_rule.condition.function, current_rule.condition.data);
-			} else if (this.belongsP(value)) {
-				current_rule.condition.function = "belongs";
-				current_rule.condition.data = { attribute: value, value: [] };
-				this.show_custom_editor(ItemEditor, current_rule.condition.function, current_rule.condition.data);
-			}
-		}
-	}
-
-	class CustomEditor extends Element {
-		constructor(data) {
-			if (data.length === 0) data = "(slave) => slave.slaveName === 'Fancy Name'";
-			super(data);
-		}
-
-		render(data) {
-			const elem = document.createElement("div");
-			const textarea = document.createElement("textarea");
-			textarea.innerHTML = data;
-			textarea.onblur = () => current_rule.condition.data = textarea.value;
-			elem.appendChild(textarea);
-			const explanation = document.createElement("div");
-			explanation.innerHTML = "Insert a valid <a target='_blank' class='link-external' href='https://www.w3schools.com/js/js_comparisons.asp'>JavaScript comparison and/or logical operation</a>.";
-			elem.appendChild(explanation);
-			return elem;
-		}
-	}
-
-	class RangeEditor extends Element {
-		render(fn, data) {
-			const elem = document.createElement("div");
-
-			const minlabel = document.createElement("label");
-			minlabel.innerHTML = "Lower bound: ";
-			elem.appendChild(minlabel);
-
-			const min = document.createElement("input");
-			min.setAttribute("type", "text");
-			min.value = "" + data.value[0];
-			min.onkeypress = e => { if (returnP(e)) this.setmin(min.value); };
-			min.onblur = e => this.setmin(min.value);
-			this.min = min;
-			elem.appendChild(min);
-
-			elem.appendChild(document.createElement("br"));
-
-			const maxlabel = document.createElement("label");
-			maxlabel.innerHTML = "Upper bound: ";
-			elem.appendChild(maxlabel);
-
-			const max = document.createElement("input");
-			max.setAttribute("type", "text");
-			max.value = "" + data.value[1];
-			max.onkeypress = e => { if (returnP(e)) this.setmax(max.value); };
-			max.onblur = e => this.setmax(max.value);
-			this.max = max;
-			elem.appendChild(max);
-
-			const infobar = document.createElement("div");
-			infobar.innerHTML = this.info(data.attribute);
-			elem.appendChild(infobar);
-
-			return elem;
-		}
-
-		parse(value) {
-			value = value.trim();
-			if (value === "null") value = null;
-			else {
-				value = parseInt(value);
-				if (isNaN(value)) value = null;
-			}
-			return value;
-		}
-
-		setmin(value) {
-			current_rule.condition.data.value[0] = this.parse(value);
-			this.min.value = ""+current_rule.condition.data.value[0];
-		}
-
-		setmax(value) {
-			current_rule.condition.data.value[1] = this.parse(value);
-			this.max.value = ""+current_rule.condition.data.value[1];
-		}
-
-		info(attribute) {
-			return ({
-				"devotion": "Very Hateful: (-∞, -95), Hateful: [-95, -50), Resistant: [-50, -20), Ambivalent: [-20, 20], Accepting: (20, 50], Devoted: (50, 95], Worshipful: (95, ∞)",
-				"trust": "Extremely terrified: (-∞, -95), Terrified: [-95, -50), Frightened: [-50, -20), Fearful: [-20, 20], Careful: (20, 50], Trusting: (50, 95], Total trust: (95, ∞)",
-				"health": "Death: (-∞, -100), Near Death: [-100, -90), Extremely Unhealthy: [-90, -50), Unhealthy: [-50, -20), Healthy: [-20, 20], Very Healthy: (20, 50], Extremely Healthy: (50, 90], Unnaturally Healthy: (90, ∞)",
-				"energy": "Frigid: (-∞, 20], Poor: (20, 40], Average: (40, 60], Powerful: (60, 80], Sex Addict: (80, 100), Nympho: 100",
-				"weight": "Emaciated: (-∞, -95), Skinny: [-95, -30), Thin: [-30, -10), Average: [-10, 10], Plush: (10, 30], Fat: (30, 95], Overweight: (95, ∞)",
-				"lactation": "None: 0, 1: Natural, 2: Lactation implant",
-				"preg": "Barren: -2, On contraceptives: -1, Not pregnant: 0, Pregnancy weeks: [1, ∞)",
-				"pregType": "Fetus count, known only after the 10th week of pregnancy",
-				"bellyImplant": "Volume in CCs. None: -1",
-				"belly": "Volume in CCs, any source",
-				"intelligenceImplant": "Education level. 0: uneducated, 15: educated, 30: advanced education, (0, 15): incomplete education.",
-				"intelligence": "From moronic to brilliant: [-100, 100]",
-				"accent": "No accent: 0, Nice accent: 1, Bad accent: 2, Can't speak language: 3 and above",
-				"waist": "Masculine waist: (95, ∞), Ugly waist: (40, 95], Unattractive waist: (10, 40], Average waist: [-10, 10], Feminine waist: [-40, -10), Wasp waist: [-95, -40), Absurdly narrow: (-∞, -95)",
-			}[attribute] || " ");
-		}
-	}
-
-	class ItemEditor extends Element {
-		render(fn, data) {
-			const elem = document.createElement("div");
-
-			const input = document.createElement("input");
-			input.setAttribute("type", "text");
-			input.value = JSON.stringify(data.value);
-			input.onkeypress = e => { if (returnP(e)) this.setValue(input); };
-			input.onblur = e => this.setValue(input);
-			this.input = input;
-			elem.appendChild(input);
-
-			const infobar = document.createElement("div");
-			infobar.innerHTML = this.info(data.attribute);
-			elem.appendChild(infobar);
-
-			return elem;
-		}
-
-		info(attribute) {
-			return "Insert a valid JSON array. Known values: " + {
-				"fetish": "buttslut, cumslut, masochist, sadist, dom, submissive, boobs, pregnancy, none (AKA vanilla)",
-				"amp": "Amputated: 1, Not amputated: 0",
-				"genes": "XX, XY",
-			}[attribute];
-		}
-
-		setValue(input) {
-			try {
-				const arr = JSON.parse(input.value);
-				current_rule.condition.data.value = arr;
-				input.value = JSON.stringify(arr);
-			} catch (e) {
-				alert(e);
-			}
-		}
-	}
-
-
-	class AssignmentInclusion extends ButtonList {
-		constructor() {
-			super("Apply to assignments and facilities");
-			const items = ["Rest", "Fucktoy", "Subordinate Slave", "House Servant", "Confined", "Whore", "Public Servant", "Classes", "Milked", "Gloryhole"];
-			if (V.HGSuite > 0) items.push("Head Girl Suite");
-			if (V.brothel > 0) items.push("Brothel");
-			if (V.club > 0) items.push("Club");
-			if (V.arcade > 0) items.push("Arcade");
-			if (V.dairy > 0) items.push("Dairy");
-			if (V.servantsQuarters > 0) items.push("Servant Quarters");
-			if (V.masterSuite > 0) items.push("Master Suite");
-			if (V.schoolroom > 0) items.push("Schoolroom");
-			if (V.spa > 0) items.push("Spa");
-			if (V.nursery > 0) items.push("Nursery");
-			if (V.clinic > 0) items.push("Clinic");
-			if (V.cellblock > 0) items.push("Cellblock");
-			items.forEach(
-				i => this.appendChild(new ButtonItem(i, this.getAttribute(i), current_rule.condition.assignment.includes(this.getAttribute(i)))));
-		}
-
-		onchange() {
-			current_rule.condition.assignment = this.getSelection();
-		}
-
-		getAttribute(what) {
-			return {
-				"Rest": "rest",
-				"Fucktoy": "please you",
-				"Subordinate Slave": "be a subordinate slave",
-				"House Servant": "be a servant",
-				"Confined": "stay confined",
-				"Whore": "whore",
-				"Public Servant": "serve the public",
-				"Classes": "take classes",
-				"Milked": "get milked",
-				"Gloryhole": "work a glory hole",
-				"Head Girl Suite": "live with your Head Girl",
-				"Brothel": "work in the brothel",
-				"Club": "serve in the club",
-				"Arcade": "be confined in the arcade",
-				"Dairy": "work in the dairy",
-				"Farmyard": "work as a farmhand",
-				"Servant Quarters": "work as a servant",
-				"Master Suite": "serve in the master suite",
-				"Schoolroom": "learn in the schoolroom",
-				"Spa": "rest in the spa",
-				"Nursery": "work as a nanny",
-				"Clinic": "get treatment in the clinic",
-				"Cellblock": "be confined in the cellblock",
-			}[what];
-		}
-	}
-
-	class SpecialExclusion extends List {
-		constructor() {
-			const items = [
-				["Yes", true],
-				["No", false]
-			];
-			super("Exclude special slaves", items);
-			this.setValue(current_rule.condition.excludeSpecialSlaves);
-			this.onchange = (value) => current_rule.condition.excludeSpecialSlaves = value;
-		}
-	}
-
-	class SpecificInclusionExclusion extends Options {
-		constructor() {
-			super();
-			this.appendChild(new OptionsItem("Limit to specific slaves", () => this.show_slave_selection()));
-			this.appendChild(new OptionsItem("Exclude specific slaves", () => this.show_slave_exclusion()));
-			this.subwidget = null;
-		}
-
-		show_slave_selection() {
-			if (this.subwidget) this.subwidget.remove();
-			this.subwidget = new SlaveSelection();
-			this.appendChild(this.subwidget);
-		}
-
-		show_slave_exclusion() {
-			if (this.subwidget) this.subwidget.remove();
-			this.subwidget = new SlaveExclusion();
-			this.appendChild(this.subwidget);
-		}
-	}
-
-	class SlaveSelection extends ButtonList {
-		constructor() {
-			super("Include specific slaves");
-			V.slaves.forEach(slave => this.appendChild(new ButtonItem(
-				[slave.slaveName, slave.slaveSurname].join(" "),
-				slave.ID,
-				current_rule.condition.selectedSlaves.includes(slave.ID))));
-		}
-
-		onchange() {
-			current_rule.condition.selectedSlaves = this.getSelection();
-		}
-	}
-
-	class SlaveExclusion extends ButtonList {
-		constructor() {
-			super("Exclude specific slaves");
-			V.slaves.forEach(slave => this.appendChild(new ButtonItem(
-				[slave.slaveName, slave.slaveSurname].join(" "),
-				slave.ID,
-				current_rule.condition.excludedSlaves.includes(slave.ID))));
-		}
-
-		onchange() {
-			current_rule.condition.excludedSlaves = this.getSelection();
-		}
-	}
-
-	// parent section for effect editing
-	class EffectEditor extends Element {
-		constructor() {
-			super();
-			this.appendChild(new AppearanceSection());
-			this.appendChild(new CosmeticSection());
-			this.appendChild(new BodyModSection());
-			this.appendChild(new AutosurgerySection());
-			this.appendChild(new RegimenSection());
-			this.appendChild(new BehaviourSection());
-			this.appendChild(new OtherSection());
-		}
-
-		render() {
-			const element = document.createElement("div");
-			return element;
-		}
-	}
-
-	class AppearanceSection extends Section {
-		constructor() {
-			super("Appearance Settings");
-			this.appendChild(new ClothesList());
-			this.appendChild(new CollarList());
-			this.appendChild(new ShoeList());
-			this.appendChild(new CorsetList());
-			this.appendChild(new LeggingsList());
-			this.appendChild(new VagAccVirginsList());
-			this.appendChild(new VagAccAVirginsList());
-			this.appendChild(new VagAccOtherList());
-			if (V.seeDicks !== 0 || V.makeDicks !== 0) {
-				this.appendChild(new DickAccVirginsList());
-				this.appendChild(new DickAccOtherList());
-			}
-			this.appendChild(new ButtplugsVirginsList());
-			this.appendChild(new ButtplugsOtherList());
-			this.appendChild(new ButtplugAttachmentsList());
-			this.appendChild(new ImplantVolumeList());
-
-		}
-	}
-
-	class RegimenSection extends Section {
-		constructor() {
-			super("Physical Regimen Settings");
-			if (V.arcologies[0].FSAssetExpansionistResearch === 1)
-				this.appendChild(new HyperGrowthSwitch());
-			this.appendChild(new GrowthList());
-			this.appendChild(new CurrativesList());
-			this.appendChild(new AphrodisiacList());
-			this.appendChild(new ContraceptiveList());
-			if (V.pregSpeedControl)
-				this.appendChild(new PregDrugsList());
-			this.appendChild(new FemaleHormonesList());
-			this.appendChild(new ShemaleHormonesList());
-			this.appendChild(new GeldingHormonesList());
-			this.appendChild(new OtherDrugsList());
-			if (V.enema === 1) {
-				this.appendChild(new EnemaList());
-			}
-			this.appendChild(new DietList());
-			this.appendChild(new DietGrowthList());
-			this.appendChild(new DietBaseList());
-			if (V.arcologies[0].FSHedonisticDecadenceResearch === 1) {
-				this.appendChild(new DietSolidFoodList());
-			}
-			this.appendChild(new MuscleList());
-			this.appendChild(new BraceList());
-		}
-	}
-
-	class BehaviourSection extends Section {
-		constructor() {
-			super("Behavior Settings");
-			this.appendChild(new AutomaticAssignmentList());
-			this.appendChild(new LivingStandardList());
-			this.appendChild(new PunishmentList());
-			this.appendChild(new RewardList());
-			this.appendChild(new ReleaseList());
-			this.appendChild(new ToyHoleList());
-			this.appendChild(new SmartFetishList());
-			this.appendChild(new SmartXYAttractionList());
-			this.appendChild(new SmartXXAttractionList());
-			this.appendChild(new SmartEnergyList());
-			this.appendChild(new SpeechList());
-			this.appendChild(new RelationshipList());
-			if (V.studio === 1) {
-				this.appendChild(new PornBroadcastStatus());
-				this.appendChild(new PornList());
-			}
-		}
-	}
-
-	class OtherSection extends Section {
-		constructor() {
-			super("Other Settings");
-			this.appendChild(new LabelList());
-			this.appendChild(new LabelRemoveList());
-		}
-	}
-
-	class CosmeticSection extends Section {
-		constructor() {
-			super("Cosmetic Settings", true);
-			this.appendChild(new EyewearList());
-			this.appendChild(new LensesList());
-			this.appendChild(new EarwearList());
-			this.appendChild(new MakeupList());
-			this.appendChild(new NailsList());
-			this.appendChild(new HairLengthList());
-			this.appendChild(new HaircutsList());
-			this.appendChild(new HairColorList());
-			this.appendChild(new HairStyleList());
-			this.appendChild(new EyebrowColorList());
-			this.appendChild(new EyebrowStyleList());
-			this.appendChild(new EyebrowFullnessList());
-			this.appendChild(new PubicHairColorList());
-			this.appendChild(new PubicHairStyleList());
-			this.appendChild(new ArmpitHairColorList());
-			this.appendChild(new ArmpitHairStyleList());
-			this.appendChild(new SkinColorList());
-		}
-	}
-
-	class BodyModSection extends Section {
-		constructor() {
-			super("Body Mod Settings", true);
-			this.appendChild(new EarPiercingList());
-			this.appendChild(new NosePiercingList());
-			this.appendChild(new EyebrowPiercingList());
-			this.appendChild(new NavelPiercingList());
-			this.appendChild(new NipplePiercingList());
-			this.appendChild(new AreolaPiercingList());
-			this.appendChild(new LipPiercingList());
-			this.appendChild(new TonguePiercingList());
-			this.appendChild(new ClitPiercingList());
-			this.appendChild(new LabiaPiercingList());
-			this.appendChild(new ShaftPiercingList());
-			this.appendChild(new PerineumPiercingList());
-			this.appendChild(new CorsetPiercingList());
-
-			this.appendChild(new AutoBrandingList());
-			this.appendChild(new BrandingLocationList());
-			this.appendChild(new BrandDesignList());
-
-			this.appendChild(new FaceTattooList());
-			this.appendChild(new ShoulderTattooList());
-			this.appendChild(new ChestTattooList());
-			this.appendChild(new ArmTattooList());
-			this.appendChild(new UpperBackTattooList());
-			this.appendChild(new LowerBackTattooList());
-			this.appendChild(new AbdomenTattooList());
-			if (V.seeDicks || V.makeDicks)
-				this.appendChild(new DickTattooList());
-			this.appendChild(new ButtockTattooList());
-			this.appendChild(new AnalTattooList());
-			this.appendChild(new LegTattooList());
-		}
-	}
-
-	class AutosurgerySection extends Section {
-		constructor() {
-			super("Autosurgery Settings", true);
-			this.appendChild(new AutosurgerySwitch());
-			this.appendChild(new VisionSurgeryList());
-			this.appendChild(new HearingSurgeryList());
-			this.appendChild(new LactationSurgeryList());
-			if (V.seeDicks || V.makeDicks) {
-				this.appendChild(new SemenSurgeryList());
-				this.appendChild(new VasectomyList());
-			}
-			this.appendChild(new CosmeticSurgeryList());
-			this.appendChild(new LipSurgeryList());
-			this.appendChild(new ButtSurgeryList());
-			this.appendChild(new BreastSurgeryList());
-			this.appendChild(new TighteningSurgeryList());
-			this.appendChild(new BodyHairSurgeryList());
-			this.appendChild(new HairSurgeryList());
-			if (V.bellyImplants > 0)
-				this.appendChild(new BellyImplantList());
-		}
-	}
-
-	class ClothesList extends List {
-		constructor() {
-			const items = [
-				["Select her own outfit", "choosing her own clothes"]
-			];
-			super("Clothes", items);
-
-			const nclothes = [
-				["No default clothes setting", "no default setting"],
-				["Apron", "an apron"],
-				["Ballgown", "a ball gown"],
-				["Bangles", "slutty jewelry"],
-				["Bodysuit", "a comfortable bodysuit"],
-				["Boyshorts", "boyshorts"],
-				["Bra", "a bra"],
-				["Button-up shirt and panties", "a button-up shirt and panties"],
-				["Button-up shirt", "a button-up shirt"],
-				["Cheerleader", "a cheerleader outfit"],
-				["Clubslut netting", "clubslut netting"],
-				["Cutoffs and a t-shirt", "cutoffs and a t-shirt"],
-				["Cutoffs", "cutoffs"],
-				["Cybersuit", "a cybersuit"],
-				["Fallen nun", "a fallen nuns habit"],
-				["Halter top", "a halter top dress"],
-				["Hijab and abaya", "a hijab and abaya"],
-				["Jeans", "jeans"],
-				["Kitty lingerie", "kitty lingerie"],
-				["Latex catsuit", "a latex catsuit"],
-				["Leather pants and a tube top", "leather pants and a tube top"],
-				["Leather pants and pasties", "leather pants and pasties"],
-				["Leather pants", "leather pants"],
-				["Leotard", "a leotard"],
-				["Maid (nice)", "a nice maid outfit"],
-				["Maid (slutty)", "a slutty maid outfit"],
-				["Mini dress", "a mini dress"],
-				["Monokini", "a monokini"],
-				["Nice lingerie", "attractive lingerie"],
-				["Nurse (nice)", "a nice nurse outfit"],
-				["Nurse (slutty)", "a slutty nurse outfit"],
-				["One-piece swimsuit", "a one-piece swimsuit"],
-				["Over-sized t-shirt and boyshorts", "an oversized t-shirt and boyshorts"],
-				["Over-sized t-shirt", "an oversized t-shirt"],
-				["Panties", "panties"],
-				["Pasties and panties", "panties and pasties"],
-				["Scalemail bikini", "a scalemail bikini"],
-				["Schoolgirl", "a schoolgirl outfit"],
-				["Slave gown", "a slave gown"],
-				["Slutty outfit", "a slutty outfit"],
-				["Spats and tank top", "spats and a tank top"],
-				["Sport shorts and a sports bra", "sport shorts and a sports bra"],
-				["Sport shorts and a t-shirt", "sport shorts and a t-shirt"],
-				["Sport shorts", "sport shorts"],
-				["Sports bra", "a sports bra"],
-				["String bikini", "a string bikini"],
-				["Succubus costume", "a succubus outfit"],
-				["Suit (nice)", "nice business attire"],
-				["Suit (slutty)", "slutty business attire"],
-				["Sweater and cutoffs", "a sweater and cutoffs"],
-				["Sweater and panties", "a sweater and panties"],
-				["Sweater", "a sweater"],
-				["T-shirt and jeans", "a t-shirt and jeans"],
-				["T-shirt and panties", "a t-shirt and panties"],
-				["T-shirt and thong", "a t-shirt and thong"],
-				["T-shirt", "a t-shirt"],
-				["Tank-top and panties", "a tank-top and panties"],
-				["Tank-top", "a tank-top"],
-				["Thong", "a thong"],
-				["Tube top and thong", "a tube top and thong"],
-				["Tube top", "a tube top"]
-			];
-			const spclothes = [
-				["Battlearmor", "battlearmor"],
-				["Biyelgee costume", "a biyelgee costume"],
-				["Burkini", "a burkini"],
-				["Burqa", "a burqa"],
-				["Dirndl", "a dirndl"],
-				["Gothic Lolita Dress", "a gothic lolita dress"],
-				["Hanbok", "a hanbok"],
-				["Hijab and blouse", "a hijab and blouse"],
-				["Ku Klux Klan Robe", "a klan robe"],
-				["Ku Klux Klan Robe (slutty)", "a slutty klan robe"],
-				["Lederhosen", "lederhosen"],
-				["Mounty outfit", "a mounty outfit"],
-				["Military uniform", "a military uniform"],
-				["Niqab and abaya", "a niqab and abaya"],
-				["Police Uniform", "a police uniform"],
-				["Pony outfit (nice)", "a nice pony outfit"],
-				["Pony outfit (slutty)", "a slutty pony outfit"],
-				["Red Army uniform", "a red army uniform"],
-				["Striped Bra", "a striped bra"],
-				["Striped Panties", "striped panties"],
-				["Striped Underwear", "striped underwear"],
-				["Skimpy battledress", "battledress"],
-				["Skimpy loincloth", "a skimpy loincloth"],
-				["Schutzstaffel uniform (nice)", "a schutzstaffel uniform"],
-				["Schutzstaffel uniform (slutty)", "a slutty schutzstaffel uniform"],
-			];
-			const fsnclothes = [
-				["Body oil (FS)", "body oil"],
-				["Bunny outfit (FS)", "a bunny outfit"],
-				["Chattel habit (FS)", "a chattel habit"],
-				["Conservative clothing (FS)", "conservative clothing"],
-				["Harem gauze (FS)", "harem gauze"],
-				["Huipil (FS)", "a huipil"],
-				["Kimono (FS)", "a kimono"],
-				["Maternity dress (FS)", "a maternity dress"],
-				["Maternity lingerie (FS)", "attractive lingerie for a pregnant woman"],
-				["Qipao (nice) (FS)", "a long qipao"],
-				["Qipao (slutty) (FS)", "a slutty qipao"],
-				["Stretch pants and a crop-top (FS)", "stretch pants and a crop-top"],
-				["Toga (FS)", "a toga"],
-				["Western clothing (FS)", "Western clothing"],
-			];
-			spclothes.forEach(pair => { if (isItemAccessible(pair[1])) nclothes.push(pair); });
-			fsnclothes.forEach(pair => { if (isItemAccessible(pair[1])) nclothes.push(pair); });
-			const nice = new ListSubSection(this, "Nice", nclothes);
-			this.appendChild(nice);
-
-			const hclothes = [
-				["Nude", "no clothing"],
-				["Penitent nun", "a penitent nuns habit"],
-				["Restrictive latex", "restrictive latex"],
-				["Shibari ropes", "shibari ropes"],
-				["Uncomfortable straps", "uncomfortable straps"]
-			];
-			const fshclothes = [
-				["Chains (FS)", "chains"],
-			];
-			fshclothes.forEach(pair => { if (isItemAccessible(pair[1])) hclothes.push(pair); });
-
-			const harsh = new ListSubSection(this, "Harsh", hclothes);
-			this.appendChild(harsh);
-
-			this.setValue(current_rule.set.clothes);
-			this.onchange = (value) => current_rule.set.clothes = value;
-		}
-	}
-
-	class CollarList extends List {
-		constructor() {
-			const items = [
-				["No default collar setting", "no default setting"],
-				["No collar", "none"],
-			];
-			super("Collar", items);
-
-			const ncollars = [
-				["Stylish leather", "stylish leather"],
-				["Satin choker", "satin choker"],
-				["Silken Ribbon", "silk ribbon"],
-				["Heavy Gold", "heavy gold"],
-				["Pretty jewelry", "pretty jewelry"],
-				["Bell", "bell collar"],
-				["Cowbell", "leather with cowbell"]
-			];
-			if (V.seeAge !== 0)
-				ncollars.push(["Nice retirement counter", "nice retirement counter"]);
-			const fsncollars = [
-				["Bowtie collar", "bowtie"],
-				["Ancient Egyptian", "ancient Egyptian"],
-			];
-			fsncollars.forEach(pair => { if (isItemAccessible(pair[1])) ncollars.push(pair); });
-			const nice = new ListSubSection(this, "Nice", ncollars);
-			this.appendChild(nice);
-
-			const hcollars = [];
-			setup.harshCollars.forEach(item => {
-				if (item.fs === "seeage" && V.seeAge === 0) return;
-				else if (item.fs === "seePreg" && V.seePreg === 0) return;
-				else if (item.rs === "buyGag" && V.toysBoughtGags !== 1) return;
-				else hcollars.push([item.name, item.value]);
-			});
-			const harsh = new ListSubSection(this, "Harsh", hcollars);
-			this.appendChild(harsh);
-
-			this.setValue(current_rule.set.collar);
-			this.onchange = (value) => current_rule.set.collar = value;
-		}
-	}
-
-	class ShoeList extends List {
-		constructor() {
-			super("Shoes", setup.shoes.map(i => [i.name, i.value]));
-			this.setValue(current_rule.set.shoes);
-			this.onchange = (value) => current_rule.set.shoes = value;
-		}
-	}
-
-	class CorsetList extends List {
-		constructor() {
-			const bellies = [];
-			setup.bellyAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					bellies.push([acc.name, acc.value]);
-				else if (acc.fs === "repopulation" && V.arcologies[0].FSRepopulationFocus !== "unset")
-					bellies.push([acc.name + " (FS)", acc.value]);
-				else if (acc.rs === "boughtBelly" && V.clothesBoughtBelly === 1)
-					bellies.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Corsetage", bellies);
-			this.setValue(current_rule.set.bellyAccessory);
-			this.onchange = (value) => current_rule.set.bellyAccessory = value;
-		}
-	}
-
-	class LeggingsList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none"],
-				["short stockings"],
-				["long stockings"],
-			];
-			super("Leg accessory", items);
-			this.setValue(current_rule.set.legAccessory);
-			this.onchange = (value) => current_rule.set.legAccessory = value;
-		}
-	}
-
-	class VagAccVirginsList extends List {
-		constructor() {
-			const accs = [];
-			setup.vaginalAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
-				else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1)
-					accs.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Vaginal accessories for virgins", accs);
-			this.setValue(current_rule.set.virginAccessory);
-			this.onchange = (value) => current_rule.set.virginAccessory = value;
-		}
-	}
-
-	class VagAccAVirginsList extends List {
-		constructor() {
-			const accs = [];
-			setup.vaginalAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
-				else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1)
-					accs.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Vaginal accessories for anal virgins", accs);
-			this.setValue(current_rule.set.aVirginAccessory);
-			this.onchange = (value) => current_rule.set.aVirginAccessory = value;
-		}
-	}
-
-	class VagAccOtherList extends List {
-		constructor() {
-			const accs = [];
-			setup.vaginalAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
-				else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1)
-					accs.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Vaginal accessories for other slaves", accs);
-			this.setValue(current_rule.set.vaginalAccessory);
-			this.onchange = (value) => current_rule.set.vaginalAccessory = value;
-		}
-	}
-
-	class DickAccVirginsList extends List {
-		constructor() {
-			super("Dick accessories for anal virgins", setup.dickAccessories.map(i => [i.name, i.value]));
-			this.setValue(current_rule.set.aVirginDickAccessory);
-			this.onchange = (value) => current_rule.set.aVirginDickAccessory = value;
-		}
-	}
-
-	class DickAccOtherList extends List {
-		constructor() {
-			super("Dick accessories for other slaves", setup.dickAccessories.map(i => [i.name, i.value]));
-			this.setValue(current_rule.set.dickAccessory);
-			this.onchange = (value) => current_rule.set.dickAccessory = value;
-		}
-	}
-
-	class ButtplugsVirginsList extends List {
-		constructor() {
-			const accs = [];
-			setup.buttplugs.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
-				else if (acc.rs === "buyBigPlugs" && V.toysBoughtButtPlugs === 1)
-					accs.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Buttplugs for anal virgins", accs);
-			this.setValue(current_rule.set.aVirginButtplug);
-			this.onchange = (value) => current_rule.set.aVirginButtplug = value;
-		}
-	}
-
-	class ButtplugsOtherList extends List {
-		constructor() {
-			const accs = [];
-			setup.buttplugs.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
-				else if (acc.rs === "buyBigPlugs" && V.toysBoughtButtPlugs === 1)
-					accs.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Buttplugs for other slaves", accs);
-			this.setValue(current_rule.set.buttplug);
-			this.onchange = (value) => current_rule.set.buttplug = value;
-		}
-	}
-
-	class ButtplugAttachmentsList extends List {
-		constructor() {
-			const accs = [];
-			setup.buttplugAttachments.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
-				else if (acc.rs === "buyTails" && V.toysBoughtButtPlugTails === 1)
-					accs.push([acc.name + " (Purchased)", acc.value]);
-			});
-			super("Buttplug attachments for slaves with buttplugs", accs);
-			this.setValue(current_rule.set.buttplugAttachment);
-			this.onchange = (value) => current_rule.set.buttplugAttachment = value;
-		}
-	}
-
-	class ImplantVolumeList extends List {
-		constructor() {
-			const pairs = [
-				["No changes", -1],
-				["Empty implant", 0],
-				["Early pregnancy", 1500],
-				["Second trimester pregnancy", 5000],
-				["Full-term pregnancy", 15000],
-				["Full-term with twins", 30000],
-				["Full-term with triplets", 45000],
-				["Full-term with quadruplets", 60000],
-				["Full-term with quintuplets", 75000],
-				["Full-term with sextuplets", 90000],
-				["Full-term with septuplets", 105000],
-				["Full-term with octuplets", 120000]
-			];
-			super("Belly implant target volume (if present)", pairs);
-			this.setValue(current_rule.set.bellyImplantVol);
-			this.onchange = (value) => current_rule.set.bellyImplantVol = value;
-		}
-	}
-
-	class AutosurgerySwitch extends List {
-		constructor() {
-			const pairs = [
-				["Activate", 1],
-				["Off", 0],
-			];
-			super("Assistant-applied implants (Autosurgery global switch)", pairs);
-			this.setValue(current_rule.set.autoSurgery);
-			this.onchange = (value) => current_rule.set.autoSurgery = value;
-		}
-	}
-
-	class HyperGrowthSwitch extends List {
-		constructor() {
-			const pairs = [
-				["No", 0],
-				["Yes", 1],
-			];
-			super("Use hyper growth drugs", pairs, true);
-			this.setValue(current_rule.set.hyper_drugs);
-			this.onchange = (value) => current_rule.set.hyper_drugs = value;
-		}
-	}
-
-	class GrowthList extends Options {
-		constructor() {
-			super();
-			this.sublists = [];
-			const pairs = [
-				["No default setting", () => this.nds()],
-				["Girlish figure", () => this.girlish()],
-				["Stacked figure", () => this.stacked()],
-				["Huge but functional", () => this.huge()],
-				["Unlimited", () => this.unlimited()],
-				["None", () => this.none()]
-			];
-			pairs.forEach(pair => this.appendChild(new OptionsItem(...pair)));
-
-			this.breasts = new BreastGrowthList();
-			this.butts = new ButtGrowthList();
-			this.lips = new LipGrowthList();
-			this.sublists.push(this.breasts, this.butts, this.lips);
-
-			if (V.seeDicks > 0 || V.makeDicks > 0) {
-				this.dicks = new DickGrowthList();
-				this.balls = new BallGrowthList();
-				this.sublists.push(this.dicks, this.balls);
-			}
-
-			this.sublists.forEach(i => this.appendChild(i));
-		}
-
-		render() {
-			const elem = document.createElement("div");
-			const span = document.createElement("span");
-			span.innerHTML = "Growth hormone regimes for healthy slaves: ";
-			elem.appendChild(span);
-			return elem;
-		}
-
-		nds() {
-			[this.breasts, this.butts, this.lips, this.dicks, this.balls].forEach(i => {
-				i.setValue("no default change");
-				i.propagateChange();
-			});
-		}
-
-		girlish() {
-			this.breasts.setValue(350);
-			this.butts.setValue(2);
-			this.lips.setValue(25);
-			if (this.dicks) this.dicks.setValue(0);
-			if (this.balls) this.balls.setValue(0);
-			this.sublists.forEach(i => i.propagateChange());
-		}
-
-		stacked() {
-			this.breasts.setValue(1000);
-			this.butts.setValue(4);
-			this.lips.setValue(25);
-			if (this.dicks) this.dicks.setValue(4);
-			if (this.balls) this.balls.setValue(4);
-			this.sublists.forEach(i => i.propagateChange());
-		}
-
-		huge() {
-			this.breasts.setValue(9000);
-			this.butts.setValue(10);
-			this.lips.setValue(45);
-			if (this.dicks) this.dicks.setValue(6);
-			if (this.balls) this.balls.setValue(6);
-			this.sublists.forEach(i => i.propagateChange());
-		}
-
-		unlimited() {
-			this.breasts.setValue(48000);
-			this.butts.setValue(20);
-			this.lips.setValue(100);
-			if (this.dicks) this.dicks.setValue(30);
-			if (this.balls) this.balls.setValue(125);
-			this.sublists.forEach(i => i.propagateChange());
-		}
-
-		none() {
-			this.sublists.forEach(i => {
-				i.setValue(0);
-				i.propagateChange();
-			});
-		}
-	}
-
-	class BreastGrowthList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["B-Cup", 350],
-				["D-Cup", 1000],
-				["Monstrous", 9000],
-				["Unlimited", 48000],
-				["None", 0]
-			];
-			super("Breasts", pairs, true);
-			this.setValue(current_rule.set.growth_boobs);
-			this.onchange = (value) => current_rule.set.growth_boobs = value;
-		}
-	}
-
-	class ButtGrowthList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Cute", 2],
-				["Big", 4],
-				["Huge", 6],
-				["Unlimited", 20],
-				["None", 0]
-			];
-			super("Butts", pairs, true);
-			this.setValue(current_rule.set.growth_butt);
-			this.onchange = (value) => current_rule.set.growth_butt = value;
-		}
-	}
-
-	class LipGrowthList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Plump", 25],
-				["Beestung", 45],
-				["Facepussy", 100],
-				["None", 0]
-			];
-			super("Lips", pairs, true);
-			this.setValue(current_rule.set.growth_lips);
-			this.onchange = (value) => current_rule.set.growth_lips = value;
-		}
-	}
-
-	class DickGrowthList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Above average", 4],
-				["Pornstar", 6],
-				["Unlimited", 30],
-				["None", 0]
-			];
-			super("Dicks, if present", pairs, true);
-			this.setValue(current_rule.set.growth_dick);
-			this.onchange = (value) => current_rule.set.growth_dick = value;
-		}
-	}
-
-	class BallGrowthList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Sizable", 4],
-				["Cumslave", 6],
-				["Unlimited", 125],
-				["None", 0]
-			];
-			super("Balls, if present", pairs, true);
-			this.setValue(current_rule.set.growth_balls);
-			this.onchange = (value) => current_rule.set.growth_balls = value;
-		}
-	}
-
-	class CurrativesList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Preventatives", 1],
-				["Curatives", 2],
-			];
-			super("Health drugs", pairs);
-			this.setValue(current_rule.set.curatives);
-			this.onchange = (value) => current_rule.set.curatives = value;
-		}
-	}
-
-	class AphrodisiacList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Standard", 1],
-				["Extreme", 2],
-				["Anaphrodisiacs", -1]
-			];
-			super("Aphrodisiacs", pairs);
-			this.setValue(current_rule.set.aphrodisiacs);
-			this.onchange = (value) => current_rule.set.aphrodisiacs = value;
-		}
-	}
-
-	class ContraceptiveList extends List {
-		constructor() {
-			const drugs = [
-				["No default setting", "no default setting"],
-				["Contraceptives", true],
-				["Fertile", false],
-			];
-			super("Contraceptives for fertile slaves", drugs);
-			this.setValue(current_rule.set.preg);
-			this.onchange = (value) => current_rule.set.preg = value;
-		}
-	}
-
-	class PregDrugsList extends List {
-		constructor() {
-			const pairs = [
-				["No changes", "no default setting"],
-				["None", "none"],
-				["Fast gestation", "fast"],
-				["Slow gestation", "slow"],
-				["Birth suppressors", "suppress"],
-				["Birth stimulators", "stimulate"]
-			];
-			super("Pregnancy control agents for pregnant slaves", pairs);
-			this.setValue(current_rule.set.pregSpeed);
-			this.onchange = (value) => current_rule.set.pregSpeed = value;
-		}
-	}
-
-	class FemaleHormonesList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Intensive Female", 2],
-				["Female", 1],
-				["None", 0],
-				["Male", -1],
-				["Intensive Male", -2]
-			];
-			super("Hormones for female slaves", pairs);
-			this.setValue(current_rule.set.XX);
-			this.onchange = (value) => current_rule.set.XX = value;
-		}
-	}
-
-	class GeldingHormonesList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Intensive Female", 2],
-				["Female", 1],
-				["None", 0],
-				["Male", -1],
-				["Intensive Male", -2]
-			];
-			super("Hormones for geldings", pairs);
-			this.setValue(current_rule.set.gelding);
-			this.onchange = (value) => current_rule.set.gelding = value;
-		}
-	}
-
-	class ShemaleHormonesList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Intensive Female", 2],
-				["Female", 1],
-				["None", 0],
-				["Male", -1],
-				["Intensive Male", -2]
-			];
-			super("Hormones for shemales", pairs);
-			this.setValue(current_rule.set.XY);
-			this.onchange = (value) => current_rule.set.XY = value;
-		}
-	}
-
-	class OtherDrugsList extends List {
-		constructor() {
-			const drugs = [
-				["No default setting", "no default setting"],
-				["None", "none"],
-				["Fertility drugs", "fertility drugs"],
-				["Psychosuppressants", "psychosuppressants"],
-				["Steroids", "steroids"],
-				["Natural hormone enhancers", "hormone enhancers"],
-				["Hormone blockers", "hormone blockers"],
-				["breast injections"],
-				["intensive breast injections"],
-				["butt injections"],
-				["intensive butt injections"],
-				["lip injections"],
-				["penis enhancement"],
-				["intensive penis enhancement"],
-				["testicle enhancement"],
-				["intensive testicle enhancement"],
-			];
-
-			if (V.growthStim === 1)
-				drugs.push(["Growth Stimulants (Research)", "growth stimulants"]);
-			if (V.precociousPuberty === 1 && V.pubertyHormones) {
-				drugs.push(["Female hormone injections (Research)", "female hormone injections"]);
-				drugs.push(["Male hormone injections (Research)", "male hormone injections"]);
-			}
-			if (V.purchasedSagBGone === 1)
-				drugs.push(["Sag-B-gone (Product)", "sag-B-gone"]);
-			if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) {
-				drugs.push(["Weight loss pills (FS)", "appetite suppressors"]);
-				drugs.push(["breast redistributors"]);
-				drugs.push(["butt redistributors"]);
-				drugs.push(["nipple atrophiers"]);
-				drugs.push(["lip atrophiers"]);
-				drugs.push(["penis atrophiers"]);
-				drugs.push(["testicle atrophiers"]);
-				drugs.push(["clitoris atrophiers"]);
-				drugs.push(["labia atrophiers"]);
-			}
-			if (V.arcologies[0].FSAssetExpansionistResearch === 1) {
-				drugs.push(["hyper breast injections"]);
-				drugs.push(["hyper butt injections"]);
-				drugs.push(["hyper penis enhancement"]);
-				drugs.push(["hyper testicle enhancement"]);
-			}
-			if (V.arcologies[0].FSYouthPreferentialistResearch === 1)
-				drugs.push(["Anti-aging cream (FS)", "anti-aging cream"]);
-			if (V.seeHyperPreg === 1 && V.superFertilityDrugs === 1)
-				drugs.push(["Super fertility drugs", "super fertility drugs"]);
-			super("Other drugs", drugs);
-			this.setValue(current_rule.set.drug);
-			this.onchange = (value) => current_rule.set.drug = value;
-		}
-	}
-
-	class EnemaList extends List {
-		constructor() {
-			const enemas = [
-				["No default setting", "no default setting"],
-				["None", "none"],
-				["Water", "water"]
-			];
-			if (V.medicalEnema === 1) {
-				enemas.push(
-				["Aphrodisiac", "aphrodisiac"],
-				["Curative", "curative"],
-				["Tightener", "tightener"]
-				);
-			}
-			super("Enemas", enemas);
-			this.setValue(current_rule.set.inflationType);
-			this.onchange = (value) => current_rule.set.inflationType = value;
-		}
-	}
-
-	class DietList extends List {
-		constructor() {
-			const diets = [
-				["no default setting", "no default setting"],
-				["Healthy diet", "healthy"],
-				["Fix fat and skinny slaves", "attractive"],
-				["Curvy", 30],
-				["Average", 0],
-				["Thin", -30]
-			];
-			if (V.feeder === 1) {
-				diets.push(
-					["Feminine", "XX"],
-					["Masculine", "XY"]
-				);
-				if (V.dietXXY === 1)
-					diets.push(["Futanari", "XXY"]);
-			}
-			if (V.dietCleanse === 1)
-				diets.push(["Cleansing", "cleansing"]);
-			if (V.dietFertility === 1)
-				diets.push(["Fertility", "fertility"]);
-			if (V.cumProDiet === 1)
-				diets.push(["Cum production", "cum production"]);
-
-			super("Slave diets", diets, true);
-			this.setValue(current_rule.set.diet);
-			this.onchange = (value) => current_rule.set.diet = value;
-		}
-	}
-
-	class DietGrowthList extends List {
-		constructor() {
-			const pairs = [
-				["On", 1],
-				["Off", 0]
-			];
-			super("Diet support for growth drugs", pairs);
-			this.setValue(current_rule.set.dietGrowthSupport);
-			this.onchange = (value) => current_rule.set.dietGrowthSupport = value;
-		}
-	}
-
-	class DietBaseList extends List {
-		constructor() {
-			// TODO: better data structure?
-			const pairs = [
-				["No default setting", {cum: "no default setting", milk: "no default setting"}],
-				["Normal Diet", {cum: 0, milk: 0}],
-				["Cum Added", {cum: 1, milk: 0}],
-				["Milk Added", {cum: 0, milk: 1}],
-				["Cum &amp; Milk Added", {cum: 1, milk: 1}],
-				["Cum-Based", {cum: 2, milk: 0}],
-				["Milk-Based", {cum: 0, milk: 2}],
-			];
-			super("Diet base", pairs);
-			this.setValue(this.value2string(current_rule.set.dietCum, current_rule.set.dietMilk));
-			this.onchange = (value) => {
-				current_rule.set.dietCum = value.cum;
-				current_rule.set.dietMilk = value.milk;
-				this.setValue(this.value2string(current_rule.set.dietCum, current_rule.set.dietMilk));
-			};
-		}
-
-		value2string(cum, milk) {
-			return `cum: ${cum}, milk: ${milk}`;
-		}
-	}
-
-	class DietSolidFoodList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Permitted", 0],
-				["Forbidden", 1],
-			];
-			super("Solid food access", pairs);
-			this.setValue(current_rule.set.onDiet);
-			this.onchange = (value) => current_rule.set.onDiet = value;
-		}
-	}
-
-	class MuscleList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Toned", 20],
-				["Ripped", 50],
-				["Massive", 100],
-				["Weak", -20]
-			];
-			super("Muscles", pairs, true);
-			this.setValue(current_rule.set.muscles);
-			this.onchange = (value) => current_rule.set.muscles = value;
-		}
-	}
-
-	class BraceList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", "none"],
-				["Straighten", "straighten"],
-				["Universal", "universal"]
-			];
-			super("Braces", pairs);
-			this.setValue(current_rule.set.teeth);
-			this.onchange = (value) => current_rule.set.teeth = value;
-		}
-	}
-
-	class LivingStandardList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Luxurious", "luxurious"],
-				["Normal", "normal"],
-				["Spare", "spare"]
-			];
-			super("Living standard", pairs);
-			this.setValue(current_rule.set.livingRules);
-			this.onchange = (value) => current_rule.set.livingRules = value;
-		}
-	}
-
-	class PunishmentList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Confinement", "confinement"],
-				["Whipping", "whipping"],
-				["Chastity", "chastity"],
-				["Situational", "situational"]
-			];
-			super("Typical punishment", pairs);
-			this.setValue(current_rule.set.standardPunishment);
-			this.onchange = (value) => current_rule.set.standardPunishment = value;
-		}
-	}
-
-	class RewardList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Relaxation", "relaxation"],
-				["Drugs", "drugs"],
-				["Orgasm", "orgasm"],
-				["Situational", "situational"]
-			];
-			super("Typical reward", pairs);
-			this.setValue(current_rule.set.standardReward);
-			this.onchange = (value) => current_rule.set.standardReward = value;
-		}
-	}
-
-	class ReleaseList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Permissive", "permissive"],
-				["Sapphic", "sapphic"],
-				["Masturbation", "masturbation"],
-				["Restrictive", "restrictive"],
-				["Chastity", "chastity"]
-			];
-			super("Release rules", pairs);
-			this.setValue(current_rule.set.releaseRules);
-			this.onchange = (value) => current_rule.set.releaseRules = value;
-		}
-	}
-
-	class ToyHoleList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["All her holes", "all her holes"],
-				["Mouth", "mouth"],
-				["Boobs", "boobs"],
-				["Pussy", "pussy"],
-				["Ass", "ass"],
-				["Dick", "dick"]
-			];
-			super("Fucktoy use preference", pairs);
-			this.setValue(current_rule.set.toyHole);
-			this.onchange = (value) => current_rule.set.toyHole = value;
-		}
-	}
-
-	class SmartFetishList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Vanilla", "vanilla"],
-				["Oral", "oral"],
-				["Anal", "anal"],
-				["Boobs", "boobs"],
-				["Sub", "submissive"],
-				["Dom", "dom"],
-				["Humiliation", "humiliation"],
-				["Preg", "pregnancy"],
-				["Pain", "masochist"],
-				["Sadism", "sadist"]
-			];
-			super("Smart piercing fetish target", pairs);
-			this.setValue(current_rule.set.clitSetting);
-			this.onchange = (value) => current_rule.set.clitSetting = value;
-		}
-	}
-
-	class SmartXYAttractionList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Passionate", 100],
-				["Attracted", 75],
-				["Indifferent", 45],
-				["None", 0]
-			];
-			super("Smart piercing XY attraction target", pairs);
-			this.setValue(current_rule.set.clitSettingXY);
-			this.onchange = (value) => current_rule.set.clitSettingXY = value;
-		}
-	}
-
-	class SmartXXAttractionList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Passionate", 100],
-				["Attracted", 75],
-				["Indifferent", 45],
-				["None", 0]
-			];
-			super("Smart piercing XX attraction target", pairs);
-			this.setValue(current_rule.set.clitSettingXX);
-			this.onchange = (value) => current_rule.set.clitSettingXX = value;
-		}
-	}
-
-	class SmartEnergyList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Nympho", 100],
-				["Sex Addict", 85],
-				["Powerful", 65],
-				["Healthy", 45],
-				["Weak", 25],
-				["Frigid", 0]
-			];
-			super("Smart piercing sex drive target", pairs);
-			this.setValue(current_rule.set.clitSettingEnergy);
-			this.onchange = (value) => current_rule.set.clitSettingEnergy = value;
-		}
-	}
-
-	class SpeechList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Permissive", "permissive"],
-				["Suppress accents", "accent elimination"],
-				["Restrictive", "restrictive"]
-			];
-			super("Speech rules", pairs);
-			this.setValue(current_rule.set.speechRules);
-			this.onchange = (value) => current_rule.set.speechRules = value;
-		}
-	}
-
-	class RelationshipList extends List {
-		constructor() {
-			const pairs =[
-				["No default setting", "no default setting"],
-				["Permissive", "permissive"],
-				["Just friends", "just friends"],
-				["Restrictive", "restrictive"]
-			];
-			super("Relationship rules", pairs);
-			this.setValue(current_rule.set.relationshipRules);
-			this.onchange = (value) => current_rule.set.relationshipRules = value;
-		}
-	}
-
-	class PornBroadcastStatus extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["Disabled", 0],
-				["Enabled", 1]
-			];
-			super("Porn Broadcasting Status", pairs);
-			this.setValue(current_rule.set.pornFeed);
-			this.onchange = (value) => current_rule.set.pornFeed = value;
-		}
-	}
-
-	class PornList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				/*["No broadcasting", -1], **This has changed, it would now use .pornFeed** */
-				["No subsidy", 0],
-				["1000", 1000],
-				["2000", 2000],
-				["3000", 3000],
-				["4000", 4000],
-				["5000", 5000]
-			];
-			super("Weekly porn publicity subsidy", pairs);
-			this.setValue(current_rule.set.pornFameSpending);
-			this.onchange = (value) => current_rule.set.pornFameSpending = value;
-		}
-	}
-
-	class EyewearList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["correct with glasses"],
-				["correct with contacts"],
-				["universal glasses"],
-				["blur with glasses"],
-				["blur with contacts"]
-			];
-			super("Eyewear", pairs);
-			this.setValue(current_rule.set.eyewear);
-			this.onchange = (value) => current_rule.set.eyewear = value;
-		}
-	}
-
-	class LensesList extends Element {
-		constructor() {
-			super(current_rule.set.eyeColor);
-			this.appendChild(new OptionsItem("No default Setting", () => this.setValue("no default setting")));
-			this.colorlist = new LensesColorList();
-			this.shapelist = new LensesShapeList();
-			this.appendChild(this.colorlist);
-			this.appendChild(this.shapelist);
-		}
-
-		render(color) {
-			const elem = document.createElement("div");
-			elem.innerHTML = "Eye coloring: ";
-			this.label = document.createElement("strong");
-			this.label.innerText = color;
-			elem.appendChild(this.label);
-			return elem;
-		}
-
-		combine() {
-			const lst = [];
-			if (this.colorlist.value !== "no default setting")
-				lst.push(this.colorlist.value);
-			if (this.shapelist.value !== "no default setting")
-				lst.push(this.shapelist.value);
-			if (lst.length === 0) return "no default setting";
-			else return lst.join(" ");
-		}
-
-		setValue(val) {
-			if (val === undefined) val = this.combine();
-			this.label.innerText = val;
-			current_rule.set.eyeColor = val;
-		}
-	}
-
-	class LensesColorList extends Options {
-		constructor() {
-			const items = [];
-			[
-				"no default setting",
-				"blue",
-				"black",
-				"brown",
-				"green",
-				"turquoise",
-				"sky-blue",
-				"hazel",
-				"pale-grey",
-				"white",
-				"pink",
-				"yellow",
-				"orange",
-				"amber",
-				"red"
-			].forEach(i => items.push(new OptionsItem(i, item => {
-				this.value = item.label;
-				this.parent.setValue();
-			})));
-			super(items);
-		}
-	}
-
-	class LensesShapeList extends Options {
-		constructor() {
-			const items = [];
-			[
-				"no default setting",
-				"catlike",
-				"serpent-like",
-				"goat-like",
-				"devilish",
-				"demonic",
-				"hypnotic",
-				"heart-shaped",
-				"star-shaped",
-				"wide-eyed",
-				"almond-shaped",
-				"bright",
-				"teary",
-				"vacant"
-			].forEach(i => items.push(new OptionsItem(i, item => {
-				this.value = item.label;
-				this.parent.setValue();
-			})));
-			super(items);
-		}
-	}
-
-	class EarwearList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["correct with hearing aids"],
-				["muffle with ear plugs"],
-				["deafen with ear plugs"]
-			];
-			super("Earwear", pairs);
-			this.setValue(current_rule.set.earwear);
-			this.onchange = (value) => current_rule.set.earwear = value;
-		}
-	}
-
-	class MakeupList extends List {
-		constructor() {
-			super("Makeup");
-			[
-				["no default setting"],
-				["makeup-free", 0],
-				["nice", 1],
-				["gorgeous", 2],
-				["color-coordinate with hair", 3],
-				["slutty", 4]
-			].forEach(pair => this.appendChild(new ListItem(...pair)));
-			this.setValue(current_rule.set.makeup);
-			this.onchange = (value) => current_rule.set.makeup = value;
-		}
-	}
-
-	class NailsList extends List {
-		constructor() {
-			super("Nails");
-			[
-				["no default setting"],
-				["clipped", 0],
-				["extended", 1],
-				["color-coordinate with hair", 2],
-				["sharp and claw-like", 3],
-				["bright and glittery", 4],
-				["hooker nails", 5],
-				["neon colored", 6],
-				["neon color-coordinate with hair", 7],
-				["metallic painted", 8],
-				["metallic color-coordinate with hair", 9]
-			].forEach(pair => this.appendChild(new ListItem(...pair)));
-			this.setValue(current_rule.set.nails);
-			this.onchange = (value) => current_rule.set.nails = value;
-		}
-	}
-
-	class HairLengthList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["very short", 5],
-				["short", 10],
-				["shoulder length", 30],
-				["long", 60],
-				["very long", 100],
-				["floor length", 150]
-			];
-			super("Hair length", pairs);
-			this.setValue(current_rule.set.hLength);
-			this.onchange = (value) => current_rule.set.hLength = value;
-		}
-	}
-
-	class HaircutsList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["maintain hair length", 1],
-				["do not maintain hair length", 0]
-			];
-			super("Hair length maintenance", pairs);
-			this.setValue(current_rule.set.haircuts);
-			this.onchange = (value) => current_rule.set.haircuts = value;
-		}
-	}
-
-	class HairColorList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["blonde"],
-				["golden"],
-				["platinum blonde"],
-				["strawbery-blonde"],
-				["copper"],
-				["ginger"],
-				["red"],
-				["deep red"],
-				["green"],
-				["blue"],
-				["pink"],
-				["dark brown"],
-				["brown"],
-				["auburn"],
-				["burgundy"],
-				["chocolate"],
-				["chestnut"],
-				["hazel"],
-				["jet black"],
-				["black"],
-				["grey"],
-				["silver"],
-				["white"],
-				["blue-violet"],
-				["purple"],
-				["dark orchid"],
-				["sea green"],
-				["green-yellow"],
-				["dark blue"],
-				["blazing red"],
-				["neon green"],
-				["neon blue"],
-				["neon pink"]
-			];
-			super("Hair color", pairs);
-			this.setValue(current_rule.set.hColor);
-			this.onchange = (value) => current_rule.set.hColor = value;
-		}
-	}
-
-	class HairStyleList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["neat"],
-				["shaved"],
-				["trimmed"],
-				["buzzcut"],
-				["up"],
-				["ponytail"],
-				["bun"],
-				["messy bun"],
-				["messy"],
-				["curled"],
-				["permed"],
-				["luxurious"],
-				["dreadlocks"],
-				["cornrows"],
-				["braided"],
-				["tails"],
-				["eary"],
-				["afro"],
-				["strip"]
-			];
-			super("Hair style", pairs);
-			this.setValue(current_rule.set.hStyle);
-			this.onchange = (value) => current_rule.set.hStyle = value;
-		}
-	}
-
-	class EyebrowColorList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["blonde"],
-				["golden"],
-				["platinum blonde"],
-				["strawerry-blonde"],
-				["copper"],
-				["ginger"],
-				["red"],
-				["deep red"],
-				["green"],
-				["blue"],
-				["pink"],
-				["dark brown"],
-				["brown"],
-				["auburn"],
-				["burgundy"],
-				["chocolate"],
-				["chestnut"],
-				["hazel"],
-				["jet black"],
-				["black"],
-				["grey"],
-				["silver"],
-				["white"],
-				["blue-violet"],
-				["purple"],
-				["dark orchid"],
-				["sea green"],
-				["green-yellow"],
-				["dark blue"],
-				["blazing red"],
-				["neon green"],
-				["neon blue"],
-				["neon pink"]
-			];
-			super("Eyebrow hair color, when present", pairs);
-			this.setValue(current_rule.set.eyebrowHColor);
-			this.onchange = (value) => current_rule.set.eyebrowHColor = value;
-		}
-	}
-
-	class EyebrowStyleList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["shaved"],
-				["straight"],
-				["rounded"],
-				["natural"],
-				["slanted inwards"],
-				["slanted outwards"],
-				["high-arched"],
-				["elongated"],
-				["shortened"],
-				["curved"]
-			];
-			super("Eyebrow style", pairs);
-			this.setValue(current_rule.set.eyebrowHStyle);
-			this.onchange = (value) => current_rule.set.eyebrowHStyle = value;
-		}
-	}
-
-	class EyebrowFullnessList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["pencil-thin"],
-				["thin"],
-				["threaded"],
-				["natural"],
-				["tapered"],
-				["thick"],
-				["bushy"]
-			];
-			super("Eyebrow fullness", pairs);
-			this.setValue(current_rule.set.eyebrowFullness);
-			this.onchange = (value) => current_rule.set.eyebrowFullness = value;
-		}
-	}
-
-	class PubicHairColorList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["blonde"],
-				["golden"],
-				["platinum blonde"],
-				["strawerry-blonde"],
-				["copper"],
-				["ginger"],
-				["red"],
-				["deep red"],
-				["green"],
-				["blue"],
-				["pink"],
-				["dark brown"],
-				["brown"],
-				["auburn"],
-				["burgundy"],
-				["chocolate"],
-				["chestnut"],
-				["hazel"],
-				["jet black"],
-				["black"],
-				["grey"],
-				["silver"],
-				["white"],
-				["blue-violet"],
-				["purple"],
-				["dark orchid"],
-				["sea green"],
-				["green-yellow"],
-				["dark blue"],
-				["blazing red"],
-				["neon green"],
-				["neon blue"],
-				["neon pink"]
-			];
-			super("Pubic hair color, when present", pairs);
-			this.setValue(current_rule.set.pubicHColor);
-			this.onchange = (value) => current_rule.set.pubicHColor = value;
-		}
-	}
-
-	class PubicHairStyleList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["waxed"],
-				["in a strip"],
-				["neat"],
-				["bushy"],
-				["bushy in the front and neat in the rear"],
-				["very bushy"]
-			];
-			super("Pubic hairstyle", pairs);
-			this.setValue(current_rule.set.pubicHStyle);
-			this.onchange = (value) => current_rule.set.pubicHStyle = value;
-		}
-	}
-
-	class ArmpitHairColorList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["blonde"],
-				["golden"],
-				["platinum blonde"],
-				["strawberry-blonde"],
-				["copper"],
-				["ginger"],
-				["red"],
-				["deep red"],
-				["green"],
-				["blue"],
-				["pink"],
-				["dark brown"],
-				["brown"],
-				["auburn"],
-				["burgundry"],
-				["chocolate"],
-				["chestnut"],
-				["hazel"],
-				["jet black"],
-				["black"],
-				["grey"],
-				["silver"],
-				["white"],
-				["blue-violet"],
-				["purple"],
-				["dark orchid"],
-				["sea green"],
-				["green-yellow"],
-				["dark blue"],
-				["blazing red"],
-				["neon green"],
-				["neon blue"],
-				["neon pink"]
-			];
-			super("Underarm hair color, when present", pairs);
-			this.setValue(current_rule.set.underArmHColor);
-			this.onchange = (value) => current_rule.set.underArmHColor = value;
-		}
-	}
-
-	class ArmpitHairStyleList extends List {
-		constructor() {
-			const pairs = [
-				["no default setting"],
-				["waxed"],
-				["shaved"],
-				["neat"],
-				["bushy"]
-			];
-			super("Underarm hair style", pairs);
-			this.setValue(current_rule.set.underArmHStyle);
-			this.onchange = (value) => current_rule.set.underArmHStyle = value;
-		}
-	}
-
-	class EarPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Ear piercings", pairs);
-			this.setValue(current_rule.set.earPiercing);
-			this.onchange = (value) => current_rule.set.earPiercing = value;
-		}
-	}
-
-	class NosePiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Nasal piercings", pairs);
-			this.setValue(current_rule.set.nosePiercing);
-			this.onchange = (value) => current_rule.set.nosePiercing = value;
-		}
-	}
-
-	class EyebrowPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Eyebrow piercings", pairs);
-			this.setValue(current_rule.set.eyebrowPiercing);
-			this.onchange = (value) => current_rule.set.eyebrowPiercing = value;
-		}
-	}
-
-	class NavelPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Navel piercings", pairs);
-			this.setValue(current_rule.set.navelPiercing);
-			this.onchange = (value) => current_rule.set.navelPiercing = value;
-		}
-	}
-
-	class NipplePiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Nipple piercings", pairs);
-			this.setValue(current_rule.set.nipplesPiercing);
-			this.onchange = (value) => current_rule.set.nipplesPiercing = value;
-		}
-	}
-
-	class AreolaPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Studded", 1]
-			];
-			super("Areola studs", pairs);
-			this.setValue(current_rule.set.areolaePiercing);
-			this.onchange = (value) => current_rule.set.areolaePiercing = value;
-		}
-	}
-
-	class LipPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Lip piercings", pairs);
-			this.setValue(current_rule.set.lipsPiercing);
-			this.onchange = (value) => current_rule.set.lipsPiercing = value;
-		}
-	}
-
-	class TonguePiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Tongue piercing", pairs);
-			this.setValue(current_rule.set.tonguePiercing);
-			this.onchange = (value) => current_rule.set.tonguePiercing = value;
-		}
-	}
-
-	class ClitPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2],
-				["Smart (expensive)", 3]
-			];
-			super("Clit piercing", pairs);
-			this.setValue(current_rule.set.clitPiercing);
-			this.onchange = (value) => current_rule.set.clitPiercing = value;
-		}
-	}
-
-	class LabiaPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Pussylips piercings", pairs);
-			this.setValue(current_rule.set.vaginaPiercing);
-			this.onchange = (value) => current_rule.set.vaginaPiercing = value;
-		}
-	}
-
-	class ShaftPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Shaft piercings", pairs);
-			this.setValue(current_rule.set.dickPiercing);
-			this.onchange = (value) => current_rule.set.dickPiercing = value;
-		}
-	}
-
-	class PerineumPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Light", 1],
-				["Heavy", 2]
-			];
-			super("Perianal piercings", pairs);
-			this.setValue(current_rule.set.anusPiercing);
-			this.onchange = (value) => current_rule.set.anusPiercing = value;
-		}
-	}
-
-	class CorsetPiercingList extends List {
-		constructor() {
-			const pairs = [
-				["No default setting", "no default setting"],
-				["None", 0],
-				["Apply", 1]
-			];
-			super("Corset piercings", pairs);
-			this.setValue(current_rule.set.corsetPiercing);
-			this.onchange = (value) => current_rule.set.corsetPiercing = value;
-		}
-	}
-
-	class AutoBrandingList extends List {
-		constructor() {
-			const pairs = [
-				["Activate", 1],
-				["Off", 0],
-			];
-			super("Automatic branding", pairs);
-			this.setValue(current_rule.set.autoBrand);
-			this.onchange = (value) => current_rule.set.autoBrand = value;
-		}
-	}
-
-	class BrandingLocationList extends List {
-		constructor() {
-			super("Your preferred location for brands is", []);
-
-			const ears = new ListSubSection(this, "Ears", [
-				["Left", "left ear"],
-				["Right", "right ear"],
-				["Both", "ears"]
-			]);
-			this.appendChild(ears);
-
-			const cheeks = new ListSubSection(this, "Cheeks", [
-				["Left", "left cheek"],
-				["Right", "right cheek"],
-				["Both", "cheeks"]
-			]);
-			this.appendChild(cheeks);
-
-			const shoulders = new ListSubSection(this, "Shoulders", [
-				["Left", "left shoulder"],
-				["Right", "right shoulder"],
-				["Both", "shoulders"]
-			]);
-			this.appendChild(shoulders);
-
-			const breasts = new ListSubSection(this, "Breasts", [
-				["Left", "right breast"],
-				["Right", "left breast"],
-				["Both", "breasts"]
-			]);
-			this.appendChild(breasts);
-
-			const upper_arms = new ListSubSection(this, "Arms, upper", [
-				["Left", "left upper arm"],
-				["Right", "right upper arm"],
-				["Both", "upper arms"]
-			]);
-			this.appendChild(upper_arms);
-
-			const lower_arms = new ListSubSection(this, "Arms, lower", [
-				["Left", "left lower arm"],
-				["Right", "right lower arm"],
-				["Both", "lower arms"]
-			]);
-			this.appendChild(lower_arms);
-
-			const wrist = new ListSubSection(this, "Wrist", [
-				["Left", "left wrist"],
-				["Right", "right wrist"],
-				["Both", "wrists"]
-			]);
-			this.appendChild(wrist);
-
-			const hand = new ListSubSection(this, "Hand", [
-				["Left", "left hand"],
-				["Right", "right hand"],
-				["Both", "hands"]
-			]);
-			this.appendChild(hand);
-
-			const buttocks = new ListSubSection(this, "Buttocks", [
-				["Left", "left buttock"],
-				["Right", "right buttock"],
-				["Both", "buttocks"]
-			]);
-			this.appendChild(buttocks);
-
-			const thigh = new ListSubSection(this, "Thigh", [
-				["Left", "left thigh"],
-				["Right", "right thigh"],
-				["Both", "thighs"]
-			]);
-			this.appendChild(thigh);
-
-			const calf = new ListSubSection(this, "Calf", [
-				["Left", "left calf"],
-				["Right", "right calf"],
-				["Both", "calves"]
-			]);
-			this.appendChild(calf);
-
-			const ankle = new ListSubSection(this, "Ankle", [
-				["Left", "left ankle"],
-				["Right", "right ankle"],
-				["Both", "ankles"]
-			]);
-			this.appendChild(ankle);
-
-			const feet = new ListSubSection(this, "Feet", [
-				["Left", "left foot"],
-				["Right", "right foot"],
-				["Both", "feet"]
-			]);
-			this.appendChild(feet);
-
-			const other = new ListSubSection(this, "Other", [
-				["Neck", "neck"],
-				["Chest", "chest"],
-				["Belly", "belly"],
-				["Pubic mound", "pubic mound"],
-				["Back", "back"],
-				["Lower Back", "lower back"]
-			]);
-			this.appendChild(other);
-
-			this.setValue(V.brandTarget);
-			this.onchange = (value) => V.brandTarget = value;
-		}
-	}
-
-	class BrandDesignList extends List {
-		constructor() {
-			const items = [
-				["Your slaving emblem", "your personal symbol"],
-				["Your initials", "your initials"],
-				["SLUT"],
-				["WHORE"],
-				["SLAVE"],
-				["COW"],
-				["MEAT"],
-				["CUMDUMP"],
-				["LOVER"],
-				["Pussy symbol", "a pussy symbol"],
-				["Anus symbol", "an anus symbol"],
-				["Penis symbol", "a penis symbol"],
-				["Lady", "a lady silhouette"],
-				["Princess", "a princess silhouette"],
-				["Queen", "a queen silhouette"],
-				["Angel", "an angel silhouette"],
-				["Devil", "a devil silhouette"]
-			];
-
-			if (V.arcologies[0].FSSupremacist !== "unset" || V.arcologies[0].FSSubjugationist !== "unset")
-				items.push(["(FS) Racial Slur", "a racial slur"]);
-
-			if (V.arcologies[0].FSSupremacist !== "unset" && V.arcologies[0].FSSupremacistRace === "white")
-				items.push(["(FS) Swastika", "a swastika"]);
-
-			if (V.arcologies[0].FSSubjugationist !== "unset" && V.arcologies[0].FSSubjugationistRace === "semitic")
-				items.push(["(FS) Star of David", "a Star of David"]);
-
-			if (V.arcologies[0].FSGenderRadicalist !== "unset" || V.arcologies.FSGenderFundamentalist !== "unset")
-				items.push(["(FS) Gender Symbol", "a gender symbol"]);
-
-			if (V.arcologies[0].FSPaternalist !== "unset")
-				items.push(["(FS) Personal Symbol", "her own personal symbol"]);
-
-			if (V.arcologies[0].FSDegradationist !== "unset")
-				items.push(["(FS) Chain Symbol", "a chain symbol"]);
-
-			if (V.arcologies[0].FSBodyPurist !== "unset")
-				items.push(["(FS) Vitruvian Man", "a Vitruvian man"]);
-
-			if (V.arcologies[0].FSTransformationFetishist !== "unset")
-				items.push(["(FS) Most Desired Implants", "a shortlist of desired implants"]);
-
-			if (V.arcologies[0].FSYouthPreferentialist !== "unset")
-				items.push(["(FS) Virginity Status", "her virginity status"]);
-
-			if (V.arcologies[0].FSMaturityPreferentialist !== "unset")
-				items.push(["(FS) Sexual Skill Info", "her sexual skills"]);
-
-			if (V.arcologies[0].FSSlimnessEnthusiast !== "unset")
-				items.push(["(FS) Breast Ceiling", "her absolute maximum breast size"]);
-
-			if (V.arcologies[0].FSAssetExpansionist !== "unset")
-				items.push(["(FS) Breast Floor", "her absolute minimum breast size"]);
-
-			if (V.arcologies[0].FSPastoralist !== "unset")
-				items.push(["(FS) Product Quality", "her body product quality"]);
-
-			if (V.arcologies[0].FSPhysicalIdelist !== "unset")
-				items.push(["(FS) Deadlift Info", "her deadlift record"]);
-
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset")
-				items.push(["(FS) Weight Record", "her highest weigh-in"]);
-
-			if (V.arcologies[0].FSHedonisticDecadence && V.PC.refreshmentType == 2)
-				items.push(["(FS) Favorite Food", `a big helping of ${V.PC.refreshment}`]);
-
-			if (V.arcologies[0].FSRepopulationFocus !== "unset")
-				items.push(["(FS) Birth Count", "the number of children she has birthed"]);
-
-			if (V.arcologies[0].FSChattelReligionist !== "unset")
-				items.push(["(FS) Religious Symbol", "a religious symbol"]);
-
-			if (V.arcologies[0].FSRomanRevivalist !== "unset")
-				items.push(["(FS) Republican Crest", "a small crest of your Republic"]);
-
-			if (V.arcologies[0].FSAztecRevivalist !== "unset")
-				items.push(["(FS) Seven Serpents", "a small symbol of the Aztec gods"]);
-
-			if (V.arcologies[0].FSEgyptianRevivalist !== "unset")
-				items.push(["(FS) Dynastic Sigil", "a small sigil of your Dynasty"]);
-
-			if (V.arcologies[0].FSEdoRevivalist !== "unset")
-				items.push(["(FS) Mon", "a small image of the Shogunate's mon"]);
-
-			if (V.arcologies[0].FSArabianRevivalist !== "unset")
-				items.push(["(FS) Caliphate Symbol", "a small symbol of the Caliphate"]);
-
-			if (V.arcologies[0].FSChineseRevivalist !== "unset")
-				items.push(["(FS) Imperial Seal", "a small image of your Imperial Seal"]);
-
-			super("Your brand design is", items, true);
-		}
-	}
-
-	class FaceTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["permanent makeup"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"]
-			];
-			super("Facial tattoos", items);
-			this.setValue(current_rule.set.lipsTat);
-			this.onchange = (value) => current_rule.set.lipsTat = value;
-		}
-	}
-
-	class ShoulderTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"]
-			];
-			super("Shoulder tattoos", items);
-			this.setValue(current_rule.set.shouldersTat);
-			this.onchange = (value) => current_rule.set.shouldersTat = value;
-		}
-	}
-
-	class ChestTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"]
-			];
-			super("Chest tattoos", items);
-			this.setValue(current_rule.set.boobsTat);
-			this.onchange = (value) => current_rule.set.boobsTat = value;
-		}
-	}
-
-	class ArmTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"]
-			];
-			super("Arm tattoos", items);
-			this.setValue(current_rule.set.armsTat);
-			this.onchange = (value) => current_rule.set.armsTat = value;
-		}
-	}
-
-	class UpperBackTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"],
-			];
-			super("Upper back tattoos", items);
-			this.setValue(current_rule.set.backTat);
-			this.onchange = (value) => current_rule.set.backTat = value;
-		}
-	}
-
-	class LowerBackTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"]
-			];
-			super("Lower back tattoos", items);
-			this.setValue(current_rule.set.stampTat);
-			this.onchange = (value) => current_rule.set.stampTat = value;
-		}
-	}
-
-	class AbdomenTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"],
-			];
-			super("Abdomen tattoos", items);
-			this.setValue(current_rule.set.vaginaTat);
-			this.onchange = (value) => current_rule.set.vaginaTat = value;
-		}
-	}
-
-	class DickTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"],
-			];
-			super("Dick tattoos", items);
-			this.setValue(current_rule.set.dickTat);
-			this.onchange = (value) => current_rule.set.dickTat = value;
-		}
-	}
-
-	class ButtockTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"],
-			];
-			super("Buttock tattoos:", items);
-			this.setValue(current_rule.set.buttTat);
-			this.onchange = (value) => current_rule.set.buttTat = value;
-		}
-	}
-
-	class AnalTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["bleached"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"],
-			];
-			super("Anal tattoo or bleaching", items);
-			this.setValue(current_rule.set.anusTat);
-			this.onchange = (value) => current_rule.set.anusTat = value;
-		}
-	}
-
-	class LegTattooList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["tribal patterns"],
-				["flowers"],
-				["counting"],
-				["advertisements"],
-				["rude words"],
-				["degradation"],
-				["bovine patterns"],
-				["Asian art"],
-				["scenes"],
-				["sacrament"],
-				["sacrilege"],
-				["possessive"],
-				["paternalist"],
-			];
-			super("Leg tattoos", items);
-			this.setValue(current_rule.set.legsTat);
-			this.onchange = (value) => current_rule.set.legsTat = value;
-		}
-	}
-
-	class VisionSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["fixed", 1],
-				["blurred", -1],
-			];
-			super("Vision correction", items);
-			this.setValue(current_rule.set.surgery_eyes);
-			this.onchange = (value) => current_rule.set.surgery_eyes = value;
-		}
-	}
-
-	class HearingSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["fixed", 0],
-				["muffled", -1],
-			];
-			super("Hearing correction", items);
-			this.setValue(current_rule.set.surgery_hears);
-			this.onchange = (value) => current_rule.set.surgery_hears = value;
-		}
-	}
-
-	class LactationSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["implanted", 1],
-				["removed", 0],
-			];
-			super("Lactation drug implants", items);
-			this.setValue(current_rule.set.surgery_lactation);
-			this.onchange = (value) => current_rule.set.surgery_lactation = value;
-		}
-	}
-
-	class SemenSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["implanted", 1],
-				["removed", 0],
-			];
-			super("Prostate production enhancing drug implants", items);
-			this.setValue(current_rule.set.surgery_prostate);
-			this.onchange = (value) => current_rule.set.surgery_prostate = value;
-		}
-	}
-
-	class VasectomyList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["apply vasectomy", true],
-				["undo vasectomy", false],
-			];
-			super("Apply or undo vasectomy for slaves with testicles", items);
-			this.setValue(current_rule.set.surgery_vasectomy);
-			this.onchange = (value) => current_rule.set.surgery_vasectomy = value;
-		}
-	}
-
-	class CosmeticSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["none", 0],
-				["subtle", 1],
-				["invasive", 2],
-			];
-			super("Cosmetic Surgery", items);
-			this.setValue(current_rule.set.surgery_cosmetic);
-			this.onchange = (value) => current_rule.set.surgery_cosmetic = value;
-		}
-	}
-
-	class LipSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["removed", 0],
-				["plush", 20],
-				["big", 40],
-				["huge", 70],
-				["facepussy", 95],
-			];
-			super("Lip implants", items);
-			this.setValue(current_rule.set.surgery_lips);
-			this.onchange = (value) => current_rule.set.surgery_lips = value;
-		}
-	}
-
-	class ButtSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["removed", 0],
-				["slim", 2],
-				["stacked", 4],
-				["huge", 6],
-				["maximised", 9],
-			];
-			super("Buttock implants", items);
-			this.setValue(current_rule.set.surgery_butt);
-			this.onchange = (value) => current_rule.set.surgery_butt = value;
-		}
-	}
-
-	class BreastSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["removed", 0],
-				["slim", 400],
-				["stacked", 1000],
-				["huge", 2000],
-				["barely functional", 9000],
-				["maximised", 48000]
-			];
-			super("Breast implants", items);
-			this.setValue(current_rule.set.surgery_boobs);
-			this.onchange = (value) => current_rule.set.surgery_boobs = value;
-		}
-	}
-
-	class TighteningSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["tightening", 1],
-				["virginity restoration", 2],
-			];
-			super("Orifice Tightening", items);
-			this.setValue(current_rule.set.surgery_holes);
-			this.onchange = (value) => current_rule.set.surgery_holes = value;
-		}
-	}
-
-	class BodyHairSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["keep", 1],
-				["removal", 2],
-			];
-			super("Body Hair", items);
-			this.setValue(current_rule.set.surgery_bodyhair);
-			this.onchange = (value) => current_rule.set.surgery_bodyhair = value;
-		}
-	}
-
-	class HairSurgeryList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["keep", 1],
-				["removal", 2],
-			];
-			super("Hair", items);
-			this.setValue(current_rule.set.surgery_hair);
-			this.onchange = (value) => current_rule.set.surgery_hair = value;
-		}
-	}
-
-	class AutomaticAssignmentList extends List {
-		constructor() {
-			const items = [
-				["No default setting", "no default setting"],
-				["Rest", "rest"],
-				["Fucktoy", "please you"],
-				["Subordinate Slave", "be a subordinate slave"],
-				["House Servant", "be a servant"],
-				["Confined", "stay confined"],
-				["Whore", "whore"],
-				["Public Servant", "serve the public"],
-				["Classes", "take classes"],
-				["Milked", "get milked"],
-				["Gloryhole", "work a glory hole"],
-				["Choose Her Own", "choose her own job"]
-			];
-
-			if (V.HGSuite > 0) items.push(["Head Girl Suite", "live with your Head Girl"]);
-			if (V.brothel > 0) items.push(["Brothel", "work in the brothel"]);
-			if (V.club > 0) items.push(["Club", "serve in the club"]);
-			if (V.arcade > 0) items.push(["Arcade", "be confined in the arcade"]);
-			if (V.dairy > 0) items.push(["Dairy", "work in the dairy"]);
-			if (V.farmyard > 0) items.push(["Farmyard", "work as a farmhand"]);
-			if (V.servantsQuarters > 0) items.push(["Servant Quarters", "work as a servant"]);
-			if (V.masterSuite > 0) items.push(["Master Suite", "serve in the master suite"]);
-			if (V.schoolroom > 0) items.push(["Schoolroom", "learn in the schoolroom"]);
-			if (V.spa > 0) items.push(["Spa", "rest in the spa"]);
-			if (V.clinic > 0) items.push(["Clinic", "get treatment in the clinic"]);
-			if (V.cellblock > 0) items.push(["Cellblock", "be confined in the cellblock"]);
-
-			super("Automatically set assignment", items);
-			this.setValue(current_rule.set.setAssignment);
-			this.onchange = (value) => current_rule.set.setAssignment = value;
-		}
-	}
-
-	class BellyImplantList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["install", "install"],
-				["remove", "remove"],
-			];
-			super("Belly implant", items);
-			this.setValue(current_rule.set.surgery_bellyImplant);
-			this.onchange = (value) => current_rule.set.surgery_bellyImplant = value;
-		}
-	}
-
-	class LabelList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-			];
-			super("Custom label", items, true);
-			this.setValue(current_rule.set.label);
-			this.onchange = (value) => current_rule.set.label = value;
-		}
-	}
-
-	class LabelRemoveList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-			];
-			super("Remove custom label", items, true);
-			this.setValue(current_rule.set.removeLabel);
-			this.onchange = (value) => current_rule.set.removeLabel = value;
-		}
-	}
-
-	class SkinColorList extends List {
-		constructor() {
-			const items = [
-				["no default setting"],
-				["pale"],
-				["lightened"],
-				["tanned"],
-				["dark"],
-				["dyed red"],
-				["dyed green"],
-				["dyed blue"],
-				["dyed pink"],
-				["dyed gray"],
-				["tiger striped"],
-				["camouflage patterned"],
-			]
-			super("Dye or tan skin", items);
-			this.setValue(current_rule.set.skinColor);
-			this.onchange = (x) => current_rule.set.skinColor = x;
-		}
-	}
-
-	return rulesAssistantOptions;
-})();
-
-/*:: rules autosurgery js [script]*/
-
-window.rulesAutosurgery = (function() {
-	"use strict";
-	let V;
-	let r;
-	return rulesAutoSurgery;
-
-	function rulesAutoSurgery(slave) {
-		V = State.variables;
-		r = "";
-		const surgeries = [];
-		const thisSurgery = ProcessHGTastes(slave);
-		if (slave.health > 20)
-			CommitSurgery(slave, thisSurgery, surgeries);
-		if (surgeries.length > 0)
-			PrintResult(slave, thisSurgery, surgeries);
-		return r;
-	}
-
-	function autoSurgerySelector(slave, ruleset) {
-		const surgery = {};
-		ruleset.forEach(rule => {
-			Object.keys(rule)
-				.filter(key => key.startsWith("surgery_") && rule[key] !== "no default setting")
-				.forEach(key => {
-					surgery[key] = rule[key];
-				});
-		});
-		return surgery;
-	}
-
-	function ProcessHGTastes(slave) {
-		let thisSurgery;
-		switch (V.HGTastes) {
-		case 1:
-			thisSurgery = {
-				surgery_lactation: 0,
-				surgery_cosmetic: 1,
-				surgery_faceShape: "cute",
-				surgery_lips: 10,
-				surgery_hips: 0,
-				surgery_hipsImplant: 0,
-				surgery_butt: 0,
-				surgery_accent: 0,
-				surgery_shoulders: 0,
-				surgery_shouldersImplant: 0,
-				surgery_boobs: 0,
-				surgery_holes: 0
-			};
-			break ;
-		case 2:
-			thisSurgery = {
-				surgery_lactation: 0,
-				surgery_cosmetic: 1,
-				surgery_faceShape: "cute",
-				surgery_lips: 60,
-				surgery_hips: 0,
-				surgery_hipsImplant: 0,
-				surgery_butt: 4,
-				surgery_accent: 0,
-				surgery_shoulders: 0,
-				surgery_shouldersImplant: 0,
-				surgery_boobs: 1200,
-				surgery_holes: 0
-			};
-			break;
-		case 3:
-			thisSurgery = {
-				surgery_lactation: 0,
-				surgery_cosmetic: 1,
-				surgery_faceShape: "cute",
-				surgery_lips: 95,
-				surgery_hips: 0,
-				surgery_hipsImplant: 0,
-				surgery_butt: 8,
-				surgery_accent: 0,
-				surgery_shoulders: 0,
-				surgery_shouldersImplant: 0,
-				surgery_boobs: 10000,
-				surgery_holes: 2
-			};
-			break;
-		case 4:
-			thisSurgery = {
-				surgery_lactation: 1,
-				surgery_cosmetic: 1,
-				surgery_faceShape: "cute",
-				surgery_lips: 10,
-				surgery_hips: 3,
-				surgery_hipsImplant: 0,
-				surgery_butt: 0,
-				surgery_accent: 0,
-				surgery_shoulders: 0,
-				surgery_shouldersImplant: 0,
-				surgery_boobs: 0,
-				surgery_holes: 0
-			};
-			break;
-		default:
-			thisSurgery = autoSurgerySelector(
-				slave,
-				V.defaultRules
-					.filter(x => ruleApplied(slave, x) && x.set.autoSurgery === 1)
-					.map(x => x.set));
-			if ((thisSurgery.surgery_hips !== "no default setting") && (thisSurgery.surgery_butt !== "no default setting")) {
-				if (slave.hips < -1) {
-					if (thisSurgery.surgery_butt > 2)
-						thisSurgery.surgery_butt = 2;
-				} else if (slave.hips < 0) {
-					if (thisSurgery.surgery_butt > 4)
-						thisSurgery.surgery_butt = 4;
-				} else if (slave.hips > 0) {
-					if (thisSurgery.surgery_butt > 8)
-						thisSurgery.surgery_butt = 8;
-				} else if (slave.hips > 1) {
-					true;
-				} else {
-					if (thisSurgery.surgery_butt > 6)
-						thisSurgery.surgery_butt = 6;
-				}
-			}
-			break;
-		}
-		return thisSurgery;
-	}
-
-	function CommitSurgery(slave, thisSurgery, surgeries) {
-		if ((slave.eyes == -1) && (thisSurgery.surgery_eyes == 1)) {
-			surgeries.push("surgery to correct her vision");
-			slave.eyes = 1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.eyes == 1) && (thisSurgery.surgery_eyes == -1)) {
-			surgeries.push("surgery to blur her vision");
-			slave.eyes = -1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.hears == -1) && (thisSurgery.surgery_hears == 1)) {
-			surgeries.push("surgery to correct her hearing");
-			slave.hears = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.hears == 0) && (thisSurgery.surgery_hears == -1)) {
-			surgeries.push("surgery to muffle her hearing");
-			slave.hears = -1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.lactation == 2) && (thisSurgery.surgery_lactation == 0)) {
-			surgeries.push("surgery to remove her lactation implants");
-			slave.lactation = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if (slave.lactation != 2 && (thisSurgery.surgery_lactation == 1)) {
-			surgeries.push("lactation inducing implanted drugs");
-			slave.lactation = 2;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.prostate == 2) && (thisSurgery.surgery_prostate == 0)) {
-			surgeries.push("surgery to remove her prostate implant");
-			slave.prostate = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if (slave.prostate == 1 && (thisSurgery.surgery_prostate == 1)) {
-			surgeries.push("a precum production enhancing drug implant");
-			slave.prostate = 2;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.anus > 3) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("a restored anus");
-			slave.anus = 3;
-			if (slave.analSkill > 10)
-				slave.analSkill -= 10;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.vagina > 3) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("a restored pussy");
-			slave.vagina = 3;
-			if (slave.vaginalSkill > 10)
-				slave.vaginalSkill -= 10;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.faceImplant <= 15) && (slave.face <= 95) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("a nicer face");
-			if (slave.faceShape == "masculine") slave.faceShape = "androgynous";
-			slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
-			slave.face = Math.clamp(slave.face+20,-100,100);
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.faceImplant <= 15) && (slave.ageImplant != 1) && (slave.visualAge >= 25) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("an age lift");
-			slave.ageImplant = 1;
-			slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
-			if (slave.visualAge > 80) slave.visualAge -= 40;
-			else if (slave.visualAge >= 70) slave.visualAge -= 30;
-			else if (slave.visualAge > 50) slave.visualAge -= 20;
-			else if (slave.visualAge > 36) slave.visualAge -= 10;
-			else slave.visualAge -= 5;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if (((slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") || (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless")) && (thisSurgery.surgery_bodyhair == 2)) {
-			surgeries.push("body hair removal");
-			if (slave.underArmHStyle != "hairless") slave.underArmHStyle = "bald";
-			if (slave.pubicHStyle != "hairless") slave.pubicHStyle = "bald";
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-
-		} else if ((slave.bald == 0 || slave.hStyle != "bald" || slave.eyebrowHStyle != "bald") && (thisSurgery.surgery_hair == 2)) {
-			surgeries.push("hair removal");
-			slave.eyebrowHStyle = "bald";
-			slave.hStyle = "bald";
-			slave.bald = 1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-
-		} else if ((slave.weight >= 10) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("liposuction");
-			slave.weight -= 50;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.voice == 1) && (slave.voiceImplant == 0) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("a feminine voice");
-			slave.voice += 1;
-			slave.voiceImplant += 1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.waist >= -10) && (thisSurgery.surgery_cosmetic > 0)) {
-			surgeries.push("a narrower waist");
-			slave.waist -= 20;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if (((slave.boobShape == "saggy") || (slave.boobShape == "downward-facing")) && (thisSurgery.surgery_cosmetic > 0) && (slave.breastMesh != 1)) {
-			surgeries.push("a breast lift");
-			slave.boobShape = "normal";
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if (((slave.boobShape == "normal") || (slave.boobShape == "wide-set")) && (thisSurgery.surgery_cosmetic > 0) && (slave.breastMesh != 1)) {
-			if (slave.boobs > 800)
-				slave.boobShape = "torpedo-shaped";
-			else
-				slave.boobShape = "perky";
-			surgeries.push("more interestingly shaped breasts");
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((thisSurgery.surgery_lips == 0) && (slave.lipsImplant > 0)) {
-			surgeries.push("surgery to remove her lip implants");
-			slave.lips -= slave.lipsImplant;
-			slave.lipsImplant = 0;
-			if (slave.oralSkill > 10)
-				slave.oralSkill -= 10;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.lips <= 95) && (slave.lips < thisSurgery.surgery_lips)) {
-			if (thisSurgery.surgery_lips !== "no default setting") {
-				surgeries.push("bigger lips");
-				slave.lipsImplant += 10;
-				slave.lips += 10;
-				if (slave.oralSkill > 10)
-					slave.oralSkill -= 10;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-
-		} else if ((slave.faceImplant <= 45) && (slave.face <= 95) && (thisSurgery.surgery_cosmetic == 2)) {
-			surgeries.push("a nicer face");
-			if (slave.faceShape == "masculine") slave.faceShape = "androgynous";
-			slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
-			slave.face = Math.clamp(slave.face+20,-100,100);
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.hips < 1) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade == 1)) {
-			surgeries.push("wider hips");
-			slave.hips++;
-			slave.hipsImplant++;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.faceImplant <= 45) && (slave.ageImplant != 1) && (slave.visualAge >= 25) && (thisSurgery.surgery_cosmetic == 2)) {
-			surgeries.push("an age lift");
-			slave.ageImplant = 1;
-			if (slave.visualAge > 80) {
-				slave.visualAge -= 40;
-			} else if (slave.visualAge >= 70) {
-				slave.visualAge -= 30;
-			} else if (slave.visualAge > 50) {
-				slave.visualAge -= 20;
-			} else if (slave.visualAge > 36) {
-				slave.visualAge -= 10;
-			} else {
-				slave.visualAge -= 5;
-			}
-			slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.waist >= -95) && (thisSurgery.surgery_cosmetic == 2) && (V.seeExtreme == 1)) {
-			surgeries.push("a narrower waist");
-			slave.waist = Math.clamp(slave.waist-20,-100,100);
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.voice < 3) && (slave.voiceImplant == 0) && (thisSurgery.surgery_cosmetic == 2)) {
-			surgeries.push("a bimbo's voice");
-			slave.voice += 1;
-			slave.voiceImplant += 1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((thisSurgery.surgery_butt == 0) && (slave.buttImplant > 0)) {
-			surgeries.push("surgery to remove her butt implants");
-			slave.butt -= slave.buttImplant;
-			slave.buttImplant = 0;
-			slave.buttImplantType = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((thisSurgery.surgery_boobs == 0) && (slave.boobsImplant > 0)) {
-			surgeries.push("surgery to remove her boob implants");
-			slave.boobs -= slave.boobsImplant;
-			slave.boobsImplant = 0;
-			slave.boobsImplantType = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-		} else if ((slave.butt <= 3) && (slave.butt < thisSurgery.surgery_butt)) {
-			if (thisSurgery.surgery_butt !== "no default setting") {
-				surgeries.push("a bigger butt");
-				slave.buttImplant = 1;
-				slave.butt += 1;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-		} else if ((slave.boobs <= 600) && (slave.lactation < 2) && (slave.boobs+400 <= thisSurgery.surgery_boobs)) {
-			if (thisSurgery.surgery_boobs !== "no default setting") {
-				surgeries.push("bigger boobs");
-				slave.boobsImplant += 400;
-				slave.boobs += 400;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-		} else if ((slave.boobs <= 600) && (slave.lactation < 2) && (slave.boobs+200 <= thisSurgery.surgery_boobs)) {
-			if (thisSurgery.surgery_boobs !== "no default setting") {
-				surgeries.push("modestly bigger boobs");
-				slave.boobsImplant += 200;
-				slave.boobs += 200;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-
-		} else if ((slave.butt <= 5) && (slave.butt < thisSurgery.surgery_butt)) {
-			if (thisSurgery.surgery_butt !== "no default setting") {
-				surgeries.push("a bigger butt");
-				slave.buttImplant = 1;
-				slave.butt += 1;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-
-		} else if ((slave.boobs <= 2000) && (slave.lactation < 2) && (slave.boobs+400 < thisSurgery.surgery_boobs)) {
-			if (thisSurgery.surgery_boobs !== "no default setting") {
-				surgeries.push("bigger boobs");
-				slave.boobsImplant += 400;
-				slave.boobs += 400;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-
-		} else if ((slave.anus > 0) && (V.surgeryUpgrade == 1) && (thisSurgery.surgery_holes == 2)) {
-			surgeries.push("a virgin anus");
-			slave.anus = 0;
-			if (slave.analSkill > 10) {
-				slave.analSkill -= 10;
-			}
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.vagina > 0) && (V.surgeryUpgrade == 1) && (thisSurgery.surgery_holes == 2)) {
-			surgeries.push("a virgin pussy");
-			slave.vagina = 0;
-			if (slave.vaginalSkill > 10)
-				slave.vaginalSkill -= 10;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.hips < 2) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade == 1)) {
-			surgeries.push("wider hips");
-			slave.hips++;
-			slave.hipsImplant++;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.anus > 1) && (thisSurgery.surgery_holes == 1)) {
-			surgeries.push("a tighter anus");
-			slave.anus = 1;
-			if (slave.analSkill > 10) {
-				slave.analSkill -= 10;
-			}
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.vagina > 1) && (thisSurgery.surgery_holes == 1)) {
-			surgeries.push("a tighter pussy");
-			slave.vagina = 1;
-			if (slave.vaginalSkill > 10) {
-				slave.vaginalSkill -= 10;
-			}
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if ((slave.butt <= 8) && (slave.butt < thisSurgery.surgery_butt)) {
-			if (thisSurgery.surgery_butt !== "no default setting") {
-				surgeries.push("a bigger butt");
-				slave.buttImplant = 1;
-				slave.butt += 1;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-
-		} else if ((slave.boobs <= 9000) && (slave.lactation < 2) && (slave.boobs < thisSurgery.surgery_boobs)) {
-			if (thisSurgery.surgery_boobs !== "no default setting") {
-				surgeries.push("bigger boobs");
-				slave.boobsImplant += 200;
-				slave.boobs += 200;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			}
-
-		} else if ((slave.hips < 3) && (slave.hips < thisSurgery.surgery_hips) && (V.surgeryUpgrade == 1)) {
-			surgeries.push("wider hips");
-			slave.hips++;
-			slave.hipsImplant++;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (V.PC.medicine >= 100) slave.health -= 5;
-			else slave.health -= 10;
-
-		} else if (slave.bellyImplant < 0 && V.bellyImplants > 0 && thisSurgery.surgery_bellyImplant == "install" && slave.womb.length == 0 && slave.broodmother == 0) {
-			slave.bellyImplant = 100;
-			slave.preg = -2;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-			if (slave.ovaries == 1 || slave.mpreg == 1) {
-				surgeries.push("belly implant");
-				V.surgeryType = "bellyIn";
-				if (V.PC.medicine >= 100) slave.health -= 5;
-				else slave.health -= 10;
-			} else {
-				surgeries.push("male belly implant");
-				V.surgeryType = "bellyInMale";
-				if (V.PC.medicine >= 100) slave.health -= 25;
-				else slave.health -= 50;
-			}
-			bellyIn(slave);
-
-		} else if (slave.bellyImplant >= 0 && thisSurgery.surgery_bellyImplant == "remove") {
-			surgeries.push("belly implant removal");
-			V.surgeryType = "bellyOut";
-			if (V.PC.medicine >= 100)
-				slave.health -= 5;
-			else
-				slave.health -= 10;
-			slave.preg = 0;
-			slave.bellyImplant = -1;
-			slave.cervixImplant = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-		} else if (slave.balls > 0 && slave.vasectomy === 0 && thisSurgery.surgery_vasectomy === true) {
-			surgeries.push("vasectomy");
-			V.surgeryType = "vasectomy";
-			if (V.PC.medicine >= 100)
-				slave.health -= 5;
-			else
-				slave.health -= 10;
-			slave.vasectomy = 1;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-		} else if (slave.balls > 0 && slave.vasectomy === 1 && thisSurgery.surgery_vasectomy === false) {
-			surgeries.push("undo vasectomy");
-			V.surgeryType = "vasectomy undo";
-			if (V.PC.medicine >= 100)
-				slave.health -=5;
-			else
-				slave.health -= 10;
-			slave.vasectomy = 0;
-			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-		}
-	}
-
-	function PrintResult(slave, thisSurgery, surgeries) {
-		let surgeriesDisplay = "";
-		if (surgeries.length === 1)
-			surgeriesDisplay = surgeries[0];
-		else {
-			surgeriesDisplay = surgeries.slice(0, surgeries.length - 1).join(", ");
-			surgeriesDisplay += ", and" + surgeries[surgeries.length - 1];
-		}
-		r += `${V.assistantName === "your personal assistant" ? "Your personal assistant" : V.assistantName}, ordered to apply surgery, gives ${slave.slaveName} <span class="lime">${surgeriesDisplay}.</span>`;
-	}
-
-	function bellyIn(slave) {
-		// less hacky version of calling surgery degradation silently
-		if (slave.devotion > 50)
-			slave.devotion += 4;
-		else if (slave.devotion >= -20)
-			slave.trust -= 5;
-		else {
-			slave.trust -= 5;
-			slave.devotion -= 5;
-		}
-	}
-})();
-
-
-/*:: sexActJS[script]*/
-
-/*
- times is how many times to increment the anal counts.
- if left undefined it will assume it to be 1.
-*/
-window.AnalVCheck = function AnalVCheck(times) {
-	const V = State.variables;
-	const slave = V.activeSlave;
-	let pronouns = getPronouns(slave);
-	let he = pronouns.pronoun,
-		him = pronouns.object,
-		his = pronouns.possessive,
-		hers = pronouns.possessivePronoun,
-		himself = pronouns.objectReflexive,
-		boy = pronouns.noun;
-	let He = capFirstChar(he),
-		His = capFirstChar(his);
-	let r = ``;
-	if (canDoAnal(slave) && slave.anus === 0) {
-		r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `;
-		if (slave.devotion > 50 || slave.career == "a slave since birth") {
-			r += `Since it's ${his} first time, you gently ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. Before long ${he}'s moaning loudly as you continue working away at ${his} butthole. `;
-			if (slave.tankBaby == 2) {
-				r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`;
-			} else {
-				r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. `;
-				if ((slave.fetishKnown && slave.fetish == "buttslut") || (slave.energy > 95) || (slave.attrXX >= 85 && V.PC.dick === 0)) {
-					r += `${He} can't wait to be fucked in the ass by you again.`;
-				} else {
-					r += `${He} looks forward to having ${his} asshole fucked by you again.`;
-				}
-			}
-			slave.devotion += 4;
-		} else if (slave.devotion > 20) {
-			r += `Since it's ${his} first time, you gently ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${His} moans become louder and louder as you continue working away at ${his} butthole. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`;
-		} else if (slave.devotion >= -20) {
-			r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
-			slave.trust -= 5;
-		} else {
-			r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
-			slave.trust -= 5;
-			slave.devotion -= 5;
-		}
-		slave.anus = 1;
-	}
-	if (canDoAnal(slave)) {
-		if (canImpreg(slave, V.PC)) {
-			r += knockMeUp(slave, 10, 1, -1, 1);
-		}
-		if (!times) {
-			V.analTotal += 1;
-			slave.analCount += 1;
-		} else {
-			V.analTotal += times;
-			slave.analCount += times;
-		}
-	}
-	return r;
-}
-
-/*
- times is how many times to increment the vaginal counts.
- if left undefined it will assume it to be 1.
-*/
-window.VaginalVCheck = function VaginalVCheck(times) {
-	const V = State.variables;
-	const slave = V.activeSlave;
-	let pronouns = getPronouns(slave);
-	let he = pronouns.pronoun,
-		him = pronouns.object,
-		his = pronouns.possessive,
-		hers = pronouns.possessivePronoun,
-		himself = pronouns.objectReflexive,
-		boy = pronouns.noun;
-	let He = capFirstChar(he),
-		His = capFirstChar(his);
-	let r = ``;
-	if (canDoVaginal(slave) && slave.vagina === 0) {
-		r += `@@.lime;This breaks in ${slave.slaveName}'s virgin pussy.@@ `;
-		if (slave.devotion > 50 || slave.career == "a slave since birth") {
-			r += `You ease yourself into ${his} pussy, since it's ${his} first time, then gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
-			if (slave.tankBaby == 2) {
-				r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity to be happy.@@ ${He} expects ${his} pussy to be seeing a lot more attention in the future.`;
-			} else {
-				r += `@@.hotpink;${He} enjoys losing ${his} cherry to you.@@ `;
-				if ((slave.fetishKnown && slave.fetish == "pregnancy") || (slave.energy > 95) || (slave.attrXY >= 85 && V.PC.dick === 1)) {
-					r += `${He} can't wait to have ${his} pussy fucked by you again.`;
-				} else {
-					r += `${He} looks forward to having ${his} pussy fucked by you again.`;
-				}
-			}
-			slave.devotion += 4;
-		} else if (slave.devotion > 20) {
-			r += `You ease yourself into ${his} pussy, since it's ${his} first time, then gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} accepts losing ${his} virginity to ${his} owner and ${he} looks forward to having ${his} pussy fucked by you again.`;
-		} else if (slave.devotion >= -20) {
-			r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue thrusting into ${his} fuck hole. ${He} @@.mediumorchid;hates@@ losing ${his} virginity this way and @@.gold;fears@@ the next time you'll conquer ${his}. ${He} dreads getting violated by you again.`;
-			slave.trust -= 5;
-			slave.devotion -= 5;
-		} else {
-			r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue working ${his} fuck hole. ${He} tries to struggle, but you only pound harder. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for robbing ${his} of ${his} virginity. ${He} dreads getting fucked by you again.`;
-			slave.trust -= 10;
-			slave.devotion -= 15;
-		}
-		slave.vagina = 1;
-	}
-	if (canDoVaginal(slave)) {
-		if (canImpreg(slave, V.PC)) {
-			r += knockMeUp(slave, 10, 0, -1, 1);
-		}
-		if (!times) {
-			V.vaginalTotal += 1;
-			slave.vaginalCount += 1;
-		} else {
-			V.vaginalTotal += times;
-			slave.vaginalCount += times;
-		}
-	}
-
-	return r;
-}
-
-/*
- analTimes is how many times to increment the anal counts, if there is no vagina available.
- bothTimes is how many times to increment both holes counts (usually it is half of analTimes).
- In both cases if left undefined it will assume it to be 1.
-*/
-window.BothVCheck = function BothVCheck(analTimes, bothTimes) {
-	const V = State.variables;
-	const slave = V.activeSlave;
-	let pronouns = getPronouns(slave);
-	let he = pronouns.pronoun,
-		him = pronouns.object,
-		his = pronouns.possessive,
-		hers = pronouns.possessivePronoun,
-		himself = pronouns.objectReflexive,
-		boy = pronouns.noun;
-	let He = capFirstChar(he),
-		His = capFirstChar(his);
-	let r = ``;
-	if (canDoVaginal(slave)) {
-		if (slave.vagina === 0) {
-			if (canDoAnal(slave) && slave.anus == 0) {
-				r += `@@.lime;This breaks in ${slave.slaveName}'s virgin holes.@@ `;
-				if (slave.devotion > 50 || slave.career == "a slave since birth") {
-					r += `As it's ${his} first time, you ease yourself into ${his} pussy before gradually working your way into ${his} ass and alternate between the two holes while ${he} moans. `;
-					if (slave.tankBaby == 2) {
-						r += `${He} believes you taking ${his} virgin holes @@.hotpink;will keep ${him} from suffering.@@ ${He} expects you to require ${his} holes as tribute again soon.`;
-					} else {
-						r += `@@.hotpink;${He}'s so devoted ${he} enjoys being fucked in both holes for the first time.@@ ${He} looks forward to having ${his} holes fucked by you again.`;
-					}
-					slave.devotion += 4;
-				} else if (slave.devotion <= 20) {
-					r += `You force yourself into ${his} pussy before working your way into ${his} ass. ${He} sobs and cries with disgust while you alternate between the two holes. ${He} @@.mediumorchid;hates@@ losing ${his} virginity and anal virginity in one @@.gold;brutal@@ incident. ${He} dreads having ${his} holes violated by you again.`;
-					slave.trust -= 5;
-					slave.devotion -= 5;
-				} else {
-					r += `As it's ${his} first time, you ease yourself into ${his} pussy before gradually working your way into ${his} ass and alternate between the two holes while ${he} moans. ${He} accepts being fucked in both holes for the first time. ${He} looks forward to having ${his} holes fucked by you again.`;
-				}
-				slave.anus = 1;
-			} else {
-				r += `@@.lime;This breaks in ${slave.slaveName}'s virgin pussy.@@ `;
-				if (slave.devotion > 50 || slave.career == "a slave since birth") {
-					r += `As it's ${his} first time, you ease yourself into ${his} pussy and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
-					if (slave.tankBaby == 2) {
-						r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity to be happy.@@ ${He} expects ${his} pussy to be seeing a lot more attention in the future.`;
-					} else {
-						r += `@@.hotpink;${He} enjoys losing ${his} cherry to you.@@ ${He} looks forward to having ${his} pussy fucked by you again.`;
-					}
-					slave.devotion += 4;
-				} else if (slave.devotion <= 20) {
-					r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue working ${his} fuck hole. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for taking ${his} virginity. ${He} dreads having ${his} pussy violated by you again.`;
-					slave.trust -= 5;
-					slave.devotion -= 5;
-				} else {
-					r += `As it's ${his} first time, you ease yourself into ${his} pussy before gradually increasing the intensity of your thrusts while ${he} softly moans. ${He} accepts losing ${his} virginity to ${his} owner and ${he} looks forward to having ${his} pussy fucked by you again.`;
-				}
-			}
-			slave.vagina = 1;
-		} else if (canDoAnal(slave) && slave.anus == 0) {
-			r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `;
-			if (slave.devotion > 50 || slave.career == "a slave since birth") {
-				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
-				if (slave.tankBaby == 2) {
-					r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`;
-				} else {
-					r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`
-				}
-				slave.devotion += 4;
-			} else if (slave.devotion > 20){
-				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`;
-			} else if (slave.devotion >= -20) {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
-				slave.trust -= 5;
-			} else {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
-				slave.trust -= 5;
-				slave.devotion -= 5;
-			}
-			slave.anus = 1;
-		}
-		if (canDoAnal(slave)) {
-			if (!bothTimes) {
-				V.vaginalTotal += 1;
-				V.analTotal += 1;
-				slave.vaginalCount += 1;
-				slave.analCount += 1;
-			} else {
-				V.vaginalTotal += bothTimes;
-				V.analTotal += bothTimes;
-				slave.vaginalCount += bothTimes;
-				slave.analCount += bothTimes;
-			}
-			if (canImpreg(slave, V.PC)) {
-				r += knockMeUp(slave, 10, 2, -1, 1);
-			}
-		} else {
-			if (!bothTimes) {
-				V.vaginalTotal += 1;
-				slave.vaginalCount += 1;
-			} else {
-				V.vaginalTotal += bothTimes;
-				slave.vaginalCount += bothTimes;
-			}
-			if (canImpreg(slave, V.PC)) {
-				r += knockMeUp(slave, 10, 0, -1, 1);
-			}
-		}
-	} else if (canDoAnal(slave)) {
-		if (slave.anus == 0) {
-			r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `;
-			if (slave.devotion > 50 || slave.career == "a slave since birth") {
-				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
-				if (slave.tankBaby == 2) {
-					r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`;
-				} else {
-					r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`;
-				}
-				slave.devotion += 4;
-			} else if (slave.devotion > 20) {
-				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`;
-			} else if (slave.devotion >= -20) {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
-				slave.trust -= 5;
-			} else {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`
-				slave.trust -= 5;
-				slave.devotion -= 5;
-			}
-			slave.anus = 1;
-		}
-		if (!analTimes) {
-			V.analTotal += 1;
-			slave.analCount += 1;
-		} else {
-			V.analTotal += analTimes;
-			slave.analCount += analTimes;
-		}
-		if (canImpreg(slave, V.PC)) {
-			r += knockMeUp(slave, 10, 1, -1, 1);
-		}
-	}
-	return r;
-}
-
-/*
- times is how many times to increment either the Vaginal or the Anal counts, if there is no Vagina available.
- If left undefined it will assume it to be 1.
-*/
-window.SimpleVCheck = function SimpleVCheck(times) {
-	let r = ``;
-	if (canDoVaginal(State.variables.activeSlave)) {
-		r += VaginalVCheck(times);
-	} else if (canDoAnal(State.variables.activeSlave)) {
-		r += AnalVCheck(times);
-	}
-	return r;
-}
-
-/*
- Before using this function, set $partner to the index of the partner in the $slaves array
- analTimes is how many times to increment the Anal counts, if there is no Vagina available.
- bothTimes is how many times to increment both holes counts (usually it is half of Anal).
- In both cases if left undefined it will assume it to be 1.
- This also checks for a valid Vagina/Accessory, though most code I've seen does this already, you
- never know when someone might use the routine and forget to do such.
-*/
-window.PartnerVCheck = function PartnerVCheck(analTimes, bothTimes) {
-	const V = State.variables;
-	const partner = V.slaves[V.partner];
-	let pronouns = getPronouns(partner);
-	let he = pronouns.pronoun,
-		him = pronouns.object,
-		his = pronouns.possessive,
-		hers = pronouns.possessivePronoun,
-		himself = pronouns.objectReflexive,
-		boy = pronouns.noun;
-	let He = capFirstChar(he),
-		His = capFirstChar(his);
-	let r = ``;
-
-	if (V.partner < 0 || V.partner >= V.slaves.length) {
-		r += `@@.red;PartnerVCheck called with invalid partner '$partner' from passage ${passage()}.@@`;
-	} else if (canDoVaginal(partner)) {
-		if (partner.vagina === 0) {
-			if (canDoAnal(partner) && partner.anus === 0) {
-				r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually working your way into ${his} butthole, alternating between ${his} holes. @@.lime;This breaks in ${partner.slaveName}'s virgin holes.@@ `;
-				partner.vagina = 1;
-				partner.anus = 1;
-			} else {
-				r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually increasing the intensity of your thrusts. @@.lime;This breaks in ${partner.slaveName}'s virgin pussy.@@ `;
-				partner.vagina = 1;
-			}
-		} else if (canDoAnal(partner) && partner.anus == 0) {
-			r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. @@.lime;This breaks in ${partner.slaveName}'s virgin ass.@@ `;
-			partner.anus = 1;
-		}
-
-		if (canDoAnal(partner)) {
-			if (!bothTimes) {
-				V.vaginalTotal += 1;
-				V.analTotal += 1;
-				partner.vaginalCount += 1;
-				partner.analCount += 1;
-			} else {
-				V.vaginalTotal += bothTimes;
-				V.analTotal += bothTimes;
-				partner.vaginalCount += bothTimes;
-				partner.analCount += bothTimes;
-			}
-			if (canImpreg(partner, V.PC)) {
-				r += knockMeUp(partner, 10, 2, -1);
-			}
-		} else {
-			if (!bothTimes) {
-				V.vaginalTotal += 1;
-				partner.vaginalCount += 1;
-			} else {
-				V.vaginalTotal += bothTimes;
-				partner.vaginalCount += bothTimes;
-			}
-			if (canImpreg(partner, V.PC)) {
-				r += knockMeUp(partner, 10, 0, -1);
-			}
-		}
-	} else if (canDoAnal(partner)) {
-		if (partner.anus === 0) {
-			r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. @@.lime;This breaks in ${partner.slaveName}'s virgin ass.@@ `;
-			partner.anus = 1;
-		}
-		if (!analTimes) {
-			V.analTotal += 1;
-			partner.analCount += 1;
-		} else {
-			V.analTotal += analTimes;
-			partner.analCount += analTimes;
-		}
-		if (canImpreg(partner, V.PC)) {
-			r += knockMeUp(partner, 10, 1, -1);
-		}
-	}
-	return r;
-}
-
-/*
- count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave.
- If count is left undefined it will assume it to be 1.
- Intended to be a simple "I want to fuck x and not have to code a bunch of logic for it".
-*/
-window.SimpleSexAct = function SimpleSexAct(slave, count) {
-	const V = State.variables;
-	let fuckTarget = 0;
-	let fuckCount = 1;
-	let r = ``;
-	if (count) {
-		fuckCount = count;
-	}
-	for (var i = 0; i < fuckCount; i++) {
-		fuckTarget = jsRandom(1,100);
-		if (slave.nipples == "fuckable" && V.PC.dick === 1 && fuckTarget > 80) {
-			V.mammaryTotal += 1;
-			slave.mammaryCount += 1;
-		} else if (canDoVaginal(slave) && slave.vagina > 0 && fuckTarget > 33) {
-			V.vaginalTotal += 1;
-			slave.vaginalCount += 1;
-			if (canImpreg(slave, V.PC)) {
-				r += knockMeUp(slave, 10, 0, -1, 1);
-			}
-		} else if (canDoAnal(slave) && slave.anus > 0 && fuckTarget > 10) {
-			V.analTotal += 1;
-			slave.analCount += 1;
-			if (canImpreg(slave, V.PC)) {
-				r += knockMeUp(slave, 10, 1, -1, 1);
-			}
-		} else {
-			V.oralTotal += 1;
-			slave.oralCount += 1;
-		}
-	}
-	return r;
-}
-
-/*
- count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave.
- If count is left undefined it will assume it to be 1.
- Intended to be a simple "x got fucked y times and I don't want to keep coding it".
- Pregnancy chance is handled in saLongTermEffects.tw.
-*/
-window.SimpleSlaveFucking = function SimpleSlaveFucking(slave, count) {
-	const V = State.variables;
-	let fuckTarget = 0;
-	let fuckCount = 1;
-	if (count) {
-		fuckCount = count;
-	}
-	for (var i = 0; i < fuckCount; i++) {
-		fuckTarget = jsRandom(1,100);
-		if (slave.nipples == "fuckable" && fuckTarget > 80) {
-			V.mammaryTotal += 1;
-			slave.mammaryCount += 1;
-		} else if (canDoVaginal(slave) && slave.vagina > 0 && fuckTarget > 33) {
-			V.vaginalTotal += 1;
-			slave.vaginalCount += 1;
-		} else if (canDoAnal(slave) && slave.anus > 0 && fuckTarget > 10) {
-			V.analTotal += 1;
-			slave.analCount += 1;
-		} else {
-			V.oralTotal += 1;
-			slave.oralCount += 1;
-		}
-	}
-	return;
-}
-
-/*
- count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave.
- If count is left undefined it will assume it to be 1.
- Intended to be a simple "x got fucked y times by z and I don't want to keep coding it".
-*/
-window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, domslave, count) {
-	const V = State.variables;
-	let fuckTarget = 0;
-	let fuckCount = 1;
-	let r = ``;
-	if (count) {
-		fuckCount = count;
-	}
-	for (var j = 0; j < fuckCount; j++) {
-		//there is a reason randomization happens inside cycle - to spread fuck around, otherwise cycle isn't even needed
-		fuckTarget = jsRandom(1,100);
-		if (subslave.nipples === "fuckable" && canPenetrate(domslave) && fuckTarget > 80) {
-			if (passage() === "SA serve your other slaves") {
-				if (subslave.ID == V.slaves[V.i].ID) {
-					V.slaves[V.i].mammaryCount++;
-					V.mammaryTotal++;
-					domslave.penetrativeCount++;
-					V.penetrativeTotal++;
-				} else {
-					subslave.mammaryCount++;
-					V.mammaryTotal++;
-					V.slaves[V.i].penetrativeCount++;
-					V.penetrativeTotal++;
-				}
-			} else {
-				V.mammaryTotal++;
-				V.penetrativeTotal++;
-				subslave.mammaryCount++;
-				domslave.penetrativeCount++;
-			}
-		} else if (canDoVaginal(subslave) && subslave.vagina > 0 && canPenetrate(domslave) && fuckTarget > 33) {
-			if (passage() === "SA serve your other slaves") {
-				if (subslave.ID == V.slaves[V.i].ID) {
-					V.slaves[V.i].vaginalCount++;
-					V.vaginalTotal++;
-					V.penetrativeTotal++;
-					domslave.penetrativeCount++;
-				} else {
-					V.slaves[V.i].penetrativeCount++;
-					V.penetrativeTotal++;
-					subslave.vaginalCount++;
-					V.vaginalTotal++;
-				}
-			} else {
-				V.vaginalTotal++;
-				subslave.vaginalCount++;
-				V.penetrativeTotal++;
-				domslave.penetrativeCount++;
-			}
-			if (canImpreg(subslave, domslave)) {
-				r += knockMeUp(subslave, 3, 0, domslave.ID, 1);
-			}
-		} else if (canDoAnal(subslave) && subslave.anus > 0 && canPenetrate(domslave) && fuckTarget > 10) {
-			//i think would impregnate from anal here even without .mpreg? same in original widget too
-			if (canImpreg(subslave, domslave) && subslave.mpreg == 1) {
-				r += knockMeUp(subslave, 3, 1, domslave.ID, 1);
-			}
-			if (passage() === "SA serve your other slaves") {
-				if (subslave.ID == V.slaves[V.i].ID) {
-					V.slaves[V.i].analCount++;
-					V.analTotal++;
-					V.penetrativeTotal++;
-					domslave.penetrativeCount++;
-				} else {
-					V.slaves[V.i].penetrativeCount++;
-					V.penetrativeTotal++;
-					V.analTotal++;
-					subslave.analCount++;
-				}
-			} else {
-				V.analTotal++;
-				subslave.analCount++;
-				V.penetrativeTotal++;
-				domslave.penetrativeCount++;
-			}
-		} else {
-			V.oralTotal++;
-			subslave.oralCount++;
-		}
-	}
-	return r;
-}
-
-window.SimpleVaginaFuck = function SimpleVaginaFuck(slave, count) {
-	if (count) {
-		State.variables.vaginalTotal += count;
-		slave.vaginalCount += count;
-	} else {
-		State.variables.vaginalTotal++;
-		slave.vaginalCount++;
-	}
-}
-
-window.SimpleAssFuck = function SimpleAssFuck(slave, count) {
-	if (count) {
-		State.variables.analTotal += count;
-		slave.analCount += count;
-	} else {
-		State.variables.analTotal++;
-		slave.analCount++;
-	}
-}
-
-/*:: PenthouseNaming [script]*/
-
-window.MasterSuiteUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.masterSuiteNameCaps === "The Master Suite")
-		name = "Master Suite"
-	else
-		name = V.masterSuiteNameCaps;
-	return `<<link "${name}""Master Suite">><</link>> `}
-window.HeadGirlSuiteUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.HGSuiteNameCaps === "The Head Girl Suite")
-		name = "Head Girl Suite"
-	else
-		name = V.HGSuiteNameCaps;
-	return `<<link "${name}""Head Girl Suite">><</link>> `}
-window.ServantQuartersUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.servantsQuartersNameCaps === "The Servants' Quarters")
-		name = "Servants' Quarters"
-	else
-		name = V.servantsQuartersNameCaps;
-	return `<<link "${name}""Servants' Quarters">><</link>> `}
-window.SpaUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.spaNameCaps === "The Spa")
-		name = "Spa"
-	else
-		name = V.spaNameCaps;
-	return `<<link "${name}""Spa">><</link>> `}
-window.NurseryUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.nurseryNameCaps === "The Nursery")
-		name = "Nursery"
-	else
-		name = V.nurseryNameCaps;
-	return `<<link "${name}""Nursery">><</link>> `}
-window.ClinicUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.clinicNameCaps === "The Clinic")
-		name = "Clinic"
-	else
-		name = V.clinicNameCaps;
-	return `<<link "${name}""Clinic">><</link>> `}
-window.SchoolRoomUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.schoolroomNameCaps === "The Schoolroom")
-		name = "Schoolroom"
-	else
-		name = V.schoolroomNameCaps;
-	return `<<link "${name}""Schoolroom">><</link>> `}
-window.CellblockUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.cellblockNameCaps === "The Cellblock")
-		name = "Cellblock"
-	else
-		name = V.cellblockNameCaps;
-	return `<<link "${name}""Cellblock">><</link>> `}
-window.IncubatorUIName = function() {
-	const V = State.variables;
-	var name = "";
-	if (V.incubatorNameCaps === "The Incubator")
-		name = "Incubator"
-	else
-		name = V.incubatorNameCaps;
-	return `<<link "${name}""Incubator">><</link>> `}
-
-// :: Slave Summary Widgets JS [script]
-
-window.clearSummaryCache = function clearSummaryCache(slave) {
-	if (!slave)
-		setup.summaryCache = {};
-	else if (slave instanceof Object && slave.ID !== Infinity && slave.ID !== -Infinity)
-		setup.summaryCache[slave.ID] = undefined;
-	else
-		setup.summaryCache[slave] = undefined;
-};
-
-window.SlaveSummary = function SlaveSummary(slave) {
-	const V = State.variables;
-	if(V.useSummaryCache) {
-		if (setup.summaryCache[slave.ID] === undefined)
-			setup.summaryCache[slave.ID] = SlaveSummaryUncached(slave);
-		//this.output.appendChild(setup.summaryCache[State.temporary.Slave.ID].cloneNode(true))
-		return setup.summaryCache[slave.ID];
-	} else return SlaveSummaryUncached(slave);
-};
-
-window.SlaveSummaryUncached = (function(){
-	"use strict";
-	let V, r;
-
-	function SlaveSummaryUncached(slave) {
-		V = State.variables;
-		r = "";
-		if (V.abbreviateDevotion === 1)
-			short_devotion(slave);
-		else if (V.abbreviateDevotion === 2)
-			long_devotion(slave);
-		if (slave.fuckdoll === 0) {
-			if (V.abbreviateRules === 1)
-				short_rules(slave);
-			else if (V.abbreviateRules === 2)
-				long_rules(slave);
-		}
-		if (slave.tired !== 0)
-			r += `Tired.`;
-		if (V.abbreviateDiet === 1)
-			short_weight(slave);
-		else if (V.abbreviateDiet === 2)
-			long_weight(slave);
-		if (V.abbreviateDiet === 1)
-			short_diet(slave);
-		else if (V.abbreviateDiet === 2)
-			long_diet(slave);
-		if (V.abbreviateHealth === 1)
-			short_health(slave);
-		else if (V.abbreviateHealth === 2)
-			long_health(slave);
-		if (V.abbreviateDrugs === 1)
-			short_drugs(slave);
-		else if (V.abbreviateDrugs === 2)
-			long_drugs(slave);
-		if (V.abbreviateNationality + V.abbreviateGenitalia + V.abbreviatePhysicals + V.abbreviateSkills + V.abbreviateMental !== 0) {
-			r += `<br>`;
-			if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1)
-				r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-		}
-		V.desc = SlaveTitle(slave);
-		let first_letter = V.desc.substring(0, 1).toUpperCase();
-		V.desc = first_letter + V.desc.substring(1);
-		r += `<strong><span class="coral">${V.desc}${V.abbreviatePhysicals === 2? '.' : ''}</span></strong> `;
-		if (V.seeRace === 1) {
-			r += `<span class="tan">`;
-			if (V.abbreviateRace === 1)
-				short_race(slave);
-			else if (V.abbreviateRace === 2)
-				long_race(slave);
-			r += `</span> `;
-		}
-		if (V.abbreviateNationality === 1)
-			short_nationality(slave);
-		else if (V.abbreviateNationality === 2)
-			long_nationality(slave);
-		if (V.abbreviatePhysicals === 1)
-			short_skin(slave);
-		else
-			r += `<span class="pink">${slave.skin.charAt(0).toUpperCase() + slave.skin.slice(1)} skin.</span> `;
-		if (V.abbreviateGenitalia === 1)
-			short_genitals(slave);
-		else if (V.abbreviateGenitalia === 2)
-			long_genitals(slave);
-		if (V.abbreviatePhysicals === 1) {
-			short_age(slave);
-			short_face(slave);
-			short_eyes(slave);
-			short_ears(slave);
-			if (slave.markings !== "none")
-				r += `Markings`;
-			short_lips(slave);
-			short_teeth(slave);
-			short_muscles(slave);
-			short_limbs(slave);
-			short_voice(slave);
-			short_tits_ass(slave);
-			short_hips(slave);
-			short_waist(slave);
-			short_implants(slave);
-			short_lactation(slave);
-			short_mods(slave);
-			r += `</span>`;
-		} else if (V.abbreviatePhysicals === 2) {
-			long_age(slave);
-			long_face(slave);
-			long_eyes(slave);
-			long_ears(slave);
-			long_lips(slave);
-			long_teeth(slave);
-			long_muscles(slave);
-			long_limbs(slave);
-			long_voice(slave);
-			long_tits_ass(slave);
-			long_hips(slave);
-			long_waist(slave);
-			long_implants(slave);
-			long_lactation(slave);
-			long_mods(slave);
-			if (slave.brand !== 0)
-				r += `Branded.`;
-			r += `</span>`;
-		}
-		if (V.abbreviateHormoneBalance === 1) {
-			if (slave.hormoneBalance <= -21) {
-				r += `<span class="deepskyblue">`;
-				r += ` <strong>HB:M</strong>`;
-			} else if (slave.hormoneBalance <= 20) {
-				r += `<span class="pink">`;
-				r += ` <strong>HB:N</strong>`;
-			} else if (slave.hormoneBalance <= 500) {
-				r += `<span class="pink">`;
-				r += ` <strong>HB:F</strong>`;
-			}
-			r += `</span>`;
-		} else if (V.abbreviateHormoneBalance === 2) {
-			r += `<span class="`;
-			if (slave.hormoneBalance <= -21) {
-				r += `deepskyblue`;
-			} else {
-				r += `pink`;
-			}
-			r += `"> `;
-			if (slave.hormoneBalance < -400) {
-				r += `Overwhelmingly masculine`;
-			} else if (slave.hormoneBalance <= -300) {
-				r += `Extremely masculine`;
-			} else if (slave.hormoneBalance <= -200) {
-				r += `Heavily masculine`;
-			} else if (slave.hormoneBalance <= -100) {
-				r += `Very masculine`;
-			} else if (slave.hormoneBalance <= -21) {
-				r += `Masculine`;
-			} else if (slave.hormoneBalance <= 20) {
-				r += `Neutral`;
-			} else if (slave.hormoneBalance <= 99) {
-				r += `Feminine`;
-			} else if (slave.hormoneBalance <= 199) {
-				r += `Very feminine`;
-			} else if (slave.hormoneBalance <= 299) {
-				r += `Heavily feminine`;
-			} else if (slave.hormoneBalance <= 399) {
-				r += `Extremely feminine`;
-			} else if (slave.hormoneBalance <= 500) {
-				r += `Overwhelmingly feminine`;
-			}
-			r += ` hormone balance.</span>`;
-		}
-		r += `<br>`;
-		if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1)
-			r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-		if (V.abbreviateSkills === 1) {
-			short_intelligence(slave);
-			short_sex_skills(slave);
-			if (slave.combatSkill > 0)
-				r += `C`;
-			r += `</span> `;
-			short_prestige(slave);
-			short_porn_prestige(slave);
-		} else if (V.abbreviateSkills === 2) {
-			long_intelligence(slave);
-			long_sex_skills(slave);
-			if (slave.combatSkill > 0)
-				r += `Trained fighter.`;
-			r += `</span> `;
-			long_prestige(slave);
-			long_porn_prestige(slave);
-		}
-		if (V.abbreviateMental === 1) {
-			if (slave.fetish !== "mindbroken") {
-				if (slave.fetishKnown === 1)
-					short_fetish(slave);
-				if (slave.attrKnown === 1)
-					short_attraction(slave);
-			}
-			if (slave.clitPiercing === 3) {
-				short_smart_fetish(slave);
-				short_smart_attraction(slave);
-			}
-			short_behavior_flaw(slave);
-			short_sex_flaw(slave);
-			short_behavior_quirk(slave);
-			short_sex_quirk(slave);
-		} else if (V.abbreviateMental === 2) {
-			if (slave.fetish !== "mindbroken") {
-				if (slave.fetishKnown === 1)
-					long_fetish(slave);
-				if (slave.attrKnown === 1)
-					long_attraction(slave);
-			}
-			if (slave.clitPiercing === 3) {
-				long_smart_fetish(slave);
-				long_smart_attraction(slave);
-			}
-			long_behavior_flaw(slave);
-			long_sex_flaw(slave);
-			long_behavior_quirk(slave);
-			long_sex_quirk(slave);
-		}
-		if (slave.customLabel)
-			r += `<strong><span class="yellow">${slave.customLabel}</span></strong>`;
-		if ((slave.relationship !== 0) || (slave.relation !== 0) || (V.abbreviateClothes === 2) || (V.abbreviateRulesets === 2)) {
-			r += `<br>`;
-			if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1)
-				r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-		}
-		if (V.abbreviateMental === 1) {
-			r += `<span class="lightgreen">`;
-			if (V.familyTesting === 1)
-				short_extended_family(slave);
-			else
-				short_legacy_family(slave);
-			r += `</span>`;
-			short_clone(slave);
-			short_rival(slave);
-		} else if (V.abbreviateMental === 2) {
-			if (V.familyTesting === 1)
-				long_extended_family(slave);
-			else
-				long_legacy_family(slave);
-			long_clone(slave);
-			long_rival(slave);
-		}
-		if (slave.fuckdoll === 0) {
-			if (V.abbreviateClothes === 2) {
-				r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-				if (slave.choosesOwnClothes === 1)
-					r += `Dressing herself. `;
-				long_clothes(slave);
-				long_collar(slave);
-				long_belly(slave);
-				if (slave.amp !== 1)
-					long_legs(slave);
-				if (canWalk(slave))
-					long_shoes(slave);
-				long_vaginal_acc(slave);
-				long_dick_acc(slave);
-				long_buttplug(slave);
-			}
-		}
-		r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-		rules_assistant(slave);
-		if (V.abbreviateOrigins === 2 && slave.origin !== 0)
-			origins(slave);
-		return r;
-	}
-
-	function short_devotion(slave) {
-		if (slave.fetish === "mindbroken") {
-			r += `<span class="red">MB</span>`;
-		} else if (slave.devotion < -95) {
-			r += `<span class="darkviolet">Hate${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		} else if (slave.devotion < -50) {
-			r += `<span class="darkviolet">Hate${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		} else if (slave.devotion < -20) {
-			r += `<span class="mediumorchid">Res${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		} else if (slave.devotion <= 20) {
-			r += `<span class="yellow">Ambiv${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		} else if (slave.devotion <= 50) {
-			r += `<span class="hotpink">Accept${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		} else if (slave.devotion <= 95) {
-			r += `<span class="deeppink">Devo${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		} else {
-			r += `<span class="magenta">Wor${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`;
-		}
-		r += " ";
-		if (slave.fetish === "mindbroken") {
-			return;
-		} else if (slave.trust < -95) {
-			r += `<span class="darkgoldenrod">ETerr${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-		} else if (slave.trust < -50) {
-			r += `<span class="goldenrod">Terr${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-		} else if (slave.trust < -20) {
-			r += `<span class="gold">Fright${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-		} else if (slave.trust <= 20) {
-			r += `<span class="yellow">Fear${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-		} else if (slave.trust <= 50) {
-			if (slave.devotion < -20) {
-				r += `<span class="orange">Caref${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-			} else {
-				r += `<span class="mediumaquamarine">Caref${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-			}
-		} else if (slave.trust < 95) {
-			if (slave.devotion < -20) {
-				r += `<span class="orangered">Bold${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-			} else {
-				r += `<span class="mediumseagreen">Trust${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-			}
-		} else {
-			if (slave.devotion < -20) {
-				r += `<span class="darkred">Defiant${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-			} else {
-				r += `<span class="seagreen">VTrust ${V.summaryStats ? `[${slave.trust}]` : ''}</span>`;
-			}
-		}
-		r += " ";
-	}
-
-	function long_devotion(slave) {
-		if (slave.fetish === "mindbroken") {
-			r += `<span class="red">Mindbroken.</span>`;
-		} else if (slave.devotion < -95) {
-			r += `<span class="darkviolet">Very hateful${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		} else if (slave.devotion < -50) {
-			r += `<span class="darkviolet">Hateful${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		} else if (slave.devotion < -20) {
-			r += `<span class="mediumorchid">Resistant${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		} else if (slave.devotion <= 20) {
-			r += `<span class="yellow">Ambivalent${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		} else if (slave.devotion <= 50) {
-			r += `<span class="hotpink">Accepting${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		} else if (slave.devotion <= 95) {
-			r += `<span class="deeppink">Devoted${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		} else {
-			r += `<span class="magenta">Worshipful${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`;
-		}
-		r += " ";
-		if (slave.fetish === "mindbroken") {
-			return;
-		} else if (slave.trust < -95) {
-			r += `<span class="darkgoldenrod">Extremely terrified${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-		} else if (slave.trust < -50) {
-			r += `<span class="goldenrod">Terrified${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-		} else if (slave.trust < -20) {
-			r += `<span class="gold">Frightened${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-		} else if (slave.trust <= 20) {
-			r += `<span class="yellow">Fearful${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-		} else if (slave.trust <= 50) {
-			if (slave.devotion < -20) {
-				r += `<span class="orange">Careful${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-			} else {
-				r += `<span class="mediumaquamarine">Careful${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-			}
-		} else if (slave.trust < 95) {
-			if (slave.devotion < -20) {
-				r += `<span class="orangered">Bold${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-			} else {
-				r += `<span class="mediumseagreen">Trusting${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-			}
-		} else {
-			if (slave.devotion < -20) {
-				r += `<span class="darkred">Defiant${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-			} else {
-				r += `<span class="seagreen">Profoundly trusting${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`;
-			}
-		}
-		r += " ";
-	}
-
-	function short_rules(slave) {
-		switch (slave.livingRules) {
-			case "luxurious":
-				r += `<strong>LS:Lux</strong>`;
-				break;
-			case "normal":
-				r += `<strong>LS:Nor</strong>`;
-				break;
-			default:
-				r += `<strong>LS:Spa</strong>`;
-				break;
-		}
-		r += " ";
-		if (canTalk(slave)) {
-			switch (slave.speechRules) {
-				case "permissive":
-					r += `<strong>SpR:P</strong>`;
-					break;
-				case "accent elimination":
-					r += `<strong>SpR:NoAcc</strong>`;
-					break;
-				case "language lessons":
-					r += `<strong>SpR:LL</strong>`;
-					break;
-				default:
-					r += `<strong>SpR:R</strong>`;
-					break;
-			}
-			r += " ";
-		}
-		switch (slave.relationshipRules) {
-			case "permissive":
-				r += `<strong>ReR:P</strong>`;
-				break;
-			case "just friends":
-				r += `<strong>ReR:Fr</strong>`;
-				break;
-			default:
-				r += `<strong>ReR:R</strong>`;
-				break;
-		}
-		r += " ";
-		switch (slave.standardPunishment) {
-			case "confinement":
-				r += `<strong>Pun:Conf</strong>`;
-				break;
-			case "whipping":
-				r += `<strong>Pun:Whip</strong>`;
-				break;
-			case "chastity":
-				r += `<strong>Pun:Chas</strong>`;
-				break;
-			default:
-				r += `<strong>Pun:Situ</strong>`;
-				break;
-		}
-		r += " ";
-		switch (slave.standardReward) {
-			case "relaxation":
-				r += `<strong>Rew:Relx</strong>`;
-				break;
-			case "drugs":
-				r += `<strong>Rew:Drug</strong>`;
-				break;
-			case "orgasm":
-				r += `<strong>Rew:Orga</strong>`;
-				break;
-			default:
-				r += `<strong>Rew:Situ</strong>`;
-				break;
-		}
-		r += " ";
-		switch (slave.releaseRules) {
-			case "permissive":
-				r += `<strong>MaR:P</strong>`;
-				break;
-			case "sapphic":
-				r += `<strong>MaR:S</strong>`;
-				break;
-			case "masturbation":
-				r += `<strong>MaR:M</strong>`;
-				break;
-			case "chastity":
-				r += `<strong>MaR:C</strong>`;
-				break;
-			default:
-				r += `<strong>MaR:R</strong>`;
-				break;
-		}
-		r += " ";
-	}
-
-	function long_rules(slave) {
-		r += `Living standard: ${slave.livingRules}. `;
-		if (canTalk(slave)) {
-			r += `Speech rules: ${slave.speechRules}. `;
-		}
-		r += `Relationship rules: ${slave.relationshipRules}. `;
-		r += `Typical punishment: ${slave.standardPunishment}. `;
-		r += `Typical reward: ${slave.standardReward}. `;
-		r += `Release rules: ${slave.releaseRules}. `;
-	}
-
-	function short_weight(slave) {
-		if (slave.weight < -95) {
-			r += `<strong><span class="red">W---${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-		} else if (slave.weight < -30) {
-			if (slave.hips < -1) {
-				r += `<strong>W--${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-			} else {
-				r += `<strong><span class="red">W--${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-			}
-		} else if (slave.weight < -10) {
-			r += `<strong>W-${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-		} else if (slave.weight <= 10) {
-			r += `<strong>W${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-		} else if (slave.weight <= 30) {
-			r += `<strong>W+${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-		} else if (slave.weight <= 95) {
-			if (slave.hips > 1 || V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `<strong>W++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-			} else {
-				r += `<strong><span class="red">W++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-			}
-		} else if (slave.weight <= 130) {
-			if (slave.hips > 2 || V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `<strong>W+++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-			} else {
-				r += `<strong><span class="red">W+++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-			}
-		} else if (slave.weight <= 160) {
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `<strong>W++++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-			} else {
-				r += `<strong><span class="red">W++++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-			}
-		} else if (slave.weight <= 190) {
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `<strong>W+++++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-			} else {
-				r += `<strong><span class="red">W+++++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-			}
-		} else {
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `<strong>W++++++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`;
-			} else {
-				r += `<strong><span class="red">W++++++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
-			}
-		}
-		r += " ";
-	}
-
-	function long_weight(slave) {
-		if (slave.weight < -95) {
-			r += `<span class="red">Emaciated${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-		} else if (slave.weight < -30) {
-			if (slave.hips < -1) {
-				r += `Model-thin${V.summaryStats? `[${slave.weight}]`: ''}.`;
-			} else {
-				r += `<span class="red">Very thin${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-			}
-		} else if (slave.weight < -10) {
-			r += `Thin${V.summaryStats? `[${slave.weight}]`: ''}.`;
-		} else if (slave.weight <= 10) {
-			r += `Trim${V.summaryStats? `[${slave.weight}]`: ''}.`;
-		} else if (slave.weight <= 30) {
-			r += `Plush${V.summaryStats? `[${slave.weight}]`: ''}.`;
-		} else if (slave.weight <= 95) {
-			if (slave.hips > 1 || V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `Nicely chubby${V.summaryStats? `[${slave.weight}]`: ''}.`;
-			} else {
-				r += `<span class="red">Overweight${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-			}
-		} else if (slave.weight <= 130) {
-			if (slave.hips > 2 || V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `Pleasantly soft and shapely${V.summaryStats? `[${slave.weight}]`: ''}.`;
-			} else {
-				r += `<span class="red">Fat${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-			}
-		} else if (slave.weight <= 160) {
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `Amazingly voluptuous${V.summaryStats? `[${slave.weight}]`: ''}.`;
-			} else {
-				r += `<span class="red">Obese${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-			}
-		} else if (slave.weight <= 190) {
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `SSBBW${V.summaryStats? `[${slave.weight}]`: ''}.`;
-			} else {
-				r += `<span class="red">Super Obese${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-			}
-		} else {
-			if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-				r += `Perfectly massive${V.summaryStats? `[${slave.weight}]`: ''}.`;
-			} else {
-				r += `<span class="red">Dangerously Obese${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
-			}
-		}
-		r += " ";
-
-	}
-
-	function short_diet(slave) {
-		r += `<span class="teal">`;
-		switch (slave.diet) {
-			case "restricted":
-				r += `<strong>Di:W-</strong>`;
-				break;
-			case "fattening":
-				r += `<strong>Di:W+</strong>`;
-				break;
-			case "XX":
-				r += `<strong>Di:XX+</strong>`;
-				break;
-			case "XY":
-				r += `<strong>Di:XY+</strong>`;
-				break;
-			case "XXY":
-				r += `<strong>Di:XXY+</strong>`;
-				break;
-			case "muscle building":
-				r += `<strong>Di:M+</strong>`;
-				break;
-			case "slimming":
-				r += `<strong>Di:M-</strong>`;
-				break;
-			case "cum production":
-				r += `<strong>Di:C+</strong>`;
-				break;
-			case "cleansing":
-				r += `<strong>Di:H+</strong>`;
-				break;
-			case "fertility":
-				r += `<strong>Di:F+</strong>`;
-				break;
-		}
-		r += `</span> `;
-		r += `<span class="cyan">`;
-		if (slave.dietCum === 2) {
-			r += `<strong>Cum++</strong>`;
-		} else if (((slave.dietCum === 1) && (slave.dietMilk === 0))) {
-			r += `<strong>Cum+</strong>`;
-		} else if (((slave.dietCum === 1) && (slave.dietMilk === 1))) {
-			r += `<strong>Cum+ Milk+</strong>`;
-		} else if (((slave.dietCum === 0) && (slave.dietMilk === 1))) {
-			r += `<strong>Milk+</strong>`;
-		} else if ((slave.dietMilk === 2)) {
-			r += `<strong>Milk++</strong>`;
-		}
-		r += `</span> `;
-	}
-
-	function long_diet(slave) {
-		r += `<span class="teal">`;
-		switch (slave.diet) {
-			case "restricted":
-				r += `Dieting.`;
-				break;
-			case "fattening":
-				r += `Gaining weight.`;
-				break;
-			case "XX":
-				r += `Estrogen rich.`;
-				break;
-			case "XY":
-				r += `Testosterone rich.`;
-				break;
-			case "XXY":
-				r += `Futanari mix.`;
-				break;
-			case "muscle building":
-				r += `Pumping iron.`;
-				break;
-			case "slimming":
-				r += `Slimming down.`;
-				break;
-			case "cum production":
-				r += `Cum production.`;
-				break;
-			case "cleansing":
-				r += `Cleansing.`;
-				break;
-			case "fertility":
-				r += `Fertility.`;
-				break;
-		}
-		r += `</span> `;
-		if (slave.dietCum === 2) {
-			r += `Diet Base: <span class="cyan">Cum Based.</span>`;
-		} else if (((slave.dietCum === 1) && (slave.dietMilk === 0))) {
-			r += `Diet Base: <span class="cyan">Cum Added.</span>`;
-		} else if (((slave.dietCum === 1) && (slave.dietMilk === 1))) {
-			r += `Diet Base: <span class="cyan">Milk & Cum Added.</span>`;
-		} else if (((slave.dietCum === 0) && (slave.dietMilk === 1))) {
-			r += `Diet Base: <span class="cyan">Milk Added.</span>`;
-		} else if ((slave.dietMilk === 2)) {
-			r += `Diet Base: <span class="cyan">Milk Based.</span>`;
-		}
-		r += " ";
-	}
-
-	function short_health(slave) {
-		if (slave.health < -20) {
-			r += `<strong><span class="red">H${V.summaryStats? `[${slave.health}]` : ''}</span></strong>`;
-		} else if (slave.health <= 20) {
-			r += `<strong><span class="yellow">H${V.summaryStats? `[${slave.health}]` : ''}</span></strong>`;
-		} else if (slave.health > 20) {
-			r += `<strong><span class="green">H${V.summaryStats? `[${slave.health}]` : ''}</span></strong>`;
-		}
-		r += " ";
-	}
-
-	function long_health(slave) {
-		if (slave.health < -90) {
-			r += `<span class="red">On the edge of death${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		} else if (slave.health < -50) {
-			r += `<span class="red">Extremely unhealthy${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		} else if (slave.health < -20) {
-			r += `<span class="red">Unhealthy${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		} else if (slave.health <= 20) {
-			r += `<span class="yellow">Healthy${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		} else if (slave.health <= 50) {
-			r += `<span class="green">Very healthy${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		} else if (slave.health <= 90) {
-			r += `<span class="green">Extremely healthy${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		} else {
-			r += `<span class="green">Unnaturally healthy${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
-		}
-		r += " ";
-	}
-
-	function short_drugs(slave) {
-		r += `<span class="tan">`;
-		switch (slave.drugs) {
-			case "breast injections":
-				r += `<strong>Dr:Boobs+</strong>`;
-				break;
-			case "intensive breast injections":
-				r += `<strong>Dr:Boobs++</strong>`;
-				break;
-			case "hyper breast injections":
-				r += `<strong>Dr:Boobs+++</strong>`;
-				break;
-			case "butt injections":
-				r += `<strong>Dr:Butt+</strong>`;
-				break;
-			case "intensive butt injections":
-				r += `<strong>Dr:Butt++</strong>`;
-				break;
-			case "hyper butt injections":
-				r += `<strong>Dr:Butt+++</strong>`;
-				break;
-			case "lip injections":
-				r += `<strong>Dr:Lip+</strong>`;
-				break;
-			case "fertility drugs":
-				r += `<strong>Dr:Fert+</strong>`;
-				break;
-			case "super fertility drugs":
-				r += `<strong>Dr:Fert++</strong>`;
-				break;
-			case "penis enhancement":
-				r += `<strong>Dr:Dick+</strong>`;
-				break;
-			case "intensive penis enhancement":
-				r += `<strong>Dr:Dick++</strong>`;
-				break;
-			case "hyper penis enhancement":
-				r += `<strong>Dr:Dick+++</strong>`;
-				break;
-			case "testicle enhancement":
-				r += `<strong>Dr:Balls+</strong>`;
-				break;
-			case "intensive testicle enhancement":
-				r += `<strong>Dr:Balls++</strong>`;
-				break;
-			case "hyper testicle enhancement":
-				r += `<strong>Dr:Balls+++</strong>`;
-				break;
-			case "psychosuppressants":
-				r += `<strong>Dr:Psych</strong>`;
-				break;
-			case "steroids":
-				r += `<strong>Dr:Ster</strong>`;
-				break;
-			case "female hormone injections":
-				r += `<strong>Dr:HormXX++</strong>`;
-				break;
-			case "male hormone injections":
-				r += `<strong>Dr:HormXY++</strong>`;
-				break;
-			case "hormone enhancers":
-				r += `<strong>Dr:Horm+</strong>`;
-				break;
-			case "hormone blockers":
-				r += `<strong>Dr:Horm-</strong>`;
-				break;
-			case "anti-aging cream":
-				r += `<strong>Dr:Age-</strong>`;
-				break;
-			case "appetite suppressors":
-				r += `<strong>Dr:ApSup</strong>`;
-				break;
-			case "penis atrophiers":
-				r += `<strong>Dr:Dick-</strong>`;
-				break;
-			case "testicle atrophiers":
-				r += `<strong>Dr:Balls-</strong>`;
-				break;
-			case "clitoris atrophiers":
-				r += `<strong>Dr:Clit-</strong>`;
-				break;
-			case "labia atrophiers":
-				r += `<strong>Dr:Labia-</strong>`;
-				break;
-			case "nipple atrophiers":
-				r += `<strong>Dr:Nipple-</strong>`;
-				break;
-			case "lip atrophiers":
-				r += `<strong>Dr:Lip-</strong>`;
-				break;
-			case "breast redistributors":
-				r += `<strong>Dr:Breast-</strong>`;
-				break;
-			case "butt redistributors":
-				r += `<strong>Dr:Butt-</strong>`;
-				break;
-			case "sag-B-gone":
-				r += `<strong>Dr:AntiSag</strong>`;
-				break;
-			case "growth stimulants":
-				r += `<strong>Dr:groStim</strong>`;
-				break;
-		}
-		r += `</span> `;
-		r += `<span class="lightgreen">`;
-		if (slave.curatives === 2) {
-			r += `<strong>Cura</strong>`;
-		} else if (slave.curatives === 1) {
-			r += `<strong>Prev</strong>`;
-		}
-		r += `</span> `;
-		if (slave.aphrodisiacs !== 0) {
-			r += `<span class="lightblue">`;
-			if (slave.aphrodisiacs === 1) {
-				r += `<strong>Aph</strong>`;
-			} else if (slave.aphrodisiacs === 2) {
-				r += `<strong>Aph++</strong>`;
-			} else {
-				r += `<strong>Anaph</strong>`;
-			}
-			r += `</span> `;
-		}
-		if (slave.addict !== 0) {
-			r += `<span class="cyan">Add</span>`;
-		}
-		r += `<span class="lightsalmon">`;
-		if (slave.hormones > 1) {
-			r += `<strong>Ho:F+</strong>`;
-		} else if (slave.hormones > 0) {
-			r += `<strong>Ho:F</strong>`;
-		} else if (slave.hormones < -1) {
-			r += `<strong>Ho:M+</strong>`;
-		} else if (slave.hormones < 0) {
-			r += `<strong>Ho:M</strong>`;
-		}
-		r += `</span> `;
-		r += `<span class="mediumseagreen">`;
-		if ((slave.bellyImplant > -1)) {
-			r += `<strong>Belly Imp</strong>`;
-		} else if (((slave.preg <= -2) || (slave.ovaries === 0)) && (slave.vagina !== -1)) {
-			r += `<strong>Barr</strong>`;
-		} else if (slave.pubertyXX === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) {
-			r += `<strong>Prepub</strong>`;
-		} else if (slave.ovaryAge >= 47 && (slave.ovaries === 1 || slave.mpreg === 1)) {
-			r += `<strong>Meno</strong>`;
-		} else if (slave.pregWeek < 0) {
-			r += `<strong>Postpartum</strong>`;
-		} else if (slave.preg === -1) {
-			r += `<strong>CC</strong>`;
-		} else if (slave.preg === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) {
-			r += `<strong>Fert+</strong>`;
-		} else if (((slave.preg < slave.pregData.normalBirth/10) && (slave.preg > 0) && slave.pregKnown === 0) || slave.pregWeek === 1) {
-			r += `<strong>Preg?</strong>`;
-		} else if ((slave.preg >= 36) && (slave.broodmother > 0)) {
-			r += `<strong>Perm preg</strong>`;
-		} else if (slave.pregKnown === 1) {
-			r += `<strong>${slave.pregWeek} wks preg</strong>`;
-		}
-		r += `</span> `;
-		if (slave.induce === 1) {
-			r += `<span class="orange"><strong>Early Labor</strong></span>`;
-		}
-		if (slave.pubertyXY === 0 && slave.balls > 0) {
-			r += `<strong>Prepub balls</strong>`;
-		}
-		if (slave.balls > 0 && slave.vasectomy === 1) {
-			r += `<strong>Vasect</strong>`;
-		}
-		r += `<span class="springgreen">`;
-		if (slave.inflation === 3) {
-			r += `<strong>8 ltr ${slave.inflationType}</strong>`;
-		} else if (slave.inflation === 2) {
-			r += `<strong>4 ltr ${slave.inflationType}</strong>`;
-		} else if (slave.inflation === 1) {
-			r += `<strong>2 ltr ${slave.inflationType}</strong>`;
-		} else if (slave.bellyFluid > 0) {
-			r += `<strong>${slave.bellyFluid}ccs ${slave.inflationType}</strong>`;
-		}
-		r += `</span> `;
-	}
-
-	function long_drugs(slave) {
-		if ((slave.drugs !== "no drugs") && (slave.drugs !== "none")) {
-			r += `<span class="tan">On ${slave.drugs}.</span> `;
-		}
-		r += `<span class="lightgreen">`;
-		if (slave.curatives === 2) {
-			r += `On curatives.`;
-		} else if (slave.curatives === 1) {
-			r += `On preventatives.`;
-		}
-		r += `</span> `;
-		r += `<span class="lightblue">`;
-		if (slave.aphrodisiacs > 0) {
-			r += `On ${slave.aphrodisiacs > 1 ? 'extreme': ''} aphrodisiacs.`;
-		} else if (slave.aphrodisiacs === -1) {
-			r += `On anaphrodisiacs.`;
-		}
-		r += `</span> `;
-		if (slave.addict !== 0) {
-			r += `<span class="cyan">Addict.</span>`;
-		}
-		r += `<span class="lightsalmon">`;
-		if (slave.hormones > 1) {
-			r += `Heavy female hormones.`;
-		} else if (slave.hormones > 0) {
-			r += `Female hormones.`;
-		} else if (slave.hormones < -1) {
-			r += `Heavy male hormones.`;
-		} else if (slave.hormones < 0) {
-			r += `Male hormones.`;
-		}
-		r += `</span> `;
-		r += `<span class="mediumseagreen">`;
-		if ((slave.bellyImplant > -1)) {
-			r += `Belly Implant.`;
-		} else if (((slave.preg <= -2) || (slave.ovaries === 0)) && (slave.vagina !== -1)) {
-			r += `Barren.`;
-		} else if (slave.pubertyXX === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) {
-			r += `Not ovulating yet.`;
-		} else if (slave.ovaryAge >= 47 && (slave.ovaries === 1 || slave.mpreg === 1)) {
-			r += `Menopausal.`;
-		} else if (slave.pregWeek < 0) {
-			r += `Postpartum.`;
-		} else if (slave.preg === -1) {
-			r += `On contraceptives.`;
-		} else if (slave.preg === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) {
-			r += `Fertile.`;
-		} else if (((slave.preg < slave.pregData.normalBirth/10) && (slave.preg > 0) && slave.pregKnown === 0) || slave.pregWeek === 1) {
-			r += `May be pregnant.`;
-		} else if ((slave.preg >= 36) && (slave.broodmother > 0)) {
-			r += `Permanently pregnant.`;
-		} else if (slave.pregKnown === 1) {
-			if (slave.pregType < 2 || slave.broodmother > 0) {
-				r += `${slave.pregWeek} weeks pregnant.`;
-			} else {
-				r += `${slave.pregWeek} weeks pregnant with `;
-				if (slave.pregType >= 40) {
-					r += `a tremendous brood of offspring.`;
-				} else if (slave.pregType >= 20) {
-					r += `a brood of offspring.`;
-				} else if (slave.pregType >= 10) {
-					r += `${slave.pregType} babies.`;
-				} else if (slave.pregType === 9) {
-					r += `nonuplets.`;
-				} else if (slave.pregType === 8) {
-					r += `octuplets.`;
-				} else if (slave.pregType === 7) {
-					r += `septuplets.`;
-				} else if (slave.pregType === 6) {
-					r += `sextuplets.`;
-				} else if (slave.pregType === 5) {
-					r += `quintuplets.`;
-				} else if (slave.pregType === 4) {
-					r += `quadruplets.`;
-				} else if (slave.pregType === 3) {
-					r += `triplets.`;
-				} else {
-					r += `twins.`;
-				}
-			}
-			if (slave.preg > slave.pregData.normalBirth && slave.broodmother == 0) {
-				r += ` (Overdue.)`;
-			}
-		}
-		r += `</span> `;
-		if (slave.induce === 1) {
-			r += `<span class="orange">Showing signs of early labor.</span>`;
-		}
-		if (slave.pubertyXY === 0 && slave.balls > 0) {
-			r += `Has not had first ejaculation.`;
-		}
-		if (slave.balls > 0 && slave.vasectomy === 1) {
-			r += `Vasectomy.`;
-		}
-		r += `<span class="springgreen">`;
-		if (slave.inflation === 3) {
-			r += `Filled with 8 liters of ${slave.inflationType}.`;
-		} else if (slave.inflation === 2) {
-			r += `Filled with 4 liters of ${slave.inflationType}.`;
-		} else if (slave.inflation === 1) {
-			r += `Filled with 2 liters of ${slave.inflationType}.`;
-		} else if (slave.bellyFluid > 0) {
-			r += `Stuffed with ${slave.bellyFluid}ccs of ${slave.inflationType}.`;
-		}
-		r += `</span> `;
-	}
-
-	function long_race(slave) {
-		switch (slave.race) {
-			case "white":
-				r += `Caucasian.`;
-				break;
-			case "asian":
-				r += `Asian.`;
-				break;
-			case "indo-aryan":
-				r += `Indo-aryan.`;
-				break;
-			case "latina":
-				r += `Latina.`;
-				break;
-			case "middle eastern":
-				r += `Middle Eastern.`;
-				break;
-			case "black":
-				r += `Black.`;
-				break;
-			case "pacific islander":
-				r += `Pacific Islander.`;
-				break;
-			case "malay":
-				r += `Malay.`;
-				break;
-			case "amerindian":
-				r += `Amerindian.`;
-				break;
-			case "semitic":
-				r += `Semitic.`;
-				break;
-			case "southern european":
-				r += `Southern European.`;
-				break;
-			case "mixed race":
-				r += `Mixed race.`;
-				break;
-			default:
-				r += `${slave.race.charAt(0).toUpperCase() + slave.race.slice(1)}.`;
-				break;
-		}
-		r += " ";
-	}
-
-	function short_race(slave) {
-		switch (slave.race) {
-			case "white":
-				r += `C`;
-				break;
-			case "asian":
-				r += `A`;
-				break;
-			case "indo-aryan":
-				r += `I`;
-				break;
-			case "latina":
-				r += `L`;
-				break;
-			case "middle eastern":
-				r += `ME`;
-				break;
-			case "black":
-				r += `B`;
-				break;
-			case "pacific islander":
-				r += `PI`;
-				break;
-			case "malay":
-				r += `M`;
-				break;
-			case "amerindian":
-				r += `AI`;
-				break;
-			case "semitic":
-				r += `S`;
-				break;
-			case "southern european":
-				r += `SE`;
-				break;
-			case "mixed race":
-				r += `MR`;
-				break;
-			default:
-				r += `${slave.race.charAt(0).toUpperCase() + slave.race.charAt(1) + slave.race.charAt(2)}`;
-				break;
-		}
-		r += " ";
-	}
-
-	function short_nationality(slave) {
-		r += `<span class="tan">`;
-		switch (slave.nationality) {
-			case "Afghan":
-				r += `Afg`;
-				break;
-			case "Albanian":
-				r += `Alb`;
-				break;
-			case "Algerian":
-				r += `Alg`;
-				break;
-			case "American":
-				r += `USA`;
-				break;
-			case "Andorran":
-				r += `And`;
-				break;
-			case "Angolan":
-				r += `Ang`;
-				break;
-			case "Antiguan":
-				r += `AB`;
-				break;
-			case "Argentinian":
-				r += `Arg`;
-				break;
-			case "Armenian":
-				r += `Arm`;
-				break;
-			case "Aruban":
-				r += `Aru`;
-				break;
-			case "Australian":
-				r += `Aus`;
-				break;
-			case "Austrian":
-				r += `Aut`;
-				break;
-			case "Azerbaijani":
-				r += `Aze`;
-				break;
-			case "Bahamian":
-				r += `Bah`;
-				break;
-			case "Bahraini":
-				r += `Bah`;
-				break;
-			case "Bangladeshi":
-				r += `Bgd`;
-				break;
-			case "Barbadian":
-				r += `Bar`;
-				break;
-			case "Belarusian":
-				r += `Ber`;
-				break;
-			case "Belgian":
-				r += `Bel`;
-				break;
-			case "Belizean":
-				r += `Blz`;
-				break;
-			case "Beninese":
-				r += `Ben`;
-				break;
-			case "Bermudian":
-				r += `Bmd`;
-				break;
-			case "Bhutanese":
-				r += `Bhu`;
-				break;
-			case "Bissau-Guinean":
-				r += `GB`;
-				break;
-			case "Bolivian":
-				r += `Bol`;
-				break;
-			case "Bosnian":
-				r += `Bos`;
-				break;
-			case "Brazilian":
-				r += `Bra`;
-				break;
-			case "British":
-				r += `UK`;
-				break;
-			case "Bruneian":
-				r += `Bru`;
-				break;
-			case "Bulgarian":
-				r += `Bul`;
-				break;
-			case "Burkinabé":
-				r += `BF`;
-				break;
-			case "Burmese":
-				r += `Bur`;
-				break;
-			case "Burundian":
-				r += `Bnd`;
-				break;
-			case "Cambodian":
-				r += `Kam`;
-				break;
-			case "Cameroonian":
-				r += `Cam`;
-				break;
-			case "Canadian":
-				r += `Can`;
-				break;
-			case "Cape Verdean":
-				r += `CV`;
-				break;
-			case "Catalan":
-				r += `Cat`;
-				break;
-			case "Central African":
-				r += `CAR`;
-				break;
-			case "Chadian":
-				r += `Cha`;
-				break;
-			case "Chilean":
-				r += `Chl`;
-				break;
-			case "Chinese":
-				r += `Chi`;
-				break;
-			case "Colombian":
-				r += `Col`;
-				break;
-			case "Comorian":
-				r += `Com`;
-				break;
-			case "Congolese":
-				r += `RC`;
-				break;
-			case "a Cook Islander":
-				r += `CI`;
-				break;
-			case "Costa Rican":
-				r += `CR`;
-				break;
-			case "Croatian":
-				r += `Cro`;
-				break;
-			case "Cuban":
-				r += `Cub`;
-				break;
-			case "Curaçaoan":
-				r += `Cur`;
-				break;
-			case "Cypriot":
-				r += `Cyp`;
-				break;
-			case "Czech":
-				r += `Cze`;
-				break;
-			case "Danish":
-				r += `Den`;
-				break;
-			case "Djiboutian":
-				r += `Dji`;
-				break;
-			case "Dominican":
-				r += `DR`;
-				break;
-			case "Dominiquais":
-				r += `Dom`;
-				break;
-			case "Dutch":
-				r += `Nld`;
-				break;
-			case "East Timorese":
-				r += `ET`;
-				break;
-			case "Ecuadorian":
-				r += `Ecu`;
-				break;
-			case "Egyptian":
-				r += `Egy`;
-				break;
-			case "Emirati":
-				r += `UAE`;
-				break;
-			case "Equatoguinean":
-				r += `EG`;
-				break;
-			case "Eritrean":
-				r += `Eri`;
-				break;
-			case "Estonian":
-				r += `Est`;
-				break;
-			case "Ethiopian":
-				r += `Eth`;
-				break;
-			case "Fijian":
-				r += `Fij`;
-				break;
-			case "Filipina":
-				r += `Phl`;
-				break;
-			case "Finnish":
-				r += `Fin`;
-				break;
-			case "French":
-				r += `Fra`;
-				break;
-			case "French Guianan":
-				r += `FG`;
-				break;
-			case "French Polynesian":
-				r += `FP`;
-				break;
-			case "Gabonese":
-				r += `Gab`;
-				break;
-			case "Gambian":
-				r += `Gam`;
-				break;
-			case "Georgian":
-				r += `Geo`;
-				break;
-			case "German":
-				r += `Ger`;
-				break;
-			case "Ghanan":
-				r += `Gha`;
-				break;
-			case "Greek":
-				r += `Gre`;
-				break;
-			case "Greenlandic":
-				r += `Grn`;
-				break;
-			case "Grenadian":
-				r += `Gda`;
-				break;
-			case "Guamanian":
-				r += `Gua`;
-				break;
-			case "Guatemalan":
-				r += `Gtm`;
-				break;
-			case "Guinean":
-				r += `Gui`;
-				break;
-			case "Guyanese":
-				r += `Guy`;
-				break;
-			case "Haitian":
-				r += `Hai`;
-				break;
-			case "Honduran":
-				r += `Hon`;
-				break;
-			case "Hungarian":
-				r += `Hun`;
-				break;
-			case "I-Kiribati":
-				r += `Kir`;
-				break;
-			case "Icelandic":
-				r += `Ice`;
-				break;
-			case "Indian":
-				r += `Ind`;
-				break;
-			case "Indonesian":
-				r += `Idn`;
-				break;
-			case "Iranian":
-				r += `Irn`;
-				break;
-			case "Iraqi":
-				r += `Irq`;
-				break;
-			case "Irish":
-				r += `Irl`;
-				break;
-			case "Israeli":
-				r += `Isr`;
-				break;
-			case "Italian":
-				r += `Ita`;
-				break;
-			case "Ivorian":
-				r += `IC`;
-				break;
-			case "Jamaican":
-				r += `Jam`;
-				break;
-			case "Japanese":
-				r += `Jpn`;
-				break;
-			case "Jordanian":
-				r += `Jor`;
-				break;
-			case "Kazakh":
-				r += `Kaz`;
-				break;
-			case "Kenyan":
-				r += `Ken`;
-				break;
-			case "Kittitian":
-				r += `SKN`;
-				break;
-			case "Korean":
-				r += `Kor`;
-				break;
-			case "Kosovan":
-				r += `Kos`;
-				break;
-			case "Kurdish":
-				r += `Kur`;
-				break;
-			case "Kuwaiti":
-				r += `Kuw`;
-				break;
-			case "Kyrgyz":
-				r += `Kyr`;
-				break;
-			case "Laotian":
-				r += `Lao`;
-				break;
-			case "Latvian":
-				r += `Lat`;
-				break;
-			case "Lebanese":
-				r += `Lbn`;
-				break;
-			case "Liberian":
-				r += `Lib`;
-				break;
-			case "Libyan":
-				r += `Lby`;
-				break;
-			case "a Liechtensteiner":
-				r += `Lie`;
-				break;
-			case "Lithuanian":
-				r += `Lit`;
-				break;
-			case "Luxembourgian":
-				r += `Lux`;
-				break;
-			case "Macedonian":
-				r += `Mac`;
-				break;
-			case "Malagasy":
-				r += `Mad`;
-				break;
-			case "Malawian":
-				r += `Mwi`;
-				break;
-			case "Malaysian":
-				r += `Mys`;
-				break;
-			case "Maldivian":
-				r += `Mdv`;
-				break;
-			case "Malian":
-				r += `Mal`;
-				break;
-			case "Maltese":
-				r += `Mlt`;
-				break;
-			case "Marshallese":
-				r += `MI`;
-				break;
-			case "Mauritanian":
-				r += `Mta`;
-				break;
-			case "Mauritian":
-				r += `Mts`;
-				break;
-			case "Mexican":
-				r += `Mex`;
-				break;
-			case "Micronesian":
-				r += `FSM`;
-				break;
-			case "Moldovan":
-				r += `Mol`;
-				break;
-			case "Monégasque":
-				r += `Mnc`;
-				break;
-			case "Mongolian":
-				r += `Mon`;
-				break;
-			case "Montenegrin":
-				r += `Mng`;
-				break;
-			case "Moroccan":
-				r += `Mor`;
-				break;
-			case "Mosotho":
-				r += `Les`;
-				break;
-			case "Motswana":
-				r += `Bot`;
-				break;
-			case "Mozambican":
-				r += `Moz`;
-				break;
-			case "Namibian":
-				r += `Nam`;
-				break;
-			case "Nauruan":
-				r += `Nau`;
-				break;
-			case "Nepalese":
-				r += `Npl`;
-				break;
-			case "New Caledonian":
-				r += `NC`;
-				break;
-			case "a New Zealander":
-				r += `NZ`;
-				break;
-			case "Ni-Vanuatu":
-				r += `Van`;
-				break;
-			case "Nicaraguan":
-				r += `Nic`;
-				break;
-			case "Nigerian":
-				r += `Nga`;
-				break;
-			case "Nigerien":
-				r += `Ngr`;
-				break;
-			case "Niuean":
-				r += `Niu`;
-				break;
-			case "Norwegian":
-				r += `Nor`;
-				break;
-			case "Omani":
-				r += `Omn`;
-				break;
-			case "Pakistani":
-				r += `Pak`;
-				break;
-			case "Palauan":
-				r += `Plu`;
-				break;
-			case "Palestinian":
-				r += `Pal`;
-				break;
-			case "Panamanian":
-				r += `Pan`;
-				break;
-			case "Papua New Guinean":
-				r += `PNG`;
-				break;
-			case "Paraguayan":
-				r += `Par`;
-				break;
-			case "Peruvian":
-				r += `Per`;
-				break;
-			case "Polish":
-				r += `Pol`;
-				break;
-			case "Portuguese":
-				r += `Por`;
-				break;
-			case "Puerto Rican":
-				r += `PR`;
-				break;
-			case "Qatari":
-				r += `Qat`;
-				break;
-			case "Romanian":
-				r += `Rom`;
-				break;
-			case "Russian":
-				r += `Rus`;
-				break;
-			case "Rwandan":
-				r += `Rwa`;
-				break;
-			case "Sahrawi":
-				r += `Sah`;
-				break;
-			case "Saint Lucian":
-				r += `SL`;
-				break;
-			case "Salvadoran":
-				r += `ES`;
-				break;
-			case "Sammarinese":
-				r += `SM`;
-				break;
-			case "Samoan":
-				r += `Sam`;
-				break;
-			case "São Toméan":
-				r += `STP`;
-				break;
-			case "Saudi":
-				r += `Sau`;
-				break;
-			case "Scottish":
-				r += `Sco`;
-				break;
-			case "Senegalese":
-				r += `Sen`;
-				break;
-			case "Serbian":
-				r += `Srb`;
-				break;
-			case "Seychellois":
-				r += `Sey`;
-				break;
-			case "Sierra Leonean":
-				r += `Sie`;
-				break;
-			case "Singaporean":
-				r += `Sng`;
-				break;
-			case "Slovak":
-				r += `Svk`;
-				break;
-			case "Slovene":
-				r += `Svn`;
-				break;
-			case "a Solomon Islander":
-				r += `SI`;
-				break;
-			case "Somali":
-				r += `Som`;
-				break;
-			case "South African":
-				r += `RSA`;
-				break;
-			case "South Sudanese":
-				r += `SS`;
-				break;
-			case "Spanish":
-				r += `Spa`;
-				break;
-			case "Sri Lankan":
-				r += `Sri`;
-				break;
-			case "Sudanese":
-				r += `Sud`;
-				break;
-			case "Surinamese":
-				r += `Sur`;
-				break;
-			case "Swazi":
-				r += `Swa`;
-				break;
-			case "Swedish":
-				r += `Swe`;
-				break;
-			case "Swiss":
-				r += `Swi`;
-				break;
-			case "Syrian":
-				r += `Syr`;
-				break;
-			case "Taiwanese":
-				r += `Tai`;
-				break;
-			case "Tajik":
-				r += `Taj`;
-				break;
-			case "Tanzanian":
-				r += `Tza`;
-				break;
-			case "Thai":
-				r += `Tha`;
-				break;
-			case "Tibetan":
-				r += `Tib`;
-				break;
-			case "Togolese":
-				r += `Tog`;
-				break;
-			case "Tongan":
-				r += `Ton`;
-				break;
-			case "Trinidadian":
-				r += `TT`;
-				break;
-			case "Tunisian":
-				r += `Tun`;
-				break;
-			case "Turkish":
-				r += `Tur`;
-				break;
-			case "Turkmen":
-				r += `Tkm`;
-				break;
-			case "Tuvaluan":
-				r += `Tuv`;
-				break;
-			case "Ugandan":
-				r += `Uga`;
-				break;
-			case "Ukrainian":
-				r += `Ukr`;
-				break;
-			case "Uruguayan":
-				r += `Uru`;
-				break;
-			case "Uzbek":
-				r += `Uzb`;
-				break;
-			case "Vatican":
-				r += `VC`;
-				break;
-			case "Venezuelan":
-				r += `Ven`;
-				break;
-			case "Vietnamese":
-				r += `Vnm`;
-				break;
-			case "Vincentian":
-				r += `SVG`;
-				break;
-			case "Yemeni":
-				r += `Yem`;
-				break;
-			case "Zairian":
-				r += `DRC`;
-				break;
-			case "Zambian":
-				r += `Zam`;
-				break;
-			case "Zimbabwean":
-				if (slave.race === "white") {
-					r += `Rho`;
-				} else {
-					r += `Zwe`;
-				}
-				break;
-			case "Ancient Chinese Revivalist":
-				r += `Chi Rev`;
-				break;
-			case "Ancient Egyptian Revivalist":
-				r += `Egy Rev`;
-				break;
-			case "Arabian Revivalist":
-				r += `Ara Rev`;
-				break;
-			case "Aztec Revivalist":
-				r += `Azt Rev`;
-				break;
-			case "Edo Revivalist":
-				r += `Edo Rev`;
-				break;
-			case "Roman Revivalist":
-				r += `Rom Rev`;
-				break;
-			case "":
-			case "none":
-			case "slave":
-			case "Stateless":
-				r += `None`;
-				break;
-			default:
-				r += `${slave.nationality.charAt(0) + slave.nationality.charAt(1) + slave.nationality.charAt(2)}`;
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function long_nationality(slave) {
-		r += `<span class="tan">`;
-		switch (slave.nationality) {
-			case "a Cook Islander":
-				r += `Cook Islander.`;
-				break;
-			case "a Liechtensteiner":
-				r += `Liechtensteiner.`;
-				break;
-			case "a New Zealander":
-				r += `New Zealander.`;
-				break;
-			case "a Solomon Islander":
-				r += `Solomon Islander.`;
-				break;
-			case "Zimbabwean":
-				if (slave.race === "white") {
-					r += `Rhodesian.`;
-				} else {
-					r += `${slave.nationality}.`;
-				}
-				break;
-			case "slave":
-			case "none":
-			case "":
-			case "Stateless":
-				r += `Stateless.`;
-				break;
-			default:
-				r += `${slave.nationality}.`;
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function short_skin(slave) {
-		r += `<span class="pink">`;
-		switch (slave.skin) {
-			case "pure white":
-				r += `P. Whi`;
-				break;
-			case "extremely fair":
-				r += `E. Fai`;
-				break;
-			case "very fair":
-				r += `V. Fai`;
-				break;
-			case "extremely pale":
-				r += `E. Pal`;
-				break;
-			case "light brown":
-				r += `L. Br`;
-				break;
-			case "dark brown":
-				r += `D. Br`;
-				break;
-			case "light olive":
-				r += `L. Oli`;
-				break;
-			case "dark olive":
-				r += `D. Oli`;
-				break;
-			case "lightened":
-				r += `Ltnd`;
-				break;
-			case "tanned":
-				r += `Tan`;
-				break;
-			case "natural":
-				r += `Nat`;
-				break;
-			case "bronzed":
-				r += `Bron`;
-				break;
-			case "ebony":
-				r += `Ebon`;
-				break;
-			case "pure black":
-				r += `P. Bla`;
-				break;
-			case "dark":
-			case "fair":
-			case "pale":
-				r += `${slave.skin.charAt(0).toUpperCase() + slave.skin.slice(1)}`;
-				break;
-			default:
-				r += `${slave.skin.charAt(0).toUpperCase() + slave.skin.charAt(1) + slave.skin.charAt(2)}`;
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function short_genitals(slave) {
-		if (slave.dick > 0) {
-			r += `<span class="pink">`;
-			if (slave.balls === 0) {
-				r += `Geld`;
-			}
-			if ((slave.dick > 8) && (slave.balls > 8)) {
-				r += `Junk+++`;
-			} else if ((slave.dick > 5) && (slave.balls > 5)) {
-				r += `Junk++`;
-			} else if ((slave.dick > 4) && (slave.balls > 4)) {
-				r += `Junk+`;
-			} else if ((slave.dick > 3) && (slave.balls > 3)) {
-				r += `Junk`;
-			} else if (slave.dick > 8) {
-				r += `Dick+++`;
-			} else if (slave.dick > 5) {
-				r += `Dick++`;
-			} else if (slave.dick > 4) {
-				r += `Dick+`;
-			} else if (slave.dick > 3) {
-				r += `Dick`;
-			} else if (slave.balls > 10) {
-				r += `Balls+++`;
-			} else if (slave.balls > 5) {
-				r += `Balls++`;
-			} else if (slave.balls > 4) {
-				r += `Balls+`;
-			} else if (slave.balls > 3) {
-				r += `Balls`;
-			}
-			r += `</span> `;
-		}
-		if (slave.vagina === 0) {
-			r += `<span class="lime">VV</span>`;
-		} else if ((slave.pregKnown === 1) && canWalk(slave) && (slave.clothes === "no clothing" || slave.clothes === "body oil") && (slave.shoes === "none")) {
-			r += `<span class="pink">NBP</span>`;
-		}
-		if (slave.anus === 0) {
-			r += `	<span class="lime">AV</span>`;
-		}
-		r += `<span class="pink">`;
-		if ((slave.vagina > 3) && (slave.anus > 3)) {
-			r += ` V++A++`;
-		} else if ((slave.vagina > 2) && (slave.anus > 2)) {
-			r += ` V+A+`;
-		} else if (slave.vagina > 3) {
-			r += ` V++`;
-		} else if (slave.vagina > 2) {
-			r += ` V+`;
-		} else if (slave.anus > 3) {
-			r += ` A++`;
-		} else if (slave.anus > 2) {
-			r += ` A+`;
-		}
-		r += `</span> `;
-	}
-
-	function long_genitals(slave) {
-		if (slave.dick > 0) {
-			r += `<span class="pink">`;
-			if (slave.balls === 0) {
-				r += `Gelded.`;
-			}
-			if ((slave.dick > 8) && (slave.balls > 8)) {
-				r += `Hyper dick & balls.`;
-			} else if ((slave.dick > 5) && (slave.balls > 5)) {
-				r += `Monster dick & balls.`;
-			} else if ((slave.dick > 4) && (slave.balls > 4)) {
-				r += `Huge dick & balls.`;
-			} else if ((slave.dick > 3) && (slave.balls > 3)) {
-				r += `Big dick & balls.`;
-			} else if (slave.dick > 8) {
-				r += `Hyper dong.`;
-			} else if (slave.dick > 5) {
-				r += `Monster dong.`;
-			} else if (slave.dick > 4) {
-				r += `Huge dick.`;
-			} else if (slave.dick > 3) {
-				r += `Big dick.`;
-			} else if (slave.balls > 8) {
-				r += `Hyper balls.`;
-			} else if (slave.balls > 5) {
-				r += `Monstrous balls.`;
-			} else if (slave.balls > 4) {
-				r += `Huge balls.`;
-			} else if (slave.balls > 3) {
-				r += `Big balls.`;
-			}
-			r += `</span> `;
-		}
-		if (slave.vagina === 0) {
-			r += `<span class="lime">Virgin.</span> `;
-		} else if ((slave.pregKnown === 1) && canWalk(slave) && (slave.clothes === "no clothing" || slave.clothes === "body oil") && (slave.shoes === "none")) {
-			r += `<span class="pink">Naked, barefoot, and pregnant.</span> `;
-		}
-		if (slave.anus === 0) {
-			r += `<span class="lime">Anal virgin.</span> `;
-		}
-		r += `<span class="pink">`;
-		if ((slave.vagina > 3) && (slave.anus > 3)) {
-			r += `Blown out holes.`;
-		} else if ((slave.vagina > 2) && (slave.anus > 2)) {
-			r += `High mileage.`;
-		} else if (slave.vagina > 3) {
-			r += `Cavernous pussy.`;
-		} else if (slave.vagina > 2) {
-			r += `Loose pussy.`;
-		} else if (slave.anus > 3) {
-			r += `Permagaped anus.`;
-		} else if (slave.anus > 2) {
-			r += `Gaping anus.`;
-		}
-		r += `</span> `;
-	}
-
-	function short_age(slave) {
-		r += `<span class="pink">`;
-		if (V.showAgeDetail === 1) {
-			r += slave.actualAge;
-		} else if (slave.actualAge >= 40) {
-			r += `40s`;
-		} else if (slave.actualAge >= 35) {
-			r += `Lt30s`;
-		} else if (slave.actualAge >= 30) {
-			r += `Ea30s`;
-		} else if (slave.actualAge >= 25) {
-			r += `Lt20s`;
-		} else if (slave.actualAge >= 20) {
-			r += `Ea20s`;
-		} else if (slave.actualAge >= 18) {
-			r += slave.actualAge;
-		}
-		if (slave.actualAge !== slave.physicalAge) {
-			r += ` w ${slave.physicalAge}y-bdy`;
-		}
-		if (slave.visualAge !== slave.physicalAge) {
-			r += ` Lks${slave.visualAge}`;
-		}
-		r += " ";
-	}
-
-	function short_face(slave) {
-		if (slave.face < -95) {
-			r += `<span class="red">Face---${V.summaryStats? `[${slave.face}]` : ''}</span>`;
-		} else if (slave.face < -40) {
-			r += `<span class="red">Face--${V.summaryStats? `[${slave.face}]` : ''}</span>`;
-		} else if (slave.face < -10) {
-			r += `<span class="red">Face-${V.summaryStats? `[${slave.face}]` : ''}</span>`;
-		} else if (slave.face <= 10) {
-			r += `Face${V.summaryStats? `[${slave.face}]` : ''}`;
-		} else if (slave.face <= 40) {
-			r += `<span class="pink">Face+${V.summaryStats? `[${slave.face}]` : ''}</span>`;
-		} else if (slave.face <= 95) {
-			r += `<span class="pink">Face++${V.summaryStats? `[${slave.face}]` : ''}</span>`;
-		} else {
-			r += `<span class="pink">Face+++${V.summaryStats? `[${slave.face}]` : ''}</span>`;
-		}
-		r += " ";
-	}
-
-	function short_eyes(slave) {
-		if (slave.eyes === -2) {
-			r += `<span class="red">Blind</span>`;
-		} else if (((slave.eyes === -1) && (slave.eyewear !== "corrective glasses") && (slave.eyewear !== "corrective contacts")) || (slave.eyewear === "blurring glasses") || (slave.eyewear === "blurring contacts")) {
-			r += `<span class="yellow">Sight-</span>`;
-		}
-		r += " ";
-	}
-
-	function short_ears(slave) {
-		if (slave.hears === -2) {
-			r += `<span class="red">Deaf</span>`;
-		} else if ((slave.hears === -1) && (slave.earwear !== "hearing aids")) {
-			r += `<span class="yellow">Hearing-</span>`;
-		}
-		r += " ";
-	}
-
-	function short_lips(slave) {
-		if (slave.lips > 95) {
-			r += `Facepussy`;
-		} else if (slave.lips > 70) {
-			r += `Lips+++${V.summaryStats? `[${slave.lips}]` : ''}`;
-		} else if (slave.lips > 40) {
-			r += `Lips++${V.summaryStats? `[${slave.lips}]` : ''}`;
-		} else if (slave.lips > 20) {
-			r += `Lips+${V.summaryStats? `[${slave.lips}]` : ''}`;
-		} else if (slave.lips > 10) {
-			r += `Lips${V.summaryStats? `[${slave.lips}]` : ''}`;
-		} else {
-			r += `<span class="red">Lips-${V.summaryStats? `[${slave.lips}]` : ''}</span>`;
-		}
-		r += " ";
-	}
-
-	function short_teeth(slave) {
-		if (slave.teeth === "crooked") {
-			r += `<span class="yellow">Cr Teeth</span>`;
-		} else if (slave.teeth === "gapped") {
-			r += `<span class="yellow">Gap</span>`;
-		} else if (slave.teeth === "cosmetic braces") {
-			r += `Cos Braces`;
-		} else if (slave.teeth === "straightening braces") {
-			r += `Braces`;
-		} else if (slave.teeth === "removable") {
-			r += `Rem Teeth`;
-		} else if (slave.teeth === "pointy") {
-			r += `Fangs`;
-		} else if (slave.teeth === "baby") {
-			r += `Baby`;
-		} else if (slave.teeth === "mixed") {
-			r += `Mixed`;
-		}
-		r += " ";
-	}
-
-	function short_muscles(slave) {
-		if (slave.muscles > 95) {
-			r += `Musc++${V.summaryStats? `[${slave.muscles}]`: ''}`;
-		} else if (slave.muscles > 50) {
-			r += `Musc+${V.summaryStats? `[${slave.muscles}]`: ''}`;
-		} else if (slave.muscles > 5) {
-			r += `Fit${V.summaryStats? `[${slave.muscles}]`: ''}`;
-		} else if (slave.muscles > -6) {
-			r += `Soft${V.summaryStats? `[${slave.muscles}]`: ''}`;
-		} else if (slave.muscles > -31) {
-			if (V.arcologies[0].FSPhysicalIdealist === "unset") {
-				r += `<span class="red">Weak</span>${V.summaryStats? `[${slave.muscles}]`: ''}`;
-			} else {
-				r += `Soft${V.summaryStats? `[${slave.muscles}]`: ''}`;
-			}
-		} else if (slave.muscles > -96) {
-			if (V.arcologies[0].FSPhysicalIdealist === "unset") {
-				r += `<span class="red">Weak+</span>${V.summaryStats? `[${slave.muscles}]`: ''}`;
-			} else {
-				r += `Soft+${V.summaryStats? `[${slave.muscles}]`: ''}`;
-			}
-		} else {
-			r += `<span class="red">Weak++</span>${V.summaryStats? `[${slave.muscles}]`: ''}`;
-		}
-		r += " ";
-	}
-
-	function short_limbs(slave) {
-		if (slave.amp !== 0) {
-			if (slave.amp === -1) {
-				r += `P-Limbs`;
-			} else if (slave.amp === -2) {
-				r += `Sex P-Limbs`;
-			} else if (slave.amp === -3) {
-				r += `Beauty P-Limbs`;
-			} else if (slave.amp === -4) {
-				r += `Combat P-Limbs`;
-			} else if (slave.amp === -5) {
-				r += `Cyber P-Limbs`;
-			} else {
-				r += `Amp`;
-			}
-		}
-		r += " ";
-		if (!canWalk(slave)) {
-			r += ` Immob `;
-		}
-		if (slave.heels === 1) {
-			r += ` Heel `;
-		}
-		r += `</span> `;
-	}
-
-	function short_voice(slave) {
-		if (slave.voice === 0) {
-			r += `<span class="pink">Mute</span>`;
-		} else {
-			if (slave.accent === 3) {
-				r += `<span class="red">Acc--</span>`;
-			} else if (slave.accent === 2) {
-				r += `Acc-`;
-			} else if (slave.accent === 4) {
-				r += `Acc--`;
-			} else if (slave.accent === 1) {
-				r += `<span class="pink">Acc</span>`;
-			}
-		}
-		r += " ";
-	}
-
-	function short_tits_ass(slave) {
-		r += `<span class="pink">`;
-		if ((slave.boobs >= 12000) && (slave.butt > 9)) {
-			r += `T&A+++`;
-		} else if ((slave.boobs > 4000) && (slave.butt > 8)) {
-			r += `T&A++`;
-		} else if ((slave.boobs > 2000) && (slave.butt > 6)) {
-			r += `T&A+`;
-		} else if ((slave.boobs > 800) && (slave.butt > 4)) {
-			r += `T&A`;
-		} else if ((slave.boobs < 500) && (slave.butt < 3) && (slave.weight <= 10) && (slave.muscles <= 30)) {
-			r += `Girlish`;
-		} else if (slave.boobs >= 12000) {
-			r += `Boobs+++`;
-		} else if (slave.boobs > 4000) {
-			r += `Boobs++`;
-		} else if (slave.boobs > 2000) {
-			r += `Boobs+`;
-		} else if (slave.boobs > 800) {
-			r += `Boobs`;
-		} else if (slave.butt > 9) {
-			r += `Ass+++`;
-		} else if (slave.butt > 8) {
-			r += `Ass++`;
-		} else if (slave.butt > 6) {
-			r += `Ass+`;
-		} else if (slave.butt > 4) {
-			r += `Ass`;
-		}
-		r += `</span> `;
-	}
-
-	function short_hips(slave) {
-		r += `<span class="red">`;
-		if (slave.hips < -1) {
-			if (slave.butt > 2 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-				r += `Disp+`;
-			}
-		} else if (slave.hips < 0) {
-			if (slave.butt > 4 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-				r += `Disp+`;
-			}
-		} else if (slave.hips > 2) {
-			if (slave.butt <= 8) {
-				r += `Disp-`;
-			}
-		} else if (slave.hips > 1) {
-			if (slave.butt <= 3 && (V.arcologies[0].FSSlimnessEnthusiast === "unset" || (slave.boobs >= 500))) {
-				r += `Disp-`;
-			}
-		} else if (slave.hips > 0) {
-			if (slave.butt > 8) {
-				if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-					r += `Disp+`;
-				}
-			} else if (slave.butt <= 2 && (V.arcologies[0].FSSlimnessEnthusiast === "unset" || (slave.boobs >= 500))) {
-				r += `Disp-`;
-			}
-		} else {
-			if (slave.butt > 6) {
-				if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-					r += `Disp+`;
-				}
-			} else if (slave.butt <= 1 && (V.arcologies[0].FSSlimnessEnthusiast === "unset" || (slave.boobs >= 500))) {
-				r += `Disp-`;
-			}
-		}
-		r += `</span> `;
-	}
-
-	function short_waist(slave) {
-		if (slave.waist > 95) {
-			r += `<span class="red">Wst---${V.summaryStats? `[${slave.waist}]` : ''}</span>`;
-		} else if (slave.waist > 40) {
-			r += `<span class="red">Wst--${V.summaryStats? `[${slave.waist}]`: ''}</span>`;
-		} else if (slave.waist > 10) {
-			r += `<span class="red">Wst-${V.summaryStats? `[${slave.waist}]` : ''}</span>`;
-		} else if (slave.waist >= -10) {
-			r += `Wst${V.summaryStats? `[${slave.waist}]`: ''}`;
-		} else if (slave.waist >= -40) {
-			r += `<span class="pink">Wst+${V.summaryStats? `[${slave.waist}]` : ''}</span>`;
-		} else if (slave.waist >= -95) {
-			r += `<span class="pink">Wst++${V.summaryStats? `[${slave.waist}]` : ''}</span>`;
-		} else {
-			r += `<span class="pink">Wst+++${V.summaryStats? `[${slave.waist}]`: ''}</span>`;
-		}
-		r += " ";
-	}
-
-	function short_implants(slave) {
-		r += `<span class="pink">`;
-		if ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.waist >= -95) && (slave.lipsImplant === 0) && (slave.faceImplant <= 5) && (slave.bellyImplant === -1)) {
-			r += `Natr`;
-		} else {
-			r += `Impl`;
-		}
-		r += " ";
-	}
-
-	function short_lactation(slave) {
-		if (slave.lactation === 1) {
-			r += `Lact`;
-		} else if (slave.lactation === 2) {
-			r += `Lact++`;
-		}
-		r += " ";
-	}
-
-	function short_mods(slave) {
-		modScore(slave);
-		if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) {
-			return;
-		} else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
-			r += `Mods++`;
-		} else if (V.modScore > 7) {
-			r += `Mods+`;
-		} else {
-			r += `Mods`;
-		}
-		if (slave.brand !== 0) {
-			r += `Br`;
-		}
-		r += " ";
-	}
-
-	function long_age(slave) {
-		r += `<span class="pink">`;
-		if (V.showAgeDetail === 1) {
-			r += `Age ${slave.actualAge}.`;
-		} else if (slave.actualAge >= 40) {
-			r += `Forties.`;
-		} else if (slave.actualAge >= 35) {
-			r += `Late thirties.`;
-		} else if (slave.actualAge >= 30) {
-			r += `Early thirties.`;
-		} else if (slave.actualAge >= 25) {
-			r += `Late twenties.`;
-		} else if (slave.actualAge >= 20) {
-			r += `Early twenties.`;
-		} else if (slave.actualAge >= 19) {
-			r += `Nineteen.`;
-		} else if (slave.actualAge >= 18) {
-			r += `Eighteen.`;
-		} else {
-			r += `Underage.`;
-		}
-		r += " ";
-		/*
-		** No NCS, then do the standard, However because of the wrinkes of Incubators, as long as visual age is greater
-		** than or equal to physical age, we do the old physical body/Looks for fresh out of the can NCS slaves.
-		*/
-		if (((slave.geneMods.NCS === 0) || (slave.visualAge >= slave.physicalAge))) {
-			if (slave.actualAge !== slave.physicalAge) {
-				r += `${slave.physicalAge} year old body. `;
-			}
-			if (slave.visualAge !== slave.physicalAge) {
-				r += `Looks ${slave.visualAge}. `;
-			}
-		} else {
-			/*
-			** Now the rub. The use of physical Age for the year old body above, basically conflicts with the changes
-			** that NCS introduces, so here to *distinguish* the changes, we use visual age with the 'year old body'
-			** and appears, for example: Slave release from incubator at age 10, Her summary would show, 'Age 0. 10
-			** year old body.' But if she's given NCS a few weeks after release, while she's still before her first
-			** birthday, it'll appear the same. But once her birthday fires, if we ran with the above code it would
-			** say: 'Age 1. 11 year old body.' -- this conflicts with the way NCS works though, because she hasn't
-			** visually aged, so our change here makes it say 'Age 1. Appears to have a 10 year old body.'
-			*/
-			r += `Appears to have a ${slave.visualAge} year old body. `;
-		}
-		if (slave.geneMods.NCS === 1) {
-			r += `(<span class="orange">NCS</span>) `;
-		}
-	}
-
-	function long_face(slave) {
-		if (slave.face < -95) {
-			r += `<span class="red">Very ugly${V.summaryStats? `[${slave.face}]`: ''}</span>`;
-		} else if (slave.face < -40) {
-			r += `<span class="red">Ugly${V.summaryStats? `[${slave.face}]`: ''}</span>`;
-		} else if (slave.face < -10) {
-			r += `<span class="red">Unattractive${V.summaryStats? `[${slave.face}]`: ''}</span>`;
-		} else if (slave.face <= 10) {
-			r += `Average${V.summaryStats? `[${slave.face}]`: ''}`;
-		} else if (slave.face <= 40) {
-			r += `<span class="pink">Attractive${V.summaryStats? `[${slave.face}]`: ''}</span>`;
-		} else if (slave.face <= 95) {
-			r += `<span class="pink">Beautiful${V.summaryStats? `[${slave.face}]`: ''}</span>`;
-		} else {
-			r += `<span class="pink">Very beautiful${V.summaryStats? `[${slave.face}]`: ''}</span>`;
-		}
-		r += ` ${slave.faceShape} face. `;
-	}
-
-	function long_eyes(slave) {
-		if (slave.eyes <= -2) {
-			r += `<span class="red">Blind.</span>`;
-		} else if (((slave.eyes === -1) && (slave.eyewear !== "corrective glasses") && (slave.eyewear !== "corrective contacts")) || (slave.eyewear === "blurring glasses") || (slave.eyewear === "blurring contacts")) {
-			r += `<span class="yellow">Nearsighted.</span>`;
-		}
-		r += " ";
-	}
-
-	function long_ears(slave) {
-		if (slave.hears <= -2) {
-			r += `<span class="red">Deaf.</span>`;
-		} else if ((slave.hears === -1) && (slave.earwear !== "hearing aids")) {
-			r += `<span class="yellow">Hard of hearing.</span>`;
-		}
-		r += " ";
-	}
-
-	function long_lips(slave) {
-		if (slave.lips > 95) {
-			r += `Facepussy${V.summaryStats? `[${slave.lips}]`: ''}.`;
-		} else if (slave.lips > 70) {
-			r += `Huge lips${V.summaryStats? `[${slave.lips}]`: ''}.`;
-		} else if (slave.lips > 40) {
-			r += `Big lips${V.summaryStats? `[${slave.lips}]`: ''}.`;
-		} else if (slave.lips > 20) {
-			r += `Pretty lips${V.summaryStats? `[${slave.lips}]`: ''}.`;
-		} else if (slave.lips > 10) {
-			r += `Normal lips${V.summaryStats? `[${slave.lips}]`: ''}.`;
-		} else {
-			r += `<span class="red">Thin lips${V.summaryStats? `[${slave.lips}]`: ''}.</span>`;
-		}
-		r += " ";
-	}
-
-	function long_teeth(slave) {
-		if (slave.teeth === "crooked") {
-			r += `<span class="yellow">Crooked teeth.</span>`;
-		} else if (slave.teeth === "gapped") {
-			r += `<span class="yellow">Tooth gap.</span>`;
-		} else if (slave.teeth === "cosmetic braces") {
-			r += `Cosmetic braces.`;
-		} else if (slave.teeth === "straightening braces") {
-			r += `Braces.`;
-		} else if (slave.teeth === "removable") {
-			r += `Removable teeth.`;
-		} else if (slave.teeth === "pointy") {
-			r += `Sharp fangs.`;
-		} else if (slave.teeth === "baby") {
-			r += `Baby teeth.`;
-		} else if (slave.teeth === "mixed") {
-			r += `Mixed teeth.`;
-		}
-		r += " ";
-	}
-
-	function long_muscles(slave) {
-		if (slave.muscles > 95) {
-			r += `Hugely muscular${V.summaryStats? `[${slave.muscles}]` : ''}.`;
-		} else if (slave.muscles > 50) {
-			r += `Muscular${V.summaryStats? `[${slave.muscles}]`: ''}.`;
-		} else if (slave.muscles > 5) {
-			r += `Fit${V.summaryStats? `[${slave.muscles}]`: ''}.`;
-		} else if (slave.muscles > -6) {
-			r += `Soft${V.summaryStats? `[${slave.muscles}]`: ''}.`;
-		} else if (slave.muscles > -31) {
-			if (V.arcologies[0].FSPhysicalIdealist === "unset") {
-				r += `<span class="red">Weak${V.summaryStats? `[${slave.muscles}]`: ''}.</span>`;
-			} else {
-				r += `Weak${V.summaryStats? `[${slave.muscles}]`: ''}.`;
-			}
-		} else if (slave.muscles > -96) {
-			if (V.arcologies[0].FSPhysicalIdealist === "unset") {
-				r += `<span class="red">Very weak${V.summaryStats? `[${slave.muscles}]`: ''}.</span>`;
-			} else {
-				r += `Very weak${V.summaryStats? `[${slave.muscles}]`: ''}.`;
-			}
-		} else {
-			r += `<span class="red">Frail${V.summaryStats? `[${slave.muscles}]`: ''}.</span>`;
-		}
-		r += " ";
-	}
-
-	function long_limbs(slave) {
-		if (slave.amp !== 0) {
-			if (slave.amp === -1) {
-				r += `Prosthetic limbs.`;
-			} else if (slave.amp === -2) {
-				r += `Sexy prosthetic limbs.`;
-			} else if (slave.amp === -3) {
-				r += `Beautiful prosthetic limbs.`;
-			} else if (slave.amp === -4) {
-				r += `Deadly prosthetic limbs.`;
-			} else if (slave.amp === -5) {
-				r += `Cyber prosthetic limbs.`;
-			} else {
-				r += `Amputee.`;
-			}
-		}
-		r += " ";
-		if (!canWalk(slave)) {
-			r += `Immobile. `;
-		}
-		if (slave.heels === 1) {
-			r += `Heeled. `;
-		}
-		r += `</span> `;
-	}
-
-	function long_voice(slave) {
-		if (slave.voice === 0) {
-			r += `<span class="pink">Mute.</span>`;
-		} else {
-			if (slave.accent === 3) {
-				r += `<span class="red">Bad accent.</span>`;
-			} else if (slave.accent === 4) {
-				r += `<span class="red">No language skills.</span>`;
-			} else if (slave.accent === 2) {
-				r += `Accent.`;
-			} else if (slave.accent === 1) {
-				r += `<span class="pink">Cute accent.</span>`;
-			}
-		}
-		r += " ";
-	}
-
-	function long_tits_ass(slave) {
-		r += `<span class="pink">`;
-		if ((slave.boobs >= 12000) && (slave.butt > 9)) {
-			r += `Hyper T&A.`;
-		} else if ((slave.boobs > 4000) && (slave.butt > 8)) {
-			r += `Enormous T&A.`;
-		} else if ((slave.boobs > 2000) && (slave.butt > 6)) {
-			r += `Huge T&A.`;
-		} else if ((slave.boobs > 800) && (slave.butt > 4)) {
-			r += `Big T&A.`;
-		} else if ((slave.boobs < 500) && (slave.butt < 3) && (slave.weight <= 10) && (slave.muscles <= 30)) {
-			r += `Girlish figure.`;
-		} else if (slave.boobs >= 12000) {
-			r += `Immobilizing tits.`;
-		} else if (slave.boobs > 4000) {
-			r += `Monstrous tits.`;
-		} else if (slave.boobs > 2000) {
-			r += `Huge tits.`;
-		} else if (slave.boobs > 800) {
-			r += `Big tits.`;
-		} else if (slave.butt > 9) {
-			r += `Hyper ass.`;
-		} else if (slave.butt > 8) {
-			r += `Titanic ass.`;
-		} else if (slave.butt > 6) {
-			r += `Huge ass.`;
-		} else if (slave.butt > 4) {
-			r += `Big ass.`;
-		}
-		r += `</span> `;
-	}
-
-	function long_hips(slave) {
-		r += `<span class="red">`;
-		if (slave.hips < -1) {
-			if (slave.butt > 2 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-				r += `Disproportionately big butt.`;
-			}
-		} else if (slave.hips < 0) {
-			if (slave.butt > 4 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-				r += `Disproportionately big butt.`;
-			}
-		} else if (slave.hips > 2) {
-			if (slave.butt <= 8) {
-				r += `Disproportionately small butt.`;
-			}
-		} else if (slave.hips > 1) {
-			if (slave.butt <= 3 && ((V.arcologies[0].FSSlimnessEnthusiast === "unset") || (slave.boobs >= 500))) {
-				r += `Disproportionately small butt.`;
-			}
-		} else if (slave.hips > 0) {
-			if (slave.butt > 8) {
-				if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-					r += `Disproportionately big butt.`;
-				}
-			} else if (slave.butt <= 2 && ((V.arcologies[0].FSSlimnessEnthusiast === "unset") || (slave.boobs >= 500))) {
-				r += `Disproportionately small butt.`;
-			}
-		} else {
-			if (slave.butt > 6) {
-				if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) {
-					r += `Disproportionately big butt.`;
-				}
-			} else if (slave.butt <= 1 && ((V.arcologies[0].FSSlimnessEnthusiast === "unset") || (slave.boobs >= 500))) {
-				r += `Disproportionately small butt.`;
-			}
-		}
-		r += `</span> `;
-	}
-
-	function long_waist(slave) {
-		if (slave.waist > 95) {
-			r += `<span class="red">Masculine waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
-		} else if (slave.waist > 40) {
-			r += `<span class="red">Ugly waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
-		} else if (slave.waist > 10) {
-			r += `<span class="red">Unattractive waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
-		} else if (slave.waist >= -10) {
-			r += `Average waist${V.summaryStats? `[${slave.waist}]`: ''}.`;
-		} else if (slave.waist >= -40) {
-			r += `<span class="pink">Feminine waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
-		} else if (slave.waist >= -95) {
-			r += `<span class="pink">Hourglass waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
-		} else {
-			r += `<span class="pink">Absurdly narrow waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
-		}
-		r += " ";
-	}
-
-	function long_implants(slave) {
-		r += `<span class="pink">`;
-		if ((slave.boobsImplant !== 0) || (slave.buttImplant !== 0) || (slave.lipsImplant !== 0) || (slave.bellyImplant !== -1)) {
-			r += `Implants.`;
-		} else if ((slave.faceImplant >= 30) || (slave.waist < -95)) {
-			r += `Surgery enhanced.`;
-		} else {
-			r += `All natural.`;
-		}
-		r += " ";
-	}
-
-	function long_lactation(slave) {
-		if (slave.lactation === 1) {
-			r += `Lactating naturally.`;
-		} else if (slave.lactation === 2) {
-			r += `Heavy lactation.`;
-		}
-		r += " ";
-	}
-
-	function long_mods(slave) {
-		modScore(slave);
-		if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) {
-			return;
-		} else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
-			r += `Extensive body mods.`;
-		} else if (V.modScore > 7) {
-			r += `Noticeable body mods.`;
-		} else {
-			r += `Light body mods.`;
-		}
-		r += " ";
-	}
-
-	function short_intelligence(slave) {
-		var intelligence = slave.intelligence + slave.intelligenceImplant;
-		if (slave.fetish === "mindbroken") {
-			return;
-		} else if (slave.intelligenceImplant >= 30) {
-			if (intelligence >= 130) {
-				r += `<span class="deepskyblue">I++++(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 95) {
-				r += `<span class="deepskyblue">I+++(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 50) {
-				r += `<span class="deepskyblue">I++(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 15) {
-				r += `<span class="deepskyblue">I+(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence >= -15) {
-				r += `I(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}`;
-			} else if (intelligence >= -50) {
-				r += `<span class="orangered">I-(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence >= -95) {
-				r += `<span class="orangered">I--(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else {
-				r += `<span class="orangered">I---(e+)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			}
-		} else if (slave.intelligenceImplant >= 15) {
-			if (intelligence > 95) {
-				r += `<span class="deepskyblue">I+++(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 50) {
-				r += `<span class="deepskyblue">I++(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 15) {
-				r += `<span class="deepskyblue">I+(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence >= -15) {
-				r += `I(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}`;
-			} else if (intelligence >= -50) {
-				r += `<span class="orangered">I-(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence >= -95) {
-				r += `<span class="orangered">I--(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else {
-				r += `<span class="orangered">I---(e)${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			}
-		} else {
-			if (intelligence > 95) {
-				r += `<span class="deepskyblue">I+++${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 50) {
-				r += `<span class="deepskyblue">I++${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence > 15) {
-				r += `<span class="deepskyblue">I+${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence >= -15) {
-				r += `I${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}`;
-			} else if (intelligence >= -50) {
-				r += `<span class="orangered">I-${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else if (intelligence >= -95) {
-				r += `<span class="orangered">I--${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			} else {
-				r += `<span class="orangered">I---${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}</span>`;
-			}
-		}
-		r += " ";
-	}
-
-	function short_sex_skills(slave) {
-		let _SSkills = slave.analSkill + slave.oralSkill;
-		r += `<span class="aquamarine">`;
-		if (((_SSkills + slave.whoreSkill + slave.entertainSkill) >= 400) && ((slave.vagina < 0) || (slave.vaginalSkill >= 100))) {
-			r += `MSS`;
-		} else {
-			_SSkills += slave.vaginalSkill;
-			_SSkills = Math.trunc(_SSkills);
-			if (_SSkills > 180) {
-				r += `S++`;
-			} else if ((_SSkills > 120) && (slave.vagina < 0)) {
-				r += `Sh++`;
-			} else if (_SSkills > 90) {
-				r += `S+`;
-			} else if (_SSkills > 30) {
-				r += `S`;
-			} else {
-				r += `S-`;
-			}
-			if (V.summaryStats) {
-				r += `[${_SSkills}] `;
-			}
-			r += " ";
-			if (slave.whoreSkill >= 100) {
-				r += `W+++`;
-			} else if (slave.whoreSkill > 60) {
-				r += `W++`;
-			} else if (slave.whoreSkill > 30) {
-				r += `W+`;
-			} else if (slave.whoreSkill > 10) {
-				r += `W`;
-			}
-			if (slave.whoreSkill > 10) {
-				if (V.summaryStats) {
-					r += `[${slave.whoreSkill}] `;
-				}
-			}
-			r += " ";
-			if (slave.entertainSkill >= 100) {
-				r += `E+++`;
-			} else if (slave.entertainSkill > 60) {
-				r += `E++`;
-			} else if (slave.entertainSkill > 30) {
-				r += `E+`;
-			} else if (slave.entertainSkill > 10) {
-				r += `E`;
-			}
-			if (slave.entertainSkill > 10) {
-				if (V.summaryStats) {
-					r += `[${slave.entertainSkill}] `;
-				}
-			}
-		}
-		r += " ";
-	}
-
-	function short_prestige(slave) {
-		if (slave.prestige > 0) {
-			r += `<span class="green">`;
-			if (slave.prestige > 2) {
-				r += `Prest++`;
-			} else if (slave.prestige === 2) {
-				r += `Prest+`;
-			} else if (slave.prestige === 1) {
-				r += `Prest`;
-			}
-			r += `</span> `;
-		}
-	}
-
-	function short_porn_prestige(slave) {
-		if (slave.pornPrestige > 0) {
-			r += `<span class="green">`;
-			if (slave.pornPrestige > 2) {
-				r += `PPrest++`;
-			} else if (slave.pornPrestige === 2) {
-				r += `PPrest+`;
-			} else if (slave.pornPrestige === 1) {
-				r += `PPrest`;
-			}
-			r += `</span> `;
-		}
-	}
-
-	function long_intelligence(slave) {
-		var intelligence = slave.intelligence + slave.intelligenceImplant;
-		if (slave.fetish === "mindbroken") {
-			return;
-		} else if (slave.intelligenceImplant >= 30) {
-			if (intelligence >= 130) {
-				r += `<span class="deepskyblue">Genius${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 95) {
-				r += `<span class="deepskyblue">Brilliant, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 50) {
-				r += `<span class="deepskyblue">Very smart, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 15) {
-				r += `<span class="deepskyblue">Smart, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence >= -15) {
-				r += `Average intelligence, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.`;
-			} else if (intelligence >= -50) {
-				r += `<span class="orangered">Slow, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence >= -95) {
-				r += `<span class="orangered">Very slow, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else {
-				r += `<span class="orangered">Moronic, well educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			}
-		} else if (slave.intelligenceImplant >= 15) {
-			if (intelligence > 95) {
-				r += `<span class="deepskyblue">Brilliant, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 50) {
-				r += `<span class="deepskyblue">Very smart, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 15) {
-				r += `<span class="deepskyblue">Smart, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence >= -15) {
-				r += `Average intelligence, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.`;
-			} else if (intelligence >= -50) {
-				r += `<span class="orangered">Slow, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence >= -95) {
-				r += `<span class="orangered">Very slow, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else {
-				r += `<span class="orangered">Moronic, educated${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			}
-		} else {
-			if (intelligence > 95) {
-				r += `<span class="deepskyblue">Brilliant${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 50) {
-				r += `<span class="deepskyblue">Very smart${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence > 15) {
-				r += `<span class="deepskyblue">Smart${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence >= -15) {
-				r += `Average intelligence${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.`;
-			} else if (intelligence >= -50) {
-				r += `<span class="orangered">Slow${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else if (intelligence >= -95) {
-				r += `<span class="orangered">Very slow${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			} else {
-				r += `<span class="orangered">Moronic${V.summaryStats ? `[${slave.intelligence+slave.intelligenceImplant}]` : ''}.</span>`;
-			}
-		}
-		r += " ";
-	}
-
-	function long_sex_skills(slave) {
-		let _SSkills = (slave.analSkill + slave.oralSkill);
-		r += `<span class="aquamarine">`;
-		if (((_SSkills + slave.whoreSkill + slave.entertainSkill) >= 400) && ((slave.vagina < 0) || (slave.vaginalSkill >= 100))) {
-			r += `Masterful Sex Slave. `;
-		} else {
-			_SSkills += slave.vaginalSkill;
-			if (_SSkills > 180) {
-				r += `Sex master${V.summaryStats? `[${Math.trunc(_SSkills)}]`: ''}.`;
-			} else if ((_SSkills > 120) && (slave.vagina < 0)) {
-				r += `Masterful shemale${V.summaryStats? `[${Math.trunc(_SSkills)}]`: ''}.`;
-			} else if (_SSkills > 90) {
-				r += `Sexual expert${V.summaryStats? `[${Math.trunc(_SSkills)}]`: ''}.`;
-			} else if (_SSkills > 30) {
-				r += `Sexually skilled${V.summaryStats? `[${Math.trunc(_SSkills)}]` : ''}.`;
-			} else {
-				r += `Sexually unskilled${V.summaryStats? `[${Math.trunc(_SSkills)}]` : ''}.`;
-			}
-			r += " ";
-			if (slave.whoreSkill >= 100) {
-				r += `Masterful whore${V.summaryStats? `[${slave.whoreSkill}]`: ''}.`;
-			} else if (slave.whoreSkill >= 60) {
-				r += `Expert whore${V.summaryStats? `[${slave.whoreSkill}]`: ''}.`;
-			} else if (slave.whoreSkill >= 30) {
-				r += `Skilled whore${V.summaryStats? `[${slave.whoreSkill}]`: ''}.`;
-			} else if (slave.whoreSkill >= 10) {
-				r += `Basic whore${V.summaryStats? `[${slave.whoreSkill}]`: ''}.`;
-			}
-			r += " ";
-			if (slave.entertainSkill >= 100) {
-				r += `Masterful entertainer${V.summaryStats? `[${slave.entertainSkill}]`: ''}.`;
-			} else if (slave.entertainSkill >= 60) {
-				r += `Expert entertainer${V.summaryStats? `[${slave.entertainSkill}]`: ''}.`;
-			} else if (slave.entertainSkill >= 30) {
-				r += `Skilled entertainer${V.summaryStats? `[${slave.entertainSkill}]`: ''}.`;
-			} else if (slave.entertainSkill >= 10) {
-				r += `Basic entertainer${V.summaryStats? `[${slave.entertainSkill}]`: ''}.`;
-			}
-			r += " ";
-		}
-	}
-
-	function long_prestige(slave) {
-		if (slave.prestige > 0) {
-			r += `<span class="green">`;
-			if (slave.prestige > 2) {
-				r += `Extremely prestigious.`;
-			} else if (slave.prestige === 2) {
-				r += `Very prestigious.`;
-			} else if (slave.prestige === 1) {
-				r += `Prestigious.`;
-			}
-			r += `</span> `;
-		}
-	}
-
-	function long_porn_prestige(slave) {
-		if (slave.pornPrestige > 0) {
-			r += `<span class="green">`;
-			if (slave.pornPrestige > 2) {
-				r += `Porn star.`;
-			} else if (slave.pornPrestige === 2) {
-				r += `Porn slut.`;
-			} else if (slave.pornPrestige === 1) {
-				r += `Porn amateur.`;
-			}
-			r += `</span> `;
-		}
-	}
-
-	function short_fetish(slave) {
-		r += `<span class="lightcoral">`;
-		switch (slave.fetish) {
-			case "submissive":
-				if (slave.fetishStrength > 95) {
-					r += `Sub++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Sub+`;
-				} else {
-					r += `Sub`;
-				}
-				break;
-			case "cumslut":
-				if (slave.fetishStrength > 95) {
-					r += `Oral++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Oral+`;
-				} else {
-					r += `Oral`;
-				}
-				break;
-			case "humiliation":
-				if (slave.fetishStrength > 95) {
-					r += `Humil++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Humil+`;
-				} else {
-					r += `Humil`;
-				}
-				break;
-			case "buttslut":
-				if (slave.fetishStrength > 95) {
-					r += `Anal++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Anal+`;
-				} else {
-					r += `Anal`;
-				}
-				break;
-			case "boobs":
-				if (slave.fetishStrength > 95) {
-					r += `Boobs++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Boobs+`;
-				} else {
-					r += `Boobs`;
-				}
-				break;
-			case "sadist":
-				if (slave.fetishStrength > 95) {
-					r += `Sadist++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Sadist+`;
-				} else {
-					r += `Sadist`;
-				}
-				break;
-			case "masochist":
-				if (slave.fetishStrength > 95) {
-					r += `Pain++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Pain+`;
-				} else {
-					r += `Pain`;
-				}
-				break;
-			case "dom":
-				if (slave.fetishStrength > 95) {
-					r += `Dom++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Dom+`;
-				} else {
-					r += `Dom`;
-				}
-				break;
-			case "pregnancy":
-				if (slave.fetishStrength > 95) {
-					r += `Preg++`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Preg+`;
-				} else {
-					r += `Preg`;
-				}
-				break;
-			default:
-				r += `Vanilla`;
-				break;
-		}
-		if (V.summaryStats) {
-			r += `[${slave.fetishStrength}]`;
-		}
-		r += `</span> `;
-	}
-
-	function short_attraction(slave) {
-		if (slave.attrXY <= 5) {
-			r += `<span class="red">XY---${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
-		} else if (slave.attrXY <= 15) {
-			r += `<span class="red">XY--${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
-		} else if (slave.attrXY <= 35) {
-			r += `<span class="red">XY-${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
-		} else if (slave.attrXY <= 65) {
-			r += `XY${V.summaryStats? `[${slave.attrXY}]`: ''}`;
-		} else if (slave.attrXY <= 85) {
-			r += `<span class="green">XY+${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
-		} else if (slave.attrXY <= 95) {
-			r += `<span class="green">XY++${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
-		} else if (slave.attrXX > 95) {
-			if (slave.energy <= 95) {
-				r += `<span class="green">Omni!</span>`;
-			} else {
-				r += `<span class="green">Omni+Nympho!!</span>`;
-			}
-		} else {
-			r += `<span class="green">XY+++${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
-		}
-		r += " ";
-		if (slave.attrXX <= 5) {
-			r += `<span class="red">XX---${V.summaryStats? `[${slave.attrXX}]`: ''}</span>`;
-		} else if (slave.attrXX <= 15) {
-			r += `<span class="red">XX--${V.summaryStats? `[${slave.attrXX}]`: ''}</span>`;
-		} else if (slave.attrXX <= 35) {
-			r += `<span class="red">XX-${V.summaryStats? `[${slave.attrXX}]`: ''}</span>`;
-		} else if (slave.attrXX <= 65) {
-			r += `XX${V.summaryStats? `[${slave.attrXX}]`: ''}`;
-		} else if (slave.attrXX <= 85) {
-			r += `<span class="green">XX+${V.summaryStats? `[${slave.attrXX}]`: ''}</span>`;
-		} else if (slave.attrXX <= 95) {
-			r += `<span class="green">XX++${V.summaryStats? `[${slave.attrXX}]`: ''}</span>`;
-		} else if (slave.attrXY <= 95) {
-			r += `<span class="green">XX+++${V.summaryStats? `[${slave.attrXX}]`: ''}</span>`;
-		}
-		r += " ";
-		if (slave.energy > 95) {
-			if ((slave.attrXY <= 95) || (slave.attrXX <= 95)) {
-				r += `<span class="green">Nympho!</span>`;
-			}
-		} else if (slave.energy > 80) {
-			r += `<span class="green">SD++${V.summaryStats? `[${slave.energy}]`: ''}</span>`;
-		} else if (slave.energy > 60) {
-			r += `<span class="green">SD+${V.summaryStats? `[${slave.energy}]`: ''}</span>`;
-		} else if (slave.energy > 40) {
-			r += `<span class="yellow">SD${V.summaryStats? `[${slave.energy}]`: ''}</span>`;
-		} else if (slave.energy > 20) {
-			r += `<span class="red">SD-${V.summaryStats? `[${slave.energy}]`: ''}</span>`;
-		} else {
-			r += `<span class="red">SD--${V.summaryStats? `[${slave.energy}]`: ''}</span>`;
-		}
-		r += " ";
-	}
-
-	function short_smart_fetish(slave) {
-		if (slave.fetishKnown === 1) {
-			if (slave.clitSetting === "off") {
-				r += `SP-`;
-			} else if (((slave.fetish !== "submissive") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "submissive")) {
-				r += `SP:sub`;
-			} else if (((slave.fetish !== "cumslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "oral")) {
-				r += `SP:oral`;
-			} else if (((slave.fetish !== "humiliation") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "humiliation")) {
-				r += `SP:humil`;
-			} else if (((slave.fetish !== "buttslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "anal")) {
-				r += `SP:anal`;
-			} else if (((slave.fetish !== "boobs") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "boobs")) {
-				r += `SP:boobs`;
-			} else if (((slave.fetish !== "sadist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "sadist")) {
-				r += `SP:sade`;
-			} else if (((slave.fetish !== "masochist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "masochist")) {
-				r += `SP:pain`;
-			} else if (((slave.fetish !== "dom") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "dom")) {
-				r += `SP:dom`;
-			} else if (((slave.fetish !== "pregnancy") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "pregnancy")) {
-				r += `SP:preg`;
-			} else if (((slave.fetish !== "none") && (slave.clitSetting === "vanilla"))) {
-				r += `SP:vanilla`;
-			} else if ((slave.energy <= 95) && (slave.clitSetting === "all")) {
-				r += `SP:all`;
-			} else if ((slave.energy > 5) && (slave.clitSetting === "none")) {
-				r += `SP:none`;
-			} else if (!["women", "men", "anti-women", "anti-men"].includes(slave.clitSetting)) {
-				r += `SP:monitoring`;
-			}
-		} else {
-			switch (slave.clitSetting) {
-				case "off":
-					r += `SP-`;
-					break;
-				case "submissive":
-					r += `SP:sub`;
-					break;
-				case "lesbian":
-					r += `SP:les`;
-					break;
-				case "oral":
-					r += `SP:oral`;
-					break;
-				case "humiliation":
-					r += `SP:humil`;
-					break;
-				case "anal":
-					r += `SP:anal`;
-					break;
-				case "boobs":
-					r += `SP:boobs`;
-					break;
-				case "sadist":
-					r += `SP:sade`;
-					break;
-				case "masochist":
-					r += `SP:pain`;
-					break;
-				case "dom":
-					r += `SP:dom`;
-					break;
-				case "pregnancy":
-					r += `SP:pregnancy`;
-					break;
-				case "vanilla":
-					r += `SP:vanilla`;
-					break;
-				case "all":
-					r += `SP:all`;
-					break;
-				case "none":
-					r += `SP:none`;
-					break;
-			}
-		}
-		r += " ";
-	}
-
-	function short_smart_attraction(slave) {
-		if (slave.attrKnown === 1) {
-			if (slave.clitSetting === "women") {
-				if (slave.attrXX < 95) {
-					r += `SP:women`;
-				} else {
-					r += `SP:monitoring`;
-				}
-			} else if (slave.clitSetting === "men") {
-				if (slave.attrXY < 95) {
-					r += `SP:men`;
-				} else {
-					r += `SP:monitoring`;
-				}
-			} else if (slave.clitSetting === "anti-women") {
-				if (slave.attrXX > 0) {
-					r += `SP:anti-women`;
-				} else {
-					r += `SP:monitoring`;
-				}
-			} else if (slave.clitSetting === "anti-men") {
-				if (slave.attrXY > 0) {
-					r += `SP:anti-men`;
-				} else {
-					r += `SP:monitoring`;
-				}
-			}
-		} else {
-			if (slave.clitSetting === "women") {
-				r += `SP:women`;
-			} else if (slave.clitSetting === "men") {
-				r += `SP:men`;
-			} else if (slave.clitSetting === "anti-women") {
-				r += `SP:anti-women`;
-			} else if (slave.clitSetting === "anti-men") {
-				r += `SP:anti-men`;
-			}
-		}
-		r += " ";
-	}
-
-	function short_behavior_flaw(slave) {
-		r += `<span class="red">`;
-		switch (slave.behavioralFlaw) {
-			case "arrogant":
-				r += `Arrog`;
-				break;
-			case "bitchy":
-				r += `Bitchy`;
-				break;
-			case "odd":
-				r += `Odd`;
-				break;
-			case "hates men":
-				r += `Men-`;
-				break;
-			case "hates women":
-				r += `Women-`;
-				break;
-			case "gluttonous":
-				r += `Glut`;
-				break;
-			case "anorexic":
-				r += `Ano`;
-				break;
-			case "devout":
-				r += `Dev`;
-				break;
-			case "liberated":
-				r += `Lib`;
-				break;
-			default:
-				slave.behavioralFlaw = "none";
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function short_sex_flaw(slave) {
-		switch (slave.sexualFlaw) {
-			case "hates oral":
-				r += `<span class="red">Oral-</span>`;
-				break;
-			case "hates anal":
-				r += `<span class="red">Anal-</span>`;
-				break;
-			case "hates penetration":
-				r += `<span class="red">Fuck-</span>`;
-				break;
-			case "shamefast":
-				r += `<span class="red">Shame</span>`;
-				break;
-			case "idealistic":
-				r += `<span class="red">Ideal</span>`;
-				break;
-			case "repressed":
-				r += `<span class="red">Repre</span>`;
-				break;
-			case "apathetic":
-				r += `<span class="red">Apath</span>`;
-				break;
-			case "crude":
-				r += `<span class="red">Crude</span>`;
-				break;
-			case "judgemental":
-				r += `<span class="red">Judge</span>`;
-				break;
-			case "cum addict":
-				r += `<span class="yellow">CumAdd</span>`;
-				break;
-			case "anal addict":
-				r += `<span class="yellow">AnalAdd</span>`;
-				break;
-			case "attention whore":
-				r += `<span class="yellow">Attention</span>`;
-				break;
-			case "breast growth":
-				r += `<span class="yellow">BoobObsess</span>`;
-				break;
-			case "abusive":
-				r += `<span class="yellow">Abusive</span>`;
-				break;
-			case "malicious":
-				r += `<span class="yellow">Malice</span>`;
-				break;
-			case "self hating":
-				r += `<span class="yellow">SelfHatr</span>`;
-				break;
-			case "neglectful":
-				r += `<span class="yellow">SelfNeglect</span>`;
-				break;
-			case "breeder":
-				r += `<span class="yellow">BreedObsess</span>`;
-				break;
-			default:
-				slave.sexualFlaw = "none";
-				break;
-		}
-		r += " ";
-	}
-
-	function short_behavior_quirk(slave) {
-		r += `<span class="green">`;
-		switch (slave.behavioralQuirk) {
-			case "confident":
-				r += `Confid`;
-				break;
-			case "cutting":
-				r += `Cutting`;
-				break;
-			case "funny":
-				r += `Funny`;
-				break;
-			case "fitness":
-				r += `Fit`;
-				break;
-			case "adores women":
-				r += `Women+`;
-				break;
-			case "adores men":
-				r += `Men+`;
-				break;
-			case "insecure":
-				r += `Insec`;
-				break;
-			case "sinful":
-				r += `Sinf`;
-				break;
-			case "advocate":
-				r += `Advoc`;
-				break;
-			default:
-				slave.behavioralQuirk = "none";
-				break;
-		}
-		r += " ";
-	}
-
-	function short_sex_quirk(slave) {
-		switch (slave.sexualQuirk) {
-			case "gagfuck queen":
-				r += `Gagfuck`;
-				break;
-			case "painal queen":
-				r += `Painal`;
-				break;
-			case "strugglefuck queen":
-				r += `Struggle`;
-				break;
-			case "tease":
-				r += `Tease`;
-				break;
-			case "romantic":
-				r += `Romantic`;
-				break;
-			case "perverted":
-				r += `Perverted`;
-				break;
-			case "caring":
-				r += `Caring`;
-				break;
-			case "unflinching":
-				r += `Unflinch`;
-				break;
-			case "size queen":
-				r += `SizeQ`;
-				break;
-			default:
-				slave.sexualQuirk = "none";
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function long_fetish(slave) {
-		r += `<span class="lightcoral">`;
-		switch (slave.fetish) {
-			case "submissive":
-				if (slave.fetishStrength > 95) {
-					r += `Complete submissive${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Submissive${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Submissive tendencies${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "cumslut":
-				if (slave.fetishStrength > 95) {
-					r += `Cumslut${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Oral fixation${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Prefers oral${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "humiliation":
-				if (slave.fetishStrength > 95) {
-					r += `Humiliation slut${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Exhibitionist${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Interest in humiliation${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "buttslut":
-				if (slave.fetishStrength > 95) {
-					r += `Buttslut${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Anal fixation${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Prefers anal${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "boobs":
-				if (slave.fetishStrength > 95) {
-					r += `Boobslut${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Breast fixation${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Loves boobs${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "sadist":
-				if (slave.fetishStrength > 95) {
-					r += `Complete sadist${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Sadist${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Sadistic tendencies${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "masochist":
-				if (slave.fetishStrength > 95) {
-					r += `Complete masochist${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Masochist${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Masochistic tendencies${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "dom":
-				if (slave.fetishStrength > 95) {
-					r += `Complete dom${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Dominant${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Dominant tendencies${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			case "pregnancy":
-				if (slave.fetishStrength > 95) {
-					r += `Pregnancy fetish${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else if (slave.fetishStrength > 60) {
-					r += `Pregnancy kink${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				} else {
-					r += `Interest in impregnation${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				}
-				break;
-			default:
-				r += `Sexually vanilla${V.summaryStats? `[${slave.fetishStrength}]` : ''}.`;
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function long_attraction(slave) {
-		if (slave.attrXY <= 5) {
-			r += `<span class="red">Disgusted by men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
-		} else if (slave.attrXY <= 15) {
-			r += `<span class="red">Turned off by men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
-		} else if (slave.attrXY <= 35) {
-			r += `<span class="red">Not attracted to men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
-		} else if (slave.attrXY <= 65) {
-			r += `Indifferent to men${V.summaryStats? `[${slave.attrXY}]` : ''}, `;
-		} else if (slave.attrXY <= 85) {
-			r += `<span class="green">Attracted to men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
-		} else if (slave.attrXY <= 95) {
-			r += `<span class="green">Aroused by men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
-		} else if (slave.attrXX > 95) {
-			if (slave.energy <= 95) {
-				r += `<span class="green">Omnisexual!</span> `;
-			} else {
-				r += `<span class="green">Omnisexual nymphomaniac!</span> `;
-			}
-		} else {
-			r += `<span class="green">Passionate about men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
-		}
-		if (slave.attrXX <= 5) {
-			r += `<span class="red">disgusted by women${V.summaryStats? `[${slave.attrXX}]` : ''}.</span> `;
-		} else if (slave.attrXX <= 15) {
-			r += `<span class="red">turned off by women${V.summaryStats? `[${slave.attrXX}]` : ''}.</span> `;
-		} else if (slave.attrXX <= 35) {
-			r += `<span class="red">not attracted to women${V.summaryStats? `[${slave.attrXX}]` : ''}.</span> `;
-		} else if (slave.attrXX <= 65) {
-			r += `indifferent to women${V.summaryStats? `[${slave.attrXX}]` : ''}. `;
-		} else if (slave.attrXX <= 85) {
-			r += `<span class="green">attracted to women${V.summaryStats? `[${slave.attrXX}]` : ''}.</span> `;
-		} else if (slave.attrXX <= 95) {
-			r += `<span class="green">aroused by women${V.summaryStats? `[${slave.attrXX}]` : ''}.</span> `;
-		} else if (slave.attrXY <= 95) {
-			r += `<span class="green">passionate about women${V.summaryStats? `[${slave.attrXX}]` : ''}.</span> `;
-		}
-		if (slave.energy > 95) {
-			if ((slave.attrXY <= 95) || (slave.attrXX <= 95)) {
-				r += `<span class="green">Nymphomaniac!</span>`;
-			}
-		} else if (slave.energy > 80) {
-			r += `<span class="green">Powerful sex drive${V.summaryStats? `[${slave.energy}]` : ''}.</span>`;
-		} else if (slave.energy > 60) {
-			r += `<span class="green">Good sex drive${V.summaryStats? `[${slave.energy}]` : ''}.</span>`;
-		} else if (slave.energy > 40) {
-			r += `<span class="yellow">Average sex drive${V.summaryStats? `[${slave.energy}]` : ''}.</span>`;
-		} else if (slave.energy > 20) {
-			r += `<span class="red">Poor sex drive${V.summaryStats? `[${slave.energy}]` : ''}.</span>`;
-		} else {
-			r += `<span class="red">No sex drive${V.summaryStats? `[${slave.energy}]` : ''}.</span>`;
-		}
-		r += " ";
-	}
-
-	function long_smart_fetish(slave) {
-		if (slave.fetishKnown === 1) {
-			if (slave.clitSetting === "off") {
-				r += `SP off.`;
-			} else if (((slave.fetish !== "submissive") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "submissive")) {
-				r += `SP: submissive.`;
-			} else if (((slave.fetish !== "cumslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "oral")) {
-				r += `SP: oral.`;
-			} else if (((slave.fetish !== "humiliation") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "humiliation")) {
-				r += `SP: humiliation.`;
-			} else if (((slave.fetish !== "buttslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "anal")) {
-				r += `SP: anal.`;
-			} else if (((slave.fetish !== "boobs") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "boobs")) {
-				r += `SP: breasts.`;
-			} else if (((slave.fetish !== "sadist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "sadist")) {
-				r += `SP: sadism.`;
-			} else if (((slave.fetish !== "masochist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "masochist")) {
-				r += `SP: masochism.`;
-			} else if (((slave.fetish !== "dom") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "dom")) {
-				r += `SP: dominance.`;
-			} else if (((slave.fetish !== "pregnancy") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "pregnancy")) {
-				r += `SP: pregnancy.`;
-			} else if ((slave.fetish !== "none") && (slave.clitSetting === "vanilla")) {
-				r += `SP: vanilla.`;
-			} else if ((slave.energy <= 95) && (slave.clitSetting === "all")) {
-				r += `SP: all.`;
-			} else if ((slave.energy > 5) && (slave.clitSetting === "none")) {
-				r += `SP: none.`;
-			} else if (!["women", "men", "anti-women", "anti-men"].includes(slave.clitSetting)) {
-				r += `SP: monitoring.`;
-			}
-		} else {
-			switch (slave.clitSetting) {
-				case "off":
-					r += `SP off.`;
-					break;
-				case "submissive":
-					r += `SP: submissive.`;
-					break;
-				case "oral":
-					r += `SP: oral.`;
-					break;
-				case "humiliation":
-					r += `SP: humiliation.`;
-					break;
-				case "anal":
-					r += `SP: anal.`;
-					break;
-				case "boobs":
-					r += `SP: breasts.`;
-					break;
-				case "sadist":
-					r += `SP: sadism.`;
-					break;
-				case "masochist":
-					r += `SP: masochism.`;
-					break;
-				case "dom":
-					r += `SP: dominance.`;
-					break;
-				case "pregnancy":
-					r += `SP: pregnancy.`;
-					break;
-				case "vanilla":
-					r += `SP: vanilla.`;
-					break;
-				case "all":
-					r += `SP: all.`;
-					break;
-				case "none":
-					r += `SP: none.`;
-					break;
-			}
-		}
-		r += " ";
-	}
-
-	function long_smart_attraction(slave) {
-		if (slave.attrKnown === 1) {
-			if ((slave.attrXX < 100) && (slave.clitSetting === "women")) {
-				r += `SP: women.`;
-			} else if ((slave.attrXY < 100) && (slave.clitSetting === "men")) {
-				r += `SP: men.`;
-			}
-		} else {
-			if (slave.clitSetting === "women") {
-				r += `SP: women.`;
-			} else if (slave.clitSetting === "men") {
-				r += `SP: men.`;
-			}
-		}
-		r += " ";
-	}
-
-	function long_behavior_flaw(slave) {
-		r += `<span class="red">`;
-		switch (slave.behavioralFlaw) {
-			case "arrogant":
-				r += `Arrogant.`;
-				break;
-			case "bitchy":
-				r += `Bitchy.`;
-				break;
-			case "odd":
-				r += `Odd.`;
-				break;
-			case "hates men":
-				r += `Hates men.`;
-				break;
-			case "hates women":
-				r += `Hates women.`;
-				break;
-			case "gluttonous":
-				r += `Stress eater.`;
-				break;
-			case "anorexic":
-				r += `Anorexic.`;
-				break;
-			case "devout":
-				r += `Devoutly religious.`;
-				break;
-			case "liberated":
-				r += `Mentally liberated.`;
-				break;
-			default:
-				slave.behavioralFlaw = "none";
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function long_sex_flaw(slave) {
-		switch (slave.sexualFlaw) {
-			case "hates oral":
-				r += `<span class="red">Hates oral.</span>`;
-				break;
-			case "hates anal":
-				r += `<span class="red">Hates anal.</span>`;
-				break;
-			case "hates penetration":
-				r += `<span class="red">Hates penetration.</span>`;
-				break;
-			case "shamefast":
-				r += `<span class="red">Shamefast.</span>`;
-				break;
-			case "idealistic":
-				r += `<span class="red">Sexually idealistic.</span>`;
-				break;
-			case "repressed":
-				r += `<span class="red">Sexually repressed.</span>`;
-				break;
-			case "apathetic":
-				r += `<span class="red">Sexually apathetic.</span>`;
-				break;
-			case "crude":
-				r += `<span class="red">Sexually crude.</span>`;
-				break;
-			case "judgemental":
-				r += `<span class="red">Sexually judgemental.</span>`;
-				break;
-			case "cum addict":
-				r += `<span class="yellow">Cum addict.</span>`;
-				break;
-			case "anal addict":
-				r += `<span class="yellow">Anal addict.</span>`;
-				break;
-			case "attention whore":
-				r += `<span class="yellow">Attention whore.</span>`;
-				break;
-			case "breast growth":
-				r += `<span class="yellow">Breast obsession.</span>`;
-				break;
-			case "abusive":
-				r += `<span class="yellow">Sexually abusive.</span>`;
-				break;
-			case "malicious":
-				r += `<span class="yellow">Sexually malicious.</span>`;
-				break;
-			case "self hating":
-				r += `<span class="yellow">Self hatred.</span>`;
-				break;
-			case "neglectful":
-				r += `<span class="yellow">Self neglectful.</span>`;
-				break;
-			case "breeder":
-				r += `<span class="yellow">Breeding obsession.</span>`;
-				break;
-			default:
-				slave.sexualFlaw = "none";
-				break;
-		}
-		r += " ";
-	}
-
-	function long_behavior_quirk(slave) {
-		r += `<span class="green">`;
-		switch (slave.behavioralQuirk) {
-			case "confident":
-				r += `Confident.`;
-				break;
-			case "cutting":
-				r += `Cutting.`;
-				break;
-			case "funny":
-				r += `Funny.`;
-				break;
-			case "fitness":
-				r += `Fitness.`;
-				break;
-			case "adores women":
-				r += `Adores women.`;
-				break;
-			case "adores men":
-				r += `Adores men.`;
-				break;
-			case "insecure":
-				r += `Insecure.`;
-				break;
-			case "sinful":
-				r += `Sinful.`;
-				break;
-			case "advocate":
-				r += `Advocate.`;
-				break;
-			default:
-				slave.behavioralQuirk = "none";
-				break;
-		}
-		r += " ";
-	}
-
-	function long_sex_quirk(slave) {
-		switch (slave.sexualQuirk) {
-			case "gagfuck queen":
-				r += `Gagfuck queen.`;
-				break;
-			case "painal queen":
-				r += `Painal queen.`;
-				break;
-			case "strugglefuck queen":
-				r += `Strugglefuck queen.`;
-				break;
-			case "tease":
-				r += `Tease.`;
-				break;
-			case "romantic":
-				r += `Romantic.`;
-				break;
-			case "perverted":
-				r += `Perverted.`;
-				break;
-			case "caring":
-				r += `Caring.`;
-				break;
-			case "unflinching":
-				r += `Unflinching.`;
-				break;
-			case "size queen":
-				r += `Size queen.`;
-				break;
-			default:
-				slave.sexualQuirk = "none";
-				break;
-		}
-		r += `</span> `;
-	}
-
-	function short_extended_family(slave) {
-		let handled = 0;
-		if (slave.mother > 0) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.mother;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s daughter`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTermShort(slave)
-					r += ` & ${friendShipShort}`;
-					handled = 1;
-				}
-			}
-			r += " ";
-		} else if (slave.mother === -1) {
-			r += `Your daughter`;
-			if (slave.relationship === -3) {
-				r += ` & wife`;
-				handled = 1;
-			} else if (slave.relationship === -2) {
-				r += ` & lover`;
-				handled = 1;
-			}
-			r += " ";
-		} else if (slave.mother in V.missingTable && V.showMissingSlavesSD && V.showMissingSlaves) {
-			r += `${V.missingTable[slave.mother].fullName}'s daughter `;
-		}
-		if (slave.father > 0 && slave.father !== slave.mother) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.father;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s daughter`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID && handled !== 1) {
-					var friendShipShort = relationshipTermShort(slave)
-					r += ` & ${friendShipShort}`;
-					handled = 1;
-				}
-			}
-			r += " ";
-		} else if (slave.father === -1 && slave.mother !== -1) {
-			r += `Your daughter`;
-			if (slave.relationship === -3) {
-				r += ` & wife`;
-				handled = 1;
-			} else if (slave.relationship === -2) {
-				r += ` & lover`;
-				handled = 1;
-			}
-			r += " ";
-		} else if (slave.father in V.missingTable && slave.father !== slave.mother && V.showMissingSlavesSD && V.showMissingSlaves) {
-			r += `${V.missingTable[slave.father].fullName}'s daughter`;
-		}
-		if (slave.daughters === 1) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.mother === slave.ID;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s mother`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTermShort(slave)
-					r += ` & ${friendShipShort}`;
-					handled = 1;
-				}
-			}
-			r += " ";
-			_ssj = V.slaves.findIndex(function(s) {
-				return s.father === slave.ID;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s father`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID && handled !== 1) {
-					var friendShipShort = relationshipTermShort(slave)
-					r += ` & ${friendShipShort}`;
-					handled = 1;
-				}
-			}
-			r += " ";
-		} else if (slave.daughters > 1) {
-			r += `multiple daughters `;
-		}
-		if (slave.sisters === 1) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return areSisters(s, slave) > 0;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s sister`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTermShort(slave)
-					r += `& ${friendShipShort}`;
-					handled = 1;
-				}
-			}
-			r += " ";
-		} else if (slave.sisters > 1) {
-			r += `multiple sisters `;
-		}
-		if (slave.relationship > 0 && handled !== 1) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.relationshipTarget;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s`;
-				var friendShipShort = relationshipTermShort(slave)
-				r += ` ${friendShipShort}`;
-			}
-		} else if (slave.relationship === -3 && slave.mother !== -1 && slave.father !== -1) {
-			r += `Your wife`;
-		} else if (slave.relationship === -2) {
-			r += `E Bonded`;
-		} else if (slave.relationship === -1) {
-			r += `E Slut`;
-		}
-		r += " ";
-	}
-
-	function short_legacy_family(slave) {
-		if (slave.relation !== 0) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.relationTarget;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s ${slave.relation}`;
-			}
-		}
-		if (slave.relationship > 0) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.relationshipTarget;
-			});
-			if (_ssj !== -1) {
-				var friendship = relationshipTerm(slave)
-					if (slave.relationshipTarget !== slave.relationTarget) {
-						r += `${SlaveFullName(V.slaves[_ssj])}'s`;
-					} else {
-						r += ` &`;
-					}
-					r += ` ${friendship}`;
-			}
-		} else if (slave.relationship === -3) {
-			r += `Your wife`;
-		} else if (slave.relationship === -2) {
-			r += `E Bonded`;
-		} else if (slave.relationship === -1) {
-			r += `E Slut`;
-		}
-	}
-
-	function short_clone(slave) {
-		if (slave.clone != 0) {
-			r += ` Clone`;
-		}
-	}
-
-	function short_rival(slave) {
-		if (slave.rivalry !== 0) {
-			r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.rivalryTarget;
-			});
-			if (_ssj !== -1) {
-				r += `<span class="lightsalmon">`;
-				if (slave.rivalry <= 1) {
-					r += `Disl ${SlaveFullName(V.slaves[_ssj])}`;
-				} else if (slave.rivalry <= 2) {
-					r += `${SlaveFullName(V.slaves[_ssj])}'s rival`;
-				} else {
-					r += `Hates ${SlaveFullName(V.slaves[_ssj])}`;
-				}
-				r += `</span> `;
-			}
-		}
-	}
-
-	function long_extended_family(slave) {
-		let handled = 0;
-		if (slave.mother > 0) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.mother;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">daughter`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTerm(slave)
-					r += ` and ${friendShipShort}`;
-					handled = 1;
-				}
-				r += `.</span> `;
-			}
-		} else if (slave.mother === -1) {
-			r += `Your `;
-			if (slave.relationship === -3) {
-				r += `<span class="lightgreen">daughter and wife.</span> `;
-				handled = 1;
-			} else if (slave.relationship === -2) {
-				r += `<span class="lightgreen">daughter and lover.</span> `;
-				handled = 1;
-			} else {
-				r += `<span class="lightgreen">daughter.</span> `;
-			}
-		} else if (slave.mother in V.missingTable && V.showMissingSlavesSD && V.showMissingSlaves) {
-			r += `${V.missingTable[slave.mother].fullName}'s <span class="lightgreen">daughter.</span> `;
-		}
-		if (slave.father > 0 && slave.father !== slave.mother) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.father;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">daughter`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTerm(slave)
-					r += ` and ${friendShipShort}`;
-					handled = 1;
-				}
-				r += `.</span> `;
-			}
-		} else if (slave.father === -1 && slave.father !== slave.mother) {
-			r += `Your `;
-			if (slave.relationship === -3) {
-				r += `<span class="lightgreen">daughter and wife.</span> `;
-				handled = 1;
-			} else if (slave.relationship === -2) {
-				r += `<span class="lightgreen">daughter and lover.</span> `;
-				handled = 1;
-			} else {
-				r += `<span class="lightgreen">daughter.</span> `;
-			}
-		} else if (slave.father in V.missingTable && slave.father !== slave.mother && V.showMissingSlavesSD && V.showMissingSlaves) {
-			r += `${V.missingTable[slave.father].fullName}'s <span class="lightgreen">daughter.</span> `;
-		}
-		if (slave.daughters === 1) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.mother === slave.ID;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">mother`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTerm(slave)
-					r += ` and ${friendShipShort}`;
-					handled = 1;
-				}
-				r += `.</span> `;
-			}
-			_ssj = V.slaves.findIndex(function(s) {
-				return s.father === slave.ID;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">father`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTerm(slave)
-					r += ` and ${friendShipShort}`;
-					handled = 1;
-				}
-				r += `.</span> `;
-			}
-		} else if (slave.daughters > 1) {
-			if (slave.daughters > 10) {
-				r += `<span class="lightgreen">Has tons of daughters.</span> `;
-			} else if (slave.daughters > 5) {
-				r += `<span class="lightgreen">Has many daughters.</span> `;
-			} else {
-				r += `<span class="lightgreen">Has several daughters.</span> `;
-			}
-		}
-		if (slave.sisters === 1) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return areSisters(s, slave) > 0;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">sister`;
-				if (slave.relationshipTarget === V.slaves[_ssj].ID) {
-					var friendShipShort = relationshipTerm(slave)
-					r += ` and ${friendShipShort}`;
-					handled = 1;
-				}
-				r += `.</span> `;
-			}
-		} else if (slave.sisters > 1) {
-			if (slave.sisters > 10) {
-				r += `<span class="lightgreen">One of many sisters.</span> `;
-			} else if (slave.sisters > 5) {
-				r += `<span class="lightgreen">Has many sisters.</span> `;
-			} else {
-				r += `<span class="lightgreen">Has several sisters.</span> `;
-			}
-		}
-		if (slave.relationship > 0 && handled !== 1) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.relationshipTarget;
-			});
-			if (_ssj !== -1) {
-				var friendship = relationshipTerm(slave)
-				r += `${SlaveFullName(V.slaves[_ssj])}'s `;
-				r += `<span class="lightgreen">${friendship}.</span> `;
-			}
-		} else if (slave.relationship === -3 && slave.mother !== -1 && slave.father !== -1) {
-			r += `<span class="lightgreen">Your wife.</span> `;
-		} else if (slave.relationship === -2) {
-			r += `<span class="lightgreen">Emotionally bonded to you.</span> `;
-		} else if (slave.relationship === -1) {
-			r += `<span class="lightgreen">Emotional slut.</span> `;
-		}
-	}
-
-	function long_legacy_family(slave) {
-		if (slave.relation !== 0) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.relationTarget;
-			});
-			if (_ssj !== -1) {
-				r += `${SlaveFullName(V.slaves[_ssj])}'s `;
-				if (slave.relationshipTarget !== slave.relationTarget) {
-					r += `<span class="lightgreen">${slave.relation}</span>. `;
-				} else {
-					r += `<span class="lightgreen">${slave.relation}</span> `;
-				}
-				if (slave.relationship <= 0) {
-					r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-				}
-			}
-		}
-		if (slave.relationship > 0) {
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.relationshipTarget;
-			});
-			if (_ssj !== -1) {
-				var friendship = relationshipTerm(slave)
-				if (slave.relationshipTarget !== slave.relationTarget) {
-					r += `${SlaveFullName(V.slaves[_ssj])}'s `;
-				} else {
-					r += ` and `;
-				}
-				r += `<span class="lightgreen">${friendship}.</span> `;
-			}
-		} else if (slave.relationship === -3) {
-			r += `<span class="lightgreen">Your wife.</span> `;
-		} else if (slave.relationship === -2) {
-			r += `<span class="lightgreen">Emotionally bonded to you.</span> `;
-		} else if (slave.relationship === -1) {
-			r += `<span class="lightgreen">Emotional slut.</span> `;
-		}
-	}
-
-	function long_clone(slave) {
-		if (slave.clone != 0) {
-			r += ` <span class="skyblue">Clone of ${slave.clone}.</span>`;
-		}
-	}
-
-	function long_rival(slave) {
-		if (slave.rivalry !== 0) {
-			r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-			let _ssj = V.slaves.findIndex(function(s) {
-				return s.ID === slave.rivalryTarget;
-			});
-			if (_ssj !== -1) {
-				if (slave.rivalry <= 1) {
-					r += `<span class="lightsalmon">Dislikes</span> ${SlaveFullName(V.slaves[_ssj])}.`;
-				} else if (slave.rivalry <= 2) {
-					r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightsalmon">rival.</span>`;
-				} else {
-					r += `<span class="lightsalmon">Hates</span> ${SlaveFullName(V.slaves[_ssj])}.`;
-				}
-			}
-			r += " ";
-		}
-	}
-
-	function long_clothes(slave) {
-		switch (slave.clothes) {
-			case "attractive lingerie":
-				r += `Nice lingerie.`;
-				break;
-			case "a succubus outfit":
-				r += `Succubus outfit.`;
-				break;
-			case "a string bikini":
-				r += `String bikini.`;
-				break;
-			case "a scalemail bikini":
-				r += `Scalemail bikini.`;
-				break;
-			case "striped panties":
-				r += `Shimapan panties.`;
-				break;
-			case "a monokini":
-				r += `Monokini.`;
-				break;
-			case "an apron":
-				r += `Apron.`;
-				break;
-			case "a cybersuit":
-				r += `Cybersuit.`;
-				break;
-			case "cutoffs and a t-shirt":
-				r += `Cutoffs, t-shirt.`;
-				break;
-			case "a slutty outfit":
-				r += `Slutty outfit.`;
-				break;
-			case "uncomfortable straps":
-				r += `Leather straps.`;
-				break;
-			case "a fallen nuns habit":
-				r += `Slutty habit.`;
-				break;
-			case "a chattel habit":
-				r += `Chattel habit.`;
-				break;
-			case "a penitent nuns habit":
-				r += `Cilice.`;
-				break;
-			case "slutty jewelry":
-				r += `Bangles.`;
-				break;
-			case "attractive lingerie for a pregnant woman":
-				r += `Preggo lingerie.`;
-				break;
-			case "a maternity dress":
-				r += `Maternity dress.`;
-				break;
-			case "stretch pants and a crop-top":
-				r += `Stretch pants, crop-top.`;
-				break;
-			case "harem gauze":
-				r += `Harem outfit.`;
-				break;
-			case "a slave gown":
-				r += `Slave gown.`;
-				break;
-			case "a halter top dress":
-				r += `Halter top dress.`;
-				break;
-			case "a mini dress":
-				r += `Mini dress.`;
-				break;
-			case "a ball gown":
-				r += `Ball gown.`;
-				break;
-			case "slutty business attire":
-				r += `Slutty suit.`;
-				break;
-			case "nice business attire":
-				r += `Nice suit.`;
-				break;
-			case "a comfortable bodysuit":
-				r += `Bodysuit.`;
-				break;
-			case "a military uniform":
-				r += `Military uniform.`;
-				break;
-			case "a schutzstaffel uniform":
-				r += `Schutzstaffel uniform.`;
-				break;
-			case "a slutty schutzstaffel uniform":
-				r += `Slutty Schutzstaffel uniform.`;
-				break;
-			case "a red army uniform":
-				r += `Red Army uniform.`;
-				break;
-			case "a long qipao":
-				r += `Long Qipao.`;
-				break;
-			case "battlearmor":
-				r += `Battlearmor.`;
-				break;
-			case "a mounty outfit":
-				r += `Mounty outfit.`;
-				break;
-			case "a dirndl":
-				r += `Dirndl.`;
-				break;
-			case "lederhosen":
-				r += `Lederhosen.`;
-				break;
-			case "a biyelgee costume":
-				r += `Biyelgee costume.`;
-				break;
-			case "a leotard":
-				r += `Leotard.`;
-				break;
-			case "a bunny outfit":
-				r += `Bunny outfit.`;
-				break;
-			case "a slutty maid outfit":
-				r += `Slutty maid.`;
-				break;
-			case "a nice maid outfit":
-				r += `Nice maid.`;
-				break;
-			case "a slutty nurse outfit":
-				r += `Slutty nurse.`;
-				break;
-			case "a nice nurse outfit":
-				r += `Nice nurse.`;
-				break;
-			case "a schoolgirl outfit":
-				r += `Schoolgirl outfit.`;
-				break;
-			case "a kimono":
-				r += `Kimono.`;
-				break;
-			case "a hijab and abaya":
-				r += `Hijab and abaya.`;
-				break;
-			case "battledress":
-				r += `Battledress.`;
-				break;
-			case "a latex catsuit":
-				r += `Nice latex.`;
-				break;
-			case "restrictive latex":
-				r += `Bondage latex.`;
-				break;
-			case "conservative clothing":
-				r += `Conservative clothing.`;
-				break;
-			case "chains":
-				r += `Chains.`;
-				break;
-			case "a cheerleader outfit":
-				r += `Cheerleader.`;
-				break;
-			case "clubslut netting":
-				r += `Netting.`;
-				break;
-			case "shibari ropes":
-				r += `Shibari.`;
-				break;
-			case "Western clothing":
-				r += `Chaps.`;
-				break;
-			case "body oil":
-				r += `Body oil.`;
-				break;
-			case "a toga":
-				r += `Toga.`;
-				break;
-			case "a huipil":
-				r += `Huipil.`;
-				break;
-			case "a slutty qipao":
-				r += `Slutty qipao.`;
-				break;
-			case "spats and a tank top":
-				r += `Spats, tank top.`;
-				break;
-			case "a burkini":
-				r += `Burkini.`;
-				break;
-			case "a niqab and abaya":
-				r += `Niqab and abaya.`;
-				break;
-			case "a klan robe":
-				r += `Klan robe.`;
-				break;
-			case "a hijab and blouse":
-				r += `Hijab and blouse.`;
-				break;
-			case "a burqa":
-				r += `Burqa.`;
-				break;
-			case "kitty lingerie":
-				r += `Kitty lingerie.`;
-				break;
-			case "a tube top and thong":
-				r += `Tube top, thong.`;
-				break;
-			case "a button-up shirt and panties":
-				r += `Button-up shirt, panties.`;
-				break;
-			case "a gothic lolita dress":
-				r += `Gothic lolita dress.`;
-				break;
-			case "a hanbok":
-				r += `Hanbok.`;
-				break;
-			case "a bra":
-				r += `Nice bra.`;
-				break;
-			case "a button-up shirt":
-				r += `Nice button-up shirt.`;
-				break;
-			case "a nice pony outfit":
-				r += `Nice pony outfit.`;
-				break;
-			case "a sweater":
-				r += `Nice sweater.`;
-				break;
-			case "a tank-top":
-				r += `Nice tank-top.`;
-				break;
-			case "a thong":
-				r += `Nice thong.`;
-				break;
-			case "a tube top":
-				r += `Nice tube top.`;
-				break;
-			case "a one-piece swimsuit":
-				r += `Swimsuit.`;
-				break;
-			case "a police uniform":
-				r += `Police uniform.`;
-				break;
-			case "a striped bra":
-				r += `Striped bra.`;
-				break;
-			case "a skimpy loincloth":
-				r += `Skimpy loincloth.`;
-				break;
-			case "a slutty klan robe":
-				r += `Slutty klan robe.`;
-				break;
-			case "a slutty pony outfit":
-				r += `Slutty pony outfit.`;
-				break;
-			case "a sports bra":
-				r += `Sports bra.`;
-				break;
-			case "a sweater and panties":
-				r += `Sweater, panties.`;
-				break;
-			case "a t-shirt":
-				r += `T-shirt.`;
-				break;
-			case "a tank-top and panties":
-				r += `Tank-top, panties.`;
-				break;
-			case "a t-shirt and thong":
-				r += `Thong, t-shirt.`;
-				break;
-			case "an oversized t-shirt and boyshorts":
-				r += `Over-sized t-shirt, boy shorts.`;
-				break;
-			case "an oversized t-shirt":
-				r += `Nice over-sized t-shirt.`;
-				break;
-			case "a t-shirt and jeans":
-				r += `Blue jeans, t-shirt.`;
-				break;
-			case "boyshorts":
-				r += `Boy shorts.`;
-				break;
-			case "cutoffs":
-				r += `Jean shorts.`;
-				break;
-			case "leather pants and pasties":
-				r += `Leather pants, pasties.`;
-				break;
-			case "leather pants":
-				r += `Nice leather pants.`;
-				break;
-			case "panties":
-				r += `Nice panties.`;
-				break;
-			case "sport shorts and a t-shirt":
-				r += `Nice sport shorts, shirt.`;
-				break;
-			case "a t-shirt and panties":
-				r += `Panties, t-shirt.`;
-				break;
-			case "panties and pasties":
-				r += `Pasties, panties.`;
-				break;
-			case "striped underwear":
-				r += `Striped underwear`;
-				break;
-			case "sport shorts and a sports bra":
-				r += `Shorts, bra.`;
-				break;
-			case "jeans":
-				r += `Tight blue jeans.`;
-				break;
-			case "a sweater and cutoffs":
-				r += `Jean shorts, sweater.`;
-				break;
-			case "leather pants and a tube top":
-				r += `Leather pants, tube top.`;
-				break;
-			case "sport shorts":
-				r += `Shorts.`;
-				break;
-			default:
-				r += `Naked.`;
-				break;
-		}
-		r += " ";
-	}
-
-	function long_collar(slave) {
-		switch (slave.collar) {
-			case "uncomfortable leather":
-				r += `Leather collar.`;
-				break;
-			case "tight steel":
-				r += `Steel collar.`;
-				break;
-			case "preg biometrics":
-				r += `Pregnancy biometrics collar.`;
-				break;
-			case "cruel retirement counter":
-				r += `Cruel counter collar.`;
-				break;
-			case "shock punishment":
-				r += `Shock collar.`;
-				break;
-			case "dildo gag":
-				r += `Dildo gag.`;
-				break;
-			case "massive dildo gag":
-				r += `Throat-bulging dildo gag.`;
-				break;
-			case "neck corset":
-				r += `Neck corset.`;
-				break;
-			case "stylish leather":
-				r += `Stylish leather collar.`;
-				break;
-			case "satin choker":
-				r += `Satin choker.`;
-				break;
-			case "silk ribbon":
-				r += `Silken ribbon.`;
-				break;
-			case "heavy gold":
-				r += `Gold collar.`;
-				break;
-			case "bowtie":
-				r += `Bowtie collar.`;
-				break;
-			case "pretty jewelry":
-				r += `Pretty collar.`;
-				break;
-			case "nice retirement counter":
-				r += `Nice counter collar.`;
-				break;
-			case "bell collar":
-				r += `Bell collar.`;
-				break;
-			case "leather with cowbell":
-				r += `Cowbell collar.`;
-				break;
-			case "ancient Egyptian":
-				r += `Wesekh.`;
-				break;
-			case "ball gag":
-				r += `Ball gag.`;
-				break;
-			case "bit gag":
-				r += `Bit gag.`;
-				break;
-			case "porcelain mask":
-				r += `Porcelain mask.`;
-				break;
-		}
-		r += " ";
-	}
-
-	function long_belly(slave) {
-		switch (slave.bellyAccessory) {
-			case "shapewear":
-				r += `Shapewear.`;
-				break;
-			case "a small empathy belly":
-				r += `Small fake belly.`;
-				break;
-			case "a medium empathy belly":
-				r += `Medium fake belly.`;
-				break;
-			case "a large empathy belly":
-				r += `Large fake belly.`;
-				break;
-			case "a huge empathy belly":
-				r += `Huge fake belly.`;
-				break;
-			case "a corset":
-				r += `Corset.`;
-				break;
-			case "an extreme corset":
-				r += `Extreme corsetage.`;
-				break;
-		}
-		r += " ";
-	}
-
-	function long_legs(slave) {
-		if (slave.legAccessory === "short stockings") {
-			r += `Short stockings.`;
-		} else if (slave.legAccessory === "long stockings") {
-			r += `Long stockings.`;
-		}
-		r += " ";
-	}
-
-	function long_shoes(slave) {
-		if (slave.shoes === "heels") {
-			r += `Heels.`;
-		} else if (slave.shoes === "pumps") {
-			r += `Pumps.`;
-		} else if (slave.shoes === "extreme heels") {
-			r += `Extreme heels.`;
-		} else if (slave.shoes === "boots") {
-			r += `Boots.`;
-		} else if (slave.heels === 1) {
-			r += `<span class="yellow">Crawling.</span>`;
-		} else if (slave.shoes === "flats") {
-			r += `Flats.`;
-		}
-		r += " ";
-	}
-
-	function long_vaginal_acc(slave) {
-		switch (slave.vaginalAccessory) {
-			case "chastity belt":
-				r += `Vaginal chastity.`;
-				break;
-			case "combined chastity":
-				r += `Combined chastity.`;
-				break;
-			case "anal chastity":
-				r += `Anal chastity.`;
-				break;
-			case "dildo":
-				r += `Vaginal dildo.`;
-				break;
-			case "large dildo":
-				r += `Large vaginal dildo.`;
-				break;
-			case "huge dildo":
-				r += `Huge vaginal dildo.`;
-				break;
-			case "long dildo":
-				r += `Long vaginal dildo.`;
-				break;
-			case "long, large dildo":
-				r += `Long and large vaginal dildo.`;
-				break;
-			case "long, huge dildo":
-				r += `Long and wide vaginal dildo.`;
-				break;
-		}
-		r += " ";
-	}
-
-	function long_dick_acc(slave) {
-		if (slave.dickAccessory === "chastity") {
-			r += `Chastity cage.`;
-		} else if (slave.dickAccessory === "combined chastity") {
-			r += `Combined chastity.`;
-		} else if (slave.dickAccessory === "anal chastity") {
-			r += `Anal chastity.`;
-		}
-		r += " ";
-	}
-
-	function long_buttplug(slave) {
-		switch (slave.buttplug) {
-			case "plug":
-				r += `Buttplug.`;
-				break;
-			case "large plug":
-				r += `Large buttplug.`;
-				break;
-			case "huge plug":
-				r += `Huge buttplug.`;
-				break;
-			case "long plug":
-				r += `Long buttplug.`;
-				break;
-			case "long, large plug":
-				r += `Large, long buttplug.`;
-				break;
-			case "long, huge plug":
-				r += `Enormous buttplug.`;
-				break;
-		}
-		r += " ";
-		switch (slave.buttplugAttachment) {
-			case "tail":
-				r += `Attached tail. `;
-				break;
-			case "cat tail":
-				r += `Attached cat tail. `;
-				break;
-			case "fox tail":
-				r += `Attached fox tail. `;
-				break;
-		}
-	}
-
-	function rules_assistant(slave) {
-		if (slave.useRulesAssistant === 0) {
-			r += `<span class="lightgreen">RA-Exempt</span> `;
-		} else if (V.abbreviateRulesets === 2 && (slave.currentRules !== undefined) && (slave.currentRules.length > 0)) {
-			r += `Rules: ${V.defaultRules.filter(x => ruleApplied(slave, x)).map(x => x.name).join(", ") }`;
-		}
-	}
-
-	function origins(slave) {
-		r += `<br>`;
-		if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) {
-			r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-		}
-		r += `<span class="gray">${slave.origin}</span>`;
-	}
-
-	return SlaveSummaryUncached;
-})();
-
-/*:: Remove activeSlave JS [script]*/
-
-window.removeActiveSlave = function removeActiveSlave() {
-	"use strict";
-	const V = State.variables;
-
-	const AS_ID = V.activeSlave.ID;
-	let LENGTH = V.slaves.length;
-	const INDEX = V.slaveIndices[AS_ID];
-	let missing = false;
-
-	WombChangeID(V.PC, AS_ID, V.missingParentID);
-	if (V.PC.pregSource === V.missingParentID) {
-		missing = true;
-	}
-
-	if (V.PC.mother === AS_ID) {
-		V.PC.mother = V.missingParentID;
-		missing = true;
-	}
-	if (V.PC.father === AS_ID) {
-		V.PC.father = V.missingParentID;
-		missing = true;
-	}
-	if (V.PC.sisters > 0) {
-		if (areSisters(V.PC, V.activeSlave) > 0) {
-			V.PC.sisters--;
-		}
-	}
-	if (V.PC.daughters > 0) {
-		if (V.activeSlave.father === -1 || V.activeSlave.mother === -1) {
-			V.PC.daughters--;
-		}
-	}
-
-	if (INDEX >= 0 && INDEX < LENGTH) {
-		if (V.incubator > 0) {
-			V.tanks.forEach(child => {
-				if (AS_ID === child.mother) {
-					child.mother = V.missingParentID;
-					missing = true;
-				}
-				if (AS_ID === child.father) {
-					child.father = V.missingParentID;
-					missing = true;
-				}
-			});
-		}
-		if (V.nursery > 0) {
-			V.cribs.forEach(child => {
-				if (AS_ID === child.mother) {
-					child.mother = V.missingParentID;
-					missing = true;
-				}
-				if (AS_ID === child.father) {
-					child.father = V.missingParentID;
-					missing = true;
-				}
-			});
-		}
-		V.slaves.forEach(slave => {
-			WombChangeID(slave, AS_ID, V.missingParentID); /* This check is complex, should be done in JS now, all needed will be done here. */
-			WombChangeGeneID(slave, AS_ID, V.missingParentID);
-			if (slave.pregSource === V.missingParentID) {
-				missing = true;
-			}
-			if (V.activeSlave.daughters > 0) {
-				if (slave.mother === AS_ID) {
-					slave.mother = V.missingParentID;
-				}
-				if (slave.father === AS_ID) {
-					slave.father = V.missingParentID;
-				}
-				missing = true;
-			}
-			if (V.activeSlave.mother > 0 || V.activeSlave.father > 0) {
-				if (V.activeSlave.mother === slave.ID || V.activeSlave.father === slave.ID) {
-					slave.daughters--;
-				}
-			}
-			if (V.activeSlave.sisters > 0) {
-				if (areSisters(V.activeSlave, slave) > 0) {
-					slave.sisters--;
-				}
-			}
-			if (slave.ID === V.activeSlave.relationTarget) {
-				slave.relation = 0;
-				slave.relationTarget = 0;
-			}
-			if (slave.milkSource !== 0) {
-				if (slave.milkSource === AS_ID) {
-					slave.milkSource = 0;
-					slave.inflation = 0;
-					slave.inflationType = "none";
-					slave.inflationMethod = 0;
-				}
-			}
-			if (slave.cumSource !== 0) {
-				if (slave.cumSource === AS_ID) {
-					slave.cumSource = 0;
-					slave.inflation = 0;
-					slave.inflationType = "none";
-					slave.inflationMethod = 0;
-				}
-			}
-			if (slave.ID === V.activeSlave.relationshipTarget) {
-				slave.relationship = 0;
-				slave.relationshipTarget = 0;
-			}
-			if (slave.ID === V.activeSlave.rivalryTarget) {
-				slave.rivalry = 0;
-				slave.rivalryTarget = 0;
-			}
-			/* moved to saDevotion as a discovery event
-				if (slave.origBodyOwnerID === AS_ID) {
-				slave.origBodyOwnerID = 0;
-				}
-			*/
-		});
-
-		/* remove from Pit fighters list, if needed */
-		V.fighterIDs.delete(AS_ID);
-
-		/* remove from Coursing Association, if needed */
-		if (V.Lurcher !== 0 && V.Lurcher.ID === AS_ID) {
-			V.Lurcher = 0;
-		}
-
-		if (Array.isArray(V.personalAttention)) {
-			const _rasi = V.personalAttention.findIndex(function(s) { return s.ID === AS_ID; });
-			if (_rasi !== -1) {
-				V.personalAttention.deleteAt(_rasi);
-				if (V.personalAttention.length === 0) {
-					if (V.PC.career === "escort") {
-						V.personalAttention = "whoring";
-					} else if (V.PC.career === "servant") {
-						V.personalAttention = "upkeep";
-					} else {
-						V.personalAttention = "business";
-					}
-				}
-			}
-		}
-
-			/* Remove from facility array or leadership role, if needed */
-			removeJob(V.activeSlave, V.activeSlave.assignment);
-
-		if (V.traitor !== 0) {
-			missing = true; /* no exceptions, fetus system relies on this */
-			if (AS_ID === V.traitor.pregSource) {
-				V.traitor.pregSource = 0;
-			}
-			if (V.traitor.mother === AS_ID) {
-				V.traitor.mother = V.missingParentID;
-			}
-			if (V.traitor.father === AS_ID) {
-				V.traitor.father = V.missingParentID;
-			}
-			if (V.traitor.origBodyOwnerID === AS_ID) {
-				V.traitor.origBodyOwnerID = 0;
-			}
-		}
-		if (V.boomerangSlave !== 0) {
-			missing = true;
-			if (AS_ID === V.boomerangSlave.pregSource) {
-				V.boomerangSlave.pregSource = 0;
-			}
-			if (V.boomerangSlave.mother === AS_ID) {
-				V.boomerangSlave.mother = V.missingParentID;
-			}
-			if (V.boomerangSlave.father === AS_ID) {
-				V.boomerangSlave.father = V.missingParentID;
-			}
-			if (V.boomerangSlave.origBodyOwnerID === AS_ID) {
-				V.traitor.origBodyOwnerID = 0;
-			}
-		}
-
-		let _o;
-		for (_o = 0; _o < V.organs.length; _o++) {
-			if (V.organs[_o].ID === AS_ID) {
-				V.organs.deleteAt(_o);
-				_o--;
-			}
-		}
-		for (_o = 0; _o < V.completedOrgans.length; _o++) {
-			if (V.completedOrgans[_o].ID === AS_ID) {
-				V.completedOrgans.deleteAt(_o);
-				_o--;
-			}
-		}
-		for (_o = 0; _o < V.limbs.length; _o++) {
-			if (V.limbs[_o].ID === AS_ID) {
-				V.limbs.deleteAt(_o);
-				V.limbsCompleted--;
-				_o--;
-			}
-		}
-
-		const _geneIndex = V.genePool.findIndex(function(s) { return s.ID === AS_ID; });
-		if (_geneIndex !== -1) {
-			let keep = false;
-			if (V.traitor !== 0) {
-				if (isImpregnatedBy(V.traitor, V.activeSlave) || V.traitor.ID === AS_ID) { /* did we impregnate the traitor, or are we the traitor? */
-					keep = true;
-				}
-			}
-			if (V.boomerangSlave !== 0) {
-				if (isImpregnatedBy(V.boomerangSlave, V.activeSlave) || V.boomerangSlave.ID === AS_ID) { /* did we impregnate the boomerang, or are we the boomerang? */
-					keep = true;
-				}
-			}
-			if (isImpregnatedBy(V.PC, V.activeSlave)) { /* did we impregnate the PC */
-				keep = true;
-			}
-			if (!keep) { /* avoid going through this loop if possible */
-				keep = V.slaves.some(slave => {
-					/* have we impregnated a slave that is not ourself? */
-					return (slave.ID !== AS_ID && isImpregnatedBy(slave, V.activeSlave))
-				});
-			}
-			if (!keep) {
-				V.genePool.deleteAt(_geneIndex);
-			}
-		}
-		if (missing) {
-			V.missingTable[V.missingParentID] = {
-				slaveName: V.activeSlave.slaveName,
-				slaveSurname: V.activeSlave.slaveSurname,
-				fullName: SlaveFullName(V.activeSlave),
-				dick : V.activeSlave.dick,
-				vagina : V.activeSlave.vagina,
-				ID : V.missingParentID
-			};
-			if (V.traitor.ID == V.activeSlave.ID) { /* To link developing fetuses to their parent */
-				V.traitor.missingParentTag = V.missingParentID;
-			} else if (V.boomerangSlave.ID == V.activeSlave.ID) {
-				V.boomerangSlave.missingParentTag = V.missingParentID;
-			}
-			V.missingParentID--;
-		}
-
-		removeSlave(INDEX);
-		LENGTH--;
-		V.activeSlave = 0;
-	}
-};
-
-/*:: SA porn JS [script]*/
-
-/* to later be rolled into saPorn */
-
-window.getHighestPorn = function(slave) {
-
-	var max = {value: 0, type: "none"};
-
-	if(slave.pornTypeGeneral > max.value){
-		max = {value: slave.pornTypeGeneral, type: "generic"};
-	}
-	if(slave.pornTypeFuckdoll > max.value){
-		max = {value: slave.pornTypeFuckdoll, type: "fuckdoll"};
-	}
-	if(slave.pornTypeRape > max.value){
-		max = {value: slave.pornTypeRape, type: "rape"};
-	}
-	if(slave.pornTypePreggo > max.value){
-		max = {value: slave.pornTypePreggo, type: "preggo"};
-	}
-	if(slave.pornTypeBBW > max.value){
-		max = {value: slave.pornTypeBBW, type: "BBW"};
-	}
-	if(slave.pornTypeGainer > max.value){
-		max = {value: slave.pornTypeGainer, type: "weight gain"};
-	}
-	if(slave.pornTypeStud > max.value){
-		max = {value: slave.pornTypeStud, type: "big dick"};
-	}
-	if(slave.pornTypeLoli > max.value){
-		max = {value: slave.pornTypeLoli, type: "underage"};
-	}
-	if(slave.pornTypeDeepThroat > max.value){
-		max = {value: slave.pornTypeDeepThroat, type: "deepthroat"};
-	}
-	if(slave.pornTypeStruggleFuck > max.value){
-		max = {value: slave.pornTypeStruggleFuck, type: "unwilling"};
-	}
-	if(slave.pornTypePainal > max.value){
-		max = {value: slave.pornTypePainal, type: "hardcore anal"};
-	}
-	if(slave.pornTypeTease > max.value){
-		max = {value: slave.pornTypeTease, type: "softcore"};
-	}
-	if(slave.pornTypeRomantic > max.value){
-		max = {value: slave.pornTypeRomantic, type: "romantic"};
-	}
-	if(slave.pornTypePervert > max.value){
-		max = {value: slave.pornTypePervert, type: "really perverted"};
-	}
-	if(slave.pornTypeCaring > max.value){
-		max = {value: slave.pornTypeCaring, type: "voyeur"};
-	}
-	if(slave.pornTypeUnflinching > max.value){
-		max = {value: slave.pornTypeUnflinching, type: "unspeakable"};
-	}
-	if(slave.pornTypeSizeQueen > max.value){
-		max = {value: slave.pornTypeSizeQueen, type: "huge insertion"};
-	}
-	if(slave.pornTypeNeglectful > max.value){
-		max = {value: slave.pornTypeNeglectful, type: "orgasm denial"};
-	}
-	if(slave.pornTypeCumAddict > max.value){
-		max = {value: slave.pornTypeCumAddict, type: "cum addiction"};
-	}
-	if(slave.pornTypeAnalAddict > max.value){
-		max = {value: slave.pornTypeAnalAddict, type: "anal addiction"};
-	}
-	if(slave.pornTypeAttentionWhore > max.value){
-		max = {value: slave.pornTypeAttentionWhore, type: "exhibition"};
-	}
-	if(slave.pornTypeBreastGrowth > max.value){
-		max = {value: slave.pornTypeBreastGrowth, type: "breast expansion"};
-	}
-	if(slave.pornTypeAbusive > max.value){
-		max = {value: slave.pornTypeAbusive, type: "abuse"};
-	}
-	if(slave.pornTypeMalicious > max.value){
-		max = {value: slave.pornTypeMalicious, type: "sexual torture"};
-	}
-	if(slave.pornTypeSelfHating > max.value){
-		max = {value: slave.pornTypeSelfHating, type: "self hating"};
-	}
-	if(slave.pornTypeBreeder > max.value){
-		max = {value: slave.pornTypeBreeder, type: "breeder"};
-	}
-	if(slave.pornTypeSub > max.value){
-		max = {value: slave.pornTypeSub, type: "submissive"};
-	}
-	if(slave.pornTypeCumSlut > max.value){
-		max = {value: slave.pornTypeCumSlut, type: "cum"};
-	}
-	if(slave.pornTypeAnal > max.value){
-		max = {value: slave.pornTypeAnal, type: "buttslut"};
-	}
-	if(slave.pornTypeHumiliation > max.value){
-		max = {value: slave.pornTypeHumiliation, type: "humiliating"};
-	}
-	if(slave.pornTypeBoobs > max.value){
-		max = {value: slave.pornTypeBoobs, type: "breast"};
-	}
-	if(slave.pornTypeDom > max.value){
-		max = {value: slave.pornTypeDom, type: "dominant"};
-	}
-	if(slave.pornTypeSadist > max.value){
-		max = {value: slave.pornTypeSadist, type: "sadistic"};
-	}
-	if(slave.pornTypeMasochist > max.value){
-		max = {value: slave.pornTypeMasochist, type: "masochistic"};
-	}
-	if(slave.pornTypePregnancy > max.value){
-		max = {value: slave.pornTypePregnancy, type: "pregnancy fetish"};
-	}
-
-	return max;
-};
-
-/*:: Art JS [script]*/
-
-window.ArtControlRendered = function ArtControlRendered(slave, sizePlacement) {
-	const V = State.variables;
-	let fileName = "'resources/renders/";
-	let r = "";
-
-	if (slave.belly > 1500) {
-		fileName += "preg ";
-	}
-	if (slave.vagina > -1) {
-		if (slave.dick > 0) {
-			if (slave.balls > 0) {
-				fileName += "futanari";
-			} else {
-				fileName += "herm";
-			}
-		} else {
-			fileName += "female";
-		}
-	} else {
-		if (slave.balls > 0) {
-			fileName += "shemale";
-		} else {
-			fileName += "gelding";
-		}
-	}
-	if (slave.boobs < 400) {
-		fileName = `${fileName} small`;
-	} else if (slave.boobs < 800) {
-		fileName = `${fileName} big`;
-	} else if (slave.boobs < 6000) {
-		fileName = `${fileName} huge`;
-	} else {
-		fileName = `${fileName} hyper`;
-	}
-	if (slave.muscles > 30) {
-		fileName = `${fileName} muscle`;
-	} else {
-		fileName = `${fileName} soft`;
-	}
-	if (slave.fuckdoll > 0) {
-		fileName = `${fileName} rebellious`;
-	} else if (slave.devotion <= 20) {
-		if (slave.trust < -20) {
-			fileName = `${fileName} reluctant`;
-		} else {
-			fileName = `${fileName} rebellious`;
-		}
-	} else if (slave.fetish === "mindbroken") {
-		fileName = `${fileName} reluctant`;
-	} else if (slave.devotion <= 50 || slave.fetishKnown !== 1 || V.seeMainFetishes === 0 && sizePlacement < 2) {
-		fileName = `${fileName} obedient`;
-	} else {
-		if (slave.fetish === "none") {
-			fileName = `${fileName} obedient`;
-		} else {
-			fileName = `${fileName} ${slave.fetish}`;
-		}
-	}
-
-	fileName += ".png'";
-	if (sizePlacement === 3) {
-		r = `<img src=${fileName} style='float:right; border:3px hidden'>`;
-	} else if (sizePlacement === 2) {
-		r = `<img src=${fileName} style='float:right; border:3px hidden' width='300' height='300'>`;
-	} else if (sizePlacement === 1) {
-		r = `<img src=${fileName} style='float:left; border:3px hidden' width='150' height='150'>`;
-	} else {
-		r = `<img src=${fileName} style='float:left; border:3px hidden' width='120' height='120'>`;
-	}
-	return r;
-};
-
-/*
-This takes a textual hair color description and tries to guess the appropriate HTML compliant color code.
-
-color should be a color name, but can also be a string describing hair color.
-eyes can be nearly anything, it only indicates that the function is being used for eye color instead of hair color.
-
-This code's working is described to the user in the Encyclopedia, chapter "Lore", section "Dyes".
-*/
-window.extractColor = function (color, eyes) {
-	/*
-	these are color names known and used in FreeCities
-	attributed color names are at the front of the array
-	*/
-	var FCname2HTMLarray = [
-		["amber", "#ffbf00"],
-		["auburn", "#a53f2a"],
-		["black", "#171717"],
-		["blazing red", "#E00E2B"],
-		["blonde", "#F4F1A3"],
-		["blue", "#4685C5"],
-		["blue-violet", "#8790B7"],
-		["brown", "#7e543e"],
-		["burgundy", "#34000d"],
-		["chestnut", "#663622"],
-		["chocolate", "#402215"],
-		["copper", "#e29c58"],
-		["dark blue", "#000034"],
-		["dark brown", "#4b3225"],
-		["dark orchid", "#9932CC"],
-		["deep red", "#6D1318"],
-		["ginger", "#da822d"],
-		["golden", "#ffd700"],
-		["green", "#5FBA46"],
-		["green-yellow", "#ADFF2F"],
-		["grey", "#8d8d8d"],
-		["hazel", "#8d6f1f"],
-		["jet black", "#060606"],
-		["light olive", "#806b00"],
-		["neon blue", "#0e85fd"],
-		["neon green", "#25d12b"],
-		["neon pink", "#fc61cd"],
-		["pale-grey", "#b3b3b3"],
-		["pink", "#D18CBC"],
-		["platinum blonde", "#fcf3c1"],
-		["purple", "#800080"],
-		["red", "#BB2027"],
-		["sea green", "#2E8B57"],
-		["silver", "#d9d9d9"],
-		["strawberry-blonde", "#e5a88c"],
-		/* these are not actually FreeCities canon, but like to appear in custom descriptions */
-		["brunette", "#6d4936"],
-		["dark", "#463325"]
-	];
-
-	/* these are HTML color names supported by most browsers */
-	var HTMLstandardColors = ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgrey", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgrey", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"];
-
-	var FCnames = new Map(FCname2HTMLarray);
-	color = color.toLowerCase(); /* normalization: lowercase color name */
-	var colorCode = FCnames.get(color); /* look up in FreeCities color names */
-	if (!colorCode) { /* not a FreeCities color name*/
-		if (HTMLstandardColors.includes(color) || color.match(/^#([0-9a-f]{3}){1,2}$/) !== null) {
-			colorCode = color; /* is a HTML color name or value, use it directly */
-		} else {
-			/*
-			is not even a HTML color name. color probably is a description.
-			look for anything resembling a valid color name within the description.
-			*/
-			var colorNoSpaces = color.replace(/\s+/g, ''); /* remove all spaces from description */
-			var FCkeys = Array.from(FCnames.keys());
-			var colorCodes = [
-				FCnames.get(FCkeys.find(function (e) {
-					return color.startsWith(e);
-				})),
-				HTMLstandardColors.find(function (e) {
-					return colorNoSpaces.startsWith(e);
-				}),
-				FCnames.get(FCkeys.find(function (e) {
-					return color.includes(e);
-				})),
-				HTMLstandardColors.find(function (e) {
-					return colorNoSpaces.includes(e);
-				})
-			];
-			colorCode = colorCodes.find(function (e) {
-				return e;
-			}); /* picks the first successful guess */
-		}
-	}
-	if (!colorCode) {
-		console.log("Art Color Tools JS: Unable to determine HTML compliant color code for color string '" + color + "'.");
-		if (eyes)
-			colorCode = "#89b7ff";
-		else
-			colorCode = "fuchsia"; /* use fuchsia as error marker */
-	}
-	return colorCode;
-};
-
-window.clothing2artSuffix = function (v) {
-	if (v == "restrictive latex") {
-		v = "latex";
-	} /* universal "special case": latex art is actually "restrictive latex" TODO: align name in vector source */
-	return v.replace(/^a[n]? /, "") /* remove "a" and "an" from the beginning*/
-		.replace(/ ?(outfit|clothing) ?/, "") /* remove "outfit" and "clothing" (redundant) */
-		.replace("-", "") /* remove minus character */
-		.replace(/\w\S*/g,
-			function (txt) {
-				return txt.charAt(0).toUpperCase() +
-					txt.substr(1).toLowerCase();
-			}
-		) /* CamelCase by whitespace */
-		.replace(/\W/g, ""); /* remove remaining whitespace */
-};
-
-window.skinColorCatcher = function (artSlave) {
-	let colorSlave = {
-		skinColor: "#e8b693",
-		areolaColor: "#d76b93",
-		labiaColor: "#d76b93",
-		lipsColor: "#ff69b4"
-	};
-	if (artSlave.skin == "camouflage patterned") {
-		colorSlave.skinColor = "#78875a";
-		colorSlave.areolaColor = "#939F7A";
-		colorSlave.labiaColor = "#F977A3";
-		colorSlave.lipsColor = "#708050";
-	} else if (artSlave.skin == "dyed red") {
-		colorSlave.skinColor = "#bc4949";
-		colorSlave.areolaColor = "#C96D6D";
-		colorSlave.labiaColor = "#F977A3";
-		colorSlave.lipsColor = "#b04040";
-	} else if (artSlave.skin == "dyed green") {
-		colorSlave.skinColor = "#A6C373";
-		colorSlave.areolaColor = "#B7CF8F";
-		colorSlave.labiaColor = "#F977A3";
-		colorSlave.lipsColor = "#A0C070";
-	} else if (artSlave.skin == "dyed blue") {
-		colorSlave.skinColor = "#5b8eb7";
-		colorSlave.areolaColor = "#7BA4C5";
-		colorSlave.labiaColor = "#F977A3";
-		colorSlave.lipsColor = "#5080b0";
-	} else if (artSlave.skin == "dyed pink") {
-		colorSlave.skinColor = "#fe62b0";
-		colorSlave.areolaColor = "#fc45a1";
-		colorSlave.labiaColor = "#fba2c0";
-		colorSlave.lipsColor = "#ff4291";
-	} else if (artSlave.skin == "dyed gray") {
-		colorSlave.skinColor = "#bdbdbd";
-		colorSlave.areolaColor = "#666666";
-		colorSlave.labiaColor = "#8C8C8C";
-		colorSlave.lipsColor = "#171717";
-	} else if (artSlave.skin == "tiger striped") {
-		colorSlave.skinColor = "#e2d75d";
-		colorSlave.areolaColor = "#E7DF7D";
-		colorSlave.labiaColor = "#F977A3";
-		colorSlave.lipsColor = "#e0d050";
-	} else { /* natural colors */
-		switch (artSlave.race) {
-		case "white":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#F4EAF0";
-					colorSlave.areolaColor = "#FCCCDC";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#F4EAF0";
-					colorSlave.areolaColor = "#FCCCDC";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#F5E1DF";
-					colorSlave.areolaColor = "#EFBFCA";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#F5E1DF";
-					colorSlave.areolaColor = "#EFBFCA";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#F5D5C9";
-					colorSlave.areolaColor = "#E2B4B9";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#F5D5C9";
-					colorSlave.areolaColor = "#E2B4B9";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#F4C9AA";
-					colorSlave.areolaColor = "#F19795";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#E1B585";
-					colorSlave.areolaColor = "#C39696";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#E1B585";
-					colorSlave.areolaColor = "#C39696";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#D58E5F";
-					colorSlave.areolaColor = "#B17777";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#D58E5F";
-					colorSlave.areolaColor = "#B17777";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#A2805C";
-					colorSlave.areolaColor = "#8E6454";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#825633";
-					colorSlave.areolaColor = "#734B2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#784F2F";
-					colorSlave.areolaColor = "#583E2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#784F2F";
-					colorSlave.areolaColor = "#583E2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-					colorSlave.skinColor = "#65422C";
-					colorSlave.areolaColor = "#4A3A33";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "black":
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#D58E5F";
-					colorSlave.areolaColor = "#B17777";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-			}
-			break;
-
-		case "black":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FEE4CA";
-					colorSlave.areolaColor = "#E0B3A2";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FEE4CA";
-					colorSlave.areolaColor = "#E0B3A2";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#E3C5A7";
-					colorSlave.areolaColor = "#EFBDC9";
-					colorSlave.labiaColor = "#CC9B88";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#E3C5A7";
-					colorSlave.areolaColor = "#CC9B88";
-					colorSlave.labiaColor = "#CC9B88";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#DEB892";
-					colorSlave.areolaColor = "#AB806F";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#DEB892";
-					colorSlave.areolaColor = "#AB806F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#D59D73";
-					colorSlave.areolaColor = "#8D6859";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#AC7C4A";
-					colorSlave.areolaColor = "#7C594B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#AC7C4A";
-					colorSlave.areolaColor = "#7C594B";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#985C34";
-					colorSlave.areolaColor = "#764B3A";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#985C34";
-					colorSlave.areolaColor = "#764B3A";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#745C42";
-					colorSlave.areolaColor = "#63463B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#65422C";
-					colorSlave.areolaColor = "#4B3121";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#5A3C24";
-					colorSlave.areolaColor = "#493326";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#5A3C24";
-					colorSlave.areolaColor = "#493326";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#46362C";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "black":
-					colorSlave.skinColor = "#583D3D";
-					colorSlave.areolaColor = "#3B3028";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#4A3A33";
-					colorSlave.areolaColor = "#332B27";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#312926";
-					colorSlave.areolaColor = "#181616";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#985C34";
-					colorSlave.areolaColor = "#764B3A";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "latina":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FEDECE";
-					colorSlave.areolaColor = "#E3BBAB";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FEDECE";
-					colorSlave.areolaColor = "#E3BBAB";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#E6C2B0";
-					colorSlave.areolaColor = "#D1A695";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#E6C2B0";
-					colorSlave.areolaColor = "#D1A695";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#E1B59F";
-					colorSlave.areolaColor = "#B48D7E";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#E1B59F";
-					colorSlave.areolaColor = "#B48D7E";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#DAA782";
-					colorSlave.areolaColor = "#9E7666";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#B27554";
-					colorSlave.areolaColor = "#92684C";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#B27554";
-					colorSlave.areolaColor = "#92684C";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#8B644F";
-					colorSlave.areolaColor = "#7B5749";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#775031";
-					colorSlave.areolaColor = "#69452F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#774A31";
-					colorSlave.areolaColor = "#614330";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#774A31";
-					colorSlave.areolaColor = "#614330";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-					colorSlave.skinColor = "#74523E";
-					colorSlave.areolaColor = "#573F30";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "black":
-					colorSlave.skinColor = "#6B4B4B";
-					colorSlave.areolaColor = "#473426";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#634F45";
-					colorSlave.areolaColor = "#4D3A2E";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#634F45";
-					colorSlave.areolaColor = "#4D3A2E";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "asian":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FFF8EE";
-					colorSlave.areolaColor = "#F7DBD0";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FFF8EE";
-					colorSlave.areolaColor = "#F7DBD0";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#F5E7DC";
-					colorSlave.areolaColor = "#EABFB3";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#F5E7DC";
-					colorSlave.areolaColor = "#EABFB3";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#F5D4B5";
-					colorSlave.areolaColor = "#CB988B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#F5D4B5";
-					colorSlave.areolaColor = "#CB988B";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#F4D1A3";
-					colorSlave.areolaColor = "#BA8E83";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#CFB48D";
-					colorSlave.areolaColor = "#AC8074";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#CFB48D";
-					colorSlave.areolaColor = "#AC8074";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#C38C4D";
-					colorSlave.areolaColor = "#A67A6F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#C38C4D";
-					colorSlave.areolaColor = "#A67A6F";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#9A774A";
-					colorSlave.areolaColor = "#855E4E";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#855834";
-					colorSlave.areolaColor = "#734B2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#83522B";
-					colorSlave.areolaColor = "#68442A";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#83522B";
-					colorSlave.areolaColor = "#68442A";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#724826";
-					colorSlave.areolaColor = "#5C3D26";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#C38C4D";
-					colorSlave.areolaColor = "#A67A6F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "middle eastern":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#E8CFCF";
-					colorSlave.areolaColor = "#DCADBC";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#E8CFCF";
-					colorSlave.areolaColor = "#DCADBC";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#FBCCC6";
-					colorSlave.areolaColor = "#E79E8B";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#FBCCC6";
-					colorSlave.areolaColor = "#E79E8B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#EAAB92";
-					colorSlave.areolaColor = "#D27B64";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#EAAB92";
-					colorSlave.areolaColor = "#D27B64";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#EDA571";
-					colorSlave.areolaColor = "#B16854";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#CC8D53";
-					colorSlave.areolaColor = "#A7624F";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#CC8D53";
-					colorSlave.areolaColor = "#A7624F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#CA7136";
-					colorSlave.areolaColor = "#9B5959";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#CA7136";
-					colorSlave.areolaColor = "#9B5959";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#84684A";
-					colorSlave.areolaColor = "#735143";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#684528";
-					colorSlave.areolaColor = "#563826";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#6E4730";
-					colorSlave.areolaColor = "#604534";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#6E4730";
-					colorSlave.areolaColor = "#604534";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#604534 ";
-					colorSlave.areolaColor = "#514039";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#CA7136";
-					colorSlave.areolaColor = "#9B5959";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "amerindian":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FDE4BF";
-					colorSlave.areolaColor = "#F0BEAA";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FDE4BF";
-					colorSlave.areolaColor = "#F0BEAA";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#F5E7DC";
-					colorSlave.areolaColor = "#CDA499";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#F5E7DC";
-					colorSlave.areolaColor = "#CDA499";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#F5D4B5";
-					colorSlave.areolaColor = "#CB988B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#F5D4B5";
-					colorSlave.areolaColor = "#CB988B";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#F4D1A3";
-					colorSlave.areolaColor = "#BA8E83";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#CFB48D";
-					colorSlave.areolaColor = "#AC8074";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#CFB48D";
-					colorSlave.areolaColor = "#AC8074";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#C38C4D";
-					colorSlave.areolaColor = "#A67A6F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#C38C4D";
-					colorSlave.areolaColor = "#A67A6F";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#9A774A";
-					colorSlave.areolaColor = "#855E4E";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#855834";
-					colorSlave.areolaColor = "#734B2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#83522B";
-					colorSlave.areolaColor = "#68442A";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#83522B";
-					colorSlave.areolaColor = "#68442A";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#724826";
-					colorSlave.areolaColor = "#5C3D26";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#C38C4D";
-					colorSlave.areolaColor = "#A67A6F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "southern european":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#EBDBE4";
-					colorSlave.areolaColor = "#FFE4E0";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#EBDBE4";
-					colorSlave.areolaColor = "#FFE4E0";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#F0D0CC";
-					colorSlave.areolaColor = "#EAACBA";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#F0D0CC";
-					colorSlave.areolaColor = "#EAACBA";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#F1C6B5";
-					colorSlave.areolaColor = "#DCA2A9";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#F1C6B5";
-					colorSlave.areolaColor = "#DCA2A9";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#F2BC94";
-					colorSlave.areolaColor = "#EE8280";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#DCA972";
-					colorSlave.areolaColor = "#BF7577";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#DCA972";
-					colorSlave.areolaColor = "#BF7577";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#D0814C";
-					colorSlave.areolaColor = "#A96767";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#D0814C";
-					colorSlave.areolaColor = "#A96767";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#937453";
-					colorSlave.areolaColor = "#7F5A4B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#7F5431";
-					colorSlave.areolaColor = "#734B2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#784F2F";
-					colorSlave.areolaColor = "#583E2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#784F2F";
-					colorSlave.areolaColor = "#583E2F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#65422C";
-					colorSlave.areolaColor = "#4A3A33";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#D0814C";
-					colorSlave.areolaColor = "#A96767";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "semitic":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#E8CFCF";
-					colorSlave.areolaColor = "#DCADBC";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#E8CFCF";
-					colorSlave.areolaColor = "#DCADBC";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#FBCCC6";
-					colorSlave.areolaColor = "#E79E8B";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#FBCCC6";
-					colorSlave.areolaColor = "#E79E8B";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#EAAB92";
-					colorSlave.areolaColor = "#D27B64";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#EAAB92";
-					colorSlave.areolaColor = "#D27B64";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#EDA571";
-					colorSlave.areolaColor = "#B16854";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#CC8D53";
-					colorSlave.areolaColor = "#A7624F";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#CC8D53";
-					colorSlave.areolaColor = "#A7624F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#CA7136";
-					colorSlave.areolaColor = "#9B5959";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#CA7136";
-					colorSlave.areolaColor = "#9B5959";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#84684A";
-					colorSlave.areolaColor = "#735143";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#684528";
-					colorSlave.areolaColor = "#563826";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#6E4730";
-					colorSlave.areolaColor = "#604534";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#6E4730";
-					colorSlave.areolaColor = "#604534";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#604534 ";
-					colorSlave.areolaColor = "#514039";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#CA7136";
-					colorSlave.areolaColor = "#9B5959";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "malay":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FBD1B2";
-					colorSlave.areolaColor = "#F39E7D";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FBD1B2";
-					colorSlave.areolaColor = "#F39E7D";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#E8B892";
-					colorSlave.areolaColor = "#E2856C";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#E8B892";
-					colorSlave.areolaColor = "#E2856C";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#EA9870";
-					colorSlave.areolaColor = "#BE6C56";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#EA9870";
-					colorSlave.areolaColor = "#BE6C56";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#EA9760";
-					colorSlave.areolaColor = "#AB6755";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#BA855E";
-					colorSlave.areolaColor = "#976051";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#BA855E";
-					colorSlave.areolaColor = "#976051";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#A46138";
-					colorSlave.areolaColor = "#8F5E51";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#A46138";
-					colorSlave.areolaColor = "#8F5E51";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#7C563C";
-					colorSlave.areolaColor = "#70493A";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#804A28";
-					colorSlave.areolaColor = "#5F3F27";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#6F4523";
-					colorSlave.areolaColor = "#623C20";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#6F4523";
-					colorSlave.areolaColor = "#623C20";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#6F3E27";
-					colorSlave.areolaColor = "#553823";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#A46138";
-					colorSlave.areolaColor = "#8F5E51";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "indo-aryan":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#F8D4BE";
-					colorSlave.areolaColor = "#F8B6A4";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#F8D4BE";
-					colorSlave.areolaColor = "#F8B6A4";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#EFCCAF";
-					colorSlave.areolaColor = "#EA9B86";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#EFCCAF";
-					colorSlave.areolaColor = "#EA9B86";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#FCC49A";
-					colorSlave.areolaColor = "#D29577";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#FCC49A";
-					colorSlave.areolaColor = "#D29577";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#E8B68E";
-					colorSlave.areolaColor = "#D08661";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#C17848";
-					colorSlave.areolaColor = "#C36E45";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#C17848";
-					colorSlave.areolaColor = "#C36E45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#C17848";
-					colorSlave.areolaColor = "#A75A34";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#C17848";
-					colorSlave.areolaColor = "#A75A34";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#83684B";
-					colorSlave.areolaColor = "#715043";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#8A593C";
-					colorSlave.areolaColor = "#714931";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#845834";
-					colorSlave.areolaColor = "#614635";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#845834";
-					colorSlave.areolaColor = "#614635";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#7C5842";
-					colorSlave.areolaColor = "#5F4538";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#6B5449";
-					colorSlave.areolaColor = "#473C37";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#6B5449";
-					colorSlave.areolaColor = "#473C37";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#C17848";
-					colorSlave.areolaColor = "#A75A34";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "pacific islander":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FBD1B2";
-					colorSlave.areolaColor = "#F39E7D";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FBD1B2";
-					colorSlave.areolaColor = "#F39E7D";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#E8B892";
-					colorSlave.areolaColor = "#E2856C";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#E8B892";
-					colorSlave.areolaColor = "#E2856C";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#EA9870";
-					colorSlave.areolaColor = "#BE6C56";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#EA9870";
-					colorSlave.areolaColor = "#BE6C56";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#EA9760";
-					colorSlave.areolaColor = "#AB6755";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#BA855E";
-					colorSlave.areolaColor = "#976051";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#BA855E";
-					colorSlave.areolaColor = "#976051";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#A46138";
-					colorSlave.areolaColor = "#8F5E51";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#A46138";
-					colorSlave.areolaColor = "#8F5E51";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#7C563C";
-					colorSlave.areolaColor = "#70493A";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#804A28";
-					colorSlave.areolaColor = "#5F3F27";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#6F4523";
-					colorSlave.areolaColor = "#623C20";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#6F4523";
-					colorSlave.areolaColor = "#623C20";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-				case "black":
-					colorSlave.skinColor = "#6F3E27";
-					colorSlave.areolaColor = "#553823";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#583E2F";
-					colorSlave.areolaColor = "#3F3A38";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#A46138";
-					colorSlave.areolaColor = "#8F5E51";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		case "mixed race":
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FEE5CC";
-					colorSlave.areolaColor = "#E3BBAB";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FEE5CC";
-					colorSlave.areolaColor = "#E3BBAB";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#E6C2B0";
-					colorSlave.areolaColor = "#D1A695";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#E6C2B0";
-					colorSlave.areolaColor = "#D1A695";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#E1B59F";
-					colorSlave.areolaColor = "#B48D7E";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#E1B59F";
-					colorSlave.areolaColor = "#B48D7E";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#DAA782";
-					colorSlave.areolaColor = "#9E7666";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#B27554";
-					colorSlave.areolaColor = "#92684C";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#B27554";
-					colorSlave.areolaColor = "#92684C";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#8B644F";
-					colorSlave.areolaColor = "#7B5749";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#775031";
-					colorSlave.areolaColor = "#69452F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#774A31";
-					colorSlave.areolaColor = "#5E4434";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#774A31";
-					colorSlave.areolaColor = "#5E4434";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-					colorSlave.skinColor = "#74523E";
-					colorSlave.areolaColor = "#574135";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "black":
-					colorSlave.skinColor = "#6B4B4B";
-					colorSlave.areolaColor = "#413228";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#634F45";
-					colorSlave.areolaColor = "#4E3C32";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#634F45";
-					colorSlave.areolaColor = "#4E3C32";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-				}
-				break;
-
-		default:
-			switch (artSlave.skin) {
-				case "pure white":
-					colorSlave.skinColor = "#FEE5CC";
-					colorSlave.areolaColor = "#E3BBAB";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "extremely pale":
-					colorSlave.skinColor = "#FEE5CC";
-					colorSlave.areolaColor = "#E3BBAB";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "pale":
-					colorSlave.skinColor = "#E6C2B0";
-					colorSlave.areolaColor = "#D1A695";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ffb9ca";
-					break;
-				case "extremely fair":
-					colorSlave.skinColor = "#E6C2B0";
-					colorSlave.areolaColor = "#D1A695";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "very fair":
-					colorSlave.skinColor = "#E1B59F";
-					colorSlave.areolaColor = "#B48D7E";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "fair":
-					colorSlave.skinColor = "#E1B59F";
-					colorSlave.areolaColor = "#B48D7E";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "white":
-				case "light":
-				case "lightened":
-					colorSlave.skinColor = "#DAA782";
-					colorSlave.areolaColor = "#9E7666";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#ce6876";
-					break;
-				case "light olive":
-					colorSlave.skinColor = "#B27554";
-					colorSlave.areolaColor = "#92684C";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "olive":
-					colorSlave.skinColor = "#B27554";
-					colorSlave.areolaColor = "#92684C";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#c1a785";
-					break;
-				case "natural":
-				case "tanned":
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-					break;
-				case "bronzed":
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark olive":
-					colorSlave.skinColor = "#8B644F";
-					colorSlave.areolaColor = "#7B5749";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "dark":
-					colorSlave.skinColor = "#775031";
-					colorSlave.areolaColor = "#69452F";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "light brown":
-					colorSlave.skinColor = "#774A31";
-					colorSlave.areolaColor = "#5E4434";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#5d2f1b";
-					break;
-				case "brown":
-					colorSlave.skinColor = "#774A31";
-					colorSlave.areolaColor = "#5E4434";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#714536";
-					break;
-				case "dark brown":
-					colorSlave.skinColor = "#74523E";
-					colorSlave.areolaColor = "#574135";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "black":
-					colorSlave.skinColor = "#6B4B4B";
-					colorSlave.areolaColor = "#413228";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				case "ebony":
-					colorSlave.skinColor = "#634F45";
-					colorSlave.areolaColor = "#4E3C32";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#403030";
-					break;
-				case "pure black":
-					colorSlave.skinColor = "#634F45";
-					colorSlave.areolaColor = "#4E3C32";
-					colorSlave.labiaColor = "#F977A3";
-					break;
-				default:
-					colorSlave.skinColor = "#B6784E";
-					colorSlave.areolaColor = "#8F5A45";
-					colorSlave.labiaColor = "#F977A3";
-					colorSlave.lipsColor = "#9e4c44";
-			}
-		}
-	}
-	return colorSlave;
-};
-
-/*:: VignettesJS [script]*/
-
-window.GetVignette = function GetVignette(slave) {
-	const V = State.variables;
-	let vignettes = [];
-
-	const pronouns = getPronouns(slave);
-	const he = pronouns.pronoun;
-	const him = pronouns.object;
-	const his = pronouns.possessive;
-	const hers = pronouns.possessivePronoun;
-	const himself = pronouns.objectReflexive;
-	const boy = pronouns.noun;
-	const He = capFirstChar(he);
-	const His = capFirstChar(his);
-
-	if (slave.assignment === "whore" || slave.assignment === window.Job.BROTHEL || slave.assignment === window.Job.MADAM) {
-		let seed = jsRandom(1, 10);
-		switch (seed) {
-			case 1:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} witnessed a domestic dispute over another whore,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 2:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} saw a free whore finally sink into slavery,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 3:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that construction forced ${him} to move from ${his} usual spot,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 4:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that a customer used a new and improved sex toy on ${him},`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 5:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was an appointment with an unusually perverted family,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 6:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} saw a man sell his wife into slavery,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 7:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} saw a woman sell her daughters into slavery,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 8:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} watched a citizen descend into aphrodisiac addiction,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 9:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} watched a citizen develop the beginnings of sex addiction,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			default:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} witnessed a citizen administering a brutal public punishment to one of their slaves,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-		}
-		seed = jsRandom(1, 5);
-		switch (seed) {
-			case 1:
-				vignettes.push({
-					text: `a citizen punished one of his slaves by tying ${his} up in public near where ${slave.slaveName} was working. This cut into ${his} business that day,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case 2:
-				vignettes.push({
-					text: `a citizen shared one of his slaves with the public near where ${slave.slaveName} was working. This cut into ${his} business that day,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case 3:
-				vignettes.push({
-					text: `a private brothel offered a promotion near where ${slave.slaveName} was working. This cut into ${his} business that day,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case 4:
-				vignettes.push({
-					text: `some free sluts threw an aphrodisiac street party near where ${slave.slaveName} was working. This cut into ${his} business that day,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			default:
-				vignettes.push({
-					text: `a contract breaker was punished with the pillory near where ${slave.slaveName} was working. This cut into ${his} business that day,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-		}
-		seed = jsRandom(1, 5);
-		switch (seed) {
-			case 1:
-				vignettes.push({
-					text: `one of ${his} regular customers got a divorce and came to ${him} for repeated consolation,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case 2:
-				vignettes.push({
-					text: `a brothel near where ${slave.slaveName} usually works had business trouble,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case 3:
-				vignettes.push({
-					text: `a competing whore that looks like ${him} fell ill, driving a customer to look for an alternative,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case 4:
-				vignettes.push({
-					text: `a street whore that works near ${him} was badly beaten by an abusive customer and had to take time off. The reduced competition got ${him} more business,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			default:
-				vignettes.push({
-					text: `an influx of tourists came into ${his} part of the arcology, earning ${him} more business for a day,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-		}
-
-		if (slave.fetishKnown === 1) {
-			switch (slave.fetish) {
-				case "submissive":
-					vignettes.push({
-						text: `${he} deeply impressed a customer with ${his} sincere submission to them,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} lost a customer who secretly wanted ${him} to show a little initiative,`,
-						type: "rep",
-						effect: -1,
-					});
-					vignettes.push({
-						text: `an overeager sadistic customer roughed ${him} up more than a normal submissive like ${him} is used to,`,
-						type: "health",
-						effect: -1,
-					});
-					break;
-				case "cumslut":
-					vignettes.push({
-						text: `${he} deeply impressed a customer with ${his} hunger for their cum,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a customer who didn't know how much cum fetishes revolted them until ${he} displayed ${his},`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "humiliation":
-					vignettes.push({
-						text: `${he} earned repeat business from a customer who didn't know how much they liked public sex until ${he} got them to try it,`,
-						type: "cash",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a customer who didn't know how much exhibitionism turned them off until they tried public sex with ${him},`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "buttslut":
-					if (canDoAnal(slave)) {
-						vignettes.push({
-							text: `${he} earned repeat business from a customer who didn't know how much they liked fucking buttholes until ${he} got them to try fucking ${his},`,
-							type: "cash",
-							effect: 1,
-						});
-						vignettes.push({
-							text: `${he} disgusted a customer who didn't know how much buttsex turned them off until ${he} got them to try fucking ${his} ass,`,
-							type: "rep",
-							effect: -1,
-						});
-					}
-					if (slave.butt >= 3) {
-						vignettes.push({
-							text: `${he} earned repeat business from a customer who didn't know how much they liked big butts until ${he} gave them a lap dance they'll never forget,`,
-							type: "cash",
-							effect: 1,
-						});
-					}
-					vignettes.push({
-						text: `${he} earned extra gratitude from a citizen who appreciated a nice rear, even if it is off limits,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a customer who didn't know how much butts turned them off until ${he} put ${his} hands on theirs,`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "boobs":
-					vignettes.push({
-						text: `${he} deeply impressed a customer by orgasming to nothing but the feeling of them sucking ${his} nipples,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disappointed a female customer who didn't know how uninterested she was in nipple play before trying it,`,
-						type: "rep",
-						effect: -1,
-					});
-					if (slave.nipples === "fuckable") {
-						vignettes.push({
-							text: `${he} left a lasting impression on a pair of customers after nearly passing out from a series of intense orgasms from getting ${his} nipples fucked,`,
-							type: "cash",
-							effect: 2,
-						});
-					}
-					break;
-				case "sadist":
-					vignettes.push({
-						text: `${he} deeply impressed a customer who brought their own slave to ${him} for abuse with ${his} sadism,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `a customer brought ${him} their own slave to abuse, but the sight proved to be a turn off,`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "masochist":
-					vignettes.push({
-						text: `${he} helped a customer discover a new fetish by orgasming when they accidentally hurt ${him},`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disturbed a customer who accidentally hurt ${him} by orgasming,`,
-						type: "rep",
-						effect: -1,
-					});
-					vignettes.push({
-						text: `a group of overzealous customers gangbanging ${him} got a little too excited hearing ${him} get off on abuse, leaving ${him} sore and injured,`,
-						type: "health",
-						effect: -1,
-					});
-					break;
-				case "dom":
-					vignettes.push({
-						text: `${he} made a female customer ${his} bitch: fortunately, the customer wanted to be ${his} bitch and came back for more,`,
-						type: "cash",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} accidentally overwhelmed a customer with ${his} sexual dominance,`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "pregnancy":
-					vignettes.push({
-						text: `${he} earned repeat business from a customer who didn't know how much they liked pregnancy play until ${he} begged them to knock ${him} up,`,
-						type: "cash",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a customer who didn't know how much pregnancy play turned them off until ${he} begged them to knock ${him} up,`,
-						type: "rep",
-						effect: -1,
-					});
-			}
-		}
-		switch (slave.behavioralFlaw) {
-			case "arrogant":
-				vignettes.push({
-					text: `${he} manages to give a citizen the impression ${he} thinks ${himself} better than them,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "bitchy":
-				vignettes.push({
-					text: `${he} makes an emasculating remark to a customer right after they fuck ${him},`,
-					type: "rep",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `${he} was slapped by a customer who was angry at ${his} rude remarks,`,
-					type: "health",
-					effect: -1,
-				});
-				break;
-			case "odd":
-				vignettes.push({
-					text: `${he} infuriates a potential customer with ${his} nervous tics,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "hates men":
-				vignettes.push({
-					text: `${his} disgust towards men surfaces at a bad time, losing ${him} a male customer,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "hates women":
-				vignettes.push({
-					text: `${his} disgust towards women surfaces at a bad time, losing ${him} a female customer,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "gluttonous":
-				vignettes.push({
-					text: `${he} accidentally lingers at a meal, missing a customer appointment,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "anorexic":
-				vignettes.push({
-					text: `${his} bulimia surfaces at an extremely inopportune moment, turning a customer off,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "devout":
-				vignettes.push({
-					text: `a customer catches ${him} praying to ${himself} as they inserted themselves into ${him}, turning them off,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "liberated":
-				vignettes.push({
-					text: `${he} treats a rude potential customer impolitely, because ${he} thinks that's fair,`,
-					type: "cash",
-					effect: -1,
-				});
-		}
-		switch (slave.sexualFlaw) {
-			case "hates oral":
-				vignettes.push({
-					text: `${he} vomits while trying to deepthroat a customer,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "hates anal":
-				vignettes.push({
-					text: `${he} cries while taking anal from a customer who isn't into painal,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "hates penetration":
-				vignettes.push({
-					text: `${he} cries while taking a pounding from a customer who likes their sex consensual,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "shamefast":
-				vignettes.push({
-					text: `${he} cries while a potential customer looks ${him} over,`,
-					type: "cash",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `${he} disrobed so slowly that a potential customer gave up on ${him},`,
-					type: "cash",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `a customer impatient with how slowly ${he} was disrobing ripped off ${his} clothes and roughed ${him} up,`,
-					type: "health",
-					effect: -1,
-				});
-				break;
-			case "idealistic":
-				vignettes.push({
-					text: `${he} cries when explaining the price of ${his} body to a potential customer,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "repressed":
-				vignettes.push({
-					text: `${he} misunderstands a potential customer's lewd requests, turning them off,`,
-					type: "cash",
-					effect: -1,
-				});
-				break;
-			case "apathetic":
-				vignettes.push({
-					text: `${he} fails to notice when a customer achieves orgasm,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "neglectful":
-				vignettes.push({
-					text: `${he} brings a denial fetishist to orgasm three times without cumming ${himself}, earning their repeat business,`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "cum addict":
-				vignettes.push({
-					text: `${he}'s so focused on sucking down a customer's cum that ${he} managed to drive them to repeated orgasm, earning their repeated business once they got the feeling back in their legs,`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "anal addict":
-				vignettes.push({
-					text: `${he} takes a trio of dicks in ${his} ass without hesitation, earning repeat business from one of them thoroughly impressed by ${his} anal addiction,`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "attention whore":
-				vignettes.push({
-					text: `${he} got repeat business from a man who loves fucking ${him} in the middle of crowded rooms,`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "breast growth":
-				vignettes.push({
-					text: `${he} got repeat business from a woman with huge breasts who enjoys roleplaying her breast expansion fetishes with ${him},`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "abusive":
-				vignettes.push({
-					text: `${he} got repeat business from a man who loves physically abusive sex, though his testicles could only take so much in one week,`,
-					type: "cash",
-					effect: 2,
-				});
-				break;
-			case "malicious":
-				vignettes.push({
-					text: `${he} got repeat business from a masochistic woman who enjoys being whipped and degraded,`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "self hating":
-				vignettes.push({
-					text: `${he} got repeat business from an abusive man who thoroughly enjoyed how diligently ${he} took it,`,
-					type: "cash",
-					effect: 3,
-				});
-				break;
-			case "breeder":
-				vignettes.push({
-					text: `${he} got repeat business from a pregnancy fetishist nearly driven mad with lust over ${his} pregnancy obsession,`,
-					type: "cash",
-					effect: 3,
-				});
-		}
-		switch (slave.behavioralQuirk) {
-			case "confident":
-				vignettes.push({
-					text: `${he} confidently presses forward with a wavering potential customer, and makes the sale,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "cutting":
-				vignettes.push({
-					text: `${he} makes such a gloriously cutting remark to a male customer that a female bystander comes to ${him} for repeat business,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "funny":
-				vignettes.push({
-					text: `${he} makes a group of citizens laugh so hard, one of them comes to ${him} for repeat business,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "fitness":
-				vignettes.push({
-					text: `${he} continues a marathon gangbang past the point where most would have passed out,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "adores women":
-				vignettes.push({
-					text: `${he} strikes up a personal friendship with a regular female customer,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} adoringly kisses the feet of a local socialite who leaves ${him} a generous tip,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "adores men":
-				vignettes.push({
-					text: `${he} strikes up a personal friendship with a regular male customer,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} practically worships a minor celebrity, eagerly slobbering over his cock and covering ${himself} with his cum,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "insecure":
-				vignettes.push({
-					text: `${he} successfully convinces a regular customer that ${he}'s reliant on them emotionally,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "sinful":
-				vignettes.push({
-					text: `${he} helps a customer get past their religious hang-ups through sex with the friendly neighborhood whore,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "advocate":
-				vignettes.push({
-					text: `${he} successfully convinces a wavering potential customer that there's nothing wrong with banging a whore,`,
-					type: "cash",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} manages to convince a skeptical businessman about the merits of using slaves,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${his} enthusiastic discussion of the merits of slavery convinced a young woman to sell herself into slavery, so the new owner gave you a finder's fee,`,
-					type: "cash",
-					effect: 1,
-				});
-		}
-		switch (slave.sexualQuirk) {
-			case "gagfuck queen":
-				vignettes.push({
-					text: `${he} earns repeat business from a citizen who's obsessed with gagfucks,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "painal queen":
-				vignettes.push({
-					text: `${he} earns repeat business from a citizen who's obsessed with painal,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "strugglefuck queen":
-				vignettes.push({
-					text: `${he} earns repeat business from a citizen who's obsessed with strugglefucking,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "tease":
-				vignettes.push({
-					text: `${he} convinces a citizen who's never had sex with a prostitute to patronize ${him} with some truly inspired flirting,`,
-					type: "cash",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `a few partiers were so impressed with ${his} provocative teasing that they repeated ${his} wit to friends,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `a few partygoers were so impressed with ${his} provocative teasing that they left ${him} a sizable tip,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "romantic":
-				vignettes.push({
-					text: `a citizen becomes infatuated with ${him}, since they are convinced ${he}'s infatuated with them,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "perverted":
-				vignettes.push({
-					text: `${he} earns some momentary notoriety by engaging in a previously unheard-of sex act,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "caring":
-				vignettes.push({
-					text: `${he} serves as an impromptu sounding board for a customer having marital trouble,`,
-					type: "cash",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `a customer was so enamored with ${his} kind and caring manner than they proposed to ${him} and offered to take ${him} away, and when ${he} refused, they left a sizable tip,`,
-					type: "cash",
-					effect: 1,
-				});
-		}
-
-		if (slave.pitKills > 0) {
-			vignettes.push({
-				text: `${he} earns repeat business from a customer obsessed with the fact that ${he}'s a killer,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.oralCount > 500) {
-			vignettes.push({
-				text: `a customer into degradation becomes obsessed with driving ${his} oral mileage as high as possible,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.analCount > 500 && slave.anus > 0) {
-			vignettes.push({
-				text: `a customer into degradation becomes obsessed with driving ${his} anal mileage as high as possible,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.vaginalCount > 500 && slave.vagina > 0) {
-			vignettes.push({
-				text: `a customer into degradation becomes obsessed with driving ${his} pussy mileage as high as possible,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.devotion > 95) {
-			vignettes.push({
-				text: `${he} really pushed ${himself} to please a customer with tastes that disgusted ${him},`,
-				type: "cash",
-				effect: 1,
-			});
-		} else if (slave.devotion < -50) {
-			vignettes.push({
-				text: `${his} fury at being sold for sex turned a customer off before they could fuck ${him},`,
-				type: "cash",
-				effect: -1,
-			});
-		} else if (slave.devotion <= 20) {
-			vignettes.push({
-				text: `${he} treasured a love token given to ${him} by a customer ${he} fooled into thinking ${his} affection was real,`,
-				type: "devotion",
-				effect: -1,
-			});
-		}
-		if (slave.trust > 95) {
-			vignettes.push({
-				text: `${he} really pushed ${himself} to accept a customer with tastes that frightened ${him},`,
-				type: "cash",
-				effect: 1,
-			});
-		} else if (slave.trust < -50) {
-			vignettes.push({
-				text: `${his} tearful terror at being forced to sell ${himself} for sex turned a customer off before they could fuck ${him},`,
-				type: "cash",
-				effect: -1,
-			});
-		}
-		if (slave.livingRules === "luxurious") {
-			vignettes.push({
-				text: `${he} got a truly perfect night's sleep, which put ${him} in the right frame of mind for the whole day,`,
-				type: "rep",
-				effect: 1,
-			});
-		} else if (slave.livingRules === "spare") {
-			if (canHear(slave)) {
-				vignettes.push({
-					text: `${he} got a poor night's sleep in the noisy dormitory, which took the shine off ${his} efforts for the whole day,`,
-					type: "rep",
-					effect: -1,
-				});
-			} else {
-				vignettes.push({
-					text: `the noise from the dormitory could not possibly disturb ${his} sleep, so ${he} got much better sleep than ${he} would have otherwise,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (slave.releaseRules === "permissive" || slave.releaseRules === "masturbation") {
-			vignettes.push({
-				text: `a customer asked if ${he} masturbates, and then spent an hour jerking off as ${he} described how,`,
-				type: "cash",
-				effect: 1,
-			});
-		} else if (slave.releaseRules === "restrictive") {
-			vignettes.push({
-				text: `a customer asked if ${he} masturbates, and seemed disappointed when ${he} answered honestly,`,
-				type: "cash",
-				effect: 0,
-			});
-		} else {
-			vignettes.push({
-				text: `a closeted female customer asked about ${his} sex life with ot${his} slaves, and was enthralled by ${his} answer,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.health > 80) {
-			vignettes.push({
-				text: `a potential customer in the medical field was fascinated by ${his} health, and spent almost as much time examining ${him} as they did having sex with ${him},`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-			if (slave.weight < 10) {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a customer who misses ${boy}s without a spare tire around their middle,`,
-					type: "cash",
-					effect: 1,
-				});
-			} else if (slave.weight < 95) {
-				vignettes.push({
-					text: `a potential customer told ${him} that they are looking forward to patronizing ${him} once ${he} gains a lot more weight,`,
-					type: "cash",
-					effect: 0,
-				});
-			} else {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a customer who loves them big and soft`,
-					type: "cash",
-					effect: 0,
-				});
-			}
-			if (slave.weight > 30) {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a customer who enjoyed the way ${his} middle jiggled as they fucked ${him},`,
-					type: "cash",
-					effect: 0,
-				});
-			}
-		} else {
-			if (slave.weight > 95) {
-				vignettes.push({
-					text: `a potential customer told ${him} that they are looking forward to patronizing ${him} once ${he} loses a lot of weight,`,
-					type: "cash",
-					effect: 0,
-				});
-			} else if (slave.weight > 30) {
-				vignettes.push({
-					text: `a potential customer told ${him} that they are looking forward to patronizing ${him} once ${he} loses some weight,`,
-					type: "cash",
-					effect: 0,
-				});
-			} else if (slave.weight <= -30) {
-				vignettes.push({
-					text: `a potential customer told ${him} that they are looking forward to patronizing ${him} once ${he} gains some weight,`,
-					type: "cash",
-					effect: 0,
-				});
-			} else if (slave.weight < -95) {
-				vignettes.push({
-					text: `a potential customer told ${him} that they are looking forward to patronizing ${him} once ${he} gains a lot of weight,`,
-					type: "cash",
-					effect: 0,
-				});
-			}
-		}
-		if (slave.drugs === "testicle enhancement") {
-			vignettes.push({
-				text: `${he} took it in public, with ${his} copious ejaculation getting ${him} another customer right away,`,
-				type: "cash",
-				effect: 1,
-			});
-		} else if (slave.drugs === "hyper testicle enhancement") {
-			vignettes.push({
-				text: `${he} bloated a female customer's belly with ${his} copious ejaculate, leading her to say she is looking forward to come back and get filled again,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.aphrodisiacs > 1 || slave.inflationType === "aphrodisiac") {
-			vignettes.push({
-				text: `${his} piteous begging for sex due to ${his} extreme aphrodisiac dosage turned a potential customer off,`,
-				type: "cash",
-				effect: -1,
-			});
-		}
-		if (slave.inflationType === "aphrodisiac") {
-			vignettes.push({
-				text: `${his} piteous begging for sex coupled with ${his} bloated belly pleased a customer who loves desperate ${boy}s,`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${his} piteous begging for sex coupled with ${his} bloated belly horrified a customer who didn't realize how low a ${boy} could stoop,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.addict > 50) {
-			vignettes.push({
-				text: `${he} zoned out badly due to a low point between aphrodisiac doses, disappointing a customer,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.bellyPreg >= 10000 || slave.bellyImplant >= 10000) {
-			vignettes.push({
-				text: `${he} earned repeat business from a customer who likes to do nothing more than cuddle with ${his} swollen belly,`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a night with guy who likes rough, hard sex with heavily pregnant ${boy}s took its toll on ${him},`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (slave.bellyFluid >= 5000) {
-			vignettes.push({
-				text: `${he} earned repeat business from a customer who loved the way ${his} belly moved as they fucked ${him},`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} disgusted a customer when their forceful fucking caused ${him} to release ${his} contained ${slave.inflationType} all over them,`,
-				type: "rep",
-				effect: -2,
-			});
-		}
-		if ((slave.hormoneBalance >= 100 || slave.ballType == "sterile") && !canAchieveErection(slave)) {
-			if (slave.dick > 0) {
-				vignettes.push({
-					text: `${he} disappointed a customer who was sure they could get ${slave.slaveName}'s cock erect,`,
-					type: "rep",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `${he} earned repeat business from a customer who seems unthreatened by ${his} soft dick,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		} else if (slave.hormoneBalance <= -100 && slave.dick === 0) {
-			vignettes.push({
-				text: `${he} earned repeat business from a female customer who adores the masculinity produced by ${slave.slaveName}'s hormone regime,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.dick > 0 && canPenetrate(slave)) {
-			vignettes.push({
-				text: `${he} earned repeat business from a customer who likes to see his wife get fucked by a dick${boy} whore,`,
-				type: "cash",
-				effect: 1,
-			});
-			if (slave.dick > 3) {
-				vignettes.push({
-					text: `${he} earned repeat business from a female customer who likes big stiff cocks, and cannot lie,`,
-					type: "cash",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} irritated a male customer who brought his girlfriend with him by accidentally showing him up,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.balls > 3) {
-			vignettes.push({
-				text: `${he} loses a customer who wants ${him} to look like a natural girl, since ${his} balls are too big to be hidden,`,
-				type: "cash",
-				effect: -1,
-			});
-		}
-		if (slave.balls == 0 && slave.dick > 0) {
-			vignettes.push({
-				text: `a slave trainer privately studied ${him} as an example of a slave with well done gelding surgery,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (canDoVaginal(slave)) {
-			if (slave.vagina === 1) {
-				vignettes.push({
-					text: `${he} got extra business from a customer who really likes ${him}, and wants to fuck ${his} pussy as much as possible while it's still tight,`,
-					type: "cash",
-					effect: 1,
-				});
-			} else if (slave.vagina > 2) {
-				vignettes.push({
-					text: `${he} disappointed a customer whose cock is just too small for ${his} big cunt,`,
-					type: "rep",
-					effect: -1,
-				});
-				if (slave.behavioralQuirk === "cutting" && slave.intelligence+slave.intelligenceImplant > 50) {
-					vignettes.push({
-						text: `${he} helped a customer discover a new fetish by making cutting remarks when their cock was too small for ${his} big cunt,`,
-						type: "rep",
-						effect: 1,
-					});
-				} else if (slave.behavioralFlaw === "bitchy") {
-					vignettes.push({
-						text: `${he} irritated a male customer with ${his} complaints that they were too small to please ${him},`,
-						type: "rep",
-						effect: -2,
-					});
-				}
-			}
-		}
-		if (canDoAnal(slave)) {
-			if (slave.anus === 1) {
-				vignettes.push({
-					text: `${he} got extra business from a customer who really likes ${his} butthole, and wants to fuck it as much as possible while it's still tight,`,
-					type: "cash",
-					effect: 1,
-				});
-			} else if (slave.anus > 2) {
-				vignettes.push({
-					text: `${he} disappointed a customer whose cock is just too small for ${his} loose butthole,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.visualAge > 40) {
-			if (slave.face > 10 && slave.race == "asian") {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who loves well-preserved asian ladies,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} earned repeat business from a customer with serious mommy issues,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.face > 40) {
-			vignettes.push({
-				text: `${he} lost a potential customer who was so intimidated by ${his} great beauty that they decided to find a homelier whore,`,
-				type: "cash",
-				effect: -1,
-			});
-		} else if (slave.face < -10) {
-			vignettes.push({
-				text: `${he} earned repeat business from a customer who lacks self-confidence, and is more comfortable with homely whores,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.visualAge > 40) {
-			vignettes.push({
-				text: `${he} earned repeat business from a customer with serious mommy issues,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.lips > 70) {
-			vignettes.push({
-				text: `${he} earned repeat business from a customer who likes to play with ${his} lips nonsexually (don't ask),`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (!canTalk(slave)) {
-			vignettes.push({
-				text: `${he} impressed a customer who didn't know how relaxing a ${boy} who can't talk could be,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.muscles > 95) {
-			vignettes.push({
-				text: `${he} impressed a customer who was so eager to share workout plans with ${him} that they almost forgot to have sex with ${him},`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} gained repeat business from a female customer who likes a ${boy} who can bench-press her before and after they fuck,`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} disappointed a customer by accidentally revealing that ${he}'s considerably stronger than them,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.lactation > 0) {
-			vignettes.push({
-				text: `${he} was well compensated for providing fresh milk for the coffee served at a customer's business meeting,`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} served as a conveniently lactating whore near a trendy arcology coffeehouse,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (!canWalk(slave)) {
-			vignettes.push({
-				text: `${his} lack of mobility severely hindered ${his} attempts to find customers,`,
-				type: "cash",
-				effect: -1,
-			});
-		} else {
-			if (slave.boobs > 1500 && slave.boobsImplant === 0) {
-				vignettes.push({
-					text: `a young customer hired ${him} to jump rope so they could watch ${his} massive natural breasts flop around,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (slave.amp === 1) {
-			vignettes.push({
-				text: `${he} disappointed a customer who thought they would enjoy fucking a quadruple amputee, but found it revolting,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -1) {
-			vignettes.push({
-				text: `a strange customer was excited by the sight of ${his} prosthetic limbs,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a customer was disgusted at the thought of ${his} basic prosthetic limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-			vignettes.push({
-				text: `a customer was put off by ${his} prosthetic limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -2) {
-			vignettes.push({
-				text: `a customer was excited by ${his} vibrating fingertips,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: "a customer was indifferent to the thought of having sex with a slave with artificial limbs,",
-				type: "cash",
-				effect: 0,
-			});
-			vignettes.push({
-				text: `a customer was put off by ${his} crude artificial limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -3) {
-			vignettes.push({
-				text: `a strange customer was excited by the sight of ${his} artificial limbs,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: "a customer was indifferent to the thought of having sex with a slave with artificial limbs,",
-				type: "cash",
-				effect: 0,
-			});
-			vignettes.push({
-				text: `a customer was put off by the sight of ${his} prosthetic limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -4) {
-			vignettes.push({
-				text: `a customer was excited by the thought of having sex with a slave with p-limbs, but was scared off by ${his} combat p-limbs,`,
-				type: "cash",
-				effect: -1,
-			});
-			vignettes.push({
-				text: "a customer was indifferent to the thought of having sex with a slave with artificial limbs,",
-				type: "cash",
-				effect: 0,
-			});
-			vignettes.push({
-				text: `a customer was greatly intimidated by ${his} combat p-limbs,`,
-				type: "cash",
-				effect: -1,
-			});
-		} else if (slave.amp === -5) {
-			vignettes.push({
-				text: `a customer was fascinated by ${his} cybernetic limbs, and spent almost as much time examining them as they did having sex with ${him},`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: "a customer was excited by the thought of having sex with a cybernetically enhanced slave,",
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a customer was greatly intimidated by the sight of ${his} cybernetic limbs and was frightened away,`,
-				type: "cash",
-				effect: -1,
-			});
-		}
-		if (slave.heels === 1 && !(["heels", "pumps", "extreme heels", "boots"].includes(slave.shoes))) {
-			vignettes.push({
-				text: `${he} enticed a new customer who had never really considered buttsex before they saw ${him} crawling along with ${his} asshole vulnerable,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.vaginalAccessory === "chastity belt") {
-			vignettes.push({
-				text: `a wavering customer who was disappointed that ${his} pussy is unavailable decided to try ${his} ass instead,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.collar === "shock punishment") {
-			vignettes.push({
-				text: `a customer discovered that the remote control for his video screen also worked on ${his} shock collar,`,
-				type: "trust",
-				effect: -1,
-			});
-		}
-		if (slave.fetish === "mindbroken") {
-			vignettes.push({
-				text: `a customer really enjoyed being able to treat ${him} however they liked without eliciting a reaction,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.intelligence+slave.intelligenceImplant < -50) {
-			vignettes.push({
-				text: `a customer managed to trick ${him} into fucking him without payment,`,
-				type: "cash",
-				effect: -1,
-			});
-		}
-		if (slave.accent > 2) {
-			vignettes.push({
-				text: `a wealthy foreign tourist was so glad to hear somebody speaking his native language that he hired ${him} for the whole week,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.face > 10 && canDoAnal(slave)) {
-			if (slave.dick > 0) {
-				if (slave.fetish === "buttslut" && jsRandom(0, 100) < 50) {
-					vignettes.push({
-						text: `a customer was surprised by ${his} penis, so ${he} hid it and enjoyed the buttsex without touching it,`,
-						type: "rep",
-						effect: 1,
-					});
-				} else if (slave.fetish === "buttslut") {
-					vignettes.push({
-						text: `a customer was surprised by ${his} penis, so ${he} hid it, but could barely tolerate anal without touching it,`,
-						type: "rep",
-						effect: -1,
-					});
-				} else if (slave.analSkill >= 100) {
-					vignettes.push({
-						text: `a customer was surprised by ${his} penis, so ${he} hid it and skillfully pretended to be a real girl,`,
-						type: "rep",
-						effect: 1,
-					});
-				}
-			}
-			if (slave.analSkill < 100 && slave.anus > 2) {
-				vignettes.push({
-					text: `a pair of customers enticed by ${his} beauty but disappointed by ${his} loose butthole doubled up on ${his} poor anus without mercy,`,
-					type: "health",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.fetishKnown === 1 && slave.fetishStrength > 95) {
-			if (slave.fetish === "buttslut" || slave.fetish === "dom") {
-				vignettes.push({
-					text: `${he} advertised ${himself} by forcing a slave in the stocks to eat ${his} ass, drumming up business,`,
-					type: "cash",
-					effect: 1,
-				});
-			} else if (slave.fetish === "masochist") {
-				vignettes.push({
-					text: `${he} cooperated with a citizen who wanted to whip ${his} tits black and blue,`,
-					type: "health",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.health < 20) {
-			vignettes.push({
-				text: `${he} attracted the attention of a slaveowner alarmed by ${his} poor health, and thought they seemed kind,`,
-				type: "devotion",
-				effect: -1,
-			});
-		}
-		if (slave.vaginalSkill >= 100) {
-			vignettes.push({
-				text: `${he} was hired to apply ${his} skills to a customer's virgin son,`,
-				type: "devotion",
-				effect: 0,
-			});
-		}
-		if (canDoAnal(slave) && slave.analSkill < 100 && slave.anus < 2) {
-			vignettes.push({
-				text: `a guy with a huge cock paid for the right to fuck ${him} in ${his} tight ass all night,`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (slave.relationship <= -2 && slave.intelligence+slave.intelligenceImplant <= 15) {
-			vignettes.push({
-				text: `${he} accidentally mentions how much ${he} loves you during intercourse with a customer who doesn't like to share,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.prestige > 0) {
-			vignettes.push({
-				text: `a college fraternity visiting the arcology for rush week hired ${him} for a gangbang,`,
-				type: "cash",
-				effect: 3,
-			});
-		}
-
-		if (V.arcologies[0].FSSupremacist !== "unset") {
-			if (slave.race === V.arcologies[0].FSSupremacistRace) {
-				vignettes.push({
-					text: `${he} lost a customer who couldn't bear to see a beautiful ${V.arcologies[0].FSSupremacistRace} be a whore,`,
-					type: "cash",
-					effect: -1,
-				});
-			}
-			if (V.arcologies[0].FSSupremacistRace === "asian") {
-				vignettes.push({
-					text: `${he} was hired to be the special guest at a rather unconventional seijin-shiki celebration party,`,
-					type: "cash",
-					effect: 1,
-				});
-			} else if (V.arcologies[0].FSSupremacistRace === "semitic") {
-				vignettes.push({
-					text: `${he} was hired to be the special guest at a rather unconventional bar mitzvah celebration party,`,
-					type: "cash",
-					effect: 1,
-				});
-			} else if (V.arcologies[0].FSSupremacistRace === "white") {
-				vignettes.push({
-					text: `${he} was hired to be the special guest at a rather unconventional Jugendweihe celebration party,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSSubjugationist !== "unset") {
-			if (slave.race === V.arcologies[0].FSSubjugationistRace) {
-				vignettes.push({
-					text: `${he} had a bad time in general, since most of ${his} customers didn't care about a ${V.arcologies[0].FSSubjugationistRace} prostitute's health or well-being,`,
-					type: "health",
-					effect: -1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSYouthPreferentialist !== "unset") {
-			if (slave.visualAge > 35) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who wants to keep their MILF fetish in the closet,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSMaturityPreferentialist !== "unset") {
-			if (slave.visualAge <= 20) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who wants to keep their fetish for young ${boy}s in the closet,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSGenderRadicalist !== "unset") {
-			if (slave.dick > 0 && slave.dick < 3) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who is coming to terms with Gender Radicalism, and is unthreatened by ${his} little penis,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSGenderFundamentalist !== "unset") {
-			if (slave.visualAge > 25) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who thinks ${he} resembles their ex-wife, who would never let them fuck her butt,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSRepopulationFocusSMR == 1) {
-			if (slave.pregType > 1 && slave.pregKnown > 1 && slave.belly >= 10000) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who loves fucking ${boy}s with wombs filled by more than a single child,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown > 1 && slave.bellyPreg >= 5000) {
-				vignettes.push({
-					text: `a customer loved ${his} pregnant belly so much that he came back for repeat business,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSRestart !== "unset") {
-			if (canGetPregnant(slave)) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who misses the risk of getting a ${boy} pregnant,`,
-					type: "cash",
-					effect: 3,
-				});
-			}
-		}
-		if (V.arcologies[0].FSPaternalist !== "unset") {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who likes to chat with intelligent prostitutes while fucking,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSDegradationist !== "unset") {
-			if (canTalk(slave) && slave.voice > 2) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who prefers ${boy}s with high-pitched screams,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			if (slave.visualAge > 40) {
-				vignettes.push({
-					text: `a customer wrote a note on ${his} face that said: 'Retire it to an arcade',`,
-					type: "trust",
-					effect: -1,
-				});
-			}
-			vignettes.push({
-				text: `a rich customer had fun seeing how much money he could cram in ${his} holes without using any lube,`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a displeased customer grabbed a permanent marker and wrote a critique of ${his} sex skills on ${his} chest,`,
-				type: "rep",
-				effect: -1,
-			});
-			vignettes.push({
-				text: `two sadistic customers had fun roughing ${him} up,`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (V.arcologies[0].FSBodyPurist !== "unset") {
-			if (slave.boobsImplant > 0) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who wants to keep their fetish for breast implants in the closet,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSTransformationFetishist !== "unset") {
-			if (slave.boobsImplant === 0) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who wants to keep their fetish for natural breasts in the closet,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			if (slave.boobsImplant >= 500) {
-				vignettes.push({
-					text: `a photographer won an award for an artistic close up of one of ${his} implant-heavy tits,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSSlimnessEnthusiast !== "unset") {
-			if (canTalk(slave) && slave.voice > 2) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who loves ${his} high-pitched squeals of pleasure,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			if (slave.boobs > 800) {
-				vignettes.push({
-					text: `${he} was publicly mocked as an ugly fat cow with dangling udders,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		} else if (V.arcologies[0].FSAssetExpansionist !== "unset") {
-			if (slave.boobs < 300) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who wants to keep their fetish for flat chested ${boy}s in the closet,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSPastoralist !== "unset") {
-			if (slave.lactation === 0) {
-				vignettes.push({
-					text: `${he} lost a customer who could not understand why nothing was coming out of ${his} nipples when they sucked on them,`,
-					type: "cash",
-					effect: -1,
-				});
-			}
-			if (slave.nipples === "fuckable") {
-				vignettes.push({
-					text: `${he} lost a customer who refused ${he} could possibly be a proper cow with nipples like ${his},`,
-					type: "cash",
-					effect: -1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSPhysicalIdealist !== "unset") {
-			if (slave.muscles <= 95) {
-				vignettes.push({
-					text: `${he} lost a customer who could barely believe that ${he} wasn't capable of holding ${himself} in a handstand,`,
-					type: "cash",
-					effect: -1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSChattelReligionist !== "unset") {
-			if (slave.behavioralFlaw === "devout") {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who desperately wants their cock to be the one that converts ${him},`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSRomanRevivalist !== "unset") {
-			if (slave.race === "white" && slave.height >= 185) {
-				vignettes.push({
-					text: `${he} attracted a customer who thought ${his} appearance worthy of a lusty northern barbarian,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSAztecRevivalist !== "unset") {
-			if (slave.devotion > 75 && slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} indulged a citizen by following a fertility ritual completely,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSEgyptianRevivalist !== "unset") {
-			vignettes.push({
-				text: `${he} got extra business from a group of citizens competing to get off with whores of each of the arcology's ethnic groups in the least time,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (V.arcologies[0].FSEdoRevivalist !== "unset") {
-			if (slave.face > 40 && slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who wished to do nothing more than converse with a beautiful and intelligent ${boy},`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} was hired to be the special guest at a rather unconventional genpuku celebration party,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (V.arcologies[0].FSArabianRevivalist !== "unset") {
-			if (slave.entertainSkill >= 100 && canTalk(slave) && slave.voice > 0 && slave.accent < 2) {
-				vignettes.push({
-					text: `${he} got repeat business from a customer who prefers prostitutes who can tell lovely stories,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSChineseRevivalist !== "unset") {
-			if (slave.dick > 0 && slave.balls == 2) {
-				vignettes.push({
-					text: `a citizen admired ${his} lack of balls and praised ${him} for being like the eunuchs in Chinese history,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} was hired to be the special guest at a rather unconventional Guan Li celebration party,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-
-		vignettes.push({
-			text: `one of the companies with an office in your arcology retained ${him} for a team-building bukkake party for its employees,`,
-			type: "rep",
-			effect: 1,
-		});
-		vignettes.push({
-			text: "a man dragged his crying wife along so she could watch him fuck a whore,",
-			type: "rep",
-			effect: 0,
-		});
-		if (V.seeDicks != 100) {
-			vignettes.push({
-				text: "a woman dragged her angry husband along so he could watch her get eaten out by a whore,",
-				type: "rep",
-				effect: 0,
-			});
-		} else {
-			vignettes.push({
-				text: "a man dragged his angry lover along so he could watch him get sucked off by a whore,",
-				type: "rep",
-				effect: 0,
-			});
-		}
-		vignettes.push({
-			text: `${he} went to sleep after being sold for sex all day, and had a dream about you loving ${him},`,
-			type: "devotion",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} went to sleep after being sold for sex all day, and had a dream about you letting a customer hurt ${him},`,
-			type: "devotion",
-			effect: -1,
-		});
-		vignettes.push({
-			text: `${he} went to sleep after being sold for sex all day, and had a dream about you protecting ${him} from a mean customer,`,
-			type: "trust",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} went to sleep after being sold for sex all day, and had a dream about you selling ${him} for good,`,
-			type: "trust",
-			effect: -1,
-		});
-	} else if (slave.assignment === "serve the public" || slave.assignment === window.Job.CLUB || slave.assignment === window.Job.DJ) {
-		let seed = jsRandom(1, 10);
-		switch (seed) {
-			case 1:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} witnessed a domestic dispute over another slut,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 2:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} saw an aphrodisiac addict ${he} knew sell herself into slavery,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 3:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} had to move to follow the <span class="green">most prominent citizens</span> to a newly fashionable hall,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 4:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that a citizen used a new and improved sex toy on ${him},`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 5:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was being used in public by an incestuous pair of citizens,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 6:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} saw a notorious slut come of age and start swapping anal for aphrodisiacs,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 7:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} saw a citizen experiment with lesbian sex for the first time, in public,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 8:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} watched a citizen descend into aphrodisiac addiction,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			case 9:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} watched a citizen develop the beginnings of sex addiction,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-			default:
-				vignettes.push({
-					text: `the most interesting thing that happened to ${him} at work was that ${he} witnessed a citizen using a public slut so brutally that they had to pay compensation afterward,`,
-					type: "rep",
-					effect: 0,
-				});
-				break;
-		}
-		seed = jsRandom(1, 5);
-		switch (seed) {
-			case 1:
-				vignettes.push({
-					text: `a citizen punished one of his slaves by tying her up in public near where ${slave.slaveName} was serving as a public slut. This made ${him} less popular that day,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case 2:
-				vignettes.push({
-					text: `a citizen shared one of his slaves with the public near where ${slave.slaveName} was serving as a public slut. This made ${him} less popular that day,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case 3:
-				vignettes.push({
-					text: `a private brothel offered a promotion near where ${slave.slaveName} was serving as a public slut. This made ${him} less popular that day,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case 4:
-				vignettes.push({
-					text: `some free sluts threw an aphrodisiac street party near where ${slave.slaveName} was serving as a public slut. This made ${him} less popular that day,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			default:
-				vignettes.push({
-					text: `a contract breaker was punished with the pillory near where ${slave.slaveName} was serving as a public slut. This made ${him} less popular that day,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-		}
-		seed = jsRandom(1, 5);
-		switch (seed) {
-			case 1:
-				vignettes.push({
-					text: `one of ${his} regular patrons got a divorce and came to ${him} for repeated consolation,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case 2:
-				vignettes.push({
-					text: `a club near where ${slave.slaveName} usually works had business trouble,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case 3:
-				vignettes.push({
-					text: `a competing slut that looks like ${him} fell ill, driving a patron to look for an alternative,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case 4:
-				vignettes.push({
-					text: `a street slut that works near ${him} was badly beaten by an abusive citizen and had to take time off. The reduced competition got ${his} more attention,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			default:
-				vignettes.push({
-					text: `an influx of tourists came into ${his} part of the arcology, earning ${him} more business for a day,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-		}
-
-		if (slave.fetishKnown === 1) {
-			switch (slave.fetish) {
-				case "submissive":
-					vignettes.push({
-						text: `${he} deeply impressed a citizen with ${his} sincere submission to them,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} lost a patron who secretly wanted ${him} to show a little initiative,`,
-						type: "rep",
-						effect: -1,
-					});
-					vignettes.push({
-						text: `an overeager sadistic customer roughed ${him} up more than a normal submissive like ${him} is used to,`,
-						type: "health",
-						effect: -1,
-					});
-					break;
-				case "cumslut":
-					vignettes.push({
-						text: `${he} deeply impressed a citizen with ${his} hunger for their cum,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a citizen who didn't know how much cum fetishes revolted them until ${he} displayed ${hers},`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "humiliation":
-					vignettes.push({
-						text: `${he} earned extra gratitude from a citizen who didn't know how much they liked public sex until ${he} got them to try it,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a citizen who didn't know how much exhibitionism turned them off until they tried public sex with ${him},`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "buttslut":
-					if (canDoAnal(slave)) {
-						vignettes.push({
-							text: `${he} earned extra gratitude from a citizen who didn't know how much they liked fucking buttholes until ${he} got them to try fucking ${hers},`,
-							type: "rep",
-							effect: 1,
-						});
-						vignettes.push({
-							text: `${he} disgusted a citizen who didn't know how much buttsex turned them off until ${he} got them to try fucking ${his} ass,`,
-							type: "rep",
-							effect: -1,
-						});
-					}
-					if (slave.butt >= 3) {
-						vignettes.push({
-							text: `${he} earned extra gratitude from a citizen who didn't know how much they liked big butts until ${he} gave them a lap dance they'll never forget,`,
-							type: "rep",
-							effect: 1,
-						});
-					}
-					vignettes.push({
-						text: `${he} earned extra gratitude from a citizen who appreciated a nice rear, even if it is off limits,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a citizen who didn't know how much butts turned them off until ${he} put ${his} hands on theirs,`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "boobs":
-					vignettes.push({
-						text: `${he} deeply impressed a citizen by orgasming to nothing but the feeling of them sucking ${his} nipples,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disappointed a female citizen who didn't know how uninterested she was in nipple play before trying it,`,
-						type: "rep",
-						effect: -1,
-					});
-					if (slave.nipples === "fuckable") {
-						vignettes.push({
-							text: `${he} left lasting impression on a pair of citizens after nearly passing out from a series of intense orgasms from getting ${his} nipples fucked,`,
-							type: "rep",
-							effect: 2,
-						});
-					}
-					break;
-				case "sadist":
-					vignettes.push({
-						text: `${he} deeply impressed a citizen who brought their own slave to ${his} for abuse with ${his} sadism,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `a citizen brought ${him} their own slave to abuse, but the sight proved to be a turn off,`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "masochist":
-					vignettes.push({
-						text: `${he} helped a citizen discover a new fetish by orgasming when they accidentally hurt ${him},`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disturbed a citizen who accidentally hurt ${him} by orgasming,`,
-						type: "rep",
-						effect: -1,
-					});
-					vignettes.push({
-						text: `a group of overzealous citizens gangbanging ${him} got a little too excited hearing ${him} get off on abuse, leaving ${him} sore and injured,`,
-						type: "health",
-						effect: -1,
-					});
-					break;
-				case "dom":
-					vignettes.push({
-						text: `${he} made a female citizen ${his} bitch: fortunately, the citizen wanted to be ${his} bitch and came back for more`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} accidentally overwhelmed a citizen with ${his} sexual dominance,`,
-						type: "rep",
-						effect: -1,
-					});
-					break;
-				case "pregnancy":
-					vignettes.push({
-						text: `${he} earned extra gratitude from a citizen who didn't know how much they liked pregnancy play until ${he} begged them to knock ${him} up,`,
-						type: "rep",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} disgusted a citizen who didn't know how much pregnancy play turned them off until ${he} begged them to knock ${him} up,`,
-						type: "rep",
-						effect: -1,
-					});
-			}
-		}
-		switch (slave.behavioralFlaw) {
-			case "arrogant":
-				vignettes.push({
-					text: `${he} manages to give a citizen the impression ${he} thinks ${himself} better than them,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "bitchy":
-				vignettes.push({
-					text: `${he} makes an emasculating remark to a citizen right after they fuck ${him},`,
-					type: "rep",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `${he} was slapped by a citizen who was angry at ${his} rude remarks,`,
-					type: "health",
-					effect: -1,
-				});
-				break;
-			case "odd":
-				vignettes.push({
-					text: `${he} infuriates a potential citizen with ${his} nervous tics,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "hates men":
-				vignettes.push({
-					text: `${his} disgust towards men surfaces at a bad time, angering a male citizen,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "hates women":
-				vignettes.push({
-					text: `${his} disgust towards women surfaces at a bad time, angering a female citizen,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "gluttonous":
-				vignettes.push({
-					text: `${he} accidentally lingers at a meal, missing an appointment with a citizen,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "anorexic":
-				vignettes.push({
-					text: `${his} bulimia surfaces at an extremely inopportune moment, turning a citizen off,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "devout":
-				vignettes.push({
-					text: `a citizen catches ${him} praying to ${himself} as they inserted themsleves into ${him}, turning them off,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "liberated":
-				vignettes.push({
-					text: `${he} treats a rude citizen impolitely, because ${he} thinks that's fair,`,
-					type: "rep",
-					effect: -1,
-				});
-		}
-		switch (slave.sexualFlaw) {
-			case "hates oral":
-				vignettes.push({
-					text: `${he} vomits while trying to deepthroat a citizen,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "hates anal":
-				vignettes.push({
-					text: `${he} cries while taking anal from a citizen who isn't into painal,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "hates penetration":
-				vignettes.push({
-					text: `${he} cries while taking a pounding from a citizen who likes their sex consensual,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "shamefast":
-				vignettes.push({
-					text: `${he} cries while a citizen looks ${him} over,`,
-					type: "rep",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `${he} disrobed so slowly that a horny citizen gave up on ${him},`,
-					type: "rep",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `a citizen impatient with how slowly ${he} was disrobing ripped off ${his} clothes and roughed ${him} up,`,
-					type: "health",
-					effect: -1,
-				});
-				break;
-			case "idealistic":
-				vignettes.push({
-					text: `${he} cries when explaining to a citizen that sex with ${him} is free,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "repressed":
-				vignettes.push({
-					text: `${he} misunderstands a citizen's lewd requests, turning them off,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "apathetic":
-				vignettes.push({
-					text: `${he} fails to notice when a citizen achieves orgasm,`,
-					type: "rep",
-					effect: -1,
-				});
-				break;
-			case "neglectful":
-				vignettes.push({
-					text: `${he} brings a denial fetishist to orgasm three times without cumming ${himself}, impressing them completely,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "cum addict":
-				vignettes.push({
-					text: `${he}'s so focused on sucking down a client's cum that ${he} managed to drive them to repeated orgasm, earning their admiration once the feeling returns to their legs,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "anal addict":
-				vignettes.push({
-					text: `${he} takes an awe inspiring train of dicks in ${his} ass, well past the point where most would have passed out from pain,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "attention whore":
-				vignettes.push({
-					text: `${he} earned extra gratitude by drawing attention to a savvy businessman from their superiors,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "breast growth":
-				vignettes.push({
-					text: `${he} earns extra gratitude from a citizen who never realized breast growth turned them on so much,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "abusive":
-				vignettes.push({
-					text: `${he} abuses a rival public servant so viciously that a catfight lover takes ${him} right there,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "malicious":
-				vignettes.push({
-					text: `${he} earned extra gratitude from a masochist who loved the way ${he} traced ${his} scars, and added some new ones,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "self hating":
-				vignettes.push({
-					text: `the way ${he} takes everything thrown at ${him} like nothing disturbs group of citizens, though one of them enjoys it more than they let on and comes to ${him} for sex later,`,
-					type: "rep",
-					effect: 3,
-				});
-				break;
-			case "breeder":
-				vignettes.push({
-					text: `${his} pregnancy obsession earns ${his} extra gratitude from a man with an intense pregnancy fetish,`,
-					type: "rep",
-					effect: 3,
-				});
-		}
-		switch (slave.behavioralQuirk) {
-			case "confident":
-				vignettes.push({
-					text: `${he} confidently presses forward with a wavering citizen, and gets them to fuck ${him},`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "cutting":
-				vignettes.push({
-					text: `${he} makes such a gloriously cutting remark to a male citizen that a female bystander takes ${him} right there,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "funny":
-				vignettes.push({
-					text: `${he} makes a group of citizens laugh so hard, one of them comes to ${him} for sex later,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "fitness":
-				vignettes.push({
-					text: `${he} continues a marathon gangbang past the point where most would have passed out,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "adores women":
-				vignettes.push({
-					text: `${he} strikes up a personal friendship with a regular female patron,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} adoringly kisses the feet of a local socialite who leaves ${him} a generous tip,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "adores men":
-				vignettes.push({
-					text: `${he} strikes up a personal friendship with a regular male patron,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} practically worships a minor celebrity, eagerly slobbering over his cock and covering ${himself} with his cum,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "insecure":
-				vignettes.push({
-					text: `${he} successfully convinces a regular patron that they are reliant on ${him} emotionally,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "sinful":
-				vignettes.push({
-					text: `${he} helps a citizen get past their religious hang-ups through sex with the friendly neighborhood slut,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "advocate":
-				vignettes.push({
-					text: `${he} successfully convinces a wavering potential citizen that there's nothing wrong with banging a public slut,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} manages to convince a skeptical businessman about the merits of using slaves,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${his} enthusiastic discussion of the merits of slavery convinced a young woman to sell herself into slavery, so the new owner gave you a finder's fee,`,
-					type: "cash",
-					effect: 1,
-				});
-		}
-		switch (slave.sexualQuirk) {
-			case "gagfuck queen":
-				vignettes.push({
-					text: `${he} earns extra gratitude from a citizen who's obsessed with gagfucks,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "painal queen":
-				vignettes.push({
-					text: `${he} earns extra gratitude from a citizen who's obsessed with painal,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "strugglefuck queen":
-				vignettes.push({
-					text: `${he} earns extra gratitude from a citizen who's obsessed with strugglefucking,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "tease":
-				vignettes.push({
-					text: `${he} convinces a citizen who's never had sex with a street slut to patronize ${him} with some truly inspired flirting,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `a few partiers were so impressed with ${his} provocative teasing that they repeated ${his} wit to friends,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `a few partygoers were so impressed with ${his} provocative teasing that they left ${him} a sizable tip,`,
-					type: "cash",
-					effect: 1,
-				});
-				break;
-			case "romantic":
-				vignettes.push({
-					text: `a citizen becomes infatuated with ${him}, since they are convinced ${he}'s infatuated with them,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "perverted":
-				vignettes.push({
-					text: `${he} earns some momentary notoriety by engaging in a previously unheard-of sex act,`,
-					type: "rep",
-					effect: 1,
-				});
-				break;
-			case "caring":
-				vignettes.push({
-					text: `${he} serves as an impromptu sounding board for a citizen having marital trouble,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `a citizen was so enamored with ${his} kind and caring manner than they proposed to ${him} and offered to take ${him} away, and when ${he} refused, they urged a sizable tip on ${him},`,
-					type: "cash",
-					effect: 1,
-				});
-		}
-
-		if (slave.pitKills > 0) {
-			vignettes.push({
-				text: `${he} earns extra gratitude from a citizen obsessed with the fact that ${he}'s a killer,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.oralCount > 500) {
-			vignettes.push({
-				text: `a citizen into degradation becomes obsessed with driving ${his} oral mileage as high as possible,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.analCount > 500 && slave.anus > 0) {
-			vignettes.push({
-				text: `a citizen into degradation becomes obsessed with driving ${his} anal mileage as high as possible,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.vaginalCount > 500 && slave.vagina > 0) {
-			vignettes.push({
-				text: `a citizen into degradation becomes obsessed with driving ${his} pussy mileage as high as possible,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.devotion > 95) {
-			vignettes.push({
-				text: `${he} really pushed ${himself} to please a citizen with tastes that disgusted ${him},`,
-				type: "rep",
-				effect: 1,
-			});
-		} else if (slave.devotion < -50) {
-			vignettes.push({
-				text: `${his} fury at being sold for sex turned a citizen off before they could fuck ${him},`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.devotion <= 20) {
-			vignettes.push({
-				text: `${he} treasured a love token given to ${his} by a citizen ${he} fooled into thinking ${his} affection was real,`,
-				type: "devotion",
-				effect: -1,
-			});
-		}
-		if (slave.trust > 95) {
-			vignettes.push({
-				text: `${he} really pushed ${himself} to accept a citizen with tastes that frightened ${him},`,
-				type: "rep",
-				effect: 1,
-			});
-		} else if (slave.trust < -50) {
-			vignettes.push({
-				text: `${his} tearful terror at being forced to offer ${himself} for sex turned a citizen off before they could fuck ${him},`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.livingRules === "luxurious") {
-			vignettes.push({
-				text: `${he} got a truly perfect night's sleep, which put ${him} in the right frame of mind for the whole day,`,
-				type: "rep",
-				effect: 1,
-			});
-		} else if (slave.livingRules === "spare") {
-			if (canHear(slave)) {
-				vignettes.push({
-					text: `${he} got a poor night's sleep in the noisy dormitory, which took the shine off ${his} efforts for the whole day,`,
-					type: "rep",
-					effect: -1,
-				});
-			} else {
-				vignettes.push({
-					text: `the noise from the dormitory could not possibly disturb ${his} sleep, so ${he} got much better sleep than ${he} would have otherwise,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (slave.releaseRules === "permissive" || slave.releaseRules === "masturbation") {
-			vignettes.push({
-				text: `a citizen asked if ${he} masturbates, and then spent an hour jerking off as ${he} described how,`,
-				type: "rep",
-				effect: 1,
-			});
-		} else if (slave.releaseRules === "restrictive") {
-			vignettes.push({
-				text: `a citizen asked if ${he} masturbates, and seemed disappointed when ${he} answered honestly,`,
-				type: "rep",
-				effect: 0,
-			});
-		} else {
-			vignettes.push({
-				text: `a closeted female citizen asked about ${his} sex life with other slaves, and was enthralled by ${his} answer,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.health > 80) {
-			vignettes.push({
-				text: `a potential citizen in the medical field was fascinated by ${his} health, and spent almost as much time examining ${him} as they did having sex with ${him},`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
-			if (slave.weight < 10) {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a citizen who misses ${boy}s without a spare tire around their middle,`,
-					type: "rep",
-					effect: 0,
-				});
-			} else if (slave.weight < 95) {
-				vignettes.push({
-					text: `a potential citizen told ${his} that they are looking forward to patronizing ${his} once ${he} gains a lot more weight,`,
-					type: "rep",
-					effect: 0,
-				});
-			} else {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a citizen who loves them big and soft`,
-					type: "rep",
-					effect: 0,
-				});
-			}
-			if (slave.weight > 30) {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a citizen who enjoyed the way ${his} middle jiggled as they fucked ${him},`,
-					type: "rep",
-					effect: 0,
-				});
-			}
-		} else {
-			if (slave.weight > 95) {
-				vignettes.push({
-					text: `a potential citizen told ${him} that they are looking forward to patronizing ${him} once ${he} loses a lot of weight,`,
-					type: "rep",
-					effect: 0,
-				});
-			} else if (slave.weight > 30) {
-				vignettes.push({
-					text: `a potential citizen told ${him} that they are looking forward to patronizing ${him} once ${he} loses some weight,`,
-					type: "rep",
-					effect: 0,
-				});
-			} else if (slave.weight <= -30) {
-				vignettes.push({
-					text: `a potential citizen told ${him} that they are looking forward to patronizing ${him} once ${he} gains some weight,`,
-					type: "rep",
-					effect: 0,
-				});
-			} else if (slave.weight < -95) {
-				vignettes.push({
-					text: `a potential citizen told ${him} that they are looking forward to patronizing ${him} once ${he} gains a lot of weight,`,
-					type: "rep",
-					effect: 0,
-				});
-			}
-		}
-		if (slave.drugs === "testicle enhancement") {
-			vignettes.push({
-				text: `${he} took it in public, with ${his} copious ejaculation attracting more citizens,`,
-				type: "rep",
-				effect: 1,
-			});
-		} else if (slave.drugs === "hyper testicle enhancement") {
-			vignettes.push({
-				text: `${he} bloated a female citizen's belly with ${his} copious ejaculate, leading her to recommend your slaves for girls that want to look pregnant without actually getting pregnant,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.aphrodisiacs > 1 || slave.inflationType === "aphrodisiac") {
-			vignettes.push({
-				text: `${his} piteous begging for sex due to ${his} extreme aphrodisiac dosage turned a citizen off,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.inflationType === "aphrodisiac") {
-			vignettes.push({
-				text: `${his} piteous begging for sex coupled with ${his} bloated belly pleased a citizen who loves desperate sluts,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${his} piteous begging for sex coupled with ${his} bloated belly horrified a citizen who didn't realize how low a ${boy} could stoop,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.addict > 50) {
-			vignettes.push({
-				text: `${he} zoned out badly due to a low point between aphrodisiac doses, disappointing a citizen,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.bellyPreg >= 10000 || slave.bellyImplant >= 10000) {
-			vignettes.push({
-				text: `${he} earned extra gratitude from a citizen who likes to do nothing more than cuddle with ${his} swollen belly,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a night with guy who likes rough, hard sex with heavily pregnant ${boy}s took its toll on ${him}`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (slave.bellyFluid >= 5000) {
-			vignettes.push({
-				text: `${he} earned extra gratitude from a citizen who loved the way ${his} belly sloshed and moved to their teasing,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} disgusted a citizen when his forceful fucking caused ${him} to release ${his} contained ${slave.inflationType} all over them,`,
-				type: "rep",
-				effect: -2,
-			});
-		}
-		if ((slave.hormoneBalance >= 100 || slave.ballType == "sterile") && !canAchieveErection(slave)) {
-			if (slave.dick > 0) {
-				vignettes.push({
-					text: `${he} disappointed a citizen who was sure they could get ${slave.slaveName}'s cock erect,`,
-					type: "rep",
-					effect: -1,
-				});
-				vignettes.push({
-					text: `${he} earned extra gratitude from a citizen who seems unthreatened by ${his} soft dick,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		} else if (slave.hormoneBalance <= -100 && slave.dick === 0) {
-			vignettes.push({
-				text: `${he} earned extra gratitude from a female citizen who adores the masculinity produced by ${slave.slaveName}'s hormone regime,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.dick > 0 && canPenetrate(slave)) {
-			vignettes.push({
-				text: `${he} earned extra gratitude from a citizen who likes to see his wife get fucked by a dick${boy} whore,`,
-				type: "rep",
-				effect: 1,
-			});
-			if (slave.dick > 3) {
-				vignettes.push({
-					text: `${he} earned extra gratitude from a female citizen who likes big stiff cocks, and cannot lie,`,
-					type: "rep",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} irritated a male citizen who brought his girlfriend with him by accidentally showing him up,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.balls == 0 && slave.dick > 0) {
-			vignettes.push({
-				text: `a slave trainer pointed ${him} out as an example of a slave with well done gelding surgery,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.balls > 3) {
-			vignettes.push({
-				text: `${he} disappoints a citizen who wants ${him} to look like a natural girl, since ${his} balls are too big to be hidden,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (canDoVaginal(slave)) {
-			if (slave.vagina === 1) {
-				vignettes.push({
-					text: `${he} got extra attention from a citizen who really likes ${him}, and wants to fuck ${his} pussy as much as possible while it's still tight,`,
-					type: "rep",
-					effect: 1,
-				});
-			} else if (slave.vagina > 2) {
-				vignettes.push({
-					text: `${he} disappointed a citizen whose cock is just too small for ${his} big cunt,`,
-					type: "rep",
-					effect: -1,
-				});
-				if (slave.behavioralQuirk === "cutting" && slave.intelligence+slave.intelligenceImplant > 50) {
-					vignettes.push({
-						text: `${he} helped a citizen discover a new fetish by making cutting remarks when their cock was too small for ${his} big cunt,`,
-						type: "rep",
-						effect: 1,
-					});
-				} else if (slave.behavioralFlaw === "bitchy") {
-					vignettes.push({
-						text: `${he} irritated a male citizen with ${his} complaints that they were too small to please ${him},`,
-						type: "rep",
-						effect: -3,
-					});
-				}
-			}
-		}
-		if (canDoAnal(slave)) {
-			if (slave.anus === 1) {
-				vignettes.push({
-					text: `${he} got extra attention from a citizen who really likes ${his} butthole, and wants to fuck it as much as possible while it's still tight,`,
-					type: "rep",
-					effect: 1,
-				});
-			} else if (slave.anus > 2) {
-				vignettes.push({
-					text: `${he} disappointed a citizen whose cock is just too small for ${his} loose butthole,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.face > 40) {
-			vignettes.push({
-				text: `${he} lost a potential citizen who was so intimidated by ${his} great beauty that they decided to find a homelier whore,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.face < -10) {
-			vignettes.push({
-				text: `${he} earned extra gratitude from a citizen who lacks self-confidence, and is more comfortable with homely whores,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.visualAge > 40) {
-			if (slave.face > 10 && slave.race == "asian") {
-				vignettes.push({
-					text: `${he} got extra gratitude from a citizen who loves well-preserved asian ladies,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} earned extra gratitude from a citizen with serious mommy issues,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.lips > 70) {
-			vignettes.push({
-				text: `${he} earned extra gratitude from a citizen who likes to play with ${his} lips nonsexually (don't ask),`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (!canTalk(slave)) {
-			vignettes.push({
-				text: `${he} impressed a citizen who didn't know how relaxing a ${boy} who can't talk could be,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.muscles > 95) {
-			vignettes.push({
-				text: `${he} impressed a citizen who was so eager to share workout plans with ${him} that they almost forgot to have sex with ${him},`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} gained extra gratitude from a female citizen who likes a ${boy} who can bench-press her before and after they fuck,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} disappointed a citizen by accidentally revealing that ${he}'s considerably stronger than him,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.lactation > 0) {
-			vignettes.push({
-				text: `${he} provided fresh milk for the coffee served at a citizen's business meeting,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} provided fresh milk at a trendy arcology coffeehouse,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (!canWalk(slave)) {
-			vignettes.push({
-				text: `${his} lack of mobility severely hindered ${his} attempts to please citizens,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else {
-			if (slave.boobs > 1500 && slave.boobsImplant === 0) {
-				vignettes.push({
-					text: `a young citizen convinced ${him} to jump rope so they could watch ${his} massive natural breasts flop around,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (slave.amp === 1) {
-			vignettes.push({
-				text: `${he} disappointed a citizen who thought they would enjoy fucking a quadruple amputee, but found it revolting,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -1) {
-			vignettes.push({
-				text: `a strange citizen was excited by the sight of ${his} prosthetic limbs,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a citizen was disgusted at the thought of ${his} basic prosthetic limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-			vignettes.push({
-				text: `a citizen was put off by ${his} prosthetic limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -2) {
-			vignettes.push({
-				text: `a citizen was excited by ${his} vibrating fingertips,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: "a citizen was indifferent to the thought of having sex with a slave with artificial limbs,",
-				type: "rep",
-				effect: 0,
-			});
-			vignettes.push({
-				text: `a citizen was put off by ${his} crude artificial limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -3) {
-			vignettes.push({
-				text: `a strange citizen was excited by the sight of ${his} artificial limbs,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: "a citizen was indifferent to the thought of having sex with a slave with artificial limbs,",
-				type: "rep",
-				effect: 0,
-			});
-			vignettes.push({
-				text: `a citizen was put off by the sight of ${his} prosthetic limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -4) {
-			vignettes.push({
-				text: `a citizen was excited by the thought of having sex with a slave with p-limbs, but was scared off by ${his} combat p-limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-			vignettes.push({
-				text: "a citizen was indifferent to the thought of having sex with a slave with artificial limbs,",
-				type: "rep",
-				effect: 0,
-			});
-			vignettes.push({
-				text: `a citizen was greatly intimidated by ${his} combat p-limbs,`,
-				type: "rep",
-				effect: -1,
-			});
-		} else if (slave.amp === -5) {
-			vignettes.push({
-				text: `a citizen was fascinated by ${his} cybernetic limbs, and spent almost as much time examining them as they did having sex with ${him},`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: "a citizen was excited by the thought of having sex with a cybernetically enhanced slave,",
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a citizen was greatly intimidated by the sight of ${his} cybernetic limbs and was frightened away,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.heels === 1 && !(["heels", "pumps", "extreme heels", "boots"].includes(slave.shoes))) {
-			vignettes.push({
-				text: `${he} enticed a new patron who had never really considered buttsex before they saw ${him} crawling along with ${his} asshole vulnerable,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.vaginalAccessory === "chastity belt") {
-			vignettes.push({
-				text: `a wavering citizen who was disappointed that ${his} pussy is unavailable decided to try ${his} ass instead,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.collar === "shock punishment") {
-			vignettes.push({
-				text: `a citizen discovered that the remote control for his video screen also worked on ${his} shock collar,`,
-				type: "trust",
-				effect: -1,
-			});
-		}
-		if (slave.fetish === "mindbroken") {
-			vignettes.push({
-				text: `a citizen really enjoyed being able to treat ${him} however they liked without eliciting a reaction,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.intelligence+slave.intelligenceImplant < -50) {
-			vignettes.push({
-				text: `a low-class citizen who had no business fucking ${him} managed to trick ${him} into fucking him anyway,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.accent > 2) {
-			vignettes.push({
-				text: `a wealthy immigrant was so glad to hear somebody speaking his native language that he hired ${him} for the whole week,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.face > 10 && canDoAnal(slave)) {
-			if (slave.dick > 0) {
-				if (slave.fetish === "buttslut" && jsRandom(0, 100) < 50) {
-					vignettes.push({
-						text: `a citizen was surprised by ${his} penis, so ${he} hid it and enjoyed the buttsex without touching it,`,
-						type: "rep",
-						effect: 1,
-					});
-				} else if (slave.fetish === "buttslut") {
-					vignettes.push({
-						text: `a citizen was surprised by ${his} penis, so ${he} hid it and skillfully pretended to be a real girl,`,
-						type: "rep",
-						effect: -1,
-					});
-				} else if (slave.analSkill >= 100) {
-					vignettes.push({
-						text: `a citizen was surprised by ${his} penis, so ${he} hid it, but could barely tolerate anal without touching it`,
-						type: "rep",
-						effect: 1,
-					});
-				}
-			}
-			if (slave.analSkill < 100 && slave.anus > 2) {
-				vignettes.push({
-					text: `a pair of customers enticed by ${his} beauty but disappointed by ${his} loose butthole doubled up on ${his} poor anus without mercy,`,
-					type: "health",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.fetishKnown === 1 && slave.fetishStrength > 95) {
-			if (slave.fetish === "buttslut" || slave.fetish === "dom") {
-				vignettes.push({
-					text: `${he} showed off by forcing a slave in the stocks to eat ${his} ass`,
-					type: "rep",
-					effect: 1,
-				});
-			} else if (slave.fetish === "masochist") {
-				vignettes.push({
-					text: `${he} cooperated with a customer who wanted to whip ${his} tits black and blue`,
-					type: "health",
-					effect: -1,
-				});
-			}
-		}
-		if (slave.health < 20) {
-			vignettes.push({
-				text: `${he} attracted the attention of a slaveowner alarmed by ${his} poor health, and thought he seemed kind,`,
-				type: "devotion",
-				effect: -1,
-			});
-		}
-		if (slave.vaginalSkill >= 100) {
-			vignettes.push({
-				text: `${he} was brought in to apply ${his} skills to a prominent citizen's virgin son,`,
-				type: "devotion",
-				effect: 0,
-			});
-		}
-		if (canDoAnal(slave) && slave.analSkill < 100 && slave.anus < 2) {
-			vignettes.push({
-				text: `a guy with a huge cock insisted on fucking ${him} in ${his} tight ass all night,`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (slave.relationship <= -2 && slave.intelligence+slave.intelligenceImplant <= 15) {
-			vignettes.push({
-				text: `${he} accidentally mentions how much ${he} loves you during intercourse with a citizen who doesn't like to share,`,
-				type: "rep",
-				effect: -1,
-			});
-		}
-		if (slave.prestige > 0) {
-			vignettes.push({
-				text: `a college fraternity visiting the arcology for rush week invited ${him} to a gangbang,`,
-				type: "rep",
-				effect: 3,
-			});
-		}
-
-		if (V.arcologies[0].FSSupremacist !== "unset") {
-			if (slave.race === V.arcologies[0].FSSupremacistRace) {
-				vignettes.push({
-					text: `${he} disappointed a citizen who couldn't bear to see a beautiful ${V.arcologies[0].FSSupremacistRace} be a public slut,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-			if (V.arcologies[0].FSSupremacistRace === "asian") {
-				vignettes.push({
-					text: `${he} was invited to and livened up a rather unconventional seijin-shiki celebration party,`,
-					type: "rep",
-					effect: 1,
-				});
-			} else if (V.arcologies[0].FSSupremacistRace === "semitic") {
-				vignettes.push({
-					text: `${he} was invited to and livened up a rather unconventional bar mitzvah celebration party,`,
-					type: "rep",
-					effect: 1,
-				});
-			} else if (V.arcologies[0].FSSupremacistRace === "white") {
-				vignettes.push({
-					text: `${he} was invited to and livened up a rather unconventional Jugendweihe celebration party,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSSubjugationist !== "unset") {
-			if (slave.race === V.arcologies[0].FSSubjugationistRace) {
-				vignettes.push({
-					text: `${he} had a bad time in general, since most of the citizens who used ${him} didn't care about a ${V.arcologies[0].FSSubjugationistRace} prostitute's health or well-being,`,
-					type: "health",
-					effect: -1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSYouthPreferentialist !== "unset") {
-			if (slave.visualAge > 35) {
-				vignettes.push({
-					text: `${he} gratified a citizen who wants to keep his MILF fetish in the closet,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSMaturityPreferentialist !== "unset") {
-			if (slave.visualAge <= 20) {
-				vignettes.push({
-					text: `${he} gratified a citizen who wants to keep his fetish for young ${boy} in the closet,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSGenderRadicalist !== "unset") {
-			if (slave.dick > 0 && slave.dick < 3) {
-				vignettes.push({
-					text: `${he} gratified a citizen who is coming to terms with Gender Radicalism, and is unthreatened by ${his} little penis,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSGenderFundamentalist !== "unset") {
-			if (slave.visualAge > 25) {
-				vignettes.push({
-					text: `${he} gratified a citizen who thinks ${he} resembles his ex-wife, who would never let him fuck her butt,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSRepopulationFocusSMR == 1) {
-			if (slave.pregType > 1 && slave.pregKnown > 1 && slave.belly >= 10000) {
-				vignettes.push({
-					text: `${he} gratified a citizen who enjoys the feeling of a womb filled with more than a single child,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown > 1 && slave.bellyPreg >= 5000) {
-				vignettes.push({
-					text: `a citizen loved ${his} pregnant belly so much that he came back for repeat service,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSRestart !== "unset") {
-			if (canGetPregnant(slave)) {
-				vignettes.push({
-					text: `${he} gratified a citizen who misses the risk of getting a ${boy} pregnant,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSPaternalist !== "unset") {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} gratified a citizen who likes to chat with intelligent prostitutes as they fuck ${him},`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSDegradationist !== "unset") {
-			if (canTalk(slave) && slave.voice > 2) {
-				vignettes.push({
-					text: `${he} gratified a citizen who prefers ${boy} with high-pitched screams,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			if (slave.visualAge > 40) {
-				vignettes.push({
-					text: `a citizen wrote a note on ${his} face that said: 'Retire it to an arcade',`,
-					type: "trust",
-					effect: -1,
-				});
-			}
-			vignettes.push({
-				text: `a rich citizen had fun seeing how much money he could cram in ${his} holes without using any lube,`,
-				type: "cash",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `a displeased citizen grabbed a permanent marker and wrote a critique of ${his} sex skills on ${his} chest,`,
-				type: "rep",
-				effect: -1,
-			});
-			vignettes.push({
-				text: `two sadistic citizens had fun roughing ${him} up,`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (V.arcologies[0].FSBodyPurist !== "unset") {
-			if (slave.boobsImplant > 0) {
-				vignettes.push({
-					text: `${he} gratified a citizen who wants to keep his fetish for breast implants in the closet,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		} else if (V.arcologies[0].FSTransformationFetishist !== "unset") {
-			if (slave.boobsImplant === 0) {
-				vignettes.push({
-					text: `${he} gratified a citizen who wants to keep his fetish for natural breasts in the closet,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			if (slave.boobsImplant >= 500) {
-				vignettes.push({
-					text: `a photographer won an award for an artistic close up of one of ${his} implant-heavy tits,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSSlimnessEnthusiast !== "unset") {
-			if (canTalk(slave) && slave.voice > 2) {
-				vignettes.push({
-					text: `${he} gratified a citizen who loves ${his} high-pitched squeals of pleasure,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			if (slave.boobs > 800) {
-				vignettes.push({
-					text: `${he} was publicly mocked as an ugly fat cow with dangling udders,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		} else if (V.arcologies[0].FSAssetExpansionist !== "unset") {
-			if (slave.boobs < 300) {
-				vignettes.push({
-					text: `${he} gratified a citizen who wants to keep his fetish for flat chested ${boy}s in the closet,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSPastoralist !== "unset") {
-			if (slave.lactation === 0) {
-				vignettes.push({
-					text: `${he} disappointed a citizen who could not understand why nothing was coming out of ${his} nipples when he sucked on them,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-			if (slave.nipples === "fuckable") {
-				vignettes.push({
-					text: `${he} left a citizen deeply confused over how ${he} could possibly be a proper cow without suitable teats,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSPhysicalIdealist !== "unset") {
-			if (slave.muscles <= 95) {
-				vignettes.push({
-					text: `${he} disappointed a citizen who could barely believe that ${he} wasn't capable of holding ${himself} in a handstand,`,
-					type: "rep",
-					effect: -1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSChattelReligionist !== "unset") {
-			if (slave.behavioralFlaw === "devout") {
-				vignettes.push({
-					text: `${he} gratified a citizen who desperately wants his cock to be the one that converts ${him},`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSRomanRevivalist !== "unset") {
-			if (slave.race === "white" && slave.height >= 185) {
-				vignettes.push({
-					text: `${he} gratified a citizen who thought ${his} appearance worthy of a lusty northern barbarian,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSAztecRevivalist !== "unset") {
-			if (slave.devotion > 75 && slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} indulged a citizen by following a fertility ritual completely,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSEgyptianRevivalist !== "unset") {
-			vignettes.push({
-				text: `${he} got extra attention from a group of citizens competing to get off with whores of each of the arcology's ethnic groups in the least time,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (V.arcologies[0].FSEdoRevivalist !== "unset") {
-			if (slave.face > 40 && slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} gratified a citizen who wished to do nothing more than converse with a beautiful and intelligent ${boy},`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} was invited to and livened up a rather unconventional genpuku celebration party,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (V.arcologies[0].FSArabianRevivalist !== "unset") {
-			if (slave.entertainSkill >= 100 && canTalk(slave) && slave.voice > 0 && slave.accent < 2) {
-				vignettes.push({
-					text: `${he} gratified a citizen who prefers prostitutes who can tell lovely stories,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (V.arcologies[0].FSChineseRevivalist !== "unset") {
-			if (slave.dick > 0 && slave.balls == 2) {
-				vignettes.push({
-					text: `a citizen admired ${his} lack of balls and praised ${him} for being like the eunuchs in Chinese history,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} was invited to and livened up a rather unconventional Guan Li celebration party,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-
-		vignettes.push({
-			text: `one of the companies with an office in your arcology brought ${him} in for a team-building bukkake party for its employees,`,
-			type: "rep",
-			effect: 1,
-		});
-		vignettes.push({
-			text: "a man dragged his crying wife along so she could watch him fuck a public slut,",
-			type: "rep",
-			effect: 0,
-		});
-		if (V.seeDicks != 100) {
-			vignettes.push({
-				text: "a woman dragged her angry husband along so he could watch his wife get eaten out by a public slut,",
-				type: "rep",
-				effect: 0,
-			});
-		} else {
-			vignettes.push({
-				text: "a man dragged his angry lover along so he could watch his boyfriend get sucked off by a public slut,",
-				type: "rep",
-				effect: 0,
-			});
-		}
-		vignettes.push({
-			text: `${he} went to sleep after having sex with strangers all day, and had a dream about you loving ${him},`,
-			type: "devotion",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} went to sleep after having sex with strangers all day, and had a dream about you letting a citizen hurt ${him},`,
-			type: "devotion",
-			effect: -1,
-		});
-		vignettes.push({
-			text: `${he} went to sleep after having sex with strangers all day, and had a dream about you protecting ${him} from a mean citizen,`,
-			type: "trust",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} went to sleep after having sex with strangers all day, and had a dream about you selling ${him} for good,`,
-			type: "trust",
-			effect: -1,
-		});
-	} else if (slave.assignment === "be a servant" || slave.assignment === "work as a servant") {
-		if (slave.fetishKnown === 1) {
-			switch (slave.fetish) {
-				case "cumslut":
-					vignettes.push({
-						text: `when some of your cum accidentally landed on the floor, ${he} cleaned it up with ${his} tongue,`,
-						type: "devotion",
-						effect: 1,
-					});
-					vignettes.push({
-						text: `${he} licked off some sperm from the ground, while cleaning up after an orgy,`,
-						type: "devotion",
-						effect: 0,
-					});
-					break;
-				case "humiliation":
-					vignettes.push({
-						text: `${he} loved getting absolutely filthy while cleaning everything else,`,
-						type: "devotion",
-						effect: 1,
-					});
-			}
-		}
-		switch (slave.behavioralFlaw) {
-			case "arrogant":
-				vignettes.push({
-					text: `${he} refused to clean up a particular nasty room in the penthouse, earning ${himself} harsh punishment,`,
-					type: "trust",
-					effect: -1,
-				});
-				break;
-			case "gluttonous":
-				vignettes.push({
-					text: `${he} was thrilled to be getting rid of leftover food the only way ${he} knew how,`,
-					type: "devotion",
-					effect: 1,
-				});
-		}
-		if (slave.fetish === "mindbroken") {
-			vignettes.push({
-				text: `${he} forgot to sleep and no one bothered to tell ${him} to. ${He} collapsed from exhaustion halfway through the week, but even by then ${he}'d gotten all ${his} work done and then some,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.amp === 1) {
-			vignettes.push({
-				text: `${he} was soaped up, tied to a pole, and used as a very inefficient mop. While being used to clean outside, ${he} certainly drew some stares,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `${he} scrubbed the floor of the communal showers with a brush held in ${his} mouth, glad to be able to do something at least,`,
-				type: "devotion",
-				effect: 1,
-			});
-		}
-		if (slave.intelligence+slave.intelligenceImplant > 50) {
-			vignettes.push({
-				text: `${he} devised a highly efficient way to get ${his} entire week's worth of work done in only three days. As a reward, ${he} was given - you guessed it - more work,`,
-				type: "cash",
-				effect: 1,
-			});
-		} else if (slave.intelligence+slave.intelligenceImplant < -50) {
-			vignettes.push({
-				text: `after being told all ${he} needed was some 'elbow grease', ${he} wasted an obscene amount of time searching for it,`,
-				type: "cash",
-				effect: -1,
-			});
-		}
-		if (slave.voice === 0) {
-			vignettes.push({
-				text: `a few citizens mistook ${him} for a whore while ${he} was going about ${his} regular cleaning duties. Without the power of speech, ${he} was unable to explain the situation and was subsequently used and paid,`,
-				type: "cash",
-				effect: 1,
-			});
-		}
-		if (slave.visualAge >= 40) {
-			vignettes.push({
-				text: `some of the younger slaves purposefully created messes, making fun of ${him} as ${he} scurried behind them to clean up,`,
-				type: "trust",
-				effect: -1,
-			});
-		}
-		if (slave.hLength >= 150) {
-			vignettes.push({
-				text: `${he} was routinely forced to use ${his} hair as a mop,`,
-				type: "cash",
-				effect: 0,
-			});
-		}
-		if (slave.energy < 60) {
-			vignettes.push({
-				text: `${he} once thought on how easy ${his} assignment is in comparison to the sexual assignments that the others have,`,
-				type: "trust",
-				effect: 1,
-			});
-		}
-		vignettes.push({
-			text: `${he} was ordered to clean the many erotically shaped statues around the arcology. ${He} put on a good show, waxing the many tits, asses, and cocks with gusto,`,
-			type: "rep",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} was ordered to clean all the exterior windows around your estate using only ${his} tits. The people passing by seemed to appreciate the show,`,
-			type: "rep",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} was ordered to scrub all the sidewalks outside your places of business free of gum and other detritus, using only a toothbrush. ${He} spent the whole day bent over for all the public to see,`,
-			type: "rep",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `${he} found refuge from the realities of slavery in constant menial tasks, accidentally accomplishing more than was asked of ${him},`,
-			type: "cash",
-			effect: 1,
-		});
-		vignettes.push({
-			text: `while cleaning the slave living quarters, ${he} found someone's hidden stash of money, no doubt withheld from a brave whore's weekly earnings. No one will ever own up to stealing from you out of fear of the consequences, but you take the paltry sum because it is rightfully yours,`,
-			type: "cash",
-			effect: 1,
-		});
-	} else if (slave.assignment === "get milked" || slave.assignment === "work in the dairy") {
-		if (slave.lactation > 0) {
-			if (slave.race === "black") {
-				vignettes.push({
-					text: `an unknown prankster labeled ${his} milk 'Chocolate Milk', causing unknowing citizens to buy it in droves,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `a restaurant critic declared ${his} milk delicious,`,
-				type: "rep",
-				effect: 1,
-			});
-			vignettes.push({
-				text: `an elderly citizen reported feeling healthier after drinking ${his} milk,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.balls > 0) {
-			vignettes.push({
-				text: `an eccentric celebrity chef used ${his} cum in a new pudding recipe,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (canWalk(slave)) {
-			vignettes.push({
-				text: `${he} slipped and fell in an errant puddle of various bodily fluids,`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		vignettes.push({
-			text: `very little of interest happened because the life of a dairy cow is often really boring,`,
-			type: "rep",
-			effect: 0,
-		});
-	} else if (slave.assignment === "rest" || slave.assignment === "rest in the spa") {
-		switch (slave.behavioralFlaw) {
-			case "anorexic":
-				vignettes.push({
-					text: `with nothing to do, ${he} lies in bed and eats almost nothing,`,
-					type: "health",
-					effect: -1,
-				});
-				break;
-			case "devout":
-				vignettes.push({
-					text: `${he} spent nearly all of ${his} free time praying,`,
-					type: "cash",
-					effect: 0,
-				});
-				break;
-		}
-		switch (slave.behavioralQuirk) {
-			case "fitness":
-				vignettes.push({
-					text: `${he} spent a great deal of time working out,`,
-					type: "health",
-					effect: 1,
-				});
-				vignettes.push({
-					text: `${he} exercised to the point of physical exhaustion,`,
-					type: "health",
-					effect: -1,
-				});
-				break;
-			case "insecure":
-				vignettes.push({
-					text: `${he} relaxed by doing whatever other slaves were doing,`,
-					type: "cash",
-					effect: 0,
-				});
-				break;
-		}
-		if (slave.fetish === "mindbroken") {
-			vignettes.push({
-				text: `${he} spent ${his} time watching paint dry. No one bothered telling ${him} the wall wasn't newly painted,`,
-				type: "cash",
-				effect: 0,
-			});
-		}
-		if (slave.devotion > 95) {
-			vignettes.push({
-				text: `${he} decided to spend some of ${his} free time to praise you on the streets,`,
-				type: "rep",
-				effect: 1,
-			});
-		}
-		if (slave.devotion > 50) {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} spends some of ${his} downtime figuring out a new way for you to make money,`,
-					type: "cash",
-					effect: 1,
-				});
-			}
-		}
-		if (slave.devotion > 20) {
-			if (slave.relationshipRules === "just friends" || slave.relationshipRules === "permissive") {
-				vignettes.push({
-					text: `${he} taught another slave some massage skills,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-		}
-		if (slave.devotion < -50) {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
-				vignettes.push({
-					text: `${he} spends some of ${his} downtime figuring out a way to sabotage your profits,`,
-					type: "cash",
-					effect: -1,
-				});
-			}
-			vignettes.push({
-				text: `${he} spent hours plotting ${his} escape from the arcology,`,
-				type: "trust",
-				effect: -1,
-			});
-		}
-		if (slave.relationship === -2) {
-			if (slave.speechRules === "permissive") {
-				vignettes.push({
-					text: `${he} spends most of ${his} time fan${boy}ing obsessively about you to everyone ${he} can,`,
-					type: "rep",
-					effect: 1,
-				});
-			}
-			vignettes.push({
-				text: `${he} grew sick with longing to be kept at your side as your fucktoy instead,`,
-				type: "health",
-				effect: -1,
-			});
-			vignettes.push({
-				text: `${he} 'accidentally' comes to see you throughout the day, even though ${he} is resting,`,
-				type: "devotion",
-				effect: 1,
-			});
-		} else if (slave.relationship === -1) {
-			vignettes.push({
-				text: `${he} daydreamed about being fucked by as many people as possible, upset that you kept ${him} inside,`,
-				type: "devotion",
-				effect: -1,
-			});
-		}
-		if (slave.energy > 95) {
-			if (slave.behavioralFlaw === "odd") {
-				if (slave.amp !== 1 && canSee(slave)) {
-					vignettes.push({
-						text: `you discovered ${him} sketching an image of ${his} genitalia, which you managed to sell,`,
-						type: "cash",
-						effect: 1,
-					});
-				}
-			}
-			if (canWalk(slave)) {
-				if (slave.amp === 0) {
-					vignettes.push({
-						text: `${he} was so horny that ${he} sleepwalked into your room and performed oral sex on you, and then woke up when ${he} bruised ${his} shin,`,
-						type: "health",
-						effect: -1,
-					});
-				}
-				if (slave.releaseRules === "permissive" || slave.releaseRules === "masturbation") {
-					vignettes.push({
-						text: `due to the obvious difficulties in ${his} mobility, ${he} spent a lot of time masturbating in bed,`,
-						type: "health",
-						effect: 0,
-					});
-				}
-			}
-		}
-		if (slave.health < -20) {
-			vignettes.push({
-				text: `${he} has a bad cough and spends a lot of time napping,`,
-				type: "health",
-				effect: 0,
-			});
-		}
-		if (slave.intelligence+slave.intelligenceImplant > 50) {
-			vignettes.push({
-				text: `${he} immerses ${himself} in classics of literature at an arcology library, giving ${him} uncomfortable ideas about society,`,
-				type: "devotion",
-				effect: -1,
-			});
-		}
-		if (V.arcologies[0].FSPaternalist !== "unset") {
-			vignettes.push({
-				text: `due to being ordered to rest, ${he} enjoyed a great deal of calm and relaxation thanks to your arcology's caretaking nature,`,
-				type: "health",
-				effect: 1,
-			});
-		} else if (V.arcologies[0].FSDegradationist !== "unset") {
-			vignettes.push({
-				text: `despite being ordered to rest, ${he} was made subject to a lot of torture and pain because of your arcology's depraved nature,`,
-				type: "health",
-				effect: -1,
-			});
-		}
-		if (canHear(slave)) {
-			vignettes.push({
-				text: `${he} spent much of ${his} free time listening to music,`,
-				type: "health",
-				effect: 0,
-			});
-		}
-		if (canSee(slave)) {
-			vignettes.push({
-				text: `${he} spent much of ${his} free time watching television,`,
-				type: "health",
-				effect: 0,
-			});
-		}
-		if (canTalk(slave)) {
-			vignettes.push({
-				text: `${he} spent much of ${his} free time talking with the other slaves,`,
-				type: "health",
-				effect: 0,
-			});
-		}
-		if (canWalk(slave)) {
-			vignettes.push({
-				text: `${he} spent much of ${his} free time walking around the arcology,`,
-				type: "health",
-				effect: 1,
-			});
-		}
-		vignettes.push({
-			text: `${he} spent much of ${his} free time napping,`,
-			type: "health",
-			effect: 1,
-		});
-	}
-	return jsEither(vignettes);
-};
-
-/*:: Slave Generation JS [script]*/
-
-window.nationalityToRace = function nationalityToRace(slave) {
-	slave.race = hashChoice(setup.raceSelector[slave.nationality] || setup.raceSelector[""]);
-};
-
-window.raceToNationality = function raceToNationality(slave) {
-	/* consider this placeholder until raceNationalities gets fixed up */
-	const V = State.variables;
-	slave.nationality = hashChoice(V.nationalities);
-	/* Maximum of 100 attempts */
-	for (var i = 0; setup.raceSelector[slave.nationality] && !(slave.race in setup.raceSelector[slave.nationality]) && i < 100; i++) {
-		slave.nationality = hashChoice(V.nationalities);
-	}
-	/* No success after 100 attempts, so just randomize according to race */
-	if (setup.raceSelector[slave.nationality] && !(slave.race in setup.raceSelector[slave.nationality]) && i == 100) {
-		slave.nationality = hashChoice(setup[slave.race.toLowerCase().replace(/[ -]/g, '')+'Nationalities']);
-	}
-};
-
-window.generateName = function generateName(nationality, race, male, filter) {
-	filter = filter || _.stubTrue; /* default: allow all */
-	const lookup = (male ? setup.malenamePoolSelector : setup.namePoolSelector);
-	const result = jsEither(
-		(lookup[nationality + "." + race] || lookup[nationality] ||
-		(male ? setup.whiteAmericanMaleNames : setup.whiteAmericanSlaveNames)).filter(filter));
-	/* fallback for males without specific male name sets: return female name */
-	if(male && !result) {
-		return generateName(nationality, race, false);
-	}
-	return result;
-};
-
-window.generateSurname = function generateSurname(nationality, race, male, filter) {
-	filter = filter || _.stubTrue; /* default: allow all */
-	const result = jsEither(
-		(setup.surnamePoolSelector[nationality + "." + race] ||
-		setup.surnamePoolSelector[nationality] ||
-		setup.whiteAmericanSlaveSurnames).filter(filter));
-	if(male) {
-		/* see if we have male equivalent of that surname, and return that if so */
-		const maleLookup = setup.maleSurnamePoolSelector[nationality + "." + race] || setup.maleSurnamePoolSelector[nationality];
-		if(maleLookup && maleLookup[result]) {
-			return maleLookup[result];
-		}
-	}
-	return result || 0;
-};
-
-window.isMaleName = function isMaleName(name, nationality, race) {
-	const names = setup.malenamePoolSelector[nationality + "." + race] ||
-		setup.malenamePoolSelector[nationality] ||
-		setup.whiteAmericanMaleNames;
-	return names && names.includes(name);
-};
-
-window.nationalityToName = function nationalityToName(slave) {
-	const V = State.variables;
-	const male = (slave.genes === "XY");
-
-	slave.birthName = generateName(slave.nationality, slave.race, male);
-	slave.birthSurname = generateSurname(slave.nationality, slave.race, male);
-	if(male && isMaleName(slave.birthName, slave.nationality, slave.race) && !V.allowMaleSlaveNames) {
-		slave.slaveName = generateName(slave.nationality, slave.race, false);
-	} else {
-		slave.slaveName = slave.birthName;
-	}
-	slave.slaveSurname = slave.birthSurname;
-	if (V.useFSNames === 1) {
-		if (V.arcologies[0].FSChattelReligionist > 20) {
-			slave.slaveName = jsEither(setup.chattelReligionistSlaveNames), slave.slaveSurname = 0;
-		} else if (V.arcologies[0].FSRomanRevivalist > 20) {
-			slave.slaveName = jsEither(setup.romanSlaveNames), slave.slaveSurname = jsEither(setup.romanSlaveSurnames);
-		} else if (V.arcologies[0].FSAztecRevivalist > 20) {
-			slave.slaveName = jsEither(setup.aztecSlaveNames), slave.slaveSurname = 0;
-		} else if (V.arcologies[0].FSEgyptianRevivalist > 20) {
-			slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames), slave.slaveSurname = 0;
-		} else if (V.arcologies[0].FSEdoRevivalist > 20) {
-			slave.slaveName = jsEither(setup.edoSlaveNames), slave.slaveSurname = jsEither(setup.edoSlaveSurnames);
-		} else if (V.arcologies[0].FSDegradationist !== "unset") {
-			DegradingName(slave);
-		}
-	}
-};
-
-window.nationalityToAccent = function nationalityToAccent(slave) {
-	const V = State.variables;
-	const naturalAccent = jsEither([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]);
-
-	switch (slave.nationality) {
-		case "Afghan":
-			if (V.language === "Pashto") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Dari") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Persian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Albanian":
-			slave.accent = naturalAccent;
-			break;
-		case "Algerian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "American":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Spanish" && slave.race === "latina") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Chinese" && slave.race === "asian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Arabic" && slave.race === "middle eastern") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Andorran":
-			slave.accent = (V.language === "Catalan") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Angolan":
-			slave.accent = (V.language === "Portuguese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Antiguan":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Argentinian":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Armenian":
-			if (V.language === "Russian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Aruban":
-			if (V.language === "Dutch") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Portuguese") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Australian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Austrian":
-			if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Serbian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Slovene") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Turkish" && slave.race === "indo-aryan") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Azerbaijani":
-			slave.accent = naturalAccent;
-			break;
-		case "Bahamian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bahraini":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bangladeshi":
-			if (V.language === "Bengali") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Hindi") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Barbadian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Belarusian":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Belgian":
-			if (V.language === "Dutch") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Belizean":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Beninese":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bermudian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bhutanese":
-			slave.accent = (V.language === "Dzongkha") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Bissau-Guinean":
-			slave.accent = (V.language === "Portuguese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bolivian":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bosnian":
-			if (V.language === "Croatian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Serbian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Brazilian":
-			slave.accent = (V.language === "Portuguese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "British":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Bruneian":
-			if (V.language === "Malay") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Bulgarian":
-			slave.accent = naturalAccent;
-			break;
-		case "Burkinabé":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Burmese":
-			slave.accent = naturalAccent;
-			break;
-		case "Burundian":
-			slave.accent = (V.language === "Kirundi") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Cambodian":
-			if (V.language === "Khmer") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Cham") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Cameroonian":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Canadian":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Cape Verdean":
-			slave.accent = (V.language === "Portuguese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Catalan":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Central African":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Chadian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Chilean":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Chinese":
-			if (V.language === "Tibetan") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Korean") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Kazakh") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Colombian":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Comorian":
-			if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Congolese":
-			if (V.language === "Lingala") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Kikongo") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "a Cook Islander":
-			if (V.language === "Cook Islands Māori") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Costa Rican":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Croatian":
-			if (V.language === "Bosnian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Serbian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Cuban":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Curaçaoan":
-			if (V.language === "Dutch") {
-				slave.accent = jsEither([0, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Portuguese") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Cypriot":
-			if (V.language === "Greek") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Turkish") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Czech":
-			if (V.language === "Slovak") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Vietnamese" && slave.race === "asian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Danish":
-			slave.accent = naturalAccent;
-			break;
-		case "Djiboutian":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Dominican":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Dominiquais":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Dutch":
-			slave.accent = naturalAccent;
-			break;
-		case "East Timorese":
-			if (V.language === "Tetum") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Portuguese") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Malay") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Ecuadorian":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Egyptian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Emirati":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Equatoguinean":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Eritrean":
-			if (V.language === "Tigrinya") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Estonian":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Ethiopian":
-			if (V.language === "Amharic") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Tigrinya") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Fijian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Filipina":
-			if (V.language === "Filipino") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Tagalog") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Spanish") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Finnish":
-			slave.accent = (V.language === "Swedish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "French":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Spanish") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Arabic" && slave.race === "middle eastern") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Catalan") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "French Guianan":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "French Polynesian":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Gabonese":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Gambian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Georgian":
-			slave.accent = (V.language === "Abkhaz") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "German":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Turkish" && slave.race === "indo-aryan") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Ghanan":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Hausa") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Greek":
-			slave.accent = naturalAccent;
-			break;
-		case "Greenlandic":
-			slave.accent = (V.language === "Danish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Grenadian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Guamanian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Guatemalan":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Guinean":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Guyanese":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Haitian":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Honduran":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Hungarian":
-			slave.accent = naturalAccent;
-			break;
-		case "I-Kiribati":
-			if (V.language === "Gilbertese") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Icelandic":
-			if (V.language === "Danish") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Indian":
-			if (V.language === "Hindi") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Indonesian":
-			if (V.language === "Javanese") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Malay") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Iranian":
-			if (V.language === "Persian") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Iraqi":
-			if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Kurdish") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Irish":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Israeli":
-			if (V.language === "Hebrew") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Italian":
-			slave.accent = naturalAccent;
-			break;
-		case "Ivorian":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Jamaican":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Japanese":
-			slave.accent = naturalAccent;
-			break;
-		case "Jordanian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Kazakh":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Kenyan":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Kittitian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Korean":
-			slave.accent = (V.language === "Chinese") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Kosovan":
-			if (V.language === "Albanian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Serbian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Kurdish":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Kuwaiti":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Kyrgyz":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Laotian":
-			if (V.language === "Lao") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Khmu") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Latvian":
-			slave.accent = naturalAccent;
-			break;
-		case "Lebanese":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Liberian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Libyan":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "a Liechtensteiner":
-			slave.accent = (V.language === "German") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Lithuanian":
-			slave.accent = naturalAccent;
-			break;
-		case "Luxembourgian":
-			if (V.language === "Luxembourgish") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Macedonian":
-			slave.accent = naturalAccent;
-			break;
-		case "Malagasy":
-			if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Malawian":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Chichewa") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Malaysian":
-			slave.accent = (V.language === "Malay") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Maldivian":
-			slave.accent = naturalAccent;
-			break;
-		case "Malian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Maltese":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Italian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Marshallese":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Mauritanian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Mauritian":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Mexican":
-			if (V.language === "Spanish") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Nahuatl" && slave.race === "amerindian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Micronesian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Moldovan":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Monégasque":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Mongolian":
-			slave.accent = naturalAccent;
-			break;
-		case "Montenegrin":
-			slave.accent = (V.language === "Serbian") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Moroccan":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Mosotho":
-			slave.accent = (V.language === "Sesotho") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Motswana":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Mozambican":
-			slave.accent = (V.language === "Portuguese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Namibian":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Afrikaans") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Nauruan":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Nepalese":
-			if (V.language === "Nepali") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Maithili") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Bhojpuri") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "New Caledonian":
-			if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Nengone") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Drehu") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "a New Zealander":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Ni-Vanuatu":
-			if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Nicaraguan":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Nigerian":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Hausa") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Nigerien":
-			if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Hausa") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Niuean":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Norwegian":
-			slave.accent = naturalAccent;
-			break;
-		case "Omani":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Pakistani":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Palauan":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Sonsorolese") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Tobian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Japanese") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Palestinian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Panamanian":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Papua New Guinean":
-			slave.accent = naturalAccent;
-			break;
-		case "Paraguayan":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Peruvian":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Polish":
-			slave.accent = naturalAccent;
-			break;
-		case "Portuguese":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Puerto Rican":
-			if (V.language === "Spanish") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Qatari":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Romanian":
-			slave.accent = naturalAccent;
-			break;
-		case "Russian":
-			slave.accent = naturalAccent;
-			break;
-		case "Rwandan":
-			slave.accent = (V.language === "Kinyarwanda") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Sahrawi":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Saint Lucian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Salvadoran":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Sammarinese":
-			slave.accent = (V.language === "Italian") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Samoan":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "São Toméan":
-			slave.accent = (V.language === "Portuguese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Saudi":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Scottish":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Senegalese":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Serbian":
-			if (V.language === "Bosnian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Serbian") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Seychellois":
-			if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Sierra Leonean":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Singaporean":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Chinese") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Malay") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Tamil") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Slovak":
-			slave.accent = (V.language === "Czech") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Slovene":
-			slave.accent = naturalAccent;
-			break;
-		case "a Solomon Islander":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Somali":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "South African":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Afrikaans") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "South Sudanese":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Spanish":
-			slave.accent = (V.language === "Catalan") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Sri Lankan":
-			if (V.language === "Sinhalese") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Tamil") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Sudanese":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Surinamese":
-			slave.accent = (V.language === "Dutch") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Swazi":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Afrikaans") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Tsonga") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Zulu") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Swedish":
-			if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Finnish") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Norwegian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Swiss":
-			if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Italian") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Syrian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Taiwanese":
-			slave.accent = (V.language === "Chinese") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Tajik":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Tanzanian":
-			slave.accent = (V.language === "Swahili") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Thai":
-			if (V.language === "Chinese") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Malay") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Khmer") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Tibetan":
-			slave.accent = (V.language === "Chinese") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Togolese":
-			slave.accent = (V.language === "French") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Tongan":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Trinidadian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Tunisian":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Turkish":
-			if (V.language === "Arabic") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Kurdish") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "Zaza") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Turkmen":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Tuvaluan":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Ugandan":
-			slave.accent = (V.language === "Swahili") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Ukrainian":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Uruguayan":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Uzbek":
-			slave.accent = (V.language === "Russian") ? jsEither([0, 1, 2, 2, 2, 3, 3]) : naturalAccent;
-			break;
-		case "Vatican":
-			if (V.language === "Italian") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Latin") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "German") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Venezuelan":
-			slave.accent = (V.language === "Spanish") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Vietnamese":
-			if (V.language === "Chinese") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "English") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 2, 2, 2, 3, 3]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Vincentian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Yemeni":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Zairian":
-			if (V.language === "Lingala") {
-				slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-			} else if (V.language === "Kikongo") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "Swahili") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else if (V.language === "French") {
-				slave.accent = jsEither([0, 1, 1, 1, 1, 2]);
-			} else {
-				slave.accent = naturalAccent;
-			}
-			break;
-		case "Zambian":
-			slave.accent = (V.language === "English") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Zimbabwean":
-			slave.accent = (V.language === "English" && slave.race === "white") ? jsEither([0, 1, 1, 1, 1, 2]) : naturalAccent;
-			break;
-		case "Ancient Chinese Revivalist":
-			slave.accent = (V.language === "Chinese") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Ancient Egyptian Revivalist":
-			slave.accent = (V.language === "Ancient Egyptian") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Arabian Revivalist":
-			slave.accent = (V.language === "Arabic") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Aztec Revivalist":
-			slave.accent = (V.language === "Nahuatl") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Edo Revivalist":
-			slave.accent = (V.language === "Japanese") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		case "Roman Revivalist":
-			slave.accent = (V.language === "Latin") ? jsEither([0, 0, 0, 0, 0, 0, 1]) : naturalAccent;
-			break;
-		default:
-			slave.accent = naturalAccent;
-			break;
-	}
-
-	if (slave.nationality === V.language) {
-		slave.accent = jsEither([0, 0, 0, 0, 0, 0, 1]);
-	}
-};
-
-/*
-Backup and then apply gingering modifiers to $activeSlave - no changes should be made to $activeSlave until after calling removeGingering() to restore the backup
-Called from lawCompliance
-*/
-window.checkForGingering = function checkForGingering() {
-	const V = State.variables;
-	let r = "";
-	const pronouns = getPronouns(V.activeSlave);
-	const he = pronouns.pronoun;
-	const him = pronouns.object;
-	const his = pronouns.possessive;
-	const He = capFirstChar(he);
-	const His = capFirstChar(his);
-
-	/* reset in case gingered slaves were viewed but not purchased (no newSlaveIntro) */
-	V.gingering = 0, V.gingeringDetected = 0, V.gingeringDetection = 0, V.toSearch = V.activeSlave.origin;
-	if (V.applyLaw === 1 && V.HonestySMR === 1) {
-		/* SMR prohibits gingering and is enforced for this slave - do nothing */
-	} else if (V.activeSlave.indenture > 0) {
-		/* indentured servants cannot be gingered */
-	} else if (V.toSearch !== 0 && V.toSearch.indexOf("Shelter") !== -1) {
-		/* is a Shelter slave - do nothing */
-	} else {
-		V.beforeGingering = clone(V.activeSlave);
-		if (V.activeSlave.trust < -20 && jsRandom(1, 3) === 1) {
-			V.gingering = "antidepressant";
-			V.activeSlave.trust += jsRandom(10, 40);
-		} else if (V.activeSlave.devotion < -20 && jsRandom(1, 3) === 1) {
-			V.gingering = "depressant";
-			V.activeSlave.devotion += jsRandom(10, 40);
-		} else if (V.activeSlave.health < 60 && jsRandom(1, 3) === 1) {
-			V.gingering = "stimulant";
-			V.activeSlave.health += jsRandom(20, 40);
-		} else if (V.activeSlave.balls > 0 && V.activeSlave.dick > 2 && jsRandom(1, 3) === 1) {
-			V.gingering = "vasoconstrictor";
-			V.activeSlave.dick -= jsRandom(1, 2);
-		} else if (V.activeSlave.balls > 0 && V.activeSlave.dick < 5 && jsRandom(1, 3) === 1) {
-			V.gingering = "vasodilator";
-			V.activeSlave.dick += jsRandom(1, 2);
-		} else if (V.activeSlave.attrKnown === 0 && jsRandom(1, 3) === 1) {
-			V.gingering = "aphrodisiac";
-			V.activeSlave.aphrodisiacs = 2;
-			V.activeSlave.attrKnown = 1;
-			V.activeSlave.attrXX = jsRandom(60, 90);
-			V.activeSlave.attrXY = jsRandom(60, 90);
-			V.activeSlave.energy = jsRandom(50, 90);
-		} else if (V.activeSlave.anus > 0 && V.activeSlave.fetishKnown === 0 && jsRandom(1, 3) === 1) {
-			V.gingering = "ginger";
-			V.activeSlave.fetish = "buttslut";
-			V.activeSlave.fetishKnown = 1;
-			V.activeSlave.fetishStrength = 65;
-		}
-	}
-	if (V.gingering !== 0) {
-		if (V.PC.slaving >= 100) {
-			V.gingeringDetected = 1, V.gingeringDetection = "slaver";
-			switch (V.gingering) {
-				case "antidepressant":
-					r += `${He} is acting dazed and unfocused. ${He}'s obviously been given antidepressants to make ${him} appear less fearful, and will be considerably less trusting than ${he} seems.`;
-					break;
-				case "depressant":
-					r += `${He} is acting languid and drugged. ${He}'s obviously been given a depressant to make ${him} appear less hateful, and will be considerably less accepting of slavery than ${he} seems.`;
-					break;
-				case "stimulant":
-					r += `${He} is acting twitchy and hyperactive. ${He}'s obviously been given a stimulant to make ${him} seem healthier and more energetic, and is a lot less healthy than ${he} looks.`;
-					break;
-				case "vasoconstrictor":
-					r += `${His} lips have the slightest blue tinge, making it obvious ${he}'s been given a vasoconstrictor. ${His} cock is a lot less of a girldick than it looks right now.`;
-					break;
-				case "vasodilator":
-					r += `${He} has an impressive erection, but it seems quite unconnected to the rest of ${him}, as if ${he} doesn't know what to do with it. ${He}'s obviously been given a vasodilator to make ${his} dick seem a little less pathetic.`;
-					break;
-				case "aphrodisiac":
-					r += `${His} pupils are slightly dilated, ${his} breath comes in fast pants, and ${his} skin is flushed. ${He}'s obviously been given as big of a dose of aphrodisiacs as ${he} can handle without a heart attack.`;
-					break;
-				default:
-					r += `${He} is acting oddly, presenting ${his} ass in an awkward way and acting uncomfortable. ${He}'s obviously had an irritant shoved up ${his} butt to make ${him} act like an anal whore.`;
-			}
-			r += ` It's a trick you're very familiar with, given your <span class="springgreen">training as a slaver.</span>`;
-		} else {
-			/* not slaver */
-			if (V.PC.warfare >= 100 && jsRandom(1, 2) === 1) {
-				V.gingeringDetected = 1, V.gingeringDetection = "mercenary";
-			} else if (V.PC.rumor === "force" && jsRandom(1, 2) === 1) {
-				V.gingeringDetected = 1, V.gingeringDetection = "force";
-			} else if (jsRandom(1, 3) === 1) {
-				V.gingeringDetected = 1;
-			}
-			if (V.gingeringDetected === 1) {
-				switch (V.gingering) {
-					case "antidepressant":
-						r += `${He} is acting dazed and unfocused, like ${he}'s been given antidepressants to make ${him} appear less fearful. ${He} may be considerably less trusting than ${he} seems. `;
-						break;
-					case "depressant":
-						r += `${He} is acting languid and drugged, like ${he}'s been given a depressant to make ${him} appear less hateful. ${He} may be considerably less accepting of slavery than ${he} seems. `;
-						break;
-					case "stimulant":
-						r += `${He} is acting twitchy and hyperactive, like ${he}'s been given a stimulant to make ${him} seem healthier and more energetic. ${He} may be considerably less vital than ${he} seems. `;
-						break;
-					case "vasoconstrictor":
-						r += `${His} lips have the slightest blue tinge, suggesting that ${he} may have been given a vasoconstrictor. If ${he} has, ${his} cock may be considerably less feminine and demure than it now seems. `;
-						break;
-					case "vasodilator":
-						r += `${He} has an impressive erection, but it seems quite unconnected to the rest of ${him}, as if ${he} doesn't know what to do with it. ${He} may have been given a vasodilator. If ${he} has, ${his} cock may be considerably less impressive than it now seems. `;
-						break;
-					case "aphrodisiac":
-						r += `${His} pupils are slightly dilated, ${his} breath comes in fast pants, and ${his} skin is flushed. These are the characteristic symptoms of a dose of aphrodisiacs limited only by a desire to avoid giving ${him} a heart attack. `;
-						break;
-					default:
-						r += `${He} is acting oddly, presenting ${his} ass in an awkward way and acting uncomfortable. ${He} may be considerably less interested in anal sex than ${he} seems. `;
-				}
-				if (V.gingeringDetection === "mercenary") {
-					r += `The nervous seller confirms this in response to a direct inquiry. Your intimidating reputation from your <span class="springgreen">extensive combat training</span> has its uses.`;
-				} else if (V.gingeringDetection === "force") {
-					r += `The nervous seller confirms this in response to a direct inquiry. Your reputation as a <span class="springgreen"> ${V.PCTitle ? "man" : "woman"} of blood</span> has its uses.`;
-				}
-			}
-		} /* gingering detected */
-	} /* gingering !== 0 */
-	return r;
-};
-
-/*
-Retrieve original $activeSlave without gingering modifiers
-Call as removeGingering()
-Called from newSlaveIntro, bulkSlaveGenerate
-*/
-window.removeGingering = function removeGingering() {
-	const V = State.variables;
-	if (V.gingering !== 0 && V.beforeGingering !== 0 && V.activeSlave !== 0 && V.beforeGingering.ID === V.activeSlave.ID) {
-		/* extra checks to ensure gingering state is not left over from a different slave that was inspected but not purchased */
-		V.activeSlave = V.beforeGingering, V.beforeGingering = 0;
-	} else {
-		/* clear left over state from a different slave without modifying activeSlave */
-		V.gingering = 0, V.beforeGingering = 0;
-	}
-};
-
-window.randomizeAttraction = function randomizeAttraction(slave) {
-	const sexuality = jsRandom(0, 100);
-	let attraction = Math.clamp(slave.energy * 2, 60, 180);
-
-	if (slave.balls > 0) {
-		if (sexuality > 90) {
-			slave.attrXY = Math.clamp(attraction, 0, 100);
-			attraction -= slave.attrXY;
-			slave.attrXX = Math.clamp(attraction, 0, 100);
-		} else if (sexuality > 70) {
-			slave.attrXY = Math.clamp(attraction + jsRandom(-5, 5), 0, 100);
-			slave.attrXX = Math.clamp(attraction + jsRandom(-5, 5), 0, 100);
-		} else {
-			slave.attrXX = Math.clamp(attraction, 0, 100);
-			attraction -= slave.attrXX;
-			slave.attrXY = Math.clamp(attraction, 0, 100);
-		}
-	} else {
-		if (sexuality > 90) {
-			slave.attrXX = Math.clamp(attraction, 0, 100);
-			attraction -= slave.attrXX;
-			slave.attrXY = Math.clamp(attraction, 0, 100);
-		} else if (sexuality > 60) {
-			slave.attrXY = Math.clamp(attraction + jsRandom(-5, 5), 0, 100);
-			slave.attrXX = Math.clamp(attraction + jsRandom(-5, 5), 0, 100);
-		} else {
-			slave.attrXY = Math.clamp(attraction, 0, 100);
-			attraction -= slave.attrXY;
-			slave.attrXX = Math.clamp(attraction, 0, 100);
-		}
-	}
-	slave.attrXX = Math.clamp(slave.attrXX + jsRandom(-5, 5), 0, 100);
-	slave.attrXY = Math.clamp(slave.attrXY + jsRandom(-5, 5), 0, 100);
-};
-
-window.BaseSlave = function BaseSlave() {
-	State.variables.activeSlave = {
-		slaveName: "blank",
-		slaveSurname: 0,
-		birthName: "blank",
-		birthSurname: 0,
-		genes: "XX",
-		pronoun: "she",
-		possessive: "her",
-		possessivePronoun: "hers",
-		objectReflexive: "herself",
-		object: "her",
-		noun: "girl",
-		weekAcquired: 0,
-		origin: 0,
-		career: 0,
-		ID: 0,
-		prestige: 0,
-		pornFeed: 0,
-		pornFame: 0,
-		pornFameSpending: 0,
-		pornPrestige: 0,
-		pornPrestigeDesc: 0,
-		pornFameType: "none",
-		pornFocus: "none",
-		pornTypeGeneral: 0,
-		pornTypeFuckdoll: 0,
-		pornTypeRape: 0,
-		pornTypePreggo: 0,
-		pornTypeBBW: 0,
-		pornTypeGainer: 0,
-		pornTypeStud: 0,
-		pornTypeLoli: 0,
-		pornTypeDeepThroat: 0,
-		pornTypeStruggleFuck: 0,
-		pornTypePainal: 0,
-		pornTypeTease: 0,
-		pornTypeRomantic: 0,
-		pornTypePervert: 0,
-		pornTypeCaring: 0,
-		pornTypeUnflinching: 0,
-		pornTypeSizeQueen: 0,
-		pornTypeNeglectful: 0,
-		pornTypeCumAddict: 0,
-		pornTypeAnalAddict: 0,
-		pornTypeAttentionWhore: 0,
-		pornTypeBreastGrowth: 0,
-		pornTypeAbusive: 0,
-		pornTypeMalicious: 0,
-		pornTypeSelfHating: 0,
-		pornTypeBreeder: 0,
-		pornTypeSub: 0,
-		pornTypeCumSlut: 0,
-		pornTypeAnal: 0,
-		pornTypeHumiliation: 0,
-		pornTypeBoobs: 0,
-		pornTypeDom: 0,
-		pornTypeSadist: 0,
-		pornTypeMasochist: 0,
-		pornTypePregnancy: 0,
-		prestigeDesc: 0,
-		recruiter: 0,
-		relation: 0,
-		relationTarget: 0,
-		relationship: 0,
-		relationshipTarget: 0,
-		rivalry: 0,
-		rivalryTarget: 0,
-		subTarget: 0,
-		father: 0,
-		mother: 0,
-		daughters: 0,
-		sisters: 0,
-		canRecruit: 0,
-		choosesOwnAssignment: 0,
-		assignment: "rest",
-		assignmentVisible: 1,
-		sentence: 0,
-		training: 0,
-		toyHole: "all her holes",
-		indenture: -1,
-		indentureRestrictions: 0,
-		birthWeek: random(0,51),
-		actualAge: 18,
-		visualAge: 18,
-		physicalAge: 18,
-		ovaryAge: 18,
-		ageImplant: 0,
-		health: 0,
-		minorInjury: 0,
-		trust: 0,
-		oldTrust: 0,
-		devotion: 0,
-		oldDevotion: 0,
-		weight: 0,
-		muscles: 0,
-		height: 170,
-		heightImplant: 0,
-		nationality: "slave",
-		race: "white",
-		origRace: "white",
-		markings: "none",
-		eyes: 1,
-		eyeColor: "brown",
-		origEye: "brown",
-		pupil: "circular",
-		sclerae: "white",
-		eyewear: "none",
-		hears: 0,
-		earwear: "none",
-		earImplant: 0,
-		origHColor: "brown",
-		hColor: "brown",
-		pubicHColor: "brown",
-		underArmHColor: "brown",
-		eyebrowHColor: "brown",
-		origSkin: "light",
-		skin: "light",
-		hLength: 60,
-		eyebrowFullness: "natural",
-		hStyle: "short",
-		pubicHStyle: "neat",
-		underArmHStyle: "neat",
-		eyebrowHStyle: "natural",
-		waist: 0,
-		corsetPiercing: 0,
-		PLimb: 0,
-		amp: 0,
-		heels:0,
-		voice: 2,
-		voiceImplant: 0,
-		accent: 0,
-		shoulders: 0,
-		shouldersImplant: 0,
-		boobs: 0,
-		boobsMilk: 0,
-		boobsImplant: 0,
-		boobsImplantType: 0,
-		boobShape: "normal",
-		nipples: "cute",
-		nipplesPiercing: 0,
-		nipplesAccessory: "none",
-		areolae: 0,
-		areolaePiercing: 0,
-		areolaeShape: "circle",
-		boobsTat: 0,
-		lactation: 0,
-		lactationDuration: 0,
-		induceLactation: 0,
-		lactationAdaptation: 0,
-		milk: 0,
-		cum: 0,
-		hips: 0,
-		hipsImplant: 0,
-		butt: 0,
-		buttImplant: 0,
-		buttImplantType: 0,
-		buttTat: 0,
-		face: 0,
-		faceImplant: 0,
-		faceShape: "normal",
-		lips: 15,
-		lipsImplant: 0,
-		lipsPiercing: 0,
-		lipsTat: 0,
-		teeth: "normal",
-		tonguePiercing: 0,
-		vagina: 0,
-		vaginaLube: 0,
-		vaginaPiercing: 0,
-		vaginaTat: 0,
-		preg: -1,
-		pregSource: 0,
-		pregType: 0,
-		pregAdaptation: 50,
-		ovaImplant: 0,
-		wombImplant: "none",
-		broodmother: 0,
-		broodmotherFetuses: 0,
-		broodmotherOnHold: 0,
-		broodmotherCountDown: 0,
-		labor: 0,
-		births: 0,
-		laborCount: 0,
-		cSec: 0,
-		bellyAccessory: "none",
-		labia: 0,
-		clit: 0,
-		clitPiercing: 0,
-		clitSetting: "vanilla",
-		foreskin: 0,
-		anus: 0,
-		dick: 0,
-		analArea: 1,
-		dickPiercing: 0,
-		dickTat: 0,
-		prostate: 0,
-		balls: 0,
-		scrotum: 0,
-		ovaries: 0,
-		anusPiercing: 0,
-		anusTat: 0,
-		makeup: 0,
-		nails: 0,
-		brand: 0,
-		brandLocation: 0,
-		earPiercing: 0,
-		nosePiercing: 0,
-		eyebrowPiercing: 0,
-		navelPiercing: 0,
-		shouldersTat: 0,
-		armsTat: 0,
-		legsTat: 0,
-		backTat: 0,
-		stampTat: 0,
-		vaginalSkill: 0,
-		oralSkill: 0,
-		analSkill: 0,
-		whoreSkill: 0,
-		entertainSkill: 0,
-		combatSkill: 0,
-		livingRules: "spare",
-		speechRules: "restrictive",
-		releaseRules: "restrictive",
-		relationshipRules: "restrictive",
-		lactationRules: "none",
-		standardPunishment: "situational",
-		standardReward: "situational",
-		useRulesAssistant: 1,
-		diet: "healthy",
-		dietCum: 0,
-		dietMilk: 0,
-		tired: 0,
-		hormones: 0,
-		drugs: "no drugs",
-		curatives: 0,
-		chem: 0,
-		aphrodisiacs: 0,
-		addict: 0,
-		fuckdoll: 0,
-		choosesOwnClothes: 0,
-		clothes: "no clothing",
-		collar: "none",
-		shoes: "none",
-		vaginalAccessory: "none",
-		dickAccessory: "none",
-		legAccessory: "none",
-		buttplug: "none",
-		buttplugAttachment: "none",
-		intelligence: 0,
-		intelligenceImplant: 0,
-		energy: 50,
-		need: 0,
-		attrXX: 0,
-		attrXY: 0,
-		attrKnown: 0,
-		fetish: "none",
-		fetishStrength: 70,
-		fetishKnown: 0,
-		behavioralFlaw: "none",
-		behavioralQuirk: "none",
-		sexualFlaw: "none",
-		sexualQuirk: "none",
-		geneticQuirks: {macromastia: 0, gigantomastia: 0, fertility: 0, hyperFertility: 0, superfetation: 0, gigantism: 0, dwarfism: 0, pFace: 0, uFace: 0, albinism: 0, rearLipedema: 0, wellHung: 0, wGain: 0, wLoss: 0, androgyny: 0},
-		oralCount: 0,
-		vaginalCount: 0,
-		analCount: 0,
-		mammaryCount: 0,
-		penetrativeCount: 0,
-		publicCount: 0,
-		pitKills: 0,
-		customTat: "",
-		customLabel: "",
-		customDesc: "",
-		customTitle: "",
-		customTitleLisp: "",
-		rudeTitle: 0,
-		customImage: 0,
-		currentRules: [],
-		bellyTat: 0,
-		induce: 0,
-		mpreg: 0,
-		inflation: 0,
-		inflationType: "none",
-		inflationMethod: 0,
-		milkSource: 0,
-		cumSource: 0,
-		burst: 0,
-		pregKnown: 0,
-		pregWeek: 0,
-		belly: 0,
-		bellyPreg: 0,
-		bellyFluid: 0,
-		bellyImplant: -1,
-		bellySag: 0,
-		bellySagPreg: 0,
-		bellyPain: 0,
-		cervixImplant: 0,
-		birthsTotal: 0,
-		pubertyAgeXX: 13,
-		pubertyAgeXY: 13,
-		scars: 0,
-		breedingMark: 0,
-		bodySwap: 0,
-		HGExclude: 0,
-		ballType: "human",
-		eggType: "human",
-		choosesOwnChastity: 0,
-		pregControl: "none",
-		readyLimbs: [],
-		ageAdjust: 0,
-		bald: 0,
-		origBodyOwner: "",
-		origBodyOwnerID: 0,
-		death: "",
-		hormoneBalance: 0,
-		onDiet: 0,
-		breastMesh: 0,
-		slavesFathered: 0,
-		PCChildrenFathered: 0,
-		slavesKnockedUp: 0,
-		PCKnockedUp: 0,
-		prematureBirth: 0,
-		premature: 0,
-		vasectomy: 0,
-		haircuts: 0,
-		newGamePlus: 0,
-		skillHG: 0,
-		skillRC: 0,
-		skillBG: 0,
-		skillMD: 0,
-		skillDJ: 0,
-		skillNU: 0,
-		skillTE: 0,
-		skillAT: 0,
-		skillMT: 0,
-		skillST: 0,
-		skillMM: 0,
-		skillFA: 0,
-		skillWA: 0,
-		skillS: 0,
-		skillE: 0,
-		skillW: 0,
-		tankBaby: 0,
-		clone: 0,
-		geneMods: {NCS: 0, rapidCellGrowth: 0},
-		NCSyouthening: 0,
-		override_Race: 0,
-		override_Skin: 0,
-		override_Eye_Color: 0,
-		override_H_Color: 0,
-		override_Pubic_H_Color: 0,
-		override_Arm_H_Color: 0,
-		override_Brow_H_Color: 0,
-		missingEyes: 0,
-		missingArms: 0,
-		missingLegs: 0,
-		slaveCost: 0,
-		lifetimeCashExpenses: 0,
-		lifetimeCashIncome: 0,
-		lastWeeksCashIncome: 0,
-		lifetimeRepExpenses: 0,
-		lifetimeRepIncome: 0,
-		lastWeeksRepIncome: 0
-	};
-};
-
-window.generatePronouns = function generatePronouns(slave) {
-	if (slave.fuckdoll > 0) {
-		slave.pronoun = "it";
-		slave.possessivePronoun = "its";
-		slave.possessive = "its";
-		slave.object = "it";
-		slave.objectReflexive = "itself";
-		slave.noun = "toy";
-	} else if (slave.dick > 0 && slave.vagina == -1 && State.variables.diversePronouns == 1) {
-		slave.pronoun = "he";
-		slave.possessivePronoun = "his";
-		slave.possessive = "his";
-		slave.object = "him";
-		slave.objectReflexive = "himself";
-		slave.noun = "boy";
-	} else {
-		slave.pronoun = "she";
-		slave.possessivePronoun = "hers";
-		slave.possessive = "her";
-		slave.object = "her";
-		slave.objectReflexive = "herself";
-		slave.noun = "girl";
-	}
-};
-
-/*:: Generate New Slave JS [script]*/
-
-window.GenerateNewSlave = (function(){
-	'use strict';
-	let V, slave, chance;
-
-	function GenerateNewSlave(sex) {
-		V = State.variables;
-		BaseSlave();
-		slave = V.activeSlave;
-
-		preGenCombinedStats();
-		if (!sex) {
-			if (jsRandom(0,99) < V.seeDicks) {
-				GenerateXYSlave();
-			} else if (V.seeDicks > 0) {
-				var femaleSlaveGen = 80;
-				if (V.arcologies[0].FSGenderFundamentalistSMR == 1 || V.arcologies[0].FSRepopulationFocusSMR == 1) {
-					femaleSlaveGen = 90;
-				} else if (V.arcologies[0].FSGenderRadicalist != "unset") {
-					femaleSlaveGen = 50;
-				}
-				if (jsRandom(1,100) > femaleSlaveGen && jsRandom(0,99) < V.seeDicks) {
-					GenerateXYSlave();
-				} else {
-					GenerateXXSlave();
-				}
-			} else {
-				GenerateXXSlave();
-			}
-		} else if (sex == "XY") {
-			GenerateXYSlave();
-		} else {
-			GenerateXXSlave();
-		}
-
-		postGenCleanup();
-	};
-
-	function preGenCombinedStats() {
-		slave.ID = V.IDNumber++;
-		slave.weekAcquired = V.week;
-		slave.canRecruit = 1;
-		slave.devotion = jsRandom(-90,-60);
-		slave.trust = jsRandom(-45,-25);
-		slave.weight = jsRandom(-100,180);
-		slave.health = jsRandom(-50,50);
-
-		WombInit(slave);
-		generateAge();
-		generateIntelligence();
-		generateCareer();
-		generateNationality(); /* includes race selection */
-		generateAccent();
-		nationalityToName(slave);
-		generateRacialTraits();
-	};
-
-	function postGenCleanup() {
-		generateBoobTweaks(); /* split this up for female vs. male? */
-		generateSkills();
-		generateDisabilities();
-		generatePronouns(slave);
-		slave.origRace = slave.race;
-		slave.origEye = slave.eyeColor;
-		slave.origHColor = slave.hColor;
-		slave.origSkin = slave.skin;
-	};
-
-	function GenerateXXSlave() {
-		slave.ovaries = 1;
-		slave.pubertyXY = 0;
-		slave.energy = jsRandom(1,85);
-
-		generateXXBodyProportions();
-		generateVagina();
-		generateXXPreferences();
-		generateXXButt();
-		generateXXBoobs();
-		generateXXFace();
-		generateXXPregAdaptation();
-		generateXXVoice();
-		generateXXTeeth();
-		generateXXMods();
-		generateXXBodyHair();
-		generateXXPuberty();
-		generateXXGeneticQuirks();
-	};
-
-	function GenerateXYSlave() {
-		slave.genes = "XY";
-		slave.hLength = 10;
-		slave.prostate = 1;
-		slave.pubertyXX = 0;
-		slave.energy = jsRandom(15,90);
-
-		generateXYBodyProportions();
-		generateDick();
-		generateCircumcision();
-		generateXYPreferences(); /* must happen after genitalia generation */
-		generateXYButt(); /* must happen after preferences */
-		generateXYBoobs();
-		generateXYFace();
-		generateXYPregAdaptation();
-		generateXYVoice();
-		generateXYTeeth();
-		generateXYMods();
-		generateXYBodyHair();
-		generateXYPuberty();
-		generateXYGeneticQuirks();
-	};
-
-	function generateXXBodyProportions() {
-		slave.height = Math.round(Height.random(slave));
-		if (slave.height >= Height.mean(slave) * 170/162.5) {
-			slave.hips = jsEither([-1, 0, 0, 1, 1, 2, 2]);
-			slave.shoulders = jsEither([-1, -1, 0, 0, 0, 1]);
-		} else {
-			slave.hips = jsEither([-1, 0, 0, 0, 1, 1, 2]);
-			slave.shoulders = jsEither([-2, -1, -1, 0, 0, 1]);
-		}
-		if (slave.physicalAge <= 11) {
-			slave.hips = jsEither([-2, -2, -1, -1, 0]);
-		} else if (slave.physicalAge <= 13) {
-			slave.hips = jsEither([-2, -1, -1, 0, 1]);
-		}
-		if (slave.weight < -30) {
-			slave.waist = jsRandom(-55,0);
-		} else if (slave.physicalAge < 13) {
-			slave.waist = jsRandom(-25,25);
-		} else if (slave.weight <= 30) {
-			slave.waist = jsRandom(-45,45);
-		} else if (slave.weight <= 160) {
-			slave.waist = jsRandom(0,55);
-		} else {
-			slave.waist = jsRandom(50,100);
-		}
-	};
-
-	function generateXYBodyProportions() {
-		slave.height = Math.round(Height.random(slave));
-		if (slave.physicalAge <= 13) {
-			if (slave.height > Height.mean(slave) * 170/172.5) {
-				slave.hips = jsEither([-2, -1, -1, 0, 1]);
-				slave.shoulders = jsEither([-1, -1, 0, 0, 0, 1]);
-			} else {
-				slave.hips = jsEither([-2, -2, -1, -1, 0]);
-				slave.shoulders = jsEither([-2, -1, -1, 0, 0, 1]);
-			}
-		} else {
-			if (slave.height > Height.mean(slave) * 170/172.5) {
-				slave.hips = jsEither([-2, -1, -1, 0, 1]);
-				slave.shoulders = jsEither([-1, 0, 1, 1, 2, 2]);
-			} else {
-				slave.hips = jsEither([-2, -2, -1, -1, 0]);
-				slave.shoulders = jsEither([-1, 0, 0, 1, 1, 2]);
-			}
-		}
-		if (slave.physicalAge < 13) {
-			slave.waist = jsRandom(-15,25);
-		} else if (slave.weight < -30) {
-			slave.waist = jsRandom(-45,45);
-		} else if (slave.weight <= 30) {
-			slave.waist = jsRandom(-15,65);
-		} else if (slave.weight <= 160) {
-			slave.waist = jsRandom(5,100);
-		} else {
-			slave.waist = jsRandom(50,100);
-		}
-	};
-
-	function generateVagina() {
-		if (slave.physicalAge <= 13) {
-			slave.vagina = jsEither([0, 0, 0, 0, 0, 0, 0, 1]);
-		} else if (slave.physicalAge <= 15) {
-			slave.vagina = jsEither([0, 0, 0, 0, 0, 0, 1, 1]);
-		} else if (slave.physicalAge <= 17) {
-			slave.vagina = jsEither([0, 0, 0, 0, 0, 1, 1, 1]);
-		} else if (slave.physicalAge < 20) {
-			slave.vagina = jsEither([0, 1]);
-		} else if (slave.physicalAge > 30) {
-			slave.vagina = jsEither([1, 1, 1, 1, 2]);
-		} else {
-			slave.vagina = jsEither([0, 0, 1, 1, 1]);
-		}
-
-		if (slave.physicalAge <= 11) {
-			slave.clit = jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1]);
-		} else if (slave.physicalAge <= 13) {
-			slave.clit = jsEither([0, 0, 0, 0, 0, 0, 0, 1, 1]);
-		} else if (slave.physicalAge <= 15) {
-			slave.clit = jsEither([0, 0, 0, 0, 0, 0, 0, 1, 2]);
-		} else {
-			slave.clit = jsEither([0, 0, 0, 0, 0, 0, 1, 1, 2]);
-		}
-
-		if (slave.physicalAge <= 11) {
-			slave.labia = jsEither([0, 0, 0, 0, 0, 0, 0, 1, 1]);
-		} else if (slave.physicalAge <= 12) {
-			slave.labia = jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1]);
-		} else if (slave.physicalAge <= 13) {
-			slave.labia = jsEither([0, 0, 0, 0, 0, 1, 1, 1, 1]);
-		} else if (slave.physicalAge <= 14) {
-			slave.labia = jsEither([0, 0, 0, 0, 1, 1, 1, 1, 2]);
-		} else if (slave.physicalAge <= 15) {
-			slave.labia = jsEither([0, 0, 0, 1, 1, 1, 1, 2, 2]);
-		} else {
-			slave.labia = jsEither([0, 0, 0, 1, 1, 1, 1, 2, 2, 3]);
-		}
-
-		if (slave.energy < random(1,80)) {
-			slave.vaginaLube = 0;
-		} else if ( slave.physicalAge > random(35,60)) {
-			slave.vaginaLube = 0;
-		} else {
-			slave.vaginaLube = 1;
-		}
-		slave.foreskin = jsRandom(0,4);
-	};
-
-	function generateDick() {
-		slave.vagina = -1;
-		slave.clit = 0;
-		slave.preg = 0;
-
-		if (slave.physicalAge <= 13) {
-			slave.dick = jsEither([1, 1, 1, 1, 2, 2, 2, 3]);
-			if (V.seeExtreme == 1) {
-				slave.balls = jsEither([0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3]);
-			} else {
-				slave.balls = jsEither([1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3]);
-			}
-			slave.scrotum = slave.balls;
-		} else if (slave.physicalAge <= 15) {
-			slave.dick = jsEither([1, 1, 1, 2, 2, 2, 3]);
-			if (V.seeExtreme == 1) {
-				slave.balls = jsEither([0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]);
-			} else {
-				slave.balls = jsEither([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]);
-			}
-			slave.scrotum = slave.balls;
-		} else if (slave.physicalAge <= 17) {
-			slave.dick = jsEither([1, 1, 2, 2, 3, 3]);
-			if (V.seeExtreme == 1) {
-				slave.balls = jsEither([0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5]);
-			} else {
-				slave.balls = jsEither([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5]);
-			}
-			slave.scrotum = slave.balls;
-		} else {
-			slave.dick = jsEither([1, 2, 2, 2, 3, 3, 3, 4, 4, 5]);
-			if (V.seeExtreme == 1) {
-				slave.balls = jsEither([0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5]);
-			} else {
-				slave.balls = jsEither([1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5]);
-			}
-			if (slave.balls != 0) {
-				slave.scrotum = slave.balls + jsEither([0, 0, 1]);
-			} else {
-				slave.scrotum = 0;
-			}
-			if (jsRandom(1,100) < 3) {
-				slave.vasectomy = 1;
-			}
-		}
-	};
-
-	function generateCircumcision() {
-		/* The default rate of 50* is wildly unrepresentative, and there is extreme regional variation. */
-		/*
-		What we want is the prevalence among newborns, since this game
-		happens about 20 years in the future, but we'll use this lacking
-		something better.
-		https://pophealthmetrics.biomedcentral.com/articles/10.1186/s12963-016-0073-5
-		Right now we mostly just break it down by country.
-		It would be better to break it down by both country
-		and race if statistics are available.
-		*/
-		if (V.seeCircumcision == 0) {
-			slave.foreskin = slave.dick + jsRandom(0,1);
-		} else {
-			/* Temporarily use activeSlave.foreskin to store the chance of circumcision. */
-			switch (slave.nationality) {
-				case "Afghan":
-				case "Iranian":
-				case "Moroccan":
-				case "Palestinian":
-				case "Sahrawi":
-				case "Tunisian":
-					slave.foreskin = 100;
-					break;
-				case "Comorian":
-				case "Gabonese":
-				case "Iraqi":
-				case "Jordanian":
-				case "Kurdish":
-				case "Mauritanian":
-				case "Nigerian":
-				case "Tajik":
-				case "Turkish":
-				case "Yemeni":
-					slave.foreskin = 99;
-					break;
-				case "Algerian":
-				case "Azerbaijani":
-				case "Liberian":
-				case "Maldivian":
-					slave.foreskin = 98;
-					break;
-				case "Djiboutian":
-				case "Eritrean":
-				case "Ivorian":
-				case "Libyan":
-				case "Saudi":
-				case "Uzbek":
-					slave.foreskin = 97;
-					break;
-				case "Nigerien":
-				case "Pakistani":
-				case "Sierra Leonean":
-				case "Turkmen":
-				case "Zairian":
-					slave.foreskin = 96;
-					break;
-				case "a Cook Islander":
-				case "Egyptian":
-				case "Gambian":
-				case "Guamanian":
-				case "Malagasy":
-				case "Nauruan":
-				case "Ni-Vanuatu":
-				case "Niuean":
-				case "Palauan":
-				case "Samoan":
-				case "a Solomon Islander":
-				case "Togolese":
-				case "Tongan":
-				case "Tuvaluan":
-					slave.foreskin = 95;
-					break;
-				case "Cameroonian":
-				case "Senegalese":
-				case "Somali":
-					slave.foreskin = 94;
-					break;
-				case "Bangladeshi":
-				case "Beninese":
-				case "Bissau-Guinean":
-				case "Indonesian":
-				case "Syrian":
-					slave.foreskin = 93;
-					break;
-				case "Ethiopian":
-				case "Filipina":
-				case "Ghanan":
-				case "Israeli":
-				case "Kosovan":
-					slave.foreskin = 92;
-					break;
-				case "Kenyan":
-				case "Kyrgyz":
-					slave.foreskin = 91;
-					break;
-				case "Burkinabé":
-				case "Omani":
-					slave.foreskin = 88;
-					break;
-				case "Equatoguinean":
-					slave.foreskin = 87;
-					break;
-				case "Kuwaiti":
-				case "Malian":
-					slave.foreskin = 86;
-					break;
-				case "Guinean":
-					slave.foreskin = 84;
-					break;
-				case "Bahraini":
-					slave.foreskin = 81;
-					break;
-				case "French Polynesian":
-					slave.foreskin = 78;
-					break;
-				case "American":
-				case "Qatari":
-					slave.foreskin = 77;
-					break;
-				case "Emirati":
-					slave.foreskin = 76;
-					break;
-				case "Chadian":
-					slave.foreskin = 74;
-					break;
-				case "Tanzanian":
-					slave.foreskin = 72;
-					break;
-				case "Congolese":
-					slave.foreskin = 70;
-					break;
-				case "Central African":
-					slave.foreskin = 63;
-					break;
-				case "Burundian":
-				case "Malaysian":
-					slave.foreskin = 61;
-					break;
-				case "Lebanese":
-					slave.foreskin = 60;
-					break;
-				case "Angolan":
-					slave.foreskin = 58;
-					break;
-				case "Fijian":
-				case "Kazakh":
-					slave.foreskin = 56;
-					break;
-				case "Bruneian":
-				case "Korean":
-				case "Mosotho":
-					/* Population-weighted average of South Korea and North Korea. */
-					slave.foreskin = 52;
-					break;
-				case "New Caledonian":
-					slave.foreskin = 50;
-					break;
-				case "Albanian":
-					slave.foreskin = 48;
-					break;
-				case "Mozambican":
-					slave.foreskin = 47;
-					break;
-				case "South African":
-					slave.foreskin = 45;
-					break;
-				case "Dominican":
-					slave.foreskin = 43;
-					break;
-				case "Bosnian":
-					slave.foreskin = 42;
-					break;
-				case "Sudanese":
-					slave.foreskin = 39;
-					break;
-				case "Mexican":
-					slave.foreskin = 38;
-					break;
-				case "Macedonian":
-					slave.foreskin = 34;
-					break;
-				case "a New Zealander":
-					slave.foreskin = 33;
-					break;
-				case "Canadian":
-					slave.foreskin = 32;
-					break;
-				case "Scottish":
-					slave.foreskin = 28;
-					break;
-				case "Australian":
-				case "Ugandan":
-					slave.foreskin = 27;
-					break;
-				case "Namibian":
-					slave.foreskin = 26;
-					break;
-				case "South Sudanese":
-					slave.foreskin = 24;
-					break;
-				case "Belgian":
-				case "Cypriot":
-				case "Thai":
-					slave.foreskin = 23;
-					break;
-				case "Malawian":
-					slave.foreskin = 22;
-					break;
-				case "British":
-					slave.foreskin = 21;
-					break;
-				case "Puerto Rican":
-					slave.foreskin = 20;
-					break;
-				case "Montenegrin":
-					slave.foreskin = 19;
-					break;
-				case "Mauritian":
-					slave.foreskin = 17;
-					break;
-				case "Motswana":
-				case "Singaporean":
-				case "Surinamese":
-					slave.foreskin = 15;
-					break;
-				case "Chinese":
-				case "French":
-				case "Indian":
-				case "Jamaican":
-					slave.foreskin = 14;
-					break;
-				case "Bulgarian":
-				case "Rwandan":
-				case "Zambian":
-					slave.foreskin = 13;
-					break;
-				case "French Guianan":
-				case "Guyanese":
-				case "Russian":
-					slave.foreskin = 12;
-					break;
-				case "German":
-					slave.foreskin = 11;
-					break;
-				case "Belarusian":
-				case "Georgian":
-				case "Papua New Guinean":
-					slave.foreskin = 10;
-					break;
-				case "Japanese":
-				case "Zimbabwean":
-					slave.foreskin = 9;
-					break;
-				case "Slovene":
-				case "Sri Lankan":
-				case "Swazi":
-				case "Taiwanese":
-					slave.foreskin = 8;
-					break;
-				case "Catalan":
-				case "Haitian":
-				case "Spanish":
-					slave.foreskin = 7;
-					break;
-				case "Austrian":
-				case "Dutch":
-				case "East Timorese":
-				case "Swiss":
-				case "Trinidadian":
-					slave.foreskin = 6;
-					break;
-				case "Danish":
-				case "Greek":
-				case "a Liechtensteiner":
-				case "Swedish":
-					slave.foreskin = 5;
-					break;
-				case "Burmese":
-				case "Cambodian":
-				case "Mongolian":
-				case "Nepalese":
-				case "Peruvian":
-				case "Serbian":
-					slave.foreskin = 4;
-					break;
-				case "Argentinian":
-				case "Italian":
-				case "Norwegian":
-					slave.foreskin = 3;
-					break;
-				case "Luxembourgian":
-				case "Tibetan":
-				case "Ukrainian":
-				case "Vincentian":
-					slave.foreskin = 2;
-					break;
-				case "Andorran":
-				case "Barbadian":
-				case "Bermudian":
-				case "Bhutanese":
-				case "Brazilian":
-				case "Croatian":
-				case "Finnish":
-				case "Hungarian":
-				case "Irish":
-				case "Moldovan":
-				case "Monégasque":
-				case "Panamanian":
-				case "Portuguese":
-				case "Seychellois":
-				case "Uruguayan":
-					slave.foreskin = 1;
-					break;
-				case "Antiguan":
-				case "Armenian":
-				case "Bahamian":
-				case "Belizean":
-				case "Bolivian":
-				case "Cape Verdean":
-				case "Chilean":
-				case "Colombian":
-				case "Costa Rican":
-				case "Cuban":
-				case "Curaçaoan":
-				case "Czech":
-				case "Dominiquais":
-				case "Ecuadorian":
-				case "Estonian":
-				case "Greenlandic":
-				case "Grenadian":
-				case "Guatemalan":
-				case "Honduran":
-				case "I-Kiribati":
-				case "Icelandic":
-				case "Kittitian":
-				case "Laotian":
-				case "Latvian":
-				case "Lithuanian":
-				case "Maltese":
-				case "Marshallese":
-				case "Micronesian":
-				case "Nicaraguan":
-				case "Paraguayan":
-				case "Polish":
-				case "Romanian":
-				case "Saint Lucian":
-				case "Salvadoran":
-				case "Sammarinese":
-				case "São Toméan":
-				case "Slovak":
-				case "Vatican":
-				case "Venezuelan":
-				case "Vietnamese":
-					slave.foreskin = 0;
-					break;
-				default:
-					/* Some overlooked country, or possibly stateless. Use global average. */
-					slave.foreskin = 38;
-			}
-			/* Second pass for minorities in other countries. */
-			if (slave.race == "middle eastern" && slave.foreskin < 76) {
-				slave.foreskin = 76;
-			}
-			if (slave.race == "semitic" && slave.foreskin < 90) {
-				slave.foreskin = 90;
-			}
-			/* Chance activeSlave.foreskin back to the normal meaning. */
-			if (jsRandom(0,99) < slave.foreskin) {
-				slave.foreskin = 0;
-			} else {
-				slave.foreskin = slave.dick + jsRandom(0,1);
-			}
-		}
-	};
-
-	function generateXXPreferences() {
-		randomizeAttraction(slave);
-		slave.fetishStrength = jsRandom(0,90);
-		slave.fetish = jsEither(["boobs", "buttslut", "cumslut", "dom", "humiliation", "humiliation", "masochist", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "pregnancy", "sadist", "submissive", "submissive"]);
-		slave.behavioralFlaw = jsEither(["anorexic", "arrogant", "bitchy", "devout", "gluttonous", "hates men", "hates women", "hates women", "liberated", "none", "none", "none", "odd"]);
-
-		if (slave.behavioralFlaw == "devout") {
-			slave.sexualFlaw = jsEither(["apathetic", "crude", "judgemental", "none", "repressed", "shamefast"]);
-		} else {
-			slave.sexualFlaw = jsEither(["apathetic", "crude", "hates anal", "hates oral", "hates penetration", "idealistic", "judgemental", "none", "none", "none", "none", "repressed", "shamefast"]);
-		}
-		if (slave.behavioralFlaw == "none" && jsRandom(1,10) == 1) {
-			slave.behavioralQuirk = jsEither(["adores men", "adores women", "advocate", "confident", "cutting", "fitness", "funny", "insecure", "sinful"]);
-		}
-		if (slave.sexualFlaw == "none" && jsRandom(1,10) == 1) {
-			slave.sexualQuirk = jsEither(["caring", "gagfuck queen", "painal queen", "perverted", "romantic", "size queen", "strugglefuck queen", "tease", "unflinching"]);
-		}
-	};
-
-	function generateXYPreferences() {
-		randomizeAttraction(slave);
-		slave.fetishStrength = jsRandom(0,90);
-		slave.fetish = jsEither(["boobs", "buttslut", "buttslut", "cumslut", "dom", "humiliation", "masochist", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "none", "sadist", "submissive"]);
-		slave.behavioralFlaw = jsEither(["anorexic", "arrogant", "bitchy", "devout", "gluttonous", "hates men", "hates men", "hates men", "hates women", "liberated", "none", "none", "none", "odd"]);
-
-		if (slave.behavioralFlaw == "devout") {
-			slave.sexualFlaw = jsEither(["apathetic", "crude", "judgemental", "none", "repressed", "shamefast"]);
-		} else {
-			slave.sexualFlaw = jsEither(["apathetic", "crude", "hates anal", "hates anal", "hates oral", "idealistic", "judgemental", "none", "none", "none", "none", "repressed", "shamefast"]);
-		}
-		if (slave.behavioralFlaw == "none" && jsRandom(1,10) == 1) {
-			slave.behavioralQuirk = jsEither(["adores men", "adores women", "advocate", "confident", "cutting", "fitness", "funny", "insecure", "sinful"]);
-		}
-		if (slave.sexualFlaw == "none" && jsRandom(1,10) == 1) {
-			slave.sexualQuirk = jsEither(["caring", "gagfuck queen", "painal queen", "perverted", "romantic", "size queen", "strugglefuck queen", "tease", "unflinching"]);
-		}
-	};
-
-	function generateXXButt() {
-		if (slave.physicalAge <= 11) {
-			slave.butt = jsEither([1, 1, 1, 1, 1, 1, 1]);
-		} else if (slave.physicalAge <= 12) {
-			slave.butt = jsEither([1, 1, 1, 1, 1, 2, 2]);
-		} else if (slave.physicalAge <= 13) {
-			slave.butt = jsEither([1, 1, 1, 1, 2, 2, 2]);
-		} else if (slave.physicalAge <= 14) {
-			slave.butt = jsEither([1, 1, 1, 2, 2, 2, 3]);
-		} else if (slave.physicalAge <= 15) {
-			slave.butt = jsEither([1, 1, 2, 2, 2, 2, 3]);
-		} else {
-			switch (slave.race) {
-				case "black":
-					slave.butt = jsEither([1, 2, 2, 3, 3, 4, 4]);
-					break;
-				case "indo-aryan":
-				case "malay":
-				case "pacific islander":
-				case "amerindian":
-				case "asian":
-				case "middle eastern":
-				case "semitic":
-				case "southern european":
-					slave.butt = jsEither([1, 2, 2, 3, 3]);
-					break;
-				default:
-					slave.butt = jsEither([1, 2, 2, 3, 3, 4]);
-			}
-		}
-		if (V.weightAffectsAssets != 0) {
-			if (slave.weight < -10 && slave.butt > 1) {
-				slave.butt -= 1;
-			} else if (slave.weight > 100 && slave.butt < 6) {
-				slave.butt += jsRandom(1,2);
-			} else if (slave.weight > 10 && slave.butt < 4) {
-				slave.butt += 1;
-			}
-		}
-		slave.anus = jsEither([0, 0, 1, 1, 2]);
-		slave.analArea = slave.anus + jsEither([0, 0, 0, 1]);
-	};
-
-	function generateXYButt() {
-		if (slave.physicalAge <= 13) {
-			slave.butt = jsEither([1, 1, 1, 2, 2, 3, 3, 4]);
-		} else {
-			slave.butt = jsEither([1, 1, 2, 3]);
-		}
-		if (V.weightAffectsAssets != 0) {
-			if (slave.weight < -10 && slave.butt > 1) {
-				slave.butt -= 1;
-			} else if (slave.weight > 100 && slave.butt < 6) {
-				slave.butt += jsRandom(1,2);
-			} else if (slave.weight > 10 && slave.butt < 4) {
-				slave.butt += 1;
-			}
-		}
-		if (slave.attrXY > 0) {
-			slave.anus = jsEither([0, 1, 2]);
-		} else {
-			if (slave.physicalAge <= 13) {
-				slave.anus = jsEither([0, 0, 0, 0, 0, 1]);
-			} else if (slave.physicalAge <= 15) {
-				slave.anus = jsEither([0, 0, 0, 0, 1, 1, 1]);
-			} else if (slave.physicalAge <= 17) {
-				slave.anus = jsEither([0, 0, 0, 1, 1, 1]);
-			} else {
-				slave.anus = jsEither([0, 0, 1, 1, 2]);
-			}
-		}
-		slave.analArea = slave.anus + jsEither([0, 0, 0, 1]);
-	};
-
-	function generateXXBoobs() {
-		if (slave.physicalAge <= 10) {
-			slave.boobs = 100;
-		} else if (slave.physicalAge == 11) {
-			slave.boobs = jsEither([100, 100, 150, 150, 150, 300]);
-		} else if (slave.physicalAge == 12) {
-			slave.boobs = jsEither([100, 100, 150, 150, 150, 200, 200, 300]);
-		} else if (slave.physicalAge == 13) {
-			slave.boobs = jsEither([100, 150, 200, 200, 300, 300, 300, 400]);
-		} else if (slave.physicalAge == 14) {
-			slave.boobs = jsEither([100, 150, 200, 300, 300, 300, 350, 400, 400]);
-		} else if (slave.physicalAge == 15) {
-			slave.boobs = jsEither([150, 200, 300, 300, 300, 350, 350, 350, 400, 400, 450, 450]);
-		} else {
-			switch (slave.race) {
-				case "black":
-					slave.boobs = BoobGenerator.rollBreast(150);
-					break;
-				case "white":
-					slave.boobs = BoobGenerator.rollBreast(50);
-					break;
-				case "asian":
-					slave.boobs = BoobGenerator.rollBreast(-100);
-					break;
-				default:
-					slave.boobs = BoobGenerator.rollBreast(0);
-			}
-		}
-	};
-
-	function generateXYBoobs() {
-		slave.boobs = jsEither([100, 200, 200, 300, 300, 400, 500]);
-	};
-
-	function generateXXFace() {
-		slave.face = jsRandom(-60,60);
-		if (jsRandom(0,2) == 0) {
-			slave.face = jsRandom(-10,10);
-		}
-		if (slave.physicalAge > 40) {
-			slave.face -= jsRandom(0,20);
-		} else if (slave.physicalAge > 35) {
-			slave.face -= jsRandom(0,10);
-		} else if (slave.physicalAge <= 20) {
-			slave.face += jsRandom(0,20);
-		} else if (slave.physicalAge <= 25) {
-			slave.face += jsRandom(0,10);
-		}
-		if (slave.physicalAge > 10) {
-			slave.faceShape = jsEither(["androgynous", "cute", "exotic", "normal", "normal", "sensual"]);
-		} else {
-			slave.faceShape = jsEither(["androgynous", "androgynous", "cute", "cute", "exotic", "normal", "normal", "sensual"]);
-		}
-		switch (slave.faceShape) {
-			case "sensual":
-			case "cute":
-				slave.face += jsRandom(0,20);
-				break;
-			case "exotic":
-			case "androgynous":
-				slave.face += jsRandom(-10,10);
-				break;
-			case "masculine":
-				slave.face += jsRandom(-10,0);
-		}
-	};
-
-	function generateXYFace() {
-		slave.face = jsRandom(-70,20);
-		if (jsRandom(0,2) == 0) {
-			slave.face = jsRandom(-40,-10);
-		}
-		if (slave.physicalAge > 40) {
-			slave.face -= jsRandom(0,20);
-		} else if (slave.physicalAge > 35) {
-			slave.face -= jsRandom(0,10);
-		} else if (slave.physicalAge <= 20) {
-			slave.face += jsRandom(0,20);
-		} else if (slave.physicalAge <= 25) {
-			slave.face += jsRandom(0,10);
-		}
-		if (slave.physicalAge >= 17) {
-			slave.faceShape = jsEither(["androgynous", "masculine", "masculine", "masculine"]);
-		} else if (slave.physicalAge >= 15) {
-			slave.faceShape = jsEither(["androgynous", "exotic", "masculine", "masculine", "masculine", "masculine", "masculine", "masculine", "masculine", "masculine", "normal", "sensual"]);
-		} else if (slave.physicalAge >= 13) {
-			slave.faceShape = jsEither(["androgynous", "cute", "exotic", "masculine", "masculine", "masculine", "normal", "sensual"]);
-		} else if (slave.physicalAge >= 11) {
-			slave.faceShape = jsEither(["androgynous", "cute", "exotic", "masculine", "normal", "normal", "sensual"]);
-		} else {
-			slave.faceShape = jsEither(["androgynous", "androgynous", "cute", "cute", "exotic", "normal", "normal", "sensual"]);
-		}
-		switch (slave.faceShape) {
-			case "sensual":
-			case "cute":
-				slave.face += jsRandom(0,20);
-				break;
-			case "exotic":
-			case "androgynous":
-				slave.face += jsRandom(-10,10);
-				break;
-			case "masculine":
-				slave.face += jsRandom(-10,0);
-		}
-	};
-
-	function generateXXPregAdaptation() {
-		if (slave.physicalAge <= 6) {
-			slave.pregAdaptation = 5;
-		} else if (slave.physicalAge <= 11) {
-			slave.pregAdaptation = slave.physicalAge - 1;
-		} else if (slave.physicalAge <= 14) {
-			slave.pregAdaptation = 4*(slave.physicalAge - 12) + 14;
-		} else if (slave.physicalAge <= 15) {
-			slave.pregAdaptation = 28;
-		} else if (slave.physicalAge <= 16) {
-			slave.pregAdaptation = 34;
-		} else if (slave.physicalAge <= 17) {
-			slave.pregAdaptation = 42;
-		} else {
-			slave.pregAdaptation = 50;
-		}
-	};
-
-	function generateXYPregAdaptation() {
-		if (slave.physicalAge <= 6) {
-			slave.pregAdaptation = 5;
-		} else if (slave.physicalAge <= 11) {
-			slave.pregAdaptation = slave.physicalAge - 1;
-		} else if (slave.physicalAge <= 15) {
-			slave.pregAdaptation = 2*(slave.physicalAge - 12) + 12;
-		} else {
-			slave.pregAdaptation = 20;
-		}
-	};
-
-	function generateXXVoice() {
-		if (slave.physicalAge <= 13) {
-			slave.voice = jsEither([2, 2, 2, 3, 3, 3, 3, 3, 3]);
-		} else if (slave.physicalAge <= 16) {
-			slave.voice = jsEither([2, 2, 2, 2, 2, 3, 3, 3, 3]);
-		} else {
-			slave.voice = jsEither([1, 2, 2, 2, 2, 2, 2, 3, 3, 3]);
-		}
-	};
-
-	function generateXYVoice() {
-		if (slave.physicalAge <= 11) {
-			slave.voice = jsEither([2, 2, 2, 3, 3, 3, 3, 3, 3]);
-		} else if (slave.physicalAge <= 13) {
-			slave.voice = jsEither([1, 1, 2, 2, 2, 2, 2, 3, 3]);
-		} else if (slave.physicalAge <= 16) {
-			slave.voice = jsEither([1, 1, 1, 2, 2, 2, 2, 2, 3]);
-		} else {
-			if (slave.balls > 2) {
-				slave.voice = 1;
-			} else if (slave.balls > 0) {
-				slave.voice = jsEither([1, 1, 2]);
-			} else {
-				slave.voice = jsEither([1, 2, 2]);
-			}
-		}
-	};
-
-	function generateXXTeeth() {
-		var femaleCrookedTeethGen = slave.intelligence+slave.intelligenceImplant;
-		if ("American" == slave.nationality) {
-			femaleCrookedTeethGen += 20;
-		} else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) {
-			/* do nothing */
-		} else {
-			femaleCrookedTeethGen -= 20;
-		}
-
-		if (jsRandom(0, femaleCrookedTeethGen) <= 15 && slave.physicalAge >= 12) {
-			slave.teeth = jsEither(["crooked", "crooked", "crooked", "crooked", "crooked", "crooked", "crooked", "gapped"]);
-		}
-
-		if (slave.physicalAge < 6) {
-			slave.teeth = "baby";
-		} else if (slave.physicalAge < 12) {
-			slave.teeth = "mixed";
-		}
-	};
-
-	function generateXYTeeth() {
-		var maleCrookedTeethGen = slave.intelligence+slave.intelligenceImplant;
-		if ("American" == slave.nationality) {
-			maleCrookedTeethGen += 22;
-		} else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) {
-			/* do nothing */
-		} else {
-			maleCrookedTeethGen -= 20;
-		}
-
-		if (jsRandom(0, maleCrookedTeethGen) <= 15 && slave.physicalAge >= 12) {
-			slave.teeth = jsEither(["crooked", "crooked", "crooked", "crooked", "crooked", "crooked", "crooked", "gapped"]);
-		}
-
-		if (slave.physicalAge < 6) {
-			slave.teeth = "baby";
-		} else if (slave.physicalAge < 12) {
-			slave.teeth = "mixed";
-		}
-	};
-
-	function generateXXMods() {
-		if (passage() != "Starting Girls") {
-			slave.earPiercing = jsEither([0,1]);
-			slave.nosePiercing = jsEither([0,0,0,1]);
-			slave.eyebrowPiercing = jsEither([0,0,0,0,0,1]);
-			slave.clitPiercing = jsEither([0,0,0,0,0,1]);
-			slave.lipsPiercing = jsEither([0,0,0,0,0,1]);
-			slave.navelPiercing = jsEither([0,0,0,1]);
-			slave.nipplesPiercing = jsEither([0,0,0,0,1]);
-		}
-		if (slave.anus != 0 && Math.random() < 0.25) {
-			slave.anusTat = "bleached";
-		}
-	};
-
-	function generateXYMods() {
-		if (passage() != "Starting Girls") {
-			slave.earPiercing = jsEither([0,0,0,1]);
-			slave.nosePiercing = jsEither([0,0,0,0,1]);
-			slave.eyebrowPiercing = jsEither([0,0,0,0,0,1]);
-			slave.clitPiercing = jsEither([0,0,0,0,0,1]);
-			slave.lipsPiercing = jsEither([0,0,0,0,0,1]);
-			slave.navelPiercing = jsEither([0,0,0,0,1]);
-			slave.nipplesPiercing = jsEither([0,0,0,0,1]);
-		}
-		if (slave.anus != 0 && Math.random() < 0.25) {
-			slave.anusTat = "bleached";
-		}
-	};
-
-	function generateXXBodyHair() {
-		slave.pubicHColor = slave.hColor;
-		slave.underArmHColor = slave.hColor;
-		slave.pubicHStyle = jsEither(["bald", "bald", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless", "in a strip", "in a strip", "in a strip", "in a strip", "in a strip", "neat", "neat", "neat", "neat", "neat", "very bushy", "very bushy", "waxed", "waxed", "waxed", "waxed", "waxed", "waxed"]);
-		slave.underArmHStyle = jsEither(["bald", "bald", "bushy", "bushy", "bushy", "hairless", "neat", "neat", "neat", "neat", "neat", "shaved", "shaved", "shaved", "shaved", "shaved", "waxed", "waxed", "waxed", "waxed"]);
-		if ((slave.pubicHStyle == "hairless" || slave.underArmHStyle == "hairless") && Math.random() > 0.4) {
-			slave.pubicHStyle = "hairless";
-			slave.underArmHStyle = "hairless";
-		}
-		if (slave.hColor == "blonde" && Math.random() > 0.85) {
-			slave.eyebrowHColor = jsEither(["black", "brown", "brown", "brown", "brown"]);
-			slave.override_Brow_H_Color = 1;
-		} else {
-			slave.eyebrowHColor = slave.hColor;
-		}
-		slave.eyebrowHStyle = jsEither(["bald", "curved", "curved", "curved", "curved", "curved", "curved", "curved", "elongated", "elongated", "elongated", "high-arched", "high-arched", "high-arched", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "rounded", "rounded", "rounded", "rounded", "rounded", "shaved", "shaved", "shortened", "shortened", "shortened", "slanted inwards", "slanted inwards", "slanted outwards", "slanted outwards", "straight", "straight", "straight", "straight", "straight", "straight"]);
-		slave.eyebrowFullness = jsEither(["bushy", "bushy", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "pencil-thin", "pencil-thin", "tapered", "tapered", "tapered", "tapered", "thick", "thick", "thick", "thin", "thin", "thin", "threaded", "threaded", "threaded", "threaded"]);
-	};
-
-	function generateXYBodyHair() {
-		slave.pubicHColor = slave.hColor;
-		slave.underArmHColor = slave.hColor;
-		slave.pubicHStyle = jsEither(["bald", "bald", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy in the front and neat in the rear", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless", "in a strip", "in a strip", "in a strip", "neat", "neat", "neat", "neat", "neat", "neat", "very bushy", "very bushy", "waxed", "waxed", "waxed", "waxed", "waxed", "waxed"]);
-		slave.underArmHStyle = jsEither(["bald", "bald", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless", "neat", "neat", "neat", "neat", "neat", "neat", "neat", "shaved", "shaved", "shaved", "shaved", "shaved", "waxed", "waxed", "waxed", "waxed"]);
-		if ((slave.pubicHStyle == "hairless" || slave.underArmHStyle == "hairless") && Math.random() > 0.4) {
-			slave.pubicHStyle = "hairless";
-			slave.underArmHStyle = "hairless";
-		}
-		if (slave.hColor == "blonde" && Math.random() > 0.85) {
-			slave.eyebrowHColor = jsEither(["black", "brown", "brown", "brown", "brown"]);
-			slave.override_Brow_H_Color = 1;
-		} else {
-			slave.eyebrowHColor = slave.hColor;
-		}
-		slave.eyebrowHStyle = jsEither(["bald", "curved", "curved", "curved", "curved", "curved", "elongated", "high-arched", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "rounded", "shaved", "shaved", "shortened", "slanted inwards", "slanted outwards", "straight", "straight", "straight", "straight", "straight", "straight"]);
-		slave.eyebrowFullness = jsEither(["bushy", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "natural", "pencil-thin", "tapered", "tapered", "tapered", "thick", "thick", "thin", "thin", "threaded", "threaded", "threaded"]);
-	};
-
-	function generateXXPuberty() {
-		if (slave.physicalAge >= slave.pubertyAgeXX) {
-			slave.pubertyXX = 1;
-		} else {
-			slave.pubertyXX = 0;
-		}
-	}
-
-	function generateXYPuberty() {
-		if (slave.balls > 0) {
-			if (slave.physicalAge >= slave.pubertyAgeXY) {
-				slave.pubertyXY = 1;
-			} else {
-				slave.pubertyXY = 0;
-			}
-		} else {
-			slave.pubertyXY = 0;
-		}
-	};
-
-	function generateXXGeneticQuirks() {
-		chance = jsRandom(1,1000);
-		if (chance >= 980) {
-			slave.geneticQuirks.fertility = 2;
-		} else if (chance >= 900) {
-			slave.geneticQuirks.fertility = 1;
-		}
-		chance = jsRandom(1,10000);
-		if (chance >= 9970) {
-			slave.geneticQuirks.hyperFertility = 2;
-		} else if (chance >= 9900) {
-			slave.geneticQuirks.hyperFertility = 1;
-		}
-	};
-
-	function generateXYGeneticQuirks() {
-		chance = jsRandom(1,1000);
-		if (chance >= 950) {
-			slave.geneticQuirks.fertility = 1;
-		}
-		chance = jsRandom(1,10000);
-		if (chance >= 9900) {
-			slave.geneticQuirks.hyperFertility = 1;
-		}
-	};
-
-	function generateAge() {
-		if (V.activeSlaveOneTimeMaxAge > 998) {
-			V.activeSlaveOneTimeMaxAge = (V.pedo_mode === 1) ? 18 : 42;
-		} else if (V.pedo_mode === 1 && V.one_time_age_overrides_pedo_mode === 0 && V.activeSlaveOneTimeMaxAge > 18) {
-			V.activeSlaveOneTimeMaxAge = 18;
-		}
-		if (V.retirementAge < V.activeSlaveOneTimeMaxAge) {
-			V.activeSlaveOneTimeMaxAge = (V.retirementAge - 1);
-		}
-		if (V.activeSlaveOneTimeMinAge < V.minimumSlaveAge) {
-			V.activeSlaveOneTimeMinAge = V.minimumSlaveAge;
-		} else if (V.pedo_mode === 1 && V.one_time_age_overrides_pedo_mode === 0) {
-			V.activeSlaveOneTimeMinAge = V.minimumSlaveAge;
-		}
-		if (V.activeSlaveOneTimeMaxAge < V.activeSlaveOneTimeMinAge) {
-			V.activeSlaveOneTimeMaxAge = V.activeSlaveOneTimeMinAge;
-		}
-		if (V.activeSlaveOneTimeMaxAge >= 30 && V.arcologies[0].FSMaturityPreferentialist !== "unset" && V.ageAdjustOverride !== 1) {
-			V.activeSlaveOneTimeMaxAge += 10;
-		}
-		slave.actualAge = jsRandom(V.activeSlaveOneTimeMinAge, V.activeSlaveOneTimeMaxAge);
-		const secondAgeRoll = jsRandom(V.activeSlaveOneTimeMinAge, V.activeSlaveOneTimeMaxAge);
-		if (V.arcologies[0].FSYouthPreferentialist !== "unset" && V.arcologies[0].FSYouthPreferentialist >= jsRandom(1, 100)) {
-			slave.actualAge = Math.min(slave.actualAge, secondAgeRoll);
-		} else if (V.arcologies[0].FSMaturityPreferentialist !== "unset" && V.arcologies[0].FSMaturityPreferentialist >= jsRandom(1, 100)) {
-			slave.actualAge = Math.max(slave.actualAge, secondAgeRoll);
-		}
-		if (slave.actualAge >= V.retirementAge) {
-			slave.actualAge = (V.retirementAge - 2);
-		}
-		V.activeSlaveOneTimeMinAge = 0;
-		V.activeSlaveOneTimeMaxAge = 999;
-		V.one_time_age_overrides_pedo_mode = 0;
-		V.ageAdjustOverride = 0;
-		slave.visualAge = slave.actualAge;
-		slave.physicalAge = slave.actualAge;
-		slave.ovaryAge = slave.actualAge;
-		slave.age = slave.actualAge; /*compatibility*/
-		slave.pubertyAgeXX = V.fertilityAge;
-		slave.pubertyAgeXY = V.potencyAge;
-	};
-
-	function generateIntelligence() {
-		const gaussian = gaussianPair();
-		slave.intelligence = Intelligence.random();
-		if (V.AgePenalty == 1 && slave.actualAge <= 24) {
-			if (gaussian[0] < gaussian[1] + slave.intelligence/29 + (slave.actualAge - 24)/8 - 0.35) {
-				slave.intelligenceImplant = 15;
-				if (slave.intelligenceImplant > 0 && jsRandom(15,150) < slave.intelligence) {
-					slave.intelligenceImplant = 30;
-				}
-			}
-		} else {
-			if (gaussian[0] < gaussian[1] + slave.intelligence/29 - 0.35) { /* 40.23% chance if intelligence is 0, 99.26% chance if intelligence is 100 */
-				slave.intelligenceImplant = 15;
-				if (slave.intelligenceImplant > 0 && jsRandom(15,150) < slave.intelligence) {
-					slave.intelligenceImplant = 30;
-				}
-			}
-		}
-	};
-
-	function generateCareer() {
-		if (V.AgePenalty == 1) {
-			if (slave.actualAge < 16) {
-				slave.career = setup.veryYoungCareers.random();
-			} else if (slave.actualAge <= 24) {
-				slave.career = setup.youngCareers.random();
-			} else if (slave.intelligenceImplant >= 15) {
-				slave.career = setup.educatedCareers.random();
-			} else {
-				slave.career = setup.uneducatedCareers.random();
-			}
-		} else {
-			if (slave.actualAge < 16) {
-				slave.career = setup.veryYoungCareers.random();
-			} else if (slave.intelligenceImplant >= 15) {
-				slave.career = setup.educatedCareers.random();
-			} else if (slave.actualAge <= 24) {
-				slave.career = setup.youngCareers.random();
-			} else {
-				slave.career = setup.uneducatedCareers.random();
-			}
-		}
-	};
-
-	function generateNationality() {
-		if (V.fixedRace == 0) {
-			if (V.fixedNationality == 0) {
-				slave.nationality = hashChoice(V.nationalities);
-			} else {
-				slave.nationality = V.fixedNationality;
-				V.fixedNationality = 0;
-			}
-			nationalityToRace(slave);
-		} else {
-			if (V.fixedNationality == 0) {
-				slave.race = V.fixedRace;
-				V.fixedRace = 0;
-				raceToNationality(slave);
-			} else {
-				slave.race = V.fixedRace;
-				slave.nationality = V.fixedNationality;
-				V.fixedNationality = 0;
-				V.fixedRace = 0;
-			}
-
-		}
-	};
-
-	function generateAccent() {
-		nationalityToAccent(slave);
-		if ((slave.intelligenceImplant >= 15 || slave.intelligence > 95) && slave.accent >= 3 && slave.intelligence > jsRandom(0,100)) {
-			slave.accent -= 1;
-		}
-	};
-
-	function generateRacialTraits() {
-		switch (slave.race) {
-			case "black":
-				slave.lips = jsRandom(5,30);
-				slave.skin = jsEither(["black", "brown", "dark brown"]);
-				slave.hColor = jsEither(["black", "black", "black", "brown"]);
-				slave.hStyle = jsEither(["crinkled", "neat"]);
-				break;
-			case "white":
-				slave.lips = jsRandom(5,25);
-				if (slave.nationality == "German") {
-					slave.skin = jsEither(["fair", "light", "pale"]);
-					slave.eyeColor = jsEither(["blue", "blue", "blue", "brown", "green"]);
-					slave.hColor = jsEither(["black", "blonde", "blonde", "blonde", "brown", "red"]);
-				} else if (slave.nationality == "Icelandic") {
-					slave.skin = jsEither(["fair", "light", "pale", "pale"]);
-					slave.eyeColor = jsEither(["blue", "blue", "blue", "brown", "green"]);
-					slave.hColor = jsEither(["black", "blonde", "blonde", "blonde", "brown", "red"]);
-				} else if (slave.nationality == "Irish") {
-					slave.skin = jsEither(["fair", "light", "pale", "pale"]);
-					slave.eyeColor = jsEither(["blue", "brown", "green", "green", "green"]);
-					slave.hColor = jsEither(["black", "blonde", "brown", "red", "red", "red"]);
-				} else if (slave.nationality == "Scottish") {
-					slave.skin = jsEither(["fair", "fair", "light", "pale"]);
-					slave.eyeColor = jsEither(["blue", "brown", "brown", "green", "green", "green"]);
-					slave.hColor = jsEither(["black", "black", "blonde", "red", "red", "red", "brown"]);
-				} else {
-					slave.skin = jsEither(["fair", "light", "pale"]);
-					slave.eyeColor = jsEither(["blue", "brown", "green"]);
-					slave.hColor = jsEither(["black", "blonde", "brown", "red"]);
-				}
-				slave.hStyle = "neat";
-				break;
-			case "latina":
-				slave.lips = jsRandom(5,25);
-				slave.skin = jsEither(["brown", "dark brown", "dark olive", "light olive", "tanned"]);
-				slave.hColor = jsEither(["black", "brown"]);
-				slave.hStyle = "neat";
-				break;
-			case "indo-aryan":
-			case "malay":
-			case "pacific islander":
-			case "amerindian":
-				slave.lips = jsRandom(5,25);
-				slave.skin = jsEither(["dark", "light"]);
-				slave.hColor = "black";
-				slave.hStyle = "neat";
-				break;
-			case "asian":
-				slave.lips = jsRandom(5,25);
-				slave.skin = jsEither(["dark olive", "light olive", "light"]);
-				slave.hColor = "black";
-				slave.hStyle = "neat";
-				break;
-			case "middle eastern":
-			case "semitic":
-			case "southern european":
-				slave.lips = jsRandom(5,25);
-				slave.skin = jsEither(["fair", "light olive", "light", "tanned"]);
-				slave.hColor = "black";
-				slave.hStyle = "neat";
-				break;
-			default:
-				slave.lips = jsRandom(5,25);
-				slave.skin = jsEither(["dark", "light", "pale"]);
-				slave.hColor = jsEither(["black", "black", "black", "black", "blonde", "brown", "brown", "red"]);
-				slave.hStyle = "neat";
-		}
-		if (slave.skin == "pale" || slave.skin == "fair") {
-			if (jsRandom(1,4) == 1) {
-				slave.markings = jsEither(["beauty mark", "beauty mark", "birthmark", "birthmark", "freckles", "freckles", "freckles", "heavily freckled"]);
-			}
-		} else if (jsRandom(1,8) == 1) {
-			slave.markings = jsEither(["beauty mark", "birthmark"]);
-		}
-	};
-
-	function generateBoobTweaks() {
-		if (V.weightAffectsAssets != 0) {
-			if (slave.weight < -10 && slave.boobs > 200) {
-				slave.boobs -= 100;
-			} else if (slave.weight > 190 && slave.boobs < 3000) {
-				slave.boobs += (jsRandom(3,8)*100);
-			} else if (slave.weight > 160 && slave.boobs < 1500) {
-				slave.boobs += (jsRandom(2,6)*100);
-			} else if (slave.weight > 130 && slave.boobs < 1500) {
-				slave.boobs += (jsRandom(1,4)*100);
-			} else if (slave.weight > 95 && slave.boobs < 1200) {
-				slave.boobs += (jsRandom(1,3)*100);
-			} else if (slave.weight > 30 && slave.boobs < 1000) {
-				slave.boobs += 100;
-			}
-		}
-
-		var BoobShapeGen = [];
-		if (slave.boobs > 250 && slave.boobs < 800) {
-			BoobShapeGen.push("perky");
-			BoobShapeGen.push("downward-facing");
-		}
-		if (slave.boobs > 400 && slave.boobs < 1200) {
-			BoobShapeGen.push("torpedo-shaped");
-			BoobShapeGen.push("wide-set");
-		}
-		if (slave.boobs > 800 && slave.physicalAge > jsRandom(10,50)) {
-			BoobShapeGen.push("saggy");
-		}
-		if (BoobShapeGen.length == 1) {
-			if (Math.random() < 0.5) {
-				slave.boobShape = jsEither(BoobShapeGen);
-			}
-		} else if (BoobShapeGen.length > 1) {
-			if (jsRandom(1,3) != 1) {
-				slave.boobShape = jsEither(BoobShapeGen);
-			}
-		}
-
-		if (slave.boobs < 250) {
-			slave.nipples = jsEither(["cute", "cute", "partially inverted", "puffy", "tiny", "tiny", "tiny", "tiny"]);
-		} else if (slave.boobs < 500) {
-			slave.nipples = jsEither(["cute", "cute", "cute", "partially inverted", "puffy", "tiny"]);
-		} else if (slave.boobs < 1000) {
-			slave.nipples = jsEither(["cute", "cute", "cute", "inverted", "partially inverted", "puffy", "puffy", "tiny"]);
-		} else {
-			slave.nipples = jsEither(["cute", "huge", "inverted", "partially inverted", "puffy"]);
-		}
-	};
-
-	function generateSkills() {
-		slave.vaginalSkill = (slave.vagina == 0 ? 0 : jsRandom(0,15));
-		slave.analSkill = (slave.anus == 0 ? 0 : jsRandom(0,15));
-		slave.oralSkill = jsRandom(0,15);
-		slave.entertainSkill = jsRandom(0,15);
-		slave.whoreSkill = jsRandom(0,15);
-	};
-
-	function generateDisabilities() {
-		if (slave.physicalAge >= jsRandom(0,100)) {
-			slave.eyes = -1;
-		}
-		if (slave.physicalAge >= jsRandom(30,100)) {
-			slave.hears = -1;
-		}
-		if (V.seeExtreme == 1) {
-			let disList = [];
-			disList.push("hearNot");
-			disList.push("seeNot");
-			disList.push("speakNot");
-			let disableCount = 0;
-			if (V.oneTimeDisableDisability === 0) {
-				while (disList.length > 0) {
-					let rolled = jsEither(disList);
-					switch (rolled) {
-					case "hearNot":
-						if ((jsRandom(1,100)-(disableCount*2)) > 90) {
-							slave.hears = -2;
-						}
-						disList.delete("hearNot");
-						disableCount++;
-						break;
-					case "seeNot":
-						if ((jsRandom(1,100)-(disableCount*2)) > 90) {
-							slave.eyes = -2;
-						}
-						disList.delete("seeNot");
-						disableCount++;
-						break;
-					case "speakNot":
-						if ((jsRandom(1,100)-(disableCount*2)) > 90) {
-							slave.voice = 0;
-						}
-						disList.delete("speakNot");
-						disableCount++;
-						break;
-					}
-				}
-			}
-			V.oneTimeDisableDisability = 0;
-		}
-	};
-
-	return GenerateNewSlave;
-})();
-
-/*SecForceEX JS V = SugarCube.State.variables, T = SugarCube.State.temporary;*/
-window.SFC = function() {
-	const V = State.variables;
-	if (V.SF.MercCon.CanAttend === -1) {return `The Colonel`;}
-	else {
-		if (V.SF.Facility.LCActive > 0) {return `Lieutenant Colonel <<= SlaveFullName(V.SF.Facility.LC)>>`;}
-		else {return `a designated soldier`;}}
-};
-
-window.SFCR = function() {
-	const V = State.variables, C = V.SF.Colonel;
-	if (C.Status <= 19) {return `boss`;}
-	else if (C.Status <= 39) {return `friend`;}
-	else {return `fuckbuddy`;}
-};
-
-window.TroopDec = function() {
-	const V = State.variables, commom = "the <<print commaNum($SF.Squad.Troops)>> members of $SF.Lower", S = V.SF.Squad;
-	if (S.Troops < 100) {return `sparsely occupied, ${commom} residing within them concentrating together in a corner. The hundreds of empty beds and lockers visibly herald the future`;}
-	else if (S.Troops < 400) {return `lightly occupied, with ${commom} starting to spread out across them`;}
-	else if (S.Troops < 800) {return `moderately occupied, though ${commom} residing within have a considerable amount of extra room`;}
-	else if (S.Troops < 1500) {return `well-occupied, and ${commom} residing within have started to form small cliques based on section and row`;}
-	else {return `near capacity, and ${commom} often barter their personal loot, whether it be monetary or human, for the choicest bunks`;}
-};
-
-window.HSM = function() {
-	const V = State.variables;
-	if (V.PC.hacking <= -100) {return 1.5;}
-	else if (V.PC.hacking <= -75) {return 1.35;}
-	else if (V.PC.hacking <= -50) {return 1.25;}
-	else if (V.PC.hacking <= -25) {return 1.15;}
-	else if (V.PC.hacking < 0) {return 1.10;}
-	else if (V.PC.hacking === 0) {return 1;}
-	else if (V.PC.hacking <= 10) {return 0.97;}
-	else if (V.PC.hacking <= 25) {return 0.95;}
-	else if (V.PC.hacking <= 50) {return 0.90;}
-	else if (V.PC.hacking <= 75) {return 0.85;}
-	else if (V.PC.hacking <= 100) {return 0.80;}
-	else {return 0.75;}
-};
-
-window.Count = function() {
-	const V = State.variables, T = State.temporary, C = Math.clamp, S = V.SF.Squad, E = V.economy;
-	T.SFF = V.SF.Facility.Active;
-	T.SFFU = 1,T.SFF = C(T.SFF, 0, T.SFFU);
-	T.FU = 10,S.Firebase = C(S.Firebase, 0, T.FU);
-	T.AU = 10,S.Armoury = C(S.Armoury, 0, T.AU);
-	T.DrugsU = 10,S.Drugs = C(S.Drugs, 0, T.DrugsU);
-	T.DU = 10,S.Drones = C(S.Drones, 0, T.DU);
-	T.AVU = 10,S.AV = C(S.AV, 0, T.AVU);
-	T.TVU = 10,S.TV = C(S.TV, 0, T.TVU);
-	T.AAU = 10,S.AA = C(S.AA, 0, T.AAU);
-	T.TAU = 10,S.TA = C(S.TA, 0, T.TAU);
-	if (V.PC.warfare >= 75) {T.PGTU = 10,T.SPU = 10,T.GunSU = 10,T.SatU = 10,T.GRU = 10,T.MSU = 10,T.ACU = 10,T.SubU = 10,T.HATU = 10;}
-	else if (V.PC.warfare >= 50) {T.PGTU = 9,T.SPU = 9,T.GunSU = 9,T.SatU = 9,T.GRU = 9,T.MSU = 9,T.ACU = 9,T.SubU = 9,T.HATU = 9;}
-	else {T.PGTU = 8,T.SPU = 8,T.GunSU = 8,T.SatU = 8,T.GRU = 8,T.MSU = 8,T.ACU = 8,T.SubU = 8,T.HATU = 8;}
-	S.PGT = C(S.PGT, 0, T.PGTU);
-	S.SpacePlane = C(S.SpacePlane, 0, T.SPU), S.GunS = C(S.GunS, 0, T.GunSU);
-	S.Satellite.lv = C(S.Satellite.lv, 0, T.SatU), S.GiantRobot = C(S.GiantRobot, 0, T.GRU), S.MissileSilo = C(S.MissileSilo, 0, T.MSU);
-	S.AircraftCarrier = C(S.AircraftCarrier, 0, T.ACU),S.Sub = C(S.Sub, 0, T.SubU),S.HAT = C(S.HAT, 0, T.HATU);
-	T.GU = T.AVU+T.TVU+T.PGTU, T.G = S.AV+S.TV+S.PGT;
-	T.H = S.AA+S.TA+S.SpacePlane+S.GunS, T.HU = T.AAU+T.TAU+T.SPU+T.GunSU;
-	T.LBU = T.SatU + T.MSU, T.LB = S.Satellite.lv + S.MissileSilo;
-	T.Base = S.Firebase + S.Armoury + S.Drugs + S.Drones + T.H;
-	T.max = T.FU + T.AU + T.DrugsU + T.DU + T.HU;
-	if (V.SF.Facility.Toggle > 0) {
-		T.Base += T.SFF, T.max += T.SFFU;
-	}
-
-	if (V.terrain !== "oceanic") { T.LBU += T.GRU, T.LB += S.GiantRobot, T.Base += T.G, T.max += T.GU;
-	T.max += T.LBU, T.Base += T.LB;}
-	if (V.terrain === "oceanic" || V.terrain === "marine") {
-		T.NY = S.AircraftCarrier + S.Sub + S.HAT, T.Base += T.NY;
-		T.NYU = T.ACU + T.SubU + T.HATU, T.max += T.NYU;}
-	V.SF.Size = T.Base, V.SF.Size = C(V.SF.Size, 0, T.max);
-	if (E > 100) {T.Env = 4;}
-	else if (E > 67) {T.Env = 3;}
-	else {T.Env = 2;}
-	T.ColonelCashBonus = 10000; T.inviTroop = 100;
-	T.TroopCashBonus = T.inviTroop*S.Troops;
-	T.SFCashBonus = ((T.ColonelCashBonus+(T.TroopCashBonus))*T.Env);
-};
-
-window.Firebase = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var appear = `is currently constructed in a haphazard fashion.`, barracks = `Soldiers' cots are mixed in with weapons crates and ammunition.`, slave = `Cages for processing slaves lie off to one side,`, common = `and in the center is a common area with tables for soldiers to gather around for meals or rowdy conversations.`, garage = ``, drone = ``, hangar = ``, launch = ``, artillery = ``, comms = ``, training = ``;
-
-	if (S.Firebase >= 1) {appear = `has had some organization put into it.`, barracks = `The majority of weapons, armor, and ammunition have been separated from the soldiers' cots into their own armory.`, garage = `A section near the outer wall of the arcology has been converted to a garage with an adjoining vehicle maintenance bay`, drone = `.`;
-		if (V.terrain === "oceanic") garage += ` for inter-arcology travel`;}
-	if (S.Firebase >= 2) barracks = `A barracks has been constructed near the armory, allowing soldiers a quieter place to sleep and store their personal spoils.`, drone = `, as well as a facility for the storage, maintenance, and deployment of armed combat drones.`;
-	if (S.Firebase >= 3) appear = `has become more permanent.`, barracks = `A command center has been constructed near the barracks and armory, allowing for additional support personnel.`;
-	if (S.Firebase >= 4) hangar = `Hangar space for storing and repairing aircraft has been converted from unused space on the other side of the garage.`;
-	if (S.Firebase >= 5) {
-		appear = `is nearing the appearance of a military base.`, launch = `The rest of the firebase has been designated for special projects.`, artillery = `Artillery batteries are set around the base of the arcology.`;
-		if (V.terrain === "oceanic" || V.terrain === "marine") launch += ` A Naval Yard has been constructed in the waters near the arcology.`;}
-	if (S.Firebase >= 6) common = `and in the center is a common area for recreation, including a small movie theater and a mess hall.`;
-	if (S.Firebase >= 7) {slave = `A slave detention facility has been sectioned off to one side`;
-		if (V.SF.Depravity > 1.5) slave += ` emanating the sounds of rape and torture`;
-		slave += `,`;}
-	if (S.Firebase >= 8) appear = `has become a fully fledged military base.`, comms = `A Free City-wide communication network for $SF.Lower has been constructed to facilitate faster responses and efficient monitoring of the surrounding area.`;
-	if (S.Firebase >= 9) training = `A high-tech killhouse has been constructed to aid in soldier training.`;
-	if (S.Firebase >= 10) artillery = `Railgun artillery batteries are set around the base of the arcology, capable of accurately destroying enemies an absurd distance away.`;
-
-	return `The firebase ${appear} ${barracks} ${comms} ${training} ${slave} ${common} ${garage}${drone} ${hangar} ${launch} ${artillery}`;
-};
-
-window.Armoury = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var weapons = `The weapons are mostly worn rifles that have already seen years of service before $SF.Lower acquired them.`, armor = `The body armor is enough to stop smaller calibers, but nothing serious.`, comms = ``, helmets = ``, ammo = ``, uniforms = ``, special = ``, exo = ``;
-
-	if (S.Armoury >= 1) comms = `Radios have been wired into the soldiers helmets`, helmets = `.`;
-	if (S.Armoury >= 2) helmets = ` and a HUD has been integrated into the soldier's eyewear.`;
-	if (S.Armoury >= 3) ammo = `Tactical vests have been provided, allowing soldiers to carry additional ammo.`;
-	if (S.Armoury >= 4) armor = `The body armor is a newer variant, able to stop small arms fire and protect against shrapnel.`;
-	if (S.Armoury >= 5) weapons = `The weapons are modern rifles and sidearms, putting $SF.Lower on par with rival mercenary outfits.`;
-	if (S.Armoury >= 6) uniforms = `New uniforms have been distributed that are more comfortable and made of breatheable fabric to keep soldiers from overheating.`;
-	if (S.Armoury >= 7) special = `Specialized weaponry is available for various roles, allowing more flexibility in planning.`;
-	if (S.Armoury >= 8) helmets = `and a HUD and camera display have been integrated into soldiers' eyewear, enabling accurate aim around corners or from behind cover`;
-	if (S.Armoury >= 9) exo = `An exosuit has been developed to reduce the amount of weight soldiers carry, increase lifting strength, and move faster in combat.`;
-	if (S.Armoury >= 10) weapons = `Cutting-edge weaponry is available to $SF.Lower, far outpacing the ability of rival mercenary outfits.`;
-
-	return `The armory holds soldiers' weapons and gear while not in training or combat. ${weapons} ${special} ${armor} ${comms}${helmets} ${ammo} ${uniforms} ${exo}`;
-};
-
-window.Drugs = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var amphet = ``, phen = ``, steroid = ``, downer = ``, concen = ``, stimpack = ``, stabilizer = ``;
-
-	if (S.Drugs >= 1) amphet = `Amphetamines have been added to the cocktail at a low dosage to act as a stimulant, physical performance enhancer, cognition control enhancer. Some side-effects exist.`;
-	if (S.Drugs >= 2) phen = `Phencyclidine has been added to the cocktail at a low dosage as a dissociative psychotropic for soldiers in battle to introduce feelings of detachment, strength and invincibility, and aggression. Some side-effects reduce the tolerable dosage before soldiers go on uncontrollable violent outbreaks.`;
-	if (S.Drugs >= 3) steroid = `Testosterone is being produced for soldiers in training as a natural muscle growth stimulant and to invoke aggression.`;
-	if (S.Drugs >= 4) downer = `Zaleplon is being produced as a downer to counteract the battle cocktail and encourage rest before combat.`;
-	if (S.Drugs >= 5) concen = `Methylphenidate has been added to the cocktail as a stimulant and to improve soldier concentration.`;
-	if (S.Drugs >= 6) phen = `A phencyclidine-based drug has been added to the cocktail as a dissociative psychotropic for soldiers in battle to introduce controllable feelings of detachment, strength and invincibility, and aggression.`;
-	if (S.Drugs >= 7) steroid = `Low levels of anabolic steroids are being produced for soldiers in training to stimulate muscle growth and invoke aggression.`;
-	if (S.Drugs >= 8) amphet = `Diphenylmethylsulfinylacetamide has been added to the cocktail to counteract the effects of sleep deprivation and promote alertness.`;
-	if (S.Drugs >= 9) stimpack = `A stimpack of the battle cocktail is being given to soldiers in battle to take if the original dose wears off before the battle is over.`;
-	if (S.Drugs >= 10) stabilizer = `A stabilizer has been added to the battle cocktail that helps tie effects together while reducing side-effects, leading to an effectively safe supersoldier drug.`;
-
-	return `A drug lab has been established to increase the effectiveness of $SF.Lower's soldiers. Many of these chemicals are mixed into a single 'battle cocktail' to be taken before combat. ${amphet} ${phen} ${concen} ${steroid} ${downer} ${stimpack} ${stabilizer}`;
-};
-
-window.LUAV = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var a = `have been recommissioned for use by $SF.Lower`, b = `.`, c = ``, d = ``, e = ``, f = ``, g = ``, h = ``, i = ``, j = ``, k = ``;
-
-	if (S.Drones >= 2) a = `equipped with missiles are resting on one side of the drone bay`, b = `, as well as destroying the occasional target.`;
-	if (S.Drones >= 3) c = `A fleet of`, d = `large delivery quadcopters have been converted for military service to support ground forces as combat drones.`;
-	if (S.Drones >= 4) d = `combat drones take up the rest of the space in the drone bay. They have a`, e = `small automatic rifle`, f = `mounted to the underside.`;
-	if (S.Drones >= 5) g = `Armor has been added to protect vulnerable components from small arms fire.`;
-	if (S.Drones >= 6) h = `The fleet's batteries have been replaced with higher capacity models, increasing the functional time spent in combat.`;
-	if (S.Drones >= 7) i = `The propellers and motors have been upgraded, increasing maneuverability and speed.`;
-	if (S.Drones >= 8) j = `The drone control signal has been boosted and encrypted, giving the drones a greater range and protecting against electronic warfare.`;
-	if (S.Drones >= 9) e = `light machine gun`;
-	if (S.Drones >= 10) k = `A drone-to-drone network has been installed, allowing drones to swarm, maneuver, and attack targets autonomously.`;
-
-	return `Surveillance drones ${a}. During combat, they supply aerial intel to commanders and act as the communications network for ground forces${b} ${c} ${d} ${e} ${f} ${g} ${h} ${i} ${j} ${k}`;
-};
-
-window.AV = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var b = `has been recommissioned for use by $SF.Lower. They`, c = `; mechanics are methodically checking the recent purchases for battle-readiness`, MG = `120 mm main gun is enough to handle the majority of opponents around the Free Cities.`, engine = ``, armor = ``, armor2 = ``, ammo = ``, mg = ``, fireC0 = ``, fireC1 = ``, fireC2 = ``, fireC3 = ``, turret = ``;
-
-	if (S.AV >= 2) engine = `The engine has been overhauled, allowing much faster maneuvering around the battlefield.`, b = ``, c = ``;
-	if (S.AV >= 3) armor = `A composite ceramic armor has replaced the original, offering much greater protection from attacks.`;
-	if (S.AV >= 4) ammo = `The tanks have been outfitted with additional types of ammo for situational use.`;
-	if (S.AV >= 5) mg = `A remote-controlled .50 cal machine gun has been mounted on the turret to handle infantry and low-flying aircraft.`;
-	if (S.AV >= 6) fireC0 = `A fire-control system`, fireC3 = `been installed, guaranteeing`, fireC2 = `has`, fireC1 = `accurate fire.`;
-	if (S.AV >= 7) fireC2 = `and an autoloader have`, fireC1 = `rapid, accurate fire while separating the crew from the stored ammunition in the event the ammo cooks off.`;
-	if (S.AV >= 8) armor2 = `A reactive armor system has been added, giving the tank an additional, if temporary, layer of protection.`;
-	if (S.AV >= 9) turret = `The turret has been massively redesigned, lowering the tank profile and increasing the efficiency of the mechanisms within.`;
-	if (S.AV >= 10) MG = `140 mm main gun can quash anything even the greatest Old World nations could muster.`;
-
-	return `A fleet of main battle tanks ${b} are parked in the garage${c}. ${turret} The ${MG} ${ammo} ${mg} ${fireC0} ${fireC2} ${fireC3} ${fireC1} ${engine} ${armor} ${armor2}`;
-};
-
-window.TV = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var B = `has been recommissioned for use by $SF.Lower. They`, C = `; mechanics are giving the new purchases a final tuneup`, squad = `a squad`, G1 = `20`, G2 = `in a firefight`, e0 = `The engine has been`, engine = ``, armor = ``, tires = ``, m1 = ``, m2 = ``, pod1 = ``, pod2 = ``;
-
-	if (S.TV >= 2) engine = `${e0} overhauled, allowing for higher mobility.`, C = ``, B = ``;
-	if (S.TV >= 3) armor = `Composite armor has been bolted to the exterior, increasing the survivability of an explosive attack for the crew and passengers.`;
-	if (S.TV >= 4) tires = `The tires have been replaced with a much more durable version that can support a heavier vehicle.`;
-	if (S.TV >= 5) m1 = `An automatic missile defense system has been installed,`, m2 = `targeting any guided missiles with laser dazzlers and deploying a smokescreen.`;
-	if (S.TV >= 6) pod1 = `An anti-tank missile pod`, pod2 = `has been installed on the side of the turret.`;
-	if (S.TV >= 7) G1 = `25`, G2 = `by attacking enemies through cover and destroying light armor`;
-	if (S.TV >= 8) pod2 = `and an anti-aircraft missile pod have been installed on either side of the turret.`;
-	if (S.TV >= 9) squad = `two squads`, armor = ``, m2 = `destroying any incoming missiles with a high-powered laser. Some of the now redundant composite armor has been removed, and the reclaimed space allows for more passengers.`;
-	if (S.TV >= 10) engine = `${e0} replaced with the newest model, allowing the vehicle to get in and out of the conflict extremely quickly.`;
-
-	return `A fleet of infantry fighting vehicles ${B} are parked in the garage${C}. The IFVs can carry ${squad} of 6 to a firezone. The ${G1} mm autocannon supports infantry ${G2}. ${pod1} ${pod2} ${engine} ${armor} ${tires} ${m1} ${m2}`;
-};
-
-window.PGT = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var b = `has been sold to $SF.Lower through back channels to support a failing Old World nation. The tank is so large it cannot fit inside the garage, and has`, c = ``, engines = `. Two engines power the left and right sides of the tank separately, leaving it underpowered and slow`, gun0 = ``, gun1 = ``, gun2 = `an undersized main gun and makeshift firing system from a standard battle tank`, armor1 = ``, armor0 = ``, cannon = ``, laser = ``, PGTframe = ``;
-
-	if (S.PGT >= 2) c = `rests in`, b = ``, engines = ` and powered by their own engine, allowing the tank to travel with an unsettling speed for its massive bulk`;
-	if (S.PGT >= 3) gun0 = `a railgun capable of`, gun1 = `firing steel slugs`, gun2 = `through one tank and into another`;
-	if (S.PGT >= 4) armor0 = `reinforced, increasing survivability for the crew inside.`, armor1 = `The armor has been`;
-	if (S.PGT >= 5) cannon = `A coaxial 30mm autocannon has been installed in the turret, along with automated .50 cal machine guns mounted over the front treads.`;
-	if (S.PGT >= 6) laser = `Laser anti-missile countermeasures have been installed, destroying any subsonic ordinance fired at the Goliath.`;
-	if (S.PGT >= 7) PGTframe = `The frame has been reinforced, allowing the Goliath to carry more armor and guns.`;
-	if (S.PGT >= 8) armor0 = `redesigned with sloping and state-of-the-art materials, allowing the Goliath to shrug off even the most advanced armor-piercing tank rounds.`;
-	if (S.PGT >= 9) gun1 = `firing guided projectiles`;
-	if (S.PGT >= 10) gun0 = `a twin-barreled railgun capable of rapidly`;
-
-	return `A prototype Goliath tank ${b}${c} its own garage housing built outside the arcology. The massive bulk is spread out over 8 tracks, two for each corner of the tank${engines}. The turret is equipped with ${gun0} ${gun1} ${gun2}. ${cannon} ${armor1} ${armor0} ${laser} ${PGTframe}`;
-};
-
-window.AA = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var W1 = `only armed`, W2 = `,`, W3 = `a poor weapon against flying targets, but enough to handle ground forces`, group = `A small group of attack VTOL have been recommissioned for use by $SF.Lower, enough to make up a squadron`, engines = ``, TAI = ``, lock = ``, support = ``, stealth = ``, scramble = ``, PAI = ``;
-
-	if (S.AA >= 2) W1 = `armed`, W2 = ` and air-to-air missiles,`, W3 = `a combination that can defend the arcology from enemy aircraft, as well as`, support = ` support ground troops`;
-	if (S.AA >= 3) engines = `The engines have been tuned, allowing faster flight with greater acceleration.`;
-	if (S.AA >= 4) TAI = `An advanced targeting AI has been installed to handle all control of weapons, allowing much more efficient use of ammunition and anti-countermeasure targeting.`;
-	if (S.AA >= 5) lock = `Installed multispectrum countermeasures protect against all types of missile locks.`;
-	if (S.AA >= 6) group = `A respectable number of attack VTOL protect your arcology, split into a few squadrons`;
-	if (S.AA >= 7) support = ` attack ground targets`, W2 = `, rocket pods, and air-to-air missiles,`;
-	if (S.AA >= 8) stealth = `The old skin has been replaced with a radar-absorbent material, making the aircraft difficult to pick up on radar.`;
-	if (S.AA >= 9) scramble = `The VTOLs can scramble to react to any threat in under three minutes.`;
-	if (S.AA >= 10) PAI = `A piloting AI has been installed, allowing the VTOLs to perform impossible maneuvers that cannot be done by a human pilot. This removes the need for a human in the aircraft altogether.`;
-
-	return `${group}. Several of the landing pads around $arcologies[0].name host groups of four fighters, ready to defend the arcology. ${scramble} The attack VTOL are currently ${W1} with a Gatling cannon${W2} ${W3}${support}. ${TAI} ${PAI} ${engines} ${lock} ${stealth}`;
-};
-
-window.TA = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var Num = `number`, type = `tiltrotor`, capacity = `small platoon or 15`, engines = ``, engines2 = ``, Radar = ``, Armor = ``, landing = ``, miniguns = ``, counter = ``;
-
-	if (S.TA >= 2) engines = `The tiltrotor engines have been replaced with a more powerful engine, allowing faster travel times.`;
-	if (S.TA >= 3) counter = `Multispectrum countermeasures have been added to protect against guided missiles.`;
-	if (S.TA >= 4) miniguns = `Mounted miniguns have been installed to cover soldiers disembarking in dangerous areas.`;
-	if (S.TA >= 5) Num = `large number`;
-	if (S.TA >= 6) landing = `The landing equipment has been overhauled, protecting personnel and cargo in the event of a hard landing or crash.`;
-	if (S.TA >= 7) Armor = `Armor has been added to protect passengers from small arms fire from below.`;
-	if (S.TA >= 8) capacity = `large platoon or 20`, engines2 = `Further tweaks to the engine allow for greater lifting capacity.`;
-	if (S.TA >= 9) Radar = `Radar-absorbent materials have replaced the old skin, making it difficult to pick up the VTOL on radar.`;
-	if (S.TA >= 10) type = `tiltjet`, engines2 = ``, engines = `The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`;
-
-	return `A ${Num} of transport ${type} VTOL have been recommissioned for use by $SF.Lower. The VTOLs are resting on large pads near the base to load either a ${capacity} tons of material. ${engines} ${engines2} ${Armor} ${landing} ${counter} ${Radar} ${miniguns}`;
-};
-
-window.SP = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var engine = `ramjet engines in the atmosphere that can reach Mach 10`, b = `has been purchased from an insolvent Old World nation. It `, shield = ``, camera = ``, efficiency = ``, camera2 = ``, drag = ``, crew = ``, engine2 = ``, skin = ``;
-
-	if (S.SpacePlane >= 2) b = ``, shield = `The current heat shielding has been upgraded, reducing the likelihood of heat damage during reentry.`;
-	if (S.SpacePlane >= 3) engine2 = ` and liquid rocket engines in orbit that can reach an equivalent Mach 18`;
-	if (S.SpacePlane >= 4) camera = `A state-of-the-art camera has been installed in the underbelly that takes incredibly high resolution photos, but requires the frictionless environment of space to focus.`;
-	if (S.SpacePlane >= 5) efficiency = `Tweaks to the engines have increased fuel efficiency to the point where midflight refueling is no longer necessary.`;
-	if (S.SpacePlane >= 6) camera2 = `The camera sensor is capable of taking IR shots.`;
-	if (S.SpacePlane >= 7) drag = `Miraculous advances in aerodynamics and materials allow frictionless flight, even while in the atmosphere.`;
-	if (S.SpacePlane >= 8) crew = `Increased the crew comfort and life support systems to increase operational time.`;
-	if (S.SpacePlane >= 9) skin = `Replaced the underbelly skin with a chameleon kit, matching the color to the sky above it.`;
-	if (S.SpacePlane >= 10) engine = `experimental scramjet engines in the atmosphere that can reach Mach 15`, engine2 = ` and liquid rocket engines in orbit that can reach an equivalent Mach 25`;
-
-	return `A prototype spaceplane ${b} rests in the hangar, its black fuselage gleaming. The craft is powered by ${engine}${engine2}. ${efficiency} ${shield} ${camera} ${camera2} ${drag} ${crew} ${skin}`;
-};
-
-window.GunS = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var a = `has been recommissioned for use by $SF.Lower. Currently, it `, b = ``, c = ``, d = ``, e = `Miniguns and Gatling cannons line`, f = `, though the distance to ground targets renders the smaller calibers somewhat less useful`, g = ``, h = ``, i = ``, j = ``, k = ``;
-
-	if (S.GunS >= 2) b = `Infrared sensors have been added for the gunners to better pick targets.`, a = ``;
-	if (S.GunS >= 3) c = `The underside of the aircraft has been better armored against small-arms fire`, h = `.`;
-	if (S.GunS >= 4) d = `Larger fuel tanks have been installed in the wings and fuselage, allowing the gunship to provide aerial support for longer periods before refueling.`;
-	if (S.GunS >= 5) e = `25 mm Gatling cannons`, f = `, allowing the gunship to eliminate infantry`, j = ` and light vehicles from above`, k = ` and a 40 mm autocannon are mounted on`;
-	if (S.GunS >= 6) g = `The engines have been replaced, allowing both faster travel to a target, and slower travel around a target.`;
-	if (S.GunS >= 7) h = `, and multi-spectrum countermeasures have been installed to protect against guided missiles.`;
-	if (S.GunS >= 8) b = `Upgraded multi-spectrum sensors can clearly depict targets even with IR shielding.`;
-	if (S.GunS >= 9) i = `The ammunition storage has been increased, only slightly depriving loaders of a place to sit.`;
-	if (S.GunS >= 10) j = `, both light and heavy vehicles, and most enemy cover from above`, k = `, a 40 mm autocannon, and a 105 mm howitzer are mounted on`;
-
-	return `A large gunship ${a} is being refueled in the hangar. ${e}${k} the port side of the fuselage${f}${j}. ${b} ${i} ${g} ${c}${h} ${d}`;
-};
-
-window.Sat = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var loc = `An unused science satellite has been purchased from an Old World nation. While currently useless, it holds potential to be a powerful tool.`, gyro = ``, telemetry = ``, thrusters = ``, solar = ``, surviv = ``, laser = ``, heat = ``, reactor = ``, lens = ``, kin = ``;
-
-	if (S.Satellite.lv >= 2) {
-		if (V.SF.Squad.Satellite.InOrbit < 1) {loc = `The satellite is being worked on in the Launch Bay.`;} else {loc = `The satellite is in geosynchronous orbit, far above the arcology.`;}
-		gyro = `A suite of sensors have been installed to ensure the satellite can detect attitude and orbital altitude.`;}
-	if (S.Satellite.lv >= 3) telemetry = `Telemetry systems have been installed to communicate with the satellite in orbit, with strong encryption measures.`;
-	if (S.Satellite.lv >= 4) thrusters = `Thrusters have been installed to control satellite attitude and orbit.`;
-	if (S.Satellite.lv >= 5) solar = `A massive folding solar panel array, combined with the latest in battery technology allow the satellite to store an enormous amount of energy relatively quickly.`, surviv = `Enough of the satellite has been finished that it can expect to survive for a significant period of time in space.`;
-	if (S.Satellite.lv >= 6) laser = `A laser cannon has been mounted facing the earth, capable of cutting through steel in seconds`, heat = ` while generating a large amount of heat.`;
-	if (S.Satellite.lv >= 7) heat = `. The installed heatsink allows the laser cannon to fire more frequently without damaging the satellite.`;
-	if (S.Satellite.lv >= 8) reactor = `A small, efficient nuclear reactor has been installed to continue generating energy while in the Earth's shadow.`;
-	if (S.Satellite.lv >= 9) lens = `A higher quality and adjustable lens has been installed on the laser, allowing scalpel precision on armor or wide-area blasts on unarmored targets.`;
-	if (S.Satellite.lv >= 10) kin = `A magazine of directable tungsten rods have been mounted to the exterior of the satellite, allowing for kinetic bombardment roughly equal to a series of nuclear blasts.`;
-
-	return `${loc} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser}${heat} ${lens} ${kin}`;
-};
-
-window.GR = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var loc = `has been purchased from a crumbling Old World nation. It`, power = `Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use, though they make for large targets.`, knife = `simply a 8.5 meter long knife, though additional weapons are under development.`, armor = ``, actuator = ``, cannon = ``, heatsink = ``, ammo = ``, missile = ``;
-
-	if (S.GiantRobot >= 2) loc = ``, armor = `Armor plating has been mounted over the majority of the robot.`;
-	if (S.GiantRobot >= 3) power = `The robot is now powered by an umbilical cable system instead of bulky and short-lived batteries.`;
-	if (S.GiantRobot >= 4) knife = `a 25 meter plasma sword. The cutting edge uses plasma to melt and cut through targets, reducing the strain on the sword.`;
-	if (S.GiantRobot >= 5) actuator = `The limb actuators have been replaced with a faster and more powerful variant, granting the robot the same.`;
-	if (S.GiantRobot >= 6) cannon = `A custom 45 mm Gatling cannon rifle has been developed for ranged use`, ammo = `, though it lacks enough ammo storage for a main weapon.`;
-	if (S.GiantRobot >= 7) heatsink = `Large heatsinks have been installed out of the back to solve a massive overheating problem. These heatsinks resemble wings, and tend to glow red with heat when in heavy use.`;
-	if (S.GiantRobot >= 8) armor = ``, actuator = `Final actuator tweaks have allowed for the addition of exceptionally thick armor without any loss in speed or power.`;
-	if (S.GiantRobot >= 9) ammo = `, with spare ammunition drums kept along the robot's waist.`;
-	if (S.GiantRobot >= 10) missile = `Missile pods have been mounted on the shoulders.`;
-
-	return `A prototype giant robot ${loc} rests in a gantry along the side of the arcology. The robot is as tall as a medium-sized office building, focusing on speed over other factors. ${power} ${armor} ${actuator} ${heatsink} The main armament is ${knife} ${cannon}${ammo} ${missile}`;
-};
-
-window.ms = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var a = `A cruise missile launch site has been constructed near the base of`, b = `outdated, something quickly rigged together to give the launch site something to fire in the case of an attack`, c = ``, d = ``, e = ``, f = ``, g = ``, h = ``;
-
-	if (S.MissileSilo >= 2) b = `a modern missile`, c = `, tipped with a conventional warhead`;
-	if (S.MissileSilo >= 3) d = `The launch systems have been overhauled, allowing a launch within seconds of an attack order being given.`;
-	if (S.MissileSilo >= 4) e = `The missile engines have been tweaked, giving them a greater range.`;
-	if (S.MissileSilo >= 5) f = `A passive radar has been installed, allowing the missile to follow moving targets.`;
-	if (S.MissileSilo >= 6) a = `Several cruise missile launch sites have been constructed around`;
-	if (S.MissileSilo >= 7) e = `The engine has been replaced, giving the missiles greater range and supersonic speeds.`;
-	if (S.MissileSilo >= 8) g = `The ability to pick new targets should the original be lost has been added.`;
-	if (S.MissileSilo >= 9) h = `The missile now uses its remaining fuel to create a thermobaric explosion, massively increasing explosive power.`;
-	if (S.MissileSilo >= 10) c = ` that can be tipped with either a conventional or nuclear warhead`;
-
-	return `${a} the arcology. The current missile armament is ${b}${c}. ${d} ${e} ${f} ${g} ${h}`;
-};
-
-window.AC = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var recom = `has been recommissioned from the Old World for $SF.Lower. It`, jets = `Formerly mothballed strike jets`, loc = ``, radar = ``, AA = ``, prop = ``, torp = ``, armor = ``, power = ``, scramble = ``;
-
-	if (V.week % 6 === 0) { loc = `moored to the pier in the Naval Yard`; } else { loc = `patrolling the waters near $arcologies[0].name`; }
-	if (S.AircraftCarrier >= 2) radar = `The island's radar and comms have been improved.`, recom = ``;
-	if (S.AircraftCarrier >= 3) AA = `The antiair guns have been updated to automatically track and predict enemy aircraft movement.`;
-	if (S.AircraftCarrier >= 4) jets = `Modern strike jets with state-of-the-art armaments`;
-	if (S.AircraftCarrier >= 5) prop = `The propellers have been redesigned, granting greater speed with less noise.`;
-	if (S.AircraftCarrier >= 6) torp = `An anti-torpedo system detects and destroys incoming torpedoes.`;
-	if (S.AircraftCarrier >= 7) armor = `Additional armor has been added to the hull and deck.`;
-	if (S.AircraftCarrier >= 8) power = `The power plant has been converted to provide nuclear power.`;
-	if (S.AircraftCarrier >= 9) scramble = `The catapult has been converted to an electromagnetic launch system, halving the time it takes to scramble jets.`;
-	if (S.AircraftCarrier >= 10) jets = `Attack VTOL from the converted for carrier capability`;
-
-	return `An aircraft carrier ${recom} is ${loc}. ${jets} serve as its airpower. ${scramble} ${power} ${radar} ${AA} ${torp} ${prop} ${armor}`;
-};
-
-window.Sub = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var recom = `has been recommissioned from the old world, and`, reactor = `Because diesel engines provide power and breathing oxygen is kept in pressurized canisters, the sub must frequently surface.`, reactor1 = ``, cal = ``, hull = ``, tubes = ``, torpedoes = ``, sonar = ``, control = ``, missiles = ``;
-
-	if (S.Sub >= 2) recom = ``, reactor = `A nuclear reactor provides power`, reactor1 = `, but because oxygen is still kept in pressurized canisters the sub must frequently surface to replenish its oxygen stocks.`;
-	if (S.Sub >= 3) reactor1 = ` and an oxygen generator pulls Oâ‚‚ from the surrounding seawater, allowing the submarine to remain underwater for months if necessary.`;
-	if (S.Sub >= 4) cal = `Calibration of the propulsion systems has reduced the telltale hum of a moving sub to a whisper.`;
-	if (S.Sub >= 5) hull = `The outer hull has been redesigned for hydrodynamics and sonar absorption.`;
-	if (S.Sub >= 6) tubes = `The torpedo tubes have been redesigned for faster loading speeds`, torpedoes = `.`;
-	if (S.Sub >= 7) sonar = `The passive sonar has been finely tuned to detect mechanical noises miles away.`;
-	if (S.Sub >= 8) control = `The control room computers have been upgraded to automate many conn duties.`;
-	if (S.Sub >= 9) torpedoes = `and launch more agile torpedoes.`;
-	if (S.Sub >= 10) missiles = `The submarine has been outfitted with several cruise missiles to attack land or sea-based targets.`;
-
-	return `An attack submarine ${recom} is moored to the pier of the Naval Yard. ${reactor}${reactor1} ${cal} ${hull} ${tubes}${torpedoes} ${sonar} ${control} ${missiles}`;
-};
-
-window.HAT = function() {
-	const V = State.variables, S = V.SF.Squad;
-	var recom = `, has been recommissioned for use by $SF.Lower. It`, tons = `200`, skirt = ``, guns = ``, guns2 = ``, fans = ``, speed = ``, turbines = ``, armor = ``, ramps = ``, HATframe = ``, loadout = ``;
-
-	if (S.HAT >= 2) skirt = `The skirt has been upgraded to increase durability and improve cushion when traveling over uneven terrain and waves.`, recom = `,`;
-	if (S.HAT >= 3) guns = `A minigun`, guns2 = `has been mounted on the front corners of the craft to defend against attackers.`;
-	if (S.HAT >= 4) fans = `The turbines powering the rear fans`, speed = `acceleration and speed.`, turbines = `have been replaced with a more powerful version, allowing greater`;
-	if (S.HAT >= 5) armor = `The armor protecting its cargo has been increased.`;
-	if (S.HAT >= 6) tons = `300`, fans = `The turbines powering the rear fans and impeller`, speed = `acceleration, speed, and carrying capacity.`;
-	if (S.HAT >= 7) guns = `A minigun and grenade launcher`;
-	if (S.HAT >= 8) ramps = `The loading ramps have been improved, allowing for faster unloading.`;
-	if (S.HAT >= 9) HATframe = `The frame has been widened and reinforced, allowing for more space on the deck.`;
-	if (S.HAT >= 10) loadout = `An experimental loadout sacrifices all carrying capacity to instead act as a floating gun platform by mounting several rotary autocannons the deck, should the need arise.`;
-
-	return `An air cushion transport vehicle, or hovercraft${recom} is parked on the pier of the Naval Yard, ready to ferry ${tons} tons of soldiers and vehicles. ${guns} ${guns2} ${fans} ${turbines} ${speed} ${skirt} ${armor} ${ramps} ${HATframe} ${loadout}`;
-};
-
-window.Interactions = function() {
-	const V = State.variables, C = V.SF.Colonel, T = State.temporary;
-	var choice = ``, time = ``;
-
-	if (V.SF.Gift > 0){
-		if (V.choice == 1){
-			choice = `$SF.Caps is turning over spare capital in tribute this week. `;
-			if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) {
-			choice += `"I think I can find @@.yellowgreen;<<print cashFormat(Math.ceil($CashGift))>>@@ for you, boss."`;}
-			else {
-			choice += `"We can spare@@.yellowgreen;<<print cashFormat(Math.ceil($CashGift))>>@@ in tribute this week, `;
-			if (V.PC.title != 1){choice += `sir."`;}else{choice += `ma'am."`;}}}
-		else if (V.choice == 2){
-			choice = `$SF.Caps will be throwing a military parade this week. `;
-			if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) {
-			choice += `"I expect the @@.green;public to enjoy@@ the parade, boss."`;}
-			else {
-			choice += `"I'll have plans for an @@.green;popular parade@@ on your desk, `;
-			if (V.PC.title != 1){choice += `sir."`;}else{choice += `ma'am."`;}}}
-		else if (V.choice == 3){
-			choice = `$SF.Caps will be conducting corporate sabotage on rival arcologies' businesses. `;
-			if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) {
-			choice += `"Our interests should see a @@.yellowgreen;big boost,@@ boss."`;}
-			else {
-			choice += `"Your @@.yellowgreen;arcology's business prospects should see an improvement@@ this week, <<= properTitle()>>.`;
-			}}}
-
-	if (C.Talk + C.Fun > 0) time = `The Colonel is busy for the rest of the week, so the Lieutenant Colonel will assist you.`;
-
-	return `${time} <br>${choice}`;
-};
-
-window.ColonelQuarters = function() {
-	const V = State.variables, R = Math.ceil(Math.random()*100);
-	var out = ``;
-	if (R > 50){
-		out = `raises a hand in greeting and nods. She is sprawled on a couch, wearing only her combat suit tank top and fingerless gloves. She's holding a near-empty bottle of strong liquor in her hand and you can see a naked slave girl kneeling on the floor between her legs. The Colonel has her legs wrapped tightly around the girl's head, forcing the girl to service her if she wants to breathe. The Colonel is close to her climax then suddenly tenses her lower body thus gripping the girl even tighter and throws her head back in ecstasy as she orgasms. She lets out a long breath finally releasing the girl, giving her a hard smack and shouting at her to fuck off.<br><br> The Colonel finishes off her bottle, tossing it over her shoulder then leaning back on the couch and spreading her legs wide. You look down briefly, falling into your habits of inspection. Her pussy is completely devoid of hair with heavy labia in with a very large and hard clit peaking out. Beads of moisture, the result of her excitation, are visible, and you can tell from long experience that she would be tight as a vise. You return your gaze to her face to find her smirking at you. "Like what you see, <<print SFCR()>>?" She waves her hand at the plaza around her, "So do they. But you're not here for pussy. You're here to talk business. So, what's up?"`;
-	}else if (R > 50){
-		out = `is in no condition initially to greet you. She's naked except for one sock that gives you a very good view of her muscled, taut body while lunging with her feet on the table and the rest on her couch. She is face down in a drugged-out stupor in the middle of a wide variety of powders and pills. Perhaps sensing your approach, her head suddenly shoots up and looks at you with unfocused, bloodshot eyes. "Sorry, <<print SFCR()>>," she slurs, wiping her face and weakly holding up a hand. "Hold on a second, I need something to help me out here. Long fucking night." She struggles to sit on the couch and bending over the table, loudly snorts up some of the white powder on it. "Ahhh, fuck," she says, breathing heavily.<br><br> She shakes her head powerfully now looking at you, her eyes once again alert and piercing. "That's better," she says, leaning back on the couch and giving you another good view of her assets. "So, <<print SFCR()>>," she begins, "what brings you down here to our little clubhouse? I trust you're happy with how we've been handling things out there?" You nod. "Excellent", she laughs. "I have to say; it's nice to have a place like this while having some top-end gear and to be able to have fun out there without worrying about anyone coming back on us. Good fucking times." She laughs again. "So — I'm assuming you want something?"`;
-	}else if (R > 70 && V.SF.Depravity >= 1.5 && V.SF.Colonel.Core == "cruel"){
-		out = `is relaxing on her couch stark naked, greeting you with a raised hand. Between her tightly clenched legs is a slave girl being forced to eat her out. "Hey, <<print SFCR()>>, what's -" she breaks off as a flash of pain crosses her features. "Fucking bitch!" she exclaims, pulling her legs away and punching the slave girl in the face. She pushes the girl to the ground, straddling her then begins hitting. You hear one crunch after another as The Colonel's powerful blows shatter the girl's face. She hisses from between clenched teeth, each word accompanied by a brutal punch. "How. Many. Fucking. Times. Have. I. Told. You. To. Watch. Your. Fucking. Teeth. On. My. Fucking. Clit!" She leans back, exhaling heavily. Before leaning back down to grip apply pressure onto the girl's neck with her powerful hands. Wordlessly, she increases the pressure and soon the girl begins to turn blue as she struggles to draw breath. Eventually her struggles weaken and then finally, end.<br><br> The Colonel relaxes her grip then wipes her brow, clearing away the sweat from her exertion. Finally rising from the girl's body, relaxing back on the couch and putting her feet back up on the table. "Sorry about that <<print SFCR()>>," she says, shrugging. "So many of these bitches we pick up from the outside don't understand that they have to behave." Shaking her head in frustration, "Now I need to find another one. But that's not your problem — you're here to talk business. So, what's up?"`;
-	}else{
-		out = `is topless while reviewing the particulars of her unit on a tablet as you approach. She raises a hand in greeting. "Hey <<print SFCR()>>," she says, noticing you looking at her chest. She laughs. "Nice, aren't they? But they're not for you or them." She throws a thumb at the plaza around her. "You're down here for a reason, though. What can I do for you?"`;}
-	return `${out}`;
-};
-
-window.progress = function(x,max) {
-	var out = `⏐`, z, i;
-	if (max === undefined) {
-		Math.clamp(x,0,10);
-		if (State.variables.SF.Size < 30) {
-			z = 5 - x;
-			for (i=0;i<x;i++) out += `█⏐`;
-			for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">█</span>⏐`;
-			for (i=0;i<5;i++) out += `░⏐`;}
-		else {
-			z = 10 - x;
-			for (i=0;i<x;i++) out += `█⏐`;
-			for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">█</span>⏐`;}}
-	else {
-		Math.clamp(x,0,max);
-		x = Math.floor(10*x/max);
-		z = 10 - x;
-		for (i=0;i<x;i++) out += `█⏐`;
-		for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">█</span>⏐`;}
-	return `${out}`;
-};
-
-window.Main = function() {
- const V = State.variables;
- V.SF = {Toggle:V.SF.Toggle,Active:-1,Depravity:0, Bonus:0, Size:0, Upgrade:0, Gift:0, UC:{Assign:0, Lock:0}, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1, BadOutcome:""};
- V.arcologies[0].SFRaid = 1,V.arcologies[0].SFRaidTarget = -1;
-}
-window.Squad = function() {
- const V = State.variables;
- V.SF.Squad = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:{lv:0, InOrbit:0}, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0};
-}
-window.Colonel = function() {
- const V = State.variables;
- V.SF.Colonel = {Core:"", Talk:0, Fun:0, Status:0};
-}
-window.MercCon = function() {
- const V = State.variables;
- V.SF.MercCon = {History:0, CanAttend:0, Income:0, Revenue:0, Menials:0, TotalMenials:0, Mercs:0, TotalMercs:0};
-}
-window.Facility = function() {
- const V = State.variables;
- V.SF.Facility = {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]};
-}
-
-window.SFInit = function() {
- Main();Squad();Colonel();MercCon();Facility();
-};
-
-window.SFBC = function() {
-	const V = State.variables;
-	function InitClean() {
-		delete V.SFMODToggle;
-		delete V.securityForceActive;
-		delete V.securityForceCreate;
-		delete V.securityForceEventSeen;
-	}
-	function MainClean() {
-		delete V.securityForceActive;
-		delete V.securityForceRecruit;
-		delete V.securityForceTrade;
-		delete V.securityForceBooty;
-		delete V.securityForceIncome;
-		delete V.securityForceMissionEfficiency;
-		delete V.securityForceProfitable;
-		delete V.TierTwoUnlock;
-		delete V.securityForceDepravity;
-		delete V.SFAO;
-		delete V.securityForceUpgradeTokenReset;
-		delete V.securityForceUpgradeToken;
-		delete V.securityForceGiftToken;
-		delete V.securityForceRulesOfEngagement;
-		delete V.securityForceFocus;
-		delete V.securityForceAccountability;
-		delete V.securityForceName;
-		delete V.SubsidyActive;
-	}
-	function ColonelClean() {
-		delete V.SubsidyActive;
-		delete V.ColonelCore;
-		delete V.securityForceColonelToken;
-		delete V.securityForceColonelSexed;
-		delete V.ColonelRelationship;
-	}
-	function TradeShowClean() {
-		delete V.OverallTradeShowAttendance;
-		delete V.CurrentTradeShowAttendance;
-		delete V.TradeShowIncome;
-		delete V.TotalTradeShowIncome;
-		delete V.TradeShowHelots;
-		delete V.TotalTradeShowHelots;
-	}
-	function UnitsClean() {
-		delete V.securityForcePersonnel;
-		delete V.securityForceInfantryPower;
-		delete V.securityForceArcologyUpgrades;
-		delete V.securityForceVehiclePower;
-		delete V.securityForceDronePower;
-		delete V.securityForceStimulantPower;
-		delete V.securityForceHeavyBattleTank;
-		delete V.securityForceAircraftPower;
-		delete V.securityForceSpacePlanePower;
-		delete V.securityForceAC130;
-		delete V.securityForceSatellitePower;
-		delete V.securityForceGiantRobot;
-		delete V.securityForceMissileSilo;
-		delete V.securityForceAircraftCarrier;
-		delete V.securityForceSubmarine;
-		delete V.securityForceHeavyAmphibiousTransport;
-	}
-
-	if ( (V.SF.Toggle || V.SFMODToggle) > 0 || V.SF === undefined) {
-		if (V.SF === undefined) {
-			if (V.securityForceEventSeen < 1) { V.securityForceActive = -1 } else { V.securityForceActive = 2 };
-			V.SF = {Toggle:V.SFMODToggle, Active:V.securityForceActive}; InitClean();
-			if (V.securityForceName === undefined) V.securityForceName = "the special force";
-			if (V.SF.Active >= 1) {
-				Object.assign(V.SF, {
-					Depravity:V.securityForceDepravity,
-					Size:V.SFAO,
-					Upgrade:V.securityForceUpgradeToken,
-					Gift:V.securityForceGiftToken,
-					UC:{Assign:V.SF.SpecOps, Lock:V.SF.SpecOpsLock},
-					ROE:V.securityForceRulesOfEngagement,
-					Target:V.securityForceFocus,
-					Regs:V.securityForceAccountability,
-					Caps:"The Special Force",
-					Lower:V.securityForceName,
-					Subsidy:V.SubsidyActive}); MainClean();
-				if (V.SF.Lower !== "the special force") V.SF.Caps = V.SF.Lower.replace("the ", "The ");
-
-				if (V.ColonelCore === undefined) V.ColonelCore = "";
-				if (V.ColonelDiscussion === undefined) V.ColonelDiscussion = 0;
-				if (V.ColonelSexed === undefined) V.ColonelSexed = 0;
-				V.SF.Colonel = {
-					Core:V.ColonelCore,
-					Talk:V.securityForceColonelToken,
-					Fun:V.securityForceColonelSexed,
-					Status:V.ColonelRelationship}; ColonelClean();
-
-				if (V.TradeShowIncome === undefined) V.TradeShowIncome = 0;
-				if (V.TotalTradeShowIncome === undefined) V.TotalTradeShowIncome = 0;
-				if (V.TradeShowHelots === undefined) V.TradeShowHelots = 0;
-				if (V.TotalTradeShowHelots === undefined) V.TotalTradeShowHelots = 0;
-				V.SF.MercCon = {
-					History:V.OverallTradeShowAttendance,
-					CanAttend:V.CurrentTradeShowAttendance,
-					Income:V.TradeShowIncome,
-					Revenue:V.TotalTradeShowIncome,
-					Menials:V.TradeShowHelots,
-					TotalMenials:V.TotalTradeShowHelots,
-					Mercs:0,
-					TotalMercs:0}; TradeShow();
-				if (V.SF.MercCon.History > 0) V.SF.MercCon.View = 1;
-
-				if (V.securityForceHeavyBattleTank === undefined) V.securityForceHeavyBattleTank = 0;
-				if (V.securityForceSpacePlanePower === undefined) V.securityForceSpacePlanePower = 0;
-				if (V.securityForceAC130 === undefined) V.securityForceAC130 = 0;
-				if (V.securityForceSatellitePower === undefined) V.securityForceSatellitePower = 0;
-				if (V.securityForceGiantRobot === undefined) V.securityForceGiantRobot = 0;
-				if (V.securityForceMissileSilo === undefined) V.securityForceMissileSilo = 0;
-				if (V.securityForceAircraftCarrier === undefined) V.securityForceAircraftCarrier = 0;
-				if (V.securityForceSubmarine === undefined) V.securityForceSubmarine = 0;
-				if (V.securityForceHeavyAmphibiousTransport === undefined) V.securityForceHeavyAmphibiousTransport = 0;
-				V.SF.Squad = {
-					Troops:V.securityForcePersonnel,
-					Armoury:V.securityForceInfantryPower,
-					Firebase:V.securityForceArcologyUpgrades,
-					AV:V.securityForceVehiclePower,
-					TV:V.securityForceVehiclePower,
-					Drones:V.securityForceDronePower,
-					Drugs:V.securityForceStimulantPower,
-					PGT:V.securityForceHeavyBattleTank,
-					AA:V.securityForceAircraftPower,
-					TA:V.securityForceAircraftPower,
-					SpacePlane:V.securityForceSpacePlanePower,
-					GunS:V.securityForceAC130,
-					Satellite:{lv:V.securityForceSatellitePower, InOrbit:0},
-					GiantRobot:V.securityForceGiantRobot,
-					MissileSilo:V.securityForceMissileSilo,
-					AircraftCarrier:V.securityForceAircraftCarrier,
-					Sub:V.securityForceSubmarine,
-					HAT:V.securityForceHeavyAmphibiousTransport}; UnitsClean();
-			} else {
-				SFInit();
-			}
-			Facility();
-		} else {
-			if (V.SF.Active === -1) SFInit();
-			if (V.SF.MWU) delete V.SF.MWU;
-			if (V.SpecOpsLock != undefined) V.SF.SpecOpsLock = V.SpecOpsLock; delete V.SpecOpsLock;
-			if (V.SF.UC === undefined) {
-				if (V.SF.SpecOps != undefined && V.SF.SpecOpsLock != undefined) {
-					V.SF.UC = {Assign:V.SF.SpecOps, Lock:V.SF.SpecOpsLock}; delete V.SF.SpecOps;
-					delete V.SF.SpecOpsLock;
-				} else if (V.SF.UC == {}) {
-					V.SF.UC = {Assign:0, Lock:0};
-				}
-			}
-			if (V.SF.U !== undefined) V.SF.Upgrade = V.SF.U; delete V.SF.U;
-			if (V.SF.WG !== undefined) V.SF.Gift = V.SF.WG; delete V.SF.WG;
-			if (V.SF.MercCon != undefined) {
-	V.SF.MercCon.Menials = V.SF.MercCon.Helots;
-	V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots;
-	delete V.SF.MercCon.Helots;delete V.SF.MercCon.TotalHelots;
-	} else {
-	MercCon();
-	}
-
-			if (V.SF.Facility === undefined) Facility();
-			if (V.SF.Bonus === undefined) V.SF.Bonus = 0;
-			if (V.SF.Depravity < 0) V.SF.Depravity = 0;
-			if (V.SF.Size === undefined) V.SF.Size = V.SF.Units; delete V.SF.Units;
-			if (V.SFUnit !== undefined) {
-				if (V.SFUnit.AT !== undefined) delete V.SFUnit.AT; V.SFUnitTA = 0;
-				V.SF.Squad = V.SFUnit; delete V.SFUnit;
-				V.SF.Squad.Sat = {lv:V.SF.Squad.Satellite, InOrbit:V.SatLaunched};
-				delete V.SatLaunched;
-				V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat;
-				if (V.SFTradeShow !== undefined) V.SF.MercCon = V.SFTradeShow; delete V.SFTradeShow;
-				if (V.SFColonel !== undefined) V.SF.Colonel = V.SFColonel; delete V.SFColonel;
-				if (V.SF.BadOutcome === undefined) V.SF.BadOutcome = "";
-				if (V.SF.Squad.Satellite != undefined && V.SatLaunched == undefined) {
-					delete V.SFUnit; V.SF.Squad.Sat = {lv:0, InOrbit:0};
-					delete V.SatLaunched; V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat;
-				}
-			}
-			if (V.SF.Squad !== undefined && V.SF.Squad.Satellite.lv === undefined) {
-				V.SF.Squad.Sat = {lv:V.SF.Squad.Satellite, InOrbit:0};
-				V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat;
-			}
-		}
-	}
- if (V.securityForceName !== undefined) InitClean(); MainClean(); ColonelClean(); TradeShowClean(); UnitsClean();
-};
-
-window.BadOutcome = function() {
-	const V = State.variables,t = `The Colonel's`; var r =``;V.SF.Active = -2;
-	switch(V.SF.Colonel.Core) {
-		case "Shell-Shocked":
-			V.SF.BadOutcome = "lockdown",V.trinkets.push("${t} explosives detonator");
-			r +=`Unnerved by your ever-increasing influence over your men and undercutting of her authority, The Colonel uses heavy explosives at Midnight to seal off The Firebase from your access. When you step off of your express elevator, you are met not with two guards, but several armed proximity mines next to an incredibly thick wall of smoking rubble. No doubt there are machine gun nests, anti-tank nests, and lots more proximity mines just waiting for you on the other side, should you somehow get through the wall of debris.`;
-			r+=`<br>The ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`;
-			break;
-		case "Cruel":
-			V.SF.BadOutcome = "Revolt",V.trinkets.push("${t} dog tags"),V.Rep = 0,
-			V,arcologies[0].prosperity -= 50,V.ASlaves = 49,
-			cashX(-10000, "specialForces");
-			V.ACitizens = 751,V.menials = 0, V.researchLab.menials = 0,
-			V.researchLab.hired = 0, V.fuckdolls = 0,V.menialBioreactors = 0,
-			V.activeUnits = 0,V.secBots.troops = 0, V.createdSlavesUnits = 0,
-			V.createdMilitiaUnits = 0, V.createdMercUnits = 0;
-			r+=`<br>The ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`;
-			break;
-		case "Cruel and Psychopathic":
-			V.SF.BadOutcome = "Revolt",V.trinkets.push("${t} dog tags"),V.Rep = 0;
-			r += `<br>Finally fed up with your constant intrusions into her territory and crew, The Colonel riles up her people for an utterly ferocious rebellion. The promises of rape and plunder and dominion over some of the wealthiest tenants in the entire Free City (and their world-class slaves) are all that's needed to give the selfish lot of them a nearly unshakable resolve in the task of delivering their overlord Her most coveted prize: You.`;
-			r += `<br>It is now midnight. The lights are the first thing they disable, as they still have the excellent night vision equipment you purchased for them. Some of your citizens start panicking almost immediately at the sudden blackout; this is very reminiscent of the Daughters of Liberty attack that still haunts many of their memories. Things like this were never supposed to happen again. You had promised them that you'd create an army that would protect them...`;
-			r += `<br>Her army vanguard strikes fast and hard throughout the main Plaza, cutting through your security personnel, defensive platoons, and drones with an ease that stinks of months of careful planning and study. Your defensive platoons, veterans of many Battles, are outmaneuvered at every turn; their hidden ammunition caches are found empty, their communications networks are mysteriously scrambled, and key chokepoints are found to be booby-trapped before your men can even get to them; their well-rehearsed arcology defense routines have gone to ash. Assuming you ever get a chance to speak to The Colonel again, you would ask if her betrayal was actually inevitable rather than something you triggered.`;
-			r += `<br>You watch with immense disappointment as the very APC's and IFV's that you paid for now charge into resisting storefronts to storm the armed civilians inside with heavy infantry at point blank range. Battle Tanks trample wounded civilians in the streets as they maneuver to blast your citizens' hastily-made holdouts to pieces, burying dozens of civilian loyalists under mountains of rubble while hundreds more are gunned down in the streets for want of adequate cover. The Plaza is lost; the enemy vanguard has gained access to the Residential Sectors upstairs. Enticed, entire platoons of her vanguard decide to become bandits, ignoring their Colonel's orders and scattering off from the main force to kick down many apartment doors and help themselves to whatever desirable goods or inhabitants they find within.`;
-			r += `<br>Outside, her many aircraft swarm the local airspace to patrol the Arcology outskirts, conduct recon scans of the upper levels, or monitor your sealed penthouse outside the range of your SAM turrets, while shooting down any other fleeing VTOL's. You will not be escaping by air today. No one will. No escaping by land either: Swarms of her drones are tasing fleeing noncombatants by the hundreds for later enslavement, as the remainder of her army begins to pour into the bloody Plaza. This is your Arcology's darkest hour.`;
-			r += `<br>And yet your Mercenaries stand ready. On security feeds throughout the Residential Sectors and Garrison you see your elite sellswords charging out of their lodgings in full kit. They are few, but this is their home, and you are their Patron and Commander. They hold firm, fighting like legends of old in some places, and fighting like animals in others. The Mercenaries trapped downstairs near The Garrison take to the Markets, pinning down most of The Colonel's reinforcements from various shopping outlets using towed quad anti-aircraft guns, and ultimately cutting off many of the assets needed for The Colonel's ongoing assault upstairs. Enemy troop carriers laden with heavy infantry breach the shopping centers in order to dislodge them, only to have their inhabitants cooked alive before they can disembark in time or shot to pieces even when they do. Keeping these Mercenaries alive are the roving exosuit-clad tank hunter duos that frag entire armor platoons en route to these shopping outlets, resorting to carving open enemy AFV's up close with their powered CQB weapons once they've run out of missiles. Back in the Residencies upstairs, in the still-evacuating streets and atriums, your actively-camouflaged snipers take up choice positions on various balconies and overpasses, sowing panic among the advancing traitors with their impressive anti-material rifles with one explosive headshot after another, sometimes even hitting them through walls and buildings. In large indoor parks leading up to the main Residential courtyard, Mercenary fireteams force enemy flankers to flee every single footpath they walk through, harassing constantly and preventing any hostile reconnaissance or infiltration from being done.`;
-			r += `<br>The main Residential courtyard features the Residential Sectors' massive elevator complex, which will give The Colonel's forces rapid access to the Promenade, and ultimately, You. In front of it, your Mercenary Captain stands atop one of the many meters-thick sandbag walls his men just assembled there, leading the raging defensive blockade in bringing the vanguard's assault to a gory halt. ${V.SF.Lower}'s bodies and bits and debris pile up in small walls on the outskirts under the burning heat of hundreds of flying autocannon rounds and dozens of screeching missiles. Before the vanguard's morale can break however, The Colonel shows up in person behind her own lines, kitted in a customized power armor and dragging, of all things, a hydraulic trebuchet loaded with a crudely-welded large metal box. She launches the box from beyond your Mercenaries' line of sight, sending it reeling towards them and predicting that they will try to shoot it out of the sky. They do, not wanting the slow but strange projectile to hit them directly, only learning of their folly when the metal 'box' detonates midair and releases a dense cloud of cluster bombs over their position. The munitions themselves disable some of the exosuits, but they don't kill too many on their own. However, the bomblets do succeed in detonating the various ammo dumps that were feeding your Mercenaries' blazing guns. The chain explosions, resulting fires, destroyed cover, and widespread casualties and confusion all create the perfect opportunity for The Colonel to storm the previously implacable barricade at the head of her troops, with her followers rushing the merc lines and blasting off the heavy armor plating of your disoriented Mercenaries themselves before stabbing them to death, or in some cases, hauling off the dis-armored and defeated female Mercenaries they discover for immediate use. As the few intact Mercenaries remaining desperately struggle to hold off the advancing horde with their remaining ammo, The Colonel takes on your dazed Mercenary Captain in single combat. When their ammunition runs dry, and their blasted battlesuits break down, they both eject, and then the knives come out. Minutes later, she stabs him in the side of his skull after she dodges yet another attempt to land a killing blow on her. With the source of Mercenary command and control gone, The Colonel staunches her own bleeding, yanks a trooper out of a near-pristine battlesuit that she now claims for herself, and directly organizes the isolation and extermination of the smaller teams of Mercenaries that are bleeding her troops everywhere else. She routs your Mercenaries for good with the razing of their Garrison structure. The ${V.SF.Lower} now enjoys absolute air and ground superiority. Soon the surviving rear of her army is brought upstairs from the killing floors down in the Markets, and the many elevators and cargo lifts of the elevator complex are boarded, with your executive override codes to remotely shut down the elevators somehow being manually bypassed by her combat engineers. It won't be long now.`;
-			r += `<br>Dawn has broken over the Free City. Only five hours into the slaughter (of which your Mercenaries no doubt bought you at least three), it becomes very clear to you that the only way to save your arcology is to destroy it. Everything and Everyone will burn before you let this crazy bitch and her rabid dogs get their dirty hands on you or your slaves. On your order, your most loyal subordinates, the ones who were with you since the early days to patrol your Arcology before you even had drones to protect it, fight their way to through the carnage of your panicking civilians on The Promenade to get to the exact hidden elevators that your Personal Assistant specifies for them. Their destination is the arcology's reactor complex, of course. Following the PA's instructions precisely, they arm their many high-yield explosive charges on your now-exposed and de-stabilized reactor, and in one final service to you, detonate them, creating a colossal explosion. The rapidly ascending heretics quite literally have the rug pulled from under them, as the blast takes out nearly all of the arcology's lesser foundational support beams, thus collapsing many thousands of metric tons of concrete, steel, plastic, and plaster out from underneath the upward bound Colonel and her men... And everyone else, unfortunately. With no foundation any longer, all of your arcology's interior Sectors are utterly gutted from the bottom-up by gravity itself, and everything beneath your ration-stocked, backup-powered Penthouse crumbles to the earth. The massive cloud of dust created by the widespread fires and interior collapse ends up covering the entire Free City for hours. Her aircraft, now bereft of their logistical support and command structure, immediately fly off to neighboring arcologies to offer their services to the various employers there, seeing as the coup has failed and they have nowhere else to go. The skies are free for You to travel as you please, but You aren't going anywhere.`;
-			r += `<br>It is late evening when the tremors finally stop. Everything below your Penthouse is ruin, and your arcology, its population, and your reputation are now essentially dust. However, the arcology did not fall. It. Is. Still. Yours. You shall rise again, not flee this tragedy in shame. Of course, no one will ever know that you sacrificed the arcology deliberately in order to save yourself; it is all too easy to claim that The Colonel carelessly damaged the reactor complex during her assault, ironically causing her own defeat. Frankly, sacrificing most of your tenants doesn't bother you as much as it probably should; maybe its because you know that if The Colonel and her men had won, all those people were as good as dead anyway.`;
-			r += `<br>You know that if you want to survive, you'll need to surround yourself with workers and allies to rebuild fast, else your rivals gobble you up. It costs you a horrific sum to clear and process the wreckage and rebuild the basic Sector superstructures and infrastructure for your arcology on such short notice, even after liquidating everything your workers salvage. Your powerful friends still residing in the Old World or other Free Cities have lent you a surprising amount of aid too, with quite a few lent super-heavy construction assets getting huge amounts of work done quickly. Even then, what you've been able to rebuild is very little. After a nearly sleepless, sexless week of immense toil, you've successfully organized tens of thousands of people in restoring the arcology to a barely functional condition (along with rudimentary imitations of all your upgrades), and you've even got some new Garrison Mercenaries in by week's end too... But its just not the same. If it weren't for your bruised weather-plating your arcology would look like a giant skeleton. Inside, it feels like a concrete boneyard; everything has been built cheap and utilitarian, and the walls aren't even painted. With only a few operational services staffed by commuters from neighboring arcologies, there is just an eerie silence just about everywhere. With few amenities for relief, there are going to be many long days ahead for your few tenants, most of them being wealthy but distraught returning travelers who left before the attack. Maybe your slaves can help entertain them. A lot of these people are VIP's it seems.`;
-			r += `<br>It is now midnight. In a rare moment of reflection, you contemplate that what The Colonel just did to your arcology was exactly what you were all too happy to have her do to dozens, if not hundreds of innocent villages and townships under your shadow during her 'Raiding and Slaving' operations. Nevertheless, You have hard work ahead of you, especially now that your enemies see that you are now much weaker than you have ever been.`;
-			r += `<br>The Colonel's body was never found.`;
-			break;
-		case "Kind":
-			V.SF.BadOutcome = "Exodus",V.trinkets.push("${t} gift card"),
-			V.menials += 73;
-			cashX(55000, "specialForces");
-			r += `Your Colonel has had enough of your meddling. In her eyes, you've broken faith with her. She asked one thing of you in return for her full support, and you could not even give her that.`;
-			r += `<br>At midnight, a great mechanized convoy, the biggest you've seen in a long while, streams out of your Arcology. Troop Carriers, Aircraft, Heavy Trucks, and other war machines of varying sizes pour out of the Firebase in tight formation. The Colonel is refusing your calls, and you know it would be ill advised to go out there yourself or to try to stop them with force. The many bandits and mercenary groups that the convoy will inevitably pass by will probably feel this way as well. You have no idea where they are going or how they will end up, but with their wealth and weaponry, you are not worried.`;
-			r += `<br>Upon your inspection of the abandoned firebase itself, most of the heavier installations have been dismantled and carried away, but about 55,000# of miscellaneous supplies and 73 menials have been left behind, presumably because the convoy had no space for them. On The Colonel's old pavilion, you see a white gift card standing upright.`;
-			r += `<br>When you climb the crates to take it and read it, you see The Colonel's handwritten sentiments about the way things turned out; her gratitude for taking her in when you did, her disappointment in your actions, a detailed account of your failings, her regrets that things had to end this way, and finally, her well wishes for your future endeavors.`;
-			r += `<br>Disgusted, you pocket the gift card and leave your employees and menials to gather up the valuables here before stalking back to your Penthouse. The former Firebase is returned to being a warehouse facility.`;
-			break;
-	}
-}
-
-/*:: DebugJS [script]*/
-
-/*
-Given an object, this will return an array where for each property of the original object, we include the object
-{variable: property, oldVal: _oldDiff.property, newVal: _newDiff.property}
-*/
-window.generateDiffArray = function generateDiffArray(obj) {
-	var diffArray = Object.keys(obj).map(function(key) {
-		return {variable: key, oldVal: State.temporary.oldDiff[key], newVal: State.temporary.newDiff[key]};
-	});
-	return diffArray;
-};
-
-/*
-Shamelessly copied from https://codereview.stackexchange.com/a/11580
-Finds and returns the difference between two objects. Potentially will have arbitrary nestings of objects.
-*/
-window.difference = function difference(o1, o2) {
-	var k, kDiff, diff = {};
-	for (k in o1) {
-		if (!o1.hasOwnProperty(k)) {
-		} else if (typeof o1[k] != 'object' || typeof o2[k] != 'object') {
-			if (!(k in o2) || o1[k] !== o2[k]) {
-				diff[k] = o2[k];
-			}
-		} else if (kDiff = difference(o1[k], o2[k])) {
-			diff[k] = kDiff;
-		}
-	}
-	for (k in o2) {
-		if (o2.hasOwnProperty(k) && !(k in o1)) {
-			diff[k] = o2[k];
-		}
-	}
-	for (k in diff) {
-		if (diff.hasOwnProperty(k)) {
-			return diff;
-		}
-	}
-	return false;
-};
-
-/*
-Shamelessly copied from https://stackoverflow.com/a/19101235
-Flattens an object while concatenating property names.
-For example {id: {number: 4, name: "A"}} --> {id.number: 4, id.name: "A"}
-*/
-window.diffFlatten = function diffFlatten(data) {
-	var result = {};
-	function recurse (cur, prop) {
-		if (Object(cur) !== cur) {
-			result[prop] = cur;
-		} else if (Array.isArray(cur)) {
-			for(var i=0, l=cur.length; i<l; i++)
-				recurse(cur[i], prop + "[" + i + "]");
-			if (l == 0)
-				result[prop] = [];
-		} else {
-			var isEmpty = true;
-			for (var p in cur) {
-				isEmpty = false;
-				recurse(cur[p], prop ? prop+"."+p : p);
-			}
-			if (isEmpty && prop)
-				result[prop] = {};
-		}
-	}
-	recurse(data, "");
-	return result;
-};
-
-/*
-Finds all NaN values anywhere in the State.variables object. Returns an array with the names of the NaNed variables.
-*/
-window.findNaN = function findNan() {
-	const flatV = diffFlatten(State.variables);
-	var result = [];
-	for (var key in flatV) {
-		if (Number.isNaN(flatV[key])) {
-			result.push('$'+key);
-		}
-	}
-	return result;
-};
-
-/*:: Walk Past JS [script]*/
-
-/* temporary container until the entire thing is complete. No point in not deploying the working functions, you know? */
-
-window.primeSlave = function(activeSlave, seed) {
-
-	/* will be moved up once this becomes a single, contained function. */
-	const V = State.variables;
-	const pronouns = getPronouns(activeSlave);
-	const he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	const He = capFirstChar(he), His = capFirstChar(his);
-	let _target = "";
-	let t = "";
-	let race = (V.seeRace ? activeSlave.race : "");
-
-	if (V.partner !== "relationship" || activeSlave.relationship == 1 || activeSlave.relationship == 2 || activeSlave.releaseRules == "restrictive") {
-		t += `${activeSlave.slaveName} `;
-		t += walkPasts(activeSlave, seed);
-		/* WALKPASTS END */
-	}
-	/* TIME TOGETHER EXCEPTION ENDS */
-
-	return t;
-};
-
-window.rivalSlave = function(activeSlave, seed) {
-	const V = State.variables;
-	const pronouns = getPronouns(activeSlave);
-	const he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	const He = capFirstChar(he), His = capFirstChar(his);
-	let _partnerSlave = getSlave(activeSlave.rivalryTarget);
-	let _target = "";
-	let t = "";
-
-	if (_partnerSlave != undefined) { /* potential problem point */
-		let race2 = (V.seeRace ? _partnerSlave.race : "");
-
-		t += " Meanwhile, ";
-		if (activeSlave.rivalry >= 3) {
-			t += `${_partnerSlave.slaveName}, whom ${he} hates, `;
-		} else if (activeSlave.rivalry >= 2) {
-			t += `${his} rival ${_partnerSlave.slaveName} `;
-		} else {
-			t += `${_partnerSlave.slaveName}, whom ${he} dislikes, `;
-		}
-		t += walkPasts(_partnerSlave, 100-seed);
-
-		_target = "FRival";
-		_partnerSlave = null;
-		V.target = "FRival"; /*potentially removed later*/
-	}
-
-	return t;
-};
-
-window.walkPasts = function(slave, _seed) {
-
-	/* will be moved up once this becomes a single, contained function. */
-	const V = State.variables;
-	const pronouns = getPronouns(slave);
-	const he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	const He = capFirstChar(he), His = capFirstChar(his);
-	let _target = "";
-	let t = "";
-	let race = (V.seeRace ? slave.race : "");
-
-	switch (slave.assignment) {
-	case "be your agent":
-		t += `is shaping society in ${his} assigned arcology.`;
-		break;
-	case "live with your agent":
-		t += `is helping ${his} lover shape society in ${his} assigned arcology.`;
-		break;
-	case "work in the dairy":
-		if (V.dairyRestraintsSetting > 1) {
-			t += `is strapped to a milking machine in ${V.dairyName}, `;
-			if (slave.ovaries == 1 && V.dairyPregSetting > 0 && jsRandom(1,2) == 2) {
-				if (isFertile(slave)) {
-					t += `and is wincing in pain as the machine forces another load of cum into ${his} womb. As you watch, ${his} ${race} stomach steadily swells with baby batter.`;
-				} else {
-					t += `giving you a good view of ${his} ${race} body and heavy belly on the feeds.`;
-				}
-			} else if (slave.lactation > 0) {
-				if (slave.balls > 0 && jsRandom(1,2) == 1) {
-					if (slave.dick > 0) {
-						if (_seed > 50) {
-							t += `and is having ${his} cock sucked dry. As you watch, `;
-							if (slave.scrotum) {
-								t += `${his} balls tighten `;
-							} else {
-								t += `${he} begins to thrust harder `;
-							}
-							if (V.dairyStimulatorsSetting > 0) {
-								t += `as the phallus up ${his} butt `;
-							} else {
-								t += `as the suction to ${his} dick `;
-							}
-							t += `forces ${him} closer to yet another ejaculation.`;
-						} else {
-							t += `and is wincing in pain as the machine sucks ${his} sore cock, but you have a good view of ${his} ${race} body on the feeds.`;
-						}
-					} else {
-						if (_seed > 50) {
-							t += `and is having ${his} balls sucked dry. As you watch, `;
-							if (slave.scrotum) {
-								t += `${his} scrotum tightens `;
-							} else {
-								t += `${he} begins to thrust harder `;
-							}
-							if (V.dairyStimulatorsSetting) {
-								t += `as the phallus up ${his} butt `;
-							} else {
-								t += `as the suction against ${his} crotch `;
-							}
-							t += `forces ${him} closer to yet another leaking ejaculation.`;
-						} else {
-							t += `and is wincing in pain as the machine sucks ${his} empty balls, but you have a good view of ${his} ${race} body on the feeds.`;
-						}
-					}
-				} else {
-					if (_seed > 50) {
-						t += `and is having ${his} tits drained, but you have a good view of ${his} ${race} body on the feeds.`;
-					} else {
-						t += `and is recovering after having ${his} tits sucked dry, but you have a good view of ${his} ${race} body on the feeds.`;
-					}
-				}
-			} else if (slave.balls > 0) {
-				if (slave.dick > 0) {
-					if (_seed > 50) {
-						t += `and is having ${his} cock sucked dry. As you watch, `;
-						if (slave.scrotum) {
-							t += `${his} balls tighten `;
-						} else {
-							t += `${he} begins to thrust harder `;
-						}
-						if (V.dairyStimulatorsSetting > 0) {
-							t += `as the phallus up ${his} butt `;
-						} else {
-							t += `as the suction to ${his} dick `;
-						}
-						t += `forces ${him} closer to yet another ejaculation.`;
-					} else {
-						t += `and is wincing in pain as the machine sucks ${his} sore cock, but you have a good view of ${his} ${race} body on the feeds.`;
-					}
-				} else {
-					if (_seed > 50) {
-						t += `and is having ${his} balls sucked dry. As you watch, `;
-						if (slave.scrotum) {
-							t += `${his} scrotum tightens `;
-						} else {
-							t += `${he} begins to thrust harder `;
-						}
-						if (V.dairyStimulatorsSetting) {
-							t += `as the phallus up ${his} butt `;
-						} else {
-							t += `as the suction against ${his} crotch `;
-						}
-						t += `forces ${him} closer to yet another leaking ejaculation.`;
-					} else {
-						t += `and is wincing in pain as the machine sucks ${his} empty balls, but you have a good view of ${his} ${race} body on the feeds.`;
-					}
-				}
-			} else {
-				t += `and is massaging ${his} sore, milkless tits, but you have a good view of ${his} ${race} body on the feeds.`;
-			}
-		} else {
-			t += `is working in ${V.dairyName}, `;
-			if (slave.lactation > 0) {
-				if (slave.balls > 0 && jsRandom(1,2) == 1) {
-					if (slave.dick > 0) {
-						if (_seed > 50) {
-							t += `and is having ${his} cock milked. As you watch, `;
-							if (slave.scrotum) {
-								t += `${his} balls tighten `;
-							} else {
-								t += `${he} begins to thrust harder `;
-							}
-							if (V.dairyStimulatorsSetting > 0) {
-								t += `as the phallus up ${his} butt `;
-							} else {
-								t += `as the suction to ${his} dick `;
-							}
-							t += `brings ${him} closer to a copious ejaculation.`;
-						} else {
-							t += `and is massaging ${his} sore swollen cock, but you have a good view of ${his} ${race} body on the feeds.`;
-						}
-					} else {
-						if (_seed > 50) {
-							t += `and is having ${his} balls drained. As you watch, `;
-							if (slave.scrotum) {
-								t += `${his} scrotum tightens `;
-							} else {
-								t += `${he} begins to thrust harder `;
-							}
-							if (V.dairyStimulatorsSetting) {
-								t += `as the phallus up ${his} butt `;
-							} else {
-								t += `as the suction against ${his} crotch `;
-							}
-							t += `brings ${him} closer to a copious squirting.`;
-						} else {
-							t += `and is massaging ${his} aching balls, but you have a good view of ${his} ${race} body on the feeds.`;
-						}
-					}
-				} else {
-					if (_seed > 50) {
-						t += `and is having ${his} tits milked, but you have a good view of ${his} ${race} body on the feeds.`;
-					} else {
-						t += `and is massaging ${his} sore tits, but you have a good view of ${his} ${race} body on the feeds.`;
-					}
-				}
-			} else if (slave.balls > 0) {
-				if (slave.dick > 0) {
-					if (_seed > 50) {
-						t += `and is having ${his} cock milked. As you watch, `;
-						if (slave.scrotum) {
-							t += `${his} balls tighten `;
-						} else {
-							t += `${he} begins to thrust harder `;
-						}
-						if (V.dairyStimulatorsSetting) {
-							t += `as the phallus up ${his} butt `;
-						} else {
-							t += `as the suction to ${his} dick `;
-						}
-						t += `brings ${him} closer to a copious ejaculation.`;
-					} else {
-						t += `and is massaging ${his} sore swollen cock, but you have a good view of ${his} ${race} body on the feeds.`;
-					}
-				} else {
-					if (_seed > 50) {
-						t += `and is having ${his} balls drained. As you watch, `;
-						if (slave.scrotum) {
-							t += `${his} scrotum tightens `;
-						} else {
-							t += `${he} begins to thrust harder `;
-						}
-						if (V.dairyStimulatorsSetting) {
-							t += `as the phallus up ${his} butt `;
-						} else {
-							t += `as the suction against ${his} crotch `;
-						}
-						t += `brings ${him} closer to a copious squirting.`;
-					} else {
-						t += `and is massaging ${his} aching balls, but you have a good view of ${his} ${race} body on the feeds.`;
-					}
-				}
-			} else {
-				t += `and is massaging ${his} sore, milkless tits, but you have a good view of ${his} ${race} body on the feeds.`;
-			}
-		}
-		break;
-	case "work in the brothel":
-		t += `is working in ${V.brothelName}, and is `;
-		if (Beauty(slave) > 100 && jsRandom(1,2) == 1) {
-			if (_seed > 80) {
-				if (canDoAnal(slave) || canDoVaginal(slave)) {
-					t += `riding one customer's dick while ${he} gives another a blowjob.`;
-				} else {
-					t += "deep throating a pair of customer's dicks.";
-				}
-			} else if (_seed > 60 && slave.amp != 1) {
-				t += "sucking one customer's cock while giving another a handjob.";
-			} else if (_seed > 40) {
-				t += "eating out one customer's cunt while another ";
-				if (canDoAnal(slave) || canDoVaginal(slave)) {
-					t += `uses a strap-on on ${him}.`;
-				} else {
-					t += `teases ${his} butt.`;
-				}
-			} else if (_seed > 20) {
-				if (canDoAnal(slave) || canDoVaginal(slave)) {
-					t += "getting pounded by ";
-				} else {
-					t += "amusing ";
-				}
-				t += "two women wearing strap-ons.";
-			} else {
-				if (canDoAnal(slave) || canDoVaginal(slave)) {
-					t += "being double penetrated by ";
-				} else {
-					t += `using ${her} body to please `;
-				}
-				t += "a pair of customers.";
-			}
-		} else if (_seed > 80) {
-			if (canDoAnal(slave) || canDoVaginal(slave)) {
-				t += "pleasing ";
-			} else {
-				t += "riding ";
-			}
-			t += "a customer's dick.";
-		} else if (_seed > 60) {
-			t += "sucking a customer's cock.";
-		} else if (_seed > 40) {
-			t += "pleasuring a customer's cunt.";
-		} else if (_seed > 20) {
-			t += "getting pounded by a woman wearing a strap-on.";
-		} else {
-			t += "being held down and ";
-			if (canDoAnal(slave)) {
-				t += "buttfucked ";
-			} else {
-				t += "raped ";
-			}
-			t += "by a customer.";
-		}
-		t += ` You have a voyeuristic view of ${his} ${race} body on the feeds.`;
-		break;
-	case "serve in the club":
-		t += `is working in ${V.clubName}, `;
-		if (_seed > 50) {
-			t += `displaying ${his} ${race} body, keeping citizens company, and flirting with anyone who shows interest.`;
-		} else {
-			t += `or rather just off it, having taken a prominent citizen back to a discreet room so he can use ${his} ${race} body.`;
-		}
-		break;
-	case "work as a servant":
-		if (_seed > 50) {
-			t += "was scrubbing the penthouse floor, until another slave requested oral service.";
-		} else {
-			t += "is scrubbing the penthouse floor.";
-		}
-		break;
-	case "serve in the master suite":
-		if (slave.fuckdoll > 0) {
-			t += `waiting for use in ${V.masterSuiteName}, next to a display case full of other sex toys.`;
-		} else if (V.masterSuiteUpgradeLuxury == 1) {
-			if (_seed > 50) {
-				t += `is sitting on the big bed in ${V.masterSuiteName}, awaiting your return.`;
-			} else {
-				t += `is beautifying ${himself} in ${V.masterSuiteName} so ${he}'ll be pretty when you return.`;
-			}
-		} else if (V.masterSuiteUpgradeLuxury == 2) {
-			t += `is in ${V.masterSuiteName}'s fuckpit, `;
-			if (_seed > 80) {
-				t += `with a pair of ${his} fellow fucktoys industriously sucking on ${his} nipples.`;
-			} else if (_seed > 60) {
-				if ((slave.anus > 0 && canDoAnal(slave)) || (slave.vagina > 0 && canDoVaginal(slave))) {
-					t += "taking double penetration from ";
-				} else {
-					t += "being spitroasted by ";
-				}
-				t += `a pair of ${his} fellow fucktoys.`;
-			} else if (_seed > 40) {
-				if (canPenetrate(slave)) {
-					t += `with ${his} dick inside `;
-				} else if (slave.dick > 0 && slave.dickAccessory != "chastity" && slave.dick != "combined chastity") {
-					t += `getting ${his} soft dick sucked by `;
-				} else if (canDoVaginal(slave) || canDoAnal(slave)) {
-					t += "getting eaten out by ";
-				} else {
-					t += "making out with ";
-				}
-				t += "a fellow fucktoy.";
-			} else if (_seed > 20) {
-				if (slave.vagina > 0 && canDoVaginal(slave)) {
-					t += "getting pounded ";
-				} else if (slave.anus > 0 && canDoAnal(slave)) {
-					t += `getting ${his} ass pounded `;
-				} else if (canDoVaginal(slave) || canDoAnal(slave)) {
-					t += "getting eaten out ";
-				} else {
-					t += "getting deepthroated ";
-				}
-				t += "by a fellow fucktoy.";
-			} else {
-				t += "performing oral sex on a fellow fucktoy.";
-			}
-		} else {
-			if (slave.energy > 95) {
-				t += `is having enthusiastic sex with your other pets while waiting for you to ravish ${him}.`;
-			} else {
-				t += "is having idle sex with several of your other toys while they await your pleasure.";
-				if (slave.fetishKnown == 1) {
-					switch (slave.fetish) {
-					case "buttslut":
-						if (canDoAnal(slave) && slave.anus > 0) {
-							t += `${He}'s happily taking a strap-on up ${his} asspussy.`;
-						} else {
-							t += `${He}'s happily got another slave between ${his} buttcheeks.`;
-						}
-						break;
-					case "cumslut":
-						t += `${He}'s happily performing oral on another slave.`;
-						break;
-					case "dom":
-						t += `${He}'s pinning another slave down while ${he} fucks her.`;
-						break;
-					case "submissive":
-						t += `${He}'s letting another slave have her way with ${him}.`;
-						break;
-					case "sadist":
-						if (slave.amp != 1) {
-							t += `${He}'s spanking another slave with one hand and fingering her with the other.`;
-						} else {
-							t += `${He}'s painfully teasing another slave's nipple with ${his} teeth.`;
-						}
-						break;
-					case "masochist":
-						t += `Another slave is spanking ${him} while molesting everything she can.`;
-						break;
-					case "boobs":
-						t += `${He} has a slave sucking on each of ${his} nipples`;
-						if (slave.amp != 1) {
-							t += ` while ${he} gives each a handjob.`;
-						} else {
-							t += ".";
-						}
-						break;
-					case "pregnancy":
-						if (slave.belly >= 5000) {
-							t += `${He}'s sighing contentedly as ${his} rounded belly is sensually rubbed.`;
-						} else if (canPenetrate(slave)) {
-							t += `${He}'s happily roleplaying impregnating the slave ${he}'s fucking.`;
-						} else if ((slave.anus > 0 && canDoAnal(slave)) || (slave.vagina > 0 && canDoVaginal(slave))) {
-							t += `${He}'s happily roleplaying conceiving a child as ${he} gets fucked.`;
-						} else {
-							t += `${He}'s happily roleplaying being hugely pregnant.`;
-						}
-					}
-				}
-			}
-		}
-		break;
-	/*
-	case "guard you":
-		t += "is standing discreetly behind your left shoulder, watching for threats."
-		break
-	*/
-	case "stay confined":
-		t += `is confined, but you have a fine view of ${his} ${race} body on the feed from ${his} cell.`;
-		break;
-	case "be confined in the cellblock":
-		t += `is confined in ${V.cellblockName}, but you have a fine view of ${his} ${race} body on the feed from ${his} cell.`;
-		break;
-	case "be confined in the arcade":
-	case "work a glory hole":
-		t += "is confined in ";
-		if (slave.assignment == "be confined in the arcade") {
-			t += `${V.arcadeName}; `;
-		} else {
-			t += "a glory hole; ";
-		}
-		if (_seed > 80 && (canDoAnal(slave) || canDoVaginal(slave))) {
-			t += `${his} ass is held out at cock height, and a customer is using ${his} fuckhole.`;
-		} else if (_seed > 60) {
-			t += `${his} mouth is held open at cock height, and a customer is fucking ${his} throat.`;
-		} else if (_seed > 40) {
-			t += `a woman is abusing ${him} with a couple of dildos.`;
-		} else if (_seed > 20 && canDoAnal(slave)) {
-			t += `a customer is harshly using ${his} defenseless anus.`;
-		} else {
-			t += `a customer is cruelly spanking ${his} helpless butt.`;
-		}
-		break;
-	case "be the Madam":
-		t += `is managing ${V.brothelName}: ${he} is making sure all the customers are satisfied and all the whores are working hard.`;
-		break;
-	case "be your Concubine":
-		if (jsRandom(1,2) == 1) {
-			t += `is looking after ${himself}; ${he} spends many hours every day on ${his} beauty regimen.`;
-		} else {
-			t += "is checking over the appearance of your harem, making sure everyone looks perfect.";
-		}
-		break;
-	case "be the Wardeness":
-		t += `is looking after the cells: ${he} is `;
-		if (_seed > 50) {
-			t += `forcing a resistant slave to orally service ${him}.`;
-		} else {
-			t += "beating a rebellious slave across the buttocks.";
-		}
-		break;
-	case "live with your Head Girl":
-		if (V.HeadGirl != 0) {
-			t += `is getting the Head Girl's suite cleaned up while ${V.HeadGirl.slaveName} is out working.`;
-		} else {
-			t += "is making sure the Head Girl's suite is in order for your next Head Girl.";
-		}
-		break;
-	case "be the Stewardess":
-		t += `is managing the house servants in ${V.servantsQuartersName}: ${he} overseeing the laboring house slaves and punishing any that step out of line.`;
-		break;
-	case "be the Schoolteacher":
-		t += `is teaching classes in ${V.schoolroomName}: ${he} is leading the slave students in rote recitation.`;
-		break;
-	case "be the Attendant":
-		t += `is seeing to girls in ${V.spaName}: ${he} is gently soaping an exhausted slave.`;
-		break;
-	case "be the DJ":
-		if (_seed > 50) {
-			t += `is right where ${he} belongs, in the DJ booth in ${V.clubName} ${he} leads. ${He}'s bouncing in time with the beat to show off ${his} `;
-			if (slave.boobs > 300) {
-				t += "tits.";
-			} else {
-				t += "goods.";
-			}
-		} else {
-			t += `is taking the lead on ${V.clubName}'s floor: ${he} greets new arrivals, flirts with them prettily, and subtly guides them towards choice sluts.`;
-		}
-		break;
-	case "be the Milkmaid":
-		t += `is working in ${V.dairyName}, looking after your stock.`;
-		break;
-	default: /* WALKPASTS START HERE */
-		if (slave.heels == 1 && !["flats", "none"].includes(slave.shoes)) {
-			t += `walks past your desk with the tiny swaying steps ${he} must take in order to walk on ${his} surgically altered legs. ${He} is on ${his} way to `;
-		} else if (["heels", "pumps"].includes(slave.shoes)) {
-			t += `walks past your desk with the swaying steps ${he} must take in ${his} high heels. ${He} is on ${his} way to `;
-		} else if (slave.shoes == "boots") {
-			t += `walks past your desk with the confident gait encouraged by ${his} high heeled boots. ${He} is on ${his} way to `;
-		} else if (slave.shoes == "extreme heels") {
-			t += `walks past your desk with the tiny swaying steps ${he} must take in ${his} ridiculous heels. ${He} is on ${his} way to `;
-		} else if (slave.heels == 1) {
-			t += `crawls past your desk on all fours, since ${he} has not been allowed the heels ${he} needs to walk upright. ${He} is on ${his} way to `;
-		} else if (slave.amp == 1) {
-			t += `is carried past your desk by one of your other slaves. ${He} is on ${his} way to `;
-		} else if (!canWalk(slave)) {
-			t += `is helped past your desk by one of your other slaves. ${He} is on ${his} way to `;
-		} else {
-			t += `walks past your desk on ${his} way to `;
-		}
-		if (slave.inflation > 0 && jsRandom(1,100) > 70) {
-			if (slave.inflationMethod == 1) {
-				t += `gorge ${himself} with ${slave.inflationType}; `;
-			} else if (slave.inflationMethod == 2) {
-				t += `fill ${his} rear with `;
-				switch (slave.inflationType) {
-				case "water":
-				case "milk":
-				case "cum":
-				case "food":
-					t += `${slave.inflationType}; `;
-					break;
-				default:
-					t += `${slave.inflationType}s; `;
-					break;
-				}
-			} else if (slave.inflationMethod == 3) {
-				if (slave.inflationType == "milk") {
-					t += `suckle from ${his} assigned nipple until ${he} is sufficiently filled with milk; `;
-				} else {
-					t += `suck ${his} assigned dick until ${he} is sufficiently filled with cum; `;
-				}
-			}
-		} else {
-			switch (slave.assignment) {
-			case "rest":
-				if (_seed > 50) {
-					t += "bed; ";
-				} else {
-					t += "eat; ";
-				}
-				break;
-			case "get milked":
-				if (_seed > 50) {
-					if (slave.lactation) {
-						t += `milk ${his} overfull ${race} tits; `;
-					} else {
-						t += `empty ${his} aching balls; `;
-					}
-				} else {
-					if (slave.lactation) {
-						t += `drain ${his} milky ${race} udders; `;
-					} else {
-						t += `relieve ${his} heavy balls; `;
-					}
-				}
-				break;
-			case "whore":
-				if (_seed > 50) {
-					t += `sell ${his} ${race} body; `;
-				} else {
-					t += `ply ${his} trade as a whore; `;
-				}
-				break;
-			case "serve the public":
-				if (_seed > 50) {
-					t += "serve the public; ";
-				} else {
-					t += "be a public slut; ";
-				}
-				break;
-			case "rest in the spa":
-				t += `relax in ${V.spaName}; `;
-				break;
-			case "please you":
-				t += `wait next to you and wait for you to fuck ${him}; `;
-				break;
-			case "be a subordinate slave":
-				t += "service your other slaves; ";
-				break;
-			case "be a servant":
-				t += "clean up after your other slaves; ";
-				break;
-			case "learn in the schoolroom":
-				t += "attend classes ";
-				if (V.Schoolteacher == 0) {
-					t += `in ${V.schoolroomName}; `;
-				} else {
-					t += `under ${V.Schoolteacher.slaveName}, perhaps literally; `;
-				}
-				break;
-			case "be a subordinate slave":
-				t += "service your other slaves; ";
-				break;
-			case "be the Attendant":
-				t += `look after the girls in ${V.spaName}; `;
-				break;
-			case "take classes":
-				t += `attend classes with ${V.assistantName}; `;
-				break;
-			case "be your Head Girl":
-				t += "oversee your other slaves; ";
-				break;
-			case "recruit girls":
-				t += `use ${his} connections to recruit slaves; `;
-				break;
-			default:
-				t += `${slave.assignment}; `;
-				break;
-			}
-		} /* end inflation blurb */
-		if (slave.fetish == "mindbroken") {
-			t += `${he} does not even glance at you as ${he} goes mindlessly to ${his} next task.`;
-		} else if (slave.devotion < -50) {
-			t += `${he} directs a look of pure hatred at where you sit as ${he} passes.`;
-		} else if (slave.devotion < -20) {
-			t += `${he} cannot keep the loathing from ${his} face as ${he} passes.`;
-		} else if (slave.devotion <= 20) {
-			t += `${he} passes quickly, obviously hoping to avoid you.`;
-		} else if (slave.devotion <= 50) {
-			t += `${he} rushes by, hurrying to ${his} next task.`;
-		} else {
-			t += `as ${he} passes ${he} gives you a look of adoration.`;
-		}
-		break;
-	}
-	return t;
-};
-
-/*:: Datatype Cleanup JS [script]*/
-
-/*
-	This function does not ensure values make sense. For example, it does not fix weird relations/relationships/rivalries/pregnancies/prosthetics.
-	It only makes sure most datatypes are correct, and sets to default if not. Number values are clamped to the correct bounds.
-	Any values that are supposed to be objects or arrays are not handled (yet).
-
-	A tutorial on how to add to this passage:
-		The || operator can be very useful for setting default values. To be precise,
-			x = y || z
-		is the same thing as
-			if (y) {x = y}
-			else {x = z}
-		This means that if z is the default value, in the ideal case you could write x = x || z. If x is already in use, this won't change it, and if x is not defined it will set it to z.
-		However, for example, if x is 0 but the default is -1 this will actually set x to -1! So care must be taken.
-
-		Let's say you want to add slave.value to this function, and you want it to be a number.
-		First, you need to take whatever slave.value currently is, and turn it into a number. You can use either +slave.value or Number(slave.value) to do this.
-		Second, you need to determine what range to restrict slave.value to. You'll either use Math.max, Math.min, Math.clamp, or none of them.
-		Finally, you need to consider the default value if the .max/.min/.clamp returned 0 (or NaN). To make a long story short,
-			Use slave.value = Math.max(+slave.value, a) || default; if you need slave.value >= a.
-			Use slave.value = Math.min(+slave.value, a) || default; if you need slave.value <= a.
-			Use slave.value = Math.clamp(+slave.value, a, b) || default; if you need a <= slave.value <= b.
-			Use slave.value = +slave.value || default; if slave.value can be any number.
-		The exception to this is if the default != 0. In this case, it's usually good enough to just check if slave.value !== 0 first. The strict equality is important!
-
-		If you want slave.value to be a string, there's no easy tricks to make sure it's already an accepted value. The simplest way is the following
-			if (typeof slave.value !== "string") slave.value = default;
-*/
-window.SlaveDatatypeCleanup = function SlaveDatatypeCleanup (slave) {
-	slaveAgeDatatypeCleanup(slave);
-	slavePhysicalDatatypeCleanup(slave);
-	slaveFaceDatatypeCleanup(slave);
-	slaveHairDatatypeCleanup(slave);
-	slaveBoobsDatatypeCleanup(slave);
-	slaveButtDatatypeCleanup(slave);
-	slavePregnancyDatatypeCleanup(slave);
-	slaveBellyDatatypeCleanup(slave);
-	slaveGenitaliaDatatypeCleanup(slave);
-	slaveImplantsDatatypeCleanup(slave);
-	slavePiercingsDatatypeCleanup(slave);
-	slaveTattooDatatypeCleanup(slave);
-	slaveCosmeticsDatatypeCleanup(slave);
-	slaveDietDatatypeCleanup(slave);
-	slavePornDatatypeCleanup(slave);
-	slaveRelationDatatypeCleanup(slave);
-	slaveSkillsDatatypeCleanup(slave);
-	slaveStatCountDatatypeCleanup(slave);
-	slavePreferencesDatatypeCleanup(slave);
-	slaveRulesDatatypeCleanup(slave);
-	slaveCustomStatsDatatypeCleanup(slave);
-	slaveMiscellaneousDatatypeCleanup(slave);
-	generatePronouns(slave);
-};
-
-window.slaveAgeDatatypeCleanup = function slaveAgeDatatypeCleanup(slave) {
-	const V = State.variables;
-
-	slave.birthWeek = Math.clamp(+slave.birthWeek, 0, 51) || 0;
-	if (slave.age > 0) {
-		slave.actualAge = Math.clamp(+slave.actualAge, V.minimumSlaveAge, Infinity) || slave.age; /* if undefined, this sets to slave.age */
-	} else {
-		slave.actualAge = Math.clamp(+slave.actualAge, V.minimumSlaveAge, Infinity) || 18;
-		slave.age = slave.actualAge;
-	}
-	slave.visualAge = Math.max(+slave.visualAge, 0) || slave.actualAge;
-	slave.physicalAge = Math.max(+slave.physicalAge, 0) || slave.actualAge;
-	slave.ovaryAge = Math.max(+slave.ovaryAge, 0) || slave.physicalAge;
-	slave.pubertyAgeXX = Math.max(+slave.pubertyAgeXX, 0) || V.fertilityAge;
-	slave.pubertyAgeXY = Math.max(+slave.pubertyAgeXY, 0) || V.potencyAge;
-	slave.ageAdjust = Math.clamp(+slave.ageAdjust, -40, 40) || 0;
-	slave.NCSyouthening = Math.max(+slave.NCSyouthening, 0) || 0;
-};
-
-window.slavePhysicalDatatypeCleanup = function slavePhysicalDatatypeCleanup(slave) {
-	if (typeof slave.nationality !== "string") {
-		slave.nationality = "slave";
-	}
-	if (typeof slave.race !== "string") {
-		nationalityToRace(slave);
-	}
-	if (typeof slave.origRace !== "string") {
-		slave.origRace = slave.race;
-	}
-	if (typeof slave.skin !== "string") {
-		slave.skin = "light";
-	}
-	if (typeof slave.origSkin !== "string") {
-		slave.origSkin = slave.skin;
-	}
-	if (typeof slave.minorInjury !== "string") {
-		slave.minorInjury = 0;
-	}
-	slave.health = Math.clamp(+slave.health, -100, 100) || 0;
-	slave.muscles = Math.clamp(+slave.muscles, -100, 100) || 0;
-	slave.weight = Math.clamp(+slave.weight, -100, 200) || 0;
-	slave.waist = Math.clamp(+slave.waist, -100, 100) || 0;
-	slave.height = Math.round(Math.max(+slave.height, 0)) || Math.round(Height.mean(slave));
-	slave.shoulders = Math.clamp(+slave.shoulders, -2, 2) || 0;
-	slave.hips = Math.clamp(+slave.hips, -2, 3) || 0;
-};
-
-window.slaveFaceDatatypeCleanup = function slaveFaceDatatypeCleanup(slave) {
-	slave.face = Math.clamp(+slave.face, -100, 100) || 0;
-	if (typeof slave.faceShape !== "string") {
-		slave.faceShape = "normal";
-	}
-	slave.eyes = Math.clamp(+slave.eyes, -3, 1) || 1; /* if 0 or undefined, this sets to 1 */
-	if (typeof slave.eyeColor !== "string") {
-		slave.eyeColor = "brown";
-	}
-	if (typeof slave.origEye !== "string") {
-		slave.origEye = slave.eyeColor;
-	}
-	if (typeof slave.pupil !== "string") {
-		slave.pupil = "circular";
-	}
-	if (typeof slave.sclerae !== "string") {
-		slave.sclerae = "white";
-	}
-	if (slave.lips !== 0) {
-		slave.lips = Math.clamp(+slave.lips, 0, 100) || 15;
-	}
-};
-
-window.slaveHairDatatypeCleanup = function slaveHairDatatypeCleanup(slave) {
-	if (typeof slave.hColor !== "string") {
-		slave.hColor = "brown";
-	}
-	if (typeof slave.origHColor !== "string") {
-		slave.origHColor = slave.hColor;
-	}
-	if (slave.hLength !== 0) {
-		slave.hLength = Math.clamp(+slave.hLength, 0, 300) || 60;
-	}
-	if (typeof slave.hStyle !== "string") {
-		slave.hStyle = "long";
-	}
-	slave.haircuts = Math.clamp(+slave.haircuts, 0, 1) || 0;
-	slave.bald = Math.clamp(+slave.bald, 0, 1) || 0;
-	if (typeof slave.pubicHColor !== "string") {
-		slave.pubicHColor = slave.hColor;
-	}
-	if (typeof slave.pubicHStyle !== "string") {
-		slave.pubicHStyle = "neat";
-	}
-	if (typeof slave.underArmHColor !== "string") {
-		slave.underArmHColor = "slave.hColor";
-	}
-	if (typeof slave.underArmHStyle !== "string") {
-		slave.underArmHStyle = "waxed";
-	}
-	if (typeof slave.eyebrowHColor !== "string") {
-		slave.eyebrowHColor = "slave.hColor";
-	}
-	if (typeof slave.eyebrowHStyle !== "string") {
-		slave.eyebrowHStyle = "natural";
-	}
-	if (typeof slave.eyebrowFullness !== "string") {
-		slave.eyebrowFullness = "natural";
-	}
-};
-
-window.slaveBoobsDatatypeCleanup = function slaveBoobsDatatypeCleanup(slave) {
-	slave.boobs = Math.max(+slave.boobs, 100) || 200;
-	if (typeof slave.boobShape !== "string") {
-		slave.boobShape = "normal";
-	}
-	if (typeof slave.nipples !== "string") {
-		slave.nipples = "cute";
-	}
-	if (typeof slave.nipplesAccessory !== "string") {
-		slave.nipplesAccessory = "none";
-	}
-	slave.areolae = Math.clamp(+slave.areolae, 0, 3) || 0;
-	if (typeof slave.areolaeShape !== "string") {
-		slave.areolaeShape = "circle";
-	}
-	slave.lactation = Math.clamp(+slave.lactation, 0, 2) || 0;
-	slave.boobsMilk = Math.max(+slave.boobsMilk, 0) || 0;
-	slave.lactationAdaptation = Math.clamp(+slave.lactationAdaptation, 0, 100) || 0;
-};
-
-window.slaveButtDatatypeCleanup = function slaveButtDatatypeCleanup(slave) {
-	if (slave.butt !== 0) {
-		slave.butt = Math.clamp(+slave.butt, 0, 20) || 1;
-	}
-	slave.anus = Math.clamp(+slave.anus, 0, 4) || 0;
-	slave.analArea = Math.max(+slave.analArea, 0) || 0;
-};
-
-window.slavePregnancyDatatypeCleanup = function slavePregnancyDatatypeCleanup(slave) {
-	slave.induce = Math.clamp(+slave.induce, 0, 1) || 0;
-	slave.labor = Math.clamp(+slave.labor, 0, 1) || 0;
-	slave.cSec = Math.clamp(+slave.cSec, 0, 1) || 0;
-	slave.prematureBirth = Math.clamp(+slave.prematureBirth, 0, 1) || 0;
-	slave.ovaries = Math.clamp(+slave.ovaries, 0, 1) || 0;
-	slave.vasectomy = Math.clamp(+slave.vasectomy, 0, 1) || 0;
-	slave.mpreg = Math.clamp(+slave.mpreg, 0, 1) || 0;
-	if (slave.pregAdaptation !== 0) {
-		slave.pregAdaptation = Math.max(+slave.pregAdaptation, 0) || 50;
-	}
-	slave.ovaImplant = Math.clamp(+slave.ovaImplant, -1, 2) || 0;
-	slave.broodmother = Math.clamp(+slave.broodmother, 0, 3) || 0;
-	slave.broodmotherFetuses = Math.max(+slave.broodmotherFetuses, 0) || 0;
-	slave.broodmotherOnHold = Math.clamp(+slave.broodmotherOnHold, 0, 1) || 0;
-	slave.pregSource = +slave.pregSource || 0;
-	if (typeof slave.pregControl !== "string") {
-		slave.pregControl = "none";
-	}
-	WombNormalizePreg(slave);
-};
-
-window.slaveBellyDatatypeCleanup = function slaveBellyDatatypeCleanup(slave) {
-	slave.inflation = Math.clamp(+slave.inflation, 0, 3) || 0;
-	if (typeof slave.inflationType !== "string") {
-		slave.inflationType = "none";
-	}
-	slave.inflationMethod = Math.clamp(+slave.inflationMethod, 0, 3) || 0;
-	slave.milkSource = Math.max(+slave.milkSource, 0) || 0;
-	slave.cumSource = Math.max(+slave.cumSource, 0) || 0;
-	slave.burst = Math.clamp(+slave.burst, 0, 1) || 0;
-	if (slave.bellyImplant !== 0) {
-		slave.bellyImplant = Math.max(+slave.bellyImplant, -1) || -1;
-	}
-	slave.cervixImplant = Math.clamp(+slave.cervixImplant, 0, 3) || 0;
-	slave.bellySag = Math.max(+slave.bellySag, 0) || 0;
-	slave.bellySagPreg = Math.max(+slave.bellySagPreg, 0) || slave.bellySag;
-	slave.bellyPain = Math.clamp(+slave.bellyPain, 0, 2) || 0;
-	SetBellySize(slave);
-};
-
-window.slaveGenitaliaDatatypeCleanup = function slaveGenitaliaDatatypeCleanup(slave) {
-	slave.vagina = Math.clamp(+slave.vagina, -1, 10) || 0;
-	slave.vaginaLube = Math.clamp(+slave.vaginaLube, 0, 2) || 0;
-	slave.labia = Math.clamp(+slave.labia, 0, 3) || 0;
-	slave.clit = Math.clamp(+slave.clit, 0, 5) || 0;
-	slave.foreskin = Math.max(+slave.foreskin, 0) || 0;
-	slave.dick = Math.max(+slave.dick, 0) || 0;
-	if (slave.dick && slave.prostate !== 0) {
-		slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 1;
-	} else {
-		slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 0;
-	}
-	slave.balls = Math.max(+slave.balls, 0) || 0;
-	if (slave.scrotum !== 0) {
-		slave.scrotum = Math.max(+slave.scrotum, 0) || slave.balls;
-	}
-};
-
-window.slaveImplantsDatatypeCleanup = function slaveImplantsDatatypeCleanup(slave) {
-	slave.ageImplant = Math.clamp(+slave.ageImplant, 0, 1) || 0;
-	slave.faceImplant = Math.clamp(+slave.faceImplant, 0, 100) || 0;
-	slave.lipsImplant = Math.clamp(+slave.lipsImplant, 0, 100) || 0;
-	slave.voiceImplant = Math.clamp(+slave.voiceImplant, -1, 1) || 0;
-	slave.boobsImplant = Math.max(+slave.boobsImplant, 0) || 0;
-	slave.boobsImplantType = Math.clamp(+slave.boobsImplantType, 0, 1) || 0;
-	slave.breastMesh = Math.clamp(+slave.breastMesh, 0, 1) || 0;
-	slave.buttImplant = Math.clamp(+slave.buttImplant, 0, 3) || 0;
-	slave.buttImplantType = Math.clamp(+slave.buttImplantType, 0, 1) || 0;
-	slave.heightImplant = Math.clamp(+slave.heightImplant, -1, 1) || 0;
-	slave.earImplant = Math.clamp(+slave.earImplant, 0, 1) || 0;
-	slave.shouldersImplant = Math.clamp(+slave.shouldersImplant, -1, 1) || 0;
-	slave.hipsImplant = Math.clamp(+slave.hipsImplant, -1, 1) || 0;
-};
-
-window.slavePiercingsDatatypeCleanup = function slavePiercingsDatatypeCleanup(slave) {
-	slave.earPiercing = Math.clamp(+slave.earPiercing, 0, 2) || 0;
-	slave.nosePiercing = Math.clamp(+slave.nosePiercing, 0, 2) || 0;
-	slave.eyebrowPiercing = Math.clamp(+slave.eyebrowPiercing, 0, 2) || 0;
-	slave.lipsPiercing = Math.clamp(+slave.lipsPiercing, 0, 2) || 0;
-	slave.tonguePiercing = Math.clamp(+slave.tonguePiercing, 0, 2) || 0;
-	slave.nipplesPiercing = Math.clamp(+slave.nipplesPiercing, 0, 2) || 0;
-	slave.areolaePiercing = Math.clamp(+slave.areolaePiercing, 0, 2) || 0;
-	slave.corsetPiercing = Math.clamp(+slave.corsetPiercing, 0, 1) || 0;
-	slave.navelPiercing = Math.clamp(+slave.navelPiercing, 0, 2) || 0;
-	slave.clitPiercing = Math.clamp(+slave.clitPiercing, 0, 3) || 0;
-	slave.vaginaPiercing = Math.clamp(+slave.vaginaPiercing, 0, 2) || 0;
-	slave.dickPiercing = Math.clamp(+slave.dickPiercing, 0, 2) || 0;
-	slave.anusPiercing = Math.clamp(+slave.anusPiercing, 0, 2) || 0;
-};
-
-window.slaveTattooDatatypeCleanup = function slaveTattooDatatypeCleanup(slave) {
-	if (typeof slave.shouldersTat !== "string") {
-		slave.shouldersTat = 0;
-	}
-	if (typeof slave.lipsTat !== "string") {
-		slave.lipsTat = 0;
-	}
-	if (typeof slave.boobsTat !== "string") {
-		slave.boobsTat = 0;
-	}
-	if (typeof slave.armsTat !== "string") {
-		slave.armsTat = 0;
-	}
-	if (typeof slave.backTat !== "string") {
-		slave.backTat = 0;
-	}
-	if (typeof slave.stampTat !== "string") {
-		slave.stampTat = 0;
-	}
-	if (typeof slave.buttTat !== "string") {
-		slave.buttTat = 0;
-	}
-	if (typeof slave.vaginaTat !== "string") {
-		slave.vaginaTat = 0;
-	}
-	if (typeof slave.dickTat !== "string") {
-		slave.dickTat = 0;
-	}
-	if (typeof slave.anusTat !== "string") {
-		slave.anusTat = 0;
-	}
-	if (typeof slave.legsTat !== "string") {
-		slave.legsTat = 0;
-	}
-	if (typeof slave.bellyTat !== "string") {
-		slave.bellyTat = 0;
-	}
-	if (typeof slave.customTat !== "string") {
-		slave.customTat = "";
-	}
-};
-
-window.slaveCosmeticsDatatypeCleanup = function slaveCosmeticsDatatypeCleanup(slave) {
-	slave.makeup = Math.clamp(+slave.makeup, 0, 8) || 0;
-	slave.nails = Math.clamp(+slave.nails, 0, 9) || 0;
-	slave.scars = Math.clamp(+slave.scars, 0, 6) || 0;
-	slave.choosesOwnClothes = Math.clamp(+slave.choosesOwnClothes, 0, 1) || 0;
-	if (typeof slave.clothes !== "string") {
-		slave.clothes = "no clothing";
-	}
-	if (typeof slave.collar !== "string") {
-		slave.collar = "none";
-	}
-	if (typeof slave.shoes !== "string") {
-		slave.shoes = "none";
-	}
-	if (typeof slave.eyewear !== "string") {
-		slave.eyewear = "none";
-	}
-	slave.brand = Math.clamp(+slave.brand, 0, 1) || 0;
-	if (typeof slave.brandLocation !== "string") {
-		slave.brandLocation = 0;
-	}
-	if (typeof slave.markings !== "string") {
-		slave.markings = "none";
-	}
-	if (typeof slave.bellyAccessory !== "string") {
-		slave.bellyAccessory = "none";
-	}
-	if (typeof slave.vaginalAccessory !== "string") {
-		slave.vaginalAccessory = "none";
-	}
-	if (typeof slave.dickAccessory !== "string") {
-		slave.dickAccessory = "none";
-	}
-	if (typeof slave.legAccessory !== "string") {
-		slave.legAccessory = "none";
-	}
-	if (typeof slave.buttplug !== "string") {
-		slave.buttplug = "none";
-	}
-	if (typeof slave.buttplugAttachment !== "string") {
-		slave.buttplugAttachment = "none";
-	}
-	if (typeof slave.headAccessory !== "string") {
-		slave.headAccessory = "none";
-	}
-	if (typeof slave.rearAccessory !== "string") {
-		slave.rearAccessory = "none";
-	}
-	if (typeof slave.backAccessory !== "string") {
-		slave.backAccessory = "none";
-	}
-};
-
-window.slaveDietDatatypeCleanup = function slaveDietDatatypeCleanup(slave) {
-	if (typeof slave.diet !== "string") {
-		slave.diet = "healthy";
-	}
-	slave.dietCum = Math.clamp(+slave.dietCum, 0, 2) || 0;
-	slave.dietMilk = Math.clamp(+slave.dietMilk, 0, 2) || 0;
-	slave.onDiet = Math.clamp(+slave.onDiet, 0, 1) || 0;
-	slave.hormones = Math.clamp(+slave.hormones, -2, 2) || 0;
-	slave.hormoneBalance = Math.clamp(+slave.hormoneBalance, -400, 400) || 0;
-	if (typeof slave.drugs !== "string") {
-		slave.drugs = "no drugs";
-	}
-	slave.aphrodisiacs = Math.clamp(+slave.aphrodisiacs, 0, 2) || 0;
-	slave.curatives = Math.clamp(+slave.curatives, 0, 2) || 0;
-};
-
-window.slavePornDatatypeCleanup = function slavePornDatatypeCleanup(slave) {
-	slave.pornFeed = Math.clamp(+slave.pornFeed, 0, 1) || 0;
-	slave.pornFame = Math.max(+slave.pornFame, 0) || 0;
-	slave.pornFameSpending = Math.max(+slave.pornFameSpending, 0) || 0;
-	slave.pornPrestige = Math.clamp(+slave.pornPrestige, 0, 3) || 0;
-	if (typeof slave.pornPrestigeDesc !== "string") {
-		slave.pornPrestigeDesc = 0;
-	}
-	if (typeof slave.pornFameType !== "string") {
-		slave.pornFameType = "none";
-	}
-	if (typeof slave.pornFocus !== "string") {
-		slave.pornFocus = "none";
-	}
-	slave.pornTypeGeneral = Math.max(+slave.pornTypeGeneral, 0) || 0;
-	slave.pornTypeFuckdoll = Math.max(+slave.pornTypeFuckdoll, 0) || 0;
-	slave.pornTypeRape = Math.max(+slave.pornTypeRape, 0) || 0;
-	slave.pornTypePreggo = Math.max(+slave.pornTypePreggo, 0) || 0;
-	slave.pornTypeBBW = Math.max(+slave.pornTypeBBW, 0) || 0;
-	slave.pornTypeGainer = Math.max(+slave.pornTypeGainer, 0) || 0;
-	slave.pornTypeStud = Math.max(+slave.pornTypeStud, 0) || 0;
-	slave.pornTypeLoli = Math.max(+slave.pornTypeLoli, 0) || 0;
-	slave.pornTypeDeepThroat = Math.max(+slave.pornTypeDeepThroat, 0) || 0;
-	slave.pornTypeStruggleFuck = Math.max(+slave.pornTypeStruggleFuck, 0) || 0;
-	slave.pornTypePainal = Math.max(+slave.pornTypePainal, 0) || 0;
-	slave.pornTypeTease = Math.max(+slave.pornTypeTease, 0) || 0;
-	slave.pornTypeRomantic = Math.max(+slave.pornTypeRomantic, 0) || 0;
-	slave.pornTypePervert = Math.max(+slave.pornTypePervert, 0) || 0;
-	slave.pornTypeCaring = Math.max(+slave.pornTypeCaring, 0) || 0;
-	slave.pornTypeUnflinching = Math.max(+slave.pornTypeUnflinching, 0) || 0;
-	slave.pornTypeSizeQueen = Math.max(+slave.pornTypeSizeQueen, 0) || 0;
-	slave.pornTypeNeglectful = Math.max(+slave.pornTypeNeglectful, 0) || 0;
-	slave.pornTypeCumAddict = Math.max(+slave.pornTypeCumAddict, 0) || 0;
-	slave.pornTypeAnalAddict = Math.max(+slave.pornTypeAnalAddict, 0) || 0;
-	slave.pornTypeAttentionWhore = Math.max(+slave.pornTypeAttentionWhore, 0) || 0;
-	slave.pornTypeBreastGrowth = Math.max(+slave.pornTypeBreastGrowth, 0) || 0;
-	slave.pornTypeAbusive = Math.max(+slave.pornTypeAbusive, 0) || 0;
-	slave.pornTypeMalicious = Math.max(+slave.pornTypeMalicious, 0) || 0;
-	slave.pornTypeSelfHating = Math.max(+slave.pornTypeSelfHating, 0) || 0;
-	slave.pornTypeBreeder = Math.max(+slave.pornTypeBreeder, 0) || 0;
-	slave.pornTypeSub = Math.max(+slave.pornTypeSub, 0) || 0;
-	slave.pornTypeCumSlut = Math.max(+slave.pornTypeCumSlut, 0) || 0;
-	slave.pornTypeAnal = Math.max(+slave.pornTypeAnal, 0) || 0;
-	slave.pornTypeHumiliation = Math.max(+slave.pornTypeHumiliation, 0) || 0;
-	slave.pornTypeBoobs = Math.max(+slave.pornTypeBoobs, 0) || 0;
-	slave.pornTypeDom = Math.max(+slave.pornTypeDom, 0) || 0;
-	slave.pornTypeSadist = Math.max(+slave.pornTypeSadist, 0) || 0;
-	slave.pornTypeMasochist = Math.max(+slave.pornTypeMasochist, 0) || 0;
-	slave.pornTypePregnancy = Math.max(+slave.pornTypePregnancy, 0) || 0;
-};
-
-window.slaveRelationDatatypeCleanup = function slaveRelationDatatypeCleanup(slave) {
-	slave.mother = +slave.mother || 0;
-	slave.father = +slave.father || 0;
-	if (State.variables.familyTesting == 0) {
-		slave.relationTarget = Math.max(+slave.relationTarget, 0) || 0;
-	}
-	slave.canRecruit = Math.clamp(+slave.canRecruit, 0, 1) || 0;
-	slave.relationship = Math.clamp(+slave.relationship, -3, 5) || 0;
-	slave.relationshipTarget = Math.max(+slave.relationshipTarget, 0) || 0;
-	slave.rivalryTarget = Math.max(+slave.rivalryTarget, 0) || 0;
-	slave.rivalry = Math.clamp(+slave.rivalry, 0, 3) || 0;
-	slave.cloneID = +slave.cloneID || 0;
-};
-
-window.slaveSkillsDatatypeCleanup = function slaveSkillsDatatypeCleanup(slave) {
-	slave.oralSkill = Math.clamp(+slave.oralSkill, 0, 100) || 0;
-	slave.vaginalSkill = Math.clamp(+slave.vaginalSkill, 0, 100) || 0;
-	slave.analSkill = Math.clamp(+slave.analSkill, 0, 100) || 0;
-	slave.whoreSkill = Math.clamp(+slave.whoreSkill, 0, 100) || 0;
-	slave.entertainSkill = Math.clamp(+slave.entertainSkill, 0, 100) || 0;
-	slave.combatSkill = Math.clamp(+slave.combatSkill, 0, 1) || 0;
-	slave.skillHG = Math.clamp(+slave.skillHG, 0, 200) || 0;
-	slave.skillRC = Math.clamp(+slave.skillRC, 0, 200) || 0;
-	slave.skillBG = Math.clamp(+slave.skillBG, 0, 200) || 0;
-	slave.skillMD = Math.clamp(+slave.skillMD, 0, 200) || 0;
-	slave.skillDJ = Math.clamp(+slave.skillDJ, 0, 200) || 0;
-	slave.skillNU = Math.clamp(+slave.skillNU, 0, 200) || 0;
-	slave.skillTE = Math.clamp(+slave.skillTE, 0, 200) || 0;
-	slave.skillAT = Math.clamp(+slave.skillAT, 0, 200) || 0;
-	slave.skillMT = Math.clamp(+slave.skillMT, 0, 200) || 0;
-	slave.skillST = Math.clamp(+slave.skillST, 0, 200) || 0;
-	slave.skillMM = Math.clamp(+slave.skillMM, 0, 200) || 0;
-	slave.skillFA = Math.clamp(+slave.skillFA, 0, 200) || 0;
-	slave.skillWA = Math.clamp(+slave.skillWA, 0, 200) || 0;
-	slave.skillS = Math.clamp(+slave.skillS, 0, 200) || 0;
-	slave.skillE = Math.clamp(+slave.skillE, 0, 200) || 0;
-	slave.skillW = Math.clamp(+slave.skillW, 0, 200) || 0;
-};
-
-window.slaveStatCountDatatypeCleanup = function slaveStatCountDatatypeCleanup(slave) {
-	slave.oralCount = Math.max(+slave.oralCount, 0) || 0;
-	slave.vaginalCount = Math.max(+slave.vaginalCount, 0) || 0;
-	slave.analCount = Math.max(+slave.analCount, 0) || 0;
-	slave.publicCount = Math.max(+slave.publicCount, 0) || 0;
-	slave.mammaryCount = Math.max(+slave.mammaryCount, 0) || 0;
-	slave.penetrativeCount = Math.max(+slave.penetrativeCount, 0) || 0;
-	slave.pitKills = Math.max(+slave.pitKills, 0) || 0;
-	slave.milk = Math.max(+slave.milk, 0) || 0;
-	slave.cum = Math.max(+slave.cum, 0) || 0;
-	slave.births = Math.max(+slave.births, 0) || 0;
-	slave.birthsTotal = Math.max(+slave.birthsTotal, 0) || slave.births;
-	slave.laborCount = Math.max(+slave.laborCount, 0) || slave.birthsTotal;
-	slave.slavesFathered = Math.max(+slave.slavesFathered, 0) || 0;
-	slave.PCChildrenFathered = Math.max(+slave.PCChildrenFathered, 0) || 0;
-	slave.slavesKnockedUp = Math.max(+slave.slavesKnockedUp, 0) || 0;
-	slave.PCKnockedUp = Math.max(+slave.PCKnockedUp, 0) || 0;
-	slave.bodySwap = Math.max(+slave.bodySwap, 0) || 0;
-};
-
-window.slavePreferencesDatatypeCleanup = function slavePreferencesDatatypeCleanup(slave) {
-	slave.energy = Math.clamp(+slave.energy, 0, 100) || 0;
-	slave.need = Math.max(+slave.need, 0) || 0;
-	slave.attrXY = Math.clamp(+slave.attrXY, 0, 100) || 0;
-	slave.attrXX = Math.clamp(+slave.attrXX, 0, 100) || 0;
-	slave.attrKnown = Math.clamp(+slave.attrKnown, 0, 1) || 0;
-	slave.fetishStrength = Math.clamp(+slave.fetishStrength, 0, 100) || 0;
-	slave.fetishKnown = Math.clamp(+slave.fetishKnown, 0, 1) || 0;
-};
-
-window.slaveRulesDatatypeCleanup = function slaveRulesDatatypeCleanup(slave) {
-	if (typeof slave.standardPunishment !== "string") {
-		slave.standardPunishment = "situational";
-	}
-	if (typeof slave.standardReward !== "string") {
-		slave.standardReward = "situational";
-	}
-	if (slave.useRulesAssistant !== 0) {
-		slave.useRulesAssistant = 1;
-	}
-	slave.choosesOwnAssignment = Math.clamp(+slave.choosesOwnAssignment, 0) || 0;
-	slave.HGExclude = Math.clamp(+slave.HGExclude, 0, 1) || 0;
-	slave.choosesOwnChastity = Math.clamp(+slave.choosesOwnChastity, 0, 1) || 0;
-	slave.breedingMark = Math.clamp(+slave.breedingMark, 0, 1) || 0;
-	slave.rudeTitle = Math.clamp(+slave.rudeTitle, 0, 1) || 0;
-};
-
-window.slaveCustomStatsDatatypeCleanup = function slaveCustomStatsDatatypeCleanup(slave) {
-	if (typeof slave.customLabel !== "string") {
-		slave.customLabel = "";
-	}
-	if (typeof slave.customDesc !== "string") {
-		slave.customDesc = "";
-	}
-	if (typeof slave.customTitle !== "string") {
-		slave.customTitle = "";
-	}
-	if (typeof slave.customTitleLisp !== "string") {
-		slave.customTitleLisp = "";
-	}
-	if (typeof slave.customImage !== "string") {
-		slave.customImage = 0;
-	}
-};
-
-window.slaveMiscellaneousDatatypeCleanup = function slaveMiscellaneousDatatypeCleanup(slave) {
-	slave.weekAcquired = Math.max(+slave.weekAcquired, 0) || 0;
-	slave.newGamePlus = Math.clamp(+slave.newGamePlus, 0, 1) || 0;
-	slave.prestige = Math.clamp(+slave.prestige, 0, 3) || 0;
-	slave.devotion = Math.clamp(+slave.devotion, -100, 100) || 0;
-	slave.oldDevotion = Math.clamp(+slave.oldDevotion, -100, 100) || 0;
-	slave.trust = Math.clamp(+slave.trust, -100, 100) || 0;
-	slave.oldTrust = Math.clamp(+slave.oldTrust, -100, 100) || 0;
-	slave.fuckdoll = Math.clamp(+slave.fuckdoll, 0, 100) || 0;
-	slave.chem = Math.max(+slave.chem, 0) || 0;
-	slave.addict = Math.max(+slave.addict, 0) || 0;
-	slave.intelligence = Math.clamp(+slave.intelligence, -100, 100) || 0;
-	slave.intelligenceImplant = Math.clamp(+slave.intelligenceImplant, 0, 30) || 0;
-	slave.premature = Math.clamp(+slave.premature, 0, 1) || 0;
-	slave.tankBaby = Math.clamp(+slave.tankBaby, 0, 2) || 0;
-	slave.subTarget = Math.max(+slave.subTarget, 0) || 0;
-	slave.sentence = Math.max(+slave.sentence, 0) || 0;
-	slave.training = Math.clamp(+slave.training, 0, 150) || 0;
-	if (slave.indenture !== 0) {
-		slave.indenture = Math.max(+slave.indenture, -1) || -1;
-	}
-	slave.indentureRestrictions = Math.clamp(+slave.indentureRestriction, 0, 2) || 0;
-	slave.tired = Math.clamp(+slave.tired, 0, 1) || 0;
-	slave.hears = Math.clamp(+slave.hears, -2, 0) || 0;
-	if (typeof slave.earwear !== "string") {
-		slave.earwear = "none";
-	}
-	slave.heels = Math.clamp(+slave.heels, 0, 1) || 0;
-	slave.amp = Math.clamp(+slave.amp, -5, 1) || 0;
-	slave.PLimb = Math.clamp(+slave.PLimb, 0, 1) || 0;
-	if (slave.voice !== 0) {
-		slave.voice = Math.clamp(+slave.voice, 0, 3) || 1;
-	}
-	slave.electrolarynx = Math.clamp(+slave.electrolarynx, 0, 1) || 0;
-	slave.accent = Math.clamp(+slave.accent, 0, 3) || 0;
-	slave.missingEyes = Math.clamp(+slave.missingEyes, 0, 3) || 0;
-	slave.missingArms = Math.clamp(+slave.missingArms, 0, 3) || 0;
-	slave.missingLegs = Math.clamp(+slave.missingLegs, 0, 3) || 0;
-	if (typeof slave.ballType !== "string") {
-		slave.ballType = "human";
-	}
-	if (typeof slave.eggType !== "string") {
-		slave.eggType = "human";
-	}
-	if (typeof slave.origBodyOwner !== "string") {
-		slave.origBodyOwner = "";
-	}
-	slave.origBodyOwnerID = Math.max(+slave.origBodyOwnerID, 0) || 0;
-	if (typeof slave.death !== "string") {
-		slave.death = "";
-	}
-	if (slave.slaveCost !== 0) {
-		slave.slaveCost = Math.min(+slave.slaveCost, 1) || 1;
-	}
-	slave.lifetimeCashExpenses = Math.max(+slave.lifetimeCashExpenses, 0) || 0;
-	slave.lifetimeCashIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0;
-	slave.lastWeeksCashIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0;
-	slave.lifetimeRepExpenses = Math.max(+slave.lifetimeCashExpenses, 0) || 0;
-	slave.lifetimeRepIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0;
-	slave.lastWeeksRepIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0;
-};
-
-/* a lot of this may need to be removed */
-window.ChildDatatypeCleanup = function ChildDatatypeCleanup(child) {
-	childAgeDatatypeCleanup(child);
-	childPhysicalDatatypeCleanup(child);
-	childFaceDatatypeCleanup(child);
-	childHairDatatypeCleanup(child);
-	childBoobsDatatypeCleanup(child);
-	childButtDatatypeCleanup(child);
-	childPregnancyDatatypeCleanup(child);
-	childBellyDatatypeCleanup(child);
-	childGenitaliaDatatypeCleanup(child);
-	childImplantsDatatypeCleanup(child);
-	childPiercingsDatatypeCleanup(child);
-	childTattooDatatypeCleanup(child);
-	childCosmeticsDatatypeCleanup(child);
-	childDietDatatypeCleanup(child);
-	childPornDatatypeCleanup(child);
-	childRelationDatatypeCleanup(child);
-	childSkillsDatatypeCleanup(child);
-	childStatCountDatatypeCleanup(child);
-	childPreferencesDatatypeCleanup(child);
-	childRulesDatatypeCleanup(child);
-	childCustomStatsDatatypeCleanup(child);
-	childMiscellaneousDatatypeCleanup(child);
-	generatePronouns(child);
-};
-
-window.childAgeDatatypeCleanup = function childAgeDatatypeCleanup(child) {
-	const V = State.variables;
-
-	child.birthWeek = Math.clamp(+child.birthWeek, 0, 51) || 0;
-	if (child.age > 0) {
-		child.actualAge = Math.clamp(+child.actualAge, V.minimumChildAge, Infinity) || child.age; /* if undefined, this sets to child.age */
-	} else {
-		child.actualAge = Math.clamp(+child.actualAge, V.minimumChildAge, Infinity) || 18;
-		child.age = child.actualAge;
-	}
-	child.visualAge = Math.max(+child.visualAge, 0) || child.actualAge;
-	child.physicalAge = Math.max(+child.physicalAge, 0) || child.actualAge;
-	child.ovaryAge = Math.max(+child.ovaryAge, 0) || child.physicalAge;
-	child.pubertyAgeXX = Math.max(+child.pubertyAgeXX, 0) || V.fertilityAge;
-	child.pubertyAgeXY = Math.max(+child.pubertyAgeXY, 0) || V.potencyAge;
-};
-
-window.childPhysicalDatatypeCleanup = function childPhysicalDatatypeCleanup(child) {
-	if (typeof child.nationality !== "string") {
-		child.nationality = "child";
-	}
-	if (typeof child.race !== "string") {
-		nationalityToRace(child);
-	}
-	if (typeof child.origRace !== "string") {
-		child.origRace = child.race;
-	}
-	if (typeof child.skin !== "string") {
-		child.skin = "light";
-	}
-	if (typeof child.origSkin !== "string") {
-		child.origSkin = child.skin;
-	}
-	if (typeof child.minorInjury !== "string") {
-		child.minorInjury = 0;
-	}
-	child.health = Math.clamp(+child.health, -100, 100) || 0;
-	child.muscles = Math.clamp(+child.muscles, -100, 100) || 0;
-	child.weight = Math.clamp(+child.weight, -100, 200) || 0;
-	child.waist = Math.clamp(+child.waist, -100, 100) || 0;
-	child.height = Math.round(Math.max(+child.height, 0)) || Math.round(Height.mean(child));
-	child.shoulders = Math.clamp(+child.shoulders, -2, 2) || 0;
-	child.hips = Math.clamp(+child.hips, -2, 3) || 0;
-};
-
-window.childFaceDatatypeCleanup = function childFaceDatatypeCleanup(child) {
-	child.face = Math.clamp(+child.face, -100, 100) || 0;
-	if (typeof child.faceShape !== "string") {
-		child.faceShape = "normal";
-	}
-	child.eyes = Math.clamp(+child.eyes, -3, 1) || 1; /* if 0 or undefined, this sets to 1 */
-	if (typeof child.eyeColor !== "string") {
-		child.eyeColor = "brown";
-	}
-	if (typeof child.origEye !== "string") {
-		child.origEye = child.eyeColor;
-	}
-	if (typeof child.pupil !== "string") {
-		child.pupil = "circular";
-	}
-	if (typeof child.sclerae !== "string") {
-		child.sclerae = "white";
-	}
-	if (child.lips !== 0) {
-		child.lips = Math.clamp(+child.lips, 0, 100) || 15;
-	}
-};
-
-window.childHairDatatypeCleanup = function childHairDatatypeCleanup(child) {
-	if (typeof child.hColor !== "string") {
-		child.hColor = "brown";
-	}
-	if (typeof child.origHColor !== "string") {
-		child.origHColor = child.hColor;
-	}
-	if (child.hLength !== 0) {
-		child.hLength = Math.clamp(+child.hLength, 0, 300) || 60;
-	}
-	if (typeof child.hStyle !== "string") {
-		child.hStyle = "long";
-	}
-	child.haircuts = Math.clamp(+child.haircuts, 0, 1) || 0;
-	child.bald = Math.clamp(+child.bald, 0, 1) || 0;
-	if (typeof child.pubicHColor !== "string") {
-		child.pubicHColor = child.hColor;
-	}
-	if (typeof child.pubicHStyle !== "string") {
-		child.pubicHStyle = "neat";
-	}
-	if (typeof child.underArmHColor !== "string") {
-		child.underArmHColor = "child.hColor";
-	}
-	if (typeof child.underArmHStyle !== "string") {
-		child.underArmHStyle = "waxed";
-	}
-	if (typeof child.eyebrowHColor !== "string") {
-		child.eyebrowHColor = "child.hColor";
-	}
-	if (typeof child.eyebrowHStyle !== "string") {
-		child.eyebrowHStyle = "natural";
-	}
-	if (typeof child.eyebrowFullness !== "string") {
-		child.eyebrowFullness = "natural";
-	}
-};
-
-window.childBoobsDatatypeCleanup = function childBoobsDatatypeCleanup(child) {
-	child.boobs = Math.max(+child.boobs, 100) || 200;
-	if (typeof child.boobShape !== "string") {
-		child.boobShape = "normal";
-	}
-	if (typeof child.nipples !== "string") {
-		child.nipples = "cute";
-	}
-	if (typeof child.nipplesAccessory !== "string") {
-		child.nipplesAccessory = "none";
-	}
-	child.areolae = Math.clamp(+child.areolae, 0, 3) || 0;
-	if (typeof child.areolaeShape !== "string") {
-		child.areolaeShape = "circle";
-	}
-	child.lactation = Math.clamp(+child.lactation, 0, 2) || 0;
-	child.lactationAdaptation = Math.clamp(+child.lactationAdaptation, 0, 100) || 0;
-};
-
-window.childButtDatatypeCleanup = function childButtDatatypeCleanup(child) {
-	if (child.butt !== 0) {
-		child.butt = Math.clamp(+child.butt, 0, 20) || 1;
-	}
-	child.anus = Math.clamp(+child.anus, 0, 4) || 0;
-	child.analArea = Math.max(+child.analArea, 0) || 0;
-};
-
-window.childPregnancyDatatypeCleanup = function childPregnancyDatatypeCleanup(child) {
-	child.induce = Math.clamp(+child.induce, 0, 1) || 0;
-	child.labor = Math.clamp(+child.labor, 0, 1) || 0;
-	child.cSec = Math.clamp(+child.cSec, 0, 1) || 0;
-	child.prematureBirth = Math.clamp(+child.prematureBirth, 0, 1) || 0;
-	child.ovaries = Math.clamp(+child.ovaries, 0, 1) || 0;
-	child.vasectomy = Math.clamp(+child.vasectomy, 0, 1) || 0;
-	child.mpreg = Math.clamp(+child.mpreg, 0, 1) || 0;
-	if (child.pregAdaptation !== 0) {
-		child.pregAdaptation = Math.max(+child.pregAdaptation, 0) || 50;
-	}
-	child.pregSource = +child.pregSource || 0;
-	if (typeof child.pregControl !== "string") {
-		child.pregControl = "none";
-	}
-	WombNormalizePreg(child);
-};
-
-window.childBellyDatatypeCleanup = function childBellyDatatypeCleanup(child) {
-	child.bellySag = Math.max(+child.bellySag, 0) || 0;
-	child.bellySagPreg = Math.max(+child.bellySagPreg, 0) || child.bellySag;
-	SetBellySize(child);
-};
-
-window.childGenitaliaDatatypeCleanup = function childGenitaliaDatatypeCleanup(child) {
-	child.vagina = Math.clamp(+child.vagina, -1, 10) || 0;
-	child.vaginaLube = Math.clamp(+child.vaginaLube, 0, 2) || 0;
-	child.labia = Math.clamp(+child.labia, 0, 3) || 0;
-	child.clit = Math.clamp(+child.clit, 0, 5) || 0;
-	child.foreskin = Math.max(+child.foreskin, 0) || 0;
-	child.dick = Math.max(+child.dick, 0) || 0;
-	if (child.dick && child.prostate !== 0) {
-		child.prostate = Math.clamp(+child.prostate, 0, 3) || 1;
-	} else {
-		child.prostate = Math.clamp(+child.prostate, 0, 3) || 0;
-	}
-	child.balls = Math.max(+child.balls, 0) || 0;
-	if (child.scrotum !== 0) {
-		child.scrotum = Math.max(+child.scrotum, 0) || child.balls;
-	}
-};
-
-window.childImplantsDatatypeCleanup = function childImplantsDatatypeCleanup(child) {
-	child.ageImplant = Math.clamp(+child.ageImplant, 0, 1) || 0;
-	child.faceImplant = Math.clamp(+child.faceImplant, 0, 100) || 0;
-	child.lipsImplant = Math.clamp(+child.lipsImplant, 0, 100) || 0;
-	child.voiceImplant = Math.clamp(+child.voiceImplant, -1, 1) || 0;
-	child.boobsImplant = Math.max(+child.boobsImplant, 0) || 0;
-	child.boobsImplantType = Math.clamp(+child.boobsImplantType, 0, 1) || 0;
-	child.breastMesh = Math.clamp(+child.breastMesh, 0, 1) || 0;
-	child.buttImplant = Math.clamp(+child.buttImplant, 0, 3) || 0;
-	child.buttImplantType = Math.clamp(+child.buttImplantType, 0, 1) || 0;
-	child.earImplant = Math.clamp(+child.earImplant, 0, 1) || 0;
-};
-
-window.childPiercingsDatatypeCleanup = function childPiercingsDatatypeCleanup(child) {
-	child.earPiercing = Math.clamp(+child.earPiercing, 0, 2) || 0;
-	child.nosePiercing = Math.clamp(+child.nosePiercing, 0, 2) || 0;
-	child.eyebrowPiercing = Math.clamp(+child.eyebrowPiercing, 0, 2) || 0;
-	child.lipsPiercing = Math.clamp(+child.lipsPiercing, 0, 2) || 0;
-	child.tonguePiercing = Math.clamp(+child.tonguePiercing, 0, 2) || 0;
-	child.nipplesPiercing = Math.clamp(+child.nipplesPiercing, 0, 2) || 0;
-	child.areolaePiercing = Math.clamp(+child.areolaePiercing, 0, 2) || 0;
-	child.corsetPiercing = Math.clamp(+child.corsetPiercing, 0, 1) || 0;
-	child.navelPiercing = Math.clamp(+child.navelPiercing, 0, 2) || 0;
-	child.clitPiercing = Math.clamp(+child.clitPiercing, 0, 3) || 0;
-	child.vaginaPiercing = Math.clamp(+child.vaginaPiercing, 0, 2) || 0;
-	child.dickPiercing = Math.clamp(+child.dickPiercing, 0, 2) || 0;
-	child.anusPiercing = Math.clamp(+child.anusPiercing, 0, 2) || 0;
-};
-
-window.childTattooDatatypeCleanup = function childTattooDatatypeCleanup(child) {
-	if (typeof child.shouldersTat !== "string") {
-		child.shouldersTat = 0;
-	}
-	if (typeof child.lipsTat !== "string") {
-		child.lipsTat = 0;
-	}
-	if (typeof child.boobsTat !== "string") {
-		child.boobsTat = 0;
-	}
-	if (typeof child.armsTat !== "string") {
-		child.armsTat = 0;
-	}
-	if (typeof child.backTat !== "string") {
-		child.backTat = 0;
-	}
-	if (typeof child.stampTat !== "string") {
-		child.stampTat = 0;
-	}
-	if (typeof child.buttTat !== "string") {
-		child.buttTat = 0;
-	}
-	if (typeof child.vaginaTat !== "string") {
-		child.vaginaTat = 0;
-	}
-	if (typeof child.dickTat !== "string") {
-		child.dickTat = 0;
-	}
-	if (typeof child.anusTat !== "string") {
-		child.anusTat = 0;
-	}
-	if (typeof child.legsTat !== "string") {
-		child.legsTat = 0;
-	}
-	if (typeof child.bellyTat !== "string") {
-		child.bellyTat = 0;
-	}
-	if (typeof child.customTat !== "string") {
-		child.customTat = "";
-	}
-};
-
-window.childCosmeticsDatatypeCleanup = function childCosmeticsDatatypeCleanup(child) {
-	child.makeup = Math.clamp(+child.makeup, 0, 8) || 0;
-	child.nails = Math.clamp(+child.nails, 0, 9) || 0;
-	child.scars = Math.clamp(+child.scars, 0, 6) || 0;
-	child.choosesOwnClothes = Math.clamp(+child.choosesOwnClothes, 0, 1) || 0;
-	if (typeof child.clothes !== "string") {
-		child.clothes = "no clothing";
-	}
-	if (typeof child.collar !== "string") {
-		child.collar = "none";
-	}
-	if (typeof child.shoes !== "string") {
-		child.shoes = "none";
-	}
-	if (typeof child.eyewear !== "string") {
-		child.eyewear = "none";
-	}
-	child.brand = Math.clamp(+child.brand, 0, 1) || 0;
-	if (typeof child.brandLocation !== "string") {
-		child.brandLocation = 0;
-	}
-	if (typeof child.markings !== "string") {
-		child.markings = "none";
-	}
-	if (typeof child.bellyAccessory !== "string") {
-		child.bellyAccessory = "none";
-	}
-	if (typeof child.vaginalAccessory !== "string") {
-		child.vaginalAccessory = "none";
-	}
-	if (typeof child.dickAccessory !== "string") {
-		child.dickAccessory = "none";
-	}
-	if (typeof child.legAccessory !== "string") {
-		child.legAccessory = "none";
-	}
-	if (typeof child.buttplug !== "string") {
-		child.buttplug = "none";
-	}
-	if (typeof child.buttplugAttachment !== "string") {
-		child.buttplugAttachment = "none";
-	}
-	if (typeof child.headAccessory !== "string") {
-		child.headAccessory = "none";
-	}
-	if (typeof child.rearAccessory !== "string") {
-		child.rearAccessory = "none";
-	}
-	if (typeof child.backAccessory !== "string") {
-		child.backAccessory = "none";
-	}
-};
-
-window.childDietDatatypeCleanup = function childDietDatatypeCleanup(child) {
-	if (typeof child.diet !== "string") {
-		child.diet = "healthy";
-	}
-	child.dietCum = Math.clamp(+child.dietCum, 0, 2) || 0;
-	child.dietMilk = Math.clamp(+child.dietMilk, 0, 2) || 0;
-	child.onDiet = Math.clamp(+child.onDiet, 0, 1) || 0;
-	child.hormones = Math.clamp(+child.hormones, -2, 2) || 0;
-	child.hormoneBalance = Math.clamp(+child.hormoneBalance, -400, 400) || 0;
-	if (typeof child.drugs !== "string") {
-		child.drugs = "no drugs";
-	}
-	child.aphrodisiacs = Math.clamp(+child.aphrodisiacs, 0, 2) || 0;
-	child.curatives = Math.clamp(+child.curatives, 0, 2) || 0;
-};
-
-window.childPornDatatypeCleanup = function childPornDatatypeCleanup(child) {
-	child.pornFeed = Math.clamp(+child.pornFeed, 0, 1) || 0;
-	child.pornFame = Math.max(+child.pornFame, 0) || 0;
-	child.pornFameSpending = Math.max(+child.pornFameSpending, 0) || 0;
-	child.pornPrestige = Math.clamp(+child.pornPrestige, 0, 3) || 0;
-	if (typeof child.pornPrestigeDesc !== "string") {
-		child.pornPrestigeDesc = 0;
-	}
-	if (typeof child.pornFameType !== "string") {
-		child.pornFameType = "none";
-	}
-	if (typeof child.pornFocus !== "string") {
-		child.pornFocus = "none";
-	}
-	child.pornTypeGeneral = Math.max(+child.pornTypeGeneral, 0) || 0;
-	child.pornTypeFuckdoll = Math.max(+child.pornTypeFuckdoll, 0) || 0;
-	child.pornTypeRape = Math.max(+child.pornTypeRape, 0) || 0;
-	child.pornTypePreggo = Math.max(+child.pornTypePreggo, 0) || 0;
-	child.pornTypeBBW = Math.max(+child.pornTypeBBW, 0) || 0;
-	child.pornTypeGainer = Math.max(+child.pornTypeGainer, 0) || 0;
-	child.pornTypeStud = Math.max(+child.pornTypeStud, 0) || 0;
-	child.pornTypeLoli = Math.max(+child.pornTypeLoli, 0) || 0;
-	child.pornTypeDeepThroat = Math.max(+child.pornTypeDeepThroat, 0) || 0;
-	child.pornTypeStruggleFuck = Math.max(+child.pornTypeStruggleFuck, 0) || 0;
-	child.pornTypePainal = Math.max(+child.pornTypePainal, 0) || 0;
-	child.pornTypeTease = Math.max(+child.pornTypeTease, 0) || 0;
-	child.pornTypeRomantic = Math.max(+child.pornTypeRomantic, 0) || 0;
-	child.pornTypePervert = Math.max(+child.pornTypePervert, 0) || 0;
-	child.pornTypeCaring = Math.max(+child.pornTypeCaring, 0) || 0;
-	child.pornTypeUnflinching = Math.max(+child.pornTypeUnflinching, 0) || 0;
-	child.pornTypeSizeQueen = Math.max(+child.pornTypeSizeQueen, 0) || 0;
-	child.pornTypeNeglectful = Math.max(+child.pornTypeNeglectful, 0) || 0;
-	child.pornTypeCumAddict = Math.max(+child.pornTypeCumAddict, 0) || 0;
-	child.pornTypeAnalAddict = Math.max(+child.pornTypeAnalAddict, 0) || 0;
-	child.pornTypeAttentionWhore = Math.max(+child.pornTypeAttentionWhore, 0) || 0;
-	child.pornTypeBreastGrowth = Math.max(+child.pornTypeBreastGrowth, 0) || 0;
-	child.pornTypeAbusive = Math.max(+child.pornTypeAbusive, 0) || 0;
-	child.pornTypeMalicious = Math.max(+child.pornTypeMalicious, 0) || 0;
-	child.pornTypeSelfHating = Math.max(+child.pornTypeSelfHating, 0) || 0;
-	child.pornTypeBreeder = Math.max(+child.pornTypeBreeder, 0) || 0;
-	child.pornTypeSub = Math.max(+child.pornTypeSub, 0) || 0;
-	child.pornTypeCumSlut = Math.max(+child.pornTypeCumSlut, 0) || 0;
-	child.pornTypeAnal = Math.max(+child.pornTypeAnal, 0) || 0;
-	child.pornTypeHumiliation = Math.max(+child.pornTypeHumiliation, 0) || 0;
-	child.pornTypeBoobs = Math.max(+child.pornTypeBoobs, 0) || 0;
-	child.pornTypeDom = Math.max(+child.pornTypeDom, 0) || 0;
-	child.pornTypeSadist = Math.max(+child.pornTypeSadist, 0) || 0;
-	child.pornTypeMasochist = Math.max(+child.pornTypeMasochist, 0) || 0;
-	child.pornTypePregnancy = Math.max(+child.pornTypePregnancy, 0) || 0;
-};
-
-window.childRelationDatatypeCleanup = function childRelationDatatypeCleanup(child) {
-	child.mother = +child.mother || 0;
-	child.father = +child.father || 0;
-	if (State.variables.familyTesting == 0) {
-		child.relationTarget = Math.max(+child.relationTarget, 0) || 0;
-	}
-	child.canRecruit = Math.clamp(+child.canRecruit, 0, 1) || 0;
-	child.relationship = Math.clamp(+child.relationship, -3, 5) || 0;
-	child.relationshipTarget = Math.max(+child.relationshipTarget, 0) || 0;
-	child.rivalryTarget = Math.max(+child.rivalryTarget, 0) || 0;
-	child.rivalry = Math.clamp(+child.rivalry, 0, 3) || 0;
-};
-
-window.childSkillsDatatypeCleanup = function childSkillsDatatypeCleanup(child) {
-	child.oralSkill = Math.clamp(+child.oralSkill, 0, 100) || 0;
-	child.vaginalSkill = Math.clamp(+child.vaginalSkill, 0, 100) || 0;
-	child.analSkill = Math.clamp(+child.analSkill, 0, 100) || 0;
-	child.whoreSkill = Math.clamp(+child.whoreSkill, 0, 100) || 0;
-	child.entertainSkill = Math.clamp(+child.entertainSkill, 0, 100) || 0;
-	child.combatSkill = Math.clamp(+child.combatSkill, 0, 1) || 0;
-	child.skillHG = Math.clamp(+child.skillHG, 0, 200) || 0;
-	child.skillRC = Math.clamp(+child.skillRC, 0, 200) || 0;
-	child.skillBG = Math.clamp(+child.skillBG, 0, 200) || 0;
-	child.skillMD = Math.clamp(+child.skillMD, 0, 200) || 0;
-	child.skillDJ = Math.clamp(+child.skillDJ, 0, 200) || 0;
-	child.skillNU = Math.clamp(+child.skillNU, 0, 200) || 0;
-	child.skillTE = Math.clamp(+child.skillTE, 0, 200) || 0;
-	child.skillAT = Math.clamp(+child.skillAT, 0, 200) || 0;
-	child.skillMT = Math.clamp(+child.skillMT, 0, 200) || 0;
-	child.skillST = Math.clamp(+child.skillST, 0, 200) || 0;
-	child.skillMM = Math.clamp(+child.skillMM, 0, 200) || 0;
-	child.skillFA = Math.clamp(+child.skillFA, 0, 200) || 0;
-	child.skillWA = Math.clamp(+child.skillWA, 0, 200) || 0;
-	child.skillS = Math.clamp(+child.skillS, 0, 200) || 0;
-	child.skillE = Math.clamp(+child.skillE, 0, 200) || 0;
-	child.skillW = Math.clamp(+child.skillW, 0, 200) || 0;
-};
-
-window.childStatCountDatatypeCleanup = function childStatCountDatatypeCleanup(child) {
-	child.oralCount = Math.max(+child.oralCount, 0) || 0;
-	child.vaginalCount = Math.max(+child.vaginalCount, 0) || 0;
-	child.analCount = Math.max(+child.analCount, 0) || 0;
-	child.publicCount = Math.max(+child.publicCount, 0) || 0;
-	child.mammaryCount = Math.max(+child.mammaryCount, 0) || 0;
-	child.penetrativeCount = Math.max(+child.penetrativeCount, 0) || 0;
-	child.pitKills = Math.max(+child.pitKills, 0) || 0;
-	child.milk = Math.max(+child.milk, 0) || 0;
-	child.cum = Math.max(+child.cum, 0) || 0;
-	child.births = Math.max(+child.births, 0) || 0;
-	child.birthsTotal = Math.max(+child.birthsTotal, 0) || child.births;
-	child.laborCount = Math.max(+child.laborCount, 0) || child.birthsTotal;
-	child.childsFathered = Math.max(+child.childsFathered, 0) || 0;
-	child.PCChildrenFathered = Math.max(+child.PCChildrenFathered, 0) || 0;
-	child.childsKnockedUp = Math.max(+child.childsKnockedUp, 0) || 0;
-	child.PCKnockedUp = Math.max(+child.PCKnockedUp, 0) || 0;
-	child.bodySwap = Math.max(+child.bodySwap, 0) || 0;
-};
-
-window.childPreferencesDatatypeCleanup = function childPreferencesDatatypeCleanup(child) {
-	child.energy = Math.clamp(+child.energy, 0, 100) || 0;
-	child.need = Math.max(+child.need, 0) || 0;
-	child.attrXY = Math.clamp(+child.attrXY, 0, 100) || 0;
-	child.attrXX = Math.clamp(+child.attrXX, 0, 100) || 0;
-	child.attrKnown = Math.clamp(+child.attrKnown, 0, 1) || 0;
-	child.fetishStrength = Math.clamp(+child.fetishStrength, 0, 100) || 0;
-	child.fetishKnown = Math.clamp(+child.fetishKnown, 0, 1) || 0;
-};
-
-window.childRulesDatatypeCleanup = function childRulesDatatypeCleanup(child) {
-	child.breedingMark = Math.clamp(+child.breedingMark, 0, 1) || 0;
-	child.rudeTitle = Math.clamp(+child.rudeTitle, 0, 1) || 0;
-};
-
-window.childCustomStatsDatatypeCleanup = function childCustomStatsDatatypeCleanup(child) {
-	if (typeof child.customLabel !== "string") {
-		child.customLabel = "";
-	}
-	if (typeof child.customDesc !== "string") {
-		child.customDesc = "";
-	}
-	if (typeof child.customTitle !== "string") {
-		child.customTitle = "";
-	}
-	if (typeof child.customTitleLisp !== "string") {
-		child.customTitleLisp = "";
-	}
-	if (typeof child.customImage !== "string") {
-		child.customImage = 0;
-	}
-};
-
-window.childMiscellaneousDatatypeCleanup = function childMiscellaneousDatatypeCleanup(child) {
-	child.weekAcquired = Math.max(+child.weekAcquired, 0) || 0;
-	child.prestige = Math.clamp(+child.prestige, 0, 3) || 0;
-	child.devotion = Math.clamp(+child.devotion, -100, 100) || 0;
-	child.oldDevotion = Math.clamp(+child.oldDevotion, -100, 100) || 0;
-	child.trust = Math.clamp(+child.trust, -100, 100) || 0;
-	child.oldTrust = Math.clamp(+child.oldTrust, -100, 100) || 0;
-	child.chem = Math.max(+child.chem, 0) || 0;
-	child.addict = Math.max(+child.addict, 0) || 0;
-	child.intelligence = Math.clamp(+child.intelligence, -100, 100) || 0;
-	child.intelligenceImplant = Math.clamp(+child.intelligenceImplant, 0, 30) || 0;
-	child.premature = Math.clamp(+child.premature, 0, 1) || 0;
-	child.training = Math.clamp(+child.training, 0, 150) || 0;
-	child.tired = Math.clamp(+child.tired, 0, 1) || 0;
-	child.hears = Math.clamp(+child.hears, -2, 0) || 0;
-	if (typeof child.earwear !== "string") {
-		child.earwear = "none";
-	}
-	if (child.voice !== 0) {
-		child.voice = Math.clamp(+child.voice, 0, 3) || 1;
-	}
-	child.electrolarynx = Math.clamp(+child.electrolarynx, 0, 1) || 0;
-	child.accent = Math.clamp(+child.accent, 0, 3) || 0;
-};
-
-window.PCDatatypeCleanup = function PCDatatypeCleanup() {
-	const V = State.variables;
-	const PC = V.PC;
-
-	if (PC.title !== 0) {
-		PC.title = Math.clamp(+PC.title, 0, 1) || 1;
-	}
-	if (PC.dick !== 0) {
-		PC.dick = Math.clamp(+PC.dick, 0, 1) || 1;
-	}
-	PC.vagina = Math.clamp(+PC.vagina, 0, 1) || 0;
-	PC.belly = Math.max(+PC.belly, 0) || 0;
-	PC.pregMood = Math.clamp(+PC.pregMood, 0, 2) || 0;
-	PC.labor = Math.clamp(+PC.labor, 0, 1) || 0;
-	PC.births = Math.max(+PC.births, 0) || 0;
-	PC.boobs = Math.clamp(+PC.boobs, 0, 1) || 0;
-	PC.boobsBonus = Math.clamp(+PC.boobsBonus, -3, 3) || 0;
-	PC.boobsImplant = Math.clamp(+PC.boobsImplant, 0, 1) || 0;
-	PC.butt = Math.clamp(+PC.butt, 0, 3) || 0;
-	PC.buttImplant = Math.clamp(+PC.buttImplant, 0, 1) || 0;
-	PC.balls = Math.clamp(+PC.balls, 0, 3) || 0;
-	PC.ballsImplant = Math.clamp(+PC.ballsImplant, 0, 4) || 0;
-	PC.degeneracy = Math.max(+PC.degeneracy, 0) || 0;
-	PC.birthWeek = Math.clamp(+PC.birthWeek, 0, 51) || 0;
-	if (PC.sexualEnergy !== 0 ) {
-		PC.sexualEnergy = +PC.sexualEnergy || 4;
-	}
-	PC.refreshmentType = Math.clamp(+PC.refreshmentType, 0, 6) || 0;
-	PC.trading = Math.clamp(+PC.trading, -100, 100) || 0;
-	PC.warfare = Math.clamp(+PC.warfare, -100, 100) || 0;
-	PC.slaving = Math.clamp(+PC.slaving, -100, 100) || 0;
-	PC.engineering = Math.clamp(+PC.engineering, -100, 100) || 0;
-	PC.medicine = Math.clamp(+PC.medicine, -100, 100) || 0;
-	PC.hacking = Math.clamp(+PC.hacking, -100, 100) || 0;
-	PC.cumTap = Math.max(+PC.cumTap, 0) || 0;
-	PC.mother = +PC.mother || 0;
-	PC.father = +PC.father || 0;
-	PC.birthElite = Math.max(+PC.birthElite, 0) || 0;
-	PC.birthMaster = Math.max(+PC.birthMaster, 0) || 0;
-	PC.birthDegenerate = Math.max(+PC.birthDegenerate, 0) || 0;
-	PC.birthClient = Math.max(+PC.birthClient, 0) || 0;
-	PC.birthOther = Math.max(+PC.birthOther, 0) || 0;
-	PC.birthArcOwner = Math.max(+PC.birthArcOwner, 0) || 0;
-	PC.birthCitizen = Math.max(+PC.birthCitizen, 0) || 0;
-	PC.birthSelf = Math.max(+PC.birthSelf, 0) || 0;
-	PC.birthLab = Math.max(+PC.birthLab, 0) || 0;
-	PC.slavesFathered = Math.max(+PC.slavesFathered, 0) || 0;
-	PC.slavesKnockedUp = Math.max(+PC.slavesKnockedUp, 0) || 0;
-	PC.intelligence = 100;
-	PC.face = 100;
-	PC.actualAge = Math.clamp(+PC.actualAge, 14, 80) || 35;
-	PC.physicalAge = Math.clamp(+PC.physicalAge, 14, 80) || PC.actualAge;
-	PC.visualAge = Math.clamp(+PC.visualAge, 14, 80) || PC.actualAge;
-	PC.ovaryAge = Math.clamp(+PC.ovaryAge, 14, 80) || PC.physicalAge;
-	if (V.playerAging !== 0) {
-		V.playerAging = Math.clamp(+V.playerAging, 0, 2) || 2;
-	}
-	PC.newVag = Math.clamp(+PC.newVag, 0, 1) || 0;
-	PC.fertDrugs = Math.clamp(+PC.fertDrugs, 0, 1) || 0;
-	PC.forcedFertDrugs = Math.max(+PC.forcedFertDrugs, 0) || 0;
-	PC.staminaPills = Math.clamp(+PC.staminaPills, 0, 1) || 0;
-	PC.storedCum = Math.max(+PC.storedCum, 0) || 0;
-	PC.mpreg = 0; /* So knockMeUp() may be used with the PC */
-	PC.lactation = Math.max(+PC.lactation, 0) || 0;
-	PC.lactationDuration = Math.max(+PC.lactationDuration, 0) || 0;
-	generatePlayerPronouns(PC);
-
-	if (PC.age !== undefined) {
-		delete PC.age;
-	}
-	if (PC.indenture !== undefined) {
-		delete PC.indenture;
-	}
-	if (PC.indentureRestrictions !== undefined) {
-		delete PC.indentureRestrictions;
-	}
-
-	/* None of these are in use */
-	PC.bellyPreg = PC.belly;
-	PC.ageImplant = 0;
-	PC.voiceImplant = 0;
-	PC.accent = 0;
-	PC.shoulders = 0;
-	PC.shouldersImplant = 0;
-};
-
-window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() {
-	const V = State.variables;
-
-	V.economy = Math.max(+V.economy, 20) || 100;
-	V.difficultySwitch = Math.clamp(+V.difficultySwitch, 0, 1) || 0;
-	V.localEcon = Math.max(+V.localEcon, 20) || V.economy;
-	V.econRate = Math.clamp(+V.econRate, 1, 4) || 2;
-	V.slaveCostFactor = Math.max(+V.slaveCostFactor, 0) || 1;
-	if (V.menialSupplyFactor !== 0) {
-		V.menialSupplyFactor = Math.clamp(+V.menialSupplyFactor, -50000, 50000) || (1 - V.slaveCostFactor) * 400 * 1000 * 0.5; /* (1 - slaveCostFactor) * price elasticity * base price * 0.5 */
-	}
-	if (V.menialDemandFactor !== 0) {
-		V.menialDemandFactor = Math.clamp(+V.menialDemandFactor, -50000, 50000) || -V.menialSupplyFactor;
-	}
-	V.slaveCostRandom = Math.clamp(+V.slaveCostRandom, -3, 3) || 0;
-	V.demandTimer = Math.max(+V.demandTimer, 0) || 0;
-	V.elapsedDemandTimer = Math.max(+V.elapsedDemandTimer, 0) || 0;
-	V.supplyTimer = Math.max(+V.supplyTimer, 0) || 0;
-	V.elapsedSupplyTimer = Math.max(+V.elapsedSupplyTimer, 0) || 0;
-	V.deltaSupply = Math.clamp(+V.deltaSupply, -3000, 3000) || 0;
-	V.deltaDemand = Math.clamp(+V.deltaDemand, -3000, 3000) || 0;
-	V.econWeatherDamage = Math.max(+V.econWeatherDamage, 0) || 0;
-	V.disasterResponse = Math.clamp(+V.disasterResponse, 0, 2) || 0;
-	V.antiWeatherFreeze = Math.clamp(+V.antiWeatherFreeze, 0, 2) || 0;
-	V.GDP = Math.max(+V.GDP, 1) || 278.6;
-	V.NPCSlaves = Math.max(+V.NPCSlaves, 0) || 0;
-	V.visitors = Math.max(+V.visitors, 0) || 0;
-
-	V.LSCBase = Math.max(+V.LSCBase, 0) || 800; /* nowhere modified */
-	V.rentEffectL = Math.max(+V.rentEffectL, 0) || 1;
-	if (V.lowerClass !== 0) {
-		V.lowerClass = Math.max(+V.lowerClass, 0) || 3120;
-	}
-	if (V.LCRent !== 0) {
-		V.LCRent =  Math.max(+V.LCRent, 0) || 20;
-	}
-
-	V.MCBase = Math.max(+V.MCBase, 0) || 200; /* nowhere modified */
-	V.rentEffectM = Math.max(+V.rentEffectM, 0) || 1;
-	if (V.middleClass !== 0) {
-		V.middleClass = Math.max(+V.middleClass, 0) || 890;
-	}
-	if (V.MCRent !== 0) {
-		V.MCRent =  Math.max(+V.MCRent, 0) || 50;
-	}
-
-	V.UCBase = Math.max(+V.UCBase, 0) || 40; /* nowhere modified */
-	V.rentEffectU = Math.max(+V.rentEffectU, 0) || 1;
-	if (V.upperClass !== 0) {
-		V.upperClass = Math.max(+V.upperClass, 0) || 200;
-	}
-	if (V.UCRent !== 0) {
-		V.UCRent =  Math.max(+V.UCRent, 0) || 175;
-	}
-
-	V.TCBase = Math.max(+V.TCBase, 0) || 20; /* nowhere modified */
-	V.rentEffectT = Math.max(+V.rentEffectT, 0) || 1;
-	if (V.topClass !== 0) {
-		V.topClass = Math.max(+V.topClass, 0) || 38;
-	}
-	if (V.TCRent !== 0) {
-		V.TCRent =  Math.max(+V.TCRent, 0) || 650;
-	}
-};
-
-window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() {
-	const V = State.variables;
-
-	V.arcologies[0].prosperity = Math.clamp(+V.arcologies[0].prosperity, 1, 300) || 1;
-	V.AProsperityCap = Math.max(+V.AProsperityCap, 0) || 0;
-	V.arcologies[0].ownership = Math.clamp(+V.arcologies[0].ownership, 0, 100) || 0;
-	V.arcologies[0].minority = Math.clamp(+V.arcologies[0].minority, 0, 100) || 0;
-
-	V.menials = Math.max(+V.menials, 0) || 0;
-	V.fuckdolls = Math.max(+V.fuckdolls, 0) || 0;
-	V.menialBioreactors = Math.max(+V.menialBioreactors, 0) || 0;
-
-	V.ACitizens = Math.max(+V.ACitizens, 0) || 0;
-	V.ASlaves = Math.max(+V.ASlaves, 0) || V.NPCSlaves + V.menials + V.fuckdolls + V.menialBioreactors;
-	V.shelterAbuse = Math.max(+V.shelterAbuse, 0) || 0;
-
-	V.assistant = Math.clamp(+V.assistant, 0, 1) || 0;
-	if (typeof V.assistantPronouns != "object") {
-		V.assistantPronouns = {};
-	}
-	if (typeof V.marketAssistantPronouns != "object") {
-		V.marketAssistantPronouns = {};
-	}
-	generateAssistantPronouns();
-
-	V.foodCost = Math.trunc(2500/V.economy);
-	V.drugsCost = Math.trunc(10000/V.economy);
-	V.rulesCost = Math.trunc(10000/V.economy);
-	V.modCost = Math.trunc(5000/V.economy);
-	V.surgeryCost = Math.trunc(30000/V.economy);
-	V.facilityCost = +V.facilityCost || 100;
-	V.policyCost = +V.policyCost || 5000;
-
-	V.TSS.studentsBought = Math.max(+V.TSS.studentsBought, 0) || 0;
-	V.TSS.schoolProsperity = Math.clamp(+V.TSS.schoolProsperity, -10, 10) || 0;
-	V.GRI.studentsBought = Math.max(+V.GRI.studentsBought, 0) || 0;
-	V.GRI.schoolProsperity = Math.clamp(+V.GRI.schoolProsperity, -10, 10) || 0;
-	V.SCP.studentsBought = Math.max(+V.SCP.studentsBought, 0) || 0;
-	V.SCP.schoolProsperity = Math.clamp(+V.SCP.schoolProsperity, -10, 10) || 0;
-	V.LDE.studentsBought = Math.max(+V.LDE.studentsBought, 0) || 0;
-	V.LDE.schoolProsperity = Math.clamp(+V.LDE.schoolProsperity, -10, 10) || 0;
-	V.TGA.studentsBought = Math.max(+V.TGA.studentsBought, 0) || 0;
-	V.TGA.schoolProsperity = Math.clamp(+V.TGA.schoolProsperity, -10, 10) || 0;
-	V.HA.studentsBought = Math.max(+V.HA.studentsBought, 0) || 0;
-	V.HA.schoolProsperity = Math.clamp(+V.HA.schoolProsperity, -10, 10) || 0;
-	V.TCR.studentsBought = Math.max(+V.TCR.studentsBought, 0) || 0;
-	V.TCR.schoolProsperity = Math.clamp(+V.TCR.schoolProsperity, -10, 10) || 0;
-	V.TFS.studentsBought = Math.max(+V.TFS.studentsBought, 0) || 0;
-	V.TFS.schoolProsperity = Math.clamp(+V.TFS.schoolProsperity, -10, 10) || 0;
-};
-
-window.FacilityNameCleanup = function FacilityNameCleanup() {
-	const V = State.variables;
-	V.arcologies[0].name = V.arcologies[0].name || "Arcology X-4";
-	V.brothelName = V.brothelName || "the Brothel";
-	V.brothelNameCaps = V.brothelNameCaps || "The Brothel";
-	V.dairyName = V.dairyName || "the Dairy";
-	V.dairyNameCaps = V.dairyNameCaps || "The Dairy";
-	V.clubName = V.clubName || "the Club";
-	V.clubNameCaps = V.clubNameCaps || "The Club";
-	V.servantsQuartersName = V.servantsQuartersName || "the Servants' Quarters";
-	V.servantsQuartersNameCaps = V.servantsQuartersNameCaps || "The Servants' Quarters";
-	V.schoolroomName = V.schoolroomName || "the Schoolroom";
-	V.schoolroomNameCaps = V.schoolroomNameCaps || "The Schoolroom";
-	V.spaName = V.spaName || "the Spa";
-	V.spaNameCaps = V.spaNameCaps || "The Spa";
-	V.nurseryName = V.nurseryName || "the Nursery";
-	V.nurseryNameCaps = V.nurseryNameCaps || "The Nursery";
-	V.clinicName = V.clinicName || "the Clinic";
-	V.clinicNameCaps = V.clinicNameCaps || "The Clinic";
-	V.arcadeName = V.arcadeName || "the Arcade";
-	V.arcadeNameCaps = V.arcadeNameCaps || "The Arcade";
-	V.cellblockName = V.cellblockName || "the Cellblock";
-	V.cellblockNameCaps = V.cellblockNameCaps || "The Cellblock";
-	V.masterSuiteName = V.masterSuiteName || "the Master Suite";
-	V.masterSuiteNameCaps = V.masterSuiteNameCaps || "The Master Suite";
-	V.HGSuiteName = V.HGSuiteName || "the Head Girl Suite";
-	V.HGSuiteNameCaps = V.HGSuiteNameCaps || "The Head Girl Suite";
-	V.pitName = V.pitName || "the Pit";
-	V.pitNameCaps = V.pitNameCaps || "The Pit";
-	V.incubatorName = V.incubatorName || "the Incubator";
-	V.incubatorNameCaps = V.incubatorNameCaps || "The Incubator";
-	V.farmyardName = V.farmyardName || "the Farmyard";
-	V.farmyardNameCaps = V.farmyardNameCaps || "The Farmyard";
-};
-
-/*:: Slave Cost JS [script]*/
-
-window.Beauty = (function() {
-	"use strict";
-	let V, arcology, beauty;
-
-	function Beauty(slave) {
-		V = State.variables;
-		arcology = V.arcologies[0];
-		modScore(slave);
-
-		beauty = 120;
-		calcInitBeauty(slave);
-		if (slave.fuckdoll === 0) {
-			beauty += 30;
-			calcFaceBeauty(slave);
-			calcTeethBeauty(slave);
-			calcModBeauty(slave);
-			calcCosmeticsBeauty(slave);
-			calcFSNotFuckdollBeauty(slave);
-			calcMiscNotFuckdollBeauty(slave);
-		}
-		if (slave.dick > 0) {
-			calcDickBeauty(slave);
-		}
-		if (slave.balls > 0) {
-			calcBallsBeauty(slave);
-		}
-		calcButtBeauty(slave);
-		calcHipsBeauty(slave);
-		calcBoobsBeauty(slave);
-		calcWeightBeauty(slave);
-		calcMusclesBeauty(slave);
-		calcBodyHairBeauty(slave);
-		calcImplantBeauty(slave);
-		if (arcology.FSRepopulationFocus > 40) {
-			calcRepopulationPregBeauty(slave);
-		} else if (arcology.FSRepopulationFocusPregPolicy === 1) {
-			calcTrendyPregBeauty(slave);
-		} else if (arcology.FSRestart > 40) {
-			calcRestartPregBeauty(slave);
-		}
-		if (arcology.FSRepopulationFocusMilfPolicy === 1) {
-			calcTrendyMilfBeauty(slave);
-		}
-		if (arcology.FSGenderRadicalistLawFuta !== 0) {
-			calcFutaLawBeauty(slave);
-		}
-		calcBodyProportionBeauty(slave);
-		calcVoiceBeauty(slave);
-		if (slave.amp !== 0) {
-			calcLimbsBeauty(slave);
-		}
-		calcPubertyBeauty(slave);
-		calcFSMiscBeauty(slave);
-
-		calcPurityBeauty(slave);
-		calcPhysiqueBeauty(slave);
-		if (arcology.FSSlimnessEnthusiastLaw === 1) {
-			calcSlimBeauty(slave);
-		}
-		if (arcology.FSGenderFundamentalistLawBeauty + arcology.FSGenderRadicalistLawBeauty > 0) {
-			calcGenderLawBeauty(slave);
-		}
-
-		calcMultipliersBeauty(slave);
-		beauty = Math.max(1, Math.trunc(0.5*beauty));
-
-		return beauty;
-	};
-
-	function calcInitBeauty(slave) {
-		beauty -= slave.waist/20;
-		beauty -= slave.muscles/30;
-		beauty += slave.lips/10;
-		beauty += slave.clit;
-		beauty += (slave.height-160)/10;
-		beauty += 2*slave.hips;
-		if (slave.anus > 3) {
-			beauty -= 10 + (slave.anus*2); /*-20*/
-		}
-		if (slave.vagina > 3) {
-			beauty -= 10 + (slave.vagina*2); /*-20*/
-		}
-
-	};
-
-	function calcFaceBeauty(slave) {
-		beauty += slave.face/5;
-		switch (slave.faceShape) {
-			case "masculine":
-				if (arcology.FSGenderRadicalist !== "unset") {
-					beauty -= (2 - (arcology.FSGenderRadicalist/25))*(slave.face/30);
-				} else if (arcology.FSGenderFundamentalist !== "unset") {
-					beauty -= (2 + (arcology.FSGenderFundamentalist/25))*(slave.face/30);
-				} else {
-					beauty -= 2*(slave.face/30);
-				}
-				break;
-			case "androgynous":
-				if (arcology.FSGenderRadicalist !== "unset") {
-					beauty += 2 - ((1 - (arcology.FSGenderRadicalist/25))*(slave.face/30));
-				} else if (arcology.FSGenderFundamentalist !== "unset") {
-					beauty += 2 - ((1 + (arcology.FSGenderFundamentalist/25))*(slave.face/30));
-				} else {
-					beauty += 2 - (slave.face/30);
-				}
-				break;
-			case "exotic":
-				beauty += 2*(slave.face/30);
-				break;
-			case "sensual":
-				beauty += 2 + (slave.face/30);
-				break;
-			case "cute":
-				beauty += 8/3;
-				break;
-		}
-	};
-
-	function calcTeethBeauty(slave) {
-		switch (slave.teeth) {
-			case "crooked":
-				beauty -= 3;
-				break;
-			case "gapped":
-				if (slave.faceShape == "cute") {
-					beauty += 1;
-				} else {
-					beauty -= 1;
-				}
-				break;
-			case "braces":
-			case "cosmetic braces":
-				if (slave.visualAge > 14 && slave.visualAge < 18) {
-					beauty += 1;
-				}
-				break;
-			case "removable":
-			case "pointy":
-			case "baby":
-			case "mixed":
-				beauty -= 1;
-				break;
-		}
-	};
-
-	function calcModBeauty(slave) {
-		if (arcology.FSTransformationFetishist > 20 || arcology.FSDegradationist > 20) {
-			if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
-				beauty += 8 + (V.modScore*0.25);
-			} else if (V.modScore > 7) {
-				beauty += V.modScore - 7;
-			}
-		} else if (arcology.FSBodyPurist > 20 || arcology.FSPaternalist > 20) {
-			if (V.modScore <= 7) {
-				beauty += 10;
-			} else {
-				beauty += 15 - V.modScore;
-			}
-		} else {
-			if (V.modScore <= 7) {
-				beauty += V.modScore;
-			} else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
-				beauty += 11;
-			} else {
-				beauty += 7 + (0.5*(V.modScore - 7));
-			}
-		}
-	};
-
-	function calcCosmeticsBeauty(slave) {
-		if (slave.brand !== 0) {
-			if (V.rep > 10000) {
-				beauty += 1;
-			} else if (V.rep < 5000) {
-				beauty -= 1;
-			}
-		}
-		if (slave.minorInjury !== 0) {
-			beauty -= 2;
-		}
-		if (slave.cSec === 1) {
-			beauty -= 2;
-		}
-		if (slave.nails > 0) {
-			beauty += 1;
-		}
-		if (slave.makeup > 0) {
-			beauty += 1;
-		}
-		switch (slave.markings) {
-			case "beauty mark":
-				if (slave.face > 40) {
-					beauty += 6;
-				} else if (slave.face < -10) {
-					beauty -= 6;
-				}
-				break;
-			case "birthmark":
-				if (slave.prestige > 0 || slave.pornPrestige > 1) {
-					beauty += 4;
-				} else {
-					beauty -= 4;
-				}
-				break;
-			case "freckles":
-			case "heavily freckled":
-				if (slave.skin === "pale" || slave.skin === "fair") {
-					beauty += 2;
-					if (slave.hColor === "red") {
-						beauty += 2;
-					}
-				}
-				break;
-		}
-	};
-
-	function calcFSNotFuckdollBeauty(slave) {
-		if (arcology.FSSupremacist !== "unset") {
-			if (slave.race === arcology.FSSupremacistRace) {
-				beauty += (arcology.FSSupremacist/3) + (arcology.FSSupremacistLawME*10);
-			}
-		}
-		if (arcology.FSSubjugationist !== "unset") {
-			if (slave.race === arcology.FSSubjugationistRace) {
-				beauty -= (arcology.FSSubjugationist/2) - (arcology.FSSubjugationistLawME*10);
-			}
-		}
-		if (arcology.FSDegradationist !== "unset") {
-			beauty -= (arcology.FSDegradationist/10)*((slave.intelligence + slave.intelligenceImplant)/20);
-		}
-		if (arcology.FSGenderFundamentalistLawBimbo === 1) {
-			beauty -= (slave.intelligence + slave.intelligenceImplant)/2;
-		}
-		if (arcology.FSYouthPreferentialist !== "unset") {
-			beauty += (30 - slave.visualAge)/(30 - V.minimumSlaveAge)*((arcology.FSYouthPreferentialist/2) + (arcology.FSYouthPreferentialistLaw*10)); /*max 60*/
-		} else if (arcology.FSMaturityPreferentialist !== "unset") {
-			if (V.retirementAge > 30) {
-				beauty += (30 - slave.visualAge)/(30 - V.retirementAge)*((arcology.FSMaturityPreferentialist/2) + (arcology.FSMaturityPreferentialistLaw*10)); /*max 60, problems if retirementAge is 30 or under*/
-			}
-		}
-		if (arcology.FSBodyPurist > 20) { /*bonus for virgin slaves*/
-			if (slave.vagina === 0 && slave.vaginalCount === 0) {
-				beauty += 30*(arcology.FSBodyPurist/100);
-			}
-			if (slave.anus === 0 && slave.analCount === 0) {
-				beauty += 30*(arcology.FSBodyPurist/100);
-			}
-		}
-		if (arcology.FSEdoRevivalist !== "unset") {
-			if (slave.nationality === "Japanese" || slave.nationality === "Edo Revivalist") {
-				beauty += arcology.FSEdoRevivalist/2;
-			} else if (slave.race === "asian") {
-				beauty += arcology.FSEdoRevivalist/5;
-			} else {
-				beauty -= arcology.FSEdoRevivalist/4;
-			}
-			if (V.language === "Japanese" && canTalk(slave)) {
-				if (slave.accent > 1) {
-					beauty -= arcology.FSEdoRevivalist/2;
-				} else if (slave.accent > 0) {
-					beauty -= arcology.FSEdoRevivalist/5;
-				} else {
-					beauty += arcology.FSEdoRevivalist/10;
-				}
-			}
-		} else if (arcology.FSChineseRevivalist !== "unset") {
-			if (slave.nationality === "Chinese" || slave.nationality === "Ancient Chinese Revivalist") {
-				beauty += arcology.FSChineseRevivalist/2;
-			} else if (slave.race === "asian") {
-				beauty += arcology.FSChineseRevivalist/5;
-			} else {
-				beauty -= arcology.FSChineseRevivalist/4;
-			}
-			if (V.language === "Chinese" && canTalk(slave)) {
-				if (slave.accent > 1) {
-					beauty -= arcology.FSChineseRevivalist/2;
-				} else if (slave.accent > 0) {
-					beauty -= arcology.FSChineseRevivalist/5;
-				} else {
-					beauty += arcology.FSChineseRevivalist/10;
-				}
-			}
-		}
-	};
-
-	function calcMiscNotFuckdollBeauty(slave) {
-		beauty += Math.min(slave.health, 100)/5;
-		beauty += slave.voice;
-		beauty += (slave.intelligence + slave.intelligenceImplant)/10;
-		beauty += slave.entertainSkill/10;
-		beauty += slave.whoreSkill/10;
-		beauty -= 3*slave.visualAge;
-		if (setup.entertainmentCareers.includes(slave.career)) {
-			beauty += 20;
-		} else if (V.week - slave.weekAcquired >= 20 && slave.entertainSkill >= 100) {
-			beauty += 10;
-		}
-		if (slave.race === "white" && slave.origRace === "white") {
-			beauty += 4;
-		} else if (slave.race === "white") {
-			beauty += 2;
-		}
-	};
-
-	function calcDickBeauty(slave) {
-		if (arcology.FSAssetExpansionist > 20 && arcology.FSGenderFundamentalist === "unset") {
-			if (slave.dick >= 20) {
-				beauty += 17 + (slave.dick*(arcology.FSAssetExpansionist/500)); /*23*/
-			} else if (slave.dick >= 10) {
-				beauty += 10 + (slave.dick*(arcology.FSAssetExpansionist/300)); /*16.3*/
-			} else if (slave.dick > 6) {
-				beauty += slave.dick*(1 + (arcology.FSAssetExpansionist/100)); /*10*/
-			}
-		} else if (arcology.FSGenderFundamentalist !== "unset") {
-			if (slave.dick > 0) {
-				beauty += 3 - slave.dick;
-			}
-		} else if (arcology.FSGenderRadicalist !== "unset") {
-			if (slave.dick > 20) {
-				beauty += 20 + (slave.dick*(arcology.FSGenderRadicalist/400)); /*27.5*/
-			} else if (slave.dick >= 10) {
-				beauty += 10 + (slave.dick*(arcology.FSGenderRadicalist/200)); /*20*/
-			} else if (slave.dick > 0) {
-				beauty += slave.dick*(1 + (arcology.FSGenderRadicalist/100)); /*10*/
-			}
-		} else {
-			beauty -= 2*slave.dick;
-		}
-	};
-
-	function calcBallsBeauty(slave) {
-		if (arcology.FSAssetExpansionist > 20 && arcology.FSGenderFundamentalist === "unset") {
-			if (slave.balls > 100) {
-				beauty += 41 + (slave.balls*(arcology.FSAssetExpansionist/500)); /*66*/
-			} else if (slave.balls > 80) {
-				beauty += 16 + (slave.balls*(arcology.FSAssetExpansionist/400)); /*41*/
-			} else if (slave.balls > 60) {
-				beauty += 6 + (slave.balls*(arcology.FSAssetExpansionist/800)); /*16*/
-			} else if (slave.balls > 10) {
-				beauty += slave.balls*((arcology.FSAssetExpansionist/1000)); /*6*/
-			}
-		} else if (arcology.FSGenderFundamentalist !== "unset") {
-			if (slave.scrotum > 0) {
-				beauty -= slave.balls*(1 + (arcology.FSGenderFundamentalist/200));
-			}
-		} else if (arcology.FSGenderRadicalist !== "unset") {
-			if (slave.scrotum > 0) {
-				if (slave.balls > 100) {
-					beauty += 40 + (slave.balls*(arcology.FSGenderRadicalist/2000)); /*46.25*/
-				} else if (slave.balls > 60) {
-					beauty += 30 + (slave.balls*(arcology.FSGenderRadicalist/1000)); /*40*/
-				} else if (slave.balls > 10) {
-					beauty += 15 + (slave.balls*(arcology.FSGenderRadicalist/400)); /*30*/
-				} else {
-					beauty += slave.balls*(1 + (arcology.FSGenderRadicalist/200)); /*15*/
-				}
-			}
-		} else {
-			if (slave.scrotum > 0) {
-				beauty -= slave.balls;
-			}
-		}
-		if (arcology.FSRestart !== "unset") { /* Eugenics does not like slaves having working balls */
-			if (slave.ballType === "human") {
-				beauty -= slave.balls*(1 + (arcology.FSRestart/100));
-			}
-		}
-	};
-
-	function calcButtBeauty(slave) {
-		if (slave.butt <= 10) {
-			beauty += 1.5*slave.butt; /*max 15*/
-		} else {
-			beauty += 15 + (slave.butt/4); /*max 20*/
-		}
-		if ((arcology.FSTransformationFetishist > 20 && arcology.FSSlimnessEnthusiast === "unset") || arcology.FSAssetExpansionist > 20) {
-			if (slave.butt <= 2) {
-				beauty += 2*(slave.butt - 1); /*2*/
-			} else if (slave.butt <= 4) {
-				beauty += 2 + 1.5*(slave.butt - 2); /*5*/
-			} else if (slave.butt <= 10) {
-				beauty += 5 + 1*(slave.butt - 4); /*11*/
-			} else {
-				beauty += 7 + 0.5*(slave.butt - 5); /*14.5*/
-			} /* maybe buff butts? */
-		} else if (arcology.FSSlimnessEnthusiast > 20) {
-			if (slave.butt <= 3) {
-				beauty += 12 + 3*(slave.butt - 1); /*18 buff if asses get buffed*/
-			} else if (slave.butt <= 5) {
-				beauty += 9;
-			} else {
-				beauty -= 10 + 3*slave.butt; /*-70*/
-			}
-		} else {
-			if (slave.butt <= 2) {
-				beauty += 2*(slave.butt-1); /*2*/
-			} else if (slave.butt <= 4) {
-				beauty += 2 + (1.5*(slave.butt - 2)); /*5*/
-			} else if (slave.butt <= 8) {
-				beauty += 2 + (1.5*(slave.butt - 2)); /*11*/
-			} else {
-				beauty += 9;
-			}
-		}
-		if (arcology.FSTransformationFetishist > 20) { /* the cost of using AE's values */
-			if (arcology.FSSlimnessEnthusiast !== "unset") {
-				if (slave.butt >= 3) {
-					if (slave.buttImplant/slave.butt < 0.25) {
-						beauty -= 2*(slave.butt - 1) + 10;
-					}
-				}
-			} else {
-				if (slave.butt >= 6) {
-					if (slave.buttImplant/slave.butt < 0.50) {
-						beauty -= (1.5*slave.butt) + 6; /* will get nasty at huge sizes */
-					}
-				}
-			}
-		}
-	};
-
-	function calcHipsBeauty(slave) { /* butts in general may need buffs */
-		switch (slave.hips) {
-			case -2:
-				if (slave.butt > 2) {
-					if (arcology.FSTransformationFetishist === "unset" && arcology.FSHedonisticDecadence === "unset") {
-						beauty += 2 - slave.butt;
-					} else {
-						beauty += 1;
-					}
-				} else {
-					beauty += 1;
-				}
-				break;
-			case -1:
-				if (slave.butt > 4) {
-					if (arcology.FSTransformationFetishist === "unset" && arcology.FSHedonisticDecadence === "unset") {
-						beauty += 4 - slave.butt;
-					} else {
-						beauty += 1;
-					}
-				} else {
-					beauty += 1;
-				}
-				break;
-			case 0:
-				if (slave.butt > 6) {
-					if (arcology.FSTransformationFetishist === "unset" && arcology.FSHedonisticDecadence === "unset") {
-						beauty += 6 - slave.butt;
-					} else {
-						beauty += 1;
-					}
-				} else if (slave.butt <= 1) {
-					beauty += slave.butt - 2;
-				} else {
-					beauty += 1;
-				}
-				break;
-			case 1:
-				if (slave.butt > 8) {
-					if (arcology.FSTransformationFetishist === "unset" && arcology.FSHedonisticDecadence === "unset") {
-						beauty += 8 - slave.butt;
-					} else {
-						beauty += 1;
-					}
-				} else if (slave.butt <= 2) {
-					beauty += slave.butt - 3;
-				} else {
-					beauty += 1;
-				}
-				break;
-			case 2:
-				if (slave.butt <= 3) {
-					beauty += slave.butt - 4;
-				} else {
-					beauty += 1;
-				}
-				break;
-			case 3:
-				if (slave.butt <= 8) {
-					beauty += slave.butt - 8;
-				} else {
-					beauty += 1;
-				}
-				break;
-		}
-	};
-
-	function calcBoobsBeauty(slave) {
-		if ((arcology.FSTransformationFetishist > 20 && arcology.FSSlimnessEnthusiast === "unset") || arcology.FSAssetExpansionist > 20) {
-			if (slave.boobs <= 500) {
-				beauty += 0.02*(slave.boobs - 250); /*5*/
-			} else if (slave.boobs <= 1500) {
-				beauty += 5 + 0.015*(slave.boobs - 500); /*20*/
-			} else if (slave.boobs <= 3000) {
-				beauty += 20 + 0.01*(slave.boobs - 1500); /*42.5*/
-			} else if (slave.boobs <= 25000) {
-				beauty += 50 + 0.005*(slave.boobs - 3000); /*160 - this might need to be lowered. Maybe drop the 50? Otherwise break it down more.*/
-			} else {
-				beauty += 145 + 0.001*(slave.boobs - 10000); /* 185 */
-			}
-		} else if (arcology.FSSlimnessEnthusiast > 20) {
-			if (slave.boobs <= 500) {
-				beauty += 0.08*(slave.boobs); /*40 - buff me to be in line with higher end asset exp*/
-			} else if (slave.boobs <= 1000) {
-				beauty += 10;
-			} else if (slave.boobs <= 3000) {
-				beauty += 5;
-			} else {
-				beauty -= 5 + 0.005*(slave.boobs - 3000); /*-110*/
-			}
-		} else {
-			if (slave.boobs <= 1200) {
-				beauty += 0.02*(slave.boobs - 200); /*20*/
-			} else if (slave.boobs <= 2400) {
-				beauty += 20 + (0.01*(slave.boobs - 1200)); /*32*/
-			} else if (slave.boobs <= 3600) {
-				beauty += 32 + (0.005*(slave.boobs - 2400)); /*38*/
-			} else if (slave.boobs <= 10000) {
-				beauty += 38;
-			} else if (slave.boobs <= 25000) {
-				beauty += 30;
-			} else {
-				beauty += 20;
-			}
-		}
-		if (arcology.FSTransformationFetishist > 20) { /* the cost of using AE's values */
-			if (arcology.FSSlimnessEnthusiast !== "unset") {
-				if (slave.boobs >= 400) {
-					if (slave.boobs >= 10000) {
-						if (slave.boobsImplant/slave.boobs < 0.75) {
-							beauty -= (0.05*slave.boobs) + 10;
-						}
-					} else if (slave.boobs >= 2000) {
-						if (slave.boobsImplant/slave.boobs < 0.50) {
-							beauty -= (0.05*slave.boobs) + 10;
-						}
-					} else if (slave.boobs >= 1000) {
-						if (slave.boobsImplant/slave.boobs < 0.25) {
-							beauty -= (0.05*slave.boobs) + 10;
-						}
-					} else {
-						if (slave.boobsImplant/slave.boobs < 0.10) {
-							beauty -= (0.05*slave.boobs) + 10;
-						}
-					}
-				}
-			} else {
-				if (slave.boobs >= 600) {
-					if (slave.boobs >= 10000) {
-						if (slave.boobsImplant/slave.boobs < 0.75) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
-						}
-					} else if (slave.boobs >= 2000) {
-						if (slave.boobsImplant/slave.boobs < 0.50) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
-						}
-					} else if (slave.boobs >= 1000) {
-						if (slave.boobsImplant/slave.boobs < 0.25) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
-						}
-					} else {
-						if (slave.boobsImplant/slave.boobs < 0.10) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
-						}
-					}
-				}
-			}
-		}
-		if (slave.boobs > 250) {
-			if (slave.boobShape === "perky") {
-				beauty += 6;
-			} else if (slave.boobShape === "torpedo-shaped") {
-				beauty += 6;
-			} else if (slave.boobShape === "downward-facing") {
-				beauty -= 4;
-			} else if (slave.boobShape === "saggy") {
-				beauty -= 4;
-			}
-		}
-		if (slave.nipples === "huge") {
-			beauty += 4;
-		} else if (slave.nipples === "inverted") {
-			beauty += 2;
-		} else if (slave.nipples === "puffy") {
-			beauty += 2;
-		} else if (slave.nipples === "tiny") {
-			beauty -= 2;
-		} else if (slave.nipples === "fuckable") {
-			if (arcology.FSTransformationFetishist !== "unset") {
-				beauty += arcology.FSTransformationFetishist/10;
-			}
-		}
-	};
-
-	function calcWeightBeauty(slave) {
-		if (arcology.FSHedonisticDecadence > 20) {
-			if (slave.weight < -95) {
-				beauty += -70 + (slave.weight/10); /*-80*/
-			} else if (slave.weight < -30) {
-				beauty += -30 + (slave.weight/3); /*-61*/
-			} else if (slave.weight < -10) {
-				beauty += (slave.weight); /*-30*/
-			} else if (slave.weight <= 10) {
-				/* no effect */
-			} else if (slave.weight <= 30) {
-				beauty += (slave.weight/2); /*15*/
-			} else if (slave.weight <= 95) {
-				beauty += 15 + (slave.weight/7); /*28.5*/
-			} else if (slave.weight <= 130) {
-				beauty += 28 + (slave.weight/10); /*41*/
-			} else if (slave.weight <= 160) {
-				beauty += 42 + (slave.weight/20); /*50*/
-			} else if (slave.weight <= 190) {
-				beauty += 50 - (slave.weight/25); /*42.5*/
-			} else {
-				beauty += 40 - (slave.weight/20); /*30*/
-			}
-		} else {
-			if (slave.weight > 130) {
-				beauty -= Math.abs(slave.weight)/5;
-			} else if (slave.hips === 3) {
-				if (slave.weight < -10) {
-					beauty -= Math.abs(slave.weight)/10;
-				}
-			} else if (slave.hips === 2) {
-				if (slave.weight > 95) {
-					beauty -= Math.abs(slave.weight)/15;
-				} else if (slave.weight < -30) {
-					beauty -= Math.abs(slave.weight)/10;
-				}
-			} else if (slave.hips === -2) {
-				if (slave.weight < -95 || slave.weight > 30) {
-					beauty -= Math.abs(slave.weight)/10;
-				}
-			} else {
-				if (Math.abs(slave.weight) > 30) {
-					beauty -= Math.abs(slave.weight)/10;
-				}
-			}
-		}
-		if (arcology.FSPhysicalIdealist !== "unset") {
-			if (arcology.FSPhysicalIdealistStrongFat === 1) {
-				if (slave.weight > 10 && slave.weight <= 130) {
-					beauty += slave.weight*(arcology.FSPhysicalIdealist/200); /*65*/
-				} else {
-					beauty -= Math.abs(slave.weight)/2;
-				}
-			}
-		}
-	};
-
-	function calcMusclesBeauty(slave) {
-		if (arcology.FSPhysicalIdealist !== "unset") {
-			if (arcology.FSPhysicalIdealistLaw === 1) {
-				if (Math.abs(slave.weight) <= 30 && slave.health >= 20 && slave.muscles >= 20 && slave.muscles <= 50) {
-					beauty += (slave.muscles + (Math.min(slave.health,300)/5))*(arcology.FSPhysicalIdealist/100);
-				} else {
-					beauty -= 30;
-				}
-			} else {
-				if (slave.muscles > 30 || slave.muscles <= -5) {
-					beauty += slave.muscles*(arcology.FSPhysicalIdealist/120); /*+-83*/
-				}
-			}
-		} else if (arcology.FSHedonisticDecadence !== "unset") {
-			if (slave.muscles < -10) {
-				beauty += Math.abs(slave.muscles)*(arcology.FSHedonisticDecadence/160); /*62.5*/
-			} else if (slave.muscles > 5) {
-				if (arcology.FSHedonisticDecadenceStrongFat === 1) {
-					beauty += slave.muscles*(arcology.FSHedonisticDecadence/200); /*50*/
-				} else {
-					beauty -= slave.muscles*(arcology.FSHedonisticDecadence/200); /*-50*/
-				}
-			}
-		}
-	};
-
-	function calcBodyHairBeauty(slave) {
-		if (slave.physicalAge < 11) {
-			beauty += 4;
-		} else if (slave.physicalAge >= 13) {
-			switch (slave.underArmHStyle) {
-				case "hairless":
-				case "bald":
-				case "waxed":
-				case "shaved":
-					beauty += 2;
-					break;
-				case "bushy":
-					if (arcology.FSBodyPurist > 0) {
-						beauty += 4;
-					} else {
-						beauty -= 2;
-					}
-					break;
-			}
-			switch (slave.pubicHStyle) {
-				case "hairless":
-				case "bald":
-				case "waxed":
-					beauty += 2;
-					break;
-				case "bushy":
-					if (arcology.FSBodyPurist > 0) {
-						beauty += 2;
-					} else {
-						beauty -= 4;
-					}
-					break;
-				case "bushy in the front and neat in the rear":
-					if (arcology.FSBodyPurist > 0) {
-						beauty += 4;
-					} else {
-						beauty -= 2;
-					}
-					break;
-				case "very bushy":
-					if (arcology.FSBodyPurist > 0) {
-						beauty += 2;
-					} else {
-						beauty -= 6;
-					}
-					break;
-			}
-		}
-	};
-
-	function calcImplantBeauty(slave) {
-		if (arcology.FSTransformationFetishist !== "unset") {
-			if (Math.abs(slave.shouldersImplant) > 1) {
-				beauty += (arcology.FSTransformationFetishist/20) + Math.abs(slave.shouldersImplant);
-			}
-			if (Math.abs(slave.hipsImplant) > 1) {
-				beauty += (arcology.FSTransformationFetishist/20) + Math.abs(slave.hipsImplant);
-			}
-			if (slave.race !== slave.origRace) {
-				beauty += arcology.FSTransformationFetishist/20;
-			}
-			if (slave.faceImplant > 95 && slave.face > 40) {
-				beauty += arcology.FSTransformationFetishist/4;
-			}
-		} else if (arcology.FSBodyPurist !== "unset") {
-			if (slave.faceImplant > 5) {
-				beauty -= (arcology.FSBodyPurist/100)*(slave.faceImplant/10);
-			}
-			if (slave.race === slave.origRace) {
-				beauty -= arcology.FSBodyPurist/20;
-			}
-		} else {
-			if (slave.faceImplant > 30) {
-				beauty -= (slave.faceImplant - 30)/10;
-			}
-		}
-	};
-
-	function calcRepopulationPregBeauty(slave) {
-		if (slave.preg > slave.pregData.normalBirth/1.33) { /*limited huge boost for full term */
-			if (slave.broodmother > 0) {
-				beauty += 0.4*(slave.broodmother*arcology.FSRepopulationFocus); /*40-80 limited due to constant presence. Also good breeders, but subpar mothers*/
-			} else if (slave.bellyPreg >= 600000) {
-				beauty += 1.5*arcology.FSRepopulationFocus; /*150*/
-			} else if (slave.bellyPreg >= 300000) {
-				beauty += arcology.FSRepopulationFocus; /*100*/
-			} else if (slave.bellyPreg >= 120000) {
-				beauty += 0.9*arcology.FSRepopulationFocus; /*90*/
-			} else {
-				beauty += 0.8*arcology.FSRepopulationFocus; /*80*/
-			}
-		} else if (slave.preg > slave.pregData.normalBirth/2) {
-			if (slave.pregType >= 20) {
-				beauty += 10*(arcology.FSRepopulationFocus/40); /*25*/
-			} else if (slave.pregType >= 10) {
-				beauty += 9*(arcology.FSRepopulationFocus/40); /*22.5*/
-			} else {
-				beauty += 8*(arcology.FSRepopulationFocus/40); /*20*/
-			}
-		} else if (slave.preg > slave.pregData.normalBirth/4) {
-			if (slave.pregType >= 20) {
-				beauty += arcology.FSRepopulationFocus/5; /*20*/
-			} else if (slave.pregType >= 10) {
-				beauty += arcology.FSRepopulationFocus/6.25; /*16*/
-			} else {
-				beauty += arcology.FSRepopulationFocus/10; /*10*/
-			}
-		} else if (slave.pregWeek < 0) {
-			beauty += arcology.FSRepopulationFocus/10; /*10*/
-		} else if (slave.preg > 0 && slave.collar === "preg biometrics") {
-			beauty += arcology.FSRepopulationFocus/12; /*8.33*/
-		} else {
-			beauty -= arcology.FSRepopulationFocus/2.5; /*-40*/
-		}
-		if (slave.births > 50) {
-			beauty += arcology.FSRepopulationFocus/1.5; /*66.6*/
-		} else {
-			beauty += slave.births*(arcology.FSRepopulationFocus/75);
-		}
-	};
-
-	function calcTrendyPregBeauty(slave) {
-		if (slave.preg > slave.pregData.normalBirth/1.33) { /*limited huge boost for full term */
-			beauty += 20;
-		} else if (slave.bellyPreg >= 1500) {
-				beauty += 10;
-		}
-	};
-
-	function calcRestartPregBeauty(slave) {
-		if (slave.breedingMark === 1 && V.propOutcome === 1) {
-			if (slave.preg > slave.pregData.normalBirth/8 && slave.pregSource === -1) {
-				beauty += arcology.FSRestart; /*100*/
-			}
-		} else {
-			if (slave.preg > slave.pregData.normalBirth/1.33) {
-				if (slave.bellyPreg >= 600000) {
-					beauty -= 2.5*arcology.FSRestart; /*-250*/
-				} else if (slave.bellyPreg >= 300000) {
-					beauty -= 1.25*arcology.FSRestart; /*-125*/
-				} else if (slave.bellyPreg >= 120000) {
-					beauty -= arcology.FSRestart; /*-100*/
-				} else {
-					beauty -= 0.75*arcology.FSRestart; /*-75*/
-				}
-			} else if (slave.preg > slave.pregData.normalBirth/2) {
-				if (slave.pregType >= 20) {
-					beauty -= arcology.FSRestart/1.5; /*-66.6*/
-				} else if (slave.pregType >= 10) {
-					beauty -= arcology.FSRestart/2; /*-50*/
-				} else {
-					beauty -= arcology.FSRestart/3; /*-33.3*/
-				}
-			} else if (slave.preg > slave.pregData.normalBirth/4) {
-				if (slave.pregType >= 20) {
-					beauty -= 3*(arcology.FSRestart/8); /*-37.5*/
-				} else if (slave.pregType >= 10) {
-					beauty -= arcology.FSRestart/4; /*-25*/
-				} else {
-					beauty -= arcology.FSRestart/8; /*-12.5*/
-				}
-			} else if (slave.preg === -2) {
-				beauty += arcology.FSRestart/7; /*14.2*/
-			} else if (slave.preg < 1) {
-				beauty += arcology.FSRestart/5; /*20*/
-			}
-			if (slave.births > 50) {
-				beauty -= arcology.FSRestart; /*-100*/
-			} else {
-				beauty -= slave.births*(arcology.FSRestart/50);
-			}
-		}
-	};
-
-	function calcTrendyMilfBeauty(slave) {
-		if (slave.births > 50) {
-			beauty += 6;
-		} else {
-			beauty += Math.ceil(slave.births/10);
-		}
-	};
-
-	function calcFutaLawBeauty(slave) {
-		switch (arcology.FSGenderRadicalistLawFuta) {
-			case 1:
-				if (slave.dick > 0 && slave.vagina > -1) { /* herms */
-					calcFutaLawTrueFutaBeauty(slave);
-				}
-				break;
-			case 2:
-				if (canAchieveErection(slave) && slave.balls > 0 && slave.scrotum > 0) { /* erection! */
-					calcFutaLawBigDickBeauty(slave);
-				}
-				break;
-			case 3:
-				calcFutaLawBigBootyBeauty(slave);
-				break;
-			case 4:
-				if (slave.dick > 0 && slave.vagina === -1 && slave.faceShape !== "masculine") {
-					if (slave.boobs < 500 && slave.dick < 4 && slave.balls < 4) {
-						calcFutaLawFemboyBeauty(slave);
-					}
-				}
-				break;
-		}
-	};
-
-	function calcFutaLawTrueFutaBeauty(slave) {
-		if (slave.dick <= 10) {
-			beauty += slave.dick;
-		} else if (slave.dick > 20) {
-			beauty += 2;
-		} else {
-			beauty += 4;
-		}
-	};
-
-	function calcFutaLawBigDickBeauty(slave) {
-		beauty += slave.dick;
-		if (slave.balls > 120) {
-			beauty += 14;
-		} else if (slave.balls > 100) {
-			beauty += 12;
-		} else if (slave.balls > 80) {
-			beauty += 10;
-		} else if (slave.balls > 60) {
-			beauty += 8;
-		} else if (slave.balls > 40) {
-			beauty += 6;
-		} else if (slave.balls > 20) {
-			beauty += 4;
-		} else if (slave.balls > 10) {
-			beauty += 2;
-		} else {
-			beauty += slave.balls;
-		}
-	};
-
-	function calcFutaLawBigBootyBeauty(slave) {
-		if (slave.hips >= 1) {
-			beauty += 4*(slave.hips - 1); /*8*/
-			if (arcology.FSSlimnessEnthusiast !== "unset") {
-				beauty += 4*(slave.hips - 1); /*8*/ /* offsets the malus for big butts */
-			}
-		}
-		if (slave.analSkill > 60 && slave.anus >= 2) {
-			beauty += 2*(slave.anus-2); /*6*/
-			if (arcology.FSSlimnessEnthusiast != "unset") {
-				beauty += 2*(slave.anus-2); /*6*/ /* offsets the malus for big butts */
-			}
-		}
-		if (slave.butt >= 5) {
-			beauty += (slave.butt - 5); /*15*/
-		}
-	};
-
-	function calcFutaLawFemboyBeauty(slave) {
-		if (arcology.FSSlimnessEnthusiast === "unset") { /*balance with slimness*/
-			beauty += 20;
-			if (slave.boobs < 300) {
-				beauty += 12;
-			} else if (slave.boobs < 400) {
-				beauty += 6;
-			}
-		}
-		if (slave.dick === 1) {
-			beauty += 12;
-		} else if (slave.dick === 2) {
-			beauty += 6;
-		}
-		if (slave.balls <= 2) {
-			beauty += 8;
-		}
-		if (slave.faceShape === "cute" && slave.face > 0) { /*uggos need not apply, maybe a small boost for other faceShapes*/
-			beauty += ((arcology.FSGenderRadicalist/25)*(slave.face/30)) - 2; /*gives a slightly better boost than androgynous does with gendrad boost, 15.3*/
-		}
-		if (slave.nipples === "tiny") {
-			beauty += 5;
-		} else if (slave.nipples === "cute") {
-			beauty += 2;
-		} else {
-			beauty -= 5;
-		}
-	};
-
-	function calcBodyProportionBeauty(slave) {
-		if (arcology.FSGenderFundamentalist !== "unset") {
-			if (slave.shoulders > slave.hips) {
-				if (slave.boobs <= 2000*(slave.shoulders - slave.hips)) {
-					beauty -= (slave.shoulders - slave.hips)*(1 + (arcology.FSGenderFundamentalist/200));
-				}
-			}
-		} else if (arcology.FSGenderRadicalist === "unset") {
-			if (slave.shoulders > slave.hips) {
-				if (slave.boobs <= 2000*(slave.shoulders - slave.hips)) {
-					beauty -= slave.shoulders - slave.hips;
-				}
-			}
-		}
-	};
-
-	function calcVoiceBeauty(slave) {
-		if (canTalk(slave)) {
-			if (slave.accent >= 3) {
-				beauty -= 1;
-			} else if (slave.accent === 1) {
-				beauty += 1;
-			}
-		} else {
-			beauty -= 2;
-		}
-	};
-
-	function calcLimbsBeauty(slave) {
-		switch (slave.amp) {
-			case 1:
-				beauty -= 10;
-				break;
-			case -1:
-			case -2:
-			case -4:
-				beauty -= 2;
-				break;
-		}
-	};
-
-	function calcPubertyBeauty(slave) {
-		if (slave.pubertyXX === 1) {
-			beauty += 5;
-		}
-		if (slave.pubertyXY === 0 && slave.physicalAge > V.potencyAge && slave.balls > 0) {
-			beauty += 10;
-			if (arcology.FSGenderFundamentalist !== "unset") {
-				beauty += 5;
-			}
-		}
-	};
-
-	function calcFSMiscBeauty(slave) {
-		if (arcology.FSTransformationFetishist > 20) {
-			if (slave.lips > 70) {
-				if (slave.lipsImplant/slave.lips < 0.5) {
-					beauty -= ((slave.lips/10) + (arcology.FSTransformationFetishist/20));
-				}
-			}
-			if (slave.hips === 3) {
-				beauty += 10;
-			}
-		}
-		if ((arcology.FSGenderRadicalist > 20 && arcology.FSGenderRadicalistLawFuta !== 3) || arcology.FSSlimnessEnthusiast > 20) {
-			if (slave.hips < 0) {
-				beauty += Math.abs(slave.hips);
-			}
-		}
-		if (arcology.FSPhysicalIdealist !== "unset") {
-			if (slave.height > Height.mean(slave)) {
-				beauty += 10;
-			}
-		}
-		if (arcology.FSHedonisticDecadenceLaw2 === 1) {
-			if (slave.boobs >= 2000 && slave.butt >= 5 && slave.weight > 95) {
-				beauty += 5 + (arcology.FSHedonisticDecadence/20); /*10*/
-			} else {
-				beauty -= 15 + (arcology.FSHedonisticDecadence/20); /*-20*/
-			}
-		}
-		if (arcology.FSChattelReligionistCreed === 1) {
-			if (V.nicaeaAssignment === slave.assignment) {
-				beauty += 2*V.nicaeaPower;
-			}
-		}
-	};
-
-	function calcPurityBeauty(slave) {
-		if (isPure(slave)) {
-			V.pure = V.pure++ || 1;
-			if (arcology.FSBodyPurist !== "unset") {
-				beauty += arcology.FSBodyPurist/5;
-			}
-			if (arcology.FSTransformationFetishist === "unset") {
-				beauty += 2;
-			}
-		} else if (arcology.FSTransformationFetishist !== "unset") {
-			beauty += arcology.FSTransformationFetishist/40;
-		}
-	};
-
-	function calcPhysiqueBeauty(slave) {
-		let physiquePass = 0;
-
-		if (slave.boobs < 500 && slave.butt < 3) {
-			if (slave.muscles <= 30 && arcology.FSPhysicalIdealist === "unset" && slave.weight <= 10 && arcology.FSHedonisticDecadence === "unset") {
-				physiquePass = 1;
-			} else if (arcology.FSPhysicalIdealist !== "unset") { /* no muscle malus for muscle loving societies */
-				if (arcology.FSPhysicalIdealistStrongFat === 1 && slave.weight <= 30) { /* reduced weight malus for fat loving societies */
-					physiquePass = 1;
-				} else if (slave.weight <= 10) {
-					physiquePass = 1;
-				}
-			} else if (arcology.FSHedonisticDecadence !== "unset" && slave.weight <= 30) { /* reduced weight malus for fat loving societies */
-				if (arcology.FSHedonisticDecadenceStrongFat === 1) { /* no muscle malus for muscle loving societies */
-					physiquePass = 1;
-				} else if (slave.muscles <= 30) {
-					physiquePass = 1;
-				}
-			}
-		}
-		if (physiquePass === 1) {
-			beauty += 40;
-			if (arcology.FSSlimnessEnthusiast > 20) {
-				beauty += arcology.FSSlimnessEnthusiast/20;
-				if (canTalk(slave) && slave.voice === 3) {
-					beauty += arcology.FSSlimnessEnthusiast/40;
-				}
-			}
-		} else if (slave.butt > 4 && slave.boobs > 800) {
-			if (arcology.FSSlimnessEnthusiast === "unset") {
-				beauty += 1;
-			}
-			if (arcology.FSAssetExpansionist > 20) {
-				beauty += arcology.FSAssetExpansionist/20;
-				if (canTalk(slave) && slave.voice === 3) {
-					beauty += arcology.FSAssetExpansionist/40;
-				}
-			}
-		}
-	};
-
-	function calcSlimBeauty(slave) {
-		if (slimPass(slave) === 1) {
-			beauty += 40 + (arcology.FSSlimnessEnthusiast/20); /*45*/
-		} else {
-			beauty -= arcology.FSSlimnessEnthusiast/20;
-		}
-	};
-
-	function calcGenderLawBeauty(slave) {
-		V.genderLawPass = 1;
-
-		if (arcology.FSPhysicalIdealist === "unset" && arcology.FSHedonisticDecadenceStrongFat === 0 && slave.muscles > 30) { /*muscle check*/
-			V.genderLawPass = 0;
-		}
-		if (arcology.FSHedonisticDecadence !== "unset" || arcology.FSPhysicalIdealistStrongFat === 1) { /*weight check*/
-			if (slave.weight > 130 || slave.weight <= -30) {
-				V.genderLawPass = 0;
-			}
-		} else if (Math.abs(slave.weight) > 30) {
-			V.genderLawPass = 0;
-		}
-		if (arcology.FSAssetExpansionist !== "unset") {
-			if (slave.boobs < 500 || slave.boobs > 1600 || slave.butt < 3 || slave.butt > 6) {
-				V.genderLawPass = 0;
-			}
-		} else if (slave.boobs < 500 || slave.boobs > 800 || slave.butt < 3 || slave.butt > 4) {
-			V.genderLawPass = 0;
-		}
-		if (V.genderLawPass === 1) {
-			beauty += 60;
-		} else {
-			beauty -= 10;
-		}
-	};
-
-	function calcMultipliersBeauty(slave) {
-		calcBellyBeauty(slave);
-		if (slave.breedingMark === 1) {
-			if (V.propOutcome === 1) {
-				beauty = 2*beauty;
-			} else {
-				beauty += 2;
-			}
-		}
-		if (slave.fuckdoll === 0 && V.seeAge === 1) {
-			calcAgeBeauty(slave);
-		}
-		if (slave.prestige + slave.pornPrestige > 0) {
-			calcPrestigeBeauty(slave);
-		}
-	};
-
-	function calcBellyBeauty(slave) {
-		if (slave.bellySag > 0) {
-			if (slave.belly < 100) {
-				if (arcology.FSRepopulationFocus === "unset") {
-					beauty -= 20;
-				}
-			}
-		}
-		if (slave.bellyPreg >= 500 && arcology.FSRepopulationFocus === "unset" && arcology.FSRestart === "unset") {
-			if (arcology.FSRepopulationFocusPregPolicy === 1) {
-				beauty = 0.9*beauty;
-			} else if (arcology.FSGenderRadicalist !== "unset") {
-				if (slave.mpreg === 1) {
-					beauty = 0.9*beauty;
-				} else {
-					beauty = 0.7*beauty;
-				}
-			} else if (arcology.FSGenderFundamentalist === "unset") {
-				beauty = 0.8*beauty;
-			} else {
-				beauty = 0.7*beauty;
-			}
-		}
-		if (slave.bellyImplant >= 1500) {
-			if (arcology.FSTransformationFetishist > 20) {
-				beauty += Math.min(Math.trunc(slave.bellyImplant/1000), 50); /*50*/
-			} else if (arcology.FSRepopulationFocus > 60) {
-				if ((slave.ovaries === 0 && slave.mpreg === 0) || slave.preg < -1) {
-					beauty += 20;
-				}
-			} else {
-				if (slave.bellyImplant >= 750000) { /* multipliers */
-					beauty = 0.2*beauty;
-				} else if (slave.bellyImplant >= 450000) {
-					beauty = 0.5*beauty;
-				} else if (slave.bellyImplant >= 300000) {
-					beauty = 0.7*beauty;
-				} else if (slave.bellyImplant >= 100000) {
-					beauty = 0.8*beauty;
-				} else if (slave.bellyImplant >= 50000) {
-					beauty = 0.85*beauty;
-				} else {
-					beauty = 0.9*beauty;
-				}
-			}
-		}
-	};
-
-	function calcAgeBeauty(slave) {
-		if (slave.physicalAge === V.minimumSlaveAge) {
-			beauty += 1;
-			if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset") && arcology.FSRestart === "unset") {
-				if (slave.birthWeek === 0) {
-					beauty += 1.6*beauty;
-				} else if (slave.birthWeek < 4) {
-					beauty += 0.2*beauty;
-				}
-			} else {
-				if (slave.birthWeek === 0) {
-					beauty += 0.8*beauty;
-				} else if (slave.birthWeek < 4) {
-					beauty += 0.1*beauty;
-				}
-			}
-		} else if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset") && arcology.FSRestart === "unset") {
-			beauty += 1;
-			if (slave.birthWeek === 0) {
-				beauty += 0.8*beauty;
-			} else if (slave.birthWeek < 4) {
-				beauty += 0.1*beauty;
-			}
-		}
-	};
-
-	function calcPrestigeBeauty(slave) { /* multipliers */
-		if (slave.prestige >= 3) {
-			beauty += 2*beauty;
-		} else if (slave.prestige === 2) {
-			beauty += 0.5*beauty;
-		} else if (slave.prestige === 1) {
-			beauty += 0.25*beauty;
-		}
-		if (slave.pornPrestige === 3) {
-			beauty += beauty;
-		} else if (slave.pornPrestige === 2) {
-			beauty += 0.5*beauty;
-		} else if (slave.pornPrestige === 1) {
-			beauty += 0.1*beauty;
-		}
-	};
-
-	return Beauty;
-})();
-
-// this is a port of the FResult widget
-// it has been broken up into several functions, because it grew too long
-// it has been wrapped in a closure so as not to pollute the global namespace
-// and so that nested functions are only evaluated once
-
-window.FResult = (function() {
-	"use strict";
-	// we can't initialize our global variables on load, because SugarCube.State isn't initialized
-	// instead, declare them and initialize on run time
-	let V, result, incest_bonus;
-	function FResult(slave) {
-		V = State.variables;
-		incest_bonus = V.arcologies[0].FSEgyptianRevivalist > 20 || V.arcologies[0].FSEgyptianRevivalistIncestPolicy === 1;
-
-		calcUseWeights(slave);
-		if (!slave.fuckdoll)
-			calcNotFuckdoll(slave);
-		else
-			result += slave.fuckdoll/10;
-
-		result += Math.max(0, slave.aphrodisiacs) * 2;
-
-		if (slave.inflationType === "aphrodisiac")
-			result += slave.inflation*4;
-
-		if (slave.lactation > 0)
-			result += 1;
-
-		if (slave.nipples === "fuckable")
-			calcFuckableTits(slave);
-
-		if (V.seeAge === 1)
-			calcAge(slave);
-		if (slave.fetish === "mindbroken")
-			result = Math.trunc(result*0.4);
-		else
-			result = Math.trunc(result*0.7);
-
-		if (slave.pregWeek < 0)
-			result -= Math.trunc(result*slave.pregWeek/10); // reduced the most just after birth
-
-		calcAmputation(slave);
-
-		if (V.arcologies[0].FSHedonisticDecadence > 20)
-			calcHedonismWeight(slave);
-		if (result < 2) {
-			if (supremeRaceP(slave) && V.arcologies[0].FSSupremacist > 20)
-				result = 0;
-			else
-				result = 2;
-		}
-		return result;
-	}
-
-	function calcUseWeights(slave) {
-		result = (3 - slave.anus)+(slave.muscles/30);
-		if (slave.muscles < -95)
-			result -= 5;
-		else if (slave.muscles < -30)
-			result -= 2;
-
-		const uses = V.oralUseWeight + V.vaginalUseWeight + V.analUseWeight;
-		if (uses <= 0) return;
-
-		result += (6+slave.tonguePiercing) * (V.oralUseWeight/uses) * (slave.oralSkill/30);
-		if (slave.sexualFlaw === "cum addict")
-			result += (V.oralUseWeight/uses) * (slave.oralSkill/30);
-		if (canDoVaginal(slave)) {
-			result += 6 * (V.vaginalUseWeight/uses) * (slave.vaginalSkill/30);
-			result += (3 - slave.vagina);
-			result += slave.vaginaLube;
-		}
-		if (canDoAnal(slave)) {
-			result += 6 * (V.analUseWeight/uses) * (slave.analSkill/30);
-			if (slave.sexualFlaw === "anal addict")
-				result += (V.analUseWeight/uses) * (slave.analSkill/30);
-			if (slave.inflationType === "aphrodisiac")
-				result += (V.analUseWeight/uses) * (slave.inflation * 3);
-		}
-	}
-
-	function calcFuckableTits(slave) {
-		result += 2;
-		if (slave.fetish === "boobs")
-			result += Math.trunc(slave.fetishStrength/20);
-	}
-
-	function calcWorksWithRelatives(slave) {
-		V.slaves.forEach(islave => {
-			if (isParentP(slave, islave) && sameAssignmentP(slave, islave)) {
-				result += 1;
-				if (incest_bonus) result += 1;
-			}
-			if (areSisters(slave, islave) > 0 && sameAssignmentP(slave, islave)) {
-				result += 1;
-				if (incest_bonus) result += 1;
-			}
-		});
-	}
-
-	function calcWorksWithRelativesVanilla(slave) {
-		const fre = getSlave(slave.relationTarget);
-		if (fre !== undefined && sameAssignmentP(slave, fre)) {
-			result += 2;
-			if (incest_bonus) result += 2;
-		}
-	}
-
-	function calcWorksWithRelationship(slave) {
-		const fre = V.slaves.findIndex(s => {
-			return haveRelationshipP(slave, s) && sameAssignmentP(slave, s);
-		});
-		if (fre !== -1) result += 1;
-	}
-
-	function calcWorksWithRival(slave) {
-		const en = getSlave(slave.rivalryTarget);
-		if (en !== undefined && sameAssignmentP(slave, en)) result -= 1;
-	}
-
-	function calcHInjectionsDiet(slave) {
-		if (slave.drugs === "male hormone injections" || slave.drugs === "female hormone injections")
-			result -= 10;
-		if (slave.diet === "XXY")
-			result += 2;
-		else if (slave.diet === "XY" || slave.diet === "XX")
-			result += 1;
-		else if (slave.diet === "cum production")
-			result += 1;
-		else if (slave.diet === "fertility")
-			result += 1;
-	}
-	function calcPreg(slave) {
-		if (V.arcologies[0].FSRepopulationFocus > 20) {
-			if (slave.belly >= 1500) result += 2;
-			else result -= 2;
-		} else if (V.arcologies[0].FSRepopulationFocusPregPolicy === 1) {
-			if (slave.bellyPreg >= 1500)
-				result += 1;
-		} else if (V.arcologies[0].FSRestart > 20) {
-			if (slave.bellyPreg >= 500 && slave.breedingMark === 1 && V.propOutcome === 1)
-				result += 1;
-			else if (slave.bellyPreg >= 1500)
-				result -= 10;
-			else
-				result += 0;
-		}
-		if (V.arcologies[0].FSRepopulationFocusMilfPolicy === 1 || V.arcologies[0].FSRepopulationFocus > 20) {
-			result += 1;
-		}
-	}
-
-	function calcRace(slave) {
-		if (V.arcologies[0].FSSupremacist !== "unset" && supremeRaceP(slave))
-			result -= (V.arcologies[0].FSSupremacist/5) + (V.arcologies[0].FSSupremacistLawME*10);
-		if (V.arcologies[0].FSSubjugationist !== "unset" && inferiorRaceP(slave))
-			result += (V.arcologies[0].FSSubjugationist/10) + (V.arcologies[0].FSSubjugationistLawME);
-	}
-
-	function calcSexAttributes(slave) {
-		if (slave.clitPiercing > 2) result += 1;
-		if (slave.fetishKnown === 1 && slave.fetishStrength > 60 && slave.fetish != "none")
-			result += slave.fetishStrength/5;
-
-		if (slave.attrKnown === 1) {
-			result += Math.trunc(slave.attrXX/20);
-			result += Math.trunc(slave.attrXY/20);
-			if (slave.energy > 95) result += 3;
-			else if (slave.energy > 80) result += 2;
-			else if (slave.energy > 60) result += 1;
-			else if (slave.energy <= 20) result -= 2;
-			else if (slave.energy <= 40) result -= 1;
-		}
-		if (slave.sexualFlaw !== "none") result -= 2;
-		if (slave.sexualQuirk !== "none") result += 2;
-		if (slave.behavioralFlaw !== "none") result -= 2;
-		if (slave.behavioralQuirk !== "none") result += 2;
-	}
-
-	function calcCareer(slave) {
-		if (setup.whoreCareers.includes(slave.career))
-			result += 1;
-		else if (slave.oralCount + slave.analCount + slave.vaginalCount + slave.mammaryCount + slave.penetrativeCount > 1000)
-			result += 1;
-	}
-
-	function calcSight(slave) {
-		if (!canSee(slave)) result -= 3;
-		else if (slave.eyes <= -1) {
-			if (slave.eyewear !== "corrective glasses" && slave.eyewear !== "corrective contacts")
-				result -= 1;
-		} else if (slave.eyewear === "blurring glasses")
-			result -= 1;
-		else if (slave.eyewear === "blurring contacts")
-			result -= 1;
-	}
-
-	function calcHearing(slave) {
-		if (!canHear(slave)) result -= 2;
-		else if (slave.hears <= -1) {
-			if (slave.earwear !== "hearing aids")
-				result -= 1;
-		} else if (slave.earwear === "muffling ear plugs")
-			result -= 1;
-	}
-
-	function calcEgyptianBonus(slave) {
-		if (V.racialVarieties === undefined) V.racialVarieties = [];
-		if (!V.racialVarieties.includes(slave.race))
-			V.racialVarieties.push(slave.race);
-	}
-
-	function calcYouthBonus(slave) {
-		if (slave.visualAge < 30) {
-			if (slave.actualAge > 30)
-				result += 5; // experienced for her apparent age
-			if (slave.physicalAge > 30)
-				result -= slave.physicalAge/2; // too old :(
-		}
-	}
-
-	function calcMatureBonus(slave) {
-		if (slave.visualAge >= 30 && slave.actualAge >= 30 && slave.physicalAge < slave.visualAge)
-			result += Math.min((slave.physicalAge - slave.visualAge) * 2, 20); // looks and acts mature, but has a body that just won't quit
-	}
-
-	function calcNotFuckdoll(slave) {
-		if (V.familyTesting === 1 && totalRelatives(slave) > 0)
-			calcWorksWithRelatives(slave);
-		else if(!V.familyTesting && slave.relation !==0)
-			calcWorksWithRelativesVanilla(slave);
-		if (slave.relationship > 0) calcWorksWithRelationship(slave);
-		if (slave.rivalry !== 0) calcWorksWithRival(slave);
-		calcHInjectionsDiet(slave);
-		calcPreg(slave);
-		calcRace(slave);
-		calcSexAttributes(slave);
-		calcCareer(slave);
-		calcSight(slave);
-		calcHearing(slave);
-		if (V.arcologies[0].FSEgyptianRevivalist !== "unset")
-			calcEgyptianBonus(slave);
-		if (V.arcologies[0].FSYouthPreferentialist !== "unset")
-			calcYouthBonus(slave);
-		else if (V.arcologies[0].FSMaturityPreferentialist !== "unset")
-			calcMatureBonus(slave);
-	}
-
-	function calcAge(slave) {
-		if ((V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSGenderFundamentalist !== "unset") && slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave)) {
-			result += 1;
-			if (slave.birthWeek === 0) result += result;
-			else if (slave.birthWeek < 4) result += 0.2*result;
-		} else if (slave.physicalAge === V.minimumSlaveAge) {
-			result += 1;
-			if (slave.birthWeek === 0 ) result += 0.5*result;
-			else if (slave.birthWeek < 4) result += 0.1*result;
-		} else if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSGenderFundamentalist !== "unset")) {
-			result += 1;
-			if (slave.birthWeek === 0)
-				result += 0.5*result;
-			else if (slave.birthWeek < 4)
-				result += 0.1*result;
-		}
-	}
-
-	function calcAmputation(slave) {
-		switch(slave.amp) {
-		case 0:
-		case -2:
-		case -5:
-			break;
-		case 1:
-			result -= 2;
-			break;
-		default:
-			result -= 1;
-		}
-	}
-
-	function calcHedonismWeight(slave) {
-		if (slave.weight < 10)
-			result -= 2;
-		else if (slave.weight > 190)
-			result -= 5; // too fat
-	}
-	return FResult;
-})();
-
-window.slaveCost = (function() {
-	"use strict";
-	let V, arcology, multiplier, cost;
-
-	function slaveCost(slave, isStartingSlave) {
-		V = State.variables;
-		arcology = V.arcologies[0];
-		multiplier = V.slaveCostFactor;
-		cost = Beauty(slave)*FResult(slave);
-
-		calcGenitalsCost(slave);
-		calcDevotionTrustCost(slave);
-		calcPreferencesCost(slave);
-		calcPregCost(slave);
-		if (slave.prestige + slave.pornPrestige > 0) {
-			calcPrestigeCost(slave);
-		}
-		calcFSCost(slave);
-		if (V.seeAge === 1) {
-			calcAgeCost(slave);
-		}
-		calcCareersCost(slave);
-		calcMiscCost(slave);
-		calcIndentureCost(slave); /* multipliers */
-
-		calcCost(slave);
-		if (isStartingSlave) {
-			calcStartingSlaveCost(slave);
-		}
-		return cost;
-	};
-
-	function calcGenitalsCost(slave) {
-		if (slave.vagina === 0) {
-			multiplier += 0.1;
-		}
-		if (slave.vagina > -1 && arcology.FSRestartSMR === 1) {
-			if (slave.dick > 0) {
-				if (slave.ovaries === 0 && slave.balls === 0) {
-					multiplier += 0.8;
-				}
-			}
-		} else if (slave.vagina > -1) {
-			if (slave.dick > 0) {
-				if (V.ui !== "start" || V.PC.dick === 0 || V.PC.vagina === 0) {
-					multiplier += 0.2;
-					if (slave.ovaries > 0) {
-						if (slave.balls > 0) {
-							multiplier += 0.8;
-						}
-					}
-				} else {
-					multiplier += 0.1;
-					if (slave.ovaries > 0) {
-						if (slave.balls > 0) {
-							multiplier += 0.2;
-						}
-					}
-				}
-			}
-		}
-	};
-
-	function calcDevotionTrustCost(slave) {
-		if (V.specialSlavesPriceOverride === 1) {
-			if (slave.devotion > 50) {
-				multiplier += slave.devotion/200;
-			}
-			if (slave.trust > 50) {
-				multiplier += slave.trust/200;
-			}
-		} else {
-			multiplier += slave.devotion/200;
-			if (slave.devotion < -20) {
-				if (slave.trust > 0) {
-					multiplier -= slave.trust/200;
-				}
-			} else {
-				if (slave.trust > 0) {
-					multiplier += slave.trust/200;
-				}
-			}
-		}
-	};
-
-	function calcPreferencesCost(slave) {
-		if (slave.behavioralFlaw !== "none") {
-			multiplier -= 0.1;
-		}
-		if (slave.behavioralQuirk !== "none") {
-			multiplier += 0.1;
-		}
-		if (slave.sexualFlaw === "breeder" && arcology.FSRepopulationFocus !== "unset") {
-			multiplier += 0.3;
-		} else if (slave.sexualFlaw !== "none") {
-			multiplier -= 0.1;
-		}
-		if (slave.sexualQuirk !== "none") {
-			multiplier += 0.1;
-		}
-		if (slave.fetishKnown === 1) {
-			if (slave.fetish === "mindbroken") {
-				multiplier -= 0.3;
-			} else if (slave.fetish !== "none") {
-				multiplier += slave.fetishStrength/1000;
-			}
-		} else {
-			multiplier -= 0.1;
-		}
-		if (slave.attrKnown === 1) {
-			if (slave.energy > 95) {
-				multiplier += 0.2;
-			}
-		}
-	};
-
-	function calcPregCost(slave) {
-		if (slave.mpreg === 1) {
-			multiplier += 0.2;
-		}
-		if (arcology.FSRepopulationFocusSMR === 1) {
-			if (slave.preg < -1) {
-				multiplier -= 0.5;
-			} else if (slave.bellyPreg >= 300000) {
-				multiplier += 1;
-			} else if (slave.bellyPreg >= 120000) {
-				multiplier += 0.5;
-			} else if (slave.preg > slave.pregData.normalBirth/4) {
-				multiplier += 0.1;
-			}
-		} else if (arcology.FSRestartSMR === 1) {
-			if (slave.preg < -1) {
-				multiplier += 0.5;
-			} else if (slave.bellyPreg >= 300000) {
-				multiplier -= 2.5;
-			} else if (slave.bellyPreg >= 30000) {
-				multiplier -= 1.5;
-			} else if (slave.preg > slave.pregData.normalBirth/4) {
-				multiplier -= 1.0;
-			}
-		} else {
-			if (slave.preg < -1) {
-				multiplier -= 0.1;
-			} else if (V.activeSlave.bellyPreg >= 300000) {
-				multiplier -= 1.5;
-			} else if (V.activeSlave.bellyPreg >= 120000) {
-				multiplier -= 0.5;
-			} else if (slave.bellyPreg >= 500 || slave.pregKnown == 1) {
-				multiplier -= 0.1;
-			}
-		}
-	};
-
-	function calcPrestigeCost(slave) {
-		if (slave.prestige > 0) {
-			multiplier += 0.7*slave.prestige;
-		}
-		if (slave.pornPrestige === 3) {
-			multiplier += 1.5;
-		} else if (slave.pornPrestige === 2) {
-			multiplier += 0.7;
-		} else if (slave.pornPrestige === 1) {
-			multiplier += 0.2;
-		}
-	};
-
-	function calcFSCost(slave) {
-		if (arcology.FSSupremacistLawME !== 0) {
-			if (slave.race !== arcology.FSSupremacistRace) {
-				multiplier -= 0.1;
-			}
-		}
-		if (arcology.FSSubjugationistLawME !== 0) {
-			if (slave.race === arcology.FSSubjugationistRace) {
-				multiplier -= 0.2;
-			}
-		}
-		if (arcology.FSRepopulationFocusSMR !== 0) {
-			if (slave.preg > 0) {
-				multiplier += 0.1;
-			}
-		} else if (arcology.FSRestartSMR !== 0) {
-			if (slave.dick > 0) {
-				multiplier -= 0.1;
-			}
-			if (slave.balls > 0) {
-				multiplier -= 0.2;
-			}
-			if (slave.vagina > 0) {
-				multiplier -= 0.1;
-			}
-			if (slave.ovaries > 0) {
-				multiplier -= 0.5;
-			}
-		}
-		if (arcology.FSGenderFundamentalistSMR !== 0) {
-			if (slave.dick > 0) {
-				multiplier -= 0.1;
-			}
-			if (slave.balls > 0) {
-				multiplier -= 0.1;
-			}
-		} else if (arcology.FSGenderRadicalist !== "unset") {
-			if (slave.dick > 0) {
-				multiplier += 0.1;
-			}
-			if (slave.balls > 0) {
-				multiplier -= 0.1;
-			}
-		}
-		if (arcology.FSHedonisticDecadenceSMR !== 0) {
-			if (slave.weight > 60 && slave.muscles < 5) {
-				multiplier += 0.1;
-			}
-		}
-		if (arcology.FSArabianRevivalist > 50) {
-			multiplier += 0.1;
-		}
-	};
-
-	function calcAgeCost(slave) {
-		if (slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset")) {
-			if (slave.birthWeek === 0) {
-				multiplier -= 0.4;
-			} else if (slave.birthWeek < 4) {
-				multiplier -= 0.1;
-			}
-		} else if (slave.physicalAge === V.minimumSlaveAge) {
-			if (slave.birthWeek === 0) {
-				multiplier -= 0.2;
-			} else if (slave.birthWeek < 4) {
-				multiplier -= 0.05;
-			}
-		} else if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset")) {
-			if (slave.birthWeek === 0) {
-				multiplier -= 0.2;
-			} else if (slave.birthWeek < 4) {
-				multiplier -= 0.05;
-			}
-		}
-	};
-
-	function calcCareersCost(slave) {
-		if (slave.career !== 0) {
-			if (slave.career === "a slave") {
-				multiplier += 0.1;
-			} else if (setup.bodyguardCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.wardenessCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.attendantCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.matronCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.schoolteacherCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.stewardessCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.milkmaidCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.farmerCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.madamCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.DJCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.HGCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.recruiterCareers.includes(slave.career)) {
-				multiplier += 0.1;
-			} else if (setup.entertainmentCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			} else if (setup.whoreCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			} else if (setup.gratefulCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			} else if (setup.menialCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			} else if (setup.servantCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			}
-		}
-		if (V.week-slave.weekAcquired >= 20 && slave.entertainSkill >= 100) {
-			if (!setup.entertainmentCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			}
-		}
-		if (slave.oralCount + slave.analCount + slave.vaginalCount + slave.mammaryCount + slave.penetrativeCount > 1000) {
-			if (!setup.whoreCareers.includes(slave.career)) {
-				multiplier += 0.05;
-			}
-		}
-		if (!setup.bodyguardCareers.includes(slave.career) && slave.skillBG >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.wardenessCareers.includes(slave.career) && slave.skillWA >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.attendantCareers.includes(slave.career) && slave.skillAT >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.matronCareers.includes(slave.career) && slave.skillMT >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.schoolteacherCareers.includes(slave.career) && slave.skillTE >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.stewardessCareers.includes(slave.career) && slave.skillST >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.milkmaidCareers.includes(slave.career) && slave.skillMM >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.farmerCareers.includes(slave.career) && slave.skillFA >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.madamCareers.includes(slave.career) && slave.skillMD >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.DJCareers.includes(slave.career) && slave.skillDJ >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.HGCareers.includes(slave.career) && slave.skillHG >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.recruiterCareers.includes(slave.career) && slave.skillRC >= V.masteredXP) {
-			multiplier += 0.1;
-		}
-		if (!setup.servantCareers.includes(slave.career) && slave.skillS >= V.masteredXP) {
-			multiplier += 0.05;
-		}
-		if (!setup.entertainmentCareers.includes(slave.career) && slave.skillE >= V.masteredXP) {
-			multiplier += 0.05;
-		}
-		if (!setup.whoreCareers.includes(slave.career) && slave.skillW >= V.masteredXP) {
-			multiplier += 0.05;
-		}
-	};
-
-	function calcMiscCost(slave) {
-		let totalInt = Math.clamp(slave.intelligence + slave.intelligenceImplant,-130,130); /* make absolutely certain we do not use +-131 in the next line */
-		multiplier += Math.floor((Math.asin(totalInt/131))*50)/50;
-		if (slave.pubertyXY === 0 && slave.physicalAge >= V.potencyAge && slave.genes === "XY" && arcology.FSGenderRadicalist === "unset") {
-			multiplier += 0.5;
-		}
-		if (slave.brand !== 0) {
-			if (V.rep > 10000) {
-				multiplier += 0.1;
-			} else if (V.rep < 5000) {
-				multiplier -= 0.1;
-			}
-		}
-		if (slave.amp === 1) {
-			multiplier -= 0.2;
-		}
-		if (slave.eyes === -2) {
-			multiplier -= 0.2;
-		}
-	};
-
-	function calcIndentureCost(slave) {
-		if (slave.indenture > -1) {
-			multiplier -= 0.1*slave.indentureRestrictions;
-			multiplier -= (260-slave.indenture)/260;
-		} else if (V.seeAge === 1) {
-			if (slave.actualAge >= (V.retirementAge-5) && V.PhysicalRetirementAgePolicy !== 1) {
-				multiplier *= (V.retirementAge-slave.actualAge)/5;
-			}
-			if (slave.physicalAge >= (V.retirementAge-5) && V.PhysicalRetirementAgePolicy === 1) {
-				multiplier *= (V.retirementAge-slave.actualAge)/5;
-			}
-		}
-	};
-
-	function calcCost(slave) {
-		cost *= multiplier*50;
-		cost = Number(cost) || 0;
-		if (cost < V.minimumSlaveCost) {
-			cost = V.minimumSlaveCost;
-		} else if (cost <= 100000) {
-			/* do nothing */
-		} else if (cost <= 200000) {
-			cost -= (cost-100000)*0.1;
-		} else if (cost <= 300000) {
-			cost -= 10000 + ((cost-200000)*0.2);
-		} else if (cost <= 400000) {
-			cost -= 30000 + ((cost-300000)*0.3);
-		} else if (cost <= 500000) {
-			cost -= 60000 + ((cost-400000)*0.4);
-		} else {
-			cost -= 100000 + ((cost-500000)*0.5);
-		}
-		if (cost < 1000) {
-			cost = 1000;
-		}
-		cost = 500*Math.trunc(cost/500);
-	};
-
-	function calcStartingSlaveCost(slave) {
-		let startingSlaveMultiplier = 0;
-
-		if (slave.devotion > 20) {
-			startingSlaveMultiplier += (0.000117*(slave.devotion-20)*(slave.devotion-20))+(0.003167*(slave.devotion-20));
-		}
-		if (slave.whoreSkill) {
-			startingSlaveMultiplier += 0.00001*slave.whoreSkill*slave.whoreSkill;
-		}
-		if (slave.entertainSkill) {
-			startingSlaveMultiplier += 0.00001*slave.entertainSkill*slave.entertainSkill;
-		}
-		if (slave.vaginalSkill) {
-			startingSlaveMultiplier += 0.00001*slave.vaginalSkill*slave.vaginalSkill;
-		}
-		if (slave.analSkill) {
-			startingSlaveMultiplier += 0.00001*slave.analSkill*slave.analSkill;
-		}
-		if (slave.oralSkill) {
-			startingSlaveMultiplier += 0.00001*slave.oralSkill*slave.oralSkill;
-		}
-		if (slave.combatSkill) {
-			startingSlaveMultiplier += 0.1;
-		}
-		if (slave.prestige) {
-			startingSlaveMultiplier += slave.prestige;
-		}
-		if (startingSlaveMultiplier) {
-			if (slave.actualAge > 25) {
-				startingSlaveMultiplier -= startingSlaveMultiplier*(slave.actualAge-25)*0.05;
-			}
-		}
-		startingSlaveMultiplier = Math.clamp(startingSlaveMultiplier, 0, 10);
-		cost += cost*startingSlaveMultiplier;
-		cost = 500*Math.trunc(cost/500);
-		if (V.PC.career === "slaver") {
-			cost = cost/2;
-		}
-	};
-
-	return slaveCost;
-})();
-
-window.startingSlaveCost = function startingSlaveCost(slave) {
-	return slaveCost(slave, true);
-};
diff --git a/devTools/convert_twscript_to_js.sh b/devTools/convert_twscript_to_js.sh
new file mode 100755
index 0000000000000000000000000000000000000000..25299d6e92d35478eda72dc6b2d006d4b411b2b0
--- /dev/null
+++ b/devTools/convert_twscript_to_js.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#converts files in the current dir
+
+# collect files with [script] tag
+FILES=`grep '\[script\]' -H -R * | cut -f 1 -d ':'`
+for f in $FILES; do
+	# create new name. Old name can have any of the following suffixes:
+	# _JS.tw  JS.tw .tw
+	nf="${f%_JS.tw}"
+	nf="${nf%JS.tw}"
+	nf="${nf%.tw}"
+	# we might end up with an empty name, then set dir name as the file name
+	[ -z "$(basename $nf)" -o "${nf: -1}" = "/" ] && nf="${nf}$(basename ${nf})"
+	# append the new suffix
+	nf="${nf}.js"
+	echo "renaming ${f} -> ${nf}"
+	# rename the file
+	git mv "${f}" "${nf}" || echo "renaming ${f} failed"
+	# strip Twee header from it
+	sed -i 1d "${nf}" || echo "stripping Twee header failed for ${nf}"
+	# strip leading empty line '/./,$!d'
+	sed -i '/./,$!d' "${nf}" || echo "Stripping leading empty blank lines failed for ${nf}"
+done
diff --git a/devTools/makeTwineJSPassage.bat b/devTools/makeTwineJSPassage.bat
new file mode 100644
index 0000000000000000000000000000000000000000..a7c7568c0d1521c51427394f21bcb3e147bcab71
--- /dev/null
+++ b/devTools/makeTwineJSPassage.bat
@@ -0,0 +1,23 @@
+@echo off
+:: Generates devNotes/twineJS.txt from all .js files in src/ subdir
+
+:: See if we can find a git installation
+setlocal enabledelayedexpansion
+
+for %%k in (HKCU HKLM) do (
+	for %%w in (\ \Wow6432Node\) do (
+		for /f "skip=2 delims=: tokens=1*" %%a in ('reg query "%%k\SOFTWARE%%wMicrosoft\Windows\CurrentVersion\Uninstall\Git_is1" /v InstallLocation 2^> nul') do (
+			for /f "tokens=3" %%z in ("%%a") do (
+				set GIT=%%z:%%b
+				set GITFOUND=yes
+				goto FOUND
+			)
+		)
+	)
+)
+
+:FOUND
+if %GITFOUND% == yes (
+	set "PATH=%GIT%bin;%PATH%"
+	bash --login -c ./makeTwineJSPassage.sh
+)
diff --git a/devTools/makeTwineJSPassage.sh b/devTools/makeTwineJSPassage.sh
new file mode 100755
index 0000000000000000000000000000000000000000..fe27af530671cbc8c89f0fe1bffa81e3b388bb00
--- /dev/null
+++ b/devTools/makeTwineJSPassage.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Generates devNotes/twine JS.txt from all .js files in src/ subdir
+
+# Joins all .js files from the current dir (recursive) into a Twee [script] passage
+# arguments:
+# $1: root repo dir
+# $2: output file name
+collectJSForTwine() {
+	echo ":: TwineJS [script]" > "$2"
+	find . -name '*.js' -exec echo -e "\n/* {} */\n" \; -a -exec sed -nf "$1"/devTools/stripComments.sed {} \; >> "$2"
+}
+
+ROOT_REPO_DIR="$(git rev-parse --show-toplevel)"
+cd "${ROOT_REPO_DIR}"/src
+collectJSForTwine "${ROOT_REPO_DIR}" "${ROOT_REPO_DIR}/devNotes/twine JS.txt"
diff --git a/devTools/stripComments.sed b/devTools/stripComments.sed
new file mode 100755
index 0000000000000000000000000000000000000000..c9ceb3dc0c37b50f2f2a429829c5c717e504b0a0
--- /dev/null
+++ b/devTools/stripComments.sed
@@ -0,0 +1,96 @@
+#! /bin/sed -nf
+
+# Remove C and C++ comments, by Brian Hiles (brian_hiles.com)
+
+# taken from https://bash.cyberciti.biz/academic/sed-remove-c-cpp-comments/
+
+# Sped up (and bugfixed to some extent) by Paolo Bonzini (bonzini.org)
+# Works its way through the line, copying to hold space the text up to the
+# first special character (/, ", ').  The original version went exactly a
+# character at a time, hence the greater speed of this one.  But the concept
+# and especially the trick of building the line in hold space are entirely
+# merit of Brian.
+
+:loop
+
+# This line is sufficient to remove C++ comments!
+/^\/\// s,.*,,
+
+/^$/{
+  x
+  p
+  n
+  b loop
+}
+/^"/{
+  :double
+  /^$/{
+    x
+    p
+    n
+    /^"/b break
+    b double
+  }
+
+  H
+  x
+  s,\n\(.[^\"]*\).*,\1,
+  x
+  s,.[^\"]*,,
+
+  /^"/b break
+  /^\\/{
+    H
+    x
+    s,\n\(.\).*,\1,
+    x
+    s/.//
+  }
+  b double
+}
+
+/^'/{
+  :single
+  /^$/{
+    x
+    p
+    n
+    /^'/b break
+    b single
+  }
+  H
+  x
+  s,\n\(.[^\']*\).*,\1,
+  x
+  s,.[^\']*,,
+
+  /^'/b break
+  /^\\/{
+    H
+    x
+    s,\n\(.\).*,\1,
+    x
+    s/.//
+  }
+  b single
+}
+
+/^\/\*/{
+  s/.//
+  :ccom
+  s,^.[^*]*,,
+  /^$/ n
+  /^\*\//{
+    s/..//
+    b loop
+  }
+  b ccom
+}
+
+:break
+H
+x
+s,\n\(.[^"'/]*\).*,\1,
+x
+s/.[^"'/]*//
+b loop
diff --git a/src/SpecialForce/JS.js b/src/SpecialForce/SpecialForce.js
similarity index 100%
rename from src/SpecialForce/JS.js
rename to src/SpecialForce/SpecialForce.js
diff --git a/src/art/artJS.tw b/src/art/art.js
similarity index 99%
rename from src/art/artJS.tw
rename to src/art/art.js
index 6158abe9e11b38216e0f68fc413f9251a12d88f2..0f5c2f9ce942999999ff55467d1717a547385a10 100644
--- a/src/art/artJS.tw
+++ b/src/art/art.js
@@ -1,5 +1,3 @@
-:: Art JS [script]
-
 window.ArtControlRendered = function ArtControlRendered(slave, sizePlacement) {
 	const V = State.variables;
 	let fileName = "'resources/renders/";
diff --git a/src/art/assistantArt.tw b/src/art/assistantArt.js
similarity index 99%
rename from src/art/assistantArt.tw
rename to src/art/assistantArt.js
index dd39d8be45c196c86e189c736d2240566b835199..b441c2fb827b246662cdf479524409867ac45260 100644
--- a/src/art/assistantArt.tw
+++ b/src/art/assistantArt.js
@@ -1,5 +1,3 @@
-:: Assistant Art JS [script]
-
 /*
 Displays assistant images. Currently passage-based.
 sizePlacement: Image size/center.
diff --git a/src/art/vector/Set_Colour_Outfit_JS.tw b/src/art/vector/Set_Colour_Outfit.js
similarity index 97%
rename from src/art/vector/Set_Colour_Outfit_JS.tw
rename to src/art/vector/Set_Colour_Outfit.js
index dee464deef3c8b205c6e4097894fa29371e1fd08..b48d35a8078bce83a423d3ed7f5671209b02cdd3 100644
--- a/src/art/vector/Set_Colour_Outfit_JS.tw
+++ b/src/art/vector/Set_Colour_Outfit.js
@@ -1,5 +1,3 @@
-:: Art_Vector_Set_Colour_Outfit_JS [script]
-
 window.Art_Vector_Set_Colour_Outfit = function(artSlave) {
 
 var s = {
diff --git a/src/art/vector/Set_Colour_Skin_JS.tw b/src/art/vector/Set_Colour_Skin.js
similarity index 99%
rename from src/art/vector/Set_Colour_Skin_JS.tw
rename to src/art/vector/Set_Colour_Skin.js
index 21caf1875f74ae3f1c3f5b3cf46620f8c78d592e..790667177f9c73853427d39531648686a2aafd2a 100644
--- a/src/art/vector/Set_Colour_Skin_JS.tw
+++ b/src/art/vector/Set_Colour_Skin.js
@@ -1,5 +1,3 @@
-:: Art_Vector_Set_Colour_Skin_JS [script]
-
 window.Art_Vector_Set_Colour_Skin = function(artSlave, outfitBaseColour) {
 
 /* create an aggregator object yielding all computed styles */
diff --git a/src/art/vector_revamp/vectorRevampedArtControlJS.tw b/src/art/vector_revamp/vectorRevampedArtControl.js
similarity index 99%
rename from src/art/vector_revamp/vectorRevampedArtControlJS.tw
rename to src/art/vector_revamp/vectorRevampedArtControl.js
index 72a9e372980636fd4ed8a23f6e4c20ac3a9817aa..1bc9c96030ae580fe5e39013bb20e16d58d8f856 100644
--- a/src/art/vector_revamp/vectorRevampedArtControlJS.tw
+++ b/src/art/vector_revamp/vectorRevampedArtControl.js
@@ -1,5 +1,3 @@
-:: Revamped Art Control [script]
-
 class ArtStyleEntry {
 	constructor(name) {
 		this.name = name;
diff --git a/src/config/sugarCubeConfig.tw b/src/config/sugarCubeConfig.js
similarity index 93%
rename from src/config/sugarCubeConfig.tw
rename to src/config/sugarCubeConfig.js
index 477f842262bcda4ec495c781ff99032c9bac344b..e8124b74e738fced334eed24d4e76ed18bb32381 100644
--- a/src/config/sugarCubeConfig.tw
+++ b/src/config/sugarCubeConfig.js
@@ -1,6 +1,3 @@
-:: SugarCube configuration [script]
-
-
 /* Main SugarCube configuration file. */
 
 /* Change the starting passage from the default 'start' to 'Alpha disclaimer'. */
diff --git a/src/debugging/debugJS.tw b/src/debugging/debug.js
similarity index 99%
rename from src/debugging/debugJS.tw
rename to src/debugging/debug.js
index a9c993ef2ea91326cde23640dd1464a64ad32f8e..e58085d898de4c1bfd67c8c06f808772c8ab439e 100644
--- a/src/debugging/debugJS.tw
+++ b/src/debugging/debug.js
@@ -1,5 +1,3 @@
-:: DebugJS [script]
-
 /*
 Given an object, this will return an array where for each property of the original object, we include the object
 {variable: property, oldVal: _oldDiff.property, newVal: _newDiff.property}
diff --git a/src/endWeek/saChoosesOwnClothes.tw b/src/endWeek/saChoosesOwnClothes.js
similarity index 99%
rename from src/endWeek/saChoosesOwnClothes.tw
rename to src/endWeek/saChoosesOwnClothes.js
index 40e99e6cf6deb66e9122c5783ff13e2b8bd6ad47..de58e03266c167c5853e5d26591cd55aaf6b71a2 100644
--- a/src/endWeek/saChoosesOwnClothes.tw
+++ b/src/endWeek/saChoosesOwnClothes.js
@@ -1,5 +1,3 @@
-:: saChoosesOwnClothes [script]
-
 window.saChoosesOwnClothes = (function() {
 	"use strict";
 	let V;
diff --git a/src/endWeek/saPornJS.tw b/src/endWeek/saPorn.js
similarity index 99%
rename from src/endWeek/saPornJS.tw
rename to src/endWeek/saPorn.js
index a8d5b27c92eb9a170a4ba96d35479e8f7c253aab..99cab8b193e15d1220139c1e26b560e2e0c623c1 100644
--- a/src/endWeek/saPornJS.tw
+++ b/src/endWeek/saPorn.js
@@ -1,5 +1,3 @@
-:: SA porn JS [script]
-
 /* to later be rolled into saPorn */
 
 window.getHighestPorn = function(slave) {
diff --git a/src/endWeek/saRest.tw b/src/endWeek/saRest.js
similarity index 99%
rename from src/endWeek/saRest.tw
rename to src/endWeek/saRest.js
index 7d989c883917eead9d333a409ad21571a4f3876a..f5688294be8c0470bc423f4da3c538b5404ae0ef 100644
--- a/src/endWeek/saRest.tw
+++ b/src/endWeek/saRest.js
@@ -1,5 +1,3 @@
-:: SA rest [script]
-
 window.saRest = function saRest(slave) {
 
 	var pronouns = getPronouns(slave);
diff --git a/src/endWeek/saServant.tw b/src/endWeek/saServant.js
similarity index 97%
rename from src/endWeek/saServant.tw
rename to src/endWeek/saServant.js
index 5f84d57b1e3c80371aa48d0e9ea1dafe12549e89..7de4c4983135bc0456ebadd8e1bde270d04d834f 100644
--- a/src/endWeek/saServant.tw
+++ b/src/endWeek/saServant.js
@@ -1,5 +1,3 @@
-:: SA servant [script]
-
 window.saServant = function saServant(slave) {
 
 	var pronouns = getPronouns(slave);
@@ -30,12 +28,12 @@ window.saServant = function saServant(slave) {
 				}
 				if (!(canHear(slave))) {
 					t += ` However, ${his} inability to hear often leaves ${him} oblivious to ${V.Stewardess.slaveName}'s orders, limiting their meaningful interactions.`;
-					cashX(V.stewardessBonus/4, "servantsQuarters", slave);
+					cashX(V.stewardessBonus/4, "houseServant", slave);
 				} else if ((slave.hears == -1 && slave.earwear != "hearing aids") || (slave.hears == 0 && slave.earwear == "muffling ear plugs")) {
 					t += ` However, ${he} often doesn't catch what ${V.Stewardess.slaveName} says, leading to frustration, confusion and less work done.`;
-					cashX(V.stewardessBonus/2, "servantsQuarters", slave);
+					cashX(V.stewardessBonus/2, "houseServant", slave);
 				} else {
-					cashX(V.stewardessBonus, "servantsQuarters", slave);
+					cashX(V.stewardessBonus, "houseServant", slave);
 				}
 			}
 		}
@@ -122,7 +120,7 @@ window.saServant = function saServant(slave) {
 			} else {
 				t += `an incident without lasting effect.`;
 			}
-			cashX(Math.trunc(V.FResult*_vignette.effect), "servantsQuarters", slave);
+			cashX(Math.trunc(V.FResult*_vignette.effect), "houseServant", slave);
 		} else if (_vignette.type == "devotion") {
 			if (_vignette.effect > 0) {
 				if (slave.devotion > 50) {
diff --git a/src/endWeek/saStayConfined.tw b/src/endWeek/saStayConfined.js
similarity index 99%
rename from src/endWeek/saStayConfined.tw
rename to src/endWeek/saStayConfined.js
index ba77cbcd68f462467da68f0b39fbed759bb34867..6ccc3d087fa9de453002fc32ccff0830c78c3cd7 100644
--- a/src/endWeek/saStayConfined.tw
+++ b/src/endWeek/saStayConfined.js
@@ -1,5 +1,3 @@
-:: SA stay confined [script]
-
 window.saStayConfined = function saStayConfined(slave) {
 
 	var pronouns = getPronouns(slave);
diff --git a/src/js/DefaultRules.tw b/src/js/DefaultRules.js
similarity index 99%
rename from src/js/DefaultRules.tw
rename to src/js/DefaultRules.js
index 443ab177c628a58fa71331f22d3152fdca4472f7..b723149cbc4271e4e93854c9cc3d62b63b803764 100644
--- a/src/js/DefaultRules.tw
+++ b/src/js/DefaultRules.js
@@ -1,4 +1,3 @@
-:: DefaultRules [script]
 // this code applies RA rules onto slaves
 
 window.DefaultRules = (function() {
diff --git a/src/js/PenthouseNaming.tw b/src/js/PenthouseNaming.js
similarity index 98%
rename from src/js/PenthouseNaming.tw
rename to src/js/PenthouseNaming.js
index 8bb274738a0da6de5a213df1f3fced01189aaed8..0bf340af6ff9896b7d2a0a1c9b16b9428891c09f 100644
--- a/src/js/PenthouseNaming.tw
+++ b/src/js/PenthouseNaming.js
@@ -1,5 +1,3 @@
-:: PenthouseNaming [script]
-
 window.MasterSuiteUIName = function() {
 	const V = State.variables;
 	var name = "";
diff --git a/src/js/SetBellySize.tw b/src/js/SetBellySize.js
similarity index 95%
rename from src/js/SetBellySize.tw
rename to src/js/SetBellySize.js
index 603d70c5185b74e75297658902eb8b897f460ba1..c003635b6a40282d6384b7f2d5a45e3f54993e39 100644
--- a/src/js/SetBellySize.tw
+++ b/src/js/SetBellySize.js
@@ -1,5 +1,3 @@
-:: SetBellySize [script]
-
 window.SetBellySize = function SetBellySize(slave) {
 
 	let _implantSize;
diff --git a/src/js/accordianJS.tw b/src/js/accordian.js
similarity index 97%
rename from src/js/accordianJS.tw
rename to src/js/accordian.js
index 67555db48225164444e9bc22487ce6b434b0b4d5..8946465faa6decdb6b0cd108f738e9244cd2a8b7 100644
--- a/src/js/accordianJS.tw
+++ b/src/js/accordian.js
@@ -1,5 +1,3 @@
-:: accordionJS.tw [script]
-
 /* Accordion 000-250-006 */
 
 /*
diff --git a/src/js/assayJS.tw b/src/js/assay.js
similarity index 99%
rename from src/js/assayJS.tw
rename to src/js/assay.js
index bbf29cb494f59e50b1900f638132d40fa1c17a15..5106e1815f59d5fafb4b0539c506ca0236ef5bdf 100644
--- a/src/js/assayJS.tw
+++ b/src/js/assay.js
@@ -1,5 +1,3 @@
-:: AssayJS [script]
-
 window.isSlim = function(slave) {
 	let slim = false;
 	const ArcologyZero = State.variables.arcologies[0];
diff --git a/src/js/assignJS.tw b/src/js/assign.js
similarity index 99%
rename from src/js/assignJS.tw
rename to src/js/assign.js
index 1665ef1787eb7df60fd98e7b72c771cc67fe93f8..dd58152a1d5cebed72bd73fe9876a4e2e911f4cb 100644
--- a/src/js/assignJS.tw
+++ b/src/js/assign.js
@@ -1,5 +1,3 @@
-:: assignJob [script]
-
 window.assignJob = function assignJob(slave, job) {
 	"use strict";
 	const V = State.variables;
diff --git a/src/js/birthJS.tw b/src/js/birth.js
similarity index 99%
rename from src/js/birthJS.tw
rename to src/js/birth.js
index 86e5522eee98ac84fb18450659555a466f6fb1f2..dfda1b3e0168045e8fdec53773594c3173d1e2c6 100644
--- a/src/js/birthJS.tw
+++ b/src/js/birth.js
@@ -1,5 +1,3 @@
-:: birthJS [script]
-
 window.BirthDestinationText = function(choice,slave) {
 	var pronouns = getPronouns(slave);
 	var he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
diff --git a/src/js/bugReport.tw b/src/js/bugReport.js
similarity index 99%
rename from src/js/bugReport.tw
rename to src/js/bugReport.js
index 60d34860a380ef0b4b7c556be0dd5c90d0848506..b0ace2e4ef770bcdae25c20171e29f4fdcefeee8 100644
--- a/src/js/bugReport.tw
+++ b/src/js/bugReport.js
@@ -1,4 +1,2 @@
-:: Bug Report [script]
-
 /*! <<bugreport>> macro for SugarCube 2.x */
 !function(){"use strict";if("undefined"==typeof version||"undefined"==typeof version.title||"SugarCube"!==version.title||"undefined"==typeof version.major||version.major<2)throw new Error("<<bugreport>> macro requires SugarCube 2.0 or greater, aborting load");Macro.add("bugreport",{handler:function(){function serializeVariables(varObj,diffObj,doSort){function renderDiff(diff,orig){for(var keys=Object.keys(diff||{}),render=orig?clone(orig):{},i=0,klen=keys.length;klen>i;i++){var p=keys[i],diffP=diff[p];if(diffP===Diff.Op.Delete)delete render[p];else if(Array.isArray(diffP))switch(diffP[0]){case Diff.Op.SpliceArray:try{render.splice(diffP[1],1+(diffP[2]-diffP[1]))}catch(e){}break;case Diff.Op.Copy:render[p]=clone(diffP[1]);break;case Diff.Op.CopyDate:render[p]=new Date(diffP[1])}else{var recurse=renderDiff(diffP,render[p]);0!==Object.keys(recurse).length&&(render[p]=recurse)}}return render}var varList=[],diff=renderDiff(Diff.diff(varObj,diffObj));for(var p in diff){var sName="$"+(-1===p.search(/[^\w]/)?p:'"'+p+'"');varList.push(sName+"="+JSON.stringify(diff[p]))}return doSort&&("function"==typeof doSort?varList.sort(doSort):varList.sort()),0!==varList.length?varList.join(", "):""}var srcMatch,passages,varsPre,varsPost,dialog,dataEl,info=null!=this.args[0]&&Story.has(this.args[0])?Story.get(this.args[0]):null,last=State.length-1,source=unescape(window.location);null!==(srcMatch=/\/([^\/]+)$/.exec(source))&&(source=srcMatch[1]),passages=[];for(var i=0;last>=i;i++)passages.push('"'+State.index(i).title+'"');passages=passages.join(", "),varsPre=serializeVariables(State.index(0).variables,State.index(last).variables),varsPost=serializeVariables(State.index(last).variables,State.variables),dialog=UI.setup("Bug Report","bugreport"),dialog.innerHTML=(null!==info?'<div id="bugreport-info"></div>':"")+'<div><b>Bug report:</b> <a id="bugreport-data-select" class="link-internal macro-bugreport">[Select]</a></div><code id="bugreport-data" tabindex="0"></code>'+(/applewebkit|chrome/.test(Browser.userAgent)?"":'<div class="scroll-pad">&nbsp;</div>'),dataEl=dialog.querySelector("#bugreport-data"),null!==info&&new Wikifier(dialog.querySelector("#bugreport-info"),info.processText()),addAccessibleClickHandler("#bugreport-data-select",function(self){return function(){jQuery(dataEl).focus(),self.selectData(dataEl)}}(this.self)),insertText(dataEl,"[spoiler][code]"),insertElement(dataEl,"br"),insertText(dataEl,"SOURCE: "+source),insertElement(dataEl,"br"),insertElement(dataEl,"br"),insertText(dataEl,"PASSAGES:"),insertElement(dataEl,"br"),insertText(dataEl,passages),insertElement(dataEl,"br"),insertElement(dataEl,"br"),insertText(dataEl,"VARIABLES (PRE-EXECUTION):"),insertElement(dataEl,"br"),varsPre&&(insertText(dataEl,varsPre),insertElement(dataEl,"br")),insertElement(dataEl,"br"),insertText(dataEl,"VARIABLES (POST-EXECUTION):"),insertElement(dataEl,"br"),varsPost&&(insertText(dataEl,varsPost),insertElement(dataEl,"br")),insertText(dataEl,"[/code][/spoiler]"),UI.open()},selectData:function(e){var s,r;if(window.getSelection){s=window.getSelection();if(s.setBaseAndExtent){var l=(e.innerText.length>1)?e.innerText.length-1:1;try{s.setBaseAndExtent(e,0,e,l)}catch(error){r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else{if(window.opera&&e.innerHTML.substring(e.innerHTML.length-4)==='<br>'){e.innerHTML=e.innerHTML+'&nbsp;'}var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else if(document.getSelection){s=document.getSelection();r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}else if(document.selection){r=document.body.createTextRange();r.moveToElementText(e);r.select()}}})}();
diff --git a/src/js/colorModeJS.tw b/src/js/colorMode.js
similarity index 97%
rename from src/js/colorModeJS.tw
rename to src/js/colorMode.js
index ca282973d7cf7f1bf6c10c200044770a53158697..f5b61a7b863209187ad0c80e00beeb610cfb5528 100644
--- a/src/js/colorModeJS.tw
+++ b/src/js/colorMode.js
@@ -1,5 +1,3 @@
-:: colorModeJS [script]
-
 window.flipColors = function (lightColorMap){
 	if ( !window.savedColorMap ){
 		window.savedColorMap = setColors(lightColorMap);
diff --git a/src/js/dTree.min.tw b/src/js/dTree.min.js
similarity index 99%
rename from src/js/dTree.min.tw
rename to src/js/dTree.min.js
index 0338634d37402e3d1f61486acc658ac3725df6d4..b29089b88995fe7df6cab432f07f2e71d7f2e090 100644
--- a/src/js/dTree.min.tw
+++ b/src/js/dTree.min.js
@@ -1,4 +1,3 @@
-:: DTreeJS [script]
 /* This is the minified version of lodash, d3 and dTree */
 ;
 (function (window, define, exports) {
diff --git a/src/js/datatypeCleanupJS.tw b/src/js/datatypeCleanup.js
similarity index 99%
rename from src/js/datatypeCleanupJS.tw
rename to src/js/datatypeCleanup.js
index 63307a7559b62ddca122a495d94ce6786e1da8e6..c033d0c26e8f3547b5a5657a275c1526a43e8be2 100644
--- a/src/js/datatypeCleanupJS.tw
+++ b/src/js/datatypeCleanup.js
@@ -1,5 +1,3 @@
-:: Datatype Cleanup JS [script]
-
 /*
 	This function does not ensure values make sense. For example, it does not fix weird relations/relationships/rivalries/pregnancies/prosthetics.
 	It only makes sure most datatypes are correct, and sets to default if not. Number values are clamped to the correct bounds.
diff --git a/src/js/displayVariables.tw b/src/js/displayVariables.js
similarity index 98%
rename from src/js/displayVariables.tw
rename to src/js/displayVariables.js
index 0876395eaaa5548d1ba3832ad6e5f26e07ceb8c4..c153952509e31eab3818533944d8eaf82e651061 100644
--- a/src/js/displayVariables.tw
+++ b/src/js/displayVariables.js
@@ -1,4 +1,2 @@
-:: Display Variables [script]
-
 /*! <<checkvars>> macro for SugarCube 2.x */
 !function(){"use strict";if("undefined"==typeof version||"undefined"==typeof version.title||"SugarCube"!==version.title||"undefined"==typeof version.major||version.major<2)throw new Error("<<checkvars>> macro requires SugarCube 2.0 or greater, aborting load");Macro.add("checkvars",{handler:function(){function toString(value,indent){var baseType=typeof value;switch(baseType){case"number":return isNaN(value)?"NaN":isFinite(value)?String(value):"Infinity";case"string":return JSON.stringify(value);case"function":return"(function)";default:if("object"!==baseType||null==value)return String(value);var objType=Object.prototype.toString.call(value);if("[object Date]"===objType)return'(object: Date, value: "'+value.toISOString()+'")';if("[object RegExp]"===objType)return"(object: RegExp, value: "+value.toString()+")";var opener,closer,result=[],indentText="  ";return indent||(indent=""),("[object Set]"===objType||value instanceof Set)&&(value=Array.from(value)),Array.isArray(value)?(opener="[\n",closer="\n"+indent+"]",value.forEach(function(p,i){result.push(indent+indentText+i+" ⇒ "+toString(value[i],indent+indentText))}),Object.keys(value).forEach(function(p){/^\d+$/.test(p)||result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})):"[object Map]"===objType||value instanceof Map?(opener="{\n",closer="\n"+indent+"}",Array.from(value).map(function(kv){result.push(indent+indentText+toString(kv[0],indent+indentText)+" ⇒ "+toString(kv[1],indent+indentText))})):(opener="{\n",closer="\n"+indent+"}",Object.keys(value).forEach(function(p){result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})),opener+result.join(",\n")+closer}}var dialog,sv=State.variables,names=Object.keys(sv);if(dialog=UI.setup("Story $variables","checkvars"),0===names.length)return dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><p><em>No $variables currently set…</em></p>",void UI.open();dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><table><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody></tbody></table>"+(/applewebkit|chrome/.test(Browser.userAgent)?"":'<div class="scroll-pad">&nbsp;</div>');var tbody=dialog.querySelector("tbody");names.sort(function(a,b){return Util.isNumeric(a)&&Util.isNumeric(b)?Number(a)-Number(b):a.localeCompare(b)});for(var i=0;i<names.length;i++){var tr=document.createElement("tr"),tdName=document.createElement("td"),tdValue=document.createElement("td");tdName.textContent="$"+names[i],tdValue.textContent = toString(sv[names[i]]),tr.appendChild(tdName),tr.appendChild(tdValue),tbody.appendChild(tr)}UI.open()}})}();
diff --git a/src/js/economyJS.tw b/src/js/economy.js
similarity index 98%
rename from src/js/economyJS.tw
rename to src/js/economy.js
index b4ee0cec07ba86552f87bfb1efd954aa66fa271c..21983bcdc886a0e82dc7188982cac95ca50864a3 100644
--- a/src/js/economyJS.tw
+++ b/src/js/economy.js
@@ -1,5 +1,3 @@
-:: EconomyJS [script]
-
 window.LivingRule = Object.freeze({LUXURIOUS: 'luxurious', NORMAL: 'normal', SPARE: 'spare'});
 window.Job = Object.freeze({
 	DAIRY: 'work in the dairy', MILKMAID: 'be the Milkmaid', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your Concubine',
@@ -95,12 +93,12 @@ window.getCost = function(array) {
 	
 	
 	//these two apply a multiplicative effect to all costs so far.
-	// Calculate what the deduced expenses would be, then subtract 
+	// Calculate what the deduced expenses would be, then subtract
 	costSoFar = (oldCash - State.variables.cash); //How much we have spent by this point; expected to be positive.
-	cashX(forceNeg(costSoFar - getEnvironmentCosts(costSoFar), "environment")); //getEnv takes total costs and makes it worse.  Figure out how much worse and record it
+	cashX(costSoFar - getEnvironmentCosts(costSoFar), "environment"); //getEnv takes total costs and makes it worse.  Figure out how much worse and record it
 
 	costSoFar = (oldCash - State.variables.cash);
-	cashX(forceNeg(costSoFar - getPCMultiplierCosts(costSoFar)), "PCskills");
+	cashX(costSoFar - getPCMultiplierCosts(costSoFar), "PCskills");
 
 	//in the old order these were applied after multiplication.  Not sure if deliberate, but I'm leaving it for now.
 	cashX(forceNeg(getSFCosts()), "specialForces");
@@ -126,7 +124,7 @@ window.getTotalSlaveCosts = function(array3) {
 		slaveCost = getSlaveCost(slave);
 		cashX(forceNeg(slaveCost), "slaveUpkeep", slave);
 		slaveCostMinor = getSlaveMinorCosts(slave);
-		cashX(forceNeg(slaveCostMinor), "slaveUpkeep", slave);
+		cashX(Math.abs(slaveCostMinor), "houseServant", slave);
 	}
 	//nothing to return, cashX already billed.
 };
diff --git a/src/js/eventSelectionJS.tw b/src/js/eventSelection.js
similarity index 99%
rename from src/js/eventSelectionJS.tw
rename to src/js/eventSelection.js
index a9797ef3270ddfefb59c43133605840259998bd5..5365e1d048e1eec21caa02754bbfd62e7312293b 100644
--- a/src/js/eventSelectionJS.tw
+++ b/src/js/eventSelection.js
@@ -1,5 +1,3 @@
-:: EventSelectionJS [script]
-
 window.generateRandomEventPoolStandard = function(eventSlave) {
 
 /* STANDARD EVENTS */
diff --git a/src/js/extendedFamilyModeJS.tw b/src/js/extendedFamilyMode.js
similarity index 99%
rename from src/js/extendedFamilyModeJS.tw
rename to src/js/extendedFamilyMode.js
index 442370b0363b89c79d3efffa1aca433ece258029..64b0ffd1242bbe6dda6c6ea7272cc116ee3bfe01 100644
--- a/src/js/extendedFamilyModeJS.tw
+++ b/src/js/extendedFamilyMode.js
@@ -1,5 +1,3 @@
-:: Extended Family Mode JS [script]
-
 /* see documentation for details /devNotes/Extended Family Mode Explained.txt */
 
 window.isMotherP = function isMotherP(daughter, mother) {
diff --git a/src/js/familyTree.tw b/src/js/familyTree.js
similarity index 99%
rename from src/js/familyTree.tw
rename to src/js/familyTree.js
index 6cf960120fba00c4f96f0ced269cc202c6f26aa9..655c2d9542597d74a013138b13962093a80e2b0e 100644
--- a/src/js/familyTree.tw
+++ b/src/js/familyTree.js
@@ -1,4 +1,3 @@
-:: FamilyTreeJS [script]
 'use strict';
 
 var lastActiveSlave, lastSlaves, lastPC;
diff --git a/src/js/foreachMacroJS.tw b/src/js/foreachMacro.js
similarity index 98%
rename from src/js/foreachMacroJS.tw
rename to src/js/foreachMacro.js
index 7453ee70cff5b43bd8b42b6424c6106c6da096b4..be77e940d959104e722baf5fcc8401f2d96642fe 100644
--- a/src/js/foreachMacroJS.tw
+++ b/src/js/foreachMacro.js
@@ -1,5 +1,3 @@
-:: Foreach Macro JS [script]
-
 Macro.add('foreach', {
 	skipArgs : true,
 	tags : null,
diff --git a/src/js/generateGenetics.tw b/src/js/generateGenetics.js
similarity index 99%
rename from src/js/generateGenetics.tw
rename to src/js/generateGenetics.js
index 3a450dd1961cefdfd52e53e5dc43822424ca726d..4121ddfe06ae529b2bc5e9a10e1f325baeb497c8 100644
--- a/src/js/generateGenetics.tw
+++ b/src/js/generateGenetics.js
@@ -1,5 +1,3 @@
-:: generateGenetics [script]
-
 // Generates a child's genetics based off mother and father and returns it as an object to be attached to an ovum
 window.generateGenetics = (function() {
 	"use strict";
diff --git a/src/js/generateNewSlaveJS.tw b/src/js/generateNewSlave.js
similarity index 99%
rename from src/js/generateNewSlaveJS.tw
rename to src/js/generateNewSlave.js
index 4953ae85561e89ad654e101f95f6849b84decf7b..deabc979139087027ca202f5732d2a466b3c395a 100644
--- a/src/js/generateNewSlaveJS.tw
+++ b/src/js/generateNewSlave.js
@@ -1,5 +1,3 @@
-:: Generate New Slave JS [script]
-
 window.GenerateNewSlave = (function(){
 	'use strict';
 	let V, slave, chance;
diff --git a/src/js/hTagMacroJS.tw b/src/js/hTagMacro.js
similarity index 98%
rename from src/js/hTagMacroJS.tw
rename to src/js/hTagMacro.js
index 25a3d459fef6ba3a6b1ae957d84331baa34301e0..1f4eaa36511f8c7fc1c955a01d44179843905177 100644
--- a/src/js/hTagMacroJS.tw
+++ b/src/js/hTagMacro.js
@@ -1,5 +1,3 @@
-:: HTAG Macro JS [script]
-
 /*
  * <<htag>> macro
  * A simple macro which allows to create wrapping html elements with dynamic IDs.
diff --git a/src/js/heroCreator.tw b/src/js/heroCreator.js
similarity index 87%
rename from src/js/heroCreator.tw
rename to src/js/heroCreator.js
index 8d2d7c9c8b9696cae77c41d4d2304862333cacd9..ae2ef6d1ca40e02d7a0ee7981071ae6cc00325ab 100644
--- a/src/js/heroCreator.tw
+++ b/src/js/heroCreator.js
@@ -1,5 +1,3 @@
-:: heroCreator.tw [script]
-
 window.getHeroSlave = function(heroSlave, baseHeroSlave) {
 	var newSlave = clone(baseHeroSlave);
 	for (var attrname in heroSlave) {
diff --git a/src/js/itemAvailability.tw b/src/js/itemAvailability.js
similarity index 99%
rename from src/js/itemAvailability.tw
rename to src/js/itemAvailability.js
index 0f585e7ba5ef5f8e97d65eaddcdcf6c7b008a658..77b5c003f266839e3bae3e0858ddf21f99a23b1e 100644
--- a/src/js/itemAvailability.tw
+++ b/src/js/itemAvailability.js
@@ -1,5 +1,3 @@
-:: itemAvailability [script]
-
 /* intended to condense the clothing/toy/etc availability checks into something less asinine */
 window.isItemAccessible = function(string) {
 	const V = State.variables;
diff --git a/src/js/pregJS.tw b/src/js/preg.js
similarity index 99%
rename from src/js/pregJS.tw
rename to src/js/preg.js
index df33cb05f7a269084df82b7e859b96d273ce3162..fca26a406d00e987335e4ab3fd5a1f68e578f658 100644
--- a/src/js/pregJS.tw
+++ b/src/js/preg.js
@@ -1,5 +1,3 @@
-:: pregJS [script]
-
 /* Major props to the anons who worked together to forge the Super Pregnancy Project. Let your legacy go unforgotten.*/
 window.getPregBellySize = function(s) {
 	var gestastionWeek = s.preg;
diff --git a/src/js/quickListJS.tw b/src/js/quickList.js
similarity index 99%
rename from src/js/quickListJS.tw
rename to src/js/quickList.js
index 01df5cb51692910cca8849211ea75104dfe8f142..0a57d7c224c6c72047b6ae9260542e85dcebcccc 100644
--- a/src/js/quickListJS.tw
+++ b/src/js/quickList.js
@@ -1,5 +1,3 @@
-:: Quick List [script]
-
 window.sortDomObjects = function (objects, attrName, reverse = 0) {
 	reverse = (reverse) ? -1 : 1;
 	function sortingByAttr (a, b) {
diff --git a/src/js/rbuttonJS.tw b/src/js/rbutton.js
similarity index 99%
rename from src/js/rbuttonJS.tw
rename to src/js/rbutton.js
index 1c842ff6b94513bd663953000c14123b9a54a39a..aee998bf910a3a1f4e8883835d61bd5e06e27cd6 100644
--- a/src/js/rbuttonJS.tw
+++ b/src/js/rbutton.js
@@ -1,4 +1,3 @@
-:: rbuttonJS [script]
 /* This is modified radiobutton macro, for automatic checked state setup*/
 /* Usage (be sure to use quotes around parameters):
 
diff --git a/src/js/relationshipChecks.tw b/src/js/relationshipChecks.js
similarity index 96%
rename from src/js/relationshipChecks.tw
rename to src/js/relationshipChecks.js
index 765e2fea22caadd97c46490f100482591d3d35f3..c4cea47b7e7cb532bca120125e47af891a954242 100644
--- a/src/js/relationshipChecks.tw
+++ b/src/js/relationshipChecks.js
@@ -1,4 +1,3 @@
-:: relationshipChecks [script]
 window.rivalryTerm = function(id) {
 	if (id.rivalry === 1) {
 		return `growing rival`;
diff --git a/src/js/removeActiveSlave.tw b/src/js/removeActiveSlave.js
similarity index 99%
rename from src/js/removeActiveSlave.tw
rename to src/js/removeActiveSlave.js
index 6bffe5cd3840f950c37aaed69c02e09eba4d5ac5..b28dc6a6760416185ae9760f12ebba966443083d 100644
--- a/src/js/removeActiveSlave.tw
+++ b/src/js/removeActiveSlave.js
@@ -1,5 +1,3 @@
-:: Remove activeSlave JS [script]
-
 window.removeActiveSlave = function removeActiveSlave() {
 	"use strict";
 	const V = State.variables;
diff --git a/src/js/rulesAssistant.tw b/src/js/rulesAssistant.js
similarity index 99%
rename from src/js/rulesAssistant.tw
rename to src/js/rulesAssistant.js
index f496cdbb87f7c4fa67cb445b27257a44f7263ee5..285bde3f7ffe451fda671d11b7f514820b33ba9c 100644
--- a/src/js/rulesAssistant.tw
+++ b/src/js/rulesAssistant.js
@@ -1,5 +1,3 @@
-:: rulesAssistant [script]
-
 window.hasSurgeryRule = function(slave, rules) {
 	return rules.some(
 		rule => ruleApplied(slave, rule) && rule.set.autoSurgery > 0);
diff --git a/src/js/rulesAssistantOptions.tw b/src/js/rulesAssistantOptions.js
similarity index 99%
rename from src/js/rulesAssistantOptions.tw
rename to src/js/rulesAssistantOptions.js
index e3860e426e1b9fd6c018aaba52a9191a0e0b32f9..50d2fbfde1906f65ca78e48f406fca51015498e7 100644
--- a/src/js/rulesAssistantOptions.tw
+++ b/src/js/rulesAssistantOptions.js
@@ -1,4 +1,3 @@
-:: Rules Assistant Options [script]
 // rewrite of the rules assistant options page in javascript
 // uses an object-oriented widget pattern
 // wrapped in a closure so as not to pollute the global namespace
diff --git a/src/js/rulesAutosurgery.tw b/src/js/rulesAutosurgery.js
similarity index 99%
rename from src/js/rulesAutosurgery.tw
rename to src/js/rulesAutosurgery.js
index 0152b2c95f8b141c8c142df5c3eec7a4a511a01c..c74aefbf7146208424f9013d25d95d50d6b41f72 100644
--- a/src/js/rulesAutosurgery.tw
+++ b/src/js/rulesAutosurgery.js
@@ -1,5 +1,3 @@
-:: rules autosurgery js [script]
-
 window.rulesAutosurgery = (function() {
 	"use strict";
 	let V;
diff --git a/src/js/sexActsJS.tw b/src/js/sexActs.js
similarity index 99%
rename from src/js/sexActsJS.tw
rename to src/js/sexActs.js
index 420660a76b21f960d69b057f38e468d45ad35bd8..55d0306dd4b2e9622a73f8a1c353ca8fa048ebd4 100644
--- a/src/js/sexActsJS.tw
+++ b/src/js/sexActs.js
@@ -1,5 +1,3 @@
-:: sexActJS[script]
-
 /*
  times is how many times to increment the anal counts.
  if left undefined it will assume it to be 1.
diff --git a/src/js/slaveCostJS.tw b/src/js/slaveCost.js
similarity index 99%
rename from src/js/slaveCostJS.tw
rename to src/js/slaveCost.js
index 3a12643876a064efe85fc43f407bca14818fd8c0..4a562f3f88fbc766dd7c2ea51aa9014b0e341da0 100644
--- a/src/js/slaveCostJS.tw
+++ b/src/js/slaveCost.js
@@ -1,5 +1,3 @@
-:: Slave Cost JS [script]
-
 window.Beauty = (function() {
 	"use strict";
 	let V, arcology, beauty;
diff --git a/src/js/slaveGenerationJS.tw b/src/js/slaveGeneration.js
similarity index 99%
rename from src/js/slaveGenerationJS.tw
rename to src/js/slaveGeneration.js
index e9aa0247ffbbd76bb3d12adab22191692fc141ce..9e03b7e2e94cc8a78a6af1f306a7683fa6c9bfc9 100644
--- a/src/js/slaveGenerationJS.tw
+++ b/src/js/slaveGeneration.js
@@ -1,5 +1,3 @@
-:: Slave Generation JS [script]
-
 window.nationalityToRace = function nationalityToRace(slave) {
 	slave.race = hashChoice(setup.raceSelector[slave.nationality] || setup.raceSelector[""]);
 };
diff --git a/src/js/slaveSummaryWidgets.tw b/src/js/slaveSummaryWidgets.js
similarity index 99%
rename from src/js/slaveSummaryWidgets.tw
rename to src/js/slaveSummaryWidgets.js
index 560fd3dc2d0b3b3867afc7914b1bc4593f22892c..9da602b0a2362154697b5951716dc5506719019c 100644
--- a/src/js/slaveSummaryWidgets.tw
+++ b/src/js/slaveSummaryWidgets.js
@@ -1,5 +1,3 @@
-:: Slave Summary Widgets JS [script]
-
 window.clearSummaryCache = function clearSummaryCache(slave) {
 	if (!slave)
 		setup.summaryCache = {};
diff --git a/src/js/spanMacroJS.tw b/src/js/spanMacro.js
similarity index 96%
rename from src/js/spanMacroJS.tw
rename to src/js/spanMacro.js
index 47dd2b5c19b63077c28f83d0e7bb5896079e57c6..dead2c13ec466c0cdd881e9c6e75af14ecd84691 100644
--- a/src/js/spanMacroJS.tw
+++ b/src/js/spanMacro.js
@@ -1,5 +1,3 @@
-:: Span Macro JS [script]
-
 /*
  * <<span>> macro
  * A minimal macro which allows to create <span> elements with dynamic IDs.
diff --git a/src/js/storyJS.tw b/src/js/story.js
similarity index 99%
rename from src/js/storyJS.tw
rename to src/js/story.js
index a209bd90ae2f0e10a66357dac9f818e53ef33be2..2680a4e5a98391c16a0f453423b3b274db5546c9 100644
--- a/src/js/storyJS.tw
+++ b/src/js/story.js
@@ -1,5 +1,3 @@
-:: StoryJS [script]
-
 /*config.history.tracking = false;*/
 State.expired.disable;
 
diff --git a/src/js/summaryWidgets.tw b/src/js/summaryWidgets.js
similarity index 98%
rename from src/js/summaryWidgets.tw
rename to src/js/summaryWidgets.js
index b9cc28479bc4bfc08269aca4f8228a7412b29269..b55dd53271467e82bce356b34525d3a96e157aac 100644
--- a/src/js/summaryWidgets.tw
+++ b/src/js/summaryWidgets.js
@@ -1,5 +1,3 @@
-:: Summary Widgets JS [script]
-
 window.SlaveStatClamp = function SlaveStatClamp(slave) {
 	slave.energy = Math.clamp(slave.energy, 0, 100);
 	const V = State.variables;
diff --git a/src/js/textInput.tw b/src/js/textInput.js
similarity index 98%
rename from src/js/textInput.tw
rename to src/js/textInput.js
index 35a28459f906cb9d05623368b5b6a08f6175e23c..86d6eebae8327921825d050c38d03b02e984af42 100644
--- a/src/js/textInput.tw
+++ b/src/js/textInput.js
@@ -1,5 +1,3 @@
-:: textinput [script]
-
 Macro.add("textinput", {
 	// Signifies that the macro is a container macro.
 	tags: null,
diff --git a/src/js/textboxJS.tw b/src/js/textbox.js
similarity index 97%
rename from src/js/textboxJS.tw
rename to src/js/textbox.js
index 225dcfe50c078a603d3310aece0c4015e52f51aa..5dd0388fe6f3338e9e3df74875c5ee4610b5bf91 100644
--- a/src/js/textboxJS.tw
+++ b/src/js/textbox.js
@@ -1,5 +1,3 @@
-:: textboxJS [script]
-
 /* Nicked off greyelf, works for replace textboxes */
 window.setReplaceTextboxMaxLength = function (storyVarName, maxLength) {
 	var textboxId = '#textbox-' + Util.slugify(storyVarName);
diff --git a/src/js/utilJS.tw b/src/js/util.js
similarity index 99%
rename from src/js/utilJS.tw
rename to src/js/util.js
index 93e31243712dbb5ae06368716b8e3831596d6e0e..db4777860e71b7717a860efbe31c64ba23d13634 100644
--- a/src/js/utilJS.tw
+++ b/src/js/util.js
@@ -1,5 +1,3 @@
-:: UtilJS [script]
-
 /*
  * Height.mean(nationality, race, genes, age) - returns the mean height for the given combination and age in years (>=2)
  * Height.mean(nationality, race, genes) - returns the mean adult height for the given combination
diff --git a/src/js/vignettes.tw b/src/js/vignettes.js
similarity index 99%
rename from src/js/vignettes.tw
rename to src/js/vignettes.js
index 20046ade726a59b60c8cf40f429f9233104d99fd..c9a0edd22f13cf4773e054ab1e854fe356f59aeb 100644
--- a/src/js/vignettes.tw
+++ b/src/js/vignettes.js
@@ -1,5 +1,3 @@
-:: VignettesJS [script]
-
 window.GetVignette = function GetVignette(slave) {
 	const V = State.variables;
 	let vignettes = [];
diff --git a/src/js/walkPastJS.tw b/src/js/walkPast.js
similarity index 99%
rename from src/js/walkPastJS.tw
rename to src/js/walkPast.js
index 05f749b3523c546c983376fdeadaf2848332bc86..6636d9892ba2aa39ffb92508521eac6a3284c17f 100644
--- a/src/js/walkPastJS.tw
+++ b/src/js/walkPast.js
@@ -1,5 +1,3 @@
-:: Walk Past JS [script]
-
 /* temporary container until the entire thing is complete. No point in not deploying the working functions, you know? */
 
 window.primeSlave = function(activeSlave, seed) {
diff --git a/src/js/wombJS.tw b/src/js/womb.js
similarity index 99%
rename from src/js/wombJS.tw
rename to src/js/womb.js
index b8a1d2a22f4f32bc5823300d91a124e6fb6f500a..754a330c09054e476639c3dadd79023558278d12 100644
--- a/src/js/wombJS.tw
+++ b/src/js/womb.js
@@ -1,5 +1,3 @@
-:: wombJS [script]
-
 /*
 This is a womb processor/simulator script. It takes care of calculation of belly sizes based on individual fetus sizes, with full support of broodmothers implant random turning on and off possibility. Also this can be expanded to store more parents data in each individual fetus in future.
 Design limitations:
diff --git a/src/pregmod/Jquery/JS.tw b/src/pregmod/Jquery/Jquery.js
similarity index 99%
rename from src/pregmod/Jquery/JS.tw
rename to src/pregmod/Jquery/Jquery.js
index 11083196707bd337c77f0f07884607402b619530..cb826d7932b6309c249b2eb3a86ace3037f90065 100644
--- a/src/pregmod/Jquery/JS.tw
+++ b/src/pregmod/Jquery/Jquery.js
@@ -1,4 +1,3 @@
-:: JQuery UI [script]
 (function (window, define, exports) {
 /*! jQuery UI - v1.12.1 - 2016-09-14
 * http://jqueryui.com
diff --git a/src/pregmod/seFCTVshows.tw b/src/pregmod/seFCTVshows.tw
index 74a2873fc0bcb01ace9c51f581c98bf8d5396291..38e27835803ddda0f4ce64e8250b9a759e0786a3 100644
--- a/src/pregmod/seFCTVshows.tw
+++ b/src/pregmod/seFCTVshows.tw
@@ -628,7 +628,8 @@ The offered price is <<print cashFormat($slaveCost)>>.
 		<span id="called">
 			<<link "Place an order">>
 				<<replace #called>>
-					<<set $purchasedSagBGone = 1, cashX(-50, "PCmedical"),>>
+					<<set $purchasedSagBGone = 1>>
+					<<run cashX(-50, "PCmedical")>>
 					Your order should arrive by next week. If the advertisement is to be believed, all you need to do is rub the cream into your breasts several times a day and it will ward off sagging.
 				<</replace>>
 			<</link>> // This will cost <<print cashFormat(50)>> //
diff --git a/src/uncategorized/costsBudget.tw b/src/uncategorized/costsBudget.tw
index a510fb74aed9eb5afb0eea275c30e9ca1e72a069..fd8914d6b9080ac13a432d5181c3928dbaeffac8 100644
--- a/src/uncategorized/costsBudget.tw
+++ b/src/uncategorized/costsBudget.tw
@@ -356,7 +356,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 	//Slaves working in these buildings have their profits reported in "jobs".//
 	</tr>
 
-	<<if $brothel > 0>>
+	<<if $lastWeeksCashIncome.brothel || $lastWeeksCashExpenses.brothel>>
 		<tr>
 			<td>[[$brothelNameCaps|Brothel][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($brothelSlaves slaves)</td>
 			<td>
@@ -416,7 +416,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $club > 0>>
+	<<if $lastWeeksCashIncome.club || $lastWeeksCashExpenses.club>>
 		<tr>
 			<td>[[$clubNameCaps|Club][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clubSlaves slaves)</td>
 			<td>
@@ -476,7 +476,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $arcade > 0>>
+	<<if $lastWeeksCashIncome.arcade || $lastWeeksCashExpenses.arcade>>
 	<tr>
 		<td>[[$arcadeNameCaps|Arcade][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($arcadeSlaves slaves)</td>
 		<td>
@@ -504,7 +504,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 	</tr>
 	<</if>>
 
-	<<if $dairy > 0>>
+	<<if $lastWeeksCashIncome.dairy || $lastWeeksCashExpenses.dairy>>
 		<tr>
 			<td>[[$dairyNameCaps|Dairy][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($dairySlaves slaves)</td>
 			<td>
@@ -534,7 +534,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if ($servantsQuarters > 0) && ($servantsQuartersUpgradeMonitoring > 0)>>
+	<<if $lastWeeksCashIncome.servantsQuarters || $lastWeeksCashExpenses.servantsQuarters>>
 		<tr>
 			<td>[[Servants' Quarters][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($servantsQuartersSlaves slaves)</td>
 			<td>
@@ -564,7 +564,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if ($masterSuiteUpgradePregnancy == 1)>>
+	<<if $lastWeeksCashIncome.masterSuite || $lastWeeksCashExpenses.masterSuite>>
 		<tr>
 			<td>[[Master Suite][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($masterSuiteSlaves slaves)</td>
 			<td>
@@ -594,7 +594,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $schoolroom>>
+	<<if $lastWeeksCashIncome.school || $lastWeeksCashExpenses.school>>
 		<tr>
 			<td>[[$schoolroomNameCaps|Schoolroom][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($schoolroomSlaves slaves)</td>
 			<td>
@@ -624,7 +624,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $spa>>
+	<<if $lastWeeksCashIncome.spa || $lastWeeksCashExpenses.spa>>
 		<tr>
 			<td>[[$spaNameCaps|Spa][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($spaSlaves slaves)</td>
 			<td>
@@ -654,7 +654,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $clinic>>
+	<<if $lastWeeksCashIncome.clinic || $lastWeeksCashExpenses.clinic>>
 		<tr>
 			<td>[[$clinicNameCaps|Clinic][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clinicSlaves slaves)</td>
 			<td>
@@ -684,7 +684,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $cellblock>>
+	<<if $lastWeeksCashIncome.cellblock || $lastWeeksCashExpenses.cellblock>>
 		<tr>
 			<td>[[$cellblockNameCaps|Cellblock][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($cellblockSlaves slaves)</td>
 			<td>
@@ -714,7 +714,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $researchLab.built == "true">>
+	<<if $lastWeeksCashIncome.lab || $lastWeeksCashExpenses.lab>>
 		<tr>
 			<td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] maintenance</td>
 			<td>
@@ -749,10 +749,10 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		<</if>>
 		<<if $researchLab.menials != 0>>
 			<tr>
-				<td><i>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($researchLab.menials menial Slaves)</i></td>
+				<td><i>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($researchLab.menials menial slaves)</i></td>
 				<td></td>
 				<td><i>@@.red;-+<<print cashFormat(Math.trunc(100*$researchLab.menials))>>@@</i></td>
-				<td><i>@@.red;-<<print cashFormat(Math.abs(Math.trunc(100*$researchLab.)menials))>>@@</i></td>
+				<td><i>@@.red;-<<print cashFormat(Math.abs(Math.trunc(100*$researchLab.menials))>>@@</i></td>
 			</tr>
 		<</if>>
 	<</if>>
@@ -790,7 +790,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $incubator>>
+	<<if $lastWeeksCashIncome.incubator || $lastWeeksCashExpenses.incubator>>
 		<tr>
 			<td>[[$incubatorNameCaps|Incubator][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($incubatorSlaves slaves)</td>
 			<td>
@@ -820,7 +820,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $nursery>>
+	<<if $lastWeeksCashIncome.nursery || $lastWeeksCashExpenses.nursery>>
 		<tr>
 			<td>[[$nurseryNameCaps|Nursery][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($nurserySlaves slaves)</td>
 			<td>
@@ -850,7 +850,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $farmyard>>
+	<<if $lastWeeksCashIncome.farmyard || $lastWeeksCashExpenses.farmyard>>
 		<tr>
 			<td>[[$farmyardNameCaps|Farmyard][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($farmyardSlaves slaves)</td>
 			<td>
@@ -880,7 +880,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-	<<if $pit>>
+	<<if $lastWeeksCashIncome.pit || $lastWeeksCashExpenses.pit>>
 		<tr>
 			<td>[[$pitNameCaps|Pit][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($fighterIDs.length slaves)</td>
 			<td>
@@ -1186,6 +1186,66 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
+	<<if $lastWeeksCashIncome.fuckdollsTransfer || $lastWeeksCashExpenses.fuckdollsTransfer>>
+		<tr>
+			<td>Fuckdolls: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping</td>
+			<td>
+				<<if Math.trunc($lastWeeksCashIncome.fuckdollsTransfer) > 0>>
+					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>@@
+				<<else>>
+					<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>
+				<</if>>
+			</td>
+			<td>
+				<<if Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer) < 0>>
+					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer)))>>@@
+				<<else>>
+					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer))>>
+				<</if>>
+			</td>
+			<td>
+				<<set $lastWeeksCashProfits.fuckdollsTransfer = ($lastWeeksCashIncome.fuckdollsTransfer + $lastWeeksCashExpenses.fuckdollsTransfer)>>
+				<<if $lastWeeksCashProfits.fuckdollsTransfer > 0>>
+					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@
+				<<elseif Math.trunc($lastWeeksCashProfits.fuckdollsTransfer) == 0>>
+					<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>
+				<<else>>
+					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer)))>>@@
+				<</if>>
+			</td>
+		</tr>
+	<</if>>
+
+	<<if $lastWeeksCashIncome.menialBioreactorsTransfer || $lastWeeksCashExpenses.menialBioreactorsTransfer>>
+		<tr>
+			<td>Bioreactors: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping</td>
+			<td>
+				<<if Math.trunc($lastWeeksCashIncome.menialBioreactorsTransfer) > 0>>
+					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactorsTransfer))>>@@
+				<<else>>
+					<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactorsTransfer))>>
+				<</if>>
+			</td>
+			<td>
+				<<if Math.trunc($lastWeeksCashExpenses.menialBioreactorsTransfer) < 0>>
+					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.menialBioreactorsTransfer)))>>@@
+				<<else>>
+					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactorsTransfer))>>
+				<</if>>
+			</td>
+			<td>
+				<<set $lastWeeksCashProfits.menialBioreactorsTransfer = ($lastWeeksCashIncome.menialBioreactorsTransfer + $lastWeeksCashExpenses.menialBioreactorsTransfer)>>
+				<<if $lastWeeksCashProfits.menialBioreactorsTransfer > 0>>
+					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer))>>@@
+				<<elseif Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer) == 0>>
+					<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer))>>
+				<<else>>
+					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer)))>>@@
+				<</if>>
+			</td>
+		</tr>
+	<</if>>
+
 	<<if ($lastWeeksCashIncome.menialTrades) || ($lastWeeksCashExpenses.menialTrades)>>
 		<tr>
 			<td>Menials: labor</td>
@@ -1306,8 +1366,6 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-
-
 	<<if $lastWeeksCashIncome.porn || $lastWeeksCashExpenses.porn>>
 		<tr>
 			<td>Porn</td>
@@ -1368,8 +1426,6 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 		</tr>
 	<</if>>
 
-
-
 	<<if $lastWeeksCashIncome.slaveTransfer || $lastWeeksCashExpenses.slaveTransfer>>
 		<tr>
 			<td>Buying/Selling Major Slaves</td>
@@ -1742,7 +1798,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 	<tr>
 		<td>
 			Your rents
-			<<if $lastWeeksCashExpenses.rents > 0>>
+			<<if $lastWeeksCashExpenses.rents < 0>>
 				and bribes
 			<</if>>
 		</td>
diff --git a/src/uncategorized/pMercenaryRomeo.tw b/src/uncategorized/pMercenaryRomeo.tw
index 20d98fc16019b9212f894f50f0c09b2bd4c775cc..c397d77f68f938141519a92f1c19e5cd90342245 100644
--- a/src/uncategorized/pMercenaryRomeo.tw
+++ b/src/uncategorized/pMercenaryRomeo.tw
@@ -20,7 +20,6 @@
 <</if>>
 <<if ndef $activeSlave>>
 	<<set _name = setup.whiteAmericanSlaveNames.random()>>
-	<<setNonlocalPronouns $seeDicks>>
 <</if>>
 
 <<if _name == 0>>
@@ -52,6 +51,7 @@ proffered by an attentive slave girl, he seems almost bashful.
 
 "<<= properTitle()>>, I'll say this straight. I'd like to buy one of your slaves.
 <<if _name != 0>>
+	<<setNonlocalPronouns $seeDicks>>
 	I've been seeing _name a lot, and _heU makes the years sit a little lighter on me. I've scraped together what I can, and I can pay <<print cashFormat(50000)>>." It's a huge sum for a mercenary; it's probably his entire savings, but there is a slight problem; the slave he is looking for isn't one of yours. "Well then," he says in embarrassment, "Have to say this is a little awkward." He gives a fake cough, "You wouldn't happen to, you know, know who _hisU owner is?" You shake your head. A run in with a _girlU named _name isn't much to go by and it really isn't your problem. "Ah well, I'm sure I'll see _himU around again. Anyway, that was a fine victory the other day, <<= properTitle()>>; come down to the bar and join the boys and I. We'll buy you a drink. Devil knows, thanks to you we can afford to. Hell, maybe you'll even get to meet _name too, get to see just how much of a looker _heU is."
 	<<unset $romeoID>>
 <<else>>
diff --git a/src/uncategorized/reRelationshipAdvice.tw b/src/uncategorized/reRelationshipAdvice.tw
index 21f1f74668b7d731829942f89f04fb1c88ee4a9f..543a5c432860654f65d9700aefe1f6bb138504bb 100644
--- a/src/uncategorized/reRelationshipAdvice.tw
+++ b/src/uncategorized/reRelationshipAdvice.tw
@@ -8,6 +8,19 @@
 <<set $subSlave = $slaves[_i]>>
 <<setLocalPronouns $subSlave 2>>
 
+<span id="artFrame">
+/* 000-250-006 */
+<<if $seeImages == 1>>
+	<div class="imageRef medImg">
+		<<SlaveArt $activeSlave 2 0>>
+	</div>
+	<div class="imageRef medImg">
+		<<SlaveArt $subSlave 2 0>>
+	</div>
+<</if>>
+/* 000-250-006 */
+</span>
+
 <<EventNameLink $activeSlave>> is standing for an inspection. $He's a good $girl, and is cooperating, but $he seems preoccupied. After ignoring it for a while, you give in to curiosity and flatly ask $him what's going on. "I'm <<s>>orry, <<Master>>," $he <<if SlaveStatsChecker.checkForLisp($activeSlave)>>lisp<<else>>mutter<</if>>s, biting $his lip. "It'<<s>> $subSlave.slaveName."
 $He hesitates, so you prompt $him, asking if $he's having trouble with $his
 <<if $activeSlave.relationship == 2>>
diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw
index 8f42ef9a5dcbd2e6954d322fe7be8925f73298c8..b5a7031558e34ce1dd51006c57dcb7ccf777b65c 100644
--- a/src/uncategorized/reputation.tw
+++ b/src/uncategorized/reputation.tw
@@ -539,7 +539,7 @@ On formal occasions, you are announced as $PCTitle.
 <</if>>
 
 <<if ($arcologies[0].FSRepopulationFocus != "unset") && ($birthsTotal > 0)>>
-	The number of children you've bought into the world @@.green;pleases@@ your citizens.
+	The number of children you've brought into the world @@.green;pleases@@ your citizens.
 	<<if $birthsTotal < 1000>>
 		<<set $rep += $birthsTotal>>
 	<<else>>