(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{45:function(e,t,s){},46:function(e,t,s){},74:function(e,t,s){"use strict";s.r(t);var l=s(2),a=s.n(l),r=s(16),n=s.n(r),c=(s(45),s(46),s(17)),i=s(5),o=s(7),u=s(38),d=s(1),j=function(e){var t=Object(l.useState)(!1),s=Object(o.a)(t,2),a=s[0],r=s[1];return Object(d.jsxs)("div",{className:e.className+" header-component--root bg-white flex flex-col",children:[Object(d.jsxs)("div",{className:"flex flex-row-reverse justify-end md:flex-row md:justify-start items-center gap-4 md:gap-8 px-1 border-b border-blue-100 h-full ",children:[Object(d.jsx)("div",{className:"header-component--logo py-1",children:Object(d.jsx)("h1",{className:"text-xl font-semibold break-all",children:Object(d.jsxs)(c.b,{exact:!0,to:"/",children:["","ProperScience.net"]})})}),Object(d.jsx)("div",{className:"header-component--menu flex flex-row justify-between",children:Object(d.jsxs)("nav",{className:"h-full",children:[Object(d.jsxs)("ul",{className:"hidden md:flex flex-row justify-between XXXgap-4 items-center border rounded-md",children:[Object(d.jsx)("li",{className:"px-4 border-r rounded-tl-md rounded-bl-md",children:Object(d.jsx)(c.b,{exact:!0,to:"/",activeClassName:"active",className:"",children:"Home"})}),Object(d.jsx)("li",{className:"px-4 rounded-tr-md rounded-br-md",children:Object(d.jsx)(c.b,{to:"/exoplanets",activeClassName:"active",children:"Exoplanets Search"})})]}),Object(d.jsx)("div",{onClick:function(e){r(!a)},className:(a?"bg-blue-300 ":"")+"md:hidden border rounded-md p-2 cursor-pointer",children:Object(d.jsx)(u.a,{})})]})})]}),Object(d.jsxs)("div",{className:(a?"":"hidden")+" font-semibold transition duration-500",children:[Object(d.jsx)(c.b,{exact:!0,to:"/",activeClassName:"active",className:"block bg-black text-white hover:bg-blue-300",onClick:function(){return r(!1)},children:"Home"}),Object(d.jsx)(c.b,{to:"/exoplanets",activeClassName:"active",className:"block bg-black text-white hover:bg-blue-300",onClick:function(){return r(!1)},children:"Exoplanets Search"})]})]})},b=s(19),m=s.n(b),x=function(e){var t=null!==e.plus&&null!==e.minus,s=t&&Math.abs(e.plus)===Math.abs(e.minus);return t?Object(d.jsx)("div",{className:e.className+" plus-minus-error-component--root inline-block rounded-full text-xs",children:Object(d.jsx)("div",{className:"flex flex-col h-full justify-around items-center",children:Object(d.jsxs)("div",{className:"flex flex-row",children:["(",s?Object(d.jsx)("span",{children:"\xb1"}):"",s?"":"+",e.plus,s?"":"/"+e.minus,")"]})})}):""},p=s(12),h=s(13),O=s(15),f=s(14),v=function(e){Object(O.a)(s,e);var t=Object(f.a)(s);function s(){return Object(p.a)(this,s),t.apply(this,arguments)}return Object(h.a)(s,[{key:"render",value:function(){return Object(d.jsx)("div",{className:"diagram relative w-full h-full flex flex-row justify-center items-center",children:Object(d.jsxs)("svg",{version:"1.1",baseProfile:"full",xlmns:"http://www/w3/org/2000/svg",width:"100%",height:"100%",className:"mx-auto",children:[Object(d.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),Object(d.jsx)("circle",{cx:"25%",cy:"50%",r:"5%",fill:"blue"}),Object(d.jsx)("text",{x:"25%",y:"65%",fontSize:"80%",textAnchor:"middle",fill:"white",children:"Earth"}),Object(d.jsx)("circle",{cx:"75%",cy:"50%",r:5*this.props.result.pl_rade+"%",fill:"gray"}),Object(d.jsx)("text",{x:"75%",y:"65%",fontSize:"80%",textAnchor:"middle",fill:"white",children:this.props.result.pl_name})]})})}}]),s}(l.Component);v.defaultProps={result:null};var N=v;function g(e){console.log("in Field()"),console.log("props: ",e);var t=e.units&&e.unitsName?e.unitsName:"";return Object(d.jsxs)("div",{className:"exoplanet-search-result-component--field flex flex-row py-0.5",children:[Object(d.jsxs)("span",{className:"font-bold w-32",children:[e.label,":\xa0"]}),Object(d.jsx)("div",{children:null!==e.value?Object(d.jsxs)(d.Fragment,{children:[Object(d.jsxs)("span",{title:t,children:[e.value," ",e.units]}),Object(d.jsx)(x,{className:"mx-2",plus:e.errorPlus,minus:e.errorMinus})]}):Object(d.jsx)("span",{})})]})}g.defaultProps={label:null,fieldName:null,value:null,errorPlus:null,errorMinus:null,units:null,unitsName:null};var w={earth:{code:"Earth",hexCode:"2295",description:"Earth"},sun:{code:"Sun",hexCode:"2609",description:"Sun"}};function y(e){var t={__html:"&#x"+w[e.code].hexCode+";"};return Object(d.jsx)("span",{dangerouslySetInnerHTML:t})}y.defaultProps={code:null};var _=function(e){return Object(d.jsx)("div",{className:"exoplanet-search-result-component--root text-sm bg-white p-2 rounded-md shadow-proper my-2",children:Object(d.jsxs)("div",{className:"flex flex-col md:flex-row",children:[Object(d.jsxs)("div",{className:"planet w-full md:w-4/12",children:[Object(d.jsx)("h2",{className:"font-bold text-lg border-b border-black",children:"Planet"}),Object(d.jsx)(g,{label:"Name",value:e.result.pl_name}),Object(d.jsx)(g,{label:"Mass",value:e.result.pl_masse,errorPlus:e.result.pl_masseerr1,errorMinus:e.result.pl_masseerr2,units:Object(d.jsxs)("span",{children:["M",Object(d.jsx)("sub",{children:Object(d.jsx)(y,{code:"earth"})})]}),unitsName:"Earth masses"}),Object(d.jsx)(g,{label:"Radius",value:e.result.pl_rade,errorPlus:e.result.pl_radeerr1,errorMinus:e.result.pl_radeerr2,units:Object(d.jsxs)("span",{children:["R",Object(d.jsx)("sub",{children:Object(d.jsx)(y,{code:"earth"})})]}),unitsName:"Earth radiuses"}),Object(d.jsx)(g,{label:"Orbital Period",value:e.result.pl_orbper,errorPlus:e.result.pl_orbpererr1,errorMinus:e.result.pl_orbpererr2,units:"days"}),Object(d.jsx)(g,{label:"Semi-major Axis",value:e.result.pl_orbsmax,errorPlus:e.result.pl_orbsmaxerr1,errorMinus:e.result.pl_orbsmaxerr2,units:"AU",unitsName:"Astronomical Units (1 AU = distance from Sun to Earth)"}),Object(d.jsx)(g,{label:"RA",value:e.result.ra}),Object(d.jsx)(g,{label:"Dec",value:e.result.dec}),Object(d.jsx)(g,{label:"Temperature",value:e.result.pl_eqt,errorPlus:e.result.pl_eqterr1,errorMinus:e.result.pl_eqterr2,units:"K"})]}),Object(d.jsx)("div",{className:"star w-full md:w-4/12 px-1 rounded-sm",children:Object(d.jsxs)("div",{className:"bg-yellow-100 p-1 h-full",children:[Object(d.jsx)("h2",{className:"font-bold text-lg border-b border-black",children:"Host star"}),Object(d.jsx)(g,{label:"Name",value:e.result.hostname}),Object(d.jsx)(g,{label:"Mass",value:e.result.st_mass,errorPlus:e.result.st_masserr1,errorMinus:e.result.st_masserr2,units:Object(d.jsxs)("span",{children:["M",Object(d.jsx)("sub",{children:Object(d.jsx)(y,{code:"sun"})})]}),unitsName:"Solar masses"}),Object(d.jsx)(g,{label:"Luminosity",value:e.result.st_lum,errorPlus:e.result.st_lumerr1,errorMinus:e.result.st_lumerr2,units:Object(d.jsxs)("span",{children:["L",Object(d.jsx)("sub",{children:Object(d.jsx)(y,{code:"sun"})})]}),unitsName:"log(Solar luminosities)"}),Object(d.jsx)(g,{label:"Spectral Type",value:e.result.st_spectype}),Object(d.jsx)(g,{label:"Radius",value:e.result.st_rad,errorPlus:e.result.st_raderr1,errorMinus:e.result.st_raderr2,units:Object(d.jsxs)("span",{children:["R",Object(d.jsx)("sub",{children:Object(d.jsx)(y,{code:"sun"})})]}),unitsName:"Solar radii"}),Object(d.jsx)(g,{label:Object(d.jsxs)("span",{children:["T",Object(d.jsx)("sub",{children:"eff"})]}),value:e.result.st_teff,errorPlus:e.result.st_tefferr1,errorMinus:e.result.st_tefferr2,units:"K"})]})}),Object(d.jsx)("div",{className:"diagram-container w-full md:w-4/12",children:Object(d.jsx)("div",{className:"h-full flex-flex-row justify-center items-center",children:Object(d.jsx)(N,{result:e.result})})})]})})};function M(e){return Object(d.jsx)("div",{className:"border border-blue-200 shadow rounded-md p-4 w-full mx-auto my-2",children:Object(d.jsxs)("div",{className:"animate-pulse flex flex-row space-x-4",children:[Object(d.jsxs)("div",{className:"planet w-4/12 space-y-2",children:[Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-2/6 mb-4"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-5/6"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-4/6"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-4/6"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-5/6"})]}),Object(d.jsxs)("div",{className:"star w-4/12 space-y-2",children:[Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-2/6 mb-4"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-5/6"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-4/6"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-5/6"})]}),Object(d.jsxs)("div",{className:"diagram flex flex-row justify-center items-center w-4/12",children:[Object(d.jsx)("div",{className:"w-6/12 flex justify-center items-center",children:Object(d.jsx)("div",{className:"rounded-full bg-blue-300 h-6 w-6"})}),Object(d.jsx)("div",{className:"w-6/12 flex justify-center items-center",children:Object(d.jsx)("div",{className:"rounded-full bg-blue-300 h-10 w-10"})})]})]})})}var S=function(e){Object(O.a)(s,e);var t=Object(f.a)(s);function s(){return Object(p.a)(this,s),t.apply(this,arguments)}return Object(h.a)(s,[{key:"render",value:function(){var e=this;return Object(d.jsxs)("div",{className:this.props.className+" flex flex-col bg-blue-200 pl-1 pr-2 mr-2 shadow",children:[Object(d.jsxs)("div",{className:"flex flex-row items-center",children:[Object(d.jsxs)("label",{className:"font-bold",children:[this.props.label,":"]}),Object(d.jsxs)("div",{className:"text-xs font-semibold ml-1 my-1 rounded-sm",children:["Min:",Object(d.jsx)("input",{type:"number",value:this.props.minValue,min:this.props.inputMin,max:this.props.inputMax,step:this.props.inputStep,onChange:function(t){return e.props.onMinChange(t)},className:"w-16 text-center ml-1 rounded-sm"})]}),Object(d.jsxs)("div",{className:"text-xs font-semibold ml-1 my-1 rounded-sm",children:["Max:",Object(d.jsx)("input",{type:"number",value:this.props.maxValue,min:this.props.inputMin,max:this.props.inputMax,step:this.props.inputStep,onChange:function(t){return e.props.onMaxChange(t)},className:"w-16 text-center ml-1 rounded-sm"})]})]}),this.props.units?Object(d.jsxs)("div",{className:"text-xs text-center",children:[" (",this.props.units,") "]}):""]})}}]),s}(l.Component);S.defaultProps={label:"",minValue:1,maxValue:1,inputMin:"0",inputMax:"10",onMinChange:null,onMaxChange:null};var C=S,E=s(39),k=s(20),X=["pl_name","ra","dec","pl_masse","pl_masseerr1","pl_masseerr2","pl_rade","pl_radeerr1","pl_radeerr2","pl_orbper","pl_orbpererr1","pl_orbpererr2","pl_orbsmax","pl_orbsmaxerr1","pl_orbsmaxerr2","pl_eqt","pl_eqterr1","pl_eqterr2","hostname","st_mass","st_masserr1","st_masserr2","st_lum","st_lumerr1","st_lumerr2","st_spectype","st_rad","st_raderr1","st_raderr2","st_teff","st_tefferr1","st_tefferr2"].join(","),P=function(e){var t=Object(l.useState)(e.minEarthMass),s=Object(o.a)(t,2),a=s[0],r=s[1],n=Object(l.useState)(e.maxEarthMass),c=Object(o.a)(n,2),i=c[0],u=c[1],j=Object(l.useState)(e.minEarthRadius),b=Object(o.a)(j,2),m=b[0],x=b[1],p=Object(l.useState)(e.maxEarthRadius),h=Object(o.a)(p,2),O=h[0],f=h[1],v=Object(l.useState)(e.minEquilibriumTemp),N=Object(o.a)(v,2),g=N[0],w=N[1],y=Object(l.useState)(e.maxEquilibriumTemp),_=Object(o.a)(y,2),M=_[0],S=_[1],P=Object(l.useState)(null),R=Object(o.a)(P,2),q=R[0],A=R[1];return Object(l.useEffect)((function(){A("".concat("https://exoplanetarchive.ipac.caltech.edu/TAP/sync","?query=").concat("select+".concat(X,"+from+ps")+"+where+upper(soltype)+like+'%CONF%'"+"+and+pl_masse+between+".concat(a,"+and+").concat(i)+"+and+pl_rade+between+".concat(m,"+and+").concat(O)+"+and+pl_eqt+between+".concat(g,"+and+").concat(M)+"&format=json")),"function"===typeof e.onUpdate&&e.onUpdate(q)}),[e,a,i,m,O,g,M,q]),Object(d.jsxs)("div",{className:"exoplanet-tap-query-component--root rounded-md my-1",children:[Object(d.jsxs)("div",{className:"exoplanet-tap-query-component--controls mb-2 flex flex-row flex-wrap justify-start w-full",children:[Object(d.jsx)(C,{label:"Mass",className:"my-1 sm:my-0",minValue:a,maxValue:i,onMinChange:function(e){r(e.target.value)},onMaxChange:function(e){u(e.target.value)},inputMin:"0.01",inputMax:"10",inputStep:"0.1",units:"Earth masses"}),Object(d.jsx)(C,{label:"Radius",className:"my-1 sm:my-0",minValue:m,maxValue:O,onMinChange:function(e){x(e.target.value)},onMaxChange:function(e){f(e.target.value)},inputMin:"0.01",inputMax:"10",inputStep:"0.1",units:"Earth radiuses"}),Object(d.jsx)(C,{label:"Temperature",className:"my-1 sm:my-0",minValue:g,maxValue:M,onMinChange:function(e){w(e.target.value)},onMaxChange:function(e){S(e.target.value)},inputMin:"0",inputMax:"",inputStep:"20",units:"Kelvin"})]}),Object(d.jsxs)("div",{className:"w-full text-xs break-all mt-4 XXXmy-2 XXXpx-2 flex flex-row XXXspace-x-2 justify-between items-center",children:[Object(d.jsx)("div",{children:"Request:"}),Object(d.jsx)("div",{className:"flex-grow XXXw-full px-2",children:Object(d.jsx)("input",{type:"text",readOnly:!0,value:q||"",className:"w-full"})}),Object(d.jsx)("span",{className:"XXXml-4 h-full XXXhover:bg-blue-300 hover:cursor-pointer",onClick:function(e){return navigator.clipboard.writeText(q),void k.NotificationManager.success("Request copied to clipboard")},children:Object(d.jsx)(E.a,{className:"text-lg cursor-pointer"})})]})]})};P.defaultProps={minEarthMass:.25,maxEarthMass:50,minEarthRadius:.25,maxEarthRadius:20,minEquilibriumTemp:200,maxEquilibriumTemp:400,onUpdate:null};var R=P,q=function(e){var t=Object(l.useState)([]),s=Object(o.a)(t,2),a=s[0],r=s[1],n=Object(l.useState)(""),c=Object(o.a)(n,2),i=c[0],u=c[1],j=Object(l.useState)(!1),b=Object(o.a)(j,2),x=b[0],p=b[1];return Object(l.useEffect)((function(){document.title="Exoplanets Search :: ProperScience.net"}),[]),Object(d.jsxs)("div",{className:"expolanet-search-component--root bg-white p-2 shadow-proper rounded-md\n ".concat(x?"cursor-wait":"cursor-normal","\n "),children:[Object(d.jsx)("h2",{className:"font-bold text-xl",children:"(Confirmed) Exoplanet Search"}),Object(d.jsxs)("p",{className:"text-xs",children:["Uses the ",Object(d.jsx)("a",{href:"https://exoplanetarchive.ipac.caltech.edu/docs/API_PS_columns.html",target:"_blank",children:"NASA Exoplanet Archive"})]}),Object(d.jsx)("div",{className:"nasa-api-test-1-component--controls bg-blue-100 my-2 p-2 rounded-lg shadow",children:Object(d.jsxs)("div",{className:"nasa-api-test-1-component--controls--query flex flex-col",children:[Object(d.jsx)(R,{onUpdate:function(e){u(e)}}),Object(d.jsx)("div",{className:"text-center",children:Object(d.jsx)("button",{className:"test-query-1 apply--filters-submit-button",onClick:function(e){p(!0),m.a.post("https://dev.properscience.net/api/fetchNasaExoplanetsData",{url:i}).then((function(e){r(e.data),p(!1)})).catch((function(e){console.log("ERROR ERROR "),console.log("response: ",e)}))},disabled:!!x,children:"Update"})})]})}),Object(d.jsxs)("div",{className:"nasa-api-test-1-component--results my-2 p-2 rounded-lg shadow-proper",children:[Object(d.jsxs)("h2",{className:"font-bold text-lg border-b-2 border-blue-400",children:["Results (",Object(d.jsx)("small",{children:a.length}),")"]}),x?[1,2,3].map((function(e,t){return Object(d.jsx)(M,{},t)})):Object(d.jsx)("ul",{children:a.map((function(e,t){return Object(d.jsx)("li",{children:Object(d.jsx)(_,{result:e})},t)}))})]})]})};q.defaultProps={};var A=q,T=s(18),V=function(e){return Object(d.jsxs)("div",{className:e.className+" video-content-item-component--root flex flex-col justify-between h-full",children:[Object(d.jsx)("h3",{className:"font-bold text-xl",children:e.result.data.title}),Object(d.jsx)("div",{children:Object(d.jsxs)("a",{href:e.result.data.url,rel:"noreferrer",target:"_blank",children:[Object(d.jsx)("img",{className:"float-right ml-2 w-24",src:e.result.data.thumbnail_image_link,alt:"video thumbnail"}),Object(d.jsx)("h3",{className:"text-sm",children:e.result.title})]})}),Object(d.jsxs)("div",{className:"pt-1",children:[Object(d.jsx)("hr",{className:"h-2"}),Object(d.jsx)("p",{className:"text-xs",children:e.result.data.channel?Object(d.jsx)("a",{href:e.result.data.channel,rel:"noreferrer",target:"_blank",children:e.result.data.author}):e.result.data.author})]})]})};V.defaultProps={className:"",result:null};var I=V,U=function(e){return Object(d.jsxs)("div",{className:"animate-pulse cursor-not-allowed border border-blue-200 shadow rounded-md p-4 w-full mx-auto XXXmy-2",children:[Object(d.jsxs)("div",{className:"flex flex-row space-x-4",children:[Object(d.jsxs)("div",{className:"details w-6/12 space-y-2",children:[Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-3/6 mb-4"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-5/6"}),Object(d.jsx)("div",{className:"h-4 bg-blue-300 rounded w-4/6"})]}),Object(d.jsx)("div",{className:"image w-6/12 space-y-2",children:Object(d.jsx)("div",{className:"h-4 bg-blue-300 h-5/6"})})]}),Object(d.jsx)("hr",{className:"XXXborder-t my-2 bg-blue-300"}),Object(d.jsx)("div",{className:"h-3 bg-blue-300 rounded w-5/6"})]})},F=function(e){Object(O.a)(s,e);var t=Object(f.a)(s);function s(){var e;Object(p.a)(this,s);for(var l=arguments.length,a=new Array(l),r=0;r