PageSourceSearch

https://www.toolsoverflow.com/_next/static/chunks/4143.3f464cf3e7a85684.js

js toolsoverflow.com collected 2026-09-24 13:41:20 UTC 13,471 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4143],{23835:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var s=a(57437),n=a(64899),l=a(51579),c=a.n(l);function r(e){let{type:t="check",label:a,flexStart:l=!1,labelColor:r,labelStyle:i={},checked:o,setChecked:u,width:h,height:d}=e;return(0,s.jsxs)("div",{className:"".concat(c().outer," ").concat(l?c().start:""),onClick:()=>u(!o),children:[(0,s.jsxs)("div",{className:c().input,children:["check"===t&&(0,s.jsx)("div",{style:{width:h,height:d},className:"".concat(c().check," ").concat(o?c().checked:""),children:(0,s.jsx)(n.Jr,{})}),"switch"===t&&(0,s.jsx)("div",{className:"".concat(c().switch," ").concat(o?c().checked:"")})]}),a&&(0,s.jsx)("div",{className:c().label,style:{color:r,...i},children:a})]})}},71823:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var s=a(57437);a(60802);var n=a(42680),l=a.n(n);function c(e){let{inputRef:t,width:a,height:n="auto",type:c="text",placeholder:r="",background:i,corner:o=5,min:u,max:h,step:d,containerClassName:x="",className:p="",customStyle:_={},labelStyle:g={},disabled:j=!1,readOnly:f=!1,onChange:v=()=>{},onFocus:m=()=>{},onBlur:b=()=>{},value:N="",drawable:F=null,paddingTop:w,paddingBottom:y,paddingLeft:k,paddingRight:C,attributes:T={}}=e;return(0,s.jsxs)("div",{className:"".concat(l().container," ").concat(x),style:{width:"".concat(a),height:"".concat(n),borderRadius:"".concat(o,"px")},children:[(0,s.jsx)("input",{ref:t,placeholder:"Placeholder",type:c,onFocus:m,onBlur:b,min:u,max:h,step:d,style:{..._,background:i,borderRadius:"".concat(o,"px"),paddingLeft:k,paddingBottom:y,paddingRight:C,paddingTop:w},value:N,onChange:v,disabled:j,readOnly:f,...T,className:"".concat(l().input," ").concat(p," ").concat(F?l().inputWithDrawable:"")}),(0,s.jsx)("label",{className:"".concat(l().label," ").concat(F?l().labelWithDrawable:""),style:g,children:r}),(0,s.jsx)("div",{className:l().drawable,children:F})]})}},92184:function(e,t,a){"use strict";function s(e){return e.slice(0,1).toUpperCase()+e.substring(1,e.length).toLowerCase()}function n(e){return e.split(" ").map(e=>s(e)).join(" ")}function l(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=e.length;if(s<t)return e;let n="".concat(e.slice(0,t/2),"...").concat(e.slice(-t/2)),l=e.split(" ");if(l.length<=1)return n;if(a)return"".concat(e.slice(0,t),"...");for(let e=l.length-2;e>=0&&!((s-=l.splice(e,1)[0].length)<t);e--);let c=l.slice(0,l.length-1);return c.length>0?"".concat(c.join(" ")," ... ").concat(l[l.length-1]):n}function c(e){return(e=Number(e)||0)>1e15?(e/1e15).toFixed(1)+"Q":e>1e12?(e/1e12).toFixed(1)+"T":e>1e9?(e/1e9).toFixed(1)+"B":e>1e6?(e/1e6).toFixed(1)+"M":e>1e3?(e/1e3).toFixed(1)+"K":e}function r(e){return(e=Number(e)||0)>=1e15?(e/1e15).toFixed(2)+" PB":e>=1e12?(e/1e12).toFixed(2)+" TB":e>=1e9?(e/1e9).toFixed(2)+" GB":e>=1e6?(e/1e6).toFixed(2)+" MB":e>=1e3?(e/1e3).toFixed(2)+" KB":e+" B"}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Number((Number(e)||0).toFixed(t))}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(Number(e)||0).toLocaleString(t,{maximumFractionDigits:a,minimumFractionDigits:s})}function u(e){let t=e=>e.toString(16).padStart(2,"0");return"#".concat(t(e[0])).concat(t(e[1])).concat(t(e[2]))}a.d(t,{F9:function(){return o},II:function(){return c},Z3:function(){return n},aS:function(){return l},sS:function(){return r},vq:function(){return u},xA:function(){return i},zf:function(){return s}}),a(75683)},74143:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return d}});var s=a(57437),n=a(57818),l=a(71823),c=a(49017),r=a.n(c),i=a(2265),o=a(92184),u=a(23835);let h=(0,n.default)(()=>a.e(4723).then(a.bind(a,24723)),{loadableGenerated:{webpack:()=>[24723]},ssr:!1});function d(){let[e,t]=(0,i.useState)("regular"),[a,n]=(0,i.useState)({percentage:"",value:""}),[c,d]=(0,i.useState)({percentage:"",value:""}),[x,p]=(0,i.useState)({initial:"",final:""}),[_,g]=(0,i.useState)({show:!1,steps:"",title:"",label:"",info:[]}),[j,f]=(0,i.useState)(!1),[v,m]=(0,i.useState)(!1),[b,N]=(0,i.useState)(!0),F=e=>{let t={show:!1,steps:(0,s.jsx)(s.Fragment,{children:"No Steps Found.."})};switch(e){case"regular":let n=parseFloat(a.percentage),l=parseFloat(a.value),i=(0,o.F9)(n/100*l);t.show=!isNaN(n)&&!isNaN(l),t.title=i,t.label="".concat(n,"% of total ").concat(l),t.info=["The above result is the value of ".concat(n,"% of ").concat(l,".")],t.steps=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"To calculate the percentage value of a number, we use the following formula: "}),(0,s.jsx)("p",{children:(0,s.jsx)(h,{math:"Value = \\left( \\frac{\\text{Percentage}}{\\text{100}} \\right) \\times Whole"})}),(0,s.jsxs)("p",{children:["To calculate ",(0,o.F9)(n),"% of ",(0,o.F9)(l)," we can do as follows:"]}),(0,s.jsxs)("p",{children:["Percentage Value = ",(0,s.jsx)(h,{math:"\\left( \\frac{\\text{".concat((0,o.F9)(n),"}}{\\text{100}} \\right) \\times ").concat((0,o.F9)(l))})]}),(0,s.jsxs)("p",{className:r().finalAnswer,children:["Percentage Value = ",(0,s.jsx)(h,{math:"".concat(i)})]})]});break;case"reverse":let u=parseFloat(c.percentage),d=parseFloat(c.value);if(t.show=!isNaN(u)&&!isNaN(d),v){let e=j?d/(1-u/100):d/(1+u/100);t.title=(0,o.F9)(e),t.label="Original Value",t.info=[(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{children:(0,o.F9)(d)})," is obtained when ",(0,s.jsxs)("b",{children:[u,"%"]})," is ",(0,s.jsx)("b",{children:j?"subtracted from":"added to"})," the original value ",(0,s.jsx)("b",{children:(0,o.F9)(e)}),"."]})],t.steps=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"To find the original value when a known percentage increase or decrease leads to a final value, use the formula:"}),(0,s.jsx)("p",{children:(0,s.jsx)(h,{math:"Original = \\frac{\\text{Final}}{1 \\pm \\left(\\frac{\\text{Percentage}}{100}\\right)}"})}),(0,s.jsxs)("p",{children:["Here, we ",j?"subtract":"add"," the percentage from 1:"]}),(0,s.jsxs)("p",{children:["Original = ",(0,s.jsx)(h,{math:"\\frac{".concat((0,o.F9)(d),"}{1 ").concat(j?"-":"+"," \\left(\\frac{").concat((0,o.F9)(u),"}{100}\\right)}")})]}),(0,s.jsxs)("p",{className:r().finalAnswer,children:["Original = ",(0,s.jsx)(h,{math:"".concat((0,o.F9)(e))})]})]})}else{let e=d/(u/100);t.title=(0,o.F9)(e),t.label="Original Value",t.info=[(0,s.jsxs)("span",{children:[(0,o.F9)(u),"% of ",(0,o.F9)(e)," is ",(0,o.F9)(d)]})],t.steps=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"To find the original value when you know the final value is a percentage of it, use:"}),(0,s.jsx)("p",{children:(0,s.jsx)(h,{math:"Original = \\frac{\\text{Value}}{\\text{Percentage} \\div 100}"})}),(0,s.jsxs)("p",{children:["Original = ",(0,s.jsx)(h,{math:"\\frac{".concat((0,o.F9)(d),"}{").concat((0,o.F9)(u)," \\div 100}")})]}),(0,s.jsxs)("p",{className:r().finalAnswer,children:["Original = ",(0,s.jsx)(h,{math:"".concat((0,o.F9)(e))})]})]})}break;case"changed":let p=parseFloat(x.initial),_=parseFloat(x.final);t.show=!isNaN(p)&&!isNaN(_);let g=(_-p)/p*100;t.title=(0,o.F9)(g)+"%",t.label="Percentage Change",t.info=[(0,s.jsxs)(s.Fragment,{children:["The original value ",(0,s.jsx)("b",{children:(0,o.F9)(p)})," has been"," ",(0,s.jsx)("b",{children:g>=0?"increased":"decreased"})," by"," ",(0,s.jsxs)("b",{children:[(0,o.F9)(Math.abs(g)),"%"]}),", resulting in"," ","a final value of ",(0,s.jsx)("b",{children:(0,o.F9)(_)}),"."]})],t.steps=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"To calculate the percentage change between two values, use the formula:"}),(0,s.jsx)("p",{children:(0,s.jsx)(h,{math:"\\text{Percentage Change} = \\left( \\frac{\\text{Final} - \\text{Initial}}
1{\\text{Initial}} \\right) \\times 100"})}),(0,s.jsxs)("p",{children:["Initial = ",(0,o.F9)(p),", Final = ",(0,o.F9)(_)]}),(0,s.jsxs)("p",{children:["Percentage Change = ",(0,s.jsx)(h,{math:"\\left( \\frac{".concat((0,o.F9)(_)," - ").concat((0,o.F9)(p),"}{").concat((0,o.F9)(p),"} \\right) \\times 100")})]}),(0,s.jsxs)("p",{className:r().finalAnswer,children:["Percentage Change = ",(0,s.jsx)(h,{math:"".concat((0,o.F9)(g),"\\%")})]})]})}return t};return(0,i.useEffect)(()=>{g(F(e))},[e,a,c,x,j,v]),(0,s.jsx)("div",{className:r().outer,children:(0,s.jsxs)("div",{className:r().section,children:[(0,s.jsxs)("div",{className:r().inputs,children:[(0,s.jsxs)("div",{className:r().tabs,children:[(0,s.jsx)("div",{className:"".concat(r().tab," ").concat("regular"===e&&r().selected),onClick:()=>t("regular"),children:"Regular"}),(0,s.jsx)("div",{className:"".concat(r().tab," ").concat("reverse"===e&&r().selected),onClick:()=>t("reverse"),children:"Reverse"}),(0,s.jsx)("div",{className:"".concat(r().tab," ").concat("changed"===e&&r().selected),onClick:()=>t("changed"),children:"Change"})]}),(0,s.jsxs)("div",{className:r().tabContent,children:["regular"===e&&(0,s.jsxs)("div",{className:r().regular,children:[(0,s.jsx)("div",{className:r().input,children:(0,s.jsx)(l.Z,{type:"number",placeholder:"Percentage",value:a.percentage,onChange:e=>n({...a,percentage:e.target.value})})}),(0,s.jsx)("div",{className:r().of,children:(0,s.jsx)(h,{math:"of"})}),(0,s.jsx)("div",{className:r().input,children:(0,s.jsx)(l.Z,{type:"number",placeholder:"Value",value:a.value,onChange:e=>n({...a,value:e.target.value})})})]}),"reverse"===e&&(0,s.jsxs)("div",{className:r().reverse,children:[(0,s.jsxs)("div",{className:r().reverseInput,children:[(0,s.jsx)("div",{className:r().input,children:(0,s.jsx)(l.Z,{type:"number",placeholder:"Value",value:c.value,onChange:e=>d({...c,value:e.target.value})})}),(0,s.jsx)("div",{className:r().of,children:(0,s.jsx)(h,{math:v?"after":"is"})}),(0,s.jsxs)("div",{className:r().input,children:[(0,s.jsx)(l.Z,{className:r().percentageInput,type:"number",placeholder:"Percentage",value:c.percentage,onChange:e=>d({...c,percentage:e.target.value})}),(0,s.jsx)("span",{className:r().inputLabel,children:"%"})]})]}),(0,s.jsxs)("div",{className:r().reverseOption,children:[v&&(0,s.jsx)("div",{className:r().reverseChange,onClick:()=>f(!j),children:j?"Decreased":"Increased"}),(0,s.jsxs)("div",{style:{color:"var(--base-7)"},children:[v?"from":"of"," original value..."]})]}),(0,s.jsx)("div",{className:r().knownChange,children:(0,s.jsx)(u.Z,{label:"Final value is after increase/decrease",checked:v,setChecked:m})})]}),"changed"===e&&(0,s.jsxs)("div",{className:r().changed,children:[(0,s.jsx)("div",{className:r().input,children:(0,s.jsx)(l.Z,{type:"number",placeholder:"Initial Value",value:x.initial,onChange:e=>p({...x,initial:e.target.value})})}),(0,s.jsx)("div",{className:r().of,children:(0,s.jsx)(h,{math:"to"})}),(0,s.jsx)("div",{className:r().input,children:(0,s.jsx)(l.Z,{type:"number",placeholder:"Final Value",value:x.final,onChange:e=>p({...x,final:e.target.value})})})]})]})]}),(0,s.jsxs)("div",{className:r().result,children:[(0,s.jsxs)("div",{className:r().resultTabs,children:[(0,s.jsx)("div",{className:"".concat(r().resultTab," ").concat(b?r().selected:""),onClick:()=>N(!0),children:"Solution"}),(0,s.jsx)("div",{className:"".concat(r().resultTab," ").concat(b?"":r().selected),onClick:()=>N(!1),children:"Steps"})]}),(0,s.jsxs)("div",{className:r().resultContent,children:[b&&(_.show?(0,s.jsxs)("div",{className:r().resultValue,children:[(0,s.jsxs)("div",{className:r().resultTitle,children:[(0,s.jsx)("div",{className:r().resultTitleValue,children:_.title||"0"}),(0,s.jsx)("div",{className:r().resultLabel,children:_.label||"Waiting..."})]}),_.info.length>0&&(0,s.jsx)("div",{className:r().resultInfo,children:(0,s.jsx)("ul",{children:_.info.map((e,t)=>(0,s.jsx)("li",{children:e},t))})})]}):(0,s.jsx)("div",{className:r().resultPlaceholder,children:"Try entering the values to get the result"})),!b&&(_.show?(0,s.jsx)("div",{className:r().steps,children:_.steps}):(0,s.jsx)("div",{className:r().resultPlaceholder,children:"Try entering the values to get the steps"}))]})]})]})})}},60802:function(){},51579:function(e){e.exports={outer:"checkbox_outer__YjWtG",start:"checkbox_start__zHeYq",input:"checkbox_input__JdFGh",label:"checkbox_label__SKhcT",check:"checkbox_check__U__81",checked:"checkbox_checked__QbZRb",switch:"checkbox_switch__m1fWT"}},42680:function(e){e.exports={container:"input_container__7z8Me",input:"input_input__W_euj",inputWithDrawable:"input_inputWithDrawable__8_rRp",label:"input_label__VVxBc",labelWithDrawable:"input_labelWithDrawable__6FEh3",drawable:"input_drawable__wst8_"}},49017:function(e){e.exports={section:"style_section__fZoiZ",tabs:"style_tabs__TlfoW",tab:"style_tab__ws5cS",selected:"style_selected__cz_CH",tabContent:"style_tabContent__hz_Gn",regular:"style_regular__jAk7Q",reverseInput:"style_reverseInput___UPMq",reverseOption:"style_reverseOption__XAqQz",reverseChange:"style_reverseChange__yYufS",knownChange:"style_knownChange__0fiYE",changed:"style_changed__Z4RAe",input:"style_input__UVWoL",inputLabel:"style_inputLabel__R_Pus",percentageInput:"style_percentageInput__nT5Gj",result:"style_result__qeZfM",resultTabs:"style_resultTabs__00Kqi",resultTab:"style_resultTab__MinzU",resultTitle:"style_resultTitle__F6VtZ",resultTitleValue:"style_resultTitleValue__Fmrsa",resultLabel:"style_resultLabel__LUnLI",resultInfo:"style_resultInfo__3uyzt",resultPlaceholder:"style_resultPlaceholder__iiebe",steps:"style_steps__UDHZE",finalAnswer:"style_finalAnswer__pP17o"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.