/*! For license information please see CookieMonster.js.LICENSE.txt */ (()=>{var e={877:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,n,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r-1},isButtonEmpty:function(e){switch(i.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(n=e.document.createElement("input"),!(!n.setAttribute||(n.setAttribute("type","color"),"color"!=n.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t=3&&(n=l[0].match(s))&&(i=l[1].match(s))&&(a=l[2].match(s)))return o.format="rgb",o.rgba=[parseFloat(n[1])||0,parseFloat(i[1])||0,parseFloat(a[1])||0,null],l.length>=4&&(r=l[3].match(s))&&(o.format="rgba",o.rgba[3]=parseFloat(r[1])||0),o}return!1},parsePaletteValue:function(e){var t=[];"string"==typeof e?e.replace(/#[0-9A-F]{3}([0-9A-F]{3})?|rgba?\(([^)]*)\)/gi,(function(e){t.push(e)})):Array.isArray(e)&&(t=e);for(var o=[],n=0;ns[n]&&-t[n]+e[n]+l[n]/2>s[n]/2&&e[n]+l[n]-d[n]>=0?e[n]+l[n]-d[n]:e[n],-t[a]+e[a]+l[a]+d[a]-p+p*r>s[a]?-t[a]+e[a]+l[a]/2>s[a]/2&&e[a]+l[a]-p-p*r>=0?e[a]+l[a]-p-p*r:e[a]+l[a]-p+p*r:e[a]+l[a]-p+p*r>=0?e[a]+l[a]-p+p*r:e[a]+l[a]-p-p*r];else var u=[e[n],e[a]+l[a]-p+p*r];var m=u[n],h=u[a],f=o.fixed?"fixed":"absolute",g=(u[0]+d[0]>e[0]||u[0]0?Math.ceil(l/o):0,i=Math.max(1,Math.floor((t-(o-1)*e.paletteSpacing)/o)),a=e.paletteHeight?Math.min(e.paletteHeight,i):i),n&&(r=n*a+(n-1)*e.paletteSpacing),{cols:o,rows:n,cellW:i,cellH:a,width:t,height:r}},getControlPadding:function(e){return Math.max(e.padding/2,2*e.pointerBorderWidth+e.pointerThickness-e.controlBorderWidth)},getPadYChannel:function(e){switch(e.mode.charAt(1).toLowerCase()){case"v":return"v"}return"s"},getSliderChannel:function(e){if(e.mode.length>2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},triggerCallback:function(e,t){if(e[t]){var o=null;if("string"==typeof e[t])try{o=new Function(e[t])}catch(e){console.error(e)}else o=e[t];o&&o.call(e)}},triggerGlobal:function(e){for(var t=i.getInstances(),o=0;o0)for(var c=0;c=2&&"string"==typeof arguments[0]){try{if(!a(arguments[0],arguments[1]))return!1}catch(e){return console.warn(e),!1}return this.redraw(),this.exposeColor(),!0}if(1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0],t=!0;for(var o in e)if(e.hasOwnProperty(o))try{a(o,e[o])||(t=!1)}catch(e){console.warn(e),t=!1}return this.redraw(),this.exposeColor(),t}throw new Error("Invalid arguments")},this.channel=function(e,t){if("string"!=typeof e)throw new Error("Invalid value for channel name: "+e);if(void 0===t)return this.channels.hasOwnProperty(e.toLowerCase())?this.channels[e.toLowerCase()]:(console.warn("Getting unknown channel: "+e),!1);var o=!1;switch(e.toLowerCase()){case"r":o=this.fromRGBA(t,null,null,null);break;case"g":o=this.fromRGBA(null,t,null,null);break;case"b":o=this.fromRGBA(null,null,t,null);break;case"h":o=this.fromHSVA(t,null,null,null);break;case"s":o=this.fromHSVA(null,t,null,null);break;case"v":o=this.fromHSVA(null,null,t,null);break;case"a":o=this.fromHSVA(null,null,null,t);break;default:return console.warn("Setting unknown channel: "+e),!1}return!!o&&(this.redraw(),!0)},this.trigger=function(e){for(var t=i.strList(e),o=0;o127.5},this.hide=function(){p()&&(i.removeClass(n.targetElement,i.pub.activeClassName),i.picker.wrap.parentNode.removeChild(i.picker.wrap),delete i.picker.owner)},this.show=function(){l()},this.redraw=function(){p()&&l()},this.getFormat=function(){return this._currentFormat},this._setFormat=function(e){this._currentFormat=e.toLowerCase()},this.hasAlphaChannel=function(){return"auto"===this.alphaChannel?"any"===this.format.toLowerCase()||i.isAlphaFormat(this.getFormat())||void 0!==this.alpha||void 0!==this.alphaElement:this.alphaChannel},this.processValueInput=function(e){this.fromString(e)||this.exposeColor()},this.processAlphaInput=function(e){this.fromHSVA(null,null,null,parseFloat(e))||this.exposeColor()},this.exposeColor=function(e){var t=this.toString(),o=this.getFormat();if(i.setDataAttr(this.targetElement,"current-color",t),e&i.flags.leaveValue||!this.valueElement||("hex"!==o&&"hexa"!==o||(this.uppercase||(t=t.toLowerCase()),this.hash||(t=t.replace(/^#/,""))),this.setValueElementValue(t)),!(e&i.flags.leaveAlpha)&&this.alphaElement){var n=Math.round(100*this.channels.a)/100;this.setAlphaElementValue(n)}e&i.flags.leavePreview||!this.previewElement||((i.isTextInput(this.previewElement)||i.isButton(this.previewElement)&&!i.isButtonEmpty(this.previewElement))&&this.previewPosition,this.setPreviewElementBg(this.toRGBAString())),p()&&(s(),c(),d())},this.setPreviewElementBg=function(e){if(this.previewElement){var t=null,o=null;(i.isTextInput(this.previewElement)||i.isButton(this.previewElement)&&!i.isButtonEmpty(this.previewElement))&&(t=this.previewPosition,o=this.previewSize);var n=[];if(e){n.push({image:i.genColorPreviewGradient(e,t,o?o-i.pub.previewSeparator.length:null),position:"left top",size:"auto",repeat:t?"repeat-y":"repeat",origin:"padding-box"});var a=i.genColorPreviewCanvas("rgba(0,0,0,0)",t?{left:"right",right:"left"}[t]:null,o,!0);n.push({image:"url('"+a.canvas.toDataURL()+"')",position:(t||"left")+" top",size:a.width+"px "+a.height+"px",repeat:t?"repeat-y":"repeat",origin:"padding-box"})}else n.push({image:"none",position:"left top",size:"auto",repeat:"no-repeat",origin:"padding-box"});for(var r={image:[],position:[],size:[],repeat:[],origin:[]},l=0;l=0;h-=1){var f=m[h];if(f)if(i.pub.presets.hasOwnProperty(f)){for(var u in i.pub.presets[f])if(i.pub.presets[f].hasOwnProperty(u))try{a(u,i.pub.presets[f][u])}catch(e){console.warn(e)}}else console.warn("Unknown preset: %s",f)}var g=["preset"];for(var u in o)if(o.hasOwnProperty(u)&&-1===g.indexOf(u))try{a(u,o[u])}catch(e){console.warn(e)}if(void 0===this.container?this.container=e.document.body:this.container=i.node(this.container),!this.container)throw new Error("Cannot instantiate color picker without a container element");if(this.targetElement=i.node(t),!this.targetElement){if("string"==typeof t&&/^[a-zA-Z][\w:.-]*$/.test(t))throw new Error("If '"+t+"' is supposed to be an ID, please use '#"+t+"' or any valid CSS selector.");throw new Error("Cannot instantiate color picker without a target element")}if(this.targetElement.jscolor&&this.targetElement.jscolor instanceof i.pub)throw new Error("Color picker already installed on this element");if(this.targetElement.jscolor=this,i.addClass(this.targetElement,i.pub.className),i.instances.push(this),i.isButton(this.targetElement)&&("button"!==this.targetElement.type.toLowerCase()&&(this.targetElement.type="button"),i.isButtonEmpty(this.targetElement))){i.removeChildren(this.targetElement),this.targetElement.appendChild(e.document.createTextNode(" "));var C=i.getCompStyle(this.targetElement);(parseFloat(C["min-width"])||0)-1){var G=i.parseColorString(b);this._currentFormat=G?G.format:"hex"}else this._currentFormat=this.format.toLowerCase();this.processValueInput(b),void 0!==k&&this.processAlphaInput(k)}}).pub.className="jscolor",i.pub.activeClassName="jscolor-active",i.pub.looseJSON=!0,i.pub.presets={},i.pub.presets.default={},i.pub.presets.light={backgroundColor:"rgba(255,255,255,1)",controlBorderColor:"rgba(187,187,187,1)",buttonColor:"rgba(0,0,0,1)"},i.pub.presets.dark={backgroundColor:"rgba(51,51,51,1)",controlBorderColor:"rgba(153,153,153,1)",buttonColor:"rgba(240,240,240,1)"},i.pub.presets.small={width:101,height:101,padding:10,sliderSize:14,paletteCols:8},i.pub.presets.medium={width:181,height:101,padding:12,sliderSize:16,paletteCols:10},i.pub.presets.large={width:271,height:151,padding:12,sliderSize:24,paletteCols:15},i.pub.presets.thin={borderWidth:1,controlBorderWidth:1,pointerBorderWidth:1},i.pub.presets.thick={borderWidth:2,controlBorderWidth:2,pointerBorderWidth:2},i.pub.sliderInnerSpace=3,i.pub.chessboardSize=8,i.pub.chessboardColor1="#666666",i.pub.chessboardColor2="#999999",i.pub.previewSeparator=["rgba(255,255,255,.65)","rgba(128,128,128,.65)"],i.pub.init=function(){if(!i.initialized)for(e.document.addEventListener("mousedown",i.onDocumentMouseDown,!1),e.document.addEventListener("keyup",i.onDocumentKeyUp,!1),e.addEventListener("resize",i.onWindowResize,!1),e.addEventListener("scroll",i.onWindowScroll,!1),i.pub.install(),i.initialized=!0;i.readyQueue.length;)i.readyQueue.shift()()},i.pub.install=function(e){var t=!0;try{i.installBySelector("[data-jscolor]",e)}catch(e){t=!1,console.warn(e)}if(i.pub.lookupClass)try{i.installBySelector("input."+i.pub.lookupClass+", button."+i.pub.lookupClass,e)}catch(e){}return t},i.pub.ready=function(e){return"function"!=typeof e?(console.warn("Passed value is not a function"),!1):(i.initialized?e():i.readyQueue.push(e),!0)},i.pub.trigger=function(e){var t=function(){i.triggerGlobal(e)};i.initialized?t():i.pub.ready(t)},i.pub.hide=function(){i.picker&&i.picker.owner&&i.picker.owner.hide()},i.pub.chessboard=function(e){return e||(e="rgba(0,0,0,0)"),i.genColorPreviewCanvas(e).canvas.toDataURL()},i.pub.background=function(e){var t=[];t.push(i.genColorPreviewGradient(e));var o=i.genColorPreviewCanvas();return t.push(["url('"+o.canvas.toDataURL()+"')","left top","repeat"].join(" ")),t.join(", ")},i.pub.options={},i.pub.lookupClass="jscolor",i.pub.installByClassName=function(){return console.error('jscolor.installByClassName() is DEPRECATED. Use data-jscolor="" attribute instead of a class name.'+i.docsRef),!1},i.register(),i.pub);return void 0===e.jscolor&&(e.jscolor=e.JSColor=a),a}))}},t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";let e={};const t=["","","M","G","T","P","E","Z","Y"],n=["","","M","B","Tr","Quadr","Quint","Sext","Sept","Oct","Non","Dec","Undec","Duodec","Tredec","Quattuordec","Quindec","Sexdec","Septendec","Octodec","Novemdec","Vigint","Unvigint","Duovigint","Trevigint","Quattuorvigint"],i=["","K","M","B","T","Qa","Qi","Sx","Sp","Oc","No","De","UDe","DDe","TDe","QaDe","QiDe","SxDe","SpDe","ODe","NDe","Vi","UVi","DVi","TVi","QaVi","QiVi","SxVi","SpVi","OVi","NVi","Tr","UTr","DTr","TTr","QaTr","QiTr","SxTr","SpTr","OTr","NTr","Qaa","UQa","DQa","TQa","QaQa","QiQa","SxQa","SpQa","OQa","NQa","Qia","UQi","DQi","TQi","QaQi","QiQi","SxQi","SpQi","OQi","NQi","Sxa","USx","DSx","TSx","QaSx","QiSx","SxSx","SpSx","OSx","NSx","Spa","USp","DSp","TSp","QaSp","QiSp","SxSp","SpSp","OSp","NSp","Oco","UOc","DOc","TOc","QaOc","QiOc","SxOc","SpOc","OOc","NOc","Noa","UNo","DNo","TNo","QaNo","QiNo","SxNo","SpNo","ONo","NNo","Ct","UCt"];let a,r,s,c,d,p,u,m,h,f,g,C,y,b,k,G,v,w=[],x=[],T=[],M={};const S="CMText",B="CMBack",P="Blue",E="Green",N="Yellow",O="Orange",F="Red",W="Purple",L="Gray",A="Pink",j="Brown",U=[L,P,E,N,O,F,W,A,j],D=[["GoldCookTooltipPlaceholder","Calculated with Golden Switch off","200px"],["GoldCookDragonsFortuneTooltipPlaceholder","Calculated with Golden Switch off and at least one golden cookie on-screen","240px"],["PrestMaxTooltipPlaceholder","The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg","320px"],["NextPrestTooltipPlaceholder","Calculated with cookies gained from wrinklers and Chocolate egg","200px"],["HeavenChipMaxTooltipPlaceholder","The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg","330px"],["ResetTooltipPlaceholder","The bonus income you would get from new prestige levels unlocked at 100% of its potential and from ascension achievements if you have the same buildings/upgrades after reset","370px"],["ChoEggTooltipPlaceholder","The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg","300px"],["ChainNextLevelPlaceholder","Cheated cookies might break this formula","250px"]];let R,H,$=0,I=-1,z=[],V=1,_=1,X=1;const Q=[10,15,30,60,300,600,900,1800],q=[1,5,10,15,30],Y={Frenzy:N,"Dragon Harvest":j,"Elder frenzy":E,Clot:F,"Click frenzy":P,Dragonflight:A};let K,J,Z,ee,te,oe,ne,ie={},ae="";function re(o,a,r){const l=e.ScaleDecimals+1;if(o===1/0)return"Infinity";if(void 0===o)return"0";if(0===e.Scale)return M.Beautify(o,a);if(Number.isFinite(o)){let s="";if(0===o)return o.toString();if(o>.001&&o=.01&&o=.01&&o=.01&&o315576e4)return"XX:XX:XX:XX:XX";s+=(n<10?"0":"")+n+":",s+=(i<10?"0":"")+i+":",s+=(a<10?"0":"")+a+":",s+=(r<10?"0":"")+r+":",s+=(l<10?"0":"")+l}else{if(t>7776e5)return o?"Over 9000 days!":">9000d";s+=n>0?n+(o?1===n?" year":" years":"y")+", ":"",s+=i>0?i+(o?1===i?" day":" days":"d")+", ":"",(s.length>0||a>0)&&(s+=a+(o?1===a?" hour":" hours":"h")+", "),(s.length>0||r>0)&&(s+=r+(o?1===r?" minute":" minutes":"m")+", "),s+=l+(o?1===l?" second":" seconds":"s")}return s}function se(t){let o,n;return t<=0?(n=e.TimeFormat?"00:00:00:00:00":"Done!",o=E):(n=le(t),o=t>300?F:t>60?O:N),{text:n,color:o}}let ce,de,pe,ue,me,he,fe,ge,Ce,ye,be,ke,Ge,ve,we,xe,Te,Me,Se,Be,Pe,Ee,Ne,Oe,Fe,We,Le,Ae,je,Ue,De,Re,He=0,$e=0,Ie=0,ze=0,Ve=0,_e=0,Xe=0,Qe=0,qe=0,Ye=0,Ke=0,Je=0,Ze=0,et=0,tt=0,ot=1,nt=1,it=1,at=0,rt=0,lt=0,st=0,ct={},dt={},pt={},ut=0,mt=0,ht=[0,null],ft=0,gt=0,Ct={},yt={},bt={},kt={},Gt={},vt=0,wt=0,xt=[],Tt=0,Mt=0,St=[],Bt=0,Pt=0,Et=[],Nt=0,Ot=0,Ft=[],Wt=0,Lt=0,At={},jt={},Ut=0,Dt=0,Rt=0,Ht=0,$t=[],It={},zt=0,Vt=[],_t=[],Xt=[],Qt=Game.startDate,qt=Game.startDate;function Yt(e){let t=0;return Game.dragonAuras[Le].name!==e&&Game.dragonAuras[Ae].name!==e||(t=1),"Reality Bending"!==Game.dragonAuras[Le].name&&"Reality Bending"!==Game.dragonAuras[Ae].name||(t+=.1),t}function Kt(){let e=.25;return e*=1+Yt("Earth Shatterer"),e}function Jt(e,t){return void 0===Ue[e]?void 0===t?1:t:Ue[e]}function Zt(e){const t=_t[e];return(1!==Game.ascensionMode||"prestige"!==t.pool&&"fortune"!==t.tier)&&t?t.bought:0}function eo(e){if(Game.hasGod){void 0===Vt.Temple.minigame&&(Vt.Temple.minigame=Game.Objects.Temple.minigame);const t=Vt.Temple.minigame.gods[e];for(let e=0;e<3;e++)if(Vt.Temple.minigame.slot[e]===t.id)return e+1}return!1}function to(e,t){if(Zt("Season savings")&&(t*=.99),Zt("Santa's dominion")&&(t*=.99),Zt("Faberge egg")&&(t*=.99),Zt("Divine discount")&&(t*=.99),Zt("Fortune #100")&&(t*=.99),t*=1-.02*Yt("Fierce Hoarder"),Game.hasBuff("Everything must go")&&(t*=.95),Game.hasBuff("Crafty pixies")&&(t*=.98),Game.hasBuff("Nasty goblins")&&(t*=1.02),e.fortune&&Zt(e.fortune.name)&&(t*=.93),t*=Jt("buildingCost"),Vt.Temple.minigameLoaded){const e=eo("creation");1===e?t*=.93:2===e?t*=.95:3===e&&(t*=.98)}return t}function oo(e,t,o,n,i,a){a=void 0===a?0:a;let r=0;-1===i&&(i=o),i||(i=Game.buyBulk);for(let l=0;l0&&(r+=i,o--)}return r}function no(){let t=Game.buyBulk;if(1===Game.buyMode?_=t:t=_,1===t?t=ct:10===t?t=dt:100===t&&(t=pt),1===Game.buyMode)if(1===e.BuildColor)for(const o of Object.keys(t))l(`productPrice${Game.Objects[o].id}`).style.color=e.Colors[t[o].color];else for(const e of Object.keys(Game.Objects))l(`productPrice${Game.Objects[e].id}`).style.removeProperty("color");else if(-1===Game.buyMode)for(const e of Object.keys(ct)){const t=Game.Objects[e];l(`productPrice${t.id}`).style.color="",l(`productPrice${t.id}`).innerHTML=re(oo(t,t.basePrice,t.amount,t.free,Game.buyBulk,1))}if(1===Game.buyMode&&e.SortBuildings){const e=Object.keys(t).map((e=>{const o=t[e];return o.name=e,o.id=Game.Objects[e].id,o}));e.sort((function(e,t){return U.indexOf(e.color)>U.indexOf(t.color)?1:U.indexOf(e.color){const t=ct[e];return t.name=e,t.id=Game.Objects[e].id,t}));e.sort(((e,t)=>e.id-t.id));for(let t=0;t0){let e=0,t=0,o=0,n=0,i=0,a=0,r=0;for(const s of Object.keys(Game.UpgradesInStore)){const c=Game.UpgradesInStore[s];let d=!1;for(let e=0;eU.indexOf(t.color)?1:U.indexOf(e.color)e.price-t.price));const o=function(e,t){return e.findIndex((e=>e.name===t.name))};for(let e=0;e=10&&(e+=1);return e}:o.power=function(){let e=2;if(Zt("Starlove")&&(e=3),Game.hasGod){const t=eo("seasons");1===t?e*=1.3:2===t?e*=1.2:3===t&&(e*=1.1)}return e}),o.pool=t.pool,o.name=t.name,o}function Go(){Ee=Game.UpgradesOwned,Ne=Game.pledges,Oe=Game.AchievementsOwned,Fe=Game.heavenlyPower,We=Game.prestige;for(const e of Object.keys(Game.Objects)){const t=Game.Objects[e];let o=Vt[e];void 0===o&&(Vt[e]=bo(e),o=Vt[e],so(e)),o.amount=t.amount,o.level=t.level,o.totalCookies=t.totalCookies,o.basePrice=t.basePrice,o.free=t.free,t.minigameLoaded&&(o.minigameLoaded=t.minigameLoaded,o.minigame=t.minigame),Vt[e]=o}for(const e of Object.keys(Game.Upgrades)){const t=Game.Upgrades[e];let o=_t[e];void 0===o&&(_t[e]=ko(e),o=_t[e]),o.bought=t.bought,_t[e]=o}for(const e of Object.keys(Game.Achievements)){const t=Game.Achievements[e];let o=Xt[e];void 0===o&&(Xt[e]=Co(e),o=Xt[e]),o.won=t.won,Xt[e]=o}go(),Le=He,Ae=$e}function vo(e,t,o){let n=0;for(;et.plantsById[t.plot[ee[1]][ee[0]][0]-1].matureBase,o=t.plantsById[t.plot[ee[1]][ee[0]][0]-1].name;l("CMTooltipBorder").appendChild(wo("Reward (Current / Maximum)"));const n=document.createElement("div");n.id="CMTooltipPlantReward",l("CMTooltipBorder").appendChild(n),"Bakeberry"===o?l("CMTooltipPlantReward").textContent=`${e?re(Math.min(.03*Game.cookies,60*Game.cookiesPs*30)):"0"} / ${re(60*Game.cookiesPs*30)}`:"Chocoroot"===o||"White chocoroot"===o?l("CMTooltipPlantReward").textContent=`${e?re(Math.min(.03*Game.cookies,60*Game.cookiesPs*3)):"0"} / ${re(60*Game.cookiesPs*3)}`:"Queenbeet"===o?l("CMTooltipPlantReward").textContent=`${e?re(Math.min(.04*Game.cookies,60*Game.cookiesPs*60)):"0"} / ${re(60*Game.cookiesPs*60)}`:"Duketater"===o?l("CMTooltipPlantReward").textContent=`${e?re(Math.min(.08*Game.cookies,60*Game.cookiesPs*120)):"0"} / ${re(60*Game.cookiesPs*120)}`:l("CMTooltipArea").style.display="none"}else l("CMTooltipArea").style.display="none"}():"ha"===Z?function(){const t=Game.Objects.Farm.minigame;if(e.TooltipLump){l("CMTooltipBorder").appendChild(wo("Cookies gained from harvesting:"));let e=0,o=0;Game.keys[16]&&Game.keys[17]&&(o=1);for(let n=0;n<6;n++)for(let i=0;i<6;i++)if(t.plot[n][i][0]>=1){const a=t.plot[n][i],r=t.plantsById[a[0]-1],l=r.name;let s=!0;o&&r.immortal&&(s=!1),a[1]0&&t=1?l("CMTimerBarGCMinBar").textContent=Math.ceil((Game.shimmerTypes.golden.minTime-Game.shimmerTypes.golden.time)/Game.fps):l("CMTimerBarGCMinBar").textContent="",Game.shimmerTypes.golden.minTime===Game.shimmerTypes.golden.maxTime?(l("CMTimerBarGCMinBar").style.borderTopRightRadius="10px",l("CMTimerBarGCMinBar").style.borderBottomRightRadius="10px"):(l("CMTimerBarGCMinBar").style.borderTopRightRadius="",l("CMTimerBarGCMinBar").style.borderBottomRightRadius=""),l("CMTimerBarGCBar").style.width=`${Math.round(Math.min(Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.minTime,Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)*t/Game.shimmerTypes.golden.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarGCBar").textContent=Math.ceil(Math.min(Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.minTime,Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps):l("CMTimerBarGCBar").textContent="",l("CMTimerBarGCTime").textContent=Math.ceil((Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps),n++),"christmas"===Game.season&&0===Game.shimmerTypes.reindeer.spawned?(l("CMTimerBarRen").style.display="",l("CMTimerBarRenMinBar").style.width=`${Math.round(Math.max(0,Game.shimmerTypes.reindeer.minTime-Game.shimmerTypes.reindeer.time)*t/Game.shimmerTypes.reindeer.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarRenMinBar").textContent=Math.ceil((Game.shimmerTypes.reindeer.minTime-Game.shimmerTypes.reindeer.time)/Game.fps):l("CMTimerBarRenMinBar").textContent="",l("CMTimerBarRenBar").style.width=`${Math.round(Math.min(Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.minTime,Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)*t/Game.shimmerTypes.reindeer.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarRenBar").textContent=Math.ceil(Math.min(Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.minTime,Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps):l("CMTimerBarRenBar").textContent="",l("CMTimerBarRenTime").textContent=Math.ceil((Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps),n++):l("CMTimerBarRen").style.display="none";const i={};l("CMTimerBarBuffTimers").innerHTML="";for(const t of Object.keys(Game.buffs))if(Game.buffs[t]){const a=lo(Game.buffs[t].name,Game.buffs[t].name,[{id:`${Game.buffs[t].name}Bar`}]);a.style.display="";let r="";r=void 0!==Y[Game.buffs[t].name]?Y[Game.buffs[t].name]:W,a.lastChild.children[1].className=B+r,a.lastChild.children[1].style.color="black",2===e.TimerBarOverlay?a.lastChild.children[1].textContent=`${Math.round(Game.buffs[t].time/Game.buffs[t].maxTime*100)}%`:a.lastChild.children[1].textContent="",a.lastChild.children[1].style.width=`${Math.round(Game.buffs[t].time*(o-8*Math.ceil(Game.buffs[t].time/Game.fps).toString().length)/Game.buffs[t].maxTime)}px`,a.lastChild.children[2].textContent=Math.ceil(Game.buffs[t].time/Game.fps),n++,i[Game.buffs[t].name]=a}for(const e of Object.keys(i))l("CMTimerBarBuffTimers").appendChild(i[e]);0!==n&&(l("CMTimerBar").style.height=12*n+2+"px"),ne!==n&&(ne=n,uo())}}(),co(),To(),function(){if(1===e.TooltipWrink&&1===$){let e=!1;for(const t of Object.keys(Game.wrinklers)){const o=Game.wrinklers[t];if(o.phase>0&&o.selected){if(e=!0,0!==z[t]&&void 0!==z[t])break;{const e=document.createElement("div"),o=document.createElement("div");o.style.minWidth="120px",o.style.marginBottom="4px";const n=document.createElement("div");n.style.textAlign="center",n.id="CMTooltipWrinkler",o.appendChild(n),e.appendChild(o),Game.tooltip.draw(this,escape(e.innerHTML)),I=t,z[t]=1}}else z[t]=0}e||Game.tooltip.hide()}}(),function(){if(1===e.TooltipWrink&&null!==l("CMTooltipWrinkler")){let e=Game.wrinklers[I].sucked,t=1.1;if(Game.Has("Sacrilegious corruption")&&(t*=1.05),1===Game.wrinklers[I].type&&(t*=3),e*=t,Game.Has("Wrinklerspawn")&&(e*=1.05),Vt.Temple.minigameLoaded){const t=Game.hasGod("scorn");1===t?e*=1.15:2===t?e*=1.1:3===t&&(e*=1.05)}l("CMTooltipWrinkler").textContent=re(e)}}(),e.UpStats&&"stats"===Game.onMenu&&(Game.drawT-1)%(5*Game.fps)!=0&&(Game.drawT-1)%Game.fps==0&&Game.UpdateMenu(),l("cookies").innerHTML=l("cookies").innerHTML.replace(/.*(?=
)/i,re(Game.cookies))}class So{constructor(e){this.maxLength=e,this.queue=[]}addLatest(e){this.queue.push(e)>this.maxLength&&this.queue.shift()}calcAverage(e){e>this.maxLength&&(e=this.maxLength),e>this.queue.length&&(e=this.queue.length);let t=0;for(let o=this.queue.length-1;o>=0&&o>this.queue.length-1-e;o--)t+=this.queue[o];return 0===t?0:t/e}}function Bo(){const t=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){let o=Game.cookies+zt;Game.cpsSucked>0&&(o+=ut),Wt=Math.max(Game.cookiesEarned,o),o*=.05;const n=t-fe,i=Math.max(0,Game.cookies-ge)/n,a=Math.max(0,ut-Ce)/n,r=Math.max(0,ht[0]-ye)/n,l=Math.max(0,o-st)/n,s=(Game.cookieClicks-be)/n;for(let e=0;eHt?W:t.pp>Rt?O:N,0!==Number(e.PPSecondsLowerLimit)&&o/ao()0&&(n=F),n}function Eo(e){for(const t of Object.keys(e))Game.cookiesPs?e[t].pp=Math.max(e[t].price-(Game.cookies+ro()),0)/Game.cookiesPs+e[t].price/e[t].bonus:e[t].pp=e[t].price/e[t].bonus,e[t].color=Po(e[t],e[t].price)}function No(){!function(){if(Dt=1/0,Ht=1,$t=[],void 0===e.PPExcludeTop&&(e.PPExcludeTop=0),0===e.ColorPPBulkMode&&Game.buyMode>0){for(const e of Object.keys(ct))Game.cookiesPs?ct[e].pp=Math.max(Game.Objects[e].getPrice()-(Game.cookies+ro()),0)/Game.cookiesPs+Game.Objects[e].getPrice()/ct[e].bonus:ct[e].pp=Game.Objects[e].getPrice()/ct[e].bonus,$t.push([ct[e].pp,Game.Objects[e].getPrice()]);if($t.sort(((e,t)=>e[0]-t[0])),e.PPOnlyConsiderBuyable)for(;$t[0][1]>Game.cookies&&1!==$t.length;)$t.shift();Dt=$t[e.PPExcludeTop][0],Ht=$t[$t.length-1][0],Rt=(Ht-Dt)/2+Dt;for(const t of Object.keys(ct)){ct[t].color=Po(ct[t],Game.Objects[t].getPrice());for(let o=0;o0){let t;1===Game.buyBulk?t=ct:10===Game.buyBulk?t=dt:100===Game.buyBulk&&(t=pt);for(const e of Object.keys(t))Game.cookiesPs?t[e].pp=Math.max(Game.Objects[e].bulkPrice-(Game.cookies+ro()),0)/Game.cookiesPs+Game.Objects[e].bulkPrice/t[e].bonus:t[e].pp=Game.Objects[e].bulkPrice/t[e].bonus,$t.push([t[e].pp,Game.Objects[e].bulkPrice]);if($t.sort(((e,t)=>e[0]-t[0])),e.PPOnlyConsiderBuyable)for(;$t[0][1]>Game.cookies&&1!==$t.length;)$t.shift();Dt=$t[e.PPExcludeTop][0],Ht=$t[$t.length-1][0],Rt=(Ht-Dt)/2+Dt;for(const o of Object.keys(ct)){t[o].color=Po(t[o],Game.Objects[o].bulkPrice);for(let n=0;n=Game.CpsAchievements[e].threshold&&Fo(Game.CpsAchievements[e].name);Re=l;const s=Game.shimmerTypes.golden.n,c=Yt("Dragon's Fortune");for(let t=0;t=7&&Fo("Elder"),!Ro("Veteran")&&e>=14&&Fo("Veteran");let t=0,o=1,n=1,i=1e5;for(const e of Object.keys(Vt))t+=Vt[e].amount,i=Math.min(Vt[e].amount,i),Ro("Mathematician")||Vt[e].amount=1&&Fo("One with everything"),1===o&&Fo("Mathematician"),1===n&&Fo("Base 10"),i>=100&&Fo("Centennial"),i>=150&&Fo("Centennial and a half"),i>=200&&Fo("Bicentennial"),i>=250&&Fo("Bicentennial and a half"),i>=300&&Fo("Tricentennial"),i>=350&&Fo("Tricentennial and a half"),i>=400&&Fo("Quadricentennial"),i>=450&&Fo("Quadricentennial and a half"),i>=500&&Fo("Quincentennial"),i>=550&&Fo("Quincentennial and a half"),i>=600&&Fo("Sexcentennial"),t>=100&&Fo("Builder"),t>=500&&Fo("Architect"),t>=1e3&&Fo("Engineer"),t>=2e3&&Fo("Lord of Constructs"),t>=4e3&&Fo("Grand design"),t>=8e3&&Fo("Ecumenopolis"),Ee>=20&&Fo("Enhancer"),Ee>=50&&Fo("Augmenter"),Ee>=100&&Fo("Upgrader"),Ee>=200&&Fo("Lord of Progress"),Ee>=300&&Fo("The full picture"),Ee>=400&&Fo("When there's nothing left to add"),t>=4e3&&Ee>=300&&Fo("Polymath"),t>=8e3&&Ee>=400&&Fo("Renaissance baker"),Vt.Cursor.amount+Vt.Grandma.amount>=777&&Fo("The elder scrolls");let a=!0;for(const e of Object.keys(Ao))Zt(Ao[e])||(a=!1);a&&Fo("Spooky cookies");let r=!0;for(const e of Object.keys(jo))Zt(jo[e])||(r=!1);if(r&&Fo("Let it snow"),Zt("Fortune cookies")){const e=Game.Tiers.fortune.upgrades;let t=0;for(const o of Object.keys(e))Zt(e[o].name)&&t++;t>=e.length&&Fo("O Fortuna")}}function $o(e,t){Go(),Vt[e].amount+=t;const o=Vt[e];if("Cursor"===e)o.amount>=1&&Fo("Click"),o.amount>=2&&Fo("Double-click"),o.amount>=50&&Fo("Mouse wheel"),o.amount>=100&&Fo("Of Mice and Men"),o.amount>=200&&Fo("The Digital"),o.amount>=300&&Fo("Extreme polydactyly"),o.amount>=400&&Fo("Dr. T"),o.amount>=500&&Fo("Thumbs, phalanges, metacarpals"),o.amount>=600&&Fo("With her finger and her thumb"),o.amount>=700&&Fo("Gotta hand it to you"),o.amount>=800&&Fo("The devil's workshop");else for(const e in Game.Objects[o.name].tieredAchievs)o.amount>=Game.Tiers[Game.Objects[o.name].tieredAchievs[e].tier].achievUnlock&&Fo(Game.Objects[o.name].tieredAchievs[e].name);const n=Oe;return Wo(),Ho(),n!==Oe&&Wo(),De-Game.cookiesPs}function Io(e){if("toggle"===Game.Upgrades[e].pool||0===Game.Upgrades[e].bought&&Game.Upgrades[e].unlocked&&"prestige"!==Game.Upgrades[e].pool){Go(),"Shimmering veil [on]"===_t[e].name?_t["Shimmering veil [off]"].bought=0:"Golden switch [on]"===_t[e].name?_t["Golden switch [off]"].bought=0:_t[e].bought=(_t[e].bought+1)%2,_t[e],Game.CountsAsUpgradeOwned(Game.Upgrades[e].pool)&&Ee++,"Elder Pledge"===e?(Ne++,Ne>0&&Fo("Elder nap"),Ne>=5&&Fo("Elder slumber")):"Elder Covenant"===e?Fo("Elder calm"):"Prism heart biscuits"===e?Fo("Lovely cookies"):"Heavenly key"===e&&Fo("Wholesome");const t=Oe;Wo(),Ho(),t!==Oe&&Wo();const o=function(){let e=0;Zt("Thousand fingers")&&(e+=.1),Zt("Million fingers")&&(e*=5),Zt("Billion fingers")&&(e*=10),Zt("Trillion fingers")&&(e*=20),Zt("Quadrillion fingers")&&(e*=20),Zt("Quintillion fingers")&&(e*=20),Zt("Sextillion fingers")&&(e*=20),Zt("Septillion fingers")&&(e*=20),Zt("Octillion fingers")&&(e*=20),Zt("Nonillion fingers")&&(e*=20);let t=0;for(const e of Object.keys(Vt))t+=Vt[e].amount;t-=Vt.Cursor.amount,e*=t,Zt("Plastic mouse")&&(e+=.01*De),Zt("Iron mouse")&&(e+=.01*De),Zt("Titanium mouse")&&(e+=.01*De),Zt("Adamantium mouse")&&(e+=.01*De),Zt("Unobtainium mouse")&&(e+=.01*De),Zt("Eludium mouse")&&(e+=.01*De),Zt("Wishalloy mouse")&&(e+=.01*De),Zt("Fantasteel mouse")&&(e+=.01*De),Zt("Nevercrack mouse")&&(e+=.01*De),Zt("Armythril mouse")&&(e+=.01*De),Zt("Technobsidian mouse")&&(e+=.01*De),Zt("Plasmarble mouse")&&(e+=.01*De),Zt("Miraculite mouse")&&(e+=.01*De),Zt("Fortune #104")&&(e+=.01*De);let o=1;if(Zt("Santa's helpers")&&(o*=1.1),Zt("Cookie egg")&&(o*=1.1),Zt("Halo gloves")&&(o*=1.1),Zt("Dragon claw")&&(o*=1.03),Zt("Aura gloves")&&(o*=1+.05*Math.min(Game.Objects.Cursor.level,Zt("Luminous gloves")?20:10)),o*=Jt("click"),Vt.Temple.minigameLoaded&&eo){const e=eo("labor");1===e?o*=1.15:2===e?o*=1.1:3===e&&(o*=1.05)}for(const e of Object.keys(Game.buffs))void 0!==Game.buffs[e].multClick&&(o*=Game.buffs[e].multClick);o*=1+.05*Yt("Dragon Cursor");let n=o*Game.ComputeCps(1,Zt("Reinforced index finger")+Zt("Carpal tunnel prevention cream")+Zt("Ambidextrous"),e);return n=Game.runModHookOnValue("cookiesPerClick",n),Game.hasBuff("Cursed finger")&&(n=Game.buffs["Cursed finger"].power),n}()-Game.computedMouseCps;return o?[De-Game.cookiesPs,o]:[De-Game.cookiesPs]}return[]}function zo(e,t){const o=[];for(const t of Object.keys(Game.Objects))o[t]={},o[t].bonus=$o(t,e),1!==e&&(Se=1);return o}function Vo(){for(const e of Object.keys(Game.Objects))ct[e].price=Oo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,1),dt[e].price=Oo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,10),pt[e].price=Oo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,100)}function _o(){ct=zo(1),dt=zo(10),pt=zo(100),function(){Ct=[];for(const e of Object.keys(Game.Upgrades)){const t=Io(e);Ct[e]={},t[0]&&(Ct[e].bonus=t[0]),t[1]&&(Ct[e].bonusMouse=t[1])}}()}function Xo(e,t,o){let n=0,i=0,a=0,r=0,l=1+Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10);for(;a0?e/=t:e=0,xt=Xo(7,e,nt),vt=2*xt[1]/nt,wt=xt[2]/60/60/6/ot,St=Xo(6,e,it),Tt=2*St[1]/it,Mt=St[2]/60/60/6/ot,Et=Xo(7,7*e,nt),Bt=2*Et[1]/nt,Pt=Et[2]/60/60/6/ot,Ft=Xo(6,7*e,it),Nt=2*Ft[1]/it,Ot=Ft[2]/60/60/6/ot}function qo(){const e=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){const t=Game.HowMuchPrestige(Game.cookiesReset),o=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))-Math.floor(t),n=e-Te,i=Math.max(0,o-Me)/n;for(let e=0;e\n\t`}function Ko(){bt="",Gt="",kt="";const e=[];for(const t of Object.keys(Game.Upgrades))e.push(Game.Upgrades[t]);e.sort((function(e,t){return e.order>t.order?1:e.order0?Ve/=e:Ve=0,_e=nt*(.15*Ve)+13,Xe=it*(.15*Ve)+13,Qe=7*Ve,qe=nt*(.15*Qe)+13,Ye=it*(.15*Qe)+13,Ke=2*Ve,Je=.15*Ke,Ze=0;let t=0,o=0;for(const e of Object.keys(Game.Objects))Game.Objects[e].amount>t&&(t=Game.Objects[e].amount),Game.Objects[e].amount>0&&o++;for(const e of Object.keys(Game.Objects))(Game.Objects[e].amountZe&&(Ze=2*Game.Objects[e].price,et=e)}function en(){let e=1,t=1,o=1;Zt("Green yeast digestives")&&(o*=1.01),Zt("Dragon fang")&&(o*=1.03),e*=1+.1*Game.auraMult("Ancestral Metamorphosis"),e*=Game.eff("goldenCookieGain"),t*=1+.1*Game.auraMult("Unholy Dominion"),t*=Game.eff("wrathCookieGain"),nt=o*e,it=o*t,ot=1,0===Game.shimmerTypes.golden.n&&(ot*=1+1.23*Game.auraMult("Dragon's Fortune"))}function tn(){ut=0,mt=0,ht=[0,null];for(let e=0;eht[0]&&(ht=[t,e]))}}function on(){go(),tn(),Zo(),en(),Qo(),Ko(),Jo(),ce=new So(Q[Q.length-1]),de=new So(Q[Q.length-1]),pe=new So(Q[Q.length-1]),ue=new So(Q[Q.length-1]),me=new So(q[q.length-1]),he=new So(5),qo(),Bo(),_o(),Vo(),No()}const nn={BotBar:1,TimerBar:1,TimerBarPos:0,TimerBarOverlay:2,BuildColor:1,BulkBuildColor:0,UpBarColor:1,UpgradeBarFixedPos:1,CalcWrink:0,CPSMode:1,AvgCPSHist:3,AvgClicksHist:0,ColorPPBulkMode:1,PPExcludeTop:0,PPSecondsLowerLimit:0,PPOnlyConsiderBuyable:0,ToolWarnBon:0,Title:1,GeneralSound:1,GCNotification:0,GCFlash:1,GCSound:1,GCVolume:100,GCSoundURL:"https://freesound.org/data/previews/66/66717_931655-lq.mp3",FortuneNotification:0,FortuneFlash:1,FortuneSound:1,FortuneVolume:100,FortuneSoundURL:"https://freesound.org/data/previews/174/174027_3242494-lq.mp3",SeaNotification:0,SeaFlash:1,SeaSound:1,SeaVolume:100,SeaSoundURL:"https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3",GardFlash:1,GardSound:1,GardVolume:100,GardSoundURL:"https://freesound.org/data/previews/103/103046_861714-lq.mp3",MagicNotification:0,MagicFlash:1,MagicSound:1,MagicVolume:100,MagicSoundURL:"https://freesound.org/data/previews/221/221683_1015240-lq.mp3",WrinklerNotification:0,WrinklerFlash:1,WrinklerSound:1,WrinklerVolume:100,WrinklerSoundURL:"https://freesound.org/data/previews/124/124186_8043-lq.mp3",WrinklerMaxNotification:0,WrinklerMaxFlash:1,WrinklerMaxSound:1,WrinklerMaxVolume:100,WrinklerMaxSoundURL:"https://freesound.org/data/previews/152/152743_15663-lq.mp3",TooltipBuildUpgrade:1,TooltipAmor:0,ToolWarnLucky:1,ToolWarnLuckyFrenzy:1,ToolWarnConjure:1,ToolWarnConjureFrenzy:1,ToolWarnEdifice:1,ToolWarnUser:0,ToolWarnPos:1,TooltipGrim:1,TooltipWrink:1,TooltipLump:1,TooltipPlots:1,DragonAuraInfo:1,TooltipAscendButton:1,Stats:1,MissingUpgrades:1,UpStats:1,TimeFormat:0,DetailedTime:1,GrimoireBar:1,HeavenlyChipsTarget:1,ShowMissedGC:1,Scale:2,ScaleDecimals:2,ScaleSeparator:0,ScaleCutoff:999999,Colors:{Blue:"#4bb8f0",Green:"#00ff00",Yellow:"#ffff00",Orange:"#ff7f00",Red:"#ff0000",Purple:"#ff00ff",Gray:"#b3b3b3",Pink:"#ff1493",Brown:"#8b4513"},SortBuildings:0,SortUpgrades:0,GCTimer:1,Favicon:1,WrinklerButtons:1,BulkBuyBlock:0,Header:{BarsColors:1,Calculation:1,Notification:1,NotificationGeneral:1,NotificationGC:1,NotificationFC:1,NotificationSea:1,NotificationGard:1,NotificationMagi:1,NotificationWrink:1,NotificationWrinkMax:1,Tooltip:1,Statistics:1,Notation:1,Miscellaneous:1,Lucky:1,Chain:1,Spells:1,Garden:1,Prestige:1,Wrink:1,Sea:1,Misc:1,InfoTab:1}},an=function(e){if(1===e){const e=function(){try{Notification.requestPermission().then()}catch(e){return!1}return!0};"Notification"in window?e()?Notification.requestPermission().then():Notification.requestPermission():console.log("This browser does not support notifications.")}};function rn(){1===e.BotBar?(l("CMBotBar").style.display="",co()):l("CMBotBar").style.display="none",uo()}function ln(){BeautifyAll(),Game.RefreshStore(),Game.RebuildUpgrades(),co(),no(),io()}function sn(){let t="";for(let o=0;o0?At.wrath?l("CMFavicon").href="https://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico":l("CMFavicon").href="https://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico":l("CMFavicon").href="https://orteil.dashnet.org/cookieclicker/favicon.ico"}class dn{constructor(e,t){this.type=e,this.group=t}}class pn extends dn{constructor(e,t,o,n,i,a=null){super(e,t),this.label=o,this.desc=n,this.toggle=i,a&&(this.func=a)}}class un extends dn{constructor(e,t,o,n){super(e,t),this.label=o,this.desc=n;for(let e=0;e<101;e++)this.label[e]=`${e}%`}}class mn extends dn{constructor(e,t,o,n,i,a){super(e,t),this.label=o,this.desc=n,this.min=i,this.max=a}}const hn={BotBar:new pn("bool","BarsColors",["Bottom Bar OFF","Bottom Bar ON"],"Building Information",!0,(function(){rn()})),TimerBar:new pn("bool","BarsColors",["Timer Bar OFF","Timer Bar ON"],"Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy",!0,(function(){mo()})),TimerBarPos:new pn("bool","BarsColors",["Timer Bar Position (Top Left)","Timer Bar Position (Bottom)"],"Placement of the Timer Bar",!1,(function(){0===e.TimerBarPos?(l("CMTimerBar").style.width="30%",l("CMTimerBar").style.bottom="",l("game").insertBefore(l("CMTimerBar"),l("sectionLeft"))):(l("CMTimerBar").style.width="100%",l("CMTimerBar").style.bottom="0px",l("wrapper").appendChild(l("CMTimerBar"))),uo()})),TimerBarOverlay:new pn("bool","BarsColors",["Timer Bar Overlay OFF","Timer Bar Overlay Only Seconds","Timer Bar Overlay Full"],"Overlay on timers displaying seconds and/or percentage left",!0),SortBuildings:new pn("bool","BarsColors",["Sort Buildings: Default","Sort Buildings: PP"],"Sort the display of buildings in either default order or by PP",!1,(function(){no()})),SortUpgrades:new pn("bool","BarsColors",["Sort Upgrades: Default","Sort Upgrades: PP"],"Sort the display of upgrades in either default order or by PP",!1,(function(){io()})),BuildColor:new pn("bool","BarsColors",["Building Colors OFF","Building Colors ON"],"Color code buildings",!0,(function(){no()})),BulkBuildColor:new pn("bool","BarsColors",["Bulk Building Colors (Single Building Color)","Bulk Building Colors (Calculated Bulk Color)"],"Color code bulk buildings based on single buildings color or calculated bulk value color",!1,(function(){no()})),UpBarColor:new pn("bool","BarsColors",["Upgrade Colors/Bar OFF","Upgrade Colors with Bar ON","Upgrade Colors without Bar ON"],"Color code upgrades and optionally add a counter bar",!1,(function(){1===e.UpBarColor?(l("CMUpgradeBar").style.display="",io()):2===e.UpBarColor?(l("CMUpgradeBar").style.display="none",io()):(l("CMUpgradeBar").style.display="none",Game.RebuildUpgrades())})),Colors:new class extends dn{constructor(e,t,o,n){super(e,t),this.desc=o,this.func=n}}("color","BarsColors",{Blue:"Color Blue. Used to show better than best PP building, for Click Frenzy bar, and for various labels",Green:"Color Green. Used to show best PP building, for Blood Frenzy bar, and for various labels",Yellow:"Color Yellow. Used to show between best and worst PP buildings closer to best, for Frenzy bar, and for various labels",Orange:"Color Orange. Used to show between best and worst PP buildings closer to worst, for Next Reindeer bar, and for various labels",Red:"Color Red. Used to show worst PP building, for Clot bar, and for various labels",Purple:"Color Purple. Used to show worse than worst PP building, for Next Cookie bar, and for various labels",Gray:"Color Gray. Used to show negative or infinity PP, and for Next Cookie/Next Reindeer bar",Pink:"Color Pink. Used for Dragonflight bar",Brown:"Color Brown. Used for Dragon Harvest bar"},(function(){sn()})),UpgradeBarFixedPos:new pn("bool","BarsColors",["Upgrade Bar Fixed Position OFF","Upgrade Bar Fixed Position ON"],"Lock the upgrade bar at top of the screen to prevent it from moving ofscreen when scrolling",!0,(function(){1===e.UpgradeBarFixedPos?(l("CMUpgradeBar").style.position="sticky",l("CMUpgradeBar").style.top="0px"):l("CMUpgradeBar").style.position=""})),CalcWrink:new pn("bool","Calculation",["Calculate with Wrinklers OFF","Calculate with Wrinklers ON","Calculate with Single Fattest Wrinkler ON"],"Calculate times and average Cookies Per Second with (only the single non-shiny fattest) Wrinklers",!0),CPSMode:new pn("bool","Calculation",["Current Cookies Per Second","Average Cookies Per Second"],"Calculate times using current Cookies Per Second or average Cookies Per Second",!1),AvgCPSHist:new pn("bool","Calculation",["Average CPS for past 10s","Average CPS for past 15s","Average CPS for past 30s","Average CPS for past 1m","Average CPS for past 5m","Average CPS for past 10m","Average CPS for past 15m","Average CPS for past 30m"],"How much time average Cookies Per Second should consider",!1),AvgClicksHist:new pn("bool","Calculation",["Average Cookie Clicks for past 1s","Average Cookie Clicks for past 5s","Average Cookie Clicks for past 10s","Average Cookie Clicks for past 15s","Average Cookie Clicks for past 30s"],"How much time average Cookie Clicks should consider",!1),ColorPPBulkMode:new pn("bool","Calculation",["Color of PP (Compared to Single)","Color of PP (Compared to Bulk)"],"Color PP-values based on comparison with single purchase or with selected bulk-buy mode",!1,(function(){No()})),PPExcludeTop:new pn("bool","Calculation",["Don't Ignore Any","Ignore 1st Best","Ignore 1st and 2nd Best","Ignore 1st, 2nd and 3rd Best"],"Makes CookieMonster ignore the 1st, 2nd or 3rd best buildings in labeling and colouring PP values",!0),PPSecondsLowerLimit:new mn("numscale","Calculation","Lower limit for PP (in seconds): ",'If a building or upgrade costs less than the specified seconds of CPS it will also be considered optimal and label it as such ("PP is less than xx seconds of CPS"); setting to 0 ignores this option',0,1/0),PPOnlyConsiderBuyable:new pn("bool","Calculation",["Don't Ignore Non-Buyable","Ignore Non-Buyable"],"Makes CookieMonster label buildings and upgrades you can't buy right now red, useful in those situations where you just want to spend your full bank 'most optimally'",!0),ToolWarnBon:new pn("bool","Calculation",["Calculate Tooltip Warning With Bonus CPS OFF","Calculate Tooltip Warning With Bonus CPS ON"],"Calculate the warning with or without the bonus CPS you get from buying",!0),Title:new pn("bool","NotificationGeneral",["Title OFF","Title ON","Title Pinned Tab Highlight"],'Update title with Golden Cookie/Season Popup timers; pinned tab highlight only changes the title when a Golden Cookie/Season Popup spawns; "!" means that Golden Cookie/Reindeer can spawn',!0),GeneralSound:new pn("bool","NotificationGeneral",["Consider Game Volume Setting OFF","Consider Game Volume Setting ON"],'Turning this toggle to "off" makes Cookie Monster no longer consider the volume setting of the base game, allowing mod notifications to play with base game volume turned down',!0),GCNotification:new pn("bool","NotificationGC",["Notification OFF","Notification ON"],"Create a notification when Golden Cookie spawns",!0,(function(){an(e.GCNotification)})),GCFlash:new pn("bool","NotificationGC",["Flash OFF","Flash ON"],"Flash screen on Golden Cookie",!0),GCSound:new pn("bool","NotificationGC",["Sound OFF","Sound ON"],"Play a sound on Golden Cookie",!0),GCVolume:new un("vol","NotificationGC",[],"Volume"),GCSoundURL:new pn("url","NotificationGC","Sound URL:","URL of the sound to be played when a Golden Cookie spawns"),FortuneNotification:new pn("bool","NotificationFC",["Notification OFF","Notification ON"],"Create a notification when Fortune Cookie is on the Ticker",!0,(function(){an(e.FortuneNotification)})),FortuneFlash:new pn("bool","NotificationFC",["Flash OFF","Flash ON"],"Flash screen on Fortune Cookie",!0),FortuneSound:new pn("bool","NotificationFC",["Sound OFF","Sound ON"],"Play a sound on Fortune Cookie",!0),FortuneVolume:new un("vol","NotificationFC",[],"Volume"),FortuneSoundURL:new pn("url","NotificationFC","Sound URL:","URL of the sound to be played when the Ticker has a Fortune Cookie"),SeaNotification:new pn("bool","NotificationSea",["Notification OFF","Notification ON"],"Create a notification on Season Popup",!0,(function(){an(e.SeaNotification)})),SeaFlash:new pn("bool","NotificationSea",["Flash OFF","Flash ON"],"Flash screen on Season Popup",!0),SeaSound:new pn("bool","NotificationSea",["Sound OFF","Sound ON"],"Play a sound on Season Popup",!0),SeaVolume:new un("vol","NotificationSea",[],"Volume"),SeaSoundURL:new pn("url","NotificationSea","Sound URL:","URL of the sound to be played when a Season Special spawns"),GardFlash:new pn("bool","NotificationGard",["Garden Tick Flash OFF","Flash ON"],"Flash screen on Garden Tick",!0),GardSound:new pn("bool","NotificationGard",["Sound OFF","Sound ON"],"Play a sound on Garden Tick",!0),GardVolume:new un("vol","NotificationGard",[],"Volume"),GardSoundURL:new pn("url","NotificationGard","Garden Tick Sound URL:","URL of the sound to be played when the garden ticks"),MagicNotification:new pn("bool","NotificationMagi",["Notification OFF","Notification ON"],"Create a notification when magic reaches maximum",!0,(function(){an(e.MagicNotification)})),MagicFlash:new pn("bool","NotificationMagi",["Flash OFF","Flash ON"],"Flash screen when magic reaches maximum",!0),MagicSound:new pn("bool","NotificationMagi",["Sound OFF","Sound ON"],"Play a sound when magic reaches maximum",!0),MagicVolume:new un("vol","NotificationMagi",[],"Volume"),MagicSoundURL:new pn("url","NotificationMagi","Sound URL:","URL of the sound to be played when magic reaches maxium"),WrinklerNotification:new pn("bool","NotificationWrink",["Notification OFF","Notification ON"],"Create a notification when a Wrinkler appears",!0,(function(){an(e.WrinklerNotification)})),WrinklerFlash:new pn("bool","NotificationWrink",["Flash OFF","Flash ON"],"Flash screen when a Wrinkler appears",!0),WrinklerSound:new pn("bool","NotificationWrink",["Sound OFF","Sound ON"],"Play a sound when a Wrinkler appears",!0),WrinklerVolume:new un("vol","NotificationWrink",[],"Volume"),WrinklerSoundURL:new pn("url","NotificationWrink","Sound URL:","URL of the sound to be played when a Wrinkler appears"),WrinklerMaxNotification:new pn("bool","NotificationWrinkMax",["Notification OFF","Notification ON"],"Create a notification when the maximum amount of Wrinklers has appeared",!0,(function(){an(e.WrinklerMaxNotification)})),WrinklerMaxFlash:new pn("bool","NotificationWrinkMax",["Flash OFF","Flash ON"],"Flash screen when the maximum amount of Wrinklers has appeared",!0),WrinklerMaxSound:new pn("bool","NotificationWrinkMax",["Sound OFF","Sound ON"],"Play a sound when the maximum amount of Wrinklers has appeared",!0),WrinklerMaxVolume:new un("vol","NotificationWrinkMax",[],"Volume"),WrinklerMaxSoundURL:new pn("url","NotificationWrinkMax","Sound URL:","URL of the sound to be played when the maximum amount of Wrinklers has appeared"),TooltipBuildUpgrade:new pn("bool","Tooltip",["Building/Upgrade Tooltip Information OFF","Building/Upgrade Tooltip Information ON"],"Extra information in Building/Upgrade tooltips",!0),TooltipAmor:new pn("bool","Tooltip",["Buildings Tooltip Amortization Information OFF","Buildings Tooltip Amortization Information ON"],"Add amortization information to buildings tooltip",!0),ToolWarnLucky:new pn("bool","Tooltip",["Tooltip Lucky Warning OFF","Tooltip Lucky Warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Lucky!" rewards',!0),ToolWarnLuckyFrenzy:new pn("bool","Tooltip",["Tooltip Lucky Frenzy Warning OFF","Tooltip Lucky Frenzy Warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Lucky!" (Frenzy) rewards',!0),ToolWarnConjure:new pn("bool","Tooltip",["Tooltip Conjure Warning OFF","Tooltip Conjure Warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards',!0),ToolWarnConjureFrenzy:new pn("bool","Tooltip",["Tooltip Conjure Frenzy Warning OFF","Tooltip Conjure Frenzy Warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards with Frenzy active',!0),ToolWarnEdifice:new pn("bool","Tooltip",["Tooltip Edifice Warning OFF","Tooltip Edifice Warning ON"],'A warning when buying if it will put the bank under the amount needed for "Spontaneous Edifice" to possibly give you your most expensive building',!0),ToolWarnUser:new mn("numscale","Tooltip","Tooltip Warning At x times CPS: ","Use this to show a customized warning if buying it will put the bank under the amount equal to value times cps; setting to 0 disables the function altogether",0,1/0),ToolWarnPos:new pn("bool","Tooltip",["Tooltip Warning Position (Left)","Tooltip Warning Position (Bottom)"],"Placement of the warning boxes",!1,(function(){fo()})),TooltipGrim:new pn("bool","Tooltip",["Grimoire Tooltip Information OFF","Grimoire Tooltip Information ON"],"Extra information in tooltip for grimoire",!0),TooltipWrink:new pn("bool","Tooltip",["Wrinkler Tooltip OFF","Wrinkler Tooltip ON"],"Shows the amount of cookies a wrinkler will give when popping it",!0),TooltipLump:new pn("bool","Tooltip",["Sugar Lump Tooltip OFF","Sugar Lump Tooltip ON"],"Shows the current Sugar Lump type in Sugar lump tooltip.",!0),TooltipPlots:new pn("bool","Tooltip",["Garden Plots Tooltip OFF","Garden Plots Tooltip ON"],"Shows a tooltip for plants that have a cookie reward.",!0),DragonAuraInfo:new pn("bool","Tooltip",["Extra Dragon Aura Info OFF","Extra Dragon Aura Info ON"],"Shows information about changes in CPS and costs in the dragon aura interface.",!0),TooltipAscendButton:new pn("bool","Tooltip",["Show Extra Info Ascend Tooltip OFF","Show Extra Info Ascend Tooltip ON"],"Shows additional info in the ascend tooltip",!0),Stats:new pn("bool","Statistics",["Statistics OFF","Statistics ON"],"Extra Cookie Monster statistics!",!0),MissingUpgrades:new pn("bool","Statistics",["Missing Upgrades OFF","Missing Upgrades ON"],"Shows Missing upgrades in Stats Menu. This feature can be laggy for users with a low amount of unlocked achievements.",!0),UpStats:new pn("bool","Statistics",["Statistics Update Rate (Default)","Statistics Update Rate (1s)"],"Default Game rate is once every 5 seconds",!1),TimeFormat:new pn("bool","Statistics",["Time XXd, XXh, XXm, XXs","Time XX:XX:XX:XX:XX"],"Change the time format",!1),DetailedTime:new pn("bool","Statistics",["Detailed Time OFF","Detailed Time ON"],"Change how time is displayed in certain statistics and tooltips",!0,(function(){1===e.DetailedTime?Game.sayTime=H:Game.sayTime=M.sayTime})),GrimoireBar:new pn("bool","Statistics",["Grimoire Magic Meter Timer OFF","Grimoire Magic Meter Timer ON"],"A timer on how long before the Grimoire magic meter is full",!0),HeavenlyChipsTarget:new mn("numscale","Statistics","Heavenly Chips Target: ",'Use this to set a Heavenly Chips target that will be counted towards in the "prestige" statsistics sections',1,1/0),ShowMissedGC:new pn("bool","Statistics",["Missed GC OFF","Missed GC ON"],"Show a stat in the statistics screen that counts how many Golden Cookies you have missed",!0),Scale:new pn("bool","Notation",["Game's Setting Scale","Metric","Short Scale","Short Scale (Abbreviated)","Scientific Notation","Engineering Notation"],"Change how long numbers are handled",!1,(function(){ln()})),ScaleDecimals:new pn("bool","Notation",["1 decimals","2 decimals","3 decimals"],"Set the number of decimals used when applicable",!1,(function(){ln()})),ScaleSeparator:new pn("bool","Notation",[". for decimals (Standard)",". for thousands"],"Set the separator used for decimals and thousands",!1,(function(){ln()})),ScaleCutoff:new mn("numscale","Notation","Notation Cut-off Point: ","The number from which CookieMonster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations",1,999999999),GCTimer:new pn("bool","Miscellaneous",["Golden Cookie Timer OFF","Golden Cookie Timer ON"],"A timer on the Golden Cookie when it has been spawned",!0,(function(){!function(){if(1===e.GCTimer)for(const e of Object.keys(ie))ie[e].style.display="block",ie[e].style.left=It[e].l.style.left,ie[e].style.top=It[e].l.style.top;else for(const e of Object.keys(ie))ie[e].style.display="none"}()})),Favicon:new pn("bool","Miscellaneous",["Favicon OFF","Favicon ON"],"Update favicon with Golden/Wrath Cookie",!0,(function(){cn()})),WrinklerButtons:new pn("bool","Miscellaneous",["Extra Buttons OFF","Extra Buttons ON"],"Show buttons for popping wrinklers at bottom of cookie section",!0,(function(){e.WrinklerButtons?(l("PopAllNormalWrinklerButton").style.display="",l("PopFattestWrinklerButton").style.display=""):(l("PopAllNormalWrinklerButton").style.display="none",l("PopFattestWrinklerButton").style.display="none")})),BulkBuyBlock:new pn("bool","Miscellaneous",["Block Bulk Buying OFF","Block Bulk Buying ON"],"Block clicking bulk buying when you can't buy all. This prevents buying 7 of a building when you are in buy-10 or buy-100 mode.",!0)};function fn(){return JSON.stringify({settings:e,version:"2.031.5"})}function gn(){if(Ie!==Game.dragonLevel||je){if(Game.dragonLevel<25&&Game.dragonLevels[Game.dragonLevel].buy.toString().includes("sacrifice")){let e=Game.dragonLevels[Game.dragonLevel].buy.toString().match(/Objects\[(.*)\]/)[1];const t=Game.dragonLevels[Game.dragonLevel].buy.toString().match(/sacrifice\((.*?)\)/)[1];if("i"!==e)if(e=e.replaceAll("'",""),Game.Objects[e].amount0&&(e=t);Vt[e].amount--,Pe--}for(const t of Object.keys(Vt)){const o=Vt[t];e+=oo(Game.Objects[o.name],Game.Objects[t].basePrice,o.amount,Game.Objects[t].free,o.amount)}return e}(),zt=e}(),je=0);const t=Game.auraMult("Fierce Hoarder")>0;!Be&&t?(Be=!0,Se=1):Be&&!t&&(Be=!1,Se=1),Se&&(Vo(),Se=0),function(){tn(),No(),function(){ft=0;let e=0;for(const t in Game.wrinklers)2===Game.wrinklers[t].phase&&e++;let t=1;if(Vt.Temple.minigameLoaded){const e=Game.hasGod("scorn");1===e?t*=1.15:2===e?t*=1.1:3===e&&(t*=1.05)}gt=e,ft=e*(.05*e*1.1)*(.05*Game.Has("Sacrilegious corruption")+1)*(.05*Game.Has("Wrinklerspawn")+1)*t}(),Bo(),qo();const e=Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset);Ut=le(e/ao())}(),function(){!function(){k=0,It={};for(const e of Object.keys(Game.shimmers))It[Game.shimmers[e].id]=Game.shimmers[e],Game.shimmers[e].spawnLead&&"golden"===Game.shimmers[e].type&&(At=Game.shimmers[e],k+=1)}();for(const e of Object.keys(ie))void 0===It[e]&&(ie[e].parentNode.removeChild(ie[e]),delete ie[e]);if(C!==Game.shimmerTypes.golden.n){if(C=Game.shimmerTypes.golden.n,C){y0){let t=0;for(const e in Game.wrinklers)2===Game.wrinklers[e].phase&&t++;t>G?(G=t,t===Game.getWrinklersMax()&&e.WrinklerMaxFlash?bn(3,"WrinklerMaxFlash"):bn(3,"WrinklerFlash"),t===Game.getWrinklersMax()&&e.WrinklerMaxSound?kn(e.WrinklerMaxSoundURL,"WrinklerMaxSound","WrinklerMaxVolume"):kn(e.WrinklerSoundURL,"WrinklerSound","WrinklerVolume"),t===Game.getWrinklersMax()&&e.WrinklerMaxNotification?vn("WrinklerMaxNotification","Maximum Wrinklers Reached","You have reached your maximum ammount of wrinklers"):vn("WrinklerNotification","A Wrinkler appeared","A new wrinkler has appeared")):G=t}}()}}function xn(){const e=b64_to_utf8(unescape(localStorage.getItem("CookieClickerGame")).split("!END!")[0]),t=e.match(/CookieMonster.*(;|$)/);if(null!==t){const o=e.replace(t[0],`CookieMonster:${fn()}`);localStorage.setItem("CookieClickerGame",escape(`${utf8_to_b64(o)}!END!`))}}function Tn(t){if(void 0!==localStorage.CMConfig&&delete localStorage.CMConfig,void 0!==t){e=t;let o=!1;for(const t in nn)if(void 0===e[t])o=!0,e[t]=nn[t];else if("Header"!==t&&"Colors"!==t)-1===t.indexOf("SoundURL")?e[t]>-1&&e[t]-1&&e[t][n]<2||(o=!0,e[t][n]=nn[t][n]);else for(const n in nn.Colors)void 0!==e[t][n]&&"string"==typeof e[t][n]||(o=!0,e[t][n]=nn[t][n]);o&&xn(),wn();for(const e in nn)"Header"!==e&&void 0!==hn[e].func&&hn[e].func()}else Tn(nn)}function Mn(){for(const e of Object.keys(Game.wrinklers))Game.wrinklers[e].sucked>0&&0===Game.wrinklers[e].type&&(Game.wrinklers[e].hp=0)}function Sn(e,t,o){const n=document.createElement("div");n.id=e;const i=document.createElement("div");i.style.minWidth=o,i.style.marginBottom="4px";const a=document.createElement("div");a.style.textAlign="left",a.textContent=t,i.appendChild(a),n.appendChild(i)}function Bn(t,o){if("b"===t){if(l("tooltip").innerHTML=Game.Objects[o].tooltip(),1===e.TooltipAmor){const e=Oo(Game.Objects[o],Game.Objects[o].basePrice,0,Game.Objects[o].free,Game.Objects[o].amount),t=e-Game.Objects[o].totalCookies;t>0&&(l("tooltip").innerHTML=l("tooltip").innerHTML.split("so far").join(`so far
${re(t)} ${1===Math.floor(t)?"cookie":"cookies"} left to amortize (${se((e-Game.Objects[o].totalCookies)/(Game.Objects[o].storedTotalCps*Game.globalCpsMult)).text})`))}-1===Game.buyMode&&(l("tooltip").innerHTML=l("tooltip").innerHTML.split(re(Game.Objects[o].bulkPrice)).join(re((Game.Objects[o],Game.Objects[o].basePrice,Game.Objects[o].amount,Game.Objects[o].free,Game.buyBulk,1))))}else if("u"===t){if(!Game.UpgradesInStore[o])return"";l("tooltip").innerHTML=Game.crateTooltip(Game.UpgradesInStore[o],"store")}else"s"===t?l("tooltip").innerHTML=Game.lumpTooltip():"g"===t?l("tooltip").innerHTML=Game.Objects["Wizard tower"].minigame.spellTooltip(o)():"p"===t?l("tooltip").innerHTML=Game.ObjectsById[2].minigame.tileTooltip(o[0],o[1])():"ha"===t?l("tooltip").innerHTML=Game.ObjectsById[2].minigame.toolTooltip(1)():"wb"===t&&(l("tooltip").innerHTML="");if("b"===t&&1===Game.buyMode||"u"===t||"s"===t||"g"===t||"p"===t&&!Game.keys[16]||"ha"===t||"wb"===t){const e=document.createElement("div");e.id="CMTooltipArea",l("tooltip").appendChild(e)}return Z=t,ee=o,To(),l("tooltip").innerHTML}function Pn(){if(Game.Objects["Wizard tower"].minigameLoaded)for(const e in Game.Objects["Wizard tower"].minigame.spellsById)null!==l(`grimoireSpell${e}`).onmouseover&&(x[e]=l(`grimoireSpell${e}`).onmouseover,l(`grimoireSpell${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("g",`${e}`)}),"this"),Game.tooltip.wobble()})}function En(){if(!u&&Game.Objects["Wizard tower"].minigameLoaded){const t=Game.Objects["Wizard tower"].minigame;d=t.draw,Game.Objects["Wizard tower"].minigame.draw=function(){d(),1===e.GrimoireBar&&t.magic1&&(e.Header[t]=0),xn()}function jn(t,o){const n=document.createElement("div");n.className="title",n.style.padding="0px 16px",n.style.opacity="0.7",n.style.fontSize="17px",n.style.fontFamily='"Kavoon", Georgia, serif',n.appendChild(document.createTextNode(`${t} `));const i=document.createElement("span");return i.style.cursor="pointer",i.style.display="inline-block",i.style.height="14px",i.style.width="14px",i.style.borderRadius="7px",i.style.textAlign="center",i.style.backgroundColor="#C0C0C0",i.style.color="black",i.style.fontSize="13px",i.style.verticalAlign="middle",i.textContent=e.Header[o]?"-":"+",i.onclick=function(){An(o),Game.UpdateMenu()},n.appendChild(i),n}function Un(e,t,o,n){const i=document.createElement("div");i.className="listing";const a=document.createElement("b");if(a.textContent=t,i.appendChild(a),"withTooltip"===e){i.className="listing",i.appendChild(document.createTextNode(" "));const e=document.createElement("span");e.onmouseout=function(){Game.tooltip.hide()},e.onmouseover=function(){Game.tooltip.draw(this,escape(D[n].innerHTML))},e.style.cursor="default",e.style.display="inline-block",e.style.height="10px",e.style.width="10px",e.style.borderRadius="5px",e.style.textAlign="center",e.style.backgroundColor="#C0C0C0",e.style.color="black",e.style.fontSize="9px",e.style.verticalAlign="bottom",e.textContent="?",i.appendChild(e)}return i.appendChild(document.createTextNode(": ")),i.appendChild(o),i}function Dn(e){const t=document.createDocumentFragment();t.appendChild(document.createTextNode(`${e.length} `));const o=document.createElement("span");o.onmouseout=function(){Game.tooltip.hide()};const n=document.createElement("div"),i=document.createElement("div");i.style.minWidth="140px",i.style.marginBottom="4px";const a=document.createElement("div");a.className="name",a.style.marginBottom="4px",a.style.textAlign="center",a.textContent="Missing",i.appendChild(a);for(const t of Object.keys(e)){const o=document.createElement("div");o.style.textAlign="center",o.appendChild(document.createTextNode(e[t])),i.appendChild(o)}return n.appendChild(i),o.onmouseover=function(){Game.tooltip.draw(this,escape(n.innerHTML))},o.style.cursor="default",o.style.display="inline-block",o.style.height="10px",o.style.width="10px",o.style.borderRadius="5px",o.style.textAlign="center",o.style.backgroundColor="#C0C0C0",o.style.color="black",o.style.fontSize="9px",o.style.verticalAlign="bottom",o.textContent="?",t.appendChild(o),t}function Rn(t){const o=document.createElement("div");if(o.className="subsection",o.appendChild(t),o.appendChild(jn("Lucky Cookies","Lucky")),e.Header.Lucky&&o.appendChild(function(){const e=Game.auraMult("Dragon's Fortune")?"GoldCookDragonsFortuneTooltipPlaceholder":"GoldCookTooltipPlaceholder",t=document.createElement("div");t.className="CMStatsLuckySection";const o=Game.cookies+ro()0&&(t.appendChild(Un("basic","Heavenly Chips To Target Set In Settings (CUR)",document.createTextNode(re(e)))),t.appendChild(Un("basic","Time To Target (CUR, Current 5 Second Average)",document.createTextNode(le(e/at)))))}const l=function(e){let t=Game.cookiesPs;Go(),0===_t["Heavenly key"].bought&&(_t["Heavenly chip secret"].bought=1,_t["Heavenly cookie stand"].bought=1,_t["Heavenly bakery"].bought=1,_t["Heavenly confectionery"].bought=1,_t["Heavenly key"].bought=1,Wo(),t=De,Go()),Wt>=1e6&&Fo("Sacrifice"),Wt>=1e9&&Fo("Oblivion"),Wt>=1e12&&Fo("From scratch"),Wt>=1e15&&Fo("Nihilism"),Wt>=1e18&&Fo("Dematerialize"),Wt>=1e21&&Fo("Nil zero zilch"),Wt>=1e24&&Fo("Transcendence"),Wt>=1e27&&Fo("Obliterate"),Wt>=1e30&&Fo("Negative void"),Wt>=1e33&&Fo("To crumbs, you say?"),Wt>=1e36&&Fo("You get nothing"),Wt>=1e39&&Fo("Humble rebeginnings"),Wt>=1e42&&Fo("The end of the world"),Wt>=1e45&&Fo("Oh, you're back"),Wt>=1e48&&Fo("Lazarus"),Wt>=1e51&&Fo("Smurf account"),Wt>=1e54&&Fo("If at first you don't succeed"),_t["Heavenly chip secret"].bought=1,_t["Heavenly cookie stand"].bought=1,_t["Heavenly bakery"].bought=1,_t["Heavenly confectionery"].bought=1,_t["Heavenly key"].bought=1,We=e;const o=Oe;Wo(),Ho(),o!==Oe&&Wo();const n=De-t;return We=Game.prestige,n}(o),s=document.createDocumentFragment();s.appendChild(document.createTextNode(re(l)));const c=Math.round(l/Game.cookiesPs*1e4);if(Number.isFinite(c)&&0!==c){const e=document.createElement("small");e.textContent=` (${c/100}% of income)`,s.appendChild(e)}t.appendChild(Un("withTooltip","Reset Bonus Income",s,"ResetTooltipPlaceholder"));const d=Math.floor(Game.HowMuchPrestige(Game.cookiesReset)),p=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned)),u=p-d;if(!Game.Has("Lucky digit")){let e=7-p%10;e<0&&(e+=10);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Un("basic",'Next "Lucky Digit" (total / reset)',i))}if(!Game.Has("Lucky number")){let e=777-p%1e3;e<0&&(e+=1e3);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Un("basic",'Next "Lucky Number" (total / reset)',i))}if(!Game.Has("Lucky payout")){let e=777777-p%1e6;e<0&&(e+=1e6);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Un("basic",'Next "Lucky Payout" (total / reset)',i))}return t}()),Game.cpsSucked>0&&(o.appendChild(jn("Wrinklers","Wrink")),e.Header.Wrink)){const e=document.createDocumentFragment();e.appendChild(document.createTextNode(`${re(ut)} / ${re(mt)} `));const t=document.createElement("a");t.textContent="Pop All Normal",t.className="option",t.onclick=function(){Mn()},e.appendChild(t),o.appendChild(Un("basic","Rewards of Popping (All/Normal)",e));const n=document.createDocumentFragment();n.appendChild(document.createTextNode(`${re(ht[0])} `));const i=document.createElement("a");i.textContent="Pop Single Fattest",i.className="option",i.onclick=function(){null!==ht[1]&&(Game.wrinklers[ht[1]].hp=0)},n.appendChild(i),o.appendChild(Un("basic",`Rewards of Popping Single Fattest Non-Shiny Wrinkler (id: ${null!==ht[1]?ht[1]:"None"})`,n))}let n=!1;const i=[];for(const e of Object.keys(Ao))Game.Has(Ao[e])||(i.push(Ao[e]),n=!0);const a=[];for(const e of Object.keys(jo))Game.Has(jo[e])||(a.push(jo[e]),n=!0);const r=[];for(const e of Object.keys(Uo))Game.Has(Uo[e])||(r.push(Uo[e]),n=!0);const s=[];for(const e of Object.keys(Game.eggDrops))Game.HasUnlocked(Game.eggDrops[e])||(s.push(Game.eggDrops[e]),n=!0);const c=[];for(const e of Object.keys(Game.rareEggDrops))Game.HasUnlocked(Game.rareEggDrops[e])||(c.push(Game.rareEggDrops[e]),n=!0);const d=[];for(const e of Object.keys(Do))Game.HasUnlocked(Do[e])||(d.push(Do[e]),n=!0);const p=Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg"),u=Game.Has("Century egg");if(("christmas"===Game.season||n||p||u)&&(o.appendChild(jn("Season Specials","Sea")),e.Header.Sea&&(0!==i.length&&o.appendChild(Un("basic","Halloween Cookies Left to Buy",Dn(i))),0!==a.length&&o.appendChild(Un("basic","Christmas Cookies Left to Buy",Dn(a))),0!==r.length&&o.appendChild(Un("basic","Valentine Cookies Left to Buy",Dn(r))),0!==s.length&&o.appendChild(Un("basic","Normal Easter Eggs Left to Unlock",Dn(s))),0!==c.length&&o.appendChild(Un("basic","Rare Easter Eggs Left to Unlock",Dn(c))),0!==d.length&&o.appendChild(Un("basic","Rare Plant Drops Left to Unlock",Dn(d))),"christmas"===Game.season&&o.appendChild(Un("basic","Reindeer Reward",document.createTextNode(re(lt)))),p&&o.appendChild(Un("withTooltip","Chocolate Egg Cookies",document.createTextNode(re(st)),"ChoEggTooltipPlaceholder")),u&&o.appendChild(Un("basic","Century Egg Multiplier",document.createTextNode(Math.round(1e4*(rt-1))/100+"%"))))),o.appendChild(jn("Miscellaneous","Misc")),e.Header.Misc){if(o.appendChild(Un("basic",`Average Cookies Per Second (Past ${Q[e.AvgCPSHist]<60?`${Q[e.AvgCPSHist]} seconds`:Q[e.AvgCPSHist]/60+(3===e.AvgCPSHist?" minute":" minutes")})`,document.createTextNode(re(ao(),3)))),o.appendChild(Un("basic",`Average Cookie Clicks Per Second (Past ${q[e.AvgClicksHist]}${0===e.AvgClicksHist?" second":" seconds"})`,document.createTextNode(re(yt,1)))),Game.Has("Fortune cookies")){const e=[];for(const t of Object.keys(Lo))Game.Has(Lo[t])||e.push(Lo[t]);0!==e.length&&o.appendChild(Un("basic","Fortune Upgrades Left to Buy",Dn(e)))}if(e.ShowMissedGC&&o.appendChild(Un("basic","Missed Golden Cookies",document.createTextNode(re(Game.missedGoldenClicks)))),Game.prefs.autosave){const e=document.createElement("span");e.id="CMStatsAutosaveTimer",e.innerText=Game.sayTime(60*Game.fps-(Game.OnAscend?0:Game.T%(60*Game.fps)),4),o.appendChild(Un("basic","Time till autosave",e))}}l("menu").insertBefore(o,l("menu").childNodes[2]),e.MissingUpgrades&&function(){for(const e of l("menu").children)if(e.children[0])if("Prestige"===e.children[0].innerHTML&&kt){const t=kt.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesPrestigeTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing Prestige upgrades: ${t}/${Game.PrestigeUpgrades.length} (${Math.floor(t/Game.PrestigeUpgrades.length*100)}%)`,o.appendChild(n),e.appendChild(o);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=kt,e.appendChild(i)}else if("Upgrades"===e.children[0].innerHTML){if(bt){const t=bt.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing normal upgrades: ${t}/${Game.UpgradesByPool[""].length+Game.UpgradesByPool.tech.length} (${Math.floor(t/(Game.UpgradesByPool[""].length+Game.UpgradesByPool.tech.length)*100)}%)`,o.appendChild(n),e.insertBefore(o,e.childNodes[3]);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=bt,e.insertBefore(i,document.getElementById("CMMissingUpgradesTitle").nextSibling)}if(Gt){const t=Gt.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesCookiesTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing Cookie upgrades: ${t}/${Game.UpgradesByPool.cookie.length} (${Math.floor(t/Game.UpgradesByPool.cookie.length*100)}%)`,o.appendChild(n),e.appendChild(o);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=Gt,e.appendChild(i)}}}()}const Hn={BarsColors:"Bars/Colors",Calculation:"Calculation",Notification:"Notification",Tooltip:"Tooltips and additional insights",Statistics:"Statistics",Notation:"Notation",Miscellaneous:"Miscellaneous"},$n={NotificationGeneral:"General Notifications",NotificationGC:"Golden Cookie",NotificationFC:"Fortune Cookie",NotificationSea:"Season Special",NotificationGard:"Garden Tick",NotificationMagi:"Full Magic Bar",NotificationWrink:"Wrinkler",NotificationWrinkMax:"Maximum Wrinklers"};function In(t,o){const n=document.createElement("div");n.className="title",n.style.opacity="0.7",n.style.fontSize="17px",n.appendChild(document.createTextNode(`${o} `));const i=document.createElement("span");return i.style.cursor="pointer",i.style.display="inline-block",i.style.height="14px",i.style.width="14px",i.style.borderRadius="7px",i.style.textAlign="center",i.style.backgroundColor="#C0C0C0",i.style.color="black",i.style.fontSize="13px",i.style.verticalAlign="middle",i.textContent=e.Header[t]?"-":"+",i.onclick=function(){An(t),Game.UpdateMenu()},n.appendChild(i),n}function zn(t){const o=document.createElement("div");if(o.className="listing","bool"===hn[t].type){const n=document.createElement("a");hn[t].toggle&&0===e[t]?n.className="option off":n.className="option",n.id=Wn+t,n.onclick=function(){!function(t){e[t]++,e[t]===hn[t].label.length?(e[t]=0,hn[t].toggle&&(l(Wn+t).className="option off")):l(Wn+t).className="option",void 0!==hn[t].func&&hn[t].func(),l(Wn+t).innerHTML=hn[t].label[e[t]],xn()}(t)},n.textContent=hn[t].label[e[t]],o.appendChild(n);const i=document.createElement("label");return i.textContent=hn[t].desc,o.appendChild(i),o}if("vol"===hn[t].type){const n=document.createElement("div");n.className="sliderBox";const i=document.createElement("div");i.style.float="left",i.innerHTML=hn[t].desc,n.appendChild(i);const a=document.createElement("div");a.id=`slider${t}right`,a.style.float="right",a.innerHTML=`${e[t]}%`,n.appendChild(a);const r=document.createElement("input");return r.className="slider",r.id=`slider${t}`,r.style.clear="both",r.type="range",r.min="0",r.max="100",r.step="1",r.value=e[t],r.oninput=function(){Ln(t)},r.onchange=function(){Ln(t)},n.appendChild(r),o.appendChild(n),o}if("url"===hn[t].type){const n=document.createElement("span");n.className="option",n.textContent=`${hn[t].label} `,o.appendChild(n);const i=document.createElement("input");i.id=Wn+t,i.className="option",i.type="text",i.readOnly=!0,i.setAttribute("value",e[t]),i.style.width="300px",o.appendChild(i),o.appendChild(document.createTextNode(" "));const a=document.createElement("input");a.id=`${Wn+t}Prompt`,a.className="option",a.type="text",a.setAttribute("value",e[t]);const r=document.createElement("a");r.className="option",r.onclick=function(){Game.Prompt(a.outerHTML,[["Save",function(){e[`${t}`]=l(`CMConfig${t}Prompt`).value,xn(),Game.ClosePrompt(),Game.UpdateMenu()}],"Cancel"])},r.textContent="Edit",o.appendChild(r);const s=document.createElement("label");return s.textContent=hn[t].desc,o.appendChild(s),o}if("color"===hn[t].type){o.className="";for(let t=0;tthis.max&&console.log("TEST"),e[t]=this.value,xn(),ln()},o.appendChild(i),o.appendChild(document.createTextNode(" "));const a=document.createElement("label");return a.textContent=hn[t].desc,o.appendChild(a),o}return o}function Vn(t){if(1===e.TimerBar&&0===e.TimerBarPos){const e=parseInt(l("CMTimerBar").style.height,10);Game.mouseY-=e,t(),Game.mouseY+=e}else t()}function _n(){M.Beautify=Beautify,Beautify=re,M.CalculateGains=Game.CalculateGains,Game.CalculateGains=function(){M.CalculateGains(),je=1,qt=Date.now(),Qt=Date.now()},M.tooltip={},M.tooltip.draw=Game.tooltip.draw,M.tooltip.drawMod=new Function(`return ${Game.tooltip.draw.toString().split("this").join("Game.tooltip")}`)(),Game.tooltip.draw=function(e,t,o){M.tooltip.drawMod(e,t,o)},M.tooltip.update=Game.tooltip.update,M.tooltip.updateMod=new Function(`return ${Game.tooltip.update.toString().split("this.").join("Game.tooltip.")}`)(),Game.tooltip.update=function(){M.tooltip.updateMod(),function(){if("store"===Game.tooltip.origin){let t=0;1===e.ToolWarnLucky&&1===e.ToolWarnPos&&null!==l("CMDispTooltipWarningParent")&&(t=l("CMDispTooltipWarningParent").clientHeight-4),Game.tooltip.tta.style.top=`${Math.min(parseInt(Game.tooltip.tta.style.top,10),l("game").clientHeight+l("topBar").clientHeight-Game.tooltip.tt.clientHeight-t-46)}px`}}()},M.UpdateWrinklers=Game.UpdateWrinklers,Game.UpdateWrinklers=function(){Vn(M.UpdateWrinklers)},M.UpdateSpecial=Game.UpdateSpecial,Game.UpdateSpecial=function(){Vn(M.UpdateSpecial)},l("bigCookie").removeEventListener("click",Game.ClickCookie,!1),l("bigCookie").addEventListener("click",(function(){Vn(Game.ClickCookie)}),!1),M.RebuildUpgrades=Game.RebuildUpgrades,Game.RebuildUpgrades=function(){M.RebuildUpgrades(),function(){T=[];for(const e of Object.keys(Game.UpgradesInStore))null!==l(`upgrade${e}`).onmouseover&&(T[e]=l(`upgrade${e}`).onmouseover,l(`upgrade${e}`).onmouseover=function(){Game.mouseDown||(Game.setOnCrate(this),Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("u",`${e}`)}),"store"),Game.tooltip.wobble())})}(),Game.CalculateGains()},M.ClickProduct=Game.ClickProduct,Game.ClickProduct=function(t){(!e.BulkBuyBlock||Game.ObjectsById[t].bulkPrice-1;--e)if(Game.ObjectsById[e-1].amount>0){const o=Vt[Game.ObjectsById[e].name].name;Vt[o].amount-=1,Pe-=1,t=Vt[o].basePrice*Game.priceIncrease**Math.max(0,Vt[o].amount-1-Vt[o].free),t=Game.modifyBuildingPrice(Vt[o],t),t=Math.ceil(t);break}const o=Oe;return Wo(),Ho(),o!==Oe&&Wo(),[De-Game.cookiesPs,t]}(t),n=le(o/(e+Game.cookiesPs)),i=re(e/Game.cookiesPs);l("dragonAuraInfo").style.minHeight="60px",l("dragonAuraInfo").style.margin="8px",l("dragonAuraInfo").appendChild(document.createElement("div")).className="line";const a=document.createElement("div");a.style.minWidth="200px",a.style.textAlign="center",a.textContent=`Picking this aura will change CPS by ${re(e)} (${i}% of current CPS).`,l("dragonAuraInfo").appendChild(a);const r=document.createElement("div");r.style.minWidth="200px",r.style.textAlign="center",r.textContent=`It will take ${n} to recover the cost.`,l("dragonAuraInfo").appendChild(r)}}(t)},M.ToggleSpecialMenu=Game.ToggleSpecialMenu,Game.ToggleSpecialMenu=function(e){M.ToggleSpecialMenu(e),function(){if(null!==(l("specialPopup").className.match(/onScreen/)&&l("specialPopup").children[0].style.background.match(/dragon/)))for(let e=0;e${ze}`,"this"),Game.tooltip.wobble()},l("specialPopup").children[e].onmouseout=function(){Game.tooltip.shouldHide=1})}()},M.UpdateMenu=Game.UpdateMenu,Game.UpdateMenu=function(){void 0!==Fn().picker&&void 0!==Fn().picker.owner||(M.UpdateMenu(),function(){const t=document.createElement("div");t.className="title","prefs"===Game.onMenu?(t.textContent="Cookie Monster Settings",function(t){const o=document.createDocumentFragment();o.appendChild(t);for(const t of Object.keys(Hn)){const n=In(t,Hn[t]);if(o.appendChild(n),e.Header[t])if("Notification"===t)for(const t of Object.keys($n)){const n=In(t,$n[t]);if(n.style.fontSize="15px",n.style.opacity="0.5",o.appendChild(n),e.Header[t])for(const e in hn)hn[e].group===t&&o.appendChild(zn(e))}else for(const e of Object.keys(hn))hn[e].group===t&&o.appendChild(zn(e))}const n=document.createElement("div");n.className="listing";const i=document.createElement("a");i.className="option",i.onclick=function(){Tn(nn)},i.textContent="Restore Default",n.appendChild(i),o.appendChild(n),l("menu").childNodes[2].insertBefore(o,l("menu").childNodes[2].childNodes[l("menu").childNodes[2].childNodes.length-1])}(t)):"stats"===Game.onMenu?e.Stats&&(t.textContent="Cookie Monster Statistics",Rn(t)):"log"===Game.onMenu&&(t.textContent="Cookie Monster ",function(t){const o=document.createElement("div");o.className="subsection";const n=document.createElement("span");if(n.style.cursor="pointer",n.style.display="inline-block",n.style.height="14px",n.style.width="14px",n.style.borderRadius="7px",n.style.textAlign="center",n.style.backgroundColor="#C0C0C0",n.style.color="black",n.style.fontSize="13px",n.style.verticalAlign="middle",n.textContent=e.Header.InfoTab?"-":"+",n.onclick=function(){An("InfoTab"),Game.UpdateMenu()},t.appendChild(n),o.appendChild(t),e.Header.InfoTab){const e=document.createElement("div");e.innerHTML='
\n Cookie Monster\n offers a wide range of tools and statistics to enhance your game experience.\n It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want.
\n Progess on new updates and all previous release notes can be found on the GitHub page linked above!
\n Please also report any bugs you may find over there!
\n
\n ',o.appendChild(e);const t=document.createElement("div");t.innerHTML='
\nThe latest update (v 2.031.5) sees a total rehaul of the backend of the mod. It does not introduce any new functions, this is planned for the next release.
\nWe believe we have fixed all bugs related to this new code, but if you find any bugs, please report them on the GitHub!
\n
\nBesides, this update fixes the following bugs:
\n- Fixed some upgrade tooltips which did not display the full effect of buying the upgrades
\n- Fixed not always being able to sell when "blocking bulk buy"
\n- Fixed heavenly chips per second display
\n- Fixed small display bug when pressing shift and hovering over garden plots
\n- Fixed some bugs with the display of numbers and formatting of them
\n
\n
\n',o.appendChild(t)}const i=l("menu").children[1];i.insertBefore(o,i.children[1])}(t))}())},M.sayTime=Game.sayTime,H=function(e,t){return Number.isNaN(e)||e<=0?M.sayTime(e,t):le(e/Game.fps,1)},M.Logic=Game.Logic,Game.Logic=function(){M.Logic();let t="Cookie Clicker";"fools"===Game.season&&(t="Cookie Baker"),ae=`${Game.OnAscend?"Ascending! ":""}${re(Game.cookies)} ${1===Game.cookies?"cookie":"cookies"} - ${t}`,function(){if(Game.OnAscend||0===e.Title)document.title=ae;else if(1===e.Title){let e,t,o,n=!1,i=!1;e=At?At.wrath?`[W${Math.ceil(At.life/Game.fps)}]`:`[G${Math.ceil(At.life/Game.fps)}]`:Game.Has("Golden switch [off]")?"[GS]":`[${Number(l("CMTimerBarGCMinBar").textContent)<0?"!":""}${Math.ceil((Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps)}]`,f&&(n=!0,t="[F]"),"christmas"===Game.season&&(i=!0,o=h?`[R${Math.ceil(jt.life/Game.fps)}]`:`[${Number(l("CMTimerBarRenMinBar").textContent)<0?"!":""}${Math.ceil((Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps)}]`);let a=ae;"["===a.charAt(0)&&(a=a.substring(a.lastIndexOf("]")+1)),document.title=`${e+(n?t:"")+(i?o:"")} ${a}`}else if(2===e.Title){let e="",t=!1;At&&(t=!0,At.wrath?e+=`[W${Math.ceil(At.life/Game.fps)}]`:e+=`[G${Math.ceil(At.life/Game.fps)}]`),f&&(t=!0,e+="[F]"),"christmas"===Game.season&&h&&(e+=`[R${Math.ceil(jt.life/Game.fps)}]`,t=!0),t&&(e+=" - ");let o="Cookie Clicker";"fools"===Game.season&&(o="Cookie Baker"),e+=o,document.title=e}}(),function(){const t=Math.max(0,Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset)),o=Game.sayTime((Date.now()-Game.startDate)/1e3*Game.fps,-1);let n="";n+=`You've been on this run for ${""===o?"not very long":o}.
`,n+='
',Game.prestige>0&&(n+=`Your prestige level is currently ${re(Game.prestige)}.
(CpS +${re(Game.prestige)}%)`,n+='
'),n+=Me<1?"Ascending now would grant you no prestige.":Me<2?"Ascending now would grant you
1 prestige level (+1% CpS)
and 1 heavenly chip to spend.":`Ascending now would grant you
${re(Me)} prestige levels (+${re(Me)}% CpS)
and ${re(Me)} heavenly chips to spend.`,n+='
',n+=`You need ${re(t)} more cookies for the next level.
`,n+=e.TooltipAscendButton?`
It takes ${Ut} to reach the next level and you are making ${re(at,2)} chips on average in the last 5 seconds.
`:"",l("ascendTooltip").innerHTML=n}()}}function Xn(){Cn(),Zo(),on(),a=Object.keys(Game.mods).length,v=document.createElement("style"),v.type="text/css",v.id="CMCSS",document.head.appendChild(v),function(){const e=document.createElement("div");e.id="CMBotBar",e.style.height="69px",e.style.width="100%",e.style.position="absolute",e.style.display="none",e.style.backgroundColor="#262224",e.style.backgroundImage="linear-gradient(to bottom, #4d4548, #000000)",e.style.borderTop="1px solid black",e.style.overflow="auto",e.style.textShadow="-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black";const t=e.appendChild(document.createElement("table"));t.style.width="100%",t.style.textAlign="center",t.style.whiteSpace="nowrap";const o=t.appendChild(document.createElement("tbody")),n=function(e,t){const o=document.createElement("td");return o.style.textAlign="right",o.className=S+t,o.textContent=e,o},i=o.appendChild(document.createElement("tr"));i.style.fontWeight="bold",i.appendChild(n("CM 2.031.5",N)),o.appendChild(document.createElement("tr")).appendChild(n("Bonus Income",P)),o.appendChild(document.createElement("tr")).appendChild(n("Payback Period",P)),o.appendChild(document.createElement("tr")).appendChild(n("Time Left",P)),l("wrapper").appendChild(e);for(const e of Object.keys(Game.Objects))so(e)}(),function(){const e=document.createElement("div");e.id="CMTimerBar",e.style.position="absolute",e.style.display="none",e.style.height="0px",e.style.fontSize="10px",e.style.fontWeight="bold",e.style.backgroundColor="black";const t=lo("CMTimerBarGC","Next Cookie",[{id:"CMTimerBarGCMinBar",color:L},{id:"CMTimerBarGCBar",color:W}]);e.appendChild(t);const o=lo("CMTimerBarRen","Next Reindeer",[{id:"CMTimerBarRenMinBar",color:L},{id:"CMTimerBarRenBar",color:O}]);e.appendChild(o);const n=document.createElement("div");n.id="CMTimerBarBuffTimers",e.appendChild(n),l("wrapper").appendChild(e)}(),function(){const e=document.createElement("div");e.id="CMUpgradeBar",e.style.width="100%",e.style.backgroundColor="black",e.style.textAlign="center",e.style.fontWeight="bold",e.style.display="none",e.style.zIndex="21",e.onmouseout=function(){Game.tooltip.hide()};const t=document.createElement("div");t.appendChild(function(){const e=document.createElement("div");e.style.minWidth="330px",e.style.marginBottom="4px";const t=document.createElement("div");t.className="name",t.style.marginBottom="4px",t.textContent="Legend",e.appendChild(t);const o=function(e,t){const o=document.createElement("div");o.style.verticalAlign="middle";const n=document.createElement("span");return n.className=B+e,n.style.display="inline-block",n.style.height="10px",n.style.width="10px",n.style.marginRight="4px",o.appendChild(n),o.appendChild(document.createTextNode(t)),o};return e.appendChild(o(P,"Better than best PP building")),e.appendChild(o(E,"Same as best PP building")),e.appendChild(o(N,"Between best and worst PP buildings closer to best")),e.appendChild(o(O,"Between best and worst PP buildings closer to worst")),e.appendChild(o(F,"Same as worst PP building")),e.appendChild(o(W,"Worse than worst PP building")),e.appendChild(o(L,"Negative or infinity PP")),e}()),e.onmouseover=function(){Game.tooltip.draw(this,escape(t.innerHTML),"store")};const o=function(e,t){const o=document.createElement("span");return o.id=e,o.className=S+t,o.style.width="14.28571428571429%",o.style.display="inline-block",o.textContent="0",o};e.appendChild(o("CMUpgradeBarBlue",P)),e.appendChild(o("CMUpgradeBarGreen",E)),e.appendChild(o("CMUpgradeBarYellow",N)),e.appendChild(o("CMUpgradeBarOrange",O)),e.appendChild(o("CMUpgradeBarRed",F)),e.appendChild(o("CMUpgradeBarPurple",W)),e.appendChild(o("CMUpgradeBarGray",L)),l("upgrades").parentNode.insertBefore(e,l("upgrades").parentNode.childNodes[3])}(),function(){const e=document.createElement("div");e.id="CMWhiteScreen",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="white",e.style.display="none",e.style.zIndex="9999999999",e.style.position="absolute",l("wrapper").appendChild(e)}(),function(){const e=document.createElement("link");e.id="CMFavicon",e.rel="shortcut icon",e.href="https://orteil.dashnet.org/cookieclicker/favicon.ico",document.getElementsByTagName("head")[0].appendChild(e)}();for(const e of Object.keys(D))Sn(D[e][0],D[e][1],D[e][2]);!function(){const e=document.createElement("a");e.id="PopAllNormalWrinklerButton",e.textContent="Pop All Normal",e.className="option",e.onclick=function(){Mn()},e.onmouseout=function(){Game.tooltip.shouldHide=1},e.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("wb","PopAll")}),"this"),Game.tooltip.wobble()},l("sectionLeftExtra").children[0].append(e);const t=document.createElement("a");t.id="PopFattestWrinklerButton",t.textContent="Pop Single Fattest",t.className="option",t.onclick=function(){null!==ht[1]&&(Game.wrinklers[ht[1]].hp=0)},t.onmouseout=function(){Game.tooltip.shouldHide=1},t.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("wb","PopFattest")}),"this"),Game.tooltip.wobble()},l("sectionLeftExtra").children[0].append(t)}(),l("products").style.display="grid",l("storeBulk").style.gridRow="1/1",l("upgrades").style.display="flex",l("upgrades").style["flex-wrap"]="wrap",function(){for(const e of Object.keys(Game.Objects)){const t=Game.Objects[e];null!==l(`product${t.id}`).onmouseover&&(w[e]=l(`product${t.id}`).onmouseover,l(`product${t.id}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("b",`${e}`)}),"store"),Game.tooltip.wobble()})}}(),Game.canLumps()&&(r=l("lumps").onmouseover,l("lumps").onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("s","Lump")}),"this"),Game.tooltip.wobble()}),m=Game.LoadMinigames,Game.LoadMinigames=function(){m(),Game.Objects.Farm.minigameLoaded&&(l("gardenTool-1").onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("ha","HarvestAllButton")}),"this"),Game.tooltip.wobble()},Array.from(l("gardenPlot").children).forEach((e=>{const t=e.id.slice(-3);e.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(function(){return Bn("p",[`${t[0]}`,`${t[2]}`])}),"this"),Game.tooltip.wobble()}}))),Pn(),Nn()},Game.LoadMinigames(),l("backgroundLeftCanvas").onmouseover=function(){$=1},l("backgroundLeftCanvas").onmouseout=function(){$=0,Game.tooltip.hide();for(const e of Object.keys(Game.wrinklers))z[e]=0},_n(),Nn(),Game.CalculateGains(),Tn(),R=Game.OnAscend,Game.prefs.popups?Game.Popup("Cookie Monster version 2.031.5 loaded!"):Game.Notify("Cookie Monster version 2.031.5 loaded!","","",1,1),Game.Win("Third-party")}const Qn={init:function(){yn=!0;let e=!0;Game.version!==Number("2.031")&&(e=confirm("Cookie Monster version 2.031.5 is meant for Game version 2.031. Loading a different version may cause errors. Do you still want to load Cookie Monster?")),e&&(Xn(),Game.registerHook("draw",Mo),Game.registerHook("logic",wn),yn=!1)},load:function(e){const t=JSON.parse(e);Cn(),Tn(t.settings),"2.031.5"!==t.version&&(Game.prefs.popups?Game.Popup("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!"):Game.Notify("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!","","",0,1))},save:fn};Game.registerMod("CookieMonster",Qn)})()})();