1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9341],{141:e=>{e.exports=function(e,l){return e>l}},346:e=>{e.exports={"thermodynamics-unit-conversion__unit-conversion-div":"ThermodynamicsUnitConversionPopup_thermodynamics-unit-conversion__unit-conversion-div__k1iDX","thermodynamics-unit-conversion__hide":"ThermodynamicsUnitConversionPopup_thermodynamics-unit-conversion__hide__IH2GW","thermodynamics-unit-conversion__footer-btn":"ThermodynamicsUnitConversionPopup_thermodynamics-unit-conversion__footer-btn__FqI0_","thermodynamics-unit-conversion__input-box":"ThermodynamicsUnitConversionPopup_thermodynamics-unit-conversion__input-box__lWdf_","thermodynamics-unit-conversion__loading":"ThermodynamicsUnitConversionPopup_thermodynamics-unit-conversion__loading__J5c3f"}},367:(e,l,n)=>{"use strict";n.d(l,{Ay:()=>h});var t=n(37876);n(14232);var o=n(15039),i=n.n(o),s=n(47465),a=n(59306),r=n.n(a),u=n(36168),d=n.n(u),c=n(90701),m=n(30225),p=n(57158);let h=e=>{let{className:l,popupTitle:n,popupMessage:o,onClosePopup:a,footerButton:u,showCloseButton:h=!1,icon:_="kn-icon-more-info",footerButtonLink:v,setSubscribed:x,isSubscribed:y,toggleSubscriptionText:b,showSubscriptionToggle:j}=e;return(0,t.jsx)("div",{className:r()["entitlement-failure-popup"],children:(0,t.jsxs)(s.Ay,{isOpen:!0,onClose:a,headerContent:n,className:i()(d()["modal-popup-entitlement-failure"],l),footerContent:(0,t.jsx)(c.A,{to:v,className:"px-12 py-4 primary",styleAsButton:!0,children:u}),showCloseButton:h,extendedFooterContent:j&&(0,t.jsxs)("div",{className:i()(r()["entitlement-failure-popup__subscription-toggle"],"p-8"),children:[(0,t.jsxs)("div",{className:"flex pb-4",children:[(0,t.jsx)(p.A,{onToggle:x,isOn:!y}),(0,t.jsx)(m.A,{value:b,className:"pl-6"})]}),(0,t.jsx)(m.A,{value:"Activate this option to prevent seeing this message in the future.",className:r()["entitlement-failure-popup__subsription-message"]})]}),id:"entitlement-failure",children:[_&&(0,t.jsx)("span",{className:"pr-4",children:(0,t.jsx)("i",{className:i()(r()["entitlement-failure-popup__badge-icon"],"kn-icon-more-info mr-2"),id:"entitlement-failure-badge-icon"})}),o]})})}},776:(e,l,n)=>{"use strict";n.d(l,{A:()=>R});var t=n(37876),o=n(14232),i=n(15039),s=n.n(i),a=n(16968),r=n.n(a),u=n(40123),d=n.n(u),c=n(16027),m=n.n(c),p=n(64003),h=n.n(p),_=n(44239),v=n.n(_),x=n(77450),y=n.n(x),b=n(67376),j=n.n(b),g=n(42816),f=n(74641),N=n(3586),T=n(23466),A=n(48149),S=n.n(A);let R=e=>{let l,{listItems:n,inputVal:i,onSelect:a,keyCode:u,keyPress:c,classname:p,isLoading:_=!1,uiSearch:x=!0,highLightSearch:b=!1}=e,A=(0,o.useRef)(null),[R,E]=(0,o.useState)(-1);(0,o.useEffect)(()=>{C(u)},[c]),(0,o.useEffect)(()=>{let e=A.current;if(e)if(R>0){let l=e.children[R],n=null==l?void 0:l.offsetHeight;n>0&&(e.scrollTop=R*n)}else e.scrollTop=0},[R]);let C=e=>{switch(e){case null===g.cK||void 0===g.cK?void 0:g.cK.ARROW_UP:E(0===R?R:R-1);break;case null===g.cK||void 0===g.cK?void 0:g.cK.ARROW_DOWN:E(R===m()(P())-1?R:R+1);break;case null===g.cK||void 0===g.cK?void 0:g.cK.ENTER:case null===g.cK||void 0===g.cK?void 0:g.cK.NUMPAD_ENTER:var l;a(null==(l=P()[R])?void 0:l.select),E(-1)}},P=()=>{if(void 0===n)return[];let e=[],l=[];return r()(n,n=>{let t=y()(n,"search")?null==n?void 0:n.search:n,o=y()(n,"display")?null==n?void 0:n.display:n,s=y()(n,"select")?null==n?void 0:n.select:n;if((null==i?void 0:i.length)<2||(null==i?void 0:i.length)>1&&(0,f.XK)(t,i)){let n=null==t?void 0:t.split("|");if((null==i?void 0:i.length)>1&&m()(n)>0){let t=(null==n?void 0:n[0])||"";if((0,f.XK)(t,i)&&x)null==e||e.push({select:s,display:o});else{var a,r;let e=[];h()(n,l=>{h()(null==l?void 0:l.split(";"),l=>{(null==l?void 0:l.trim())!==(null==o?void 0:o.trim())&&(0,f.XK)(l,i)&&e.push(null==l?void 0:l.trim())})}),o=m()(e)>0&&!d()(o)?"".concat(o," (").concat(null==(r=v()(e))||null==(a=r.join(", "))?void 0:a.trim(),")"):o||"",o=b?(0,f.q0)(o,i):o,null==l||l.push({select:s,display:o})}}else null==e||e.push({select:s,display:o})}return null}),[...e,...l]};return(0,t.jsx)("div",{className:s()(S()["drop-down"],p),children:(0,t.jsxs)("div",{ref:A,className:s()(S().list),children:[_&&(0,t.jsx)("div",{className:"grid justify-self-center",children:(0,t.jsx)(T.A,{showText:!0})}),!_&&(l=r()(P(),(e,l)=>(0,t.jsx)(N.A,{styleAsLink:!0,id:"id-".concat(l),onClick:()=>a(null==e?void 0:e.select),className:s()({[S().active]:l===R},"w-full text-left"),tabIndex:l===R?0:-1,children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:j()(null==e?void 0:e.display,{allowedTags:["em","b","strong"]})}})},l)),0!==m()(l)||d()(i)?d()(i)&&d()(l)?(0,t.jsx)("div",{className:"m-4 text-2xl",children:(0,t.jsx)("span",{children:"No results found."})}):l:(0,t.jsx)("div",{className:"m-4 text-2xl",children:(0,t.jsx)("span",{children:"No results found. Please try again with different keyword"})}))]})})}},2878:e=>{e.exports={"thermo-molar-dialog":"ThermodynamicsMixingRatioDialogBox_thermo-molar-dialog__SUfj5","unit-popup-header":"ThermodynamicsMixingRatioDialogBox_unit-popup-header__Z_YC5","unit-popup-close-icon":"ThermodynamicsMixingRatioDialogBox_unit-popup-close-icon__gEm4z","unit-popup-container":"ThermodynamicsMixingRatioDialogBox_unit-popup-container__w2w43","unit-radio-btn":"ThermodynamicsMixingRatioDialogBox_unit-radio-btn__gxx9s"}},5173:(e,l,n)=>{var t=n(19204),o=n(13051);e.exports=function(e,l,n){return e&&e.length?t(e,0,(l=n||void 0===l?1:o(l))<0?0:l):[]}},5323:(e,l,n)=>{var t=n(75448),o=n(94175),i=n(83720),s=n(65930);e.exports=i(function(e,l){if(null==e)return[];var n=l.length;return n>1&&s(e,l[0],l[1])?l=[]:n>2&&s(l[0],l[1],l[2])&&(l=[l[0]]),o(e,t(l,1),[])})},9675:e=>{e.exports={"thermodynamics-result-table":"ThermodynamicsResultTable_thermodynamics-result-table__WBe1V",flash:"ThermodynamicsResultTable_flash__KhfKM","thermodynamics-result-table__heading":"ThermodynamicsResultTable_thermodynamics-result-table__heading__scBT4","thermodynamics-result-table__heading-calculation-first-column":"ThermodynamicsResultTable_thermodynamics-result-table__heading-calculation-first-column__CP
1cLJ","thermodynamics-result-table__heading-calculation-second-column":"ThermodynamicsResultTable_thermodynamics-result-table__heading-calculation-second-column__Vv7fn","thermodynamics-result-table__heading-one-column":"ThermodynamicsResultTable_thermodynamics-result-table__heading-one-column__Lwu_o","thermodynamics-result-table__heading-two-columns":"ThermodynamicsResultTable_thermodynamics-result-table__heading-two-columns__ujkEV","thermodynamics-result-table__heading-calculation":"ThermodynamicsResultTable_thermodynamics-result-table__heading-calculation__yQUme","thermodynamics-result-table__heading-compound":"ThermodynamicsResultTable_thermodynamics-result-table__heading-compound__Jas1X","thermodynamics-result-table__fraction-row":"ThermodynamicsResultTable_thermodynamics-result-table__fraction-row__JaueK","thermodynamics-result-table__phase_boundary-row":"ThermodynamicsResultTable_thermodynamics-result-table__phase_boundary-row__WLf9P","thermodynamics-result-table__fraction-sub-row":"ThermodynamicsResultTable_thermodynamics-result-table__fraction-sub-row__wcpNC","thermodynamics-result-table__phase_boundary-sub-row":"ThermodynamicsResultTable_thermodynamics-result-table__phase_boundary-sub-row__fXDf4","thermodynamics-result-table__phase-row":"ThermodynamicsResultTable_thermodynamics-result-table__phase-row__knpuF","thermodynamics-result-table__property":"ThermodynamicsResultTable_thermodynamics-result-table__property__qicl6","thermodynamics-result-table__property-row":"ThermodynamicsResultTable_thermodynamics-result-table__property-row__BgC71","thermodynamics-result-table__property-sub-row":"ThermodynamicsResultTable_thermodynamics-result-table__property-sub-row__fToNx","thermodynamics-result-table__body-row-primary-cell":"ThermodynamicsResultTable_thermodynamics-result-table__body-row-primary-cell__JKjQi","thermodynamics-result-table__body-row-uncertainty-cell":"ThermodynamicsResultTable_thermodynamics-result-table__body-row-uncertainty-cell__pL6XB","thermodynamics-result-table__body-row-error":"ThermodynamicsResultTable_thermodynamics-result-table__body-row-error__7TDy3","thermodynamics-result-table__body-row":"ThermodynamicsResultTable_thermodynamics-result-table__body-row__2Mmn_"}},9876:(e,l,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/kn/thermodynamics",function(){return n(79458)}])},12061:e=>{e.exports={"page-template":"PageTemplate_page-template__4q6H7","page-template__content":"PageTemplate_page-template__content__qZNl9","page-template__sticky-header":"PageTemplate_page-template__sticky-header__o7mBl","page-template__left-layout-content":"PageTemplate_page-template__left-layout-content__4hNoV"}},12823:(e,l,n)=>{"use strict";n.d(l,{A:()=>A});var t=n(37876),o=n(14232),i=n(89099),s=n.n(i),a=n(13895),r=n(40123),u=n.n(r),d=n(10239),c=n.n(d),m=n(99342),p=n.n(m),h=n(15039),_=n.n(h),v=n(42816),x=n(87530),y=n(65424),b=n(87436),j=n(67751),g=n(34558),f=n(3586),N=n(91922),T=n.n(N);let A=e=>{let{label:l="Resource",hoverText:n="Share this content",id:i,url:r,representationType:d,trackingId:m,className:h,contentId:N}=e,[A,S]=(0,o.useState)(!1),[R,E]=(0,o.useState)(""),[C,P]=(0,o.useState)({message:"",isSuccess:null}),w=c()(s().pathname,x.BV.html),k=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!A||!u()(R))return;let e=!p()(r)&&!u()(r)&&c()(r,"".concat(x.f0.BOOLEAN_EXPANSION,"=on"))?r:w?null===s()||void 0===s()?void 0:s().asPath:u()(N)?"":(0,x.aM)(x.BV.resources,[N,x.BV.toc]);(0,y.U)(s(),O,e)},[null===s()||void 0===s()?void 0:s().query,N,A]);let O=e=>{E(e||r||window.location.href)},D="srch"===d?T()["representationType-srch"]:"";return(0,t.jsxs)("div",{className:_()(T()["share-button"],"px-2 mx-2"),onBlur:e=>{(0,v.w1)(e)&&S(!1)},children:[(0,t.jsx)(f.A,{styleAsLink:!0,onClick:()=>S(!A),className:"primary",id:"".concat(i||"","_share"),ref:k,ariaExpanded:A,children:(0,t.jsx)(g.A,{placement:"bottom-start",content:n,className:"orange-tooltip bottom-tippy-arrow",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("i",{className:"mr-3 kn-icon-share"}),(0,t.jsx)("span",{className:h,children:"Share ".concat(l)})]})})}),A&&(0,t.jsx)("div",{className:_()(T()["share-modal-div"],"mt-2 flex flex-col",D),children:(0,t.jsxs)("div",{className:"p-2 flex items-center",children:[(0,t.jsxs)("label",{htmlFor:"urlInput",className:"p-2 pt-0 pr-0 text-muted",tabIndex:0,children:["Share ",(0,t.jsx)("br",{}
1),(0,t.jsx)("input",{id:"urlInput",name:"urlInput",type:"text",value:R,readOnly:!0,className:_()(T().spanBorder)})]}),(0,t.jsx)(f.A,{onClick:()=>{R&&((0,a.A)(R),P({message:"Link copied to clipboard",isSuccess:!0}),(0,b.py)((0,b.oj)(s()),{content:[{id:m||(null===s()||void 0===s()?void 0:s().asPath)}]},b.Rm.CONTENT_SHARE))},className:"primary mt-4",children:"Copy link"})]})}),(0,t.jsx)(j.A,{message:null==C?void 0:C.message,isSuccess:null==C?void 0:C.isSuccess,onClear:()=>P({message:"",isSuccess:null})})]})}},14431:e=>{e.exports={"thermodynamics-compound-details":"ThermodynamicsCompoundDetailsPopup_thermodynamics-compound-details__jm3ue","thermodynamics-compound-details__table":"ThermodynamicsCompoundDetailsPopup_thermodynamics-compound-details__table__s5rjE","compound-detail":"ThermodynamicsCompoundDetailsPopup_compound-detail__nj1HH","compound-value":"ThermodynamicsCompoundDetailsPopup_compound-value__9QEqP","molefile-fld":"ThermodynamicsCompoundDetailsPopup_molefile-fld__x3nGH","thermodynamics-compound-details__properties":"ThermodynamicsCompoundDetailsPopup_thermodynamics-compound-details__properties__tG0KD","thermodynamics-compound-details__properties__left":"ThermodynamicsCompoundDetailsPopup_thermodynamics-compound-details__properties__left___FLAr","thermodynamics-compound-details__properties__right":"ThermodynamicsCompoundDetailsPopup_thermodynamics-compound-details__properties__right__Zd8i6","item-image":"ThermodynamicsCompoundDetailsPopup_item-image__7okm6","text-label":"ThermodynamicsCompoundDetailsPopup_text-label__sieq2"}},16193:e=>{e.exports={"thermodynamic-compound-input__input-text":"ThermodynamicsInputCompound_thermodynamic-compound-input__input-text__PEIhi","thermodynamic-compound-input__input-compound-range":"ThermodynamicsInputCompound_thermodynamic-compound-input__input-compound-range__MzM8c","thermodynamic-compound-input__substance-div":"ThermodynamicsInputCompound_thermodynamic-compound-input__substance-div__OTA6e","thermodynamic-compound-input__initial-div":"ThermodynamicsInputCompound_thermodynamic-compound-input__initial-div__e034v","thermodynamic-compound-input__details-btn":"ThermodynamicsInputCompound_thermodynamic-compound-input__details-btn__R1Obk","thermodynamic-compound-input__hidden":"ThermodynamicsInputCompound_thermodynamic-compound-input__hidden__vYoO4","thermodynamic-compound-input__compound-dropdown":"ThermodynamicsInputCompound_thermodynamic-compound-input__compound-dropdown__Rk7b4","thermodynamic-compound-input__input__clear":"ThermodynamicsInputCompound_thermodynamic-compound-input__input__clear__dO969","thermodynamic-compound-input__compound-property":"ThermodynamicsInputCompound_thermodynamic-compound-input__compound-property__x0_TP"}},20624:(e,l,n)=>{var t=n(29257),o=n(141),i=n(27148);e.exports=function(e){return e&&e.length?t(e,i,o):void 0}},21735:(e,l,n)=>{var t=n(7766);e.exports=function(e,l){for(var n=-1,o=l.length,i=Array(o),s=null==e;++n<o;)i[n]=s?void 0:t(e,l[n]);return i}},22216:(e,l,n)=>{"use strict";n.d(l,{A:()=>r});var t=n(37876);n(14232);var o=n(15039),i=n.n(o),s=n(12061),a=n.n(s);let r=e=>{let{header:l,stickyHeader:n,className:o,children:s,childrenClassName:r,templateLayout:u,id:d}=e;return(0,t.jsxs)("div",{className:i()(a()["page-template"],o),id:d||"page_template",children:[l&&(0,t.jsx)("div",{className:a()["page-template__header"],children:l}),n&&(0,t.jsx)("div",{className:a()["page-template__sticky-header"],children:n}),(0,t.jsx)("div",{className:i()("md:px-15 px-4",{[a()["page-template__content"]]:"center"===u||"left"!==u},{[a()["page-template__left-layout-content"]]:"left"===u},{"mx-auto":"center"===u||"left"!==u},{"ml-8":"left"===u},r,{"py-20":!r}),children:s})]})}},27023:e=>{var l=Math.ceil,n=Math.max;e.exports=function(e,t,o,i){for(var s=-1,a=n(l((t-e)/(o||1)),0),r=Array(a);a--;)r[i?a:++s]=e,e+=o;return r}},28460:(e,l,n)=>{var t=n(59930),o=n(21735),i=n(44068),s=n(57408),a=n(4194),r=n(68373);e.exports=a(function(e,l){var n=null==e?0:e.length,a=o(e,l);return i(e,t(l,function(e){return r(e,n)?+e:e}).sort(s)),a})},29257:(e,l,n)=>{var t=n(76014);e.exports=function(e,l,n){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=l(s);if(null!=a&&(void 0===r?a==a&&!t(a):n(a,r)))var r=a,u=s}return u}},29323:(e,l,n)=>{var t=n(44627);e.exports=n(83611)(t,!0)},32383:()=>{},32401:e=>{e.exports=function(e,l){for(var n=null==e?0:e.length;n--&&!1!==l(e[n],n,e););return e}},34260:(e,l,n)=>{"use strict";n.d(l,{A:()=>R});var t=n(3576),o=n(62701),i=n(37876),s=n(14232),a=n(16968),r=n.n(a),u=n(64003),d=n.n(u),c=n(99342),m=n.n(c),p=n(19850),h=n.n(p),_=n(97322),v=n(15039),x=n.n(v),y=n(89099),b=n(87436),j=n(87530),g=n(74641),f=n(40993),N=n.n(f),T=n(90701),A=n(30225),S=n(34558);let R=e=>{let{breadcrumbs:l,className:n,setOpenMiniTOC:a}
1=e,[u,c]=(0,s.useState)(l),{width:p,height:v,ref:f}=(0,_.A)(),R=(0,y.useRouter)(),E=(0,j.OD)(null==R?void 0:R.pathname,[null===j.BV||void 0===j.BV?void 0:j.BV.search])?100:30;return(0,s.useEffect)(()=>{if(v>23){let e=[],n=30-(((null==l?void 0:l.length)||0)-1)*5;d()(u,(l,t)=>{let{icon:o,text:i,link:s,hide:a}=l||{},r=null==i?void 0:i.length;if(r>n){let l=.3*r,n="".concat(i.substring(0,l),"...").concat(i.substring(r-l));e[t]={icon:o,text:i,link:s,activeText:n,hide:a}}else e[t]={icon:o,text:i,link:s,hide:a}}),c(e)}},[l,p,v]),(0,s.useEffect)(()=>{c(l)},[l]),(0,i.jsx)("div",{ref:f,className:x()(N().breadcrumbs,n),id:"breadcrumbs",children:r()(u,(e,l)=>{var n;let{icon:s,text:r,link:d,activeText:c,hide:p}=e||{},_=l===((null==u?void 0:u.length)||0)-1,v=l===((null==u?void 0:u.length)||0)-2&&(null==u||null==(n=u[l+1])?void 0:n.hide)===!0,y=(null==r?void 0:r.indexOf("Search :"))>=0,f=(null==r?void 0:r.indexOf("Search for"))>=0,R=y||f?unescape((0,g.W5)(r,E)):unescape(c||r);return p||m()(r)?"":(0,i.jsx)(S.A,{content:(0,i.jsx)(A.A,{value:r}),placement:"bottom-start",className:x()("common-popover"),arrow:!1,children:_||v?(0,i.jsxs)("button",{type:"button",id:"crumb_".concat(l),onClick:()=>void(h()(a)&&a(!0)),children:[s&&(0,i.jsx)("i",{className:x()(s,"mr-2",N().icon)}),(0,i.jsx)(A.A,{className:"font-bold link",value:(0,j.Mo)(R),id:"crumb_link_last"})]}):(0,i.jsxs)("span",{id:"crumb_".concat(l),children:[(0,i.jsxs)(T.A,(0,o._)((0,t._)({className:x()(N().crumb,"secondary"),to:d,id:"crumb_".concat(l)},0===l?{onClick:()=>{(0,b.py)("home",{link:{location:"home",name:"kn:breadcrumb-home-link"}},b.Rm.NEW_PAGE)}}:{}),{children:[s&&(0,i.jsx)("i",{className:x()(s,"mr-2",N().icon)}),(0,i.jsx)(A.A,{value:(0,j.Mo)(R),id:"crumb_link_".concat(l)})]})),r&&(0,i.jsx)("i",{className:"mx-4 kn-icon-arrow-small-right text-muted"})]})},"crumb-".concat(l))})})}},37022:(e,l,n)=>{"use strict";n.d(l,{U:()=>s});var t=n(35493),o=n(40123),i=n.n(o);class s{updateDecimalRounding(e){this.rounding=e,t.Decimal.set({rounding:e})}updateConversionFields(e){this.conversionFields=e}simpleConversion3(e){let l=this;return this.convert(e,"^f$",((e,n)=>{if(n){let e=n.replace(/^\+/gi,""),o=s.significantDigits(e),i=l.convertNumber(new t.Decimal(e)),a=i;return o>0&&(a=i.toSignificantDigits(o)),a=s.addZerosIfNeeded(a,o)}return new t.Decimal(0)}).bind(this))}simpleIntervalReplacer8(e){let l=this;return this.convert(e,"^f\\s*-\\s*f$",((e,n,o)=>{if(n&&o){let e=n.replace(/^\+/gi,""),i=o.replace(/^\+/gi,""),a=s.significantDigits(e),r=s.significantDigits(i),u=l.convertNumber(new t.Decimal(e)),d=new t.Decimal(u);a>0&&(d=new t.Decimal(u).toSignificantDigits(a));let c=l.convertNumber(new t.Decimal(i)),m=new t.Decimal(c);r>0&&(m=new t.Decimal(c).toSignificantDigits(r)),d=s.addZerosIfNeeded(d,a),m=s.addZerosIfNeeded(m,r);let p="".concat(d," - ").concat(m);return p.replace(/\s\s/g," ")}return new t.Decimal(0)}).bind(this))}convertNumber(e){let l=new t.Decimal(this.conversionFields.REVERSE_CONVERSION_FACTOR);l=l.isZero()?new t.Decimal(1):l;let n=new t.Decimal(this.conversionFields.CONVERSION_FACTOR);return n=n.isZero()?new t.Decimal(1):n,e.minus(new t.Decimal(this.conversionFields.REVERSE_CONVERSION_OFFSET)).dividedBy(l).minus(new t.Decimal(this.conversionFields.CONVERSION_OFFSET)).dividedBy(n)}static significantDigits(e){return s.getSignificantDigitCount(e)}static addZerosIfNeeded(e,l){var n,o,i,a,r;let u=(null==e||null==(o=e.toString())||null==(n=o.split(/\./))?void 0:n.length)>1,d=e,c=new t.Decimal(1);if(u||!u&&(null==e||null==(i=e.toString())?void 0:i.length)<l)if(-1===e.comparedTo(c))d=s.addZeroes(e,l);else{let n=null==e||null==(r=e.toString())||null==(a=r.split(/\./)[0])?void 0:a.length;d=s.addZeroes(e,l-(n||0))}return d}convert(e,l,n){let t=RegExp(l.replaceAll("f",this.regexes.float),"g"),o=e.replace(t,n);return o!==e?o:""}performConversion(e){this.results={},this.convertItem(e);let l="";return Object.keys(this.results).forEach(n=>{let t=this.results[n];n===e&&t&&(null==t?void 0:t.length)>0&&(l=t.toString())}),""!==l?l:e}convertItem(e){let l=s.sanitize(e),n="",t=Object.keys(this.replacers);for(let e=0;e<(null==t?void 0:t.length);e+=1)if(({}).hasOwnProperty.call(this.replacers,t[e])){var o;if(n=null==(o=this.replacers[t[e]])?void 0:o.call(this,l))break}return this.results[l]=n,!!n}checkColumnWithRegex(e){if(!(null==e?void 0:e.length))return!1;let l=!1,n=["^f$","^f\\s*-\\s*f(.*)$","f\\s+-\\s+f(.*)"],t=0;for(;t<(null==n?void 0:n.length);){let o=RegExp(n[t].replaceAll("f",this.regexes.float),"g").test(e);
1if(l=o,o)break;t+=1}return l}checkIfColumnsAreConvertible(e,l){let n=[];return Object.keys(e).forEach(t=>{let o=e[t],s=!1;Object.keys(l).forEach(e=>{let n=l[e];if((s=s||this.checkColumnWithRegex(n[null==o?void 0:o.id]))&&!i()(null==o?void 0:o.plain_header)){var t,a,r;let e=null==o||null==(r=o.header)?void 0:r.slice(((null==o||null==(t=o.plain_header)?void 0:t.length)||0)+2,((null==o||null==(a=o.header)?void 0:a.length)||0)-1);i()(e)&&(s=!1)}return!0}),n.push({id:null==o?void 0:o.id,isConvertible:s})}),n}getConvertedValues(e,l){return this.checkColumnWithRegex(e)?(this.updateConversionFields(l),this.performConversion(e)):e}constructor(){this.regexes={float:"\\s*([-+]?\\d*\\.?\\d*)\\s*"},this.results={},this.replacers={"^+10$":this.simpleConversion3,"^-10$":this.simpleConversion3,"^147 - 283$":this.simpleIntervalReplacer8},this.conversionFields=null,this.updateDecimalRounding(t.Decimal.ROUND_UP)}}s.addZeroes=(e,l)=>{var n,o;let i=null==e||null==(n=e.toString())?void 0:n.split(".");return(null==i?void 0:i.length)<=l||(null==i?void 0:i.length)>1&&(null==(o=i[1])?void 0:o.length)<=l?new t.Decimal(e.toFixed(l)):e},s.getSignificantDigitCount=e=>Number.isFinite(Number(e))?String(e).trim().replace(/^[\D0]+|\.|([e][^e]+)$/g,"").length:5,s.sanitize=e=>{let l=e;return null==(l=null==(l=null==(l=null==(l=null==(l=null==(l=null==l?void 0:l.replace(/\s\s/g," "))?void 0:l.replace(/Ã/g,"x"))?void 0:l.replace(/â/g,"-"))?void 0:l.replace(/−/g,"-"))?void 0:l.replace(/−/g,"-"))?void 0:l.replace(/−/g,"-"))?void 0:l.trim()}},37531:e=>{e.exports={"thermodynamic-export-content":"ThermodynamicsExportContent_thermodynamic-export-content__4FKcX"}},40993:e=>{e.exports={breadcrumbs:"Breadcrumbs_breadcrumbs__wxkmg",icon:"Breadcrumbs_icon__Jw7fl","breadcrumbs-header":"Breadcrumbs_breadcrumbs-header__8MUFN",crumb:"Breadcrumbs_crumb__6nrTb"}},43247:(e,l,n)=>{"use strict";n.d(l,{$Y:()=>E,FW:()=>g,KS:()=>A,LU:()=>f,_U:()=>R,eZ:()=>j,oR:()=>N,uH:()=>T});var t=n(49473),o=n(40123),i=n.n(o),s=n(16968),a=n.n(s),r=n(9353),u=n.n(r),d=n(7766),c=n.n(d),m=n(77450),p=n.n(m),h=n(12770),_=n(98965);let v=e=>{let l=null==e?void 0:e.split("|");return!((null==l?void 0:l.length)>1)||i()(null==l?void 0:l[0])||i()(null==l?void 0:l[1])?[]:l},x=function(e){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!0!==l||i()(e)?e:'"'.concat(e,'"')},y=(e,l,n,t,o,s,r,d)=>{let c=[],m=[],h=u()(a()(n,e=>{let n=v(e);return i()(n)?null:"".concat(null==n?void 0:n[1]," (").concat(null==l?void 0:l.toUpperCase(),")")}),null),y=u()(a()(n,e=>{let l=v(e);return i()(l)?null:"".concat(null==l?void 0:l[0]," (%)")}),null);return c.push([s,e]),c.push([]),c.push(["","","Concentration (%)",...y]),c.push(["","","Temperature (".concat(null==l?void 0:l.toUpperCase(),")"),...h]),c.push([o,d,"Mixtures"]),a()(t,(e,l)=>{var o,s,u;let h=(null==t||null==(o=t[l])?void 0:o[_.In])||"",y=p()(null==t?void 0:t[l],d)&&!i()(null==t||null==(s=t[l])?void 0:s[d])?null==t||null==(u=t[l])?void 0:u[d]:"";m=[...m=[...m=[x(l,r)],x(y,r)],x(h,r)],a()(n,e=>{if(!i()(v(e))){var n,o;m=[...m,x((null==t||null==(o=t[l])||null==(n=o[e])?void 0:n.RATE)||"",r)]}}),c.push(m)}),c},b=(e,l,n,t,o)=>{let s=[],r=[],u={},d=["Detailed Data : ".concat(null==l?void 0:l.METAL," . ").concat(n,": : ").concat(null==l?void 0:l.MEDIUM)];return t&&(d=["Detailed Data : ".concat(null==l?void 0:l.MEDIUM," . ").concat(n,": : ").concat(null==l?void 0:l.METAL)]),s.push(d),s.push([]),u="c"===e?null==l?void 0:l.METRIC_DISPLAY_NAME:null==l?void 0:l.US_CUSTOMARY_DISPLAY_NAME,a()(u,e=>{r=[...r,e]}),s.push(r),a()(null==l?void 0:l.RECORDS,e=>{let l=[];a()(u,(n,t)=>{l=[...l,(null==e?void 0:e[t])||""]}),s.push(l)}),i()(o)||(s.push([]),s.push(["Resistance Datasheet"]),s.push([]),a()(o,(e,l)=>{let n=[];n.push(l,e),s.push(n)})),s},j=(e,l)=>{var n;let o=new Blob([null==e||null==(n=e.map(e=>null==e?void 0:e.join(",")))?void 0:n.join("\r\n")],{type:"text/csv;charset=utf-8;"});(0,t.saveAs)(o,"".concat(l,".csv"))},g=(e,l)=>{let n=h.Ay.utils.aoa_to_sheet(e),t=h.Ay.utils.book_new(),o=l.substring(0,31);h.Ay.utils.book_append_sheet(t,n,o),h.Ay.writeFile(t,"".concat(l,".xlsx"))},f=(e,l,n,t,o,i,s,a,r,u,d,c)=>{i?g(b(l,o,r,u,d),"Material_Medium_Detailed"):g(y(e,l,n,t,s,a,!1,c),"Material_Medium_Compatibility")},N=(e,l,n,t,o,i,s,a,r,u,d,c)=>{i?j(b(l,o,r,u,d),"Material_Medium_Compatibility_Detailed"):j(y(e,l,n,t,s,a,!0,c),"Material_Medium_Compatibility")},T=(e,l)=>{let n=new Blob([e],{type:"text/html;charset=utf-8;"});(0,t.saveAs)(n,"".concat(l,".html"))},A=(e,l,n)=>{let o=new Blob([e],{type:"text/plain;charset=utf-8;"});(0,t.saveAs)(o,"".concat(l,".").concat(n))},S=(e,l,n,t,o)=>{let i=[],s=[];return i.push([o,e]),i.push([]),i.push(["","Temperature (".concat(null==l?void 0:l.toUpperCase(),")"),...n]),i.push(["Material Name","Trade Name"]),a()(t,(e,l)=>
1{s=[...s=[c()(t,[l,"material"])],c()(t,[l,"tradename"])],a()(n,e=>{var n,o;s=[...s,(null==t||null==(o=t[l])||null==(n=o[e])?void 0:n.RATE)||""]}),i.push(s)}),i},R=(e,l,n,t,o,i,s,a,r,u)=>{i?j(b(l,o,a,r,u),"Plastic_Compatibility_Detailed"):j(S(e,l,n,t,s),"Plastic_Compatibility")},E=(e,l,n,t,o,i,s,a,r,u)=>{i?g(b(l,o,a,r,u),"Plastic_Compatibility_Detailed"):g(S(e,l,n,t,s),"Plastic_Compatibility")}},44627:(e,l,n)=>{var t=n(81429),o=n(69750);e.exports=function(e,l){return e&&t(e,l,o)}},48149:e=>{e.exports={"drop-down":"DropDownList_drop-down__8iNGD",list:"DropDownList_list___vm5M",active:"DropDownList_active__7dnBP",inactive:"DropDownList_inactive__2IseS","filter-error":"DropDownList_filter-error__WJlVO"}},48815:(e,l,n)=>{"use strict";n.d(l,{A:()=>r});var t=n(37876);n(14232);var o=n(15039),i=n.n(o),s=n(92886),a=n.n(s);let r=e=>{let{content:l,isOpen:n,classname:o=""}=e;return(0,t.jsx)("div",{className:i()(a()["tooltip-content"],{invisible:!n},o),children:l})}},49473:function(e,l,n){var t,o;void 0===(o="function"==typeof(t=function(){"use strict";function l(e,l,n){var t=new XMLHttpRequest;t.open("GET",e),t.responseType="blob",t.onload=function(){a(t.response,l,n)},t.onerror=function(){console.error("could not download file")},t.send()}function t(e){var l=new XMLHttpRequest;l.open("HEAD",e,!1);try{l.send()}catch(e){}return 200<=l.status&&299>=l.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var l=document.createEvent("MouseEvents");
1l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(l)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,n,s){var a=i.URL||i.webkitURL,r=document.createElement("a");r.download=n=n||e.name||"download",r.rel="noopener","string"==typeof e?(r.href=e,r.origin===location.origin?o(r):t(r.href)?l(e,n,s):o(r,r.target="_blank")):(r.href=a.createObjectURL(e),setTimeout(function(){a.revokeObjectURL(r.href)},4e4),setTimeout(function(){o(r)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,i){if(n=n||e.name||"download","string"!=typeof e){var s;navigator.msSaveOrOpenBlob((void 0===(s=i)?s={autoBom:!1}:"object"!=typeof s&&(console.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e),n)}else if(t(e))l(e,n,i);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout(function(){o(a)})}}:function(e,n,t,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return l(e,n,t);var a="application/octet-stream"===e.type,r=/constructor/i.test(i.HTMLElement)||i.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&r||s)&&"u">typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},d.readAsDataURL(e)}else{var c=i.URL||i.webkitURL,m=c.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout(function(){c.revokeObjectURL(m)},4e4)}});i.saveAs=a.saveAs=a,e.exports=a})?t.apply(l,[]):t)||(e.exports=o)},50092:(e,l,n)=>{var t=n(27023),o=n(65930),i=n(60524);e.exports=function(e){return function(l,n,s){return s&&"number"!=typeof s&&o(l,n,s)&&(n=s=void 0),l=i(l),void 0===n?(n=l,l=0):n=i(n),s=void 0===s?l<n?1:-1:i(s),t(l,n,s,e)}}},59306:e=>{e.exports={"entitlement-failure-popup__badge-icon":"EntitlementFailurePopup_entitlement-failure-popup__badge-icon__SXqox","entitlement-failure-popup__subscription-toggle":"EntitlementFailurePopup_entitlement-failure-popup__subscription-toggle___CuHi","entitlement-failure-popup__subsription-message":"EntitlementFailurePopup_entitlement-failure-popup__subsription-message__zTPne"}},62953:e=>{e.exports={"export-button":"ExportButton_export-button__NTmeM","export-button__content":"ExportButton_export-button__content__AxYLK","export-button__content-icon-close":"ExportButton_export-button__content-icon-close__g_kXA","export-button__graph-design":"ExportButton_export-button__graph-design__jl__2"}},63415:(e,l,n)=>{e.exports=n(50092)()},65424:(e,l,n)=>{"use strict";n.d(l,{U:()=>u,o:()=>d});var t=n(40123),o=n.n(t),i=n(87530),s=n(41501),a=n(74641),r=n(15669);let u=(e,l,n)=>{let t=o()(n)?null==e?void 0:e.asPath:n,u="",d=!1,c=r.IB;(0,s.Y)(e=>{if((0,a.oJ)(e)){var n,t;let l=null==e||null==(t=e.BODY)||null==(n=t.DATA)?void 0:n.URL_KEY;o()(l)||(u=(0,i.aM)("".concat(i.BV.shortUrl,"?").concat(l)),d=!0,c=r.R5)}l(u,d,c)},t)},d=(e,l)=>new Promise(n=>{u(e,(e,l,t)=>{n({shortShareUrl:e,state:l,message:t})},l)})},70670:(e,l,n)=>{var t=n(29257),o=n(98978),i=n(27148);e.exports=function(e){return e&&e.length?t(e,i,o):void 0}},70814:e=>{e.exports={"thermo-condition-history-dialog":"ThermodynamicsConditionHistoryDialogBox_thermo-condition-history-dialog__Xovv0","popup-header":"ThermodynamicsConditionHistoryDialogBox_popup-header__5mdZ7","popup-close-icon":"ThermodynamicsConditionHistoryDialogBox_popup-close-icon__aab5P","td-center":"ThermodynamicsConditionHistoryDialogBox_td-center__bSak3","popup-container":"ThermodynamicsConditionHistoryDialogBox_popup-container__6zkKD"}},70994:e=>{e.exports={"thermodynamic-substance-input__substance-div":"ThermodynamicsSubstanceInput_thermodynamic-substance-input__substance-div__AGH_t","thermodynamic-substance-input__substance-molar-div":"ThermodynamicsSubstanceInput_thermodynamic-substance-input__substance-molar-div__32xe9","thermodynamic-substance-input__kn-icon-arrow-size":"ThermodynamicsSubstanceInput_thermodynamic-substance-input__kn-icon-arrow-size__mQtq_"}},72649:(e,l,n)=>{var t=n(24127);e.exports=function(e){return t(e,5)}},73455:e=>{e.exports={"header-alignment":"ThermodynamicsHeader_header-alignment__NeAtn","export-button-thermo":"ThermodynamicsHeader_export-button-thermo__4DWyL","unit-converter-button-thermo":"ThermodynamicsHeader_unit-converter-button-thermo__vfKmJ"}},75176:e=>{e.exports={"main-template":"Thermodynamics_main-template__L0mlx",content:"Thermodynamics_content__8YiC3"}},78729:e=>{e.exports={"thermodynamics-calculation-type__main":"ThermodynamicsCalculationType_thermodynamics-calculation-type__main__SvDLB"}},79458:(e,l,n)=>{"use strict";n.r(l),n.d(l,{default:()=>l9});var t,o,i,s,a=n(37876),r=n(14232),u=n(15039),d=n.n(u),c=n(40123),m=n.n(c),p=n(22216),h=n(34260),_=n(87530),v=n(16968),x=n.n(v),y=n(93674),b=n.n(y),j=n(51288),g=n.n(j),f=n(72649),N=n.n(f),T=n(16027),A=n.n(T),S=n(99342),R=n.n(S),E=n(96590),C=n.n(E),P=n(69750),w=n.n(P),k=n(54935),O=n.n(k),D=n(20527),L=n.n(D),I=n(5323),U=n.n(I),M=n(19809),B=n.n(M),F=n(10239),V=n.n(F),Y=n(87436);let H="temperature",K="pressure",q="U.S. Customary",G="Metric",z={nist:{value:"nist",label:"NIST"},cranium:{value:"cranium",label:"Cranium"}},W=[{name:"Molar",unit:"mole"},{name:"Mass",unit:"mass"}],X={minimum:0,maximum:1650},J={minimum:0,maximum:775},Z={headers:{calculationNumRow:[],firstCompoundRow:[],secondCompoundRow:[],conditionRow:[],flashEngineRow:[],propertyHeaderRow:[]},rows:[]},$={bubble:{value:"bubble",label:"Bubble Pt"},dew:{value:"dew",label:"Dew Pt"},flash:{value:"flash",label:"Flash Calculation"},point:{value:"flash",label:"Pt Calculation"},bubble_dew:{value:"bubble",label:"Bubble/dew Pt"}},Q={compounds:[],condition:{temperature:null,pressure:null,mixingRatioValue:null,mixingRatioUnit:null},type:null==$||null==(o=$.bubble)?void 0:o.value,historyFlashEngine:"",dataSource:"nist"},ee=(e,l)=>{let n=Number(e);if(!n||L()(n))return e;let t=Number(l);if(!t||L()(t))return b()(n,6).toString();let o="".concat(t.toString(),".").split(".")[1].length||"".concat(l||"",".").split(".")[1].length;return b()(n,o).toString()},el=(e,l,n,t,o,i)=>{var s,a;let r=Array.from(o).sort(),u=(null==r?void 0:r.length)!==1,d={isExpandable:u,cells:[],subRows:[]};if(!u){let o=r[0],s="";return C()(e,e=>{var l,t,i,a;m()(null==e||null==(t=e.properties[n])||null==(l=t.models[o])?void 0:l.helpURL)||(s=null==e||null==(a=e.properties[n])||null==(i=a.models[o])?void 0:i.helpURL)}),null==d||null==(a=d.cells)||a.push({id:"".concat(n,"_").concat(o),value:i?o:"".concat(n).concat(o?" (".concat(o,")"):""),helpURL:s},{id:"".concat(n,"_unit"),value:t}),C()(e,(e,t)=>{var i,s,a,r;let u=null==e||null==(i=e.properties[n])?void 0:i.models[o];R()(u)||(null==u?void 0:u.phaseName)!==l?null==d||null==(s=d.cells)||s.push({id:"".concat(t,"_").concat(n,"_").concat(o,"_value"),value:""},{id:"".concat(t,"_").concat(n,"_").concat(o,"_uncertainty"),value:""}):null==d||null==(r=d.cells)||r.push({id:"".concat(t,"_").concat(n,"_").concat(o,"_value"),value:ee(null==u?void 0:u.value,null==u?void 0:u.uncertainty),experimentalDataInput:(null==u?void 0:u.isExperimentalDataAvailable)?{propertyCode:null==u?void 0:u.code,phases:null==u?void 0:u.phase,trcids:x()(null==e||null==(a=e.mixture)?void 0:a.compounds,"trcid")}:null},{id:"".concat(t,"_").concat(n,"_").concat(o,"_uncertainty"),value:null==u?void 0:u.uncertainty})}),d}return null==d||null==(s=d.cells)||s.push({id:n,value:n},{id:"".concat(n,"_unit"),value:""}),C()(w()(e),e=>{var l;null==d||null==(l=d.cells)||l.push({id:"".concat(e,"_").concat(n,"_value"),value:""},{id:"".concat(e,"_").concat(n,"_uncertainty"),value:""})}),g()(r,o=>{var i;
1null==d||null==(i=d.subRows)||i.push(el(e,l,n,t,new Set([o]),!0))}),d},en=(e,l,n,t)=>{var o;let i={isExpandable:!0,isFraction:!0,cells:[],subRows:[]};return null==i||null==(o=i.cells)||o.push({id:n,value:"".concat(n.toUpperCase()," FRACTION")},{id:"".concat(n,"_unit"),value:"%"}),g()(e,e=>{var t;let o={isExpandable:!1,isFraction:!0,cells:[{id:e,value:e},{id:"".concat(n,"_unit"),value:"%"}],subRows:[]};C()(l,(l,t)=>{var i,s,a,r;if(B()(null==l||null==(i=l.fractions[n])?void 0:i.compoundValues[e])){null==o||null==(r=o.cells)||r.push({id:"".concat(t,"_").concat(n,"_value"),value:""},{id:"".concat(t,"_").concat(n,"_uncertainty"),value:""});return}let u=b()(100*parseFloat(null==l||null==(s=l.fractions[n])?void 0:s.compoundValues[e]),3).toString();null==o||null==(a=o.cells)||a.push({id:"".concat(t,"_").concat(n,"_value"),value:u},{id:"".concat(t,"_").concat(n,"_uncertainty"),value:""})}),null==i||null==(t=i.subRows)||t.push(o)}),C()(l,(e,l)=>{var o,s,a,r;let u=B()(null==e||null==(o=e.fractions[n])?void 0:o.value)?"":b()(100*parseFloat(null==e||null==(s=e.fractions[n])?void 0:s.value),3).toString();m()(null==e?void 0:e.properties)&&0===t?null==i||null==(a=i.cells)||a.push({id:"".concat(l,"_").concat(n,"_value"),value:"",isSkip:!0},{id:"".concat(l,"_").concat(n,"_uncertainty"),value:et,isError:!0}):null==i||null==(r=i.cells)||r.push({id:"".concat(l,"_").concat(n,"_value"),value:u},{id:"".concat(l,"_").concat(n,"_uncertainty"),value:""})}),i},et="No results found for this compound/condition combination";var eo=((t={}).SELECT_COMPOUND="select_compound",t.REMOVE_COMPOUND="remove_compound",t.CLEAR_INPUT="clear_input",t.UPDATE_MIXING_RATIO="update_mixing_ratio",t.CALCULATE="calculate",t.CLEAR_ALL="clear_all",t.UPDATE_TEMPERATURE="update_temperature",t.UPDATE_PRESSURE="update_pressure",t.UPDATE_MIXING_RATIO_UNIT="update_mixing_ratio_unit",t.UPDATE_PROPERTIES="update_properties",t.UPDATE_FLASH_ENGINE="update_flash_engine",t.DETAILS="details",t.UPDATE_CALCULATION_TYPE="update_calculation_type",t);let ei=(e,l,n,t)=>{var o,i,s,a,r;let u=[{name:"operation",values:[l]}];(null==n||null==(o=n.compounds)?void 0:o[0])&&u.push({name:"compound_1",values:[n.compounds[0].name]}),(null==n||null==(i=n.compounds)?void 0:i[1])&&u.push({name:"compound_2",values:[n.compounds[1].name]}),(null==n||null==(s=n.condition)?void 0:s.mixingRatioValue)&&(u.push({name:"mixing_ratio",values:[n.condition.mixingRatioValue.toString()]}),u.push({name:"mixing_ratio_unit",values:[n.condition.mixingRatioUnit]})),(null==n||null==(a=n.condition)?void 0:a.temperature)&&u.push({name:"temperature",values:[n.condition.temperature.toString()]}),(null==n||null==(r=n.condition)?void 0:r.pressure)&&u.push({name:"pressure",values:[n.condition.pressure.toString()]}),(null==n?void 0:n.type)&&u.push({name:"calculation_type",values:[n.type]}),t&&u.push({name:"flash_engine",values:[t]}),(0,Y.py)((0,Y.oj)(e),{search:{facets:u}},Y.Rm.SEARCH_RESULTS_UPDATED)},es={compounds:[{trcid:1367,name:"heptane",isBinary:!0,T1:"182",T2:"540",P1:"0.000160",P2:"2731.00"},{trcid:5353,name:"acetone",isBinary:!1,T1:"178",T2:"508",P1:"0.002200",P2:"4700.00"}],condition:{temperature:350,pressure:120,mixingRatioValue:50,mixingRatioUnit:"mole"},type:null==$||null==(i=$.flash)?void 0:i.value,historyFlashEngine:"",dataSource:"nist"},ea={compounds:[{trcid:5523,name:"benzene",isBinary:!0,T1:"278",T2:"562",P1:"5.000000",P2:"4894.00"}],condition:{temperature:500,pressure:null,mixingRatioValue:null,mixingRatioUnit:null},type:null==$||null==(s=$.bubble_dew)?void 0:s.value,historyFlashEngine:"",dataSource:"nist"},er={tab:"",unit:""};var eu=n(89099),ed=n(41946),ec=n.n(ed),em=n(74641),ep=n(23466),eh=n(62657),e_=n(67751),ev=n(15669),ex=n(93828),ey=n(12823),eb=n(3586),ej=n(81541),eg=n.n(ej);let ef=e=>{let{buttonName:l,className:n,onClick:t}=e;return(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{className:d()(eg()["unit-converter"],"px-4",n),onClick:t,children:(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"pr-3 kn-icon-unit-convert"}),(0,a.jsx)("span",{children:l||"Unit Converter"})]})})})};var eN=n(92886),eT=n.n(eN),eA=n(43247),eS=n(4591),eR=n(73455),eE=n.n(eR),eC=n(37531),eP=n.n(eC);let ew=e=>{let{onCsvClick:l,onExcelClick:n}=e;return(0,a.jsxs)("div",{className:d()(eP()["thermodynamic-export-content"],"pl-6"),children:[(0,a.jsx)("div",{className:"pt-4",children:(0,a.jsxs)(eb.A,{id:"csv_popup",styleAsLink:!0,onClick:()=>l(),className:"px-4",children:[(0,a.jsx)("span",{className:"kn-icon-xls"}),(0,a.jsx)("span",{className:"pl-3",children:"CSV"})]})}),(0,a.jsx)("div",{className:"pt-2 py-4",children:(0,a.jsxs)(eb.A,{id:"excel_popup",styleAsLink:!0,disabled:!0,onClick:()=>n(),className:"px-4",children:[(0,a.jsx)("span",{className:"kn-icon-excel"}),(0,a.jsx)("span",{className:"pl-3",children:"Excel (XLSX)"})]})})]})};var ek=n(47465),eO=n(36168),eD=n.n(eO),eL=n(30225),eI=n(43085),eU=n(37022),eM=n(73749),eB=n(41501);let eF=(e,l)=>{(0,eB.Th)(eM._B,e,l)},eV=(e,l)=>{(0,eB.Th)(eM.Es,e,l)};var eY=n(346),eH=n.n(eY);let eK=e=>{let{isOpen:l,onClose:n,headerContent:t,selectedUnitConversionTab:o,setUnitConversionTab:i}=e,[s,u]=(0,r.useState)(o),[c,p]=(0,r.useState)(),[h,_]=(0,r.useState)(),[v,y]=(0,r.useState)(!0),[b,j]=(0,r.useState)("");return(0,r.useEffect)(()=>{(0,eB.Th)(eM.l,e=>{if(y(!1),(0,em.oJ)(e)){var l;p(null==e||null==(l=e.BODY)?void 0:l.RESULTS)}},{PROPERTY_ID:"144691514"})},[]),(0,a.jsx)(ek.Ay,{isDraggable:!0,isOpen:l,onClose:()=>n(),headerContent:t,className:eD()["modal-popup-thermodynamic-property-unit"],headlineClass:"headline-class",subClass:eD()["modal-popup-thermodynamic-property-unit__unit-conversion-alignment"],children:(0,a.jsx)("div",{children:v?(0,a.jsx)(ep.A,{showText:!0,className:d()(eH()["thermodynamics-unit-conversion__loading"])}):(0,a.jsxs)("div",{children:[(0,a.jsx)("input",{id:"unit_value",placeholder:"Enter Unit Value",name:"unit-value",type:"text",onCh
1ange:e=>{var l;return j(null==e||null==(l=e.target)?void 0:l.value)},className:d()(eH()["thermodynamics-unit-conversion__input-box"],"mb-3")}),h&&"Result is : ".concat(h),(0,a.jsx)("div",{className:d()(eH()["thermodynamics-unit-conversion__unit-conversion-div"]),children:c&&x()(c,(e,l)=>(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,onClick:()=>{var l;let n;return l=null==e?void 0:e.PRIMARY_ABBREVIATION,void((n={tab:null==s?void 0:s.tab,unit:null==s?void 0:s.unit}).unit=l,u(n))},children:(0,a.jsx)(eI.A,{name:"unit_name_".concat(e.UNIT_ID),isChecked:(null==s?void 0:s.unit)===(null==e?void 0:e.PRIMARY_ABBREVIATION),label:null==e?void 0:e.PRIMARY_ABBREVIATION,sanitizeHTMLOption:ev.rj})})},l))}),(0,a.jsxs)("div",{className:d()(eH()["thermodynamics-unit-conversion__footer-btn"],"mt-12"),children:[(0,a.jsx)(eb.A,{onClick:()=>n(),className:d()("primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:"Cancel"})}),(0,a.jsx)(eb.A,{id:"submit",onClick:()=>(e=>{if(m()(b)||m()(e.unit))return!1;i(e);let l=new eU.U;return x()(c,n=>
1{if((null==n?void 0:n.PRIMARY_ABBREVIATION)===e.unit){let e={NAME:null==n?void 0:n.PRIMARY_ABBREVIATION,UNIT_ID:null==n?void 0:n.UNIT_ID,CONVERSION_FACTOR:null==n?void 0:n.CONVERSION_FACTOR_FROM_PREFERRED,CONVERSION_OFFSET:null==n?void 0:n.CONVERSION_OFFSET_FROM_PREFERRED,REVERSE_CONVERSION_FACTOR:null==n?void 0:n.CONVERSION_FACTOR_TO_PREFERRED,REVERSE_CONVERSION_OFFSET:null==n?void 0:n.CONVERSION_OFFSET_TO_PREFERRED};_(l.getConvertedValues(b,e))}}),!1})(s),className:d()("primary mb-4 ml-2"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:"OK"})})]})]})})})},eq=e=>{let{tableFlashResults:l,selectedProperties:n}=e,[t,o]=(0,r.useState)(!1),[i,s]=(0,r.useState)(er);return(0,a.jsxs)("div",{id:"search-links-container",className:d()(eE()["header-alignment"],"search-links flex items-center"),children:[(0,a.jsx)(eS.A,{label:"",saveParameters:{REPRESENTATION_TYPE:"",CONTENT_NAME:"",CONTENT_ID:""},itemParams:null,isSaved:null}),(0,a.jsx)(ey.A,{representationType:null,id:"share-query",label:" "}),(0,a.jsx)(ex.A,{id:"export_button",buttonName:"Download/Export",classname:eE()["export-button-thermo"],tooltipClassName:eT()["tooltip-content-thermo-export"],content:(0,a.jsx)(ew,{onCsvClick:()=>{let e,t,o,i,s,a,r,u,d,c,p,h=(e=[],t=["Compound 1",""],o=["Compound 2",""],i=["Temperature","K"],s=["Pressure","kPa"],a=["Model/Flash Engine",""],r=["Properties","Units"],u={},d={},c=[],C()(l,e=>{var l,p,h,_,v,x,y,b,j,f,N,T,A,S,R,E,C,P,w;t.push((null==e||null==(h=e.mixture)||null==(p=h.compounds)||null==(l=p[0])?void 0:l.name)||"","".concat((null==e||null==(v=e.mixture)||null==(_=v.condition)?void 0:_.mixingRatioValue)||100,"%"),""),(null==e||null==(b=e.mixture)||null==(y=b.compounds)||null==(x=y[1])?void 0:x.name)?o.push((null==e||null==(C=e.mixture)||null==(E=C.compounds)||null==(R=E[1])?void 0:R.name)||"","".concat(100-Number((null==e||null==(w=e.mixture)||null==(P=w.condition)?void 0:P.mixingRatioValue)||0),"%"),""):o.push("","",""),i.push("",(null==e||null==(N=e.mixture)||null==(f=N.condition)||null==(j=f.temperature)?void 0:j.toString())||"",""),s.push("",(null==e||null==(S=e.mixture)||null==(A=S.condition)||null==(T=A.pressure)?void 0:T.toString())||"",""),a.push("",(null==e?void 0:e.flashEngine)||"",""),r.push("Model","Value","Uncertainty"),g()(null==e?void 0:e.fractions,(e,l)=>{let n=l||"";m()(u[n])&&(u[n]={}),g()(null==e?void 0:e.compoundValues,(e,l)=>{V()(c,l)||c.push(l)})}),g()(null==e?void 0:e.properties,(e,l)=>{n.has(l)&&g()(null==e?void 0:e.models,(e,n)=>{let t=(null==e?void 0:e.phaseName)||"";m()(d[t])&&(d[t]={});let o="".concat(l,"|").concat(n);
1m()(d[t][o])&&(d[t][o]=new Set)})})}),e.push(t),e.push(o),e.push(i),e.push(s),e.push(a),e.push(r),p={},g()(u,(e,l)=>{m()(p[l])&&(p[l]=new Set),g()(c,e=>{m()(p[l][e])&&(p[l][e]=new Set)})}),g()(p,(n,t)=>{let o=["".concat(t," FRACTION"),"%"],i=new Set;C()(l,e=>{let l=!1;g()(null==e?void 0:e.fractions,(e,n)=>{if(n===t){let n=1>=Number(null==e?void 0:e.value)?b()(100*parseFloat(null==e?void 0:e.value),3).toString():b()(parseFloat(null==e?void 0:e.value),3).toString();o.push("",(null==n?void 0:n.toString())||"",""),l=!0}}),l||o.push("","","")}),e.push(o),g()(n,(e,n)=>{m()(i[n])&&(i[n]=[n,"%"]),C()(l,e=>{let l=!1;g()(null==e?void 0:e.fractions,(e,o)=>{o===t&&g()(null==e?void 0:e.compoundValues,(e,t)=>{if(n===t){l=!0;let t=1>=Number(e)?b()(100*parseFloat(e),3).toString():b()(parseFloat(e),3).toString();i[n].push("",t||"","")}})}),l||i[n].push("","","")})}),g()(i,l=>{e.push(l)})}),g()(d,(n,t)=>{let o,i,s=(o=Object.keys(n).sort(),i={},g()(o,e=>{i[e]=new Set}),i),a=["".concat(t," PHASE"),"Units"],r=new Set;C()(l,e=>{a.push("Model","Value","Uncertainty"),g()(s,(l,n)=>{let o=!1;g()(null==e?void 0:e.properties,(e,l)=>{if(m()(r[n])){let e=null==n?void 0:n.split("|"),l=m()(null==e?void 0:e[0])?"":null==e?void 0:e[0];r[n]=[l||"",""]}g()(null==e?void 0:e.models,(i,s)=>{let a="".concat(l,"|").concat(s);if(a===n&&(null==i?void 0:i.phaseName)===t){o=!0;let l=null==i?void 0:i.uncertainty,n=ee(null==i?void 0:i.value,l);r[a][1]=null==e?void 0:e.unitName,r[a].push(s||"",n||"",l||"")}})}),o||r[n].push("","","")})}),e.push(a),g()(r,l=>{e.push(l)})}),e);(0,eA.eZ)(h,"thermodynamic_result")},onExcelClick:()=>null})}),(0,a.jsx)(ef,{className:eE()["unit-converter-button-thermo"],onClick:()=>{o(!0)}}),t&&(0,a.jsx)(eK,{selectedUnitConversionTab:i,setUnitConversionTab:s,isOpen:t,onClose:()=>o(!1),headerContent:"Manage Units"})]})};var eG=n(96139),ez=n.n(eG),eW=n(42816),eX=n(63415),eJ=n.n(eX),eZ=n(90701),e$=n(14431),eQ=n.n(e$);let e0=e=>{var l,n,t,o,i,s,u,c,p,h,v,y,b,j,g;let{isOpen:f,onClose:N,trcId:T}=e,[S,R]=(0,r.useState)(!0),[E,C]=(0,r.useState)();(0,r.useEffect)(()=>{(0,eB.Th)(eM.oj,e=>{if((0,em.oJ)(e)){var l;C(null==e||null==(l=e.BODY)?void 0:l.RESULTS),R(!1)}},{COMPOUND_ID:T})},[]);let P=e=>{let l=null==e?void 0:e.toString().split("."),n=m()(null==l?void 0:l[0])?"":null==l?void 0:l[0],t=m()(null==l?void 0:l[0])||m()(null==l?void 0:l[1])?"":".".concat(null==l?void 0:l[1]);return(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("span",{className:d()(eQ()["thermodynamics-compound-details__properties__left"]),children:n}),(0,a.jsx)("span",{className:d()(eQ()["thermodynamics-compound-details__properties__right"]),children:t})]})};return(0,a.jsx)(ek.Ay,{isOpen:f,onClose:()=>N(!1),className:eD()["modal-popup-compound-details"],id:"compound-details-popup",children:(0,a.jsxs)("div",{className:"ml-4",children:[S&&(0,a.jsx)("div",{className:"grid justify-self-center",children:(0,a.jsx)(ep.A,{showText:!0})}),!S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:d()(eQ()["text-label"],"p-2"),children:(null==E||null==(l=E.compounds)?void 0:l["Material or Substance Name"])||""}),(0,a.jsxs)("div",{className:d()(eQ()["thermodynamics-compound-details"],"mt-2","grid","justify-self-center"),children:[(0,a.jsxs)("div",{className:"w-full flex",children:[(0,a.jsx)("div",{className:"w-3/4",children:(0,a.jsx)("table",{className:d()(eQ()["thermodynamics-compound-details__table"],"table-auto","relative"),children:(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"CAS RN"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"]),children:(null==E||null==(n=E.compounds)?void 0:n["CAS RN"])||""})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"Molecular Formula"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"]),children:(null==E||null==(t=E.compounds)?void 0:t["molecular formula"])||""})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"SMILES"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"]),children:(null==E||null==(o=E.compounds)?void 0:o.SMILES)||""})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"InChi"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"]),children:(null==E||null==(i=E.compounds)?void 0:i.InChi)||""})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"InChiKey"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"]),children:(null==E||null==(s=E.compounds)?void 0:s.InChiKey)||""})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"Molfile"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"],"contents"),children:!m()(null==E||null==(u=E.assets)?void 0:u.MOL_FILE_PATH)&&!m()(null==E||null==(c=E.assets)?void 0:c.MOL_FILE_NAME)&&(0,a.jsxs)("span",{className:"flex",children:[(0,a.jsx)("span",{className:"pt-2 pl-2",children:"Download"}),(0,a.jsx)(eZ.A,{to:"".concat((0,_.$_)(),"/").concat(null==E||null==(p=E.assets)?void 0:p.MOL_FILE_PATH),className:"primary",onClick:e=>{e.stopPropagation()},children:(0,a.jsx)("i",{className:"kn-icon-download pl-2"})})]})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:d()(eQ()["compound-detail"]),children:"Synonyms"}),(0,a.jsx)("td",{className:d()(eQ()["compound-value"]),children:(null==E||null==(h=E.synonyms)?void 0:h.join("; "))||""})]})]})})}),(0,a.jsx)("div",{className:"w-1/4 mr-4",children:(0,a.jsx)("div",{className:d()(eQ()["item-image"]),children:!m()(null==E||null==(v=E.assets)?void 0:v.LARGE_FILE_PATH)&&!m()(null==E||null==(y=E.assets)?void 0:y.LARGE_FILE_NAME)&&(0,a.jsx)("img",{src:"".concat((0,_.$_)(),"/").concat(null==E||null==(b=E.assets)?void 0:b.LARGE_FILE_PATH),alt:null==E||null==(j=E.assets)?void 0:j.LARGE_FILE_NAME})})})]}),(0,a.jsx)("span",{className:d()(eQ()["text-label"],"mt-4","mb-3"),children:"Classification"}),(0,a.jsxs)("table",{className:d()(eQ()["thermodynamics-compound-details__properties"],"table-auto","relative"),children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:" No."}),(0,a.jsx)("th",{children:" Section "}),(0,a.jsx)("th",{children:" Class "}),(0,a.jsx)("th",{children:" Sub-Class "}),(0,a.jsx)("th",{children:" Group "})]})}
1),(0,a.jsxs)("tbody",{children:[A()(null==E?void 0:E.classification)>0&&x()(null==E?void 0:E.classification,(e,l)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:l+1}),(0,a.jsx)("td",{children:(null==e?void 0:e.SECTION)||""}),(0,a.jsx)("td",{children:(null==e?void 0:e.CLASS)||""}),(0,a.jsx)("td",{children:(null==e?void 0:e.SUB_CLASS)||""}),(0,a.jsx)("td",{children:(null==e?void 0:e.GROUP)||""})]},l)),0===A()(null==E?void 0:E.classification)&&(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:" - "}),(0,a.jsx)("td",{children:" - "}),(0,a.jsx)("td",{children:" - "}),(0,a.jsx)("td",{children:" - "}),(0,a.jsx)("td",{children:" - "})]})]})]}),(0,a.jsx)("span",{className:d()(eQ()["text-label"],"mt-4","mb-2"),children:"Properties"}),(0,a.jsxs)("table",{className:d()(eQ()["thermodynamics-compound-details__properties"],"table-auto","relative"),children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:" Property "}),(0,a.jsx)("th",{children:" Phase "}),(0,a.jsx)("th",{children:" Unit "}),(0,a.jsx)("th",{children:" Value "}),(0,a.jsx)("th",{children:" Uncertainty "})]})}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:"Molecular Weight"}),(0,a.jsx)("td",{"aria-label":"data",children:" "}),(0,a.jsx)("td",{"aria-label":"data",children:" "}),(0,a.jsx)("td",{children:P(null==E||null==(g=E.compounds)?void 0:g.MOLECULAR_WEIGHT)})]}),(null==E?void 0:E.datasets)&&x()(null==E?void 0:E.datasets,(e,l)=>{var n,t,o,i,s,r,u,d,c,p,h,_,v,y,b;let j=(null==e||null==(o=e.points)||null==(t=o[0])||null==(n=t.prop)?void 0:n.combined)?null==e||null==(r=e.points)||null==(s=r[0])||null==(i=s.prop)?void 0:i.combined:"",g=(null==e||null==(c=e.points)||null==(d=c[0])||null==(u=d.prop)?void 0:u.value)?null==e||null==(_=e.points)||null==(h=_[0])||null==(p=h.prop)?void 0:p.value:"",f=null==e||null==(v=e.constraints)?void 0:v.length;return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:null==e||null==(y=e.prop)?void 0:y.name}),(0,a.jsx)("td",{children:!m()(null==e?void 0:e.constraints)&&x()(null==e?void 0:e.constraints,(e,l)=>"".concat(null==e?void 0:e.phasename," ").concat(l<f-1?" - ":""))}),(0,a.jsx)("td",{children:null==e||null==(b=e.prop)?void 0:b.unitname}),(0,a.jsx)("td",{children:P(g)}),(0,a.jsx)("td",{children:P(j)})]},l)})]})]})]})]})]})})};var e1=n(65013),e2=n.n(e1),e4=n(28460),e3=n.n(e4),e7=n(776),e6=n(16193),e5=n.n(e6);let e9=e=>{var l,n,t,o,i;let s,{compoundIndex:u,mixture:c,setMixture:p,totalCompoundInputs:h,setTotalCompoundInputs:_,openDetailsPopUp:v,setMixtureExists:y,setSampleSearchSelect:j,compoundAutoSuggestions:g,setCompoundAutoSuggestions:f}=e,T=(0,eu.useRouter)(),[A,S]=(0,r.useState)(u+1),[R,E]=(0,r.useState)("thermodynamics_compound-".concat(u+1)),C=(0,r.useRef)(null),[P,w]=(0,r.useState)(!0),[k,O]=(0,r.useState)(""),[D,L]=(0,r.useState)(""),[I,U]=(0,r.useState)(!1),[M,B]=(0,r.useState)(""),[F,V]=(0,r.useState)(!1),[H,K]=(0,r.useState)(""),[q,G]=(0,r.useState)(!1),[z,X]=(0,r.useState)(!0);(0,r.useEffect)(()=>{var e;O((null==c||null==(e=c.compounds[u])?void 0:e.name)||"")},[null==c?void 0:c.compounds]),(0,r.useEffect)(()=>{S(u+1),E("thermodynamics_compound-".concat(u+1))},[u]),(0,r.useEffect)(()=>(X(!0),q&&(s=setTimeout(()=>Q(),1e3)),()=>s&&clearTimeout(s)),[k]),(0,r.useEffect)(()=>{var e,l,n;q?k===(null==c||null==(l=c.compounds[u])?void 0:l.name)&&O(""):""===k&&(null==c||null==(e=c.compounds[u])?void 0:e.name)&&O(null==c||null==(n=c.compounds[u])?void 0:n.name)},[q]),(0,r.useEffect)(()=>{var e,l,n;0===u?L((null==c||null==(l=c.condition)||null==(e=l.mixingRatioValue)?void 0:e.toString())||""):1===u&&L(b()(100-((null==c||null==(n=c.condition)?void 0:n.mixingRatioValue)||0),4).toString())},[null==c||null==(l=c.condition)?void 0:l.mixingRatioValue]);let J=async()=>{var e,l,n,t;let o;j(!1),O(""),(o=0===u?$(u):Z(u)).condition.temperature=null,o.condition.pressure=null,o.condition.mixingRatioValue=(null==o||null==(e=o.compounds)?void 0:e.length)===2?50:100,o.condition.mixingRatioUnit=null==(l=W[0])?void 0:l.unit,p(o),ei(T,eo.CLEAR_INPUT,o),null==C||null==(n=C.current)||n.focus(),null==C||null==(t=C.current)||t.click()}
1,Z=e=>{j(!1);let l=N()(c);return 0===e?l.compounds=[]:e3()(null==l?void 0:l.compounds,e),l},$=e=>{j(!1);let l=N()(c);return 0===e?l.compounds=[]:e3()(null==l?void 0:l.compounds,e),l.condition.mixingRatioValue=null,l.condition.mixingRatioUnit=null,e>0&&_(h-1),l},Q=()=>{var e,l;let n,t;if(M===k&&!m()(g)){U(!0),w(!1);return}B(k),0===u?(""===k||(null==k?void 0:k.length)>2)&&(n=eF,t={SEARCH:k,SOURCE:(null==c?void 0:c.dataSource)||""}):m()(null==c||null==(e=c.compounds[0])?void 0:e.trcid)||(n=eV,t={FIRSTCOMPOUND_TRCID:null==c||null==(l=c.compounds[0])?void 0:l.trcid,SEARCH:k,SOURCE:(null==c?void 0:c.dataSource)||""}),n&&(w(!0),n(e=>{if((0,em.oJ)(e)){var l,n;let t;f((n=null==e||null==(l=e.BODY)?void 0:l.COMPOUNDS,t=[],x()(n,e=>{let l=null==e?void 0:e.COMPOUND_NAME;null==t||t.push({display:l,select:l,search:null==e?void 0:e.SEARCH_STRING,id:null==e?void 0:e.TRCID,BINARY:null==e?void 0:e.BINARY,T1:null==e?void 0:e.T1,T2:null==e?void 0:e.T2,P1:null==e?void 0:e.P1,P2:null==e?void 0:e.P2})}),t)),U(!0),w(!1),X(!1)}},t))};return(0,a.jsx)("div",{id:"thermodynamics_input_compound-".concat(A),className:d()(e5()["thermodynamic-compound-input__substance-div"],{[e5()["thermodynamic-compound-input__initial-div"]]:1===h}),onBlur:e=>{(0,eW.w1)(e)&&U(!1)},children:(0,a.jsxs)("div",{className:"w-full flex",tabIndex:0,children:[(0,a.jsx)("div",{className:"w-40 mt-4",children:(0,a.jsx)("label",{htmlFor:R,className:"pl-2 pb-4",children:"Compound ".concat(A)})}),(0,a.jsx)("div",{className:d()("w-1/2"),children:(0,a.jsxs)("div",{className:d()("relative ml-4 mr-2"),children:[(null==c||null==(n=c.compounds[u])?void 0:n.trcid)&&(0,a.jsx)("div",{className:d()(e5()["thermodynamic-compound-input__details-btn"]),children:(0,a.jsx)(eb.A,{id:"details-popup".concat(A),onClick:()=>{var e,l,n;v(null==c||null==(e=c.compounds[u])?void 0:e.trcid),n=null==c||null==(l=c.compounds[u])?void 0:l.name,(0,Y.py)((0,Y.oj)(T),{search:{facets:[{name:"operation",values:["details"]},{name:"compound",values:[n]}]}},Y.Rm.SEARCH_RESULTS_UPDATED)},className:d()("primary"),styleAsLink:!0,children:(0,a.jsx)("i",{className:"kn-icon-more-info"})})}),(0,a.jsx)("input",{onClick:Q,placeholder:null==c||null==(t=c.compounds[u])?void 0:t.name,onChange:e=>{var l;return O(null==e||null==(l=e.target)?void 0:l.value)},id:R,name:R,className:d()(e5()["thermodynamic-compound-input__input-text"],"w-full"),onKeyDown:e=>{var l,n;n=null==(l=(0,eW.ZP)(e))?void 0:l.code,V(!F),K(n)},autoComplete:"off",onBlur:()=>G(!1),onFocus:()=>G(!0),value:k,ref:C}),(0,a.jsx)("span",{className:d()(e5()["thermodynamic-compound-input__input__clear"],{[e5()["thermodynamic-compound-input__input__clear-btn"]]:m()(k)}),children:(0,a.jsx)("i",{className:d()({"kn-icon-close":null==c?void 0:c.compounds[u]}),onClick:()=>J(),onKeyPress:()=>J(),role:"button",tabIndex:0,"aria-label":"toggle"})}),I&&(0,a.jsx)("span",{className:d()(e5()["thermodynamic-compound-input__compound-dropdown"]),children:(0,a.jsx)(e7.A,{listItems:g,inputVal:z?"":k,onSelect:e=>{var l,n;j(!1);let t=e2()(g,["select",e]);if(!t)return;let o=N()(c);0===u&&("1"===t.BINARY?(2===h&&(o=Z(1)),y(!0)):(2===h&&(o=$(1)),y(!1))),o.compounds[u]={name:null==t?void 0:t.select,trcid:null==t?void 0:t.id,isBinary:0===u&&(null==t?void 0:t.BINARY)==="1",T1:null==t?void 0:t.T1,T2:null==t?void 0:t.T2,P1:null==t?void 0:t.P1,P2:null==t?void 0:t.P2},o.condition.temperature=null,o.condition.pressure=null,o.condition.mixingRatioValue=2===h?50:100,o.condition.mixingRatioUnit=null==(l=W[0])?void 0:l.unit,p(o),ei(T,eo.SELECT_COMPOUND,o),O(e),U(!1),null==C||null==(n=C.current)||n.blur()},keyCode:H,keyPress:F,isLoading:P,uiSearch:!1,highLightSearch:!0})})]})}),h>1&&(0,a.jsxs)("div",{className:d()("w-1/4"),children:[0===u&&(null==c||null==(o=c.compounds)?void 0:o.length)===1&&(0,a.jsx)("span",{className:d()(e5()["thermodynamic-compound-input__compound-property"],"mt-2"),children:D}),0===u&&(null==c||null==(i=c.compounds)?void 0:i.length)>1&&(0,a.jsx)("input",{onChange:e=>{var l,n;j(!1);let t=null==e||null==(l=e.target)?void 0:l.value;if("."===t[t.length-1])return void L(t);let o=Number(null==e||null==(n=e.target)?void 0:n.value);if(o<100&&o>0){let e=N()(c);e.condition.mixingRatioValue=o,p(e),ei(T,eo.UPDATE_MIXING_RATIO,e)}},id:"thermodynamic_mixing_ratio-".concat(A),name:"thermodynamic_mixing_ratio-".concat(A),size:4,className:d()(e5()["thermodynamic-compound-input__input-compound-range"]),autoComplete:"off",value:D,maxLength:7}),u>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:d()(e5()["thermodynamic-compound-input__compound-property"],"mt-2"),children:D}),(0,a.jsx)(eb.A,{id:"remove_compound_input",onClick:()=>{j(!1);let e=$(u);p(e),ei(T,eo.REMOVE_COMPOUND,e)},className:d()("primary mb-4"),styleAsLink:!0,children:(0,a.jsx)("i",{className:d()("kn-icon-trash","ml-3 pb-2")})})]})]})]})})},e8=e=>{let{mixture:l,setMixture:n,setMixtureExists:t,totalCompoundInputs:o,setTotalCompoundInputs:i,setSampleSearchSelect:s,compoundAutoSuggestions:u,setCompoundAutoSuggestions:d}=e,[c,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),_=e=>{m(!c),h(e)};return(0,a.jsxs)("div",{id:"thermodynamics-dynamic-compound-inputs",children:[x()(eJ()(0,o),e=>(0,a.jsx)(e9,{compoundIndex:e,mixture:l,setMixture:n,totalCompoundInputs:o,setTotalCompoundInputs:i,openDetailsPopUp:_,setMixtureExists:t,setSampleSearchSelect:s,compoundAutoSuggestions:u,setCompoundAutoSuggestions:d},e)),c&&(0,a.jsx)(e0,{isOpen:c,onClose:m,trcId:p})]})};var le=n(70994),ll=n.n(le),ln=n(2878),lt=n.n(ln);let lo=e=>{let{handleBlur:l,onClose:n,selectedMixingRatioIndex:t,handleMixingRatioSelection:o}=e;return(0,a.jsxs)("div",{id:"thermodynamics_molar_dialog",className:d()(lt()["thermo-molar-dialog"],"active"),onBlur:l,tabIndex:0,children:[(0,a.jsxs)("div",{className:lt()["unit-popup-header"],children:[(0,a.jsx)("span",{className:lt()["unit-popup-label"],children:"Percentage Units"}),(0,a.jsx)(eb.A,{id:"molar_dialog_close",className:lt()["unit-popup-close-icon"],onClick:()=>n(),children:(0,a.jsx)("i",{className:"kn-icon-close"})})]}),(0,a.jsx)("div",{className:lt()["unit-popup-container"],children:x()(W,(e,l)=>(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{id:"mixing_ratio_calculationtype_".concat(l),styleAsLink:!0,onClick:()=>o(l),children:(0,a.jsx)(eI.A,{name:"thermo-percentage-unit",isChecked:l===t,label:"".concat(null==e?void 0:e.name," fraction")})})},l))})]})},li=e=>{var l;let{mixture:n,setMixture:t,isUpdatedHistory:o,isMixtureExists:i,setMixtureExists:s,totalCompoundInputs:u,setTotalCompoundInputs:c,setSampleSearchSelect:p,compoundAutoSuggestions:h,setCompoundAutoSuggestions:_}=e,v=(0,eu.useRouter)(),[x,y]=(0,r.useState)(!1),[b,j]=(0,r.useState)(0);return(0,r.useEffect)(()=>{var e;let l=N()(n);l.condition.mixingRatioUnit=null==(e=W[b])?void 0:e.unit,t(l),ei(v,eo.UPDATE_MIXING_RATIO_UNIT,l)},[b]),(0,r.useEffect)(()=>{var e;(null==n||null==(e=n.compounds)?void 0:e.length)===0&&(c(1),s(!1))},[n]),(0,r.useEffect)(()=>{var e,l,t,o,i,a;(null==n||null==(e=n.compounds)?void 0:e.length)===0||(null==n||null==(l=n.compounds)?void 0:l.length)===1?(c(1),s(!!((null==n||null==(o=n.compounds)?void 0:o.length)===1&&(null==n||null==(a=n.compounds)||null==(i=a[0])?void 0:i.isBinary)))):(null==n||null==(t=n.compounds)?void 0:t.length)===2&&(c(2),s(!0))},[o]),(0,a.jsxs)("div",{children:[u>1&&(0,a.jsx)("div",{className:d()(ll()["thermodynamic-substance-input__substance-molar-div"],""),children:(0,a.jsxs)(eb.A,{id:"molar_bt
1n",onClick:()=>y(!0),className:d()("primary mb-4"),styleAsLink:!0,children:[(0,a.jsx)(eL.A,{value:"% ".concat(null==(l=W[b])?void 0:l.name)}),(0,a.jsx)("i",{className:d()(ll()["thermodynamic-substance-input__kn-icon-arrow-size"],{"kn-icon-arrow-large-up":x,"kn-icon-arrow-large-down":!x},"ml-3 pb-2")})]})}),(0,a.jsx)(e8,{mixture:n,setMixture:t,setMixtureExists:s,totalCompoundInputs:u,setTotalCompoundInputs:c,setSampleSearchSelect:p,compoundAutoSuggestions:h,setCompoundAutoSuggestions:_}),u<2&&!m()(null==n?void 0:n.compounds[0])&&i&&(0,a.jsx)("div",{className:d()(ll()["thermodynamic-substance-input__substance-div"],""),children:(0,a.jsx)(eb.A,{id:"add_substance_btn",onClick:()=>{var e;c(u+1);let l=N()(n);l.condition.mixingRatioValue=100,l.condition.mixingRatioUnit=null==(e=W[b])?void 0:e.unit,t(l)},className:d()("primary mb-4"),styleAsLink:!0,children:(0,a.jsx)(eL.A,{value:"+ Add a Substance"})})}),x&&(0,a.jsx)(lo,{selectedMixingRatioIndex:b,handleMixingRatioSelection:e=>{j(e),y(!x)},handleBlur:e=>{(0,eW.w1)(e)&&y(!1)},onClose:()=>y(!1)})]})};var ls=n(70670),la=n.n(ls),lr=n(20624),lu=n.n(lr),ld=n(85740),lc=n.n(ld),lm=n(52782),lp=n.n(lm),lh=n(70814),l_=n.n(lh);let lv=e=>{let{handleBlur:l,onClose:n,handleSelectHistory:t}=e,o=(0,eh.Ml)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.COMPOUND_PROPERTIES);return(0,a.jsxs)("div",{id:"thermo-condition-history-modal",className:d()(l_()["thermo-condition-history-dialog"],"active"),onBlur:l,tabIndex:0,children:[(0,a.jsx)("div",{className:d()(l_()["popup-header"],"text-right pr-4"),children:(0,a.jsx)(eb.A,{className:l_()["popup-close-icon"],onClick:()=>n(!1),children:(0,a.jsx)("i",{className:"kn-icon-close"})})}),(0,a.jsx)("div",{className:d()(l_()["popup-container"],"mt-5"),children:(0,a.jsx)("table",{children:(0,a.jsx)("tbody",{children:(null==o?void 0:o.length)===0||m()(o)?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{className:l_()["td-center"],children:"No history found."})}):x()(o,(e,l)=>{let n=lp()(null==e?void 0:e.mixingRatioValue),i=lp()(n<100?100-n:"");return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:l+1}),(0,a.jsxs)("td",{children:[(0,a.jsx)("div",{children:"".concat(n,"%")}),i>0&&(0,a.jsx)("div",{className:"pt-4",children:"".concat(i,"%")})]}),(0,a.jsxs)("td",{children:[(0,a.jsx)("div",{children:null==e?void 0:e.compound1}),!m()(null==e?void 0:e.compound2)&&(0,a.jsx)("div",{className:"pt-4",children:null==e?void 0:e.compound2})]}),(0,a.jsxs)("td",{children:[null==e?void 0:e.temperature," ",null==e?void 0:e.temperatureUnit]}),(0,a.jsxs)("td",{children:[null==e?void 0:e.pressure," ",null==e?void 0:e.pressureUnit]}),(0,a.jsx)("td",{children:null==e?void 0:e.flashEngine}),(0,a.jsx)("td",{children:(0,a.jsx)(eb.A,{id:"thermo-history-select_".concat(l),className:d()("primary ml-4 mb-4"),styleAsLink:!0,onClick:()=>(e=>{var l;if((null==(l=Object.keys(null==o?void 0:o[e]))?void 0:l.length)>0){let l=null==o?void 0:o[e];null==o||o.splice(e,1),o=[l,...o],(0,eh.dL)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.COMPOUND_PROPERTIES,o),t(l)}})(l),children:(0,a.jsx)(eL.A,{value:"Select"})})})]},l)})})})})]})};var lx=n(96652),ly=n.n(lx);let lb=e=>{let{isOpen:l,onClose:n,headerContent:t}=e,[o,i]=(0,r.useState)(G);return(0,a.jsx)(ek.Ay,{isDraggable:!0,isOpen:l,onClose:()=>n(),headerContent:t,className:eD()["modal-popup-thermodynamic-property-unit"],headlineClass:"headline-class",subClass:eD()["modal-popup-thermodynamic-property-unit__temperature-alignment"],children:(0,a.jsxs)("div",{children:[(0,a.jsx)(eb.A,{onClick:()=>i(G),className:d()(ly()["thermodynamics-temperature__metric-btn"],o===G?ly()["thermodynamics-temperature__selected-btn"]:ly()["thermodynamics-temperature__unselected-btn"],"primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:G})}),(0,a.jsx)(eb.A,{onClick:()=>i(q),className:d()(ly()["thermodynamics-temperature__metric-btn"],o===q?ly()["thermodynamics-temperature__selected-btn"]:ly()["thermodynamics-temperature__unselected-btn"],"primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:q})}),(0,a.jsxs)("div",{className:d()(ly()["thermodynamics-temperature__temperature-div"],{[ly()["thermodynamics-temperature__hide"]]:o!==G}),children:[(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"temperature-metric",isChecked:!0,label:"\xb0C"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"temperature-metric",isChecked:!1,label:"K"})})})]}),(0,a.jsxs)("div",{className:d()(ly()["thermodynamics-temperature__temperature-div"],{[ly()["thermodynamics-temperature__hide"]]:o!==q}),children:[(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"temperature-us-customary",isChecked:!1,label:"\xb0F"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"temperature-us-customary",isChecked:!1,label:"\xb0R"})})})]}),(0,a.jsxs)("div",{className:d()(ly()["thermodynamics-temperature__footer-btn"],"mt-12"),children:[(0,a.jsx)(eb.A,{onClick:()=>n(),className:d()("primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:"Cancel"})}),(0,a.jsx)(eb.A,{className:d()("primary mb-4 ml-2"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:"OK"})})]})]})})};var lj=n(89655),lg=n.n(lj);let lf=e=>{let{isOpen:l,onClose:n,headerContent:t}=e,[o,i]=(0,r.useState)(q);return(0,a.jsx)(ek.Ay,{isDraggable:!0,isOpen:l,onClose:()=>n(),headerContent:t,className:eD()["modal-popup-thermodynamic-property-unit"],headlineClass:"headline-class",subClass:eD()["modal-popup-thermodynamic-property-unit__pressure-alignment"],children:(0,a.jsxs)("div",{children:[(0,a.jsx)(eb.A,{onClick:()=>i(q),className:d()(lg()["thermodynamics-pressure__metric-btn"],o===q?lg()["thermodynamics-pressure__selected-btn"]:lg()["thermodynamics-pressure__unselected-btn"],"primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:q})}),(0,a.jsx)(eb.A,{onClick:()=>i(G),className:d()(lg()["thermodynamics-pressure__metric-btn"],o===G?lg()["thermodynamics-pressure__selected-btn"]:lg()["thermodynamics-pressure__unselected-btn"],"primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:G})}),(0,a.jsxs)("div",{className:d()(lg()["thermodynamics-pressure__pressure-div"],{[lg()["thermodynamics-pressure__hide"]]:o!==q}),children:[(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-us-customary",isChecked:!1,label:"atm"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-us-customary",isChecked:!1,label:"ksi"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-us-customary",isChecked:!1,label:"psf"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-us-customary",isChecked:!1,label:"psi(a)"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-us-customary",isChecked:!1,label:"psi(g)"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-us-customary",isChecked:!1,label:"WC ft"})})})]}),(0,a.jsxs)("div",{className:d()(lg()["thermodynamics-pressure__pressure-div"],{[lg()["thermodynamics-pressure__hide"]]:o!==G}),children:[(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-metric",isChecked:!0,label:"bar"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-metric",isChecked:!1,label:"hPa"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-metric",isChecked:!1,label:"kbar"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-metric",isChecked:!1,label:"kPa"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-metric",isChecked:!1,label:"mbar"})})}),(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{styleAsLink:!0,children:(0,a.jsx)(eI.A,{name:"pressure-metric",isChecked:!1,label:"mm Hg"})})})]}),(0,a.jsxs)("div",{className:d()(lg()["thermodynamics-pressure__footer-btn"],"mt-12"),children:[(0,a.jsx)(eb.A,{onClick:()=>n(),className:d()("primary mb-4"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:"Cancel"})}),(0,a.jsx)(eb.A,{className:d()("primary mb-4 ml-2"),styleAsLink:!1,children:(0,a.jsx)(eL.A,{value:"OK"})})]})]})})};var lN=n(78729),lT=n.n(lN);let lA=e=>{var l,n,t,o,i,s,u,c,p,h;let{mixture:_,setMixture:v,isMixtureExists:x,setSampleSearchSelect:y}=e,b=(0,eu.useRouter)(),[j,g]=(0,r.useState)((null==_?void 0:_.type)||"");(0,r.useEffect)(()=>{g(null==_?void 0:_.type)},[null==_?void 0:_.type]);let f=(e,l)=>(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{id:"calculate_type_".concat(e),styleAsLink:!0,onClick:()=>{let l;return y(!1),void((l=N()(_)).type=e,l.condition.temperature=null,l.condition.pressure=null,v(l),ei(b,eo.UPDATE_CALCULATION_TYPE,l))},children:(0,a.jsx)(eI.A,{name:"thermo-calculate-type_".concat(e),isChecked:j===e,label:l})})},e);return(0,a.jsx)("div",{id:"thermodynamics_calculation_type",tabIndex:0,className:"w-1/2",children:(0,a.jsxs)("div",{className:d()(lT()["thermodynamics-calculation-type__main"]),children:[(!x||m()(null==_?void 0:_.compounds[1]))&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-60",children:f(null==$||null==(l=$.bubble_dew)?void 0:l.value,null==$||null==(n=$.bubble_dew)?void 0:n.label)}),(0,a.jsx)("div",{className:"w-60",children:f(null==$||null==(t=$.point)?void 0:t.value,null==$||null==(o=$.point)?void 0:o.label)})]}),x&&!m()(null==_?void 0:_.compounds[1])&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-60",children:f(null==$||null==(i=$.bubble)?void 0:i.value,
1null==$||null==(s=$.bubble)?void 0:s.label)}),(0,a.jsx)("div",{className:"w-52",children:f(null==$||null==(u=$.dew)?void 0:u.value,null==$||null==(c=$.dew)?void 0:c.label)}),(0,a.jsx)("div",{className:"w-72",children:f(null==$||null==(p=$.flash)?void 0:p.value,null==$||null==(h=$.flash)?void 0:h.label)})]})]})})},lS=e=>{var l,n,t,o,i,s,u,c,p,h,_,v,x,y,b,j,g,f;let{mixture:T,setMixture:A,handleCalculation:S,clearAll:R,handleSelectHistory:E,isMixtureExists:C,setSampleSearchSelect:P}=e,w=(0,eu.useRouter)(),[k,D]=(0,r.useState)(!1),[L,I]=(0,r.useState)(!1),[U,M]=(0,r.useState)(!1),[B,F]=(0,r.useState)(""),[V,Y]=(0,r.useState)({temperature:!1,pressure:!1}),q=e=>{var l,n,t,o,i,s,a;P(!1);let r=/^-?[0-9]*\.?[0-9]*$/;if((null==r?void 0:r.test(null==e||null==(n=e.target)||null==(l=n.value)?void 0:l.trim()))||(null==e||null==(o=e.target)||null==(t=o.value)?void 0:t.trim())===""){let l=null==e||null==(s=e.target)||null==(i=s.value)?void 0:i.trim(),n=null==e||null==(a=e.target)?void 0:a.name,t=N()(T);t.condition[n]=l,A(t),Y({temperature:!1,pressure:!1})}};(0,r.useEffect)(()=>{var e,l;let n=N()(V);m()(null==T||null==(e=T.condition)?void 0:e.temperature)&&(n.temperature=!1),m()(null==T||null==(l=T.condition)?void 0:l.pressure)&&(n.pressure=!1),Y(n)},[null==T||null==(l=T.condition)?void 0:l.temperature,null==T||null==(n=T.condition)?void 0:n.pressure]);let G=e=>{var l;F(""),(null==T||null==(l=T.condition)?void 0:l[e])&&ei(w,e===H?eo.UPDATE_TEMPERATURE:eo.UPDATE_PRESSURE,T)},z=(null==T?void 0:T.type)!==(null==$||null==(t=$.flash)?void 0:t.value)&&!m()(null==T||null==(i=T.condition)||null==(o=i.pressure)?void 0:o.toString()),W=(null==T?void 0:T.type)!==(null==$||null==(s=$.flash)?void 0:s.value)&&!m()(null==T||null==(c=T.condition)||null==(u=c.temperature)?void 0:u.toString()),Z=!m()(null==T?void 0:T.compounds)&&((null==T?void 0:T.type)===(null==$||null==(p=$.flash)?void 0:p.value)&&!O()(null==T||null==(h=T.condition)?void 0:h.temperature)&&!O()(null==T||null==(_=T.condition)?void 0:_.pressure)||(null==T?void 0:T.type)!==(null==$||null==(v=$.flash)?void 0:v.value)&&(!O()(null==T||null==(x=T.condition)?void 0:x.temperature)||!O()(null==T||null==(y=T.condition)?void 0:y.pressure)))&&!(null==V?void 0:V.temperature)&&!(null==V?void 0:V.pressure);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex w-full",children:(0,a.jsx)(lA,{mixture:T,setMixture:A,isMixtureExists:C,setSampleSearchSelect:P})}),(0,a.jsxs)("div",{className:d()(lc()["thermodynamics-compound-props__compound-alignment"]),children:[(0,a.jsxs)("div",{className:d()(lc()["thermodynamics-compound-props__compound-div"]),children:[(0,a.jsxs)("div",{className:d()(lc()["thermodynamics-compound-props__temp-div"],""),children:[(0,a.jsx)("label",{htmlFor:"thermo_cmp_temperature",className:"pl-2 pb-4",children:"Temperature"}),(0,a.jsx)("input",{onBlur:()=>G(H),onChange:q,onFocus:()=>F(H),maxLength:8,name:H,id:"thermo_cmp_temperature",disabled:!!z,size:4,autoComplete:"off",className:d()(lc()["thermodynamics-compound-props__input-text"],{[lc()["thermodynamics-compound-props__error"]]:null==V?void 0:V.temperature,[lc()["thermodynamics-compound-props__input-text__disable"]]:z}),value:(null==T||null==(j=T.condition)||null==(b=j.temperature)?void 0:b.toString())||""}),(0,a.jsxs)(eb.A,{onClick:()=>I(!1),className:d()(lc()["thermodynamics-compound-props__btn-size-kps"],"primary ml-2 mb-4"),styleAsLink:!0,children:[(0,a.jsx)(eL.A,{value:"K"}),(0,a.jsx)("i",{className:d()(lc()["thermodynamics-compound-props__kn-icon-arrow-size"],{"kn-icon-arrow-large-up":L,"kn-icon-arrow-large-down":!L},"ml-2 pb-2","hidden")})]})]}),(0,a.jsxs)("div",{className:d()(lc()["thermodynamics-compound-props__unit-note"],"mb-4"),children:[(0,a.jsx)("span",{id:"temperature-range",children:(null==V?void 0:V.temperature)||B!==H?"":(()=>{var e,l,n,t,o,i,s,a,r,u,d,c,p,h,_,v,x,y;if(!m()(null==T||null==(l=T.compounds)||null==(e=l[1])?void 0:e.trcid.toString())||!m()(null==T||null==(t=T.compounds)||null==(n=t[0])?void 0:n.trcid.toString())){let e=0,l=0;m()(null==T||null==(i=T.compounds)||null==(o=i[1])?void 0:o.trcid.toString())?(e=Number(null==T||null==(v=T.compounds)||null==(_=v[0])?void 0:_.T1)||0,l=Number(null==T||null==(y=T.compounds)||null==(x=y[0])?void 0:x.T2)||0):(e=lu()([Number(null==T||null==(a=T.compounds)||null==(s=a[0])?void 0:s.T1)||0,Number(null==T||null==(u=T.compounds)||null==(r=u[1])?void 0:r.T1)||0]),l=la()([Number(null==T||null==(c=T.compounds)||null==(d=c[0])?void 0:d.T2)||0,Number(null==T||null==(h=T.compounds)||null==(p=h[
11])?void 0:p.T2)||0]));let n=la()([e,l]),t=lu()([e,l]);return X.minimum=n,X.maximum=t,"suggested range: ".concat(0===t?"":n,"-").concat(0===t?"":t)}return"suggested range: -"})()}),(0,a.jsx)("span",{className:d()(lc()["thermodynamics-compound-props__error-text"],"mb-4"),children:(null==V?void 0:V.temperature)?"Enter valid Temperature range":""})]}),L&&(0,a.jsx)(lb,{isOpen:L,onClose:()=>I(!1),headerContent:"Change Units: Critical Temperature"}),(0,a.jsxs)("div",{className:d()(lc()["thermodynamics-compound-props__substance-div"],lc()["thermodynamics-compound-props__temp-div"],""),children:[(0,a.jsx)("label",{htmlFor:"thermo_cmp_pressure",className:"pl-2 pb-4",children:"Pressure"}),(0,a.jsx)("input",{onFocus:()=>F(K),onBlur:()=>G(K),onChange:q,maxLength:8,name:K,id:"thermo_cmp_pressure",disabled:!!W,size:4,autoComplete:"off",className:d()(lc()["thermodynamics-compound-props__input-text"],{[lc()["thermodynamics-compound-props__error"]]:null==V?void 0:V.pressure,[lc()["thermodynamics-compound-props__input-text__disable"]]:W}),value:(null==T||null==(f=T.condition)||null==(g=f.pressure)?void 0:g.toString())||""}),(0,a.jsxs)(eb.A,{onClick:()=>M(!1),className:d()(lc()["thermodynamics-compound-props__btn-size-kps"],"primary ml-2 mb-4"),styleAsLink:!0,children:[(0,a.jsx)(eL.A,{value:"kPa"}),(0,a.jsx)("i",{className:d()(lc()["thermodynamics-compound-props__kn-icon-arrow-size"],{"kn-icon-arrow-large-up":U,"kn-icon-arrow-large-down":!U},"ml-3 pb-2","hidden")})]})]}),(0,a.jsxs)("div",{className:d()(lc()["thermodynamics-compound-props__unit-note"],"mb-4"),children:[(0,a.jsx)("span",{children:(null==V?void 0:V.pressure)||B!==K?"":(()=>{var e,l,n,t,o,i,s,a,r,u,d,c,p,h,_,v,x,y;if(!m()(null==T||null==(l=T.compounds)||null==(e=l[1])?void 0:e.trcid.toString())||!m()(null==T||null==(t=T.compounds)||null==(n=t[0])?void 0:n.trcid.toString())){let e=0,l=0;m()(null==T||null==(i=T.compounds)||null==(o=i[1])?void 0:o.trcid.toString())?(e=Number(null==T||null==(v=T.compounds)||null==(_=v[0])?void 0:_.P1)||0,l=Number(null==T||null==(y=T.compounds)||null==(x=y[0])?void 0:x.P2)||0):(e=lu()([Number(null==T||null==(a=T.compounds)||null==(s=a[0])?void 0:s.P1)||0,Number(null==T||null==(u=T.compounds)||null==(r=u[1])?void 0:r.P1)||0]),l=la()([Number(null==T||null==(c=T.compounds)||null==(d=c[0])?void 0:d.P2)||0,Number(null==T||null==(h=T.compounds)||null==(p=h[1])?void 0:p.P2)||0]));let n=la()([e,l]),t=lu()([e,l]);return J.minimum=n,J.maximum=t,"suggested range: ".concat(0===t?"":n,"-").concat(0===t?"":t)}return"suggested range: -"})()}),(0,a.jsx)("span",{className:d()(lc()["thermodynamics-compound-props__error-text"],"mb-4"),children:(null==V?void 0:V.pressure)?"Enter valid Pressure range":""})]}),U&&(0,a.jsx)(lf,{isOpen:U,onClose:()=>M(!1),headerContent:"Change Units: Critical Pressure"})]}),(0,a.jsxs)("div",{className:"mt-2 w-1/3",children:[(0,a.jsx)("div",{className:d()(lc()["thermodynamics-compound-props__calculate-div"]),children:(0,a.jsx)(eb.A,{className:d()("thermodynamics-compound-props__calculate-btn primary mb-4 w-full",{disabled:!Z}),styleAsLink:!1,onClick:S,children:(0,a.jsx)(eL.A,{value:"Calculate"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-0",children:[(0,a.jsx)("div",{className:"",children:!ec()(T,Q)&&(0,a.jsx)(eb.A,{className:d()("thermodynamics-compound-props__calculate-btn primary mb-4"),styleAsLink:!0,onClick:R,children:(0,a.jsx)(eL.A,{value:"Clear All"})})}),(0,a.jsx)("div",{className:"text-right",children:(0,a.jsxs)(eb.A,{id:"thermo-history",onClick:()=>D(!0),className:d()("primary mr-4"),styleAsLink:!0,children:[(0,a.jsx)(eL.A,{value:"History"}),(0,a.jsx)("i",{className:d()(lc()["thermodynamics-compound-props__kn-icon-arrow-size"],{"kn-icon-arrow-large-up":k,"kn-icon-arrow-large-down":!k},"ml-2 pb-2")})]})})]}),k&&(0,a.jsx)(lv,{handleBlur:e=>{(0,eW.w1)(e)&&D(!1)},onClose:()=>D(!1),handleSelectHistory:e=>{E(e),D(!1)}})]})]})]})},lR=e=>{var l,n,t,o;let{mixture:i,setMixture:s,handleCalculation:u,clearAll:c,isSampleSearchSelect:p,setSampleSearchSelect:h,flashResults:_,tableFlashResults:v,compoundAutoSuggestions:x,setCompoundAutoSuggestions:y}=e,[b,j]=(0,r.useState)(!1),[g,f]=(0,r.useState)(!1),[T,A]=(0,r.useState)(1),S=(0,ev.SS)((0,eh.Ml)(eh.cY.THERMO_TOOL_DEBUG))||!1;(0,r.useEffect)(()=>{(null==i?void 0:i.compounds.length)>0&&u()},[b]),(0,r.useEffect)(()=>{p&&u()},[i,p]);let R=e=>{"Search1"===e?(s(es),f(!0),A(2)):(s(ea),f(!1),A(1)),h(!0)},E=(e,l)=>(0,a.jsx)("div",{children:(0,a.jsx)(eb.A,{id:"data_source_".concat(e),styleAsLink:!0,onClick:()=>C(e),children:(0,a.jsx)(eI.A,{name:"data_source_".concat(e),isChecked:i.dataSource===e,label:l})})},e),C=e=>{let l=N()(Q);l.dataSource=e,s(l),h(!1),y([])};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:d()(ez()["div-alignment"]),children:[(0,a.jsxs)("div",{className:d()(ez()["substance-alignment"]),children:[S&&(0,a.jsxs)("div",{className:"flex w-1/2",children:[(0,a.jsxs)("label",{htmlFor:"thermo_data_source",className:"block pt-2",children:["Source",":"]}),(0,a.jsx)("div",{className:"w-30 inline-block pl-2",children:E(null==z||null==(l=z.nist)?void 0:l.value,null==z||null==(n=z.nist)?void 0:n.label)}),(0,a.jsx)("div",{className:"w-30 inline-block pl-2",children:E(null==z||null==(t=z.cranium)?void 0:t.value,null==z||null==(o=z.cranium)?void 0:o.label)})]}),(0,a.jsx)(li,{mixture:i,setMixture:s,isUpdatedHistory:b,isMixtureExists:g,setMixtureExists:f,totalCompoundInputs:T,setTotalCompoundInputs:A,setSampleSearchSelect:h,compoundAutoSuggestions:x,setCompoundAutoSuggestions:y})]}),(0,a.jsx)("div",{className:d()(ez()["temp-alignment"]),children:(0,a.jsx)(lS,{mixture:i,setMixture:s,handleCalculation:u,clearAll:c,handleSelectHistory:e=>{var l,n,t,o,a,r,u,d,c,p,h,_,v,x,y,g,f,T;if((null==(l=Object.keys(e))?void 0:l.length)>0){s(Q);let l=N()(i),A=[];A.push({trcid:null==e?void 0:e.trcId1,name:null==e?void 0:e.compound1,isBinary:null==e?void 0:e.isBinary,T1:null==e||null==(t=e.range)||null==(n=t.compound1)?void 0:n.t1,T2:null==e||null==(a=e.range)||null==(o=a.compound1)?void 0:o.t2,P1:null==e||null==(u=e.range)||null==(r=u.compound1)?void 0:r.p1,P2:null==e||null==(c=e.range)||null==(d=c.compound1)?void 0:d.p2}),m()(null==e?void 0:e.compound2)||m()(null==e||null==(p=e.trcId2)?void 0:p.toString())||A.push({trcid:null==e?void 0:e.trcId2,name:null==e?void 0:e.compound2,T1:null==e||null==(_=e.range)||null==(h=_.compound2)?void 0:h.t1,T2:null==e||null==(x=e.range)||null==(v=x.compound2)?void 0:v.t2,P1:null==e||null==(g=e.range)||null==(y=g.compound2)?void 0:y.p1,P2:null==e||null==(T=e.range)||null==(f=T.compound2)?void 0:f.p2}),l.compounds=N()(A),l.condition.temperature=null==e?void 0:e.temperature,l.condition.pressure=null==e?void 0:e.pressure,l.condition.mixingRatioUnit=null==e?void 0:e.mixingRatioUnit,l.condition.mixingRatioValue=null==e?void 0:e.mixingRatioValue,l.type=(null==e?void 0:e.calculation_type)||(null==Q?void 0:Q.type),l.historyFlashEngine=(null==e?void 0:e.flashEngine)||"",s(l),j(!b)}},isMixtureExists:g,setSampleSearchSelect:h})})]}),(m()(_)||m()(v))&&(0,a.jsxs)("div",{id:"sample-search",className:d()(ez()["s
1ample-alignment"],"flex w-46 flex-row text-3xl justify-around ml-7 mt-7"),children:[(0,a.jsx)("div",{children:" Some sample searches to try :"}),(0,a.jsx)(eb.A,{id:"sample-search_1",onClick:()=>R("Search1"),className:d()("ml-10","primary mb-4"),styleAsLink:!0,children:(0,a.jsx)(eL.A,{value:"Heptane/Acetone "})}),(0,a.jsx)(eb.A,{id:"sample-search_2",onClick:()=>R("Search2"),className:d()("ml-4","primary mb-4"),styleAsLink:!0,children:(0,a.jsx)(eL.A,{value:" Benzene"})})]})]})};var lE=n(5173),lC=n.n(lE),lP=n(7964),lw=n(1688),lk=n.n(lw),lO=n(9351),lD=n(94229),lL=n.n(lD);let lI=e=>{let l,{propertiesList:n,isOpen:t,onClose:o,handleSelectedProperties:i,propertiesToDisplay:s}=e,[u,c]=(0,r.useState)(s||[]),m=e=>{let l=!1;return x()(u,n=>{n===e&&(l=!0)}),l};return(0,a.jsx)("div",{children:(0,a.jsxs)(ek.Ay,{isOpen:t,onClose:o,className:d()(eD()["modal-popup-thermodynamic-compound-popup"]),children:[(0,a.jsx)("div",{className:d()(lL()["thermodynamic-property-popup__body-content"]),children:(l=x()(n.sort(),(e,l)=>(0,a.jsx)("div",{className:d()(lL()["thermodynamic-property-popup__checkbox-div"]),children:(0,a.jsxs)(eb.A,{id:"selectedProperties".concat(l),styleAsLink:!0,className:d()("w-full text-left p-2 text-2xl"),onClick:()=>((e,l)=>{let n=[...u];if(l)m(e)||(null==n||n.push(e),c(n));else{let l=null==n?void 0:n.indexOf(e);-1!==l&&(null==n||n.splice(l,1),c(n))}})(e,!m(e)),children:[(0,a.jsx)(lO.A,{id:"property_".concat(e),isChecked:m(e)}),(0,a.jsx)("span",{className:d()(lL()["thermodynamic-property-popup__checkbox-value"]),children:e})]})},l)),(0,a.jsx)("div",{className:"grid gap-1 grid-rows-6 grid-flow-col",children:l}))}),(0,a.jsx)("div",{className:d()("flex justify-end mr-10 mt-8 text-center"),children:(0,a.jsx)(eb.A,{id:"propertiesPopupSubmit",onClick:()=>{i(u)},styleAsLink:!1,className:d()(lL()["thermodynamic-property-popup__okay-btn"],"primary mb-2"),children:(0,a.jsx)("span",{className:"pl-3 text-center",children:"OK"})})})]})})};var lU=n(22372),lM=n.n(lU),lB=n(74023),lF=n.n(lB),lV=n(9675),lY=n.n(lV);let lH=e=>{let{row:l,isSubRow:n,setExperimentalDataInput:t,firstColumnWidth:o}=e,[i,s]=(0,r.useState)(l.isPhase||!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("tr",{className:d()(lY()["thermodynamics-result-table__body-row"],lY()[l.isFraction?"thermodynamics-result-table__fraction":l.isPhase?"thermodynamics-result-table__phase":l.isPhaseBoundary?"thermodynamics-result-table__phase_boundary":"thermodynamics-result-table__property"],lY()[l.isFraction?n?"thermodynamics-result-table__fraction-sub-row":"thermodynamics-result-table__fraction-row":l.isPhase?n?"thermodynamics-result-table__phase-sub-row":"thermodynamics-result-table__phase-row":l.isPhaseBoundary?n?"thermodynamics-result-table__phase_boundary-sub-row":"thermodynamics-result-table__phase_boundary-row":n?"thermodynamics-result-table__property-sub-row":"thermodynamics-result-table__property-row"]),children:x()(l.cells,(e,r)=>{let u,c;return!(null==e?void 0:e.isSkip)&&(0,a.jsxs)("td",{colSpan:2*(null!=e&&!!e.isError),className:d()({[lY().flash]:!n&&(2===r||3===r),[lY()["thermodynamics-result-table__body-row-primary-cell"]]:1===r||0===r,[lY()["thermodynamics-result-table__body-row-uncertainty-cell"]]:!m()(null==e?void 0:e.id)&&(null==e?void 0:e.id.includes("uncertainty")),[lY()["thermodynamics-result-table__body-row-error"]]:null==e?void 0:e.isError}),style:{left:1===r&&!(0,eW.yK)()&&o?"".concat(o,"px"):""},children:[l.isExpandable&&0===r?(0,a.jsx)("button",{type:"button",onClick:()=>s(!i),className:d()(i?"kn-icon-arrow-large-down":"kn-icon-arrow-large-right","mr-2"),children:(0,a.jsx)("span",{className:"sr-only",children:i?"Collapse":"Expand"})}):"",(null==e?void 0:e.experimentalDataInput)?(0,a.jsx)(eb.A,{id:null==e?void 0:e.id,className:d()("primary"),styleAsLink:!0,onClick:()=>t(null==e?void 0:e.experimentalDataInput),children:(0,a.jsx)(eL.A,{value:null==e?void 0:e.value})}):m()(null==e?void 0:e.helpURL)?null==e?void 0:e.value:(u=null==e?void 0:e.value,c=(null==e?void 0:e.helpURL)||"",(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("div",{className:"w-4/5 pr-2",children:u}),!m()(c)&&(0,a.jsx)("div",{className:"w-1/5 text-end",children:(0,a.jsx)(eZ.A,{to:c,openNewTab:!0,onClick:e=>e.stopPropagation(),children:(0,a.jsx)("i",{className:"kn-icon-more-info"})})})]}))]},null==e?void 0:e.id)})}),l.isExpandable&&i&&x()(l.subRows,(e,n)=>(0,a.jsx)(lH,{row:e,isSubRow:!l.isPhase,setExperimentalDataInput:t,firstColumnWidth:o},n))]})},lK=e=>{var l,n,t,o,i,s,u;let{tableFlashResults:c,setTableFlashResults:p,selectedProperties:h,setExperimentalDataInput:_}
1=e,[v,y]=(0,r.useState)(Z),[b,j]=(0,r.useState)(0),f=(0,r.useRef)(null);(0,r.useEffect)(()=>{y(((e,l)=>{var n,t,o;let i=N()(Z),s={},a={},r=new Set,u=new Set,d={},c=A()(e);C()(e,(e,n)=>{var t,o,p,h,_,v,x,y,b,j,f,N,T,A,S,R,E,C,P,k,D,L,I,U,M,B,F,V,Y,H,K,q,G;let z;null==i||null==(o=i.headers)||null==(t=o.calculationNumRow)||t.push({[n]:c.toString()}),null==i||null==(b=i.headers)||null==(y=b.firstCompoundRow)||y.push({["".concat(n,"_name")]:"".concat(null==e||null==(_=e.mixture)||null==(h=_.compounds)||null==(p=h[0])?void 0:p.name),["".concat(n,"_mixing_ratio")]:"".concat((null==e||null==(x=e.mixture)||null==(v=x.condition)?void 0:v.mixingRatioValue)||100,"%")}),(null==e||null==(f=e.mixture)||null==(j=f.compounds)?void 0:j[1])?null==i||null==(Y=i.headers)||null==(V=Y.secondCompoundRow)||V.push({["".concat(n,"_name")]:"".concat(null==e||null==(M=e.mixture)||null==(U=M.compounds)||null==(I=U[1])?void 0:I.name),["".concat(n,"_mixing_ratio")]:"".concat(100-Number(null==e||null==(F=e.mixture)||null==(B=F.condition)?void 0:B.mixingRatioValue),"%")}):null==i||null==(K=i.headers)||null==(H=K.secondCompoundRow)||H.push({["".concat(n,"_name")]:"",["".concat(n,"_mixing_ratio")]:""}),null==i||null==(E=i.headers)||null==(R=E.conditionRow)||R.push({["".concat(n,"_tp")]:(q=null==e||null==(T=e.mixture)||null==(N=T.condition)?void 0:N.temperature,G=null==e||null==(S=e.mixture)||null==(A=S.condition)?void 0:A.pressure,z=["@ "],O()(q)||z.push("".concat(q," ").concat("K")),O()(q)||O()(G)||z.push(", "),O()(G)||z.push("".concat(G," ").concat("kPa")),z.join(""))}),null==i||null==(P=i.headers)||null==(C=P.flashEngineRow)||C.push({[n]:"".concat(null==e?void 0:e.flashEngine,"|").concat((null==e?void 0:e.flashEngineURL)||"")}),null==i||null==(D=i.headers)||null==(k=D.propertyHeaderRow)||k.push({["".concat(n,"_value")]:"Value"},{["".concat(n,"_uncertainty")]:"Uncertainty"}),g()(null==e||null==(L=e.mixture)?void 0:L.compounds,e=>u.add(null==e?void 0:e.name)),g()(w()(null==e?void 0:e.fractions),e=>r.add(e)),g()(null==e?void 0:e.phaseBoundaryStates,e=>{d[null==e?void 0:e.code]={name:null==e?void 0:e.name,unitName:null==e?void 0:e.unitName}}),g()(null==e?void 0:e.properties,(e,n)=>{l.has(n)&&(g()(null==e?void 0:e.models,(e,l)=>{var t;let o=(null==e?void 0:e.phaseName)||"";m()(s[o])&&(s[o]={}),m()(s[o][n])&&(s[o][n]=new Set),null==(t=s[o][n])||t.add(l)}),a[n]=null==e?void 0:e.unitName)}),c-=1});let p=U()(Array.from(u));if(m()(r)&&(null==i||null==(n=i.rows)||n.push(en(p,e,"",0))),g()(Array.from(r),(l,n)=>{var t;null==i||null==(t=i.rows)||t.push(en(p,e,l,n))}),!m()(d)){let l;null==i||null==(t=i.rows)||t.push((l={isExpandable:!0,isPhaseBoundary:!0,cells:[],subRows:[]},null==(o=l.cells)||o.push({id:"phase_boundary_state",value:"PHASE STATE"},{id:"phase_boundary_state_unit",value:""}),C()(e,(e,n)=>{var t;null==l||null==(t=l.cells)||t.push({id:"".concat(n,"_phase_boundary_state_value"),value:""},{id:"".concat(n,"_phase_boundary_state_uncertainty"),value:""})}),g()(d,n=>{var t,o;let i=null==n||null==(t=n.name)?void 0:t.toLowerCase(),s={isExpandable:!1,cells:[{id:"phase_boundary_state_".concat(i),value:null==n?void 0:n.name},{id:"phase_boundary_state_".concat(i,"_unit"),value:null==n?void 0:n.unitName}]};C()(e,(e,l)=>{var t,o,a;if(m()(null==e?void 0:e.phaseBoundaryStates)){null==s||null==(a=s.cells)||a.push({id:"".concat(l,"_phase_boundary_state_").concat(i,"_value"),value:""},{id:"".concat(l,"_phase_boundary_state_").concat(i,"_uncertainty"),value:""});return}null==s||null==(o=s.cells)||o.push({id:"".concat(l,"_phase_boundary_state_").concat(i,"_value"),value:null==e||null==(t=e.phaseBoundaryStates[null==n?void 0:n.name])?void 0:t.value},{id:"".concat(l,"_phase_boundary_state_").concat(i,"_uncertainty"),value:""})}),null==l||null==(o=l.subRows)||o.push(s)}),l))}return g()(s,(l,n)=>{var t,o;let s,r;null==i||null==(t=i.rows)||t.push((s={isExpandable:!0,isPhase:!0,cells:[],subRows:[]},null==(o=s.cells)||o.push({id:n,value:"".concat(n.toUpperCase()," PHASE")},{id:"".concat(n,"_unit"),value:""}),C()(e,(e,l)=>{var t;null==s||null==(t=s.cells)||t.push({id:"".concat(l,"_").concat(n,"_value"),value:""},{id:"".concat(l,"_").concat(n,"_uncertainty"),value:""})}),r=new Set(w()(l).sort()),g()(Array.from(r),t=>{var o;
1null==s||null==(o=s.subRows)||o.push(el(e,n,t,a[t],l[t]))}),s))}),i})(c,h))},[c,h]),(0,r.useEffect)(()=>{var e,l,n;let t=null==f||null==(n=f.current)||null==(l=n.firstChild)||null==(e=l.firstChild)?void 0:e.firstChild;j((null==t?void 0:t.offsetWidth)||0)});let T=e=>{let{headerRow:l,headerType:n,isColSpan:t,includeDeleteButton:o,includeColumnTitles:i}=e;return(0,a.jsxs)("tr",{className:d()(lY()["thermodynamics-result-table__heading-".concat(t?"one-column":"two-columns")],lY()["thermodynamics-result-table__heading-".concat(n)]),children:["calculation"===n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("th",{rowSpan:6,className:lY()["thermodynamics-result-table__heading-".concat(n,"-first-column")],children:"Properties"}),(0,a.jsx)("th",{rowSpan:6,className:lY()["thermodynamics-result-table__heading-".concat(n,"-second-column")],style:{left:!(0,eW.yK)()&&b?"".concat(b,"px"):""},children:"Units"})]}),x()(l,(e,l)=>x()(e,(e,s)=>(0,a.jsxs)("th",{className:0===l||i&&1===l?lY().flash:"",scope:"col",colSpan:t?2:1,children:["flash-engine"===n?S(e):e,o&&(0,a.jsxs)("button",{type:"button",className:"float-right ml-5 link primary",onClick:()=>{p(lF()(c,s))},children:[(0,a.jsx)("i",{className:"kn-icon-trash"}),(0,a.jsx)("span",{className:"sr-only",children:"Delete ".concat(s," Calculation")})]})]},s)))]})},S=e=>{let l=null==e?void 0:e.split("|");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"pr-2",children:(null==l?void 0:l[0])||""}),!m()(null==l?void 0:l[1])&&(0,a.jsx)(eZ.A,{to:null==l?void 0:l[1],openNewTab:!0,children:(0,a.jsx)("i",{className:"kn-icon-more-info"})})]})};return(0,a.jsxs)("table",{className:d()(lY()["thermodynamics-result-table"],"table-auto","relative","border-separate"),ref:f,children:[(0,a.jsxs)("thead",{className:d()(lY()["thermodynamics-result-table__heading"]),children:[T({headerRow:null==v||null==(l=v.headers)?void 0:l.calculationNumRow,headerType:"calculation",isColSpan:!0,includeDeleteButton:!0}),T({headerRow:null==v||null==(n=v.headers)?void 0:n.firstCompoundRow,headerType:"compound"}),!m()(lM()(null==v||null==(t=v.headers)?void 0:t.secondCompoundRow))&&T({headerRow:null==v||null==(o=v.headers)?void 0:o.secondCompoundRow,headerType:"compound"}),T({headerRow:null==v||null==(i=v.headers)?void 0:i.conditionRow,headerType:"condition",isColSpan:!0}),T({headerRow:null==v||null==(s=v.headers)?void 0:s.flashEngineRow,headerType:"flash-engine",isColSpan:!0}),T({headerRow:null==v||null==(u=v.headers)?void 0:u.propertyHeaderRow,headerType:"property",includeColumnTitles:!0})]}),(0,a.jsx)("tbody",{children:x()(null==v?void 0:v.rows,(e,l)=>(0,a.jsx)(lH,{row:e,setExperimentalDataInput:_,firstColumnWidth:b},l))})]})};var lq=n(44239),lG=n.n(lq),lz=n(34558),lW=n(96838),lX=n.n(lW);let lJ=e=>{let{onClose:l,input:n}=e,[t,o]=(0,r.useState)(!0),[i,s]=(0,r.useState)(),u=e=>"".concat("https://doi.org","/").concat(e);(0,r.useEffect)(()=>{var e,l,t;t={COMPOUND_1:(null==n||null==(e=n.trcids)?void 0:e[0])||"",COMPOUND_2:(null==n||null==(l=n.trcids)?void 0:l[1])||"",PROPERTY:(null==n?void 0:n.propertyCode)||"",PHASES:(null==n?void 0:n.phases)||""},(0,eB.Th)(eM.do,e=>{if((0,em.oJ)(e)){var l,n,t;let i=p(null==e||null==(n=e.BODY)||null==(l=n.RESULTS)?void 0:l.datasets),a=lG()(x()(null==i?void 0:i.rows,"source"));a.length>0?(t={REFKEYS:(null==a?void 0:a.join(","))||" "},(0,eB.Th)(eM.O4,e=>{if((0,em.oJ)(e)){var l;s(c(i,null==e||null==(l=e.BODY)?void 0:l.RESULTS))}o(!1)},t)):(s(i),o(!1))}else o(!1)},t)},[]);let c=(e,l)=>{let n=N()(e);return n.rows=x()(n.rows,e=>{var n,t,o,i,s;let a=N()(e);return a.sourceTitle=(null==l||null==(n=l[e.source])?void 0:n.TITLE)||"",a.sourceDOI=(null==l||null==(t=l[e.source])?void 0:t.DOI)||"",a.sourceAuthor=(null==l||null==(o=l[e.source])?void 0:o.AUTHORS)||"",a.journalName=(null==l||null==(i=l[e.source])?void 0:i.JOURNAL)||"",a.yearPublish=(null==l||null==(s=l[e.source])?void 0:s.YEARPUB)||"",a}),n},p=e=>{let l={headers:[],rows:[]};return e&&g()(e,(n,t)=>{var o,i,s,a,r,u,d,c,p;let h=null==e?void 0:e[t];if(m()(null==l?void 0:l.headers)){let e={source:"",property:"",variables:[],uncertainty:""};e.source="Source",e.property=(null==h||null==(s=h.prop)?void 0:s.name)&&(null==h||null==(a=h.prop)?void 0:a.unitname)?"".concat(null==h||null==(r=h.prop
1)?void 0:r.name," (").concat(null==h||null==(u=h.prop)?void 0:u.unitname,")"):null==h||null==(d=h.prop)?void 0:d.name,(null==h||null==(c=h.variables)?void 0:c.length)>0&&g()(null==h?void 0:h.variables,l=>{var n;let t=(null==l?void 0:l.name)&&(null==l?void 0:l.unitname)?"".concat(null==l?void 0:l.name," (").concat(null==l?void 0:l.unitname,")"):null==l?void 0:l.name;null==e||null==(n=e.variables)||n.push(t||"")}),e.uncertainty="Uncertainity",null==(p=l.headers)||p.push(e)}let _=(null==h||null==(o=h.source)?void 0:o.trc)||"";(null==h||null==(i=h.points)?void 0:i.length)>0&&x()(null==h?void 0:h.points,e=>{var n,t;let o={source:"",property:"",variables:[],uncertainty:""};o.source=_,o.property=(null==e||null==(n=e.prop)?void 0:n.value)||"",x()(l.headers,l=>{g()(null==l?void 0:l.variables,(l,n)=>{var t,i,s;null==(s=o.variables)||s.push((null==e||null==(i=e.vars)||null==(t=i[n])?void 0:t.value)||"")})}),o.uncertainty=(null==e||null==(t=e.prop)?void 0:t.combined)||"",l.rows.push(o)})}),l},h=e=>{if(m()(e))return null;let l=null==e?void 0:e.split(".");return(0,a.jsxs)("div",{className:d()("flex",lX()["thermodynamic-experimental-table-value-main"]),children:[(0,a.jsx)("div",{className:lX()["thermodynamic-experimental-table-value-main-int"],children:b()(parseFloat(null==l?void 0:l[0]),6)}),(0,a.jsx)("div",{className:lX()["thermodynamic-experimental-table-value-main-decimal"],children:m()(null==l?void 0:l[1])?"":".".concat(b()(parseFloat(null==l?void 0:l[1]),6))})]})};return(0,a.jsx)(ek.Ay,{isOpen:!0,onClose:()=>l(),className:eD()["modal-popup-thermodynamic-experimental-popup"],children:(0,a.jsxs)("div",{className:"ml-4 -mt-8",children:[t&&(0,a.jsx)("div",{className:"grid justify-self-center text-center pt-24",children:(0,a.jsx)(ep.A,{showText:!0})}),!t&&m()(null==i?void 0:i.headers)&&(0,a.jsx)("div",{className:"grid justify-self-center text-center pt-24",children:"No data found."}),!t&&!m()(null==i?void 0:i.headers)&&(0,a.jsxs)("div",{className:lX()["thermodynamic-experimental-main"],id:"main-div",children:[(0,a.jsxs)("div",{className:"text-left flex",children:[(0,a.jsx)("div",{children:"SOURCE DATA"}),(0,a.jsx)("div",{children:(0,a.jsx)(ex.A,{buttonName:"Download/Export",classname:"w-full",tooltipClassName:eT()["tooltip-content-thermo-experimental-export"],content:(0,a.jsx)(ew,{onCsvClick:()=>{let e;e=[],x()(null==i?void 0:i.headers,l=>{let n=[];n.push((null==l?void 0:l.source)||""),x()(null==l?void 0:l.variables,e=>{n.push(e||"")}),n.push(null==l?void 0:l.property),n.push(null==l?void 0:l.uncertainty),e.push(n)}),x()(null==i?void 0:i.rows,l=>{let n=[];n.push((null==l?void 0:l.sourceTitle)||(null==l?void 0:l.source)||""),x()(null==l?void 0:l.variables,e=>{n.push(e||"")}),n.push(null==l?void 0:l.property),n.push(null==l?void 0:l.uncertainty),e.push(n)}),(0,eA.eZ)(e,"thermodynamic_source_data_result")},onExcelClick:()=>{}})})})]}),(0,a.jsx)("div",{className:"mt-4",id:"table-div",children:(0,a.jsxs)("table",{className:lX()["thermodynamic-experimental-table"],children:[(0,a.jsx)("thead",{children:x()(null==i?void 0:i.headers,(e,l)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left",children:(null==e?void 0:e.source)||""}),x()(null==e?void 0:e.variables,(e,n)=>(0,a.jsx)("th",{className:"text-center",children:e},"".concat(l,"-").concat(n,"}"))),(0,a.jsx)("th",{className:"text-center",children:null==e?void 0:e.property}),(0,a.jsx)("th",{className:"text-center",children:null==e?void 0:e.uncertainty})]},"header-".concat(l)))}),(0,a.jsx)("tbody",{children:x()(null==i?void 0:i.rows,(e,l)=>{var n,t;let o,i,s,r;return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"text-left",children:(null==e?void 0:e.sourceDOI)?(0,a.jsx)(eZ.A,{id:l.toString(),openNewTab:!0,to:u(null==e?void 0:e.sourceDOI),children:(0,a.jsx)(lz.A,{placement:"top-start",arrow:!1,content:(o=null==e?void 0:e.sourceTitle,i=null==e?void 0:e.sourceAuthor,s=null==e?void 0:e.journalName,r=null==e?void 0:e.yearPublish,"Title: ".concat(o,"\n\nAuthors: ").concat(i,"\n\nJournal: ").concat(s,"\n\nYear Published: ").concat(r)),className:"whitespace-pre-wrap orange-tooltip top-start-tippy-arrow common-popover",allowHTML:!0,children:(0,a.jsx)("span",{children:u(null==e?void 0:e.sourceDOI)})})}):(null==e?void 0:e.sourceTitle)||(null==e?void 0:e.source)||""}),x()(null==e?void 0:e.variables,(e,n)=>(0,a.jsx)("td",{className:"text-center",children:h(null==e?void 0:e.toString())||""},"".concat(l,"-").concat(n))),(0,a.jsx)("td",{className:"text-center",children:h(null==e||null==(n=e.property)?void 0:n.toString())||""}),(0,a.jsx)("td",{className:"text-center",children:h(null==e||null==(t=e.uncertainty)?void 0:t.toString())||""})]},l)})})]})})]})]})})};var lZ=n(97527),l$=n.n(lZ);let lQ=e=>{let{flashResults:l,tableFlashResults:n,setTableFlashResults:t,addToHistory:o,historyFlashEngine:i,selectedProperties:s,setSelectedProperties:u,selectedPropertiesHistoryChange:c,setSelectedPropertiesHistoryChange:p}=e,h=(0,eu.useRouter)(),[_,v]=(0,r.useState)(!1),[y,b]=(0,r.useState)([]),[j,f]=(0,r.useState)({}),[T,A]=(0,r.useState)(void 0),[S,R]=(0,r.useState)(new Set),[E,C]=(0,r.useState)(null),[P,k]=(0,r.useState)(!1),O
1=e=>{var l,o,i,s,a,r,u,d,c,p;let h=[...x()(null==e||null==(l=e.mixture)?void 0:l.compounds,"trcid"),null==e||null==(i=e.mixture)||null==(o=i.condition)?void 0:o.temperature,null==e||null==(a=e.mixture)||null==(s=a.condition)?void 0:s.pressure,null==e||null==(u=e.mixture)||null==(r=u.condition)?void 0:r.mixingRatioValue,null==e||null==(c=e.mixture)||null==(d=c.condition)?void 0:d.mixingRatioUnit,null==e||null==(p=e.mixture)?void 0:p.type,null==e?void 0:e.flashEngine].join("|");if(m()(n[h])){let l=N()(n);l[h]=e,t(l)}};(0,r.useEffect)(()=>{let e=[],n={};x()(l,l=>{e.push(null==l?void 0:l.flashEngine),n[null==l?void 0:l.flashEngine]=(null==l?void 0:l.flashEngineURL)||""}),f(n),b(e);let t=0;if(!m()(i)){let e=x()(l,"flashEngine").indexOf(i);(!m()(e)||void 0!==e||e>-1)&&(t=e||0)}A(t),O(l[t]),o(l[t])},[l]),(0,r.useEffect)(()=>{if(m()(n))return void R(new Set);let e=new Set;g()(n,l=>{w()(null==l?void 0:l.properties).forEach(l=>{e.add(l)})}),R(e)},[n]),(0,r.useEffect)(()=>{let e=lC()(Array.from(S).sort(),15),l=(0,eh.Ml)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.THERMO_TOOL_DEFAULT_PROPERTIES);m()(l)&&((0,eh.dL)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.THERMO_TOOL_DEFAULT_PROPERTIES,e),l=e),u(new Set(l))},[S]),(0,r.useEffect)(()=>{P&&p(!0)},[s.size,P]);let D=()=>{v(!_)},L=()=>{let e=(0,eh.Ml)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.THERMO_TOOL_DEFAULT_PROPERTIES);if(null!==e){let l=Array.from(S);return x()(Array.from(s),n=>{if(V()(l,n))V()(e,n)||null==e||e.push(n);else{let l=null==e?void 0:e.indexOf(n);-1!==l&&(null==e||e.splice(l,1))}}),Array.from(e).length}return 0};return(0,a.jsxs)(a.Fragment,{children:[!m()(n)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{children:"Model:"}),(0,a.jsx)(lP.A,{className:lk()["thermo-flash-engines-dropdown"],placeholder:"Model",data:y,input:y[T],onDropDownValueChange:e=>{var n,t;O(l[y.indexOf(e)]),o(l[y.indexOf(e)]),A(y.indexOf(e)),ei(h,eo.UPDATE_FLASH_ENGINE,null==(n=l[y.indexOf(e)])?void 0:n.mixture,null==(t=l[y.indexOf(e)])?void 0:t.flashEngine)},getExtraInfo:e=>{let l=(null==j?void 0:j[e])||"";return m()(l)?"":(0,a.jsx)(eZ.A,{to:l,openNewTab:!0,onClick:e=>e.stopPropagation(),children:(0,a.jsx)("i",{className:"kn-icon-more-info"})})}}),S.size>0&&(0,a.jsx)(eb.A,{onClick:D,className:d()("ml-4","primary mb-4"),children:(0,a.jsx)(eL.A,{value:"add/remove properties"})}),Math.abs(S.size-L())>0&&(0,a.jsxs)("div",{className:d()(l$()["thermodynamics-result".concat(c?"__propertyInfoBlue":"__propertyInfoRed")],"ml-4"),children:[Math.abs(S.size-L())," more properties left for last calculation"]})]}),(0,a.jsx)("div",{className:d()(l$()["thermodynamics-result__table"],"overflow-auto","scroll-bar"),children:(0,a.jsx)(lK,{tableFlashResults:n,selectedProperties:s,setTableFlashResults:t,setExperimentalDataInput:C})})]}),_&&(0,a.jsx)(lI,{isOpen:_,onClose:D,propertiesList:Array.from(S),handleSelectedProperties:e=>{let l,n=(0,eh.Ml)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.THERMO_TOOL_DEFAULT_PROPERTIES),t=Array.from(e);x()(Array.from(S),e=>{if(V()(t,e))V()(n,e)||null==n||n.push(e);else{let l=null==n?void 0:n.indexOf(e);-1!==l&&(null==n||n.splice(l,1))}}),(0,eh.dL)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.THERMO_TOOL_DEFAULT_PROPERTIES,n),u(new Set(n)),l=[{name:"operation",values:["update_properties"]},{name:"properties",values:Array.from(new Set(n))}],(0,Y.py)((0,Y.oj)(h),{search:{facets:l}},Y.Rm.SEARCH_RESULTS_UPDATED),v(!_),k(!0)},propertiesToDisplay:Array.from(s)}),E&&(0,a.jsx)(lJ,{onClose:()=>C(null),input:E})]})},l0=()=>{let e=(0,eu.useRouter)(),[l,n]=(0,r.useState)(!1),[t,o]=(0,r.useState)(Q),[i,s]=(0,r.useState)([]),[u,d]=(0,r.useState)({}),[c,p]=(0,r.useState)({request:null,response:null,api_url:null,api_time:null}),[h,v]=(0,r.useState)(""),[y,j]=(0,r.useState)({message:"",isSuccess:!1}),[f,T]=(0,r.useState)(new Set),[S,R]=(0,r.useState)(!1),[E,C]=(0,r.useState)(!1),P=(0,ev.SS)((0,eh.Ml)(eh.cY.THERMO_TOOL_DEBUG))||!1,[w,k]=(0,r.useState)([]),O=e=>{let l="Something went wrong.";(null==e?void 0:e.STATUS_MSG)==="ACCESS_THROTTLED"?l="We've detected some automated bulk data extraction and have temporarily limited your access. Please contact us at [email protected] if you're interested in our data as a service option.":m()(null==e?void 0:e.STATUS_MSG)||(l=null==e?void 0:e.STATUS_MSG),j({message:l,isSuccess:!1})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eq,{tableFlashResults:u,selectedProperties:f}),(0,a.jsx)(lR,{mixture:t,setMixture:o,handleCalculation:()=>{var l,i,a,r,u,d;let c;n(!0),R(!1),ei(e,eo.CALCULATE,t);let h={COMPOUND_1:(null==t||null==(l=t.compounds[0])?void 0:l.trcid)||"",COMPOUND_2:(null==t||null==(i=t.compounds[1])?void 0:i.trcid)||"",TEMPERATURE:(null==t||null==(a=t.condition)?void 0:a.temperature)||"",PRESSURE:(null==t||null==(r=t.condition)?void 0:r.pressure)||"",MIXTURE:(c=(null==t||null==(u=t.condition)?void 0:u.mixingRatioValue)||0,b()(c/100,3)),MIXTURE_UNIT:(null==t||null==(d=t.condition)?void 0:d.mixingRatioUnit)||"",CALCULATION_TYPE:(null==t?void 0:t.type)||"",DATA_SOURCE:t.dataSource||""};if(m()(null==t?void 0:t.historyFlashEngine))v("");else{let e=N()(t);e.historyFlashEngine="",o(e),v(null==t?void 0:t.historyFlashEngine)}(0,eB.Th)(eM.UO,e=>{var l,o,i,a,r,u,d,c,_,v,y,b,f,T,S,R;if(n(!1),p({request:N()(h),response:N()(null==e||null==(l=e.BODY)?void 0:l.RESULTS),api_url:N()(null==e||null==(o=e.BODY)?void 0:o.REQUEST_URL),api_time:N()(null==e||null==(i=e.BODY)?void 0:i.REQUEST_TIME)}
1),(0,em.oJ)(e))if((0,em.oJ)(null==e?void 0:e.BODY)){let l,n,o=(null==t?void 0:t.dataSource)===z.nist.value?(u=t,d=e,l=[],g()(null==d||null==(v=d.BODY)||null==(_=v.RESULTS)||null==(c=_.FlashResults)?void 0:c.PhaseStates,e=>{g()(null==e?void 0:e.Compositions,e=>{var n,t,o,i,s,a,r,d,c;let p={flashEngine:null==e?void 0:e.text,flashEngineURL:(null==e||null==(n=e.models)?void 0:n.length)===1?null==e||null==(o=e.models)||null==(t=o[0])?void 0:t.HelpURL:"",mixture:N()(u),properties:{},fractions:{},phaseBoundaryStates:{}};m()(null==e||null==(i=e.summary)?void 0:i.props)||m()(null==e||null==(s=e.summary)?void 0:s.points)||(g()(e.summary.props,(l,n)=>{var t,o,i,s,a,r,u;(null==l?void 0:l.code)!=="X"||m()(null==l?void 0:l.phasename)||B()(null==(i=e.summary.points[0])||null==(o=i.props)||null==(t=o[n])?void 0:t.value)||(null==(u=e.summary.points[0])||null==(r=u.props)||null==(a=r[n])||null==(s=a.value)?void 0:s.toString())==="0"||(p.fractions[l.phasename]={value:e.summary.points[0].props[n].value.toString(),compoundValues:{}})}),A()(p.fractions)>1?g()(e.summary.props,(l,n)=>{var t,o,i,s,a,r,d,c;if((null==l?void 0:l.code)==="X1"&&!m()(null==l?void 0:l.phasename)&&!B()(null==(i=e.summary.points[0])||null==(o=i.props)||null==(t=o[n])?void 0:t.value)&&!m()(p.fractions[l.phasename])){let{value:t}=e.summary.points[0].props[n],o=L()(Number(t))?1:Number(t);p.fractions[l.phasename].compoundValues[null==u||null==(a=u.compounds)||null==(s=a[0])?void 0:s.name]=o.toString(),(null==u||null==(r=u.compounds)?void 0:r[1])&&(p.fractions[l.phasename].compoundValues[null==u||null==(c=u.compounds)||null==(d=c[1])?void 0:d.name]=(1-o).toString())}}):m()(p.fractions)||(p.fractions[Object.keys(p.fractions)[0]].compoundValues[null==u||null==(c=u.compounds)||null==(d=c[0])?void 0:d.name]="1")),g()(null==e||null==(r=e.datasets)||null==(a=r[0])?void 0:a.variables,e=>{["P","T"].includes(null==e?void 0:e.code)&&(p.phaseBoundaryStates[null==e?void 0:e.name]={code:(null==e?void 0:e.code)||"",name:(null==e?void 0:e.name)||"",unit:(null==e?void 0:e.unit)||"",unitName:(null==e?void 0:e.unitname)||"",value:(null==e?void 0:e.value)||""})}),g()(null==e?void 0:e.datasets,e=>{g()(null==e?void 0:e.props,(l,n)=>{var t,o,i,s,a,r,u,d,c,h,_,v,y,b,j;if((null==e||null==(a=e.points)||null==(s=a[0])||null==(i=s.props)||null==(o=i[n])||null==(t=o.value)?void 0:t.toString().trim())===""||!(null==l?void 0:l.model)&&!["Temperature","Pressure"].includes(null==l?void 0:l.name))return;let g={phase:(null==l?void 0:l.phase)||"",phaseName:(null==l?void 0:l.phasename)||(null==(r=x()(null==e?void 0:e.constraints,"phasename"))?void 0:r.join(" + "))||"",value:(null==e||null==(h=e.points)||null==(c=h[0])||null==(d=c.props)||null==(u=d[n])?void 0:u.value)||"",uncertainty:(null==e||null==(b=e.points)||null==(y=b[0])||null==(v=y.props)||null==(_=v[n])?void 0:_.combined)||"",code:(null==l?void 0:l.code)||"",isExperimentalDataAvailable:(null==l?void 0:l.data)===1,helpURL:(null==l?void 0:l.HelpURL)||""};(null==p?void 0:p.properties[null==l?void 0:l.name])||(p.properties[null==l?void 0:l.name]={models:{},unit:null,unitName:null}),m()(null==p||null==(j=p.properties[null==l?void 0:l.name])?void 0:j.models)?p.properties[null==l?void 0:l.name].models={[(null==l?void 0:l.model)||""]:g}:p.properties[null==l?void 0:l.name].models[(null==l?void 0:l.model)||""]=g,p.properties[null==l?void 0:l.name].unitName=null==l?void 0:l.unitname,p.properties[null==l?void 0:l.name].unit=null==l?void 0:l.unit})}),l.push(p)})}),l):(y=t,b=e,n=[],g()(null==b||null==(R=b.BODY)||null==(S=R.RESULTS)||null==(T=S.Entities[0])||null==(f=T.Properties[0])?void 0:f.Data,e=>{let l={flashEngine:"Cranium",flashEngineURL:"",mixture:N()(y),properties:{},fractions:{},phaseBoundaryStates:{}};m()(null==e?void 0:e.Temperature)||(l.phaseBoundaryStates.Temperature={code:"T",name:"Temperature",unit:"",unitName:(null==e?void 0:e.TempUnits)||"",value:(null==e?void 0:e.Temperature)||""}),m()(null==e?void 0:e.Pressure)||(l.phaseBoundaryStates.Pressure={code:"P",name:"Pressure",unit:"",unitName:(null==e?void 0:e.PresUnits)||"",value:(null==e?void 0:e.Pressure)||""}),g()(null==e?void 0:e.Value,e=>{var n;let t="";t=(null==e?void 0:e.Phase)==="Liquid Phase"?"Liquid":(null==e?void 0:e.Phase)==="Vapor Phase"?"Gas":null==e?void 0:e.Phase;let o={phase:(null==e?void 0:e.Phase)||"",phaseName:t||"",value:(null==e?void 0:e.Value)||"",uncertainty:"",code:"",isExperimentalDataAvailable:!1,helpURL:(null==e?void 0:e.RefLink)||""};(null==l?void 0:l.properties[null==e?void 0:e.PropName])||(l.properties[null==e?void 0:e.PropName]={models:{},unit:null,unitName:null}),m()(null==l||null==(n=l.properties[null==e?void 0:e.PropName])?void 0:n.models)?l.properties[null==e?void 0:e.PropName].models={"":o}:l.properties[null==e?void 0:e.PropName].models[""]=o,l.properties[null==e?void 0:e.PropName].unitName=null==e?void 0:e.ValueUnits,l.properties[null==e?void 0:e.PropName].unit=null==e?void 0:e.ValueUnits}),n.push(l)}),n);(m()(o)||m()(null==o||null==(a=o[0])?void 0:a.flashEngine)||m()(null==o||null==(r=o[0])?void 0:r.properties))&&j({message:"Result is not available for selected Compound with Temperature/Pressure. Refine your search.",isSuccess:!1}),(null==o?void 0:o.length)>0&&s(o)}else O(null==e?void 0:e.BODY);else O(e)},h)},clearAll:()=>{o(Q),ei(e,eo.CLEAR_ALL,Q),d({}),p({request:null,response:null,api_url:null,api_time:null}),R(!1),s([]),C(!1),k([])},isSampleSearchSelect:E,setSampleSearchSelect:C,flashResults:i,tableFlashResults:u,compoundAutoSuggestions:w,setCompoundAutoSuggestions:k}),(0,a.jsx)("div",{className:"h-16",children:l&&(0,a.jsx)(ep.A,{hasOverlay:!0,isCenterAligned:!0})}
1),m()(i)&&m()(u)?(0,a.jsx)("img",{src:(0,_.by)("empty-state.png"),alt:"",className:"ml-60 w-2/4"}):(0,a.jsx)(lQ,{flashResults:i,tableFlashResults:u,setTableFlashResults:d,addToHistory:e=>{let l=(0,eh.Ml)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.COMPOUND_PROPERTIES);if(!m()(e)){var n,o,i,s,a,r,u,d,c,p,h,_,v,y,b,j,g,f,N,T,A,S,R,E,C,P,w,k,O,D,L,I,U,M,B,F,V,Y;let m=[{compound1:(null==e||null==(i=e.mixture)||null==(o=i.compounds)||null==(n=o[0])?void 0:n.name)||"",trcId1:(null==e||null==(r=e.mixture)||null==(a=r.compounds)||null==(s=a[0])?void 0:s.trcid)||"",compound2:(null==e||null==(c=e.mixture)||null==(d=c.compounds)||null==(u=d[1])?void 0:u.name)||"",trcId2:(null==e||null==(_=e.mixture)||null==(h=_.compounds)||null==(p=h[1])?void 0:p.trcid)||"",temperature:(null==e||null==(y=e.mixture)||null==(v=y.condition)?void 0:v.temperature)||"",temperatureUnit:"K",pressure:(null==e||null==(j=e.mixture)||null==(b=j.condition)?void 0:b.pressure)||"",pressureUnit:"kPa",mixingRatioValue:(null==e||null==(f=e.mixture)||null==(g=f.condition)?void 0:g.mixingRatioValue)||100,mixingRatioUnit:(null==e||null==(T=e.mixture)||null==(N=T.condition)?void 0:N.mixingRatioUnit)||"",flashEngine:(null==e?void 0:e.flashEngine)||"",isBinary:(null==t||null==(S=t.compounds)||null==(A=S[0])?void 0:A.isBinary)||!1,calculation_type:(null==t?void 0:t.type)||(null==Q?void 0:Q.type),dataSource:(null==t?void 0:t.dataSource)||(null==Q?void 0:Q.dataSource),range:{compound1:{t1:(null==e||null==(E=e.mixture)||null==(R=E.compounds[0])?void 0:R.T1)||"",t2:(null==e||null==(P=e.mixture)||null==(C=P.compounds[0])?void 0:C.T2)||"",p1:(null==e||null==(k=e.mixture)||null==(w=k.compounds[0])?void 0:w.P1)||"",p2:(null==e||null==(D=e.mixture)||null==(O=D.compounds[0])?void 0:O.P2)||""},compound2:{t1:(null==e||null==(I=e.mixture)||null==(L=I.compounds[1])?void 0:L.T1)||"",t2:(null==e||null==(M=e.mixture)||null==(U=M.compounds[1])?void 0:U.T2)||"",p1:(null==e||null==(F=e.mixture)||null==(B=F.compounds[1])?void 0:B.P1)||"",p2:(null==e||null==(Y=e.mixture)||null==(V=Y.compounds[1])?void 0:V.P2)||""}}}],H=!1;(null==l?void 0:l.length)>0&&x()(l,e=>{ec()(e,null==m?void 0:m[0])&&(H=!0)}),H||((null==l?void 0:l.length)>0?((null==l?void 0:l.length)>=50&&(null==l||l.splice(-1)),l=[null==m?void 0:m[0],...l]):l=m,(0,eh.dL)(null===eh.cY||void 0===eh.cY?void 0:eh.cY.COMPOUND_PROPERTIES,l))}},historyFlashEngine:h,selectedProperties:f,setSelectedProperties:T,selectedPropertiesHistoryChange:S,setSelectedPropertiesHistoryChange:R}),!m()(c.request)&&P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("details",{className:"mt-5",children:[(0,a.jsx)("summary",{children:"API Request"}),(0,a.jsx)("pre",{children:JSON.stringify((null==c?void 0:c.request)||"",null,2)})]}),(0,a.jsxs)("details",{className:"mt-5",children:[(0,a.jsx)("summary",{children:"API URL"}),(0,a.jsx)("pre",{children:(null==c?void 0:c.api_url)||""})]}),(0,a.jsxs)("details",{className:"mt-5",children:[(0,a.jsx)("summary",{children:"API Time (in seconds)"}),(0,a.jsx)("pre",{children:(null==c?void 0:c.api_time)||""})]}),(0,a.jsxs)("details",{className:"mt-5",children:[(0,a.jsx)("summary",{children:"API Response"}),(0,a.jsx)("pre",{children:JSON.stringify((null==c?void 0:c.response)||"",null,2)})]})]}),(0,a.jsx)(e_.A,{message:null==y?void 0:y.message,isFixed:!0,duration:6,isSuccess:null==y?void 0:y.isSuccess,onClear:()=>j({message:"",isSuccess:!1})})]})};var l1=n(25777),l2=n(367),l4=n(85247),l3=n(9990),l7=n(40777),l6=n(75176),l5=n.n(l6);let l9=()=>{let e=[(0,_.M3)(_.BV.index),(0,_.M3)(_.BV.thermodynamics)],[l,n]=(0,r.useState)([]),[t,o]=(0,r.useState)(null),i=e=>{let l=(0,l7.K5)(e);if(m()(l)){let e=(0,l3.iq)("USER_TYPE");if(!(0,l4.kR)(e))return void o((0,l7.LR)(null===l7.kq||void 0===l7.kq?void 0:l7.kq.THERMO_OTHER));let l=(0,l4.sE)(e)?null===l7.kq||void 0===l7.kq?void 0:l7.kq.GUEST:null===l7.kq||void 0===l7.kq?void 0:l7.kq.OTHER;o((0,l7.LR)(l))}else n(l),o(null)};return((0,r.useEffect)(()=>(i((0,eh.Ml)(eh.cY.ORG_SETTINGS)),l1.R.subscribe(l1.s.ORG_SETTINGS,i),()=>{l1.R.unsubscribe(l1.s.ORG_SETTINGS)}),[]),m()(t))?m()(l)?(0,a.jsx)(ep.A,{id:"thermodynamics_page",isCenterAligned:!0}):(0,a.jsxs)(p.A,{className:d()(l5()["main-template"],"py-0"),childrenClassName:l5().content,children:[(0,a.jsx)(h.A,{breadcrumbs:e}),(0,a.jsx)("h1",{id:"thermo-tool",className:d()("font-bold mt-12 pb-4"),children:"Thermodynamics"}),(0,a.jsx)(l0,{})]}
1):(0,a.jsx)(l2.Ay,{popupTitle:null==t?void 0:t.title,popupMessage:null==t?void 0:t.description,footerButton:null==t?void 0:t.footerButtonText,footerButtonLink:null==t?void 0:t.footerButtonLink})}},81429:(e,l,n)=>{e.exports=n(52673)(!0)},81541:e=>{e.exports={"unit-converter":"UnitConverter_unit-converter__Hu3c1"}},83686:()=>{},85740:e=>{e.exports={"thermodynamics-compound-props__compound-alignment":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__compound-alignment__6LqXR","thermodynamics-compound-props__compound-div":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__compound-div__tdj3u","thermodynamics-compound-props__calculate-div":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__calculate-div__FRsUi",button:"ThermodynamicsCompoundProperties_button__YNqOh","thermodynamics-compound-props__std-btn":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__std-btn__jEoxO","thermodynamics-compound-props__spec-btn":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__spec-btn__kP7zz","thermodynamics-compound-props__input-text":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__input-text__4y9Rh","thermodynamics-compound-props__input-text__disable":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__input-text__disable__N4xKh","thermodynamics-compound-props__temp-div":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__temp-div__mCO3m","thermodynamics-compound-props__btn-size-kps":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__btn-size-kps__eXRWz","thermodynamics-compound-props__error":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__error__n8_dF","thermodynamics-compound-props__error-text":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__error-text__u1aoY","thermodynamics-compound-props__unit-note":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__unit-note___Ssz8","thermodynamics-compound-props__kn-icon-arrow-size":"ThermodynamicsCompoundProperties_thermodynamics-compound-props__kn-icon-arrow-size__GyEbR"}},89655:e=>{e.exports={"thermodynamics-pressure__metric-btn":"ThermodynamicsPressurePopup_thermodynamics-pressure__metric-btn__byqSJ","thermodynamics-pressure__selected-btn":"ThermodynamicsPressurePopup_thermodynamics-pressure__selected-btn__3WMYS","thermodynamics-pressure__unselected-btn":"ThermodynamicsPressurePopup_thermodynamics-pressure__unselected-btn__s6K_6","thermodynamics-pressure__pressure-div":"ThermodynamicsPressurePopup_thermodynamics-pressure__pressure-div__j6Wrh","thermodynamics-pressure__hide":"ThermodynamicsPressurePopup_thermodynamics-pressure__hide__ICFy5","thermodynamics-pressure__footer-btn":"ThermodynamicsPressurePopup_thermodynamics-pressure__footer-btn__mj_qf"}},91922:e=>{e.exports={"share-button__input":"ShareButton_share-button__input__xThf6","share-button":"ShareButton_share-button__vVPi1","modal-popup":"ShareButton_modal-popup__Yivc_","bold-text":"ShareButton_bold-text__aXrN4","share-button__tooltip":"ShareButton_share-button__tooltip__JOt5q","share-modal-div":"ShareButton_share-modal-div__xq_mE","representationType-srch":"ShareButton_representationType-srch__KqOqa",spanBorder:"ShareButton_spanBorder__pC4a1"}},92886:e=>{e.exports={"tooltip-content":"Tooltip_tooltip-content__HJWno","tooltip-content-source-material":"Tooltip_tooltip-content-source-material__mHvib","tooltip-content-export":"Tooltip_tooltip-content-export__nNLsJ","tooltip-content-thermo-export":"Tooltip_tooltip-content-thermo-export__ISiR9","tooltip-content-thermo-experimental-export":"Tooltip_tooltip-content-thermo-experimental-export__TUrD1","tooltip-content-my-profile":"Tooltip_tooltip-content-my-profile__tRi0v"}},93674:(e,l,n)=>{e.exports=n(40925)("round")},93828:(e,l,n)=>{"use strict";n.d(l,{A:()=>h});var t=n(37876),o=n(14232),i=n(15039),s=n.n(i),a=n(42816),r=n(92886),u=n.n(r),d=n(62953),c=n.n(d),m=n(3586),p=n(48815);let h=e=>{let{content:l,classname:n,buttonName:i,tooltipClassName:r,id:d}=e,[h,_]=(0,o.useState)(!1);return(0,t.jsxs)("div",{className:s()(c()["export-button"],n),tabIndex:0,onBlur:e=>{(0,a.w1)(e)&&_(!1)},id:"exp-btn",children:[(0,t.jsx)(m.A,{styleAsLink:!0,onClick:()=>_(!h),className:"px-4 primary",id:d,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"pr-3 kn-icon-download"}),(0,t.jsx)("span",{children:i||"Export"})]})}),(0,t.jsx)(p.A,{content:(0,t.jsxs)("div",{className:s()("export-button__content","pt-2"),children:[(0,t.jsxs)("div",{className:"flex justify-around",children:[(0,t.jsx)("div",{children:"Export"}),(0,t.jsx)(m.A,{styleAsLink:!0,onClick:()=>_(!1),id:"close-tooltip",children:(0,t.jsx)("span",{className:s()(c()["export-button__content-icon-close"],"pl-3","kn-icon-close")})})]}),l]}),isOpen:h,classname:r||u()["tooltip-content-export"]})]})}},94229:e=>{e.exports={"thermodynamic-property-popup__body-content":"ThermodynamicsPropertiesPopup_thermodynamic-property-popup__body-content__VpPec","thermodynamic-property-popup__checkbox-value":"ThermodynamicsPropertiesPopup_thermodynamic-property-popup__checkbox-value__AzNS2","thermodynamic-property-popup__okay-btn":"ThermodynamicsPropertiesPopup_thermodynamic-property-popup__okay-btn__pucDr","thermodynamic-property-popup":"ThermodynamicsPropertiesPopup_thermodynamic-property-popup__rlAhg","thermodynamic-property-popup__checkbox-div":"ThermodynamicsPropertiesPopup_thermodynamic-property-popup__checkbox-div__kN5IG"}},96139:e=>{e.exports={"div-alignment":"ThermodynamicsInputForm_div-alignment__2BqfI","substance-alignment":"ThermodynamicsInputForm_substance-alignment__LZ_dC","temp-alignment":"ThermodynamicsInputForm_temp-alignment__jOukH","sample-alignment":"ThermodynamicsInputForm_sample-alignment__hilki"}},96590:(e,l,n)=>{var t=n(32401),o=n(29323),i=n(51124),s=n(93007);e.exports=function(e,l){return(s(e)?t:o)(e,i(l))}},96652:e=>{e.exports={"thermodynamics-temperature__metric-btn":"ThermodynamicsTemperaturePopUp_thermodynamics-temperature__metric-btn__z_VG
1c","thermodynamics-temperature__selected-btn":"ThermodynamicsTemperaturePopUp_thermodynamics-temperature__selected-btn__cpMJD","thermodynamics-temperature__unselected-btn":"ThermodynamicsTemperaturePopUp_thermodynamics-temperature__unselected-btn__cgJqp","thermodynamics-temperature__temperature-div":"ThermodynamicsTemperaturePopUp_thermodynamics-temperature__temperature-div__coc80","thermodynamics-temperature__hide":"ThermodynamicsTemperaturePopUp_thermodynamics-temperature__hide__rGfys","thermodynamics-temperature__footer-btn":"ThermodynamicsTemperaturePopUp_thermodynamics-temperature__footer-btn__88jqY"}},96838:e=>{e.exports={"thermodynamic-experimental-main":"ThermodynamicsExperimentalDataPopup_thermodynamic-experimental-main__MDIvt","thermodynamic-experimental-table":"ThermodynamicsExperimentalDataPopup_thermodynamic-experimental-table___EuV2","thermodynamic-experimental-table-value-main":"ThermodynamicsExperimentalDataPopup_thermodynamic-experimental-table-value-main__sdYRW","thermodynamic-experimental-table-value-main-int":"ThermodynamicsExperimentalDataPopup_thermodynamic-experimental-table-value-main-int__NlRlS","thermodynamic-experimental-table-value-main-decimal":"ThermodynamicsExperimentalDataPopup_thermodynamic-experimental-table-value-main-decimal__7hiCd"}},97527:e=>{e.exports={"thermodynamics-result__propertyInfoRed":"ThermodynamicsResult_thermodynamics-result__propertyInfoRed__YOL_y","thermodynamics-result__propertyInfoBlue":"ThermodynamicsResult_thermodynamics-result__propertyInfoBlue__rWsAh","thermodynamics-result__table":"ThermodynamicsResult_thermodynamics-result__table__GBPtO"}},98978:e=>{e.exports=function(e,l){return e<l}}},e=>{e.O(0,[347,4155,9509,4519,3184,1574,2671,5493,9491,8965,4591,636,6593,8792],()=>e(e.s=9876)),_N_E=e.O()}]); 2 3/* BUILD_VERSION: Release_2026_09_11.20260924.88.11043.8ef1def63 Time: Thu Sep 24 17:39:07 UTC 2026 */
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.