Comparing version 0.1.9 to 0.2.0
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var e=["itching","paralysis","fear","brokenrightarm","brokenleftarm","brokenrightleg","brokenleftleg","lapsingconsciousness","aeon","lovers","confusion","epilepsy","pacified","blackout","dazed","justice","slashedthroat","hellsight","peace","dazzled","shyness","dizziness","slickness","asthma","nausea","selarnia","weariness","scytherus","haemophilia","clumsiness","hallucinations","healthleech","dementia","recklessness","anorexia","masochism","impatience","stupidity","generosity","addiction","deadening","manaleech","stuttering","paranoia","agoraphobia","loneliness","claustrophobia","vertigo","hypersomnia","shivering","frozen","burning","sensitivity","hypochondria","lethargy","disloyalty","darkshade","voyria","dissonance","phlogisticated","silver","spiritburn","tenderskin","guilt","skullfractures","wristfractures","crackedribs","torntendons","indifference","retribution","shadowmadness","parasite","depression","timeloop","crushedthroat","tension","unweavingspirit","grievouswounds","pyramides","flushings","rebbies","mycalium","sandfever"],r={ferrum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ferrum",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},magnesium:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat magnesium",order:["paralysis","slickness","pyramides"],prio:0},aurum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat aurum",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},calamine:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat calamine",order:["undeaf","deafness"],delay:2.5,prio:0},argentum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat argentum",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},cuprum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat cuprum",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},antimony:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat antimony",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},arsenic:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat arsenic",order:["unblind"],prio:0},stannum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat stannum",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},plumbum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],command:"eat plumbum",prio:0},calcite:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat calcite",prio:0},ginseng:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginseng",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},bloodroot:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bloodroot",order:["paralysis","slickness","pyramides"],prio:0},kelp:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat kelp",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},hawthorn:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat hawthorn",order:["undeaf","deafness"],delay:2.5,prio:0},lobelia:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat lobelia",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},bellwort:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bellwort",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},ginger:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginger",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},bayberry:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bayberry",order:["unblind"],prio:0},ash:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ash",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},goldenseal:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat goldenseal",order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],prio:0},pear:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat pear",prio:0},smoke:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","disloyalty","hellsight","manaleech","slickness","deadening","tension","unweavingspirit"],prio:0},cinnabar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","deadening","tension","unweavingspirit"],prio:0},malachite:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke malachite",prio:0},realgar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke realgar",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},elm:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke elm",order:["aeon","deadening","tension","unweavingspirit"],prio:0},skullcap:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke skullcap",prio:0},valerian:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke valerian",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},caloric:{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply caloric",order:["frozen","shivering"],prio:0},"epidermal to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to body",order:["anorexia"],prio:0},"epidermal to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to head",order:["blindness","scalded","deafness"],prio:0},"epidermal to ears":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to ears",order:["deafness"],prio:0},"mending to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to head",order:["crushedthroat","dazzled"],prio:0},"mending to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to arms",order:["brokenleftarm","brokenrightarm"],prio:0},"mending to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to legs",order:["brokenleftleg","brokenrightleg"],prio:0},"mending to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to torso",order:["burning"],prio:0},"restoration to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to head",order:["mangledhead","damagedhead","calcifiedskull","concussion","tonguetied"],delay:4,prio:0},"restoration to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to torso",order:["hypothermia","heartseed","serioustrauma","mildtrauma","calcifiedtorso"],delay:4,prio:0},"restoration to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to arms",order:["mangledleftarm","mangledrightarm","damagedleftarm","damagedrightarm"],delay:4,prio:0},"restoration to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to legs",order:["mangledleftleg","mangledrightleg","damagedleftleg","damagedrightleg"],delay:4,prio:0},insomnia:{bals_req:["free"],bals_used:["free"],blocks:["hypersomnia","sleeping"],command:"insomnia",order:["insomnia"],prio:0},focus:{bals_req:["focus"],bals_used:["focus"],blocks:["impatience","sleeping"],command:"focus",order:["stupidity","epilepsy","dizziness","shyness","claustrophobia","paranoia","confusion","hallucinations","dementia","pacified","peace","lovers","generosity","masochism","loneliness","vertigo","recklessness","agoraphobia","anorexia","stuttering"],prio:0},"health to head":{bals_req:["sip"],bals_used:["sip"],command:"apply health to head",order:["skullfractures"],prio:0},"health to torso":{bals_req:["sip"],bals_used:["sip"],command:"apply health to torso",order:["crackedribs","grievouswounds"],prio:0},"health to arms":{bals_req:["sip"],bals_used:["sip"],command:"apply health to arms",order:["wristfractures"],prio:0},"health to legs":{bals_req:["sip"],bals_used:["sip"],command:"apply health to legs",order:["torntendons","latched","kkractlebrand"],prio:0},concentrate:{blocks:["sleeping","confusion"],command:"concentrate",order:["disrupted"],prio:0},immunity:{bals_req:["immunity"],bals_used:["immunity"],blocks:["sleeping","anorexia"],command:"sip immunity",order:["voyria"],prio:0},stand:{bals_req:["balance","equilibrium"],blocks:["death","sleeping","paralysis","brokenrightleg","brokenleftleg","damagedleftleg","damagedrightleg","mangledrightleg","mangledleftleg","entangled","transfixation","impaled","webbed","bound"],command:"stand",order:["prone"],prio:0},tree:{bals_used:["tree"],bals_req:["tree"],blocks:["death","sleeping","paralysis",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],command:"touch tree",order:e,prio:0},health:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip health",prio:0},mana:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip mana",prio:0},potash:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat potash",prio:0},moss:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat moss",prio:0},fitness:{bals_req:["equilibrium","balance","fitness"],bals_used:["balance","fitness"],blocks:["weariness","sleeping"],skills:["Monk","Runewarden"],command:"fitness",order:["asthma"],prio:0},bloodboil:{bals_req:["equilibrium","balance","bloodboil"],bals_used:["equilibrium","bloodboil"],blocks:["death","haemophilia","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Magi"],command:"cast bloodboil",order:e,prio:0},restore:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"restore",order:["brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","skullfractures","torntendons","wristfractures","crackedribs"],prio:0},dragonflex:{bals_req:["balance"],bals_used:["balance"],command:"dragonflex",skills:["Dragon"],order:["webbed","entangled"],prio:0},dragonheal:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:e,prio:0},dwinnu:{bals_req:["voice"],bals_used:["voice"],command:"chant dwinnu",skills:["Bard"],order:["webbed","entangled"],prio:0},rage:{bals_req:["rage"],bals_used:["rage"],command:"rage",skills:["Runewarden"],order:["pacified","peace","lovers","generosity"],prio:95},salt:{bals_req:["equilibrium","salt"],bals_used:["salt","equilibrium"],blocks:["stupidity","sleeping"],skills:["Alchemist"],command:"educe salt",order:e,prio:0},siphon:{bals_req:["angel"],bals_used:["angel"],blocks:["sleeping"],skills:["Apostate","Priest"],command:"educe salt",order:e,prio:0},shrugging:{bals_req:["equilibrium","balance","shrugging"],bals_used:["shrugging"],blocks:["weariness","sleeping"],skills:["Serpent"],command:"shrugging",order:e,prio:0},slough:{bals_req:["equilibrium","balance","slough"],bals_used:["slough","balance"],blocks:["weariness","sleeping"],skills:["Fire Elemental Lord"],command:"slough impurities",order:e,prio:0},fool:{bals_req:["equilibrium","balance","fool"],bals_used:["fool","balance"],blocks:["death","prone","paralysis","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Occultist"],command:"fling fool at me",order:e,prio:0},alleviate:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:["paralysis","sleeping"],skills:["Blademaster"],command:"alleviate",order:e,prio:0},sun:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:["Runewarden","Occultist"],command:"sun",order:e,prio:0},generic:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:[],command:"sun",order:e,prio:0}};function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var a=0;a<r.length;a++){var n=r[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var t=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this._name=r,this._enabled=!1,this._t_started=0,this._t_ended=0,this._timerId=0,this._default_length=n,this.setLength(n),this._callbacks=[]}var r,t,s;return r=e,(t=[{key:"length",get:function(){return this._t_length}},{key:"setLength",value:function(e){this._t_length=e,this._t_length_ms=1e3*e}},{key:"reset",value:function(){this.setLength(this._default_length)}},{key:"start",value:function(){this._enabled&&clearTimeout(this._timerId),this._timerId=setTimeout(this.stop.bind(this),this._t_length_ms),this._t_started=performance.now()/1e3,this._enabled=!0}},{key:"stop",value:function(){if(this._enabled&&(clearTimeout(this._timerId),this._t_ended=performance.now()/1e3,this._enabled=!1,this._callbacks))for(var e=0;e<this._callbacks.length;e++)this._callbacks[e](this._t_ended-this._t_started)}},{key:"duration",value:function(){return this._enabled?this.elapsed():this._t_ended-this._t_started}},{key:"elapsed",value:function(){return this._enabled?performance.now()/1e3-this._t_started:0}},{key:"remaining",value:function(){return this._enabled?this._t_length-performance.now()/1e3-this._t_started:0}},{key:"addCallback",value:function(e){this._callbacks.push(e)}},{key:"clearCallbacks",value:function(){this._callbacks=[]}}])&&n(r.prototype,t),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),e}(),s=t,i={},o=function(e){var a=[];Object.keys(r).forEach((function(n){var t;(null===(t=r[n].order)||void 0===t?void 0:t.indexOf(e))>-1&&a.push(n)}));var n={name:e,probability:0,cures:a,have:!1,got:function(){var r;i[e].have=!0,i[e].probability=1,eventStream.raiseEvent("insightGotAff",i[e]),eventStream.raiseEvent("insightGot".concat(e),i[e]),null===(r=i[e].timer)||void 0===r||r.start()},lost:function(){var r;i[e].have=!1,i[e].probability=0,eventStream.raiseEvent("insightLostAff",i[e]),eventStream.raiseEvent("insightLost".concat(e),i[e]),null===(r=i[e].timer)||void 0===r||r.stop()},reset:function(){var r;i[e].have=!1,i[e].probability=0,null===(r=i[e].timer)||void 0===r||r.stop()}};return Object.keys(c).indexOf(e)>-1&&(n.timer=new s("insightTimer".concat(e),c[e].duration),n.timer.addCallback(n.reset)),n},l=["undeaf","unblind","cleanseaura","addiction","aeon","agoraphobia","airfisted","amnesia","anorexia","asphyxiating","asthma","blackout","bleeding","blindness","blistered","bloodfire","bound","brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","bruisedribs","burning","cadmuscurse","calcifiedskull","calcifiedtorso","claustrophobia","clumsiness","coldfate","concussion","condemned","conflagration","confusion","constricted","corruption","crackedribs","cremated","crushedthroat","daeggerimpale","damagedhead","damagedleftarm","damagedleftleg","damagedrightarm","damagedrightleg","darkshade","dazed","dazzled","deadening","deafness","death","deathsickness","deepsleep","degenerate","dehydrated","dementia","demonstain","depression","deteriorate","disloyalty","disrupted","dissonance","dizziness","empoweredmannaz","empoweredloshre","enlightenment","enmesh","ensorcelled","entangled","epilepsy","fear","flamefisted","flushings","frozen","generosity","grievouswounds","guilt","hamstrung","haemophilia","hallucinations","hatred","healthleech","heartseed","hecatecurse","hellsight","hindered","homunculusmercury","horror","hypersomnia","hypochondria","hypothermia","icefisted","impaled","impatience","indifference","inquisition","insomnia","internalbleeding","isolation","itching","justice","kaisurge","kkractlebrand","laceratedthroat","lapsingconsciousness","latched","lethargy","lightbind","loneliness","lovers","lullaby","manaleech","masochism","mildtrauma","mangledleftarm","mangledleftleg","mangledrightarm","mangledrightleg","mangledhead","mindclamp","mindravaged","muddled","mycalium","nausea","numbedleftarm","numbedrightarm","pacified","palpatarfeed","paralysis","paranoia","parasite","peace","penitence","petrified","phlogisticated","pinshot","pressure","prone","pyramides","pyre","rebbies","recklessness","retribution","revealed","sandfever","scalded","scrambledbrains","scytherus","selarnia","sensitivity","serioustrauma","shadowmadness","shivering","shyness","silenced","silver","skullfractures","slashedthroat","sleeping","slickness","slimeobscure","solarburn","spiritburn","stun","stupidity","stuttering","temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine","tenderskin","tension","timeflux","timeloop","tonguetied","torntendons","transfixation","trueblind","unweavingbody","unweavingmind","unweavingspirit","vertigo","vinewreathed","vitiated","vitrified","voidfisted","voyria","waterbonds","weakenedmind","weariness","webbed","whisperingmadness","wristfractures","unconsciousness","harmonic","bop","spiritwrack","bedevil","loki","moon","evileye","dragoncurse","swiftcurse"],c={test:{duration:10},weakenedmind:{duration:60},slimeobscure:{duration:30},palpatarfeed:{duration:20},cleanseaura:{duration:6}};l.forEach((function(e){i[e]=o(e)}));function d(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function m(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var h={},u={insomnia:!0,kola:!0,speed:!0,shield:!0,rebounding:!0,prismatic:!0,cloak:!0,fangbarrier:!0},b=function(){Object.assign(h,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?d(Object(a),!0).forEach((function(r){m(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},u))};function g(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function p(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var f={},y={hp:2e4,mana:2e4,hpMax:2e4,manaMax:2e4,hpPercent:1,manaPercent:1,soulmaster:!1,enlightened:!1,mentalCount:0,physicalCount:0},v=function(){Object.assign(f,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?g(Object(a),!0).forEach((function(r){p(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},y))},k={mentals:["claustrophobia","agoraphobia","lovers","dementia","epilepsy","hallucinations","confusion","stupidity","paranoia","vertigo","shyness","addiction","recklessness","masochism"],physicals:["asthma","paralysis","slickness","haemophilia","clumsiness","healthleech","sensitivity","darkshade"],bubonis:["vertigo","recklessness","confusion","masochism","paranoia","shyness","claustrophobia"],chimera:["confusion","hallucinations","agoraphobia","claustrophobia","dementia"],moon:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy","claustrophobia","agoraphobia"],whisperingmadness:["dementia","stupidity","confusion","hypersomnia","paranoia","hallucinations","impatience","addiction","agoraphobia","lovers","loneliness","recklessness","masochism"]};function _(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,r){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=w(e))||r&&e&&"number"==typeof e.length){a&&(e=a);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return i=e.done,e},e:function(e){o=!0,s=e},f:function(){try{i||null==a.return||a.return()}finally{if(o)throw s}}}}function w(e,r){if(e){if("string"==typeof e)return O(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?O(e,r):void 0}}function O(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,n=new Array(r);a<r;a++)n[a]=e[a];return n}var j=i,q=[[]],x=[],E=[],P={},A={id:""},S=function(e){j[e].got();var r,a=N(q);try{for(a.s();!(r=a.n()).done;){var n=r.value;n.includes(e)||n.push(e)}}catch(e){a.e(e)}finally{a.f()}E.push(e),L()},D=function(e){j[e].lost(),q.forEach((function(r){var a=r.indexOf(e);a>-1&&r.splice(a,1)})),T(),L()},z=function(e){var a,n=N(r[e].order);try{for(n.s();!(a=n.n()).done;){var t=a.value;if(1===i[t].probability)return D(t),!0}}catch(e){n.e(e)}finally{n.f()}return!1},T=function(){var e=!1,r=q;!1===e&&(r.sort(),e=!0);for(var a=function(e){if(r.length>1&&r.length%e==0){for(var a=!0,n=0;n<r.length;n+=e)if(!C(r.slice(n,n+e))){a=!1;break}if(a){for(var t=r.length-(e-1);t>-1;t-=e)r.splice(t,e-1);return r.sort(),!0}return!1}return!1};!0===a(2););[9,7,5,3].forEach((function(e){a(e)}))},L=function(){var e=_(new Set(q.flat())),r=x.filter((function(r){return!e.includes(r)}));r.length>0&&r.forEach((function(e){return j[e].lost()})),(x=e).forEach((function(e){j[e].probability=parseFloat((Math.round(100*function(e){return q.filter((function(r){return r.includes(e)})).length/q.length}(e))/100).toFixed(2))})),eventStream.raiseEvent("insightUpdateAffs")},M=function(e,r){return e.length===r.length&&(e.sort(),r.sort(),!!e.every((function(e,a){return e===r[a]})))},C=function(e){for(var r=1;r<e.length;r++)if(!M(e[0],e[r]))return!1;return!0},H=S,I=D,R=function(e){if(r[e].bals_used.includes("salve")&&z(e))console.log("salveCure() true return");else{var a=r[e].order,n=[],t=!1;q.forEach((function(e){if(e.find((function(e){return a.includes(e)}))){t=!0;var r,s=N(e);try{var i=function(){var t=r.value;if(a.includes(t)){var s=e.filter((function(e){return e!==t}));s.length>0&&n.push(s)}};for(s.s();!(r=s.n()).done;)i()}catch(e){s.e(e)}finally{s.f()}}})),t&&(q=n.length>0?n:[[]]),T(),L(),E.push(e)}},G=function(e){var r=[];e.forEach((function(e){i[e].have=!0;var a,n=N(_(q.map((function(e){return e.slice(0)}))));try{for(n.s();!(a=n.n()).done;){var t=a.value;t.includes(e)||t.push(e),r.push(t)}}catch(e){n.e(e)}finally{n.f()}})),q=r.length>0?r:[[]],T(),L()},B=function(e){var r=[];e.forEach((function(e){i[e].have=!0;var a,n=N(_(q.map((function(e){return e.slice(0)}))));try{for(n.s();!(a=n.n()).done;){var t=a.value;t.includes(e)||(t.push(e),r.push(t.sort()))}}catch(e){n.e(e)}finally{n.f()}})),q.forEach((function(a){e.every((function(e){return a.includes(e)}))&&r.push(a.sort())})),r.length>0&&(q=r),T(),L()},F=function(e){var r,a=[],n=N(_(q.map((function(e){return e.slice(0)}))));try{for(n.s();!(r=n.n()).done;){var t,s=r.value,o=N(e);try{for(o.s();!(t=o.n()).done;){var l=t.value;if(!s.includes(l)){i[l].have=!0,s.push(l),a.push(s.sort());break}}}catch(e){o.e(e)}finally{o.f()}}}catch(e){n.e(e)}finally{n.f()}q.forEach((function(r){e.every((function(e){return r.includes(e)}))&&a.push(r.sort())})),a.length>0&&(q=a),T(),L()},Y=function(e,r){var a=j[e].probability;if(!(r&&1===a||!r&&0===a))if(r&&0===j[e].probability)S(e);else if(r||1!==j[e].probability){var n=[];q.forEach((function(a){a.includes(e)===r&&n.push(a)})),q=n,E.push("".concat(e,":").concat(r)),T(),L()}else D(e)},U=function(){for(var e in q=[[]],x=[],E=[],j){if(Object.hasOwnProperty.call(j,e))j[e].reset()}},W=function(e){var r=e.p,a=e.m,n=_(q);if((n=n.filter((function(e){var n=e.filter((function(e){return k.physicals.includes(e)})),t=e.filter((function(e){return k.mentals.includes(e)}));return n.length<=r&&t.length<=a}))).length<r+a)return console.error("Insight Error: No present branch for physical ".concat(r,", mental ").concat(a)),!1;q=_(n),T(),L()};function $(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function J(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?$(Object(a),!0).forEach((function(r){K(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):$(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}function K(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var Q=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=document.createElement("span");a.setAttribute("class","mono"),a.appendChild(Object.assign(document.createElement("span"),{style:"color:DarkOrchid",innerHTML:"["})),a.appendChild(Object.assign(document.createElement("span"),{style:"color:Gold",innerHTML:"insight"})),a.appendChild(Object.assign(document.createElement("span"),{style:"color:DarkOrchid",innerHTML:"] "})),r?a.insertAdjacentHTML("beforeend",e):a.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:e})),globalThis.nexusclient.add_html_line(a.outerHTML)},V={fg:"olive",bg:""},X={fg:"royalblue",bg:""},Z={fg:"",bg:""},ee={fg:"ForestGreen",bg:""},re={fg:"",bg:""},ae={fg:"slategray",bg:""},ne={fg:"greenyellow",bg:""},te={fg:"DeepSkyBlue",bg:""},se={fg:"DarkOrange",bg:""},ie={fg:"Red",bg:""},oe={fg:"Gold",bg:""},le={fg:"firebrick",bg:""},ce={fg:"Tan",bg:""},de={fg:"darkseagreen",bg:""},me={fg:"orchid",bg:""},he={fg:"sienna",bg:""},ue={fg:"darkviolet",bg:""},be={fg:"lightpink",bg:""},ge={fg:"paleyellow",bg:"darkslategray"},pe={addiction:J({shortName:"add"},se),aeon:J({shortName:"ae"},ne),agoraphobia:J({shortName:"agor"},X),amnesia:{shortName:"amn",fg:"",bg:""},anorexia:J({shortName:"ANO"},he),asthma:J({shortName:"AST"},ee),blackout:{shortName:"bo",fg:"",bg:""},blindness:J({shortName:"unb"},Z),bound:J({shortName:"bnd"},ge),brokenleftarm:J({shortName:"la1"},me),brokenleftleg:J({shortName:"ll1"},me),brokenrightarm:J({shortName:"ra1"},me),brokenrightleg:J({shortName:"rl1"},me),bruisedribs:{shortName:"ribs",fg:"",bg:""},burning:J({shortName:"burn"},me),calcifiedskull:J({shortName:"calh"},ue),calcifiedtorso:J({shortName:"calt"},ue),claustrophobia:J({shortName:"clau"},ce),clumsiness:J({shortName:"clu"},ee),concussion:J({shortName:"conc"},ue),confusion:J({shortName:"con"},ce),corruption:{shortName:"corr",fg:"",bg:""},crackedribs:J({shortName:"cr"},be),crushedthroat:J({shortName:"cru"},me),daeggerimpale:J({shortName:"daeg"},ge),damage:{shortName:"dmg",fg:"tomato",bg:""},damagedleftarm:J({shortName:"la2"},ue),damagedleftleg:J({shortName:"ll2"},ue),damagedrightarm:J({shortName:"ra2"},ue),damagedrightleg:J({shortName:"rl2"},ue),damagedhead:J({shortName:"hd2"},ue),darkshade:J({shortName:"dark"},se),dazed:J({shortName:"dzd"},ne),dazzled:J({shortName:"dzl"},me),deadening:J({shortName:"dea"},ne),deafness:J({shortName:"und"},re),dehydrated:{shortName:"deh",fg:"",bg:""},dementia:J({shortName:"dem"},ce),depression:J({shortName:"dep"},oe),deteriorate:{shortName:"det",fg:"",bg:""},disloyalty:J({shortName:"disl"},le),disrupted:{shortName:"disr",fg:"",bg:""},dissonance:J({shortName:"disso"},oe),dizziness:J({shortName:"diz"},oe),enscorcelled:{shortName:"ensor",fg:"",bg:""},entangled:J({shortName:"entgl"},ge),epilepsy:J({shortName:"epi"},oe),fear:{shortName:"fear",fg:"",bg:""},flushings:J({shortName:"flush"},se),frozen:J({shortName:"frz"},de),generosity:J({shortName:"gen"},te),grievouswounds:J({shortName:"grv"},be),guilt:J({shortName:"gui"},X),haemophilia:J({shortName:"haem"},se),hallucinations:J({shortName:"hall"},ce),hamstrung:{shortName:"hms",fg:"",bg:""},healthleech:J({shortName:"hthl"},ee),heartseed:J({shortName:"heart"},ue),hellsight:J({shortName:"hell"},le),horror:J({shortName:"hor"},oe),hypersomnia:J({shortName:"hypers"},ce),hypochondria:J({shortName:"hypoch"},ee),hypothermia:J({shortName:"hypoth"},ue),icefisted:{shortName:"ice",fg:"",bg:""},impaled:J({shortName:"impl"},ge),impatience:J({shortName:"IMPAT"},oe),indifference:J({shortName:"ind"},te),itching:J({shortName:"itch"},he),justice:J({shortName:"just"},te),kkractlebrand:J({shortName:"kkr"},be),laceratedthroat:J({shortName:"lac2"},ue),latched:J({shortName:"latch"},be),lethargy:J({shortName:"let"},se),lightbind:{shortName:"light",fg:"",bg:""},loneliness:J({shortName:"lon"},X),lovers:J({shortName:"love"},te),manaleech:J({shortName:"man"},le),mangledleftarm:J({shortName:"la3"},ue),mangledleftleg:J({shortName:"ll3"},ue),mangledrightarm:J({shortName:"ra3"},ue),mangledrightleg:J({shortName:"rl3"},ue),mangledhead:J({shortName:"hd3"},ue),masochism:J({shortName:"maso"},X),mildtrauma:J({shortName:"tor1"},ue),mycalium:J({shortName:"myc"},oe),nausea:J({shortName:"nau"},se),numbedleftarm:{shortName:"nbla",fg:"",bg:""},numbedrightarm:{shortName:"nbra",fg:"",bg:""},pacified:J({shortName:"pac"},te),paralysis:J({shortName:"PAR"},ie),paranoia:J({shortName:"prn"},ce),parasite:J({shortName:"prs"},ee),peace:J({shortName:"pea"},te),phlogisticated:{shortName:"phlog",fg:"",bg:""},pinshot:{shortName:"psh",fg:"",bg:""},pressure:J({shortName:"pres"},ae),prone:{shortName:"pr",fg:"",bg:""},pyramides:J({shortName:"pyra"},ie),pyre:J({shortName:"pyre"},te),rebbies:J({shortName:"reb"},ee),recklessness:J({shortName:"reck"},X),retardation:{shortName:"ret",fg:"",bg:""},retribution:J({shortName:"retr"},te),revealed:{shortName:"rev",fg:"",bg:""},sandfever:J({shortName:"sand"},oe),scalded:J({shortName:"scald"},he),scytherus:J({shortName:"scy"},se),selarnia:J({shortName:"sel"},me),sensitivity:J({shortName:"sen"},ee),serioustrauma:J({shortName:"tor2"},ue),shadowmadness:J({shortName:"shad"},oe),shivering:J({shortName:"shiv"},de),shyness:J({shortName:"shy"},oe),skullfractures:J({shortName:"sf"},be),slashedthroat:J({shortName:"lac1"},he),sleeping:{shortName:"slp",fg:"",bg:""},slickness:J({shortName:"SLI"},ie),slimeobscure:{shortName:"nkh",fg:"",bg:""},spiritburn:J({shortName:"spirB"},X),spiritwrack:{shortName:"spirW",fg:"",bg:""},stupidity:J({shortName:"st"},oe),stuttering:J({shortName:"stut"},he),homunculusmercury:{shortName:"merc",fg:"",bg:""},temperedcholeric:J({shortName:"choH"},V),temperedmelancholic:J({shortName:"melaH"},V),temperedphlegmatic:J({shortName:"phleH"},V),temperedsanguine:J({shortName:"sanH"},V),tenderskin:J({shortName:"tend"},X),tension:J({shortName:"tens"},ne),timeflux:{shortName:"tmfx",fg:"",bg:""},timeloop:J({shortName:"tmlp"},te),tonguetied:J({shortName:"tngt"},ue),torntendons:J({shortName:"tt"},be),transfixation:J({shortName:"trfx"},ge),unweavingbody:J({shortName:"unwM"},se),unweavingspirit:J({shortName:"unwS"},ne),unweavingmind:J({shortName:"unwM"},oe),vertigo:J({shortName:"vert"},X),vitrified:{shortName:"vitri",fg:"",bg:""},voidfisted:{shortName:"void",fg:"",bg:""},voyria:{shortName:"voy",fg:"",bg:""},weariness:J({shortName:"wea"},ee),webbed:J({shortName:"web"},ge),whisperingmadness:J({shortName:"mad"},X),wristfractures:J({shortName:"wf"},be)};function fe(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function ye(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var ve=function(e){var r=e.id,a=e.player,n=e.probability,t=void 0===n?0:n;if(_e(a)&&void 0!==r){var s=i[r];return!!(s.have&&s.probability>=t)}},ke=function(e){var r=e.ids,a=e.probability,n=void 0===a?0:a,t=e.player;if(_e(t)){var s=!1;return Array.isArray(r)&&(s=r.every((function(e){return x.indexOf(e)>-1&&i[e].probability>=n}))),s}},_e=function(e){if(void 0===e||e==A.id)return!0},Ne={};function we(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function Oe(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}[{id:"balance",duration:2},{id:"equilibrium",duration:2},{id:"herb",duration:2},{id:"smoke",duration:2},{id:"salve",duration:2},{id:"focus",duration:2},{id:"tree",duration:2}].forEach((function(e){return Ne[e.id]=(a=(r=e).id,n=r.duration,(t={name:a,have:!0,got:function(){Ne[a].have=!0,eventStream.raiseEvent("insightGotBal",Ne[a]),eventStream.raiseEvent("insightGot".concat(a),Ne[a]),Ne[a].timer.stop()},lost:function(){var e;Ne[a].have=!1,eventStream.raiseEvent("insightLostBal",Ne[a]),eventStream.raiseEvent("insightLost".concat(a),Ne[a]),null===(e=Ne[a].timer)||void 0===e||e.start()},reset:function(){Ne[a].have=!0,Ne[a].timer.stop()},timer:new s("insightTimer".concat(a),n)}).timer.addCallback(t.reset),t);var r,a,n,t}));var je={version:"0.1.9",addAff:function(e){var r=e.id,a=e.player;_e(a)&&void 0!==r&&(H(r),insight.reporting.notices&&Q("Added: ".concat(r)))},getAff:function(e){var r=e.id,a=e.player;if(_e(a)&&void 0!==r)return insight.affs[r]},removeAff:function(e){var r=e.id,a=e.player;_e(a)&&void 0!==r&&(I(r),insight.reporting.notices&&Q("Removed: ".concat(r)))},usedCure:function(e){var a=e.id;e.player;!function(e){var a,n=null===(a=r[e])||void 0===a?void 0:a.blocks;void 0!==n&&n.forEach((function(e){Array.isArray(e)?ke(e)&&e.forEach((function(e){return Y(e,!1)})):ve(e)&&Y(e,!1)}))}(a),R(a)},confirmAff:function(e){var r=e.id,a=e.state,n=e.player;_e(n)&&void 0!==r&&(Y(r,a),insight.reporting.notices&&Q("Confirmed: ".concat(r," ").concat(a)))},reset:function(){U(),b(),v(),insight.reporting.notices&&Q("Reset")},randomAffs:function(e){var r=e.ids,a=e.player;_e(a)&&void 0!==r&&(G(r),insight.reporting.notices&&Q("Random: ".concat(r)))},readAuraConfirm:function(e){var r=e.p,a=e.m,n=e.player;_e(n)&&W({p:r,m:a})},smartAffs:function(e){var r=e.ids,a=e.player,n=e.ordered,t=void 0!==n&&n;_e(a)&&void 0!==r&&(t?F(r):B(r),insight.reporting.notices&&Q("Smart: ".concat(r)))},addDef:function(e){var r=e.id,a=e.player;_e(a)&&void 0!==r&&(h[r]=!0,insight.reporting.notices&&Q("Def (".concat(r,"): true")))},removeDef:function(e){var r=e.id,a=e.player;_e(a)&&void 0!==r&&(h[r]=!1,insight.reporting.notices&&Q("Def (".concat(r,"): false")))},hasAff:ve,hasAffs:ke,hasAnAff:function(e){var r=e.ids,a=e.player,n=e.probability,t=void 0===n?0:n;if(_e(a)){var s=!1;return Array.isArray(r)&&(s=x.some((function(e){return r.indexOf(e)>-1&&i[e].probability>=t}))),s}},hasDef:function(e){return h[e]},setStatus:function(e){var r=e.id,a=e.value;e.player;f[r]=a,insight.reporting.notices&&Q("Status (".concat(r,"): ").concat(a))},getStatus:function(e){return f[e]},currentAffs:function(){return x},currentAffDisplay:function(){var e=[];return x.forEach((function(r){return e.push("".concat(r,": ").concat(i[r].probability))})),e},currentAffDisplayHTML:function(){var e=document.createElement("span");if(e.setAttribute("class","mono"),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"["})),x.length>1)for(var r=0;r<x.length-1;r++){var a=x[r];e.appendChild(Object.assign(document.createElement("span"),{style:"color:".concat(pe[a].fg,";background:").concat(pe[a].bg),innerHTML:insight.reporting.shortNames?"".concat(pe[a].shortName):"".concat(a)})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:x.length>1?": ".concat(i[a].probability,", "):": ".concat(i[a].probability)}))}var n=x.at(-1);return e.appendChild(Object.assign(document.createElement("span"),{style:"color:".concat(pe[n].fg,";background:").concat(pe[n].bg),innerHTML:insight.reporting.shortNames?"".concat(pe[n].shortName):"".concat(n)})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:": ".concat(i[n].probability)})),x.forEach((function(e){})),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"]"})),e.outerHTML},nextLine:function(){var e=nexusclient.current_block.indexOf(nexusclient.current_line);return nexusclient.current_block[e+1].parsed_line.text()},target:A,reporting:{notices:!1,shortNames:!1,colors:!1},occultist:k,affs:i,defs:h,bals:Ne,status:f,timeline:function(){return q},setTarget:function(e){var r;P.hasOwnProperty(e)?i=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(a),!0).forEach((function(r){ye(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):fe(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},P[e].affs):P[e]={affs:(r={},l.forEach((function(e){r[e]=o(e)})),r),defs:{},state:{}}},players:P};globalThis.insight=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?we(Object(a),!0).forEach((function(r){Oe(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):we(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},je),globalThis.insight.reset(),"undefined"!=typeof nexusclient&&fetch("https://unpkg.com/nexsight/insight3.nxs",{cache:"no-store"}).then((function(e){return e.json()})).then((function(e){nexusclient.packages().get("insight3").apply(e,nexusclient.reflexes())}))}(); | ||
!function(){"use strict";var e=["itching","paralysis","fear","brokenrightarm","brokenleftarm","brokenrightleg","brokenleftleg","lapsingconsciousness","aeon","lovers","confusion","epilepsy","pacified","blackout","dazed","justice","slashedthroat","hellsight","peace","dazzled","shyness","dizziness","slickness","asthma","nausea","selarnia","weariness","scytherus","haemophilia","clumsiness","hallucinations","healthleech","dementia","recklessness","anorexia","masochism","impatience","stupidity","generosity","addiction","deadening","manaleech","stuttering","paranoia","agoraphobia","loneliness","claustrophobia","vertigo","hypersomnia","shivering","frozen","burning","sensitivity","hypochondria","lethargy","disloyalty","darkshade","voyria","dissonance","phlogisticated","silver","spiritburn","tenderskin","guilt","skullfractures","wristfractures","crackedribs","torntendons","indifference","retribution","shadowmadness","parasite","depression","timeloop","crushedthroat","tension","unweavingspirit","grievouswounds","pyramides","flushings","rebbies","mycalium","sandfever"],r={ferrum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ferrum",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},magnesium:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat magnesium",order:["paralysis","slickness","pyramides"],prio:0},aurum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat aurum",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},calamine:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat calamine",order:["undeaf","deafness"],delay:2.5,prio:0},argentum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat argentum",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},cuprum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat cuprum",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},antimony:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat antimony",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},arsenic:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat arsenic",order:["unblind"],prio:0},stannum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat stannum",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},plumbum:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],command:"eat plumbum",prio:0},calcite:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat calcite",prio:0},ginseng:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginseng",order:["darkshade","haemophilia","lethargy","addiction","scytherus","nausea","flushings","unweavingbody"],prio:0},bloodroot:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bloodroot",order:["paralysis","slickness","pyramides"],prio:0},kelp:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat kelp",order:["clumsiness","healthleech","sensitivity","weariness","asthma","hypochondria","rebbies","parasite"],prio:0},hawthorn:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat hawthorn",order:["undeaf","deafness"],delay:2.5,prio:0},lobelia:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat lobelia",order:["masochism","loneliness","vertigo","recklessness","agoraphobia","guilt","whisperingmadness","spiritburn","tenderskin"],prio:0},bellwort:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bellwort",order:["pacified","peace","lovers","justice","generosity","indifference","retribution","pyre","timeloop"],prio:0},ginger:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ginger",order:["temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine"],prio:0},bayberry:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat bayberry",order:["unblind"],prio:0},ash:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat ash",order:["claustrophobia","paranoia","confusion","hypersomnia","hallucinations","dementia"],prio:0},goldenseal:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],command:"eat goldenseal",order:["horror","stupidity","epilepsy","dizziness","shyness","impatience","dissonance","depression","sandfever","mycalium","shadowmadness","unweavingmind"],prio:0},pear:{bals_used:["herb"],bals_req:["herb"],blocks:["anorexia","sleeping"],order:["pressure"],command:"eat pear",prio:0},smoke:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","disloyalty","hellsight","manaleech","slickness","deadening","tension","unweavingspirit"],prio:0},cinnabar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke cinnabar",order:["aeon","deadening","tension","unweavingspirit"],prio:0},malachite:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke malachite",prio:0},realgar:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke realgar",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},elm:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke elm",order:["aeon","deadening","tension","unweavingspirit"],prio:0},skullcap:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke skullcap",prio:0},valerian:{bals_used:["smoke"],bals_req:["smoke"],blocks:["asthma","sleeping"],command:"smoke valerian",order:["disloyalty","hellsight","manaleech","slickness"],prio:0},caloric:{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply caloric",order:["frozen","shivering"],prio:0},"epidermal to body":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to body",order:["anorexia"],prio:0},"epidermal to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to head",order:["blindness","scalded","deafness"],prio:0},"epidermal to ears":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply epidermal to ears",order:["deafness"],prio:0},"mending to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to head",order:["crushedthroat","dazzled"],prio:0},"mending to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to arms",order:["brokenleftarm","brokenrightarm"],prio:0},"mending to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to legs",order:["brokenleftleg","brokenrightleg"],prio:0},"mending to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply mending to torso",order:["burning"],prio:0},"restoration to head":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to head",order:["mangledhead","damagedhead","calcifiedskull","concussion","tonguetied"],delay:4,prio:0},"restoration to torso":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to torso",order:["hypothermia","heartseed","serioustrauma","mildtrauma","calcifiedtorso"],delay:4,prio:0},"restoration to arms":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to arms",order:["mangledleftarm","mangledrightarm","damagedleftarm","damagedrightarm"],delay:4,prio:0},"restoration to legs":{bals_used:["salve"],bals_req:["salve"],blocks:["slickness","sleeping"],command:"apply restoration to legs",order:["mangledleftleg","mangledrightleg","damagedleftleg","damagedrightleg"],delay:4,prio:0},insomnia:{bals_req:["free"],bals_used:["free"],blocks:["hypersomnia","sleeping"],command:"insomnia",order:["insomnia"],prio:0},focus:{bals_req:["focus"],bals_used:["focus"],blocks:["impatience","sleeping"],command:"focus",order:["stupidity","epilepsy","dizziness","shyness","claustrophobia","paranoia","confusion","hallucinations","dementia","pacified","peace","lovers","generosity","masochism","loneliness","vertigo","recklessness","agoraphobia","anorexia","stuttering"],prio:0},"health to head":{bals_req:["sip"],bals_used:["sip"],command:"apply health to head",order:["skullfractures"],prio:0},"health to torso":{bals_req:["sip"],bals_used:["sip"],command:"apply health to torso",order:["crackedribs","grievouswounds"],prio:0},"health to arms":{bals_req:["sip"],bals_used:["sip"],command:"apply health to arms",order:["wristfractures"],prio:0},"health to legs":{bals_req:["sip"],bals_used:["sip"],command:"apply health to legs",order:["torntendons","latched","kkractlebrand"],prio:0},concentrate:{blocks:["sleeping","confusion"],command:"concentrate",order:["disrupted"],prio:0},immunity:{bals_req:["immunity"],bals_used:["immunity"],blocks:["sleeping","anorexia"],command:"sip immunity",order:["voyria"],prio:0},stand:{bals_req:["balance","equilibrium"],blocks:["death","sleeping","paralysis","brokenrightleg","brokenleftleg","damagedleftleg","damagedrightleg","mangledrightleg","mangledleftleg","entangled","transfixation","impaled","webbed","bound"],command:"stand",order:["prone"],prio:0},tree:{bals_used:["tree"],bals_req:["tree"],blocks:["death","sleeping","paralysis",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],command:"touch tree",order:e,prio:0},health:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip health",prio:0},mana:{bals_req:["sip"],bals_used:["sip"],blocks:["sleeping","anorexia"],command:"sip mana",prio:0},potash:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat potash",prio:0},moss:{bals_req:["moss"],bals_used:["moss"],blocks:["sleeping","anorexia"],command:"eat moss",prio:0},fitness:{bals_req:["equilibrium","balance","fitness"],bals_used:["balance","fitness"],blocks:["weariness","sleeping"],skills:["Monk","Runewarden"],command:"fitness",order:["asthma"],prio:0},bloodboil:{bals_req:["equilibrium","balance","bloodboil"],bals_used:["equilibrium","bloodboil"],blocks:["death","haemophilia","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Magi"],command:"cast bloodboil",order:e,prio:0},restore:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"restore",order:["brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","skullfractures","torntendons","wristfractures","crackedribs"],prio:0},dragonflex:{bals_req:["balance"],bals_used:["balance"],command:"dragonflex",skills:["Dragon"],order:["webbed","entangled"],prio:0},dragonheal:{bals_req:["balance","equilibrium"],bals_used:["equilibrium"],command:"dragonheal",skills:["Dragon"],blocks:["sleeping",["recklessness","weariness"]],order:e,prio:0},dwinnu:{bals_req:["voice"],bals_used:["voice"],command:"chant dwinnu",skills:["Bard"],order:["webbed","entangled"],prio:0},rage:{bals_req:["rage"],bals_used:["rage"],command:"rage",skills:["Runewarden"],order:["pacified","peace","lovers","generosity"],prio:95},salt:{bals_req:["equilibrium","salt"],bals_used:["salt","equilibrium"],blocks:["stupidity","sleeping"],skills:["Alchemist"],command:"educe salt",order:e,prio:0},siphon:{bals_req:["angel"],bals_used:["angel"],blocks:["sleeping"],skills:["Apostate","Priest"],command:"educe salt",order:e,prio:0},shrugging:{bals_req:["equilibrium","balance","shrugging"],bals_used:["shrugging"],blocks:["weariness","sleeping"],skills:["Serpent"],command:"shrugging",order:e,prio:0},slough:{bals_req:["equilibrium","balance","slough"],bals_used:["slough","balance"],blocks:["weariness","sleeping"],skills:["Fire Elemental Lord"],command:"slough impurities",order:e,prio:0},fool:{bals_req:["equilibrium","balance","fool"],bals_used:["fool","balance"],blocks:["death","prone","paralysis","sleeping",["brokenleftarm","brokenrightarm"],["brokenleftarm","damagedrightarm"],["brokenleftarm","mangledrightarm"],["damagedleftarm","brokenrightarm"],["damagedleftarm","damagedrightarm"],["damagedleftarm","mangledrightarm"],["mangledleftarm","brokenrightarm"],["mangledleftarm","damagedrightarm"],["mangledleftarm","mangledrightarm"],"entangled","transfixation","impaled","webbed","bound"],skills:["Occultist"],command:"fling fool at me",order:e,prio:0},alleviate:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:["paralysis","sleeping"],skills:["Blademaster"],command:"alleviate",order:e,prio:0},sun:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:["Runewarden","Occultist"],command:"sun",order:e,prio:0},generic:{bals_req:["equilibrium","balance","alleviate"],bals_used:["alleviate","balance"],blocks:[],skills:[],command:"sun",order:e,prio:0}};function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){for(var a=0;a<r.length;a++){var n=r[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var t=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this._name=r,this._enabled=!1,this._t_started=0,this._t_ended=0,this._timerId=0,this._default_length=n,this.setLength(n),this._callbacks=[]}var r,t,s;return r=e,(t=[{key:"length",get:function(){return this._t_length}},{key:"setLength",value:function(e){this._t_length=e,this._t_length_ms=1e3*e}},{key:"reset",value:function(){this.setLength(this._default_length)}},{key:"start",value:function(){this._enabled&&clearTimeout(this._timerId),this._timerId=setTimeout(this.stop.bind(this),this._t_length_ms),this._t_started=performance.now()/1e3,this._enabled=!0}},{key:"stop",value:function(){if(this._enabled&&(clearTimeout(this._timerId),this._t_ended=performance.now()/1e3,this._enabled=!1,this._callbacks))for(var e=0;e<this._callbacks.length;e++)this._callbacks[e](this._t_ended-this._t_started)}},{key:"duration",value:function(){return this._enabled?this.elapsed():this._t_ended-this._t_started}},{key:"elapsed",value:function(){return this._enabled?performance.now()/1e3-this._t_started:0}},{key:"remaining",value:function(){return this._enabled?this._t_length-performance.now()/1e3-this._t_started:0}},{key:"addCallback",value:function(e){this._callbacks.push(e)}},{key:"clearCallbacks",value:function(){this._callbacks=[]}}])&&n(r.prototype,t),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),e}(),s=t,i={},o=function(e){var a=[];Object.keys(r).forEach((function(n){var t;(null===(t=r[n].order)||void 0===t?void 0:t.indexOf(e))>-1&&a.push(n)}));var n={name:e,probability:0,cures:a,have:!1,got:function(){var r;i[e].have=!0,i[e].probability=1,eventStream.raiseEvent("insightGotAff",i[e]),eventStream.raiseEvent("insightGot".concat(e),i[e]),null===(r=i[e].timer)||void 0===r||r.start()},lost:function(){var r;i[e].have=!1,i[e].probability=0,eventStream.raiseEvent("insightLostAff",i[e]),eventStream.raiseEvent("insightLost".concat(e),i[e]),null===(r=i[e].timer)||void 0===r||r.stop()},reset:function(){var r;i[e].have=!1,i[e].probability=0,null===(r=i[e].timer)||void 0===r||r.stop()}};return Object.keys(c).indexOf(e)>-1&&(n.timer=new s("insightTimer".concat(e),c[e].duration),n.timer.addCallback(n.reset)),n},l=["undeaf","unblind","cleanseaura","addiction","aeon","agoraphobia","airfisted","amnesia","anorexia","asphyxiating","asthma","blackout","bleeding","blindness","blistered","bloodfire","bound","brokenleftarm","brokenrightarm","brokenleftleg","brokenrightleg","bruisedribs","burning","cadmuscurse","calcifiedskull","calcifiedtorso","claustrophobia","clumsiness","coldfate","concussion","condemned","conflagration","confusion","constricted","corruption","crackedribs","cremated","crushedthroat","daeggerimpale","damagedhead","damagedleftarm","damagedleftleg","damagedrightarm","damagedrightleg","darkshade","dazed","dazzled","deadening","deafness","death","deathsickness","deepsleep","degenerate","dehydrated","dementia","demonstain","depression","deteriorate","disloyalty","disrupted","dissonance","dizziness","empoweredmannaz","empoweredloshre","enlightenment","enmesh","ensorcelled","entangled","epilepsy","fear","flamefisted","flushings","frozen","generosity","grievouswounds","guilt","hamstrung","haemophilia","hallucinations","hatred","healthleech","heartseed","hecatecurse","hellsight","hindered","homunculusmercury","horror","hypersomnia","hypochondria","hypothermia","icefisted","impaled","impatience","indifference","inquisition","insomnia","internalbleeding","isolation","itching","justice","kaisurge","kkractlebrand","laceratedthroat","lapsingconsciousness","latched","lethargy","lightbind","loneliness","lovers","lullaby","manaleech","masochism","mildtrauma","mangledleftarm","mangledleftleg","mangledrightarm","mangledrightleg","mangledhead","mindclamp","mindravaged","muddled","mycalium","nausea","numbedleftarm","numbedrightarm","pacified","palpatarfeed","paralysis","paranoia","parasite","peace","penitence","petrified","phlogisticated","pinshot","pressure","prone","pyramides","pyre","rebbies","recklessness","retribution","revealed","sandfever","scalded","scrambledbrains","scytherus","selarnia","sensitivity","serioustrauma","shadowmadness","shivering","shyness","silenced","silver","skullfractures","slashedthroat","sleeping","slickness","slimeobscure","solarburn","spiritburn","stun","stupidity","stuttering","temperedcholeric","temperedmelancholic","temperedphlegmatic","temperedsanguine","tenderskin","tension","timeflux","timeloop","tonguetied","torntendons","transfixation","trueblind","unweavingbody","unweavingmind","unweavingspirit","vertigo","vinewreathed","vitiated","vitrified","voidfisted","voyria","waterbonds","weakenedmind","weariness","webbed","whisperingmadness","wristfractures","unconsciousness","harmonic","bop","spiritwrack","bedevil","loki","moon","evileye","dragoncurse","swiftcurse"],c={test:{duration:10},weakenedmind:{duration:60},slimeobscure:{duration:30},palpatarfeed:{duration:20},cleanseaura:{duration:6}};l.forEach((function(e){i[e]=o(e)}));function d(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function m(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var h={},u={insomnia:!0,kola:!0,speed:!0,shield:!0,rebounding:!0,prismatic:!0,cloak:!0,fangbarrier:!0},b=function(){Object.assign(h,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?d(Object(a),!0).forEach((function(r){m(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},u))};function g(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function p(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var f={},y={hp:2e4,mana:2e4,hpMax:2e4,manaMax:2e4,hpPercent:1,manaPercent:1,soulmaster:!1,enlightened:!1,mentalCount:0,physicalCount:0},v=function(){Object.assign(f,function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?g(Object(a),!0).forEach((function(r){p(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},y))},k={mentals:["claustrophobia","agoraphobia","lovers","dementia","epilepsy","hallucinations","confusion","stupidity","paranoia","vertigo","shyness","addiction","recklessness","masochism"],physicals:["asthma","paralysis","slickness","haemophilia","clumsiness","healthleech","sensitivity","darkshade"],bubonis:["vertigo","recklessness","confusion","masochism","paranoia","shyness","claustrophobia"],chimera:["confusion","hallucinations","agoraphobia","claustrophobia","dementia"],moon:["stupidity","masochism","hallucinations","hypersomnia","confusion","epilepsy","claustrophobia","agoraphobia"],whisperingmadness:["dementia","stupidity","confusion","hypersomnia","paranoia","hallucinations","impatience","addiction","agoraphobia","lovers","loneliness","recklessness","masochism"]};function _(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,r){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=w(e))||r&&e&&"number"==typeof e.length){a&&(e=a);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return i=e.done,e},e:function(e){o=!0,s=e},f:function(){try{i||null==a.return||a.return()}finally{if(o)throw s}}}}function w(e,r){if(e){if("string"==typeof e)return O(e,r);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?O(e,r):void 0}}function O(e,r){(null==r||r>e.length)&&(r=e.length);for(var a=0,n=new Array(r);a<r;a++)n[a]=e[a];return n}var j=i,q=[[]],x=[],E=[],P={},A={id:""},S=function(e){j[e].got();var r,a=N(q);try{for(a.s();!(r=a.n()).done;){var n=r.value;n.includes(e)||n.push(e)}}catch(e){a.e(e)}finally{a.f()}E.push(e),L()},z=function(e){j[e].lost(),q.forEach((function(r){var a=r.indexOf(e);a>-1&&r.splice(a,1)})),T(),L()},D=function(e){var a,n=N(r[e].order);try{for(n.s();!(a=n.n()).done;){var t=a.value;if(1===i[t].probability)return z(t),!0}}catch(e){n.e(e)}finally{n.f()}return!1},T=function(e){var r=new Map,a=[];if(1!==q.length){var n,t=N(q);try{for(t.s();!(n=t.n()).done;){var s=n.value.slice().sort().join();r.has(s)?r.set(s,r.get(s)+1):r.set(s,1)}}catch(e){t.e(e)}finally{t.f()}return 1===new Set(r.values()).size&&(r.forEach((function(e,r){return a.push(r.split(","))})),q=a),a}},L=function(){var e=_(new Set(q.flat())),r=x.filter((function(r){return!e.includes(r)}));r.length>0&&r.forEach((function(e){return j[e].lost()})),(x=_(e)).forEach((function(e){j[e].probability=parseFloat((Math.round(100*function(e){return q.filter((function(r){return r.includes(e)})).length/q.length}(e))/100).toFixed(2))})),eventStream.raiseEvent("insightUpdateAffs")},C=S,M=z,H=function(e){if(r[e].bals_used.includes("salve")&&D(e))console.log("salveCure() true return");else{var a=r[e].order,n=[],t=!1;q.forEach((function(e){if(e.find((function(e){return a.includes(e)}))){t=!0;var r,s=N(e);try{var i=function(){var t=r.value;if(a.includes(t)){var s=e.filter((function(e){return e!==t}));s.length>0&&n.push(s)}};for(s.s();!(r=s.n()).done;)i()}catch(e){s.e(e)}finally{s.f()}}})),t&&(q=n.length>0?n:[[]]),T(),L(),E.push(e)}},R=function(e){var r=[];e.forEach((function(e){i[e].have=!0;var a,n=N(q.map((function(e){return e.slice(0)})));try{for(n.s();!(a=n.n()).done;){var t=a.value;t.includes(e)||t.push(e),r.push(t)}}catch(e){n.e(e)}finally{n.f()}})),q=r.length>0?r:[[]],T(),L()},I=function(e){var r=[];e.forEach((function(e){i[e].have=!0;var a,n=N(q.map((function(e){return e.slice(0)})));try{for(n.s();!(a=n.n()).done;){var t=a.value;t.includes(e)||(t.push(e),r.push(t))}}catch(e){n.e(e)}finally{n.f()}})),q.forEach((function(a){e.every((function(e){return a.includes(e)}))&&r.push(a)})),r.length>0&&(q=r),T(),L()},G=function(e){var r,a=[],n=q.map((function(e){return e.slice(0)})),t=N(n);try{for(t.s();!(r=t.n()).done;){var s,o=r.value,l=N(e);try{for(l.s();!(s=l.n()).done;){var c=s.value;if(!o.includes(c)){i[c].have=!0,o.push(c),a.push(o);break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){t.e(e)}finally{t.f()}n.forEach((function(r){e.every((function(e){return r.includes(e)}))&&a.push(r)})),a.length>0&&(q=a),T(),L()},B=function(e,r){var a=j[e].probability;if(!(r&&1===a||!r&&0===a))if(r&&0===j[e].probability)S(e);else if(r||1!==j[e].probability){var n=[];q.forEach((function(a){a.includes(e)===r&&n.push(a)})),q=n,E.push("".concat(e,":").concat(r)),T(),L()}else z(e)},F=function(){for(var e in q=[[]],x=[],E=[],j){if(Object.hasOwnProperty.call(j,e))j[e].reset()}},U=function(e){var r=e.p,a=e.m,n=_(q);if((n=n.filter((function(e){var n=e.filter((function(e){return k.physicals.includes(e)})),t=e.filter((function(e){return k.mentals.includes(e)}));return n.length<=r&&t.length<=a}))).length<r+a)return console.error("Insight Error: No present branch for physical ".concat(r,", mental ").concat(a)),!1;q=_(n),T(),L()};function Y(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function W(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?Y(Object(a),!0).forEach((function(r){$(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Y(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}function $(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var J=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=document.createElement("span");a.setAttribute("class","mono"),a.appendChild(Object.assign(document.createElement("span"),{style:"color:DarkOrchid",innerHTML:"["})),a.appendChild(Object.assign(document.createElement("span"),{style:"color:Gold",innerHTML:"insight"})),a.appendChild(Object.assign(document.createElement("span"),{style:"color:DarkOrchid",innerHTML:"] "})),r?a.insertAdjacentHTML("beforeend",e):a.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:e})),globalThis.nexusclient.add_html_line(a.outerHTML)},K={fg:"olive",bg:""},Q={fg:"royalblue",bg:""},V={fg:"",bg:""},X={fg:"ForestGreen",bg:""},Z={fg:"",bg:""},ee={fg:"slategray",bg:""},re={fg:"greenyellow",bg:""},ae={fg:"DeepSkyBlue",bg:""},ne={fg:"DarkOrange",bg:""},te={fg:"Red",bg:""},se={fg:"Gold",bg:""},ie={fg:"firebrick",bg:""},oe={fg:"Tan",bg:""},le={fg:"darkseagreen",bg:""},ce={fg:"orchid",bg:""},de={fg:"sienna",bg:""},me={fg:"darkviolet",bg:""},he={fg:"lightpink",bg:""},ue={fg:"paleyellow",bg:"darkslategray"},be={addiction:W({shortName:"add"},ne),aeon:W({shortName:"ae"},re),agoraphobia:W({shortName:"agor"},Q),amnesia:{shortName:"amn",fg:"",bg:""},anorexia:W({shortName:"ANO"},de),asthma:W({shortName:"AST"},X),blackout:{shortName:"bo",fg:"",bg:""},blindness:W({shortName:"unb"},V),bound:W({shortName:"bnd"},ue),brokenleftarm:W({shortName:"la1"},ce),brokenleftleg:W({shortName:"ll1"},ce),brokenrightarm:W({shortName:"ra1"},ce),brokenrightleg:W({shortName:"rl1"},ce),bruisedribs:{shortName:"ribs",fg:"",bg:""},burning:W({shortName:"burn"},ce),calcifiedskull:W({shortName:"calh"},me),calcifiedtorso:W({shortName:"calt"},me),claustrophobia:W({shortName:"clau"},oe),clumsiness:W({shortName:"clu"},X),concussion:W({shortName:"conc"},me),confusion:W({shortName:"con"},oe),corruption:{shortName:"corr",fg:"",bg:""},crackedribs:W({shortName:"cr"},he),crushedthroat:W({shortName:"cru"},ce),daeggerimpale:W({shortName:"daeg"},ue),damage:{shortName:"dmg",fg:"tomato",bg:""},damagedleftarm:W({shortName:"la2"},me),damagedleftleg:W({shortName:"ll2"},me),damagedrightarm:W({shortName:"ra2"},me),damagedrightleg:W({shortName:"rl2"},me),damagedhead:W({shortName:"hd2"},me),darkshade:W({shortName:"dark"},ne),dazed:W({shortName:"dzd"},re),dazzled:W({shortName:"dzl"},ce),deadening:W({shortName:"dea"},re),deafness:W({shortName:"und"},Z),dehydrated:{shortName:"deh",fg:"",bg:""},dementia:W({shortName:"dem"},oe),depression:W({shortName:"dep"},se),deteriorate:{shortName:"det",fg:"",bg:""},disloyalty:W({shortName:"disl"},ie),disrupted:{shortName:"disr",fg:"",bg:""},dissonance:W({shortName:"disso"},se),dizziness:W({shortName:"diz"},se),enscorcelled:{shortName:"ensor",fg:"",bg:""},entangled:W({shortName:"entgl"},ue),epilepsy:W({shortName:"epi"},se),fear:{shortName:"fear",fg:"",bg:""},flushings:W({shortName:"flush"},ne),frozen:W({shortName:"frz"},le),generosity:W({shortName:"gen"},ae),grievouswounds:W({shortName:"grv"},he),guilt:W({shortName:"gui"},Q),haemophilia:W({shortName:"haem"},ne),hallucinations:W({shortName:"hall"},oe),hamstrung:{shortName:"hms",fg:"",bg:""},healthleech:W({shortName:"hthl"},X),heartseed:W({shortName:"heart"},me),hellsight:W({shortName:"hell"},ie),horror:W({shortName:"hor"},se),hypersomnia:W({shortName:"hypers"},oe),hypochondria:W({shortName:"hypoch"},X),hypothermia:W({shortName:"hypoth"},me),icefisted:{shortName:"ice",fg:"",bg:""},impaled:W({shortName:"impl"},ue),impatience:W({shortName:"IMPAT"},se),indifference:W({shortName:"ind"},ae),itching:W({shortName:"itch"},de),justice:W({shortName:"just"},ae),kkractlebrand:W({shortName:"kkr"},he),laceratedthroat:W({shortName:"lac2"},me),latched:W({shortName:"latch"},he),lethargy:W({shortName:"let"},ne),lightbind:{shortName:"light",fg:"",bg:""},loneliness:W({shortName:"lon"},Q),lovers:W({shortName:"love"},ae),manaleech:W({shortName:"man"},ie),mangledleftarm:W({shortName:"la3"},me),mangledleftleg:W({shortName:"ll3"},me),mangledrightarm:W({shortName:"ra3"},me),mangledrightleg:W({shortName:"rl3"},me),mangledhead:W({shortName:"hd3"},me),masochism:W({shortName:"maso"},Q),mildtrauma:W({shortName:"tor1"},me),mycalium:W({shortName:"myc"},se),nausea:W({shortName:"nau"},ne),numbedleftarm:{shortName:"nbla",fg:"",bg:""},numbedrightarm:{shortName:"nbra",fg:"",bg:""},pacified:W({shortName:"pac"},ae),paralysis:W({shortName:"PAR"},te),paranoia:W({shortName:"prn"},oe),parasite:W({shortName:"prs"},X),peace:W({shortName:"pea"},ae),phlogisticated:{shortName:"phlog",fg:"",bg:""},pinshot:{shortName:"psh",fg:"",bg:""},pressure:W({shortName:"pres"},ee),prone:{shortName:"pr",fg:"",bg:""},pyramides:W({shortName:"pyra"},te),pyre:W({shortName:"pyre"},ae),rebbies:W({shortName:"reb"},X),recklessness:W({shortName:"reck"},Q),retardation:{shortName:"ret",fg:"",bg:""},retribution:W({shortName:"retr"},ae),revealed:{shortName:"rev",fg:"",bg:""},sandfever:W({shortName:"sand"},se),scalded:W({shortName:"scald"},de),scytherus:W({shortName:"scy"},ne),selarnia:W({shortName:"sel"},ce),sensitivity:W({shortName:"sen"},X),serioustrauma:W({shortName:"tor2"},me),shadowmadness:W({shortName:"shad"},se),shivering:W({shortName:"shiv"},le),shyness:W({shortName:"shy"},se),skullfractures:W({shortName:"sf"},he),slashedthroat:W({shortName:"lac1"},de),sleeping:{shortName:"slp",fg:"",bg:""},slickness:W({shortName:"SLI"},te),slimeobscure:{shortName:"nkh",fg:"",bg:""},spiritburn:W({shortName:"spirB"},Q),spiritwrack:{shortName:"spirW",fg:"",bg:""},stupidity:W({shortName:"st"},se),stuttering:W({shortName:"stut"},de),homunculusmercury:{shortName:"merc",fg:"",bg:""},temperedcholeric:W({shortName:"choH"},K),temperedmelancholic:W({shortName:"melaH"},K),temperedphlegmatic:W({shortName:"phleH"},K),temperedsanguine:W({shortName:"sanH"},K),tenderskin:W({shortName:"tend"},Q),tension:W({shortName:"tens"},re),timeflux:{shortName:"tmfx",fg:"",bg:""},timeloop:W({shortName:"tmlp"},ae),tonguetied:W({shortName:"tngt"},me),torntendons:W({shortName:"tt"},he),transfixation:W({shortName:"trfx"},ue),unweavingbody:W({shortName:"unwM"},ne),unweavingspirit:W({shortName:"unwS"},re),unweavingmind:W({shortName:"unwM"},se),vertigo:W({shortName:"vert"},Q),vitrified:{shortName:"vitri",fg:"",bg:""},voidfisted:{shortName:"void",fg:"",bg:""},voyria:{shortName:"voy",fg:"",bg:""},weariness:W({shortName:"wea"},X),webbed:W({shortName:"web"},ue),whisperingmadness:W({shortName:"mad"},Q),wristfractures:W({shortName:"wf"},he)};function ge(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function pe(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var fe=function(e){var r=e.id,a=e.player,n=e.probability,t=void 0===n?0:n;if(ve(a)&&void 0!==r){var s=i[r];return!!(s.have&&s.probability>=t)}},ye=function(e){var r=e.ids,a=e.probability,n=void 0===a?0:a,t=e.player;if(ve(t)){var s=!1;return Array.isArray(r)&&(s=r.every((function(e){return x.indexOf(e)>-1&&i[e].probability>=n}))),s}},ve=function(e){if(void 0===e||e==A.id)return!0},ke={};function _e(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,n)}return a}function Ne(e,r,a){return r in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}[{id:"balance",duration:2},{id:"equilibrium",duration:2},{id:"herb",duration:2},{id:"smoke",duration:2},{id:"salve",duration:2},{id:"focus",duration:2},{id:"tree",duration:2}].forEach((function(e){return ke[e.id]=(a=(r=e).id,n=r.duration,(t={name:a,have:!0,got:function(){ke[a].have=!0,eventStream.raiseEvent("insightGotBal",ke[a]),eventStream.raiseEvent("insightGot".concat(a),ke[a]),ke[a].timer.stop()},lost:function(){var e;ke[a].have=!1,eventStream.raiseEvent("insightLostBal",ke[a]),eventStream.raiseEvent("insightLost".concat(a),ke[a]),null===(e=ke[a].timer)||void 0===e||e.start()},reset:function(){ke[a].have=!0,ke[a].timer.stop()},timer:new s("insightTimer".concat(a),n)}).timer.addCallback(t.reset),t);var r,a,n,t}));var we={version:"0.2.0",addAff:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(C(r),insight.reporting.notices&&J("Added: ".concat(r)))},getAff:function(e){var r=e.id,a=e.player;if(ve(a)&&void 0!==r)return insight.affs[r]},removeAff:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(M(r),insight.reporting.notices&&J("Removed: ".concat(r)))},usedCure:function(e){var a=e.id;e.player;!function(e){var a,n=null===(a=r[e])||void 0===a?void 0:a.blocks;void 0!==n&&n.forEach((function(e){Array.isArray(e)?ye(e)&&e.forEach((function(e){return B(e,!1)})):fe(e)&&B(e,!1)}))}(a),H(a),eventStream.raiseEvent("insightUsedCure",a),eventStream.raiseEvent("insightUseCure".concat(a))},confirmAff:function(e){var r=e.id,a=e.state,n=e.player;ve(n)&&void 0!==r&&(B(r,a),insight.reporting.notices&&J("Confirmed: ".concat(r," ").concat(a)))},reset:function(){F(),b(),v(),insight.reporting.notices&&J("Reset")},randomAffs:function(e){var r=e.ids,a=e.player;ve(a)&&void 0!==r&&(R(r),insight.reporting.notices&&J("Random: ".concat(r)))},readAuraConfirm:function(e){var r=e.p,a=e.m,n=e.player;ve(n)&&U({p:r,m:a})},smartAffs:function(e){var r=e.ids,a=e.player,n=e.ordered,t=void 0!==n&&n;ve(a)&&void 0!==r&&(t?G(r):I(r),insight.reporting.notices&&J("Smart: ".concat(r)))},addDef:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(h[r]=!0,insight.reporting.notices&&J("Def (".concat(r,"): true")))},removeDef:function(e){var r=e.id,a=e.player;ve(a)&&void 0!==r&&(h[r]=!1,insight.reporting.notices&&J("Def (".concat(r,"): false")))},hasAff:fe,hasAffs:ye,hasAnAff:function(e){var r=e.ids,a=e.player,n=e.probability,t=void 0===n?0:n;if(ve(a)){var s=!1;return Array.isArray(r)&&(s=x.some((function(e){return r.indexOf(e)>-1&&i[e].probability>=t}))),s}},hasDef:function(e){var r=e.id;e.player;return h[r]},setStatus:function(e){var r=e.id,a=e.value;e.player;f[r]=a,insight.reporting.notices&&J("Status (".concat(r,"): ").concat(a))},getStatus:function(e){var r=e.id;e.player;return f[r]},currentAffs:function(){return x},currentAffDisplay:function(){var e=[];return x.forEach((function(r){return e.push("".concat(r,": ").concat(i[r].probability))})),e},currentAffDisplayHTML:function(){var e=document.createElement("span");if(e.setAttribute("class","mono"),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"["})),x.length>1)for(var r=0;r<x.length-1;r++){var a=x[r];e.appendChild(Object.assign(document.createElement("span"),{style:"color:".concat(be[a].fg,";background:").concat(be[a].bg),innerHTML:insight.reporting.shortNames?"".concat(be[a].shortName):"".concat(a)})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:x.length>1?": ".concat(i[a].probability,", "):": ".concat(i[a].probability)}))}var n=x.at(-1);return e.appendChild(Object.assign(document.createElement("span"),{style:"color:".concat(be[n].fg,";background:").concat(be[n].bg),innerHTML:insight.reporting.shortNames?"".concat(be[n].shortName):"".concat(n)})),e.appendChild(Object.assign(document.createElement("span"),{innerHTML:": ".concat(i[n].probability)})),x.forEach((function(e){})),e.appendChild(Object.assign(document.createElement("span"),{style:"color:LightGoldenRodYellow",innerHTML:"]"})),e.outerHTML},nextLine:function(e){var r=nexusclient.current_block.indexOf(nexusclient.current_line),a=nexusclient.current_block[r+1].parsed_line.text(),n=!1;return e instanceof RegExp?n=e.test(a):"string"==typeof e&&a.includes(e),n},checkBlock:function(e){var r=nexusclient.current_block,a=!1;return e instanceof RegExp?a=!!r.find((function(r){return e.test(r.line)})):"string"==typeof e&&(a=!!r.find((function(r){return r.line.includes(e)}))),a},target:A,reporting:{notices:!1,shortNames:!1,colors:!1},occultist:k,affs:i,defs:h,bals:ke,status:f,timeline:function(){return q},setTarget:function(e){var r;P.hasOwnProperty(e)?i=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ge(Object(a),!0).forEach((function(r){pe(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ge(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},P[e].affs):P[e]={affs:(r={},l.forEach((function(e){r[e]=o(e)})),r),defs:{},state:{}}},players:P};globalThis.insight=function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?_e(Object(a),!0).forEach((function(r){Ne(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_e(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({},we),globalThis.insight.reset(),"undefined"!=typeof nexusclient&&fetch("https://unpkg.com/nexsight/insight3.nxs",{cache:"no-store"}).then((function(e){return e.json()})).then((function(e){nexusclient.packages().get("insight3").apply(e,nexusclient.reflexes())}))}(); |
{ | ||
"name": "nexsight", | ||
"version": "0.1.9", | ||
"version": "0.2.0", | ||
"description": "insight for nexus", | ||
@@ -5,0 +5,0 @@ "main": "insight.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
156119