1var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,s=(t,a,n)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n,o=(e,t)=>{for(var a in t||(t={}))i.call(t,a)&&s(e,a,t[a]);if(n)for(var a of n(t))r.call(t,a)&&s(e,a,t[a]);return e},l=(e,n)=>t(e,a(n)),c=(e,t)=>{var a={};for(var s in e)i.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(null!=e&&n)for(var s of n(e))t.indexOf(s)<0&&r.call(e,s)&&(a[s]=e[s]);return a},d=(e,t,a)=>(s(e,"symbol"!=typeof t?t+"":t,a),a);import{r as m,j as p,T as u,u as h,L as v,a as g,b as y,m as b,c as _,f as N,d as f,e as C,l as S,g as x,h as A,i as I,k as w,n as T,o as R,F as k,O as E,D as M,S as D,B as P,p as L,H as B,C as O,I as F,q as H,s as U,t as z,v as G,w as q,x as W,y as V,z as Y,A as j,E as $,G as Q,J as K,K as X,M as Z,N as J,P as ee,Q as te,R as ae,U as ne,W as ie,V as re,X as se,Y as oe,Z as le,_ as ce,$ as de,a0 as me,a1 as pe,a2 as ue,a3 as he,a4 as ve,a5 as ge,a6 as ye,a7 as be,a8 as _e,a9 as Ne,aa as fe,ab as Ce,ac as Se,ad as xe,ae as Ae,af as Ie,ag as we,ah as Te,ai as Re,aj as ke,ak as Ee,al as Me,am as De,an as Pe,ao as Le,ap as Be,aq as Oe,ar as Fe,as as He,at as Ue,au as ze,av as Ge,aw as qe,ax as We,ay as Ve,az as Ye,aA as je,aB as $e,aC as Qe,aD as Ke,aE as Xe,aF as Ze,aG as Je,aH as et,aI as tt,aJ as at,aK as nt,aL as it,aM as rt,aN as st,aO as ot,aP as lt,aQ as ct,aR as dt,aS as mt,aT as pt,aU as ut,aV as ht,aW as vt,aX as gt,aY as yt,aZ as bt,a_ as _t,a$ as Nt,b0 as ft,b1 as Ct,b2 as St,b3 as xt,b4 as At}from"./vendor.ef7fe251.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const a of e)if("childList"===a.type)for(const e of a.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const It={},wt=function(e,t){return t&&0!==t.length?Promise.all(t.map((e=>{if((e=`/${e}`)in It)return;It[e]=!0;const t=e.endsWith(".css"),a=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${a}`))return;const n=document.createElement("link");return n.rel=t?"stylesheet":"modulepreload",t||(n.as="script",n.crossOrigin=""),n.href=e,document.head.appendChild(n),t?new Promise(((e,t)=>{n.addEventListener("load",e),n.addEventListener("error",t)})):void 0}))).then((()=>e())):e()};var Tt,Rt;(Rt=Tt||(Tt={})).NOT_FOUND="*",Rt.HOME="/",Rt.HOME_OLD_WEBSITE_PATCH="/home",Rt.NO_TO_LINK="#",Rt.NEW_CUSTOMER="/new-customer",Rt.MY_PROFILE="launchpad/user-settings",Rt.CHANGE_EMAIL="/my-profile/change-email",Rt.REPORT_VERIFICATION="/wreports/:reportNumber",Rt.LOGIN="/login",Rt.REGISTRATION="/signup",Rt.REQUEST_PASSWORD_RESET="/request-reset-password",Rt.RESET_PASSWORD="/reset-password/:token",Rt.VERIFY_ACCOUNT="confirmation/:token",Rt.CATEGORIES="/categories",Rt.SALE="/sale",Rt.CONTACT_US="/contact-us",Rt.GLOBAL_SEARCH="/global-search",Rt.TEAMS="/teams",Rt.PRIVACY="/privacy",Rt.SECURITY="/security",Rt.TERMS_AND_CONDITIONS_AND_CREDIT_AGREEMENT="/terms-and-conditions-and-credit-agreement",Rt.TERMS_AND_CONDITIONS="/terms-and-conditions",Rt.USERS="/users",Rt.ADD_USER="/u
1sers/add",Rt.CAREERS="/careers",Rt.EDIT_USER="/users/edit",Rt.SEARCH="/search",Rt.ABOUT_US="/about-us",Rt.OUR_STORY="/about-us/our-story",Rt.ETS_DIFFERENCE="/about-us/the-ets-difference",Rt.PEOPLE="/about-us/people",Rt.QUALITY="/about-us/quality",Rt.APPLIED_INNOVATION="/about-us/applied-innovation",Rt.SEMINARS="/about-us/seminars",Rt.OUR_SERVICES="/our-services",Rt.SERVICES="/our-services/services",Rt.ANALYSIS_REPORTS="/our-services/analysis-reports",Rt.VINTAGE_PORTALCMS="/our-services/vintage-portal",Rt.EXPERTISE_ON_CALL="/our-services/expertise-on-call",Rt.VINTAGE_REPORTS="/our-services/vintage-reports",Rt.ANALYSES="/analyses",Rt.ALL_ANALYSES="/analyses/all-analyses",Rt.ALL_ANALYSES_OLD_WEBSITE_PATCH="/analyses/analysis/all-analyses",Rt.ANALYSES_DETAILS="/analyses/analysis/:id",Rt.ANALYSES_DETAILS_OLD_WEBSITE_PATCH="/analyses/:id",Rt.EXPORTING_ANALYSES="/analyses/exporting",Rt.EXPORTING_ANALYSES_OLD_WEBSITE_PATCH="analyses/analysis/exporting",Rt.EXPORTING_ANALYSES_GOOGLE_CACHED_LINK="/analyses/exports",Rt.PUBLICATIONS="/publications",Rt.PUBLICATIONS_OLD_WEBSITE_PATCH="/library",Rt.PUBLICATION="/publications/publication/:id",Rt.PUBLICATION_OLD_WEBSITE_PATCH="/library/:id",Rt.LOCATIONS="/locations",Rt.DROPBOX_LOCATIONS="/locations/#sample-dropboxes",Rt.CONTACT="/contact",Rt.LAUNCHPAD="/launchpad",Rt.CLIENTS="/launchpad/clients",Rt.NEW_CLIENT="/launchpad/new-client",Rt.DASHBOARD="/dashboard",Rt.RESULTS="/dashboard/results",Rt.VINTAGE_PORTAL="/dashboard/vintage-portal",Rt.SMOKE_IMPACT_REPORTS="/dashboard/smoke-impact-report",Rt.BILLING="/dashboard/billing",Rt.PAYMENT_METHODS="/dashboard/billing/payment-methods",Rt.TEAM_SETTINGS="/dashboard/teams-settings",Rt.CLIENT_SETTINGS="/dashboard/client-settings",Rt.SHOP="/dashboard/shop",Rt.REQUEST_COURIER="/dashboard/shop/request-courier",Rt.ORDER_ANALYSES="/dashboard/shop/order-analyses",Rt.ORDER_SUPPLIES="/dashboard/shop/order-supplies",Rt.TECHNICAL_TOOLS="/technical-tools",Rt.SAMPLE_DETAILS="/dashboard/results/group/:batchId/sample/:sampleId",Rt.ANALYSIS_DETAILS="/dashboard/results/group/:batchId/sample/:sampleId/analysis/:id",Rt.ACCEPT_INVITATION="/accept-invitation/:token",Rt.RECEIPT="/dashboard/billing/receipt",Rt.SUSTAINABILITY="/sustainability",Rt.POSITIVE_PAY="/positive-pay",Rt.ACCREDITATION="/accreditation",Rt.TERRAMEA="/terramea",Rt.PESTICIDE_PANEL="/analysis/additions/pesticide-panel",Rt.NMR_HOME="/nmr",Rt.NMR_SAMPLES="/nmr/samples",Rt.NMR_COMPARE="/nmr/compare-samples",Rt.NMR_GENERATED_REPORT="/nmr/generated-reports/:reportId/:reportType",Rt.NMR_REPORTS="/nmr/reports",Rt.NMR_ABOUT="/nmr/about",Rt.NMR_HELP="/nmr/help",Rt.NMR_FAQ="/nmr/faq",Rt.NMR_CONTACT="/nmr/contact";const kt=[{routesToMatch:[Tt.QUALITY,Tt.ETS_DIFFERENCE,Tt.OUR_STORY,Tt.APPLIED_INNOVATION,Tt.SEMINARS],links:[{labelKey:"nav-our-story",pathname:Tt.OUR_STORY},{labelKey:"nav-the-ets-difference",pathname:Tt.ETS_DIFFERENCE},{labelKey:"nav-quality",pathname:Tt.QUALITY},{labelKey:"nav-applied-innovation",pathname:Tt.APPLIED_INNOVATION},{labelKey:"nav-seminars",pathname:Tt.SEMINARS}],isBeta:[!1,!1,!1,!1,!1,!1]}];var Et,Mt;(Mt=Et||(Et={})).EN="en",Mt.DE="de";var Dt=Et;const Pt=Dt.EN;var Lt,Bt;(Bt=Lt||(Lt={})).appLang="app-lang",Bt.token="token",Bt.refreshToken="refresh-token",Bt.user="user",Bt.isLoggedIn="isLoggedIn",Bt.activeClient="active-client",Bt.sharedQueryOptions="sharedQueryOptions",Bt.samplesQueryOptions="samplesQueryOptions",Bt.analysisQueryOptions="analysisQueryOptions",Bt.billingFilters="billingFilters";var Ot=Lt;const Ft=()=>{try{window.localStorage.clear()}catch(e){console.error("Error on local storage clear function - ",e)}},Ht=e=>{try{const t=window.localStorage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){console.error(`Can not get item with key ${e} from local storage - `,t)}return null},Ut=(e,t)=>{try{window.localStorage.setItem(e,JSON.stringify(t))}catch(a){console.error(`Can not get item with key ${e} from local storage - `,a)}},zt=Ht(Ot.appLang),Gt=[Dt.EN,Dt.DE],qt=m.exports.createContext({language:null!=zt?zt:Pt,setLanguage:()=>{console.log("No provider available. ")},t:()=>""}),Wt=()=>{const{t:e}=m.exports.useContext(qt);return e},Vt=e=>{var t=e,{children:a,variant:n}=t,i=c(t,["children","variant"]);return p(u,l(o({variant:n},i),{children:a}))},Yt=e=>{var t=e,{children:a}=t,n=c(t,["children"]);return p(u,l(o({variantMapping:{label:"label"},variant:"label"}
1,n),{children:a}))},jt=e=>{var t=e,{children:a,color:n,variant:i,underline:r}=t,s=c(t,["children","color","variant","underline"]);const{palette:d}=h();return p(v,l(o({variant:i||"link",underline:r||"none",color:n||d.text.primary,component:g},s),{children:a}))},$t=e=>{var t=e,{children:a,variant:n="p"}=t,i=c(t,["children","variant"]);return p(u,l(o({variantMapping:{p:"p",standard:"p",small:"p",extraSmall:"p",big:"p",bigSerif:"p",intro:"p",introSerif:"p",standardMedium:"p"},variant:n},i),{children:a}))},Qt=(e,t=0)=>{const[a,n]=m.exports.useState(e);return m.exports.useEffect((()=>{const a=setTimeout((()=>{n(e)}),t);return()=>{clearTimeout(a)}}),[e,t]),a},Kt=()=>{const e=y(),t=!!b({path:Tt.LOGIN,end:!0},e.pathname),a=!!b({path:Tt.REQUEST_PASSWORD_RESET,end:!1},e.pathname),n=!!b({path:Tt.RESET_PASSWORD,end:!1},e.pathname),i=!!b({path:Tt.REGISTRATION,end:!1},e.pathname),r=!!b({path:Tt.VERIFY_ACCOUNT,end:!1},e.pathname),s=!!b({path:Tt.REPORT_VERIFICATION,end:!1},e.pathname),o=!!b({path:Tt.HOME,end:!0},e.pathname),l=!!b({path:Tt.TERRAMEA,end:!0},e.pathname);return t||a||i||n||r||s||l||o},Xt=class{static getInstance(){return _.defaults.withCredentials=!0,Xt.instance||(Xt.instance=_.create({baseURL:"https://webapi.etslabs.com/",timeout:12e4})),Xt.instance}};let Zt=Xt;d(Zt,"instance");const Jt=new class{get token(){return Ht(Ot.token)}set token(e){Ut(Ot.token,e)}get refreshToken(){return Ht(Ot.token)}set refreshToken(e){Ut(Ot.refreshToken,e)}clear(){this.token=null,this.refreshToken=null}};function ea(e){if(e.status>=200&&e.status<300)return e;throw e.data}const ta=e=>{(e=>{e.interceptors.request.use((e=>(((e,t)=>{t&&e.headers.set("Authorization",`Bearer ${t}`)})(e,Jt.token),e)),(e=>Promise.reject(e)))})(e),(e=>{e.interceptors.response.use((e=>e),(e=>{if(!e.response)throw"Network Error"===e.message?(console.error("Network error - server is probably down"),console.error("StatusText: ",e.statusText),console.error("Network Error Request: ",e.request),console.error("Network Error Headers: ",e.headers),console.error("Network Error Config: ",e.config),console.error("Network Error Response: ",e.response),console.error("Network Error : ",e),e):(console.error("Unknown error",e),e);switch(e.response.status){case 401:case 403:if(window.location.href.includes(Tt.LOGIN))break;Ft(),window.location.href=Tt.LOGIN}return e.response}))})(e)};const aa=new class{constructor(){d(this,"_httpClient",Zt.getInstance()),ta(this._httpClient)}responseHandler({data:e}){return e}async get(e,t){return ea(await this._httpClient.get(e,t))}async post(e,t,a){return ea(await this._httpClient.post(e,t,a))}async put(e,t,a){return ea(await this._httpClient.put(e,t,a))}async delete(e){return ea(await this._httpClient.delete(e))}},na=(e,t)=>(e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e)(e)?((e,t,a)=>Object.entries(e).reduce(((n,[i,r])=>l(o({},n),{[t(i)]:e[i]instanceof Date?e[i]:a(e[i],t)})),{}))(e,t,na):Array.isArray(e)?e.map((e=>na(e,t))):e,ia=(e,t="hh.mm a")=>e&&!Number.isNaN(Date.parse(e))?N(new Date(Date.parse(e)),t):"",ra=e=>!e||0===Object.keys(e).length,sa=/([-_][a-z])/gi,oa=e=>e[0].toLowerCase()+e.slice(1).replace(sa,(e=>e.toUpperCase().replace("-","").replace("_",""))),la=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,ca=e=>{var t,a;return null!=(a=null==(t=null==e?void 0:e.match(la))?void 0:t.map((e=>e.toLowerCase())).join("_"))?a:""};const da=new class{async login(e){const{user:t,success:a}=aa.responseHandler(await aa.post("/login.json",e));return na({user:t,success:a},oa)}async checkIfUserEmailIsTaken(e){return aa.responseHandler(await aa.post("/users/does_user_exist.json",e))}async register(e){return aa.responseHandler(await aa.post("/users.json",e))}async verifyAccount({confirmationToken:e}){return aa.responseHandler(await aa.get(`/confirmation/${e}.json`))}async acceptInvitation(e){const t=aa.responseHandler(await aa.get(`/memberships/${e}/accept`));return na(t,oa)}async completeSignUpAsInvitedNonRegisteredUser(e){return await aa.post("/users/complete_signup",na(e,ca))}async requestPasswordReset(e){return await aa.post("/password.json",e)}async resetPassword(e,t){const a={password:t.password,confirm_password:t.passwordConfirmation,reset_password_token:e};return await aa.post("/password/reset.json",a)}async logout(){return await aa.delete("/logout.json")}};var ma,pa;(pa=ma||(ma={})).CREDIT_HOLD="Credit Hold",pa.APPROVED="Approved",pa.REVIEW="Review",pa.DENIED="Denied",pa.PEND
1ING_APPROVAL="Pending Approval",pa.NONE="none";var ua,ha,va=ma;(ha=ua||(ua={})).ADMINISTRATOR="Administrator",ha.FULL_USER="Full User",ha.REPORTING_USER="Reporting User",ha.BILLING_USER="Billing User";var ga=ua;const ya={addresses:[],apiClass:"",apiModifiedAt:"",apiSyncedAt:"",businessType:"",code:"",createdAt:"",faxes:[],id:0,lastFetchAt:"",lastPrunedAt:null,lockVersion:0,mostRecentPhone:"",name:"",officialBusinessName:null,primaryPhone:"",stateRegisteredIn:null,status:va.NONE,teamMembers:[],updatedAt:"",resignAgreement:!1,receivesMailedDocuments:!1},ba={administrator:!1,apiModifiedAt:"",apiSyncedAt:null,clientList:[],clients:[],createdAt:"",email:"",firstname:"",godmode:!1,id:0,isBetaUser:"",lastClientId:0,lastname:"",phone:"",pid:"",updatedAt:""},_a=m.exports.createContext({authenticatedUser:{isLoggedIn:!1,user:ba},setAuthenticatedUser:()=>console.log("MISSING PROVIDER AuthenticatedUser!"),activeClient:ya,setActiveClient:()=>console.log("MISSING PROVIDER ActiveClient!")}),Na=m.exports.createContext({open:(e,t)=>console.log(e,t)}),fa=(e,t)=>e&&"string"==typeof e?e:e.message?e.message:e.error?e.error:t,Ca=()=>{const e=Wt(),t=m.exports.useContext(Na),{setAuthenticatedUser:a,setActiveClient:n}=m.exports.useContext(_a),i=f(),r=C(),{state:s}=y(),{update:o,trackEvent:l}=S();return x(da.login,{onSuccess:({user:e,success:t})=>{var c,d;if(console.log(e),a({user:e,isLoggedIn:t}),r.invalidateQueries(["getAllClients"]),o({email:e.email,name:e.firstname+" "+e.lastname,phone:e.phone,customAttributes:{widget:{activator:"#IntercomDefaultWidget"},user_hash:e.intercomUserHash}}),l("login-succeeded"),e.administrator)i(Tt.LAUNCHPAD);else if(!e.administrator&&e.lastClientId){const t=e.clientList.find((t=>t.id===e.lastClientId));t&&n(t),i(Tt.DASHBOARD)}else i(null!=(d=null==(c=null==s?void 0:s.from)?void 0:c.pathname)?d:Tt.LAUNCHPAD)},onError:a=>{console.log("failed to login",a),l("login-failed"),t.open(fa(a,e("login-error")),{severity:"error"})}})},Sa=()=>{const{setAuthenticatedUser:e,setActiveClient:t}=m.exports.useContext(_a),a=C(),n=f(),{shutdown:i,boot:r}=S();return x(da.logout,{onSuccess:()=>{e({isLoggedIn:!1,user:ba}),t(ya),a.clear(),i(),r(),n(Tt.LOGIN)},onError:e=>{console.error("failed to logout",e)}})},xa=e=>{const{pathname:t}=y();for(let a=0;a<e.length;a+=1){const n=e[a],i=b(n,t);if(null!==i)return i}return null},Aa=()=>{const{pathname:e,hash:t,key:a}=y();m.exports.useEffect((()=>{if(""===t)return document.body.classList.add("allowScrollToTop"),window.scrollTo(0,0),()=>{document.body.classList.remove("allowScrollToTop")};setTimeout((()=>{const e=t.replace("#",""),a=document.getElementById(e);a&&a.scrollIntoView()}),0)}),[e,t,a])};var Ia={container:"SubNavigationTabs_container_1",tabs:"SubNavigationTabs_tabs_8",tabsFlexContainer:"SubNavigationTabs_tabsFlexContainer_8",tab:"SubNavigationTabs_tab_8",active:"SubNavigationTabs_active_26",indicator:"SubNavigationTabs_indicator_29",groupContainer:"SubNavigationTabs_groupContainer_38",tabMenu:"SubNavigationTabs_tabMenu_46"};const wa=({isTextOnlyPageLayout:e,menuItems:t})=>{const a=Wt(),n=h(),i=A(n.breakpoints.up("lg"));return p("div",{className:I(Ia.container,{[Ia.textOnlyPageLayout]:e,[Ia.withImagesPageLayout]:!e}),children:t.map((({links:e,routesToMatch:t},n)=>{var r,s,o,l;return i?p("div",{className:Ia.groupContainer,children:p(w,{orientation:"horizontal",variant:"standard",textColor:"inherit",value:null!=(s=null==(r=xa(t))?void 0:r.pattern.path)&&s,classes:{flexContainer:Ia.tabMenu,indicator:Ia.indicator},children:e.map((({labelKey:e,pathname:t})=>p(T,{label:p($t,{variant:"standard",children:a(e)}),component:g,value:t,to:t,className:I(Ia.tab,{[Ia.active]:!!b({path:t,end:!1},location.pathname)})},e)))},n)},n):p(w,{orientation:"horizontal",variant:"scrollable",scrollButtons:!0,textColor:"inherit",value:null!=(l=null==(o=xa(t))?void 0:o.pattern.path)&&l,classes:{root:Ia.tabs,flexContainer:Ia.tabsFlexContainer,indicator:Ia.indicator},children:e.map((({labelKey:e,pathname:t})=>p(T,{label:p($t,{children:a(e)}),component:g,value:t,to:t,className:I(Ia.tab,{[Ia.active]:!!b({path:t,end:!1},location.pathname)})},e)))},n)}))})},Ta=()=>(Aa(),R(k,{children:[p(wa,{menuItems:kt,isTextOnlyPageLayout:!1}),p(E,{})]}));var Ra={positivePay:"PositivePay_positivePay_1",app:"PositivePay_app_9","form-container":"PositivePay_form-container_20","form-group":"PositivePay_form-group_38",resetButton:"PositivePay_resetButton_66",error:"PositivePay_error_75"};const ka=()=>{const[e,t]=m.exports.useState({accountNumber:"",checkNumber:"",checkDate:"",checkAmount:"",payeeLine1:""}),[a,n]=m.exports.useState(1),[i,r]=m.exports.useState([{id:0,accountNumber:"",checkNumber:"",checkDate:"",checkAmount:"",payeeLine1:""}]),[s,c]=m.exports.useState({}),d=e=>{if(!e)return"";const[t,a,n]=e.split("-");return`${a}/${n}/${t}`},u=()=>{let t={};return/^\d{11}$/.test(e.accountNumber)||(t.accountNumber="Account Number must be 11 digits"),/^\d{1,5}$/.test(e.checkNumber)||(t.checkNumber="Check Number must be 1-5 digits"),e.checkDate||(t.checkDate="Check Date is required"),/^\d+(\.\d{2})?$/.test(e.checkAmount)||(t.checkAmount="Enter a valid dollar amount"),(0===e.payeeLine1.length||e.payeeLine1.length>50)&&(t.payeeLine1="Payee name is required and must be 50 characters or less"),c(t),0===Object.keys(t).length},h=e=>{const{name:a,value:n}=e.target;t((e=>l(o({},e),{[a]:n})))};function v(e){return["I",e.accountNumber.padStart(17,"0"),e.checkNumber.padStart(10,"0"),d(e.checkDate),e.checkAmount.padStart(13,"0"),'"'+e.payeeLine1.padEnd(50,"")+'"','""'].join(",")}const g=e=>{r(i.filter((t=>
1t.id!==e)))},y=[{field:"accountNumber",headerName:"Account Number",headerAlign:"center",align:"left",width:150},{field:"checkNumber",headerName:"Check Number",headerAlign:"center",align:"left",width:130},{field:"checkDate",headerName:"Check Date",headerAlign:"center",align:"center",width:130},{field:"checkAmount",headerName:"Check Amount",headerAlign:"center",align:"right",width:130,type:"number"},{field:"payeeLine1",headerName:"Payee Name",headerAlign:"center",align:"left",width:200},{field:"actions",headerName:"Actions",headerAlign:"center",align:"center",width:185,renderCell:e=>R(D,{direction:"row",spacing:1,children:[p(P,{variant:"outlined",size:"small",onClick:()=>{return a=e.row.id,i.map((e=>{e.id===a&&t({accountNumber:e.accountNumber,checkNumber:e.checkNumber,checkDate:e.checkDate,checkAmount:e.checkAmount,payeeLine1:e.payeeLine1})})),void g(a);var a},children:"Edit"}),p(P,{variant:"outlined",size:"small",color:"error",onClick:()=>g(e.row.id),children:"Delete"})]})}];return p("div",{className:Ra.positivePay,children:p("div",{className:Ra.app,children:R("div",{className:Ra.formContainer,children:[p(Vt,{variant:"h4",children:"Generate Positive Pay File"}),R("form",{onSubmit:async t=>{if(t.preventDefault(),i.length>1&&""==e.accountNumber&&""==e.checkAmount&&""==e.checkDate&&""==e.checkNumber&&""==e.payeeLine1){let e=v(i[1]),t=i[1].payeeLine1;i.slice(2).map((t=>{const a=v(t);e=[e,a].join("\n")}));const a=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(a),r=document.createElement("a");r.href=n,r.setAttribute("download",`PositivePay_${t}.csv`),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}else if(u()&&1===i.length){const t=v(e),a=new Blob([t],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(a),i=document.createElement("a");i.href=n,i.setAttribute("download",`PositivePay_${e.payeeLine1}.csv`),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}else if(u()&&i.length>1){let t=v(e);i.slice(1).map(((e,a)=>{const n=v(e);t=[t,n].join("\n")}));const a=new Blob([t],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(a),r=document.createElement("a");r.href=n,r.setAttribute("download",`PositivePay_${e.payeeLine1}.csv`),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}},children:[R("div",{className:Ra.formGroup,children:[p("label",{htmlFor:"accountNumber",children:"Account Number:"}),p("input",{type:"number",id:"accountNumber",name:"accountNumber",value:e.accountNumber,onChange:h,maxLength:11}),s.accountNumber&&p("span",{className:Ra.error,children:s.accountNumber})]}),R("div",{className:Ra.formGroup,children:[p("label",{htmlFor:"checkNumber",children:"Check Number:"}),p("input",{type:"number",id:"checkNumber",name:"checkNumber",value:e.checkNumber,onChange:h,maxLength:5}),s.checkNumber&&p("span",{className:Ra.error,children:s.checkNumber})]}),R("div",{className:Ra.formGroup,children:[p("label",{htmlFor:"checkDate",children:"Check Date:"}),p("input",{type:"date",id:"checkDate",name:"checkDate",value:e.checkDate,onChange:h}),s.checkDate&&p("span",{className:Ra.error,children:s.checkDate})]}),R("div",{className:Ra.formGroup,children:[p("label",{htmlFor:"checkAmount",children:"Check Amount $:"}),p("input",{type:"text",id:"checkAmount",name:"checkAmount",value:e.checkAmount,onChange:h,onKeyDown:e=>{const t=e.currentTarget.value;-1!==[46,8,9,27,13].indexOf(e.keyCode)||65===e.keyCode&&(!0===e.ctrlKey||!0===e.metaKey)||e.keyCode>=35&&e.keyCode<=40||((e.shiftKey||e.keyCode<48||e.keyCode>57)&&(e.keyCode<96||e.keyCode>105)&&190!==e.keyCode&&e.preventDefault(),190===e.keyCode&&t.includes(".")&&e.preventDefault())},placeholder:"0.00"}),s.checkAmount&&p("span",{className:Ra.error,children:s.checkAmount})]}),R("div",{className:Ra.formGroup,children:[p("label",{htmlFor:"payeeLine1",children:"Payee Name:"}),p("input",{type:"text",id:"payeeLine1",name:"payeeLine1",value:e.payeeLine1,onChange:h,maxLength:50}),s.payeeLine1&&p("span",{className:Ra.error,children:s.payeeLine1})]}),p(Vt,{variant:"h4",children:"CSV Check Batch"}),p("div",{style:{height:400,width:"100%"},children:p(M,{rows:i.slice(1),columns:y,pageSize:5,onRowClick:e=>{}})}),p("div",{}),p("button",{type:"button",onClick:s=>{if(u()){n(a+1);let s={id:a,accountNumber:e.accountNumber,checkNumber:e.checkNumber,checkDate:e.checkDate,checkAmount:e.checkAmount,payeeLine1:e.payeeLine1};r([...i,s]),t({accountNumber:"",checkNumber:"",checkDate:"",checkAmount:"",payeeLine1:""}),c({})}},children:"Save Check to Batch"}),p("button",{type:"submit",children:"Generate Positive Pay File"}),p("button",{type:"button",className:Ra.resetButton,onClick:()=>{t({accountNumber:"",checkNumber:"",checkDate:"",checkAmount:"",payeeLine1:""}),n(a+1),r([{id:a,accountNumber:e.accountNumber,checkNumber:e.checkNumber,checkDate:e.checkDate,checkAmount:e.checkAmount,payeeLine1:e.payeeLine1}]),c({})},children:"Start Over"})]})]})})})};var Ea,Ma;(Ma=Ea||(Ea={})).OUR_STORY="Our Story",Ma.APPLIED_INNOVATION="Applied innovation",Ma.ETS_DIFFERENCE="The ETS Difference",Ma.QUALITY="Quality",Ma.VINTAGE_PORTALCMS="Vintage Portal",Ma.EXPERTISE_ON_CALL="Expertise On Call",Ma.OUR_SERVICES="Our Services",Ma.VINTAGE_REPORTS="Vintage Reports";var Da,Pa,La=Ea;(Pa=Da||(Da={})).SMALL="small",Pa.MEDIUM="medium",Pa.BIG="big";var Ba=Da;var Oa="ContentLayout_container_1",Fa="ContentLayout_smallSideLayout_1",Ha="ContentLayout_mediumSideLayout_1",Ua="ContentLayout_bigSideLayout_1";const za=({sideLayout:e,children:t})=>{const a=h(),n=A(a.breakpoints.up("lg"));return p("main",n?{className:I(Oa,{[Fa]:e===Ba.SMALL,[Ha]:e===Ba.MEDIUM,[Ua]:e===Ba.BIG}),children:t}:{className:Oa,children:t})};
1var Ga="Hero_container_1",qa="Hero_aboutUsPeopleBackground_13",Wa="Hero_expertiseOnCallBackground_21",Va="Hero_aboutUsOurStoryBackground_34",Ya="Hero_ourServicesBackground_37",ja="Hero_publicationsBackground_40",$a="Hero_seminarsBackground_43",Qa="Hero_analysesBackground_47",Ka="Hero_newCustomerBackground_50",Xa="Hero_contactBackground_53",Za="Hero_locationsBackground_68",Ja="Hero_heroLayout_83",en="Hero_smallSideLayout_83",tn="Hero_mediumSideLayout_83",an="Hero_bigSideLayout_83",nn="Hero_textAlignLeft_95",rn="Hero_textAlignCenter_99",sn="Hero_withWhiteText_103";const on=({title:e,subtitle:t,description:a,textAlignment:n,sideLayout:i,withWhiteText:r,ctaButton:s,display:o})=>{const l=Wt(),c=y();return o?p("div",{className:I(Ga,{[qa]:!!b(Tt.PEOPLE,c.pathname),[Va]:!!b(Tt.OUR_STORY,c.pathname),[$a]:!!b(Tt.SEMINARS,c.pathname),[Ya]:!!b(Tt.SERVICES,c.pathname),[ja]:!!b(Tt.PUBLICATIONS,c.pathname),[Qa]:!!b(Tt.ALL_ANALYSES,c.pathname),[Wa]:!!b(Tt.EXPERTISE_ON_CALL,c.pathname),[Xa]:!!b(Tt.CONTACT,c.pathname),[Za]:!!b(Tt.LOCATIONS,c.pathname),[Ka]:!!b(Tt.NEW_CUSTOMER,c.pathname)}),children:R("div",{className:I(Ja,{[en]:i===Ba.SMALL,[tn]:i===Ba.MEDIUM,[an]:i===Ba.BIG,[nn]:"left"===n,[rn]:"center"===n,[sn]:!0===r}),children:[p(Vt,{variant:"h2",children:l(e)}),t&&p($t,{variant:"intro",children:l(t)}),a&&p($t,{variant:"big",children:l(a)}),s&&s]})}):p(k,{})},ln=e=>Object.fromEntries(Object.entries(e).filter((([e,t])=>""!==t)));const cn=new class{async getTermsAndConditionsAndCreditAgreement(){const e=aa.responseHandler(await aa.get("/cms/terms_and_conditions.json"));return na(e,oa)}async getTermsAndConditions(){const e=aa.responseHandler(await aa.get("/cms/terms_of_use.json"));return na(e,oa)}async getPrivacyPolicy(){const e=aa.responseHandler(await aa.get("/cms/privacy.json"));return na(e,oa)}async getTechnicalTools(){const e=aa.responseHandler(await aa.get("/cms/technical_tools.json"));return na(e,oa)}async getPeople(){const e=aa.responseHandler(await aa.get("/cms/people.json"));return na(e,oa)}async getContentPages(){const e=aa.responseHandler(await aa.get("/cms/content_pages.json"));return na(e,oa)}async getReportVerification({id:e,accessToken:t}){const a=aa.responseHandler(await aa.get(`/report_verification/${e}.json`,{params:{access_token:t}}));return na(a,oa)}async getAllPublications(){const e=aa.responseHandler(await aa.get("/cms/publications.json"));return na(e,oa)}async getPublicationsCategories(){const e=aa.responseHandler(await aa.get("/cms/publications/categories.json"));return na(e,oa)}async getAnalysesCategories(){const e=aa.responseHandler(await aa.get("/analyses/categories.json"));return na(e,oa)}async getAnalysesMetrics(){const e=aa.responseHandler(await aa.get("/analyses/matrices.json"));return na(e,oa)}async getAnalysesCollections(){const e=aa.responseHandler(await aa.get("/analyses/collections.json"));return na(e,oa)}async getCountries(){const e=aa.responseHandler(await aa.get("cms/countries.json"));return na(e,oa)}async getAnalyses({categoryId:e,matrixId:t,collectionId:a,countryCode:n,limit:i,offset:r,searchPhrase:s}){const o=ln({category_id:e,matrix_id:t,collection_id:a,country_code:n,limit:i,offset:r,searchPhrase:s}),l=aa.responseHandler(await aa.get("/analyses.json",{params:o}));return na(l,oa)}async getSpecificAnalysisWithComponents(e){e=encodeURIComponent(e);const t=aa.responseHandler(await aa.get(`/analyses/${e}.json`));return na(t,oa)}async getSeminarsAndEvents(){const e=aa.responseHandler(await aa.get("/cms/seminars_and_events.json"));return na(e,oa)}async getFrequentlyAskedQuestionsAndAnswers(){const e=aa.responseHandler(await aa.get("/questions.json"));return na(e,oa)}async getLocationsOrDropBoxes({type:e,lat:t,long:a}){const n=aa.responseHandler(await aa.get(`locations.json?type=${e}`,{params:{lat:t,long:a}}));return na(n,oa)}async getSearchCMSData(e){const t=aa.responseHandler(await aa.get(`/search?q=${e}`));return na(t,oa)}async getNotifications(){const e=aa.responseHandler(await aa.get("/notifications.json"));return na(e,oa)}async contactETS(e){const t=aa.responseHandler(await aa.post("/contact/send_message",e));return na(t,oa)}async terrameaContactETS(e){const t=aa.responseHandler(await aa.post("/terramea/contact_ets",e));return na(t,oa)}async markNotificationAsRead(e){return aa.responseHandler(await aa.post(`/notifications/${e}/ack.json`,{withCredentials:!0}))}},dn=()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getContentPages"],(()=>cn.getContentPages()),{keepPreviousData:!0,onSuccess:e=>{console.log("Get content pages",e)},onError:a=>{console.log("Get content pages error",a),t.open(fa(a,e("get-content-pages-error")),{severity:"error"})}})},mn=({html:e})=>p(k,{children:B(e)}),pn=e=>{var t=e,{className:a}=t,n=c(t,["className"]);return p(O,o({className:a}
1,n))},un=e=>null===e?"":hn(vn(yn(bn(gn(e))))),hn=e=>e.replace(/<p\b[^<>\/]*>\s*(<img\b[^<>]*>)\s*<\/p>/g,"$1"),vn=e=>e.replaceAll("<p> </p>",""),gn=e=>e.replaceAll("<h4> </h4>",""),yn=e=>e.replaceAll("<br><br><br>","<br><br>");const bn=e=>{const t=/http[s]?:\/\/[w]*?.?etslabs.com\/library\/?$\/?/g;return e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(/(http[s]?:\/\/[w]*?.?etslabs\.com\/library\/\d+)/g,((e,t,a)=>t.replaceAll("/library/","/publications/publication/")))).replaceAll(t,"https://www.etslabs.com/publications")).replaceAll(/http[s]?:\/\/[w]*?.?etslabs.com\/library\?searchTerm\=\/?/g,"https://www.etslabs.com/publications?searchTerm=")).replaceAll(/http[s]?:\/\/[react]*?.?etslabs.com\/analyses\/analysis\/$/g,"https://www.etslabs.com/analyses/all-analyses")).replaceAll(/http[s]?:\/\/[w]*?.?etslabs.com\/analyses\/?/g,"https://www.etslabs.com/analyses/analysis/")).replaceAll(/http[s]?:\/\/[react]*?.?etslabs.com\/analyses\/analysis\/exports\/?/g,"https://www.etslabs.com/analyses/exporting")).replaceAll(/http[s]?:\/\/[w]*?.?etslabs.com\/innovation\/?/g,"https://www.etslabs.com/about-us/applied-innovation")).replaceAll(/http[s]?:\/\/[w]*?.?etslabs.com\/people\/?/g,"https://www.etslabs.com/about-us/people")).replaceAll(t,"https://webapi.etslabs.com/images/")},_n=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.APPLIED_INNOVATION)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"applied-innovation-title",description:"applied-innovation-description",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})},Nn=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.ETS_DIFFERENCE)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"ets-difference-title",description:"ets-difference-description",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})},fn=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.OUR_STORY)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"our-story-title",description:"our-story-description",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})},Cn=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.QUALITY)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"quality-title",description:"quality-description",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})};const Sn=e=>{var t=e,{spriteUrl:a,className:n}=t,i=c(t,["spriteUrl","className"]);return p("svg",l(o({className:n},i),{children:p("use",{href:`${a}#icon`})}))};var xn="SeminarsAndEventsCard_container_1",An="SeminarsAndEventsCard_seminarAndEventsContainer_12",In="SeminarsAndEventsCard_imageContainer_26",wn="SeminarsAndEventsCard_image_26",Tn="SeminarsAndEventsCard_contentContainer_38",Rn="SeminarsAndEventsCard_dateButton_45",kn="SeminarsAndEventsCard_button_49",En="SeminarsAndEventsCard_arrowRightIcon_57",Mn="SeminarsAndEventsCard_textGray_65";const Dn=({imgUrl:e,title:t,eventDate:a,location:n,eventUrl:i,description:r,presenter:s})=>p("div",{className:xn,"is-clickable":i?"true":"false",onClick:()=>{i&&window.open(i,"_blank")},children:R("div",{className:An,children:[p("div",{className:In,children:p("img",{src:e,className:wn,alt:t})}),R("div",{className:Tn,children:[p(Vt,{variant:"h4",children:t}),R("div",{className:Rn,children:[p($t,{variant:"mediumSemiBold",children:a}),i&&p(F,{className:kn,size:"small",children:p(Sn,{className:En,spriteUrl:"/assets/eventsArrow.3e714d8a.svg"})})]}),p($t,{variant:"standard",className:Mn,children:n}),s&&R($t,{variant:"standard",className:Mn,children:["Presenter: ",s]}),r&&p($t,{variant:"standard",children:p(mn,{html:r})})]})]})});var Pn={bottomContainer:"BottomSupport_bottomContainer_1",buttonContainer:"BottomSupport_buttonContainer_9",number:"BottomSupport_number_23",faqContainer:"BottomSupport_faqContainer_28",faqCta:"BottomSupport_faqCta_48"};const Ln=({sideLayout:e,heading:t,description:a,ctaText:n,contactRoute:i,phoneNumber:r,faqCtaText:s,faqRoute:o})=>{var l;const c=Wt(),d=f();return R(k,{children:[p(za,{sideLayout:e,children:R("div",{className:Pn.bottomContainer,children:[p(Vt,{variant:"h2",children:c(t)}),a&&p($t,{variant:"big",children:c("description")}),R("div",{className:Pn.buttonContainer,children:[p(P,{variant:"contained",className:Pn.button,onClick:()=>d(i),children:c(n)}),c("or"),p("a",{href:`tel:${null==(l=c(r))?void 0:l.replace(/\D/g,"")}`,className:Pn.number,children:c(r)}
1)]})]})}),p("div",{className:Pn.faqContainer,children:p($t,{className:Pn.faqCta,variant:"bigSemiBold",onClick:()=>d(o),children:c(s)})})]})};var Bn="Seminars_container_1",On="Seminars_textGray_6",Fn="Seminars_titleMargin_6";const Hn=()=>{const e=Wt();f();const{data:t,isLoading:a}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getSeminarsAndEvents"],(()=>cn.getSeminarsAndEvents()),{keepPreviousData:!0,onSuccess:e=>{console.log("Get publications",e)},onError:a=>{console.log("Get publications error",a),t.open(fa(a,e("get-publications-error")),{severity:"error"})}})})(),n=new Date,i=null==t?void 0:t.filter((({startDate:e})=>new Date(e).getTime()>=n.getTime())),r=null==t?void 0:t.filter((({startDate:e})=>new Date(e).getTime()<=n.getTime())),s=r&&r.length>0?r.reverse().slice(0,6):r;return R(k,{children:[p(on,{title:"seminars-title",description:"seminars-description",textAlignment:"left",sideLayout:Ba.BIG,withWhiteText:!0,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):R(k,{children:[R("div",{className:Bn,children:[p($t,{variant:"intro",className:On,children:e("upcoming-events")}),null==i?void 0:i.map((({id:e,eventDate:t,imgUrl:a,title:n,location:i,eventUrl:r,description:s,presenter:o})=>p(Dn,{eventDate:t,imgUrl:a,title:n,location:i,eventUrl:r,description:s||null,presenter:o||null},e)))]}),R("div",{className:Bn,children:[p($t,{variant:"intro",className:Fn,children:e("past-events")}),null==s?void 0:s.map((({id:e,eventDate:t,imgUrl:a,title:n,location:i,eventUrl:r,description:s,presenter:o})=>p(Dn,{eventDate:t,imgUrl:a,title:n,location:i,eventUrl:r,description:s||null,presenter:o||null},e)))]})]})}),p(Ln,{sideLayout:Ba.BIG,heading:"have-question-for-the-team",ctaText:"send-message",contactRoute:Tt.CONTACT,phoneNumber:"urgent-sample-number",faqCtaText:"faq-for-popular-common-questions",faqRoute:Tt.CONTACT})]})},Un=[{routesToMatch:[Tt.ALL_ANALYSES,Tt.EXPORTING_ANALYSES],links:[{labelKey:"nav-analyses-all",pathname:Tt.ALL_ANALYSES},{labelKey:"nav-exporting",pathname:Tt.EXPORTING_ANALYSES}],isBeta:[!1,!1]}],zn=()=>{const e=y();return Aa(),R(k,{children:[!b(Tt.ANALYSES_DETAILS,e.pathname)&&p(wa,{menuItems:Un,isTextOnlyPageLayout:!1}),p(E,{})]})};var Gn="AnalysesDetailsHero_container_1",qn="AnalysesDetailsHero_breadcrumbsContainer_21",Wn="AnalysesDetailsHero_textWhite_26",Vn="AnalysesDetailsHero_cursorPointer_29",Yn="AnalysesDetailsHero_nameContainer_35",jn="AnalysesDetailsHero_detailsContainer_38",$n="AnalysesDetailsHero_infoContainer_52",Qn="AnalysesDetailsHero_textGray_63";const Kn=({analysisDetails:e})=>{const t=Wt(),a=f();return R("div",{className:Gn,children:[R("div",{className:qn,children:[p($t,{className:Vn,onClick:()=>a(Tt.ALL_ANALYSES),children:`${t("all-analyses")} >`}),p($t,{className:Vn,onClick:()=>a(Tt.ALL_ANALYSES,{state:{sampleTypeId:e.analysesMatrixNameId.toString()}}),children:`${e.sampleType} >`}),p($t,{className:Wn,children:p(mn,{html:e.testName})})]}),p("div",{className:Yn,children:p(Vt,{variant:"h2",children:p(mn,{html:e.testName})})}),R("div",{className:jn,children:[R("div",{className:$n,children:[p($t,{variant:"standard",className:Qn,children:t("sample-type")}),p($t,{variant:"standardSemiBold",className:Wn,children:e.sampleType})]}),R("div",{className:$n,children:[p($t,{variant:"standard",className:Qn,children:t("turnaround-label")}),p($t,{variant:"standardSemiBold",className:Wn,children:e.turnaroundTime})]}),R("div",{className:$n,children:[p($t,{variant:"standard",className:Qn,children:t("technique")}),p($t,{variant:"standardSemiBold",className:Wn,children:p(mn,{html:e.technique})})]}),R("div",{className:$n,children:[p($t,{variant:"standard",className:Qn,children:t("accreditation")}),p($t,{variant:"standardSemiBold",className:Wn,children:e.accredited})]})]})]})};var Xn={container:"AnalysesDetailsAside_container_1",textContainer:"AnalysesDetailsAside_textContainer_16",textGray:"AnalysesDetailsAside_textGray_20",content:"AnalysesDetailsAside_content_23",howToTextContainer:"AnalysesDetailsAside_howToTextContainer_28",textSampleRequirementsHeader:"AnalysesDetailsAside_textSampleRequirementsHeader_36",textSampleRequirementsBody:"AnalysesDetailsAside_textSampleRequirementsBody_40",textBold:"AnalysesDetailsAside_textBold_44"};const Zn=e=>p(mn,{html:`<a href='${e.href}' target='_blank'>${e.children}</a>`}),Jn="",ei="",ti="",ai="",ni="";var ii="FormInput_container_1",ri="FormInput_label_6",si="FormInput_formInput_11",oi="FormInput_input_15",li="FormInput_errorContainer_21",ci="FormInput_messageError_25";const di=e=>{var t=e,{label:a,errorMessage:n,error:i,className:r,helpMessage:s,InputProps:l}=t,d=c(t,["label","errorMessage","error","className","helpMessage","InputProps"]);return R("div",{className:I(ii,r),children:[a&&p(u,{variant:"badge",className:ri,children:a}),p(H,{className:si,variant:"standard",label:"",error:i,InputProps:l,inputProps:o({className:oi},d)}),i&&n&&p("div",{className:li,children:p($t,{variant:"extraSmall",className:ci,children:n})}),s&&p($t,{variant:"extraSmall",children:s})]})};var mi="LoadingButton_button_1",pi="LoadingButton_withoutText_7",ui="LoadingButton_disabledWithLoading_10",hi="LoadingButton_spinner_14",vi="LoadingButton_withText_20",gi="LoadingButton_secondary_23",yi="LoadingButton_tert
1iary_26";const bi=e=>{var t=e,{children:a,loading:n,color:i="primary",variant:r="contained",className:s,disabled:d,startIcon:m,endIcon:u}=t,h=c(t,["children","loading","color","variant","className","disabled","startIcon","endIcon"]);const v=n&&!d&&!(m||u),g=n&&(m||u),y=p(O,{size:16,thickness:5,className:I(hi,{[vi]:g,[gi]:"secondary"===i,[yi]:"tertiary"===i||"outlined"===r||"text"===r})});return R(P,l(o({color:i,variant:r,startIcon:n&&!d&&m?y:m,endIcon:n&&!d&&u?y:u,className:I(mi,s,{[pi]:v,[vi]:g,[ui]:n}),disabled:d},h),{children:[a,v&&y]}))},_i=e=>U().email(e),Ni=(e,t=U())=>t.required(e);var fi={container:"ContactEtsForm_container_1",header:"ContactEtsForm_header_7",subTitle:"ContactEtsForm_subTitle_13",formContainer:"ContactEtsForm_formContainer_17",inputFlex:"ContactEtsForm_inputFlex_22",actions:"ContactEtsForm_actions_35"};const Ci=({handleCloseModal:e,analysisACode:t,analysisURL:a,analysisName:n})=>{var i,r,s,o;const{authenticatedUser:{user:l}}=m.exports.useContext(_a),{mutateAsync:c,isLoading:d,isSuccess:u}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(cn.contactETS,{onSuccess:a=>{console.log("successfully contacted ETS Labs",a),t.open(e("contact-ets-success"),{severity:"success"})},onError:a=>{console.log("failed to contact ETS Labs",a),t.open(fa(a,e("contact-ets-labs-error")),{severity:"error"})}})})(),h={firstName:null!=(i=l.firstname)?i:Jn,lastName:null!=(r=l.lastname)?r:ei,email:null!=(s=l.email)?s:ti,contactNumber:null!=(o=l.phone)?o:ai,note:ni},v=z().shape({firstName:Ni(G("field-error-required",{field:G("first-name")})),lastName:Ni(G("field-error-required",{field:G("last-name")})),email:Ni(G("field-error-required",{field:G("email")}),_i(G("email-error-invalid-format"))),contactNumber:Ni(G("field-error-required",{field:G("contact-number-label")})),note:Ni(G("field-error-required",{field:G("note-label")}))});return m.exports.useEffect((()=>{u&&e()}),[u]),R("div",{className:fi.container,children:[R("div",{className:fi.header,children:[p(Vt,{variant:"h4",children:G("contact-ets")}),p($t,{className:fi.subTitle,children:G("how-can-we-help-you")})]}),p(q,{initialValues:h,onSubmit:e=>(e=>{const{firstName:t,lastName:n,email:i,contactNumber:r}=e,s=a?`Analysis URL: ${a}<br><br> ${e.note}`:e.note;c({name:t+" "+n,email:i,phone:r,message:s})})(e),validationSchema:v,validateOnBlur:!0,enableReinitialize:!0,children:({isValid:t,handleChange:i,handleBlur:r,errors:s,touched:o,values:l,isSubmitting:c})=>p(W,{className:fi.form,children:R("div",{className:fi.formContainer,children:[R("div",{className:fi.inputFlex,children:[p(di,{className:fi.formInput,autoFocus:!0,label:G("first-name"),name:"firstName",value:l.firstName,onChange:i,onBlur:r,errorMessage:s.firstName,error:!!s.firstName&&o.firstName,type:"text",placeholder:G("first-name-label")}),p(di,{className:fi.formInput,autoFocus:!0,label:G("last-name"),name:"lastName",value:l.lastName,onChange:i,onBlur:r,errorMessage:s.lastName,error:!!s.lastName&&o.lastName,type:"text",placeholder:G("last-name-label")})]}),R("div",{className:fi.inputFlex,children:[p(di,{className:fi.formInput,autoFocus:!0,label:G("email"),name:"email",value:l.email,onChange:i,onBlur:r,errorMessage:s.email,error:!!s.email&&o.email,type:"text",placeholder:G("email-label")}),p(di,{className:fi.formInput,autoFocus:!0,label:G("contact-number-label"),name:"contactNumber",value:l.contactNumber,onChange:i,onBlur:r,errorMessage:s.contactNumber,error:!!s.contactNumber&&o.contactNumber,type:"text",placeholder:G("contact-number-placeholder")})]}),a&&void 0!==a&&p("div",{className:fi.inputNoFlex,children:p(di,{className:fi.formInput,label:"Analysis: ",name:"analysis",value:n+"\n"+a,readOnly:!0,disabled:!0,type:"text",placeholder:"I have a question about this analysis:",InputProps:{multiline:!0,rows:2}})}),p("div",{className:fi.inputNoFlex,children:p(di,{className:fi.formInput,autoFocus:!0,label:G("note-label"),name:"note",value:l.note,onChange:i,onBlur:r,errorMessage:s.firstName,error:!!s.firstName&&o.firstName,type:"text",placeholder:G("note-placeholder"),InputProps:{multiline:!0,rows:3}})}),R("div",{className:fi.actions,children:[p(P,{variant:"contained",color:"tertiary",onClick:e,children:G("cancel")}),p(bi,{loading:d,color:"primary",variant:"contained",type:"submit",disabled:!t||!l.email,children:G("send")})]})]})})})]})};var Si="Modal_paper_1",xi="Modal_fullScreen_7",Ai="Modal_medium_15",Ii="Modal_large_21";const wi=({open:e,setModal:t,children:a,fullScreen:n,medium:i,large:r})=>p(V,{classes:{paper:n||i||r?n?xi:i?Ai:r?Ii:Si:Si},open:e,onClose:()=>t({modalState:!1,modalData:{}}),children:a}),Ti=({analysisDetails:e})=>{const t=Wt(),[a,n]=m.exports.useState(!1),{showNewMessage:i}=S();return R("aside",{className:Xn.container,children:[R("div",{children:[p("div",{className:Xn.header,children:p($t,{variant:"standardSemiBold",className:Xn.textSampleRequirementsHeader,children:t("sample-requirements")})}),R("div",{className:Xn.content,children:[e.sampleVolume&&R("div",{className:Xn.textContainer,children:[p($t,{variant:"standardMedium",children:t("minimum-volume")}),p($t,{variant:"standardMedium",className:`${Xn.textSampleRequirementsBody} ${Xn.textBold}`,children:e.sampleVolume})]}
1),e.sampleContainerType&&R("div",{className:Xn.textContainer,children:[p($t,{variant:"standardMedium",children:t("recommended-container")}),p($t,{variant:"standardMedium",className:`${Xn.textSampleRequirementsBody} ${Xn.textBold}`,children:e.sampleContainerType})]})]})]}),R("div",{children:[p("div",{className:Xn.header,children:p($t,{variant:"standardSemiBold",className:Xn.textSampleRequirementsHeader,children:t("pricing")})}),p("div",{className:Xn.content,children:e.feeOne<1?(r=e.feeOne,p($t,-1===r?{variant:"standardMedium",className:Xn.textSampleRequirementsBody,children:"See description for pricing"}:{variant:"standardMedium",className:Xn.textSampleRequirementsBody,children:t("contact-us-for-pricing")})):R(k,{children:[R("div",{className:Xn.textContainer,children:[p($t,{variant:"standardMedium",children:t("1-sample")}),p($t,{variant:"standardMedium",className:Xn.textBold,children:`$${e.feeOne}`})]}),R("div",{className:Xn.textContainer,children:[p($t,{variant:"standardMedium",children:t("2-10-samples")}),p($t,{variant:"standardMedium",className:Xn.textBold,children:`$${e.feeTwoToTen} each`})]}),R("div",{className:Xn.textContainer,children:[p($t,{variant:"standardMedium",children:t("11-plus-samples")}),p($t,{variant:"standardMedium",className:Xn.textBold,children:`$${e.feeElevenPlus} each`})]})]})})]}),R("div",{children:[p("div",{className:Xn.header,children:p($t,{variant:"standardSemiBold",className:Xn.textSampleRequirementsHeader,children:t("how-to-order-analyses")})}),R("div",{className:Xn.content,children:[p("div",{className:Xn.howToTextContainer,children:p($t,{variant:"standardMedium",children:p(Y,{i18nKey:"how-to-order-1",t:t,components:[p(Zn,{href:"http://help.etslabs.com/en/articles/962125-how-do-i-submit-samples"})]})})}),p("div",{className:Xn.howToTextContainer,children:p($t,{variant:"standardMedium",children:p(Y,{i18nKey:"how-to-order-2",t:t,components:[p(Zn,{href:"http://help.etslabs.com/en/articles/962125-how-do-i-submit-samples"})]})})}),p("div",{className:Xn.howToTextContainer,children:p($t,{variant:"standardMedium",children:p(Y,{i18nKey:"how-to-order-3",t:t,components:[p(Zn,{href:"http://help.etslabs.com/en/collections/100031-billing-settings-and-online-payments"})]})})}),p("div",{className:Xn.howToTextContainer,children:R($t,{variant:"standardMedium",children:["4. ",t("how-to-order-4")]})})]})]}),R("div",{children:[p(Vt,{variant:"h5",children:"We're here to help."}),p($t,{variant:"standardMedium",children:"Have questions about this analysis, or the next steps?"}),p(P,{variant:"contained",color:"tertiary",className:Xn.btn,onClick:()=>i(`I have a question about ${e.testName}...\n\n`),children:t("contact-ets-button-text")}),p(wi,{open:a,setModal:()=>n(!1),children:p(Ci,{handleCloseModal:()=>n(!1),analysisACode:e.acode,analysisName:e.testName,analysisURL:window.location.href})})]})]});var r};var Ri="AnalysisDetailsRow_dataRow_1",ki="AnalysisDetailsRow_rowDetails_10",Ei="AnalysisDetailsRow_cellWide_17",Mi="AnalysisDetailsRow_cellNarrow_20",Di="AnalysisDetailsRow_cell_14",Pi="AnalysisDetailsRow_rowExtraInfoButton_30",Li="AnalysisDetailsRow_rowExtraInfo_30",Bi="AnalysisDetailsRow_open_51",Oi="AnalysisDetailsRow_closed_54";const Fi=({id:e,analyteName:t,units:a,method:n,methodDeveloper:i,methodDescription:r,description:s,accredited:o})=>{Wt();const[l,c]=m.exports.useState(!1);return null===t&&null===a&&null===n&&null===i&&null===o?p(k,{}):R("div",{className:Ri,onClick:()=>c(!l),children:[R("div",{className:ki,children:[p("div",{className:Ei,children:p($t,{variant:"mediumSemiBold",children:p(mn,{html:t})})}),p("div",{className:Mi,children:p($t,{variant:"mediumSemiBold",children:a})}),p("div",{className:Ei,children:p($t,{variant:"mediumSemiBold",children:p(mn,{html:n})})}),p("div",{className:Di,children:p($t,{variant:"mediumSemiBold",children:i})}),p("div",{className:Di,children:p($t,{variant:"mediumSemiBold",children:o})}),p("div",{className:`${Di} ${Pi}`,children:p($t,{variant:"mediumSemiBold",className:Pi,children:null!==s&&"View Description"})})]}),p("div",{className:`${Li} ${l?Bi:Oi}`,children:p(j,{in:l,timeout:"auto",children:p($t,{variant:"small",children:s&&p(mn,{html:s})})})})]},e)};var Hi="AnalysesDetailTable_tableContainer_1",Ui="AnalysesDetailTable_dataHeader_1",zi="AnalysesDetailTable_headWide_10",Gi="AnalysesDetailTable_headNarrow_14",qi="AnalysesDetailTable_head_6";const Wi=({analysisDetails:e})=>{const t=Wt();return R("div",{className:Hi,children:[R("div",{className:Ui,children:[p("div",{className:zi,children:p($t,{variant:"standardSemiBold",children:t("name-head")})}),p("div",{className:Gi,children:p($t,{variant:"standardSemiBold",children:t("unit")})}),p("div",{className:zi,children:p($t,{variant:"standardSemiBold",children:t("technique")})}),p("div",{className:qi,children:p($t,{variant:"standardSemiBold",children:t("method")})}),p("div",{className:qi,children:p($t,{variant:"standardSemiBold",children:t("accreditation")})}),p("div",{className:qi,children:p($t,{variant:"standardSemiBold"})})]}),e.analysisComponents.map((e=>p(Fi,o({},e),e.id)))]})};var Vi="/assets/arrowDown.e47ca8be.svg",Yi="/assets/arrowUp.347b7157.svg";var ji="AnalysisDetailsCard_container_1",$i="AnalysisDetailsCard_containerHighlighted_1",Qi="AnalysisDetailsCard_headerContainer_10",Ki="AnalysisDetailsCard_header_10",Xi="AnalysisDetailsCard_icon_17",Zi="AnalysisDetailsCard_content_21",Ji="AnalysisDetailsCard_textContent_27",er="AnalysisDetailsCard_textGray_31",tr="AnalysisDetailsCard_analyteDescription_42";const ar=({analysisDetails:e})=>{const t=Wt();return p(k,{children:e.analysisComponents.map((e=>(({id:e,units:a,description:n,method:i,methodDeveloper:r,accredited:s,analyteName:o})=>{const[l,c]=m.exports.useState(!1);return R("div",{className:l?$i:ji,children:[R("div",{className:Qi,
1children:[p("div",{className:Ki,children:p($t,{className:tr,children:p(mn,{html:o})})}),p(F,{onClick:()=>c(!l),size:"small",children:p(Sn,{className:Xi,spriteUrl:l?Yi:Vi})})]}),R("div",{className:Zi,children:[R("div",{className:Ji,children:[R($t,{className:er,children:[t("unit"),":"]}),p($t,{children:a})]}),R("div",{className:Ji,children:[R($t,{className:er,children:[t("technique"),":"]}),p($t,{children:p(mn,{html:i})})]}),R("div",{className:Ji,children:[R($t,{className:er,children:[t("method"),":"]}),p($t,{children:r})]}),R("div",{className:Ji,children:[R($t,{className:er,children:[t("accreditation"),":"]}),p($t,{children:s})]}),n&&p(j,{in:l,timeout:"auto",children:p($t,{children:p(mn,{html:n})})})]},e)]},e)})(e)))})};var nr="/assets/arrowRight.09d04aea.svg",ir="/assets/deliveryTruck.5af2deb7.svg";var rr="AnalysesBottomHero_container_1",sr="AnalysesBottomHero_buttonsAndTitleContainer_31",or="AnalysesBottomHero_titleContainer_36",lr="AnalysesBottomHero_buttonContainer_40",cr="AnalysesBottomHero_cta_52",dr="AnalysesBottomHero_arrowRightIcon_62",mr="AnalysesBottomHero_leftIcon_66",pr="AnalysesBottomHero_leftIconWithFill_66";const ur=()=>{const e=Wt(),t=f();return p("div",{className:rr,children:R("div",{className:sr,children:[p("div",{className:or,children:R(Vt,{variant:"h2",children:[e("your")," ",p("i",{children:e("laboratory")})," ",e("on-the-go")]})}),p("div",{className:lr,children:p(P,{className:cr,onClick:()=>t(Tt.CONTACT),size:"small",startIcon:p(Sn,{className:mr,spriteUrl:"/assets/tubeExperiment.bfabfb80.svg"}),endIcon:p(Sn,{className:dr,spriteUrl:nr}),children:e("access-ets-specialist")})}),p("div",{className:lr,children:p(P,{className:cr,onClick:()=>t(Tt.REQUEST_COURIER),size:"small",startIcon:p(Sn,{className:mr,spriteUrl:ir}),endIcon:p(Sn,{className:dr,spriteUrl:nr}),children:e("request-courier-pickup")})}),p("div",{className:lr,children:p(P,{className:cr,onClick:()=>t(Tt.RESULTS),size:"small",startIcon:p(Sn,{className:pr,spriteUrl:"/assets/labReport.80ef0d6a.svg"}),endIcon:p(Sn,{className:dr,spriteUrl:nr}),children:e("receive-results")})})]})})};var hr={container:"AnalysesDetails_container_1",content:"AnalysesDetails_content_22",header:"AnalysesDetails_header_31",iconPosition:"AnalysesDetails_iconPosition_36",icon:"AnalysesDetails_icon_36",tableContainer:"AnalysesDetails_tableContainer_47",cardList:"AnalysesDetails_cardList_53",attachementDescription:"AnalysesDetails_attachementDescription_59",attachementDownload:"AnalysesDetails_attachementDownload_59",downloadIcon:"AnalysesDetails_downloadIcon_64",centerBottom:"AnalysesDetails_centerBottom_70"};const vr=()=>{var e,t;const{id:a}=$(),{data:n,isLoading:i}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getSpecificAnalysisWithComponents"],(()=>cn.getSpecificAnalysisWithComponents(e)),{keepPreviousData:!0,onSuccess:e=>{console.log("Get analyses components",e)},onError:e=>{console.log("Get analyses components error",e),a.open(fa(e,t("get-analysis-components-error")),{severity:"error"})}})})(decodeURIComponent(null!=a?a:"")),r=h(),s=A(r.breakpoints.up("lg"));if(Aa(),i)return p(pn,{className:"spinnerCenter"});console.log("data.description >>>> ",n);const o=un(n?n.description:""),{show:l,trackEvent:c}=S();return c("viewed-analysis",{analysis_url:window.location}),R("div",{className:hr.container,children:[n&&R(k,{children:[p(Kn,{analysisDetails:n}),R("main",{children:[R("div",{className:hr.content,children:[R("div",{className:hr.header,children:[p($t,{variant:"bigSemiBold",children:G("description")}),p($t,{variant:"standardMedium",children:p(mn,{html:o})})]}),R("div",{className:hr.tableContainer,children:[p("div",{className:hr.tableHeader,children:p($t,{variant:"bigSemiBold",children:G("components")})}),p("div",{className:s?"":hr.cardList,children:p(s?Wi:ar,{analysisDetails:n})})]}),(null==(e=null==n?void 0:n.attachmentForms)?void 0:e.length)>0&&R("div",{className:hr.header,children:[p($t,{variant:"bigSemiBold",children:"Required Documentation"}),null==(t=null==n?void 0:n.attachmentForms)?void 0:t.map(((e,t)=>R("div",{children:[R($t,{variant:"standardSemiBold",children:[t+1,". ",e.name]}),p($t,{variant:"standardMedium",className:hr.attachementDescription,children:e.description}),p("div",{children:p($t,{variant:"standardMedium",className:hr.attachementDownload,children:p(Zn,{href:e.formUrl,children:"Download Form"})})})]},t)))]})]}),p(Ti,{analysisDetails:n})]})]}),p(ur,{}),p("div",{className:hr.centerBottom,children:p(Ln,{sideLayout:Ba.BIG,heading:"have-question-for-the-team",ctaText:"send-message",contactRoute:Tt.NO_TO_LINK,phoneNumber:"urgent-sample-number",faqCtaText:"faq-for-popular-common-questions",faqRoute:Tt.CONTACT})})]})};var gr="/assets/search.59a7e60b.svg";var yr={tableContainer:"AnalysesTable_tableContainer_1",dataHeader:"AnalysesTable_dataHeader_1",headFirst:"AnalysesTable_headFirst_7",head:"AnalysesTable_head_7",dataRow:"AnalysesTable_dataRow_15",rowDetails:"AnalysesTable_rowDetails_23",cellFirst:"AnalysesTable_cellFirst_27",cell:"AnalysesTable_cell_27",rowExtraInfo:"AnalysesTable_rowExtraInfo_37",dataDetail:"AnalysesTable_dataDetail_45",priceTier:"AnalysesTable_priceTier_49"};const br=({analyses:e})=>{const t=Wt(),a=f(),n=({id:e,testName:n,turnaroundTime:i,feeOne:r,feeTwoToTen:s,feeElevenPlus:o,sampleType:l,technique:c})=>{return R("div",{className:yr.dataRow,onClick:()=>(e=>a(Q(Tt.ANALYSES_DETAILS,{id:e.toString()})))(e),children:[R("div",{className:yr.rowDetails,children:[p("div",{className:yr.cellFirst,children:p($t,{variant:"standardSemiBold",children:p(mn,{html:n})})}),p("div",{className:yr.cell,children:p($t,{variant:"mediumSemiBold",children:i})}),p("div",{className:yr.cell,children:r<1?(d=r,p($t,-1===d?{variant:"standardMedium",className:yr.textSampleRequirementsBody,children:"See description for pricing"}:{variant:"standardMedium",className:yr.textSampleRequirementsBody,children:t("contact-us-for-pricing")})):R(k,{children:[R($t,{variant:"mediumSemiBold",children:[`$${r}`," ",p("span",{className:yr.priceTier,children:"(1)"})]}),R($t,{variant:"mediumSemiBold",children:[`$${s}`," ",p("span",{className:yr.priceTier,children:"(2-10)"})]}),R($t,{variant:"mediumSemiBold",children:[`$${o}`," ",p("span",{className:yr.priceTier,children:"(11+)"})]})]})})]}),R("div",{className:yr.rowExtraInfo,children:[p($t,{variant:"smallSemiBold",className:yr.dataDetail,children:l}),R($t,{variant:"smallSemiBold",className:yr.dataDetail,children:[" ",p(mn,{html:c})," "]})]})]},e);var d};return R("div",{className:yr.tableContainer,children:[R("div",{className:yr.dataHeader,children:[p("div",{className:yr.headFirst,children:p($t,{variant:"standardSemiBold",children:t("analysis-panel-name-head")})}),p("div",{className:yr.head,children:p($t,{variant:"standardSemiBold",children:t("turnaround-head")})}),p("div",{className:yr.head,children:p($t,{variant:"standardSemiBold",children:t("pricing-head")})})]}),e.map((e=>n(e)))]})};var _r={container:"AnalysisCardTabletAndMobile_container_1",textGray:"AnalysisCardTabletAndMobile_textGray_13",pricingContainer:"AnalysisCardTabletAndMobile_pricingContainer_16",prices:"AnalysisCardTabletAndMobile_prices_21"};const Nr=({analysis:e})=>{const t=Wt(),a=f();return R("div",{className:_r.container,onClick:()=>{return t=e.id,a(Q(Tt.ANALYSES_DETAILS,{id:t.toString()}));var t},children:[p("div",{className:_r.techniqueContainer,children:p($t,{variant:"standardSemiBold",children:p(mn,{html:e.testName})})}),R("div",{className:_r.sampleTypeAndCategoryNameContainer,children:[p($t,{variant:"standardSemiBold",children:p(mn,{html:e.s
1ampleType})}),p($t,{className:_r.textGray,variant:"standard",children:p(mn,{html:e.technique})})]}),R("div",{className:_r.turnaroundTime,children:[p($t,{className:_r.textGray,variant:"standard",children:t("turnaround")}),p($t,{variant:"standardSemiBold",children:p(mn,{html:e.turnaroundTime})})]}),R("div",{className:_r.pricingContainer,children:[p("div",{children:p($t,{className:_r.textGray,variant:"standard",children:t("pricing-per-sample")})}),p("div",{className:_r.prices,children:e.feeOne<1?(n=e.feeOne,p($t,-1===n?{variant:"standardMedium",className:_r.textSampleRequirementsBody,children:"See description for pricing"}:{variant:"standardMedium",className:_r.textSampleRequirementsBody,children:t("contact-us-for-pricing")})):R(k,{children:[p($t,{variant:"standardSemiBold",children:`$${e.feeOne} (1)`}),p($t,{variant:"standardSemiBold",children:`$${e.feeTwoToTen} (2-10)`}),p($t,{variant:"standardSemiBold",children:`$${e.feeElevenPlus} (11+)`})]})})]})]});var n};var fr="AnalysisCardTabletAndMobileList_container_1";const Cr=({analyses:e})=>p("div",{className:fr,children:e.map((e=>p(Nr,{analysis:e},e.id)))});var Sr="FormInputSelect_formControl_1";const xr=({label:e,name:t,value:a,defaultValue:n,items:i,disabled:r,children:s,onChange:o,SelectDisplayProps:l,style:c})=>{const d=Wt();return p(K,{className:Sr,children:R(X,{fullWidth:!0,variant:"standard",name:t,value:a,defaultValue:n,disabled:r,displayEmpty:!0,SelectDisplayProps:l,className:c,onChange:o,children:[e&&p(Z,{value:"",children:p(Yt,{children:d(e)})}),i&&!s&&i.map((e=>p(Z,{value:e,children:e},e))),!i&&s]})})};var Ar={collapseContainer:"AnalysesCategories_collapseContainer_1",collapseButton:"AnalysesCategories_collapseButton_8",icon:"AnalysesCategories_icon_15",iconUp:"AnalysesCategories_iconUp_20",categoriesContainer:"AnalysesCategories_categoriesContainer_24",textRed:"AnalysesCategories_textRed_30",categoriesHeader:"AnalysesCategories_categoriesHeader_35",categoryText:"AnalysesCategories_categoryText_45",activeCategoryText:"AnalysesCategories_activeCategoryText_56",placeholderText:"AnalysesCategories_placeholderText_62",collectionSelectedText:"AnalysesCategories_collectionSelectedText_67",borderBottom:"AnalysesCategories_borderBottom_82"};const Ir=({analysesCategories:e,queryOptions:t,setQueryOptions:a,quantityOfAllAnalyses:n,categoriesWithAnalyses:i})=>{const r=Wt(),s=h(),c=A(s.breakpoints.up("lg"));m.exports.useState(!1);const d=e=>a((t=>l(o({},t),{categoryId:e}))),u=null==e?void 0:e.flatMap((e=>i.has(e.id)?e:[]));console.log("analysesCategoriesForDisplay => ",u);const v=p(k,{children:R("div",{className:Ar.categoriesContainer,children:[p($t,{id:"",variant:"standard",className:I(Ar.categoryText,Ar.categoriesHeader,""===t.categoryId&&Ar.textRed),onClick:()=>d(""),children:`${r("all-categories")}`},""),null==u?void 0:u.map((({name:e,id:a})=>p($t,{id:a.toString(),variant:"standard",className:I(Ar.categoryText,t.categoryId===a.toString()?Ar.textRed:""),onClick:e=>d(e.currentTarget.id),children:p(mn,{html:e})},a)))]})}),g=p("div",{className:Ar.selectContainer,children:R(xr,{name:"collections",disabled:0===(null==u?void 0:u.length),defaultValue:t.categoryId,value:t.categoryId,style:Ar.borderBottom,onChange:e=>d(e.target.value),children:[p(Z,{value:"",children:p($t,{variant:"standard",className:Ar.placeholderText,children:r("all-categories")})},""),null==u?void 0:u.map((({name:e,id:t})=>p(Z,{value:t,children:p($t,{variant:"standard",className:Ar.collectionSelectedText,children:e})},t)))]})});return c?v:g};var wr="AnalysesCollections_selectContainer_1",Tr="AnalysesCollections_collectionText_8",Rr="AnalysesCollections_placeholderText_12",kr="AnalysesCollections_collectionSelectedText_17",Er="AnalysesCollections_borderBottom_32";const Mr=({analysesCollections:e,collectionId:t,setQueryOptions:a})=>{const n=Wt(),i=h(),r=A(i.breakpoints.up("lg"));return R("div",{className:wr,children:[r&&R(k,{children:[R(Vt,{variant:"h6",children:[" ",n("collection")," "]}),p($t,{variant:"small",className:Tr,children:n("analyses-collection-text")})]}),R(xr,{name:"collections",disabled:0===(null==e?void 0:e.length),defaultValue:t,value:t,style:Er,onChange:e=>{return t=e.target.value,a((e=>l(o({},e),{collectionId:t})));var t},children:[p(Z,{value:"",children:p($t,{variant:"standard",className:Rr,children:n("all-collections")})},""),null==e?void 0:e.map((({name:e,id:t})=>p(Z,{value:t,children:p($t,{variant:"standard",className:kr,children:e})},t)))]})]})};var Dr="AnalysesSampleTypes_selectContainer_1",Pr="AnalysesSampleTypes_collectionText_8",Lr="AnalysesSampleTypes_placeholderText_15",Br="AnalysesSampleTypes_collectionSelectedText_20",Or="AnalysesSampleTypes_borderBottom_35";const Fr=({analysesSampleTypes:e,matrixId:t,setQueryOptions:a})=>{const n=Wt();return R("div",{className:Dr,children:[p(Vt,{variant:"h6",children:n("sample-type")}),p($t,{variant:"small",className:Pr,children:n("analyses-sample-type-text")}),R(xr,{name:"collections",disabled:0===(null==e?void 0:e.length),defaultValue:t,value:t,style:Or,onChange:e=>{return t=e.target.value,a((e=>l(o({},e),{matrixId:t}
1)));var t},children:[p(Z,{value:"",children:p($t,{variant:"standard",className:Lr,children:n("all-sample-types")})},""),null==e?void 0:e.map((({name:e,id:t})=>p(Z,{value:t,children:p($t,{variant:"standard",className:Br,children:e})},t)))]})]})};var Hr,Ur;(Ur=Hr||(Hr={})).COMPLETE_LIST="complete-list",Ur.MOST_POPULAR="most-popular";var zr=Hr;const Gr=e=>`https://webapi.etslabs.com//analyses/cheatsheet?name=${e}`;var qr={container:"AnalysesToolbar_container_1",downloadContainer:"AnalysesToolbar_downloadContainer_17",downloadLinksContainer:"AnalysesToolbar_downloadLinksContainer_38",downloadLink:"AnalysesToolbar_downloadLink_38",tabsContainer:"AnalysesToolbar_tabsContainer_46",tabs:"AnalysesToolbar_tabs_46",tabsFlexContainer:"AnalysesToolbar_tabsFlexContainer_63",tab:"AnalysesToolbar_tab_46",active:"AnalysesToolbar_active_81",indicator:"AnalysesToolbar_indicator_84"};const Wr=({queryOptions:e,setQueryOptions:t})=>{const a=Wt();return p("div",{className:qr.container,children:R("div",{className:qr.downloadContainer,children:[p("div",{className:qr.downloadTitleContainer,children:p($t,{children:a("fee-schedule-downloads")})}),R("div",{className:qr.downloadLinksContainer,children:[p($t,{className:qr.downloadLink,children:p("a",{href:Gr(zr.MOST_POPULAR),download:!0,children:a("commonly-requested")})}),p($t,{className:qr.downloadLink,children:p("a",{href:Gr(zr.COMPLETE_LIST),download:!0,children:a("all-analyses")})})]})]})})},Vr=(e,t=!0)=>{const a=Wt(),n=m.exports.useContext(Na);return L(["getAnalyses",e],(()=>cn.getAnalyses(e)),{enabled:t,keepPreviousData:!0,staleTime:3e5,cacheTime:3e5,onSuccess:e=>{console.log("Get cms analyses",e)},onError:e=>{console.error("Get cms analyses error",e),n.open(fa(e,a("get-cms-analyses-error")),{severity:"error"})}})},Yr=(e,t)=>{const[a,n]=m.exports.useState((()=>{const a=window.localStorage.getItem(t);return null!==a?JSON.parse(a):e}));return m.exports.useEffect((()=>{window.localStorage.setItem(t,JSON.stringify(a))}),[t,a]),[a,n]};var jr="/assets/close.25442cc2.svg";var $r="AnalysesSingle_contentContainer_26",Qr="AnalysesSingle_asideContainer_38",Kr="AnalysesSingle_categoriesContainer_43",Xr="AnalysesSingle_search_60",Zr="AnalysesSingle_inputAdornment_65",Jr="AnalysesSingle_searchIcon_68",es="AnalysesSingle_inputField_75",ts="AnalysesSingle_formControlRoot_109",as="AnalysesSingle_categories_43",ns="AnalysesSingle_analyses_127",is="AnalysesSingle_filterContainer_133",rs="AnalysesSingle_filterCount_150",ss="AnalysesSingle_clearContainer_211",os="AnalysesSingle_clearButton_215",ls="AnalysesSingle_arrowRightIcon_232";const cs=()=>{f();const e=h(),t=A(e.breakpoints.up("lg")),a=y().state,[n,i]=Yr({categoryId:"",matrixId:a?null==a?void 0:a.sampleTypeId.toString():"",collectionId:"",countryCode:"",limit:"",offset:"0",searchPhrase:""},"analysisQueryOptions"),[r,s]=m.exports.useState(n.searchPhrase),[c,d]=m.exports.useState(new Set),u=Qt(r,1e3),{data:v}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getAnalysesCategories"],(()=>cn.getAnalysesCategories()),{keepPreviousData:!0,cacheTime:6e5,staleTime:6e5,onSuccess:e=>{console.log("Get analyses categories",e)},onError:a=>{console.log("Get analyses categories error",a),t.open(fa(a,e("get-analyses-categories-error")),{severity:"error"})}})})(),{data:g}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getAnalysesCollections"],(()=>cn.getAnalysesCollections()),{keepPreviousData:!0,cacheTime:3e5,staleTime:3e5,onSuccess:e=>{console.log("Get analyses collections",e)},onError:a=>{console.log("Get analyses collections error",a),t.open(fa(a,e("get-analyses-collections-error")),{severity:"error"})}})})(),{data:b,isLoading:_}=Vr(l(o({},n),{searchPhrase:u})),{data:N}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a={categoryId:"",matrixId:"",collectionId:"",countryCode:"",limit:"",offset:"0",searchPhrase:""};return L(["getAnalyses",a],(()=>cn.getAnalyses(a)),{keepPreviousData:!0,staleTime:6e5,cacheTime:6e5,onSuccess:e=>{console.log("Get cms quantity analyses",e)},onError:a=>{console.error("Get cms quantity analyses error",a),t.open(fa(a,e("get-cms-analyses-error")),{severity:"error"})}})})(),{data:C}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getAnalysesMatrices"],(()=>cn.getAnalysesMetrics()),{staleTime:6e5,cacheTime:6e5,keepPreviousData:!0,onSuccess:e=>{console.log("Get analyses matrices",e)},onError:a=>{console.log("Get analyses matrices error",a),t.open(fa(a,e("get-analyses-matrices-error")),{severity:"error"})}})})(),x=()=>{var e;return""!==n.categoryId?p("button",{className:os,title:"Remove Category Filter",onClick:()=>{i(l(o({}
1,n),{categoryId:""}))},children:R($t,{variant:"small",children:[p(Sn,{className:ls,spriteUrl:jr}),p(mn,{html:(null==(e=null==v?void 0:v.find((e=>e.id.toString()===n.categoryId)))?void 0:e.name)||""})]})}):p(k,{})},w=()=>{var e;return""!==n.collectionId?p("button",{className:os,title:"Remove Collection Filter",onClick:()=>{i(l(o({},n),{collectionId:""}))},children:R($t,{variant:"small",children:[p(Sn,{className:ls,spriteUrl:jr}),null==(e=null==g?void 0:g.find((e=>e.id===n.collectionId)))?void 0:e.name]})}):p(k,{})},T=()=>{var e;return""!==n.matrixId?p("button",{className:os,title:"Remove Sample Type Filter",onClick:()=>{i(l(o({},n),{matrixId:""}))},children:R($t,{variant:"small",children:[p(Sn,{className:ls,spriteUrl:jr}),null==(e=null==C?void 0:C.find((e=>e.id===n.matrixId)))?void 0:e.name]})}):p(k,{})},E=()=>""!==n.matrixId||""!==n.collectionId||""!==n.categoryId?R(k,{children:[p($t,{variant:"standard",children:"Filters Applied:"}),p(x,{}),p(w,{}),p(T,{})]}):p(k,{}),M=`Displaying ${null==b?void 0:b.length} analyses`,{trackEvent:D}=S();return m.exports.useEffect((()=>{i((e=>(D("analyses_searched",l(o({},e),{searchPhrase:r})),l(o({},e),{searchPhrase:r}))))}),[r]),m.exports.useEffect((()=>{let e=new Set;null==v||v.map((t=>e.add(t.id))),""===n.searchPhrase&&""===n.matrixId||(e.clear(),null==b||b.map((t=>e.add(t.analysesCategoryId)))),d(e)}),[b]),R("div",{children:[p(on,{title:"cms-analyses-title",subtitle:"cms-analyses-subtitle",description:"cms-analyses-description",textAlignment:"left",sideLayout:Ba.MEDIUM,withWhiteText:!0,display:!0}),t&&p(Wr,{queryOptions:n,setQueryOptions:i}),p(za,{sideLayout:Ba.MEDIUM,children:_?p(pn,{className:"spinnerCenter"}):R("div",{className:$r,children:[R("div",{className:Qr,children:[p("div",{className:Kr,children:p("div",{className:as,children:C&&p(Fr,{analysesSampleTypes:C,matrixId:n.matrixId,setQueryOptions:i})})}),p("div",{className:Kr,children:R("div",{className:as,children:[g&&p(Mr,{analysesCollections:g,collectionId:n.collectionId,setQueryOptions:i}),v&&N&&p(Ir,{analysesCategories:v,queryOptions:n,setQueryOptions:i,quantityOfAllAnalyses:N.length,categoriesWithAnalyses:c})]})})]}),R("div",{className:ns,children:[R("div",{children:[p("div",{className:Xr,children:p(H,{className:I(es,ts
1),InputProps:{startAdornment:p(J,{position:"start",className:Zr,children:p(Sn,{spriteUrl:gr,className:Jr})})},name:"search",value:r,onChange:e=>s(null==e?void 0:e.target.value),placeholder:G("search-analyses")})}),p("div",{className:ss})]}),p("div",{className:is,children:t&&R(k,{children:[p("div",{className:rs,children:p($t,{variant:"standard",children:p(mn,{html:M})})}),p("div",{className:ss,children:p(E,{})})]})}),p("div",{}),b&&p(t?br:Cr,{analyses:b})]})]})}),p(ur,{}),p(Ln,{sideLayout:Ba.BIG,heading:"have-question-for-the-team",ctaText:"send-message",contactRoute:Tt.NO_TO_LINK,phoneNumber:"urgent-sample-number",faqCtaText:"faq-for-popular-common-questions",faqRoute:Tt.CONTACT})]})};var ds="ExportingHero_container_1",ms="ExportingHero_contentContainer_22",ps="ExportingHero_textContainer_35",us="ExportingHero_selectContainer_46",hs="ExportingHero_textGray_57";const vs=({countries:e,setCountryCode:t,countryCode:a})=>{const n=Wt();return p("div",{className:ds,children:R("div",{className:ms,children:[R("div",{className:ps,children:[p(Vt,{variant:"h2",children:n("exporting-hero-heading")}),p($t,{variant:"intro",children:n("exporting-hero-subheading")}),p($t,{variant:"big",children:n("exporting-hero-description")})]}),R("div",{className:us,children:[p($t,{variant:"standard",children:n("countries")}),p(xr,{name:"country",defaultValue:a,value:a,onChange:e=>t(e.target.value),label:"select-country",children:e.map((({countryCode:e,name:t},a)=>p(Z,{value:e,className:hs,children:t},a)))})]})]})})},gs=()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getAnalysesExportCountries"],(()=>cn.getCountries()),{keepPreviousData:!0,staleTime:6e4,cacheTime:6e4,onSuccess:e=>{console.log("Get countries",e)},onError:a=>{console.log("Get countries error",a),t.open(fa(a,e("get-countries-error")),{severity:"error"})}})};var ys="AnalysesTableEmpty_tableContainer_1",bs="AnalysesTableEmpty_heading_1",_s="AnalysesTableEmpty_dataHeader_4",Ns="AnalysesTableEmpty_headFirst_9",fs="AnalysesTableEmpty_head_1",Cs="AnalysesTableEmpty_noData_17";const Ss=()=>{const e=Wt();return R("div",{className:ys,children:[p($t,{variant:"bigSemiBold",className:bs,children:e("country")}),R("div",{className:_s,children:[p("div",{className:Ns,children:p($t,{variant:"standardSemiBold",children:e("analysis-panel-name-head")})}),p("div",{className:fs,children:p($t,{variant:"standardSemiBold",children:e("turnaround-head")})}),p("div",{className:fs,children:p($t,{variant:"standardSemiBold",children:e("pricing-head")})})]}),p("div",{className:Cs,children:p($t,{variant:"standard",children:e("empty-row-analyses")})})]})};var xs="AnalysisCardTabletAndMobileEmpty_container_1",As="AnalysisCardTabletAndMobileEmpty_noData_28";const Is=()=>{const e=Wt();return p("div",{className:xs,children:p("div",{className:As,children:p($t,{variant:"standard",children:e("empty-row-analyses")})})})};var ws="Exporting_bottomHeroContainer_1",Ts="Exporting_contentContainer_14",Rs="Exporting_textContainer_28",ks="Exporting_imageContainer_39",Es="Exporting_image_39",Ms="Exporting_heading_54";const Ds=()=>{var e,t;const a=Wt(),n=h(),i=A(n.breakpoints.up("lg")),{data:r}=gs(),[s,o]=m.exports.useState(""),{data:l,isLoading:c}=Vr({categoryId:"",matrixId:"",collectionId:"",countryCode:s,limit:"",offset:"0",searchPhrase:""},""!==s),d=null==(e=null==r?void 0:r.find((e=>e.countryCode===s)))?void 0:e.name;return R(k,{children:[p(vs,{countries:null!=r?r:[],setCountryCode:o,countryCode:s}),R(za,{children:[c&&p(pn,{className:"spinnerCenter"}),""!==s&&p("div",{className:Ms,children:p($t,{variant:"bigSemiBold",children:`${d} (${null!=(t=null==l?void 0:l.length)?t:""})`})}),""!==s&&l?i&&l?p(br,{analyses:null!=l?l:[]}):l?p(Cr,{analyses:null!=l?l:[]}):p(Is,{}):p(Ss,{})]}),p("div",{className:ws,children:R("div",{className:Ts,children:[R("div",{className:Rs,children:[p(Vt,{variant:"h2",children:a("exporting-heading")}),p($t,{variant:"big",children:a("exporting-description-first")}),p($t,{variant:"big",children:a("exporting-description-second")})]}),p("div",{className:ks,children:p("img",{className:Es,src:"/assets/exportingBottomHero.6690321c.png"})})]})}
1),p(Ln,{sideLayout:Ba.BIG,heading:"need-help",description:"exporting-bottom-support-description",ctaText:"send-message",contactRoute:Tt.NO_TO_LINK,phoneNumber:"urgent-sample-number",faqCtaText:"faq-for-popular-common-questions",faqRoute:Tt.CONTACT})]})};var Ps="FAQItem_faqItem_1",Ls="FAQItem_faqItemHeader_10",Bs="FAQItem_icon_16";const Os=({faqItem:e})=>{const[t,a]=m.exports.useState(!1);return R("div",{className:Ps,children:[R("div",{className:Ls,children:[p($t,{variant:"standardSemiBold",children:e.question}),p(F,{onClick:()=>a(!t),size:"small",children:p(Sn,{className:Bs,spriteUrl:t?Yi:Vi})})]}),p(j,{in:t,timeout:"auto",children:p($t,{children:p(mn,{html:e.answer})})})]},e.position)};var Fs="IconCard_iconCard_1",Hs="IconCard_iconContainer_18",Us="IconCard_icon_1",zs="IconCard_content_27",Gs="IconCard_title_31",qs="IconCard_subtitle_37",Ws="IconCard_divider_42";const Vs=({icon:e,title:t,subtitle:a,cta:n,className:i})=>R(ee,{className:I(Fs,i),elevation:0,children:[p("div",{className:Hs,children:p("img",{src:e,className:Us})}),R("div",{className:zs,children:[p(Vt,{variant:"h6",className:Gs,children:t}),a&&p($t,{variant:"small",className:qs,children:a})]}),p(te,{className:Ws}),n]});var Ys="LocationsBottomHeroCourierCTA_container_1",js="LocationsBottomHeroCourierCTA_contentContainer_14",$s="LocationsBottomHeroCourierCTA_title_27",Qs="LocationsBottomHeroCourierCTA_textGray_30",Ks="LocationsBottomHeroCourierCTA_textRed_34",Xs="LocationsBottomHeroCourierCTA_btn_37",Zs="LocationsBottomHeroCourierCTA_imageContainer_41";const Js=()=>{const e=Wt(),t=f();return R("div",{className:Ys,children:[R("div",{className:js,children:[p($t,{variant:"standard",className:Ks,children:e("for-ets-client")}),p(Vt,{variant:"h2",className:$s,children:e("free-courier-service")}),p($t,{className:Qs,children:e("last-regular-pickup")}),p($t,{variant:"big",children:e("courier-request-for-same-day-service-urgent")}),p(P,{variant:"contained",color:"primary",className:Xs,onClick:()=>t(Tt.REQUEST_COURIER),children:e("request-courier")})]}),p("div",{className:Zs,children:p("img",{src:"/assets/vineyardImage.a7d6c382.png",alt:"vineyard image."})})]})},eo=m.exports.createContext({selectedDropboxId:"",setSelectedDropboxId:()=>console.log("MISSING PROVIDER")}),to=e=>{const{setSelectedDropboxId:t}=m.exports.useContext(eo),[a,n]=m.exports.useState();return m.exports.useEffect((()=>(a||n(new google.maps.Marker),a&&a.addListener("click",(async e=>{console.log(e);const n=a.getTitle();t(null!=n?n:"")})),()=>{a&&a.setMap(null)})),[a]),m.exports.useEffect((()=>{a&&a.setOptions(e)}),[a,e]),null},ao=e=>{var t=e,{onClick:a,onIdle:n,children:i,style:r}=t,s=c(t,["onClick","onIdle","children","style"]);const o=m.exports.useRef(null),[l,d]=m.exports.useState();m.exports.useEffect((()=>{o.current&&!l&&d(new window.google.maps.Map(o.current,{}))}),[o,l]);function u(e){const t=m.exports.useRef();return((e,t)=>{if(ne(e)||e instanceof google.maps.LatLng||ne(t)||t instanceof google.maps.LatLng)return new google.maps.LatLng(e).equals(new google.maps.LatLng(t))})(e,t.current)||(t.current=e),t.current}var h,v;return h=()=>{l&&l.setOptions(s)},v=[l,s],m.exports.useEffect(h,v.map(u)),m.exports.useEffect((()=>{l&&(["click","idle"].forEach((e=>google.maps.event.clearListeners(l,e))),a&&l.addListener("click",a),n&&l.addListener("idle",(()=>n(l))))}),[l,a,n]),R(k,{children:[p("div",{ref:o,style:r}),ae.Children.map(i,(e=>{if(m.exports.isValidElement(e))return m.exports.cloneElement(e,{map:l})}))]})},no=[{elementType:"geometry",stylers:[{color:"#F5F5F5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#F5F5F5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#BDBDBD"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#EEEEEE"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#E5E5E5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9E9E9E"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#FFFFFF"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#DADADA"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9E9E9E"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#E5E5E5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#EEEEEE"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#C9C9C9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9E9E9E"}]}];var io="PrimaryLocationMap_container_1";const ro=()=>{const[e,t]=m.exports.useState({lat:38.508463789233524,lng:-122.46721894205159});return p("div",{className:io,children:p(ie,{apiKey:"AIzaSyBNQZqLnEF0smmyYzrEqAEDYK493BXyi5o",children:p(ao,{center:e,zoom:9,styles:no,style:{height:"100%",width:"100%",position:"relative"},children:p(to,{position:{lat:38.508463789233524,lng:-122.46721894205159},title:"ETS Laboratories"},1)})})})};var so={primaryLocation:"PrimaryLocation_primaryLocation_1",primaryLocationContactInfo:"PrimaryLocation_primaryLocationContactInfo_13",primaryLocationAddress:"PrimaryLocation_primaryLocationAddress_20",arrowRightIcon:"PrimaryLocation_arrowRightIcon_32",viewAllLocationsButton:"PrimaryLocation_viewAllLocationsButton_37"};const oo=()=>{const e=f();return R("div",{className:so.primaryLocation,children:[p(ro,{}),R("div",{className:so.primaryLocationAddress,children:[p("div",{className:so.titleContainer,children:p($t,{variant:"intro",children:"ETS Primary Location"})}),R("div",{className:so.primaryLocationContactInfo,children:[R("div",{children:[p($t,{variant:"standard",className:so.textGray,children:"Phone Number"}),p("a",{href:"tel:7079634806",className:so.hrefAccent,children:"(707) 963-4806"})]}),R("div",{className:so.contactDetailContainer,children:[p($t,{variant:"standard",className:so.textGray,children:"Email:"}),p("a",{href:"mailto:[email protected]",className:so.hrefAccent,children:"[email protected]"})]}),R("div",{className:so.contactDetailContainer,children:[p($t,{variant:"standard",className:so.textGray,children:"Address"}),p($t,{variant:"standardSemiBold",children:"899 Adams Street St. Helena, CA 94574"})]})]}),p("div",{children:p(P,{className:so.viewAllLocationsButton,onClick:()=>e(Tt.LOCATIONS),size:"small",endIcon:p(Sn,{className:so.arrowRightIcon,spriteUrl:nr}),children:"View All Locations & Hours"})})]})]})};var lo={heroContainer:"Hero_heroContainer_1",textContainer:"Hero_textContainer_20",subHeader:"Hero_subHeader_31"};const co=()=>{const e=Wt();return p("div",{className:lo.heroContainer,children:R("div",{className:lo.titleContainer,children:[p(Vt,{variant:"h2",className:lo.header,children:p(mn,{html:e("contact-ets-header")})}),p($t,{variant:"big",className:lo.subHeader,children:"Please reach out via live chat, email, phone, or SMS - whichever method best suits your preference and convenience."})]})})};var mo={contactLayoutContainer:"Contact_contactLayoutContainer_1",contactContainer:"Contact_contactContainer_8",iconCardContainer:"Contact_iconCardContainer_28",hrefAccent:"Contact_hrefAccent_40",primaryLocation:"Contact_primaryLocation_47",primaryLocationContactInfo:"Contact_primaryLocationContactInfo_53",primaryLocationAddress:"Contact_primaryLocationAddress_59",viewAllLocationsButton:"Contact_viewAllLocationsButton_65",responseTimeContainer:"Contact_responseTimeContainer_69",contactInfoContainer:"Contact_contactInfoContainer_81",contactFormContainer:"Contact_contactFormContainer_88",contentContainer:"Contact_contentContainer_94",flex:"Contact_flex_94",btn:"Contact_btn_100",faqContainer:"Contact_faqContainer_104",faqContentContainer:"Contact_faqContentContainer_114",faqTitleContainer:"Contact_faqTitleContainer_120",ctaButton:"Contact_ctaButton_129"};const po=()=>{const e=Wt(),{show:t}=S(),a=p(P,{className:mo.ctaButton,variant:"contained",color:"tertiary",onClick:()=>t(),children:"Message us now"}),n=p(P,{className:mo.ctaButton,variant:"text",color:"tertiary",onClick:()=>window.open("mailto:[email protected]"),children:"[email protected]"}),i=p(P,{className:mo.ctaButton,variant:"text",color:"tertiary",onClick:()=>window.open("tel:+17079634806"),children:"707-963-4806"}),{data:r}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getFrequentlyAskedQuestionsAndAnswers"],(()=>cn.getFrequentlyAskedQuestionsAndAnswers()),{keepPreviousData:!0,staleTime:6e5,onSuccess:e=>{console.log("Get frequently asked questions and answers",e)},onError:a=>{console.error("Get frequently asked questions and answers error",a),t.open(fa(a,e("get-all-faq-error")),{severity:"error"})}})})();return R(k,{children:[p("div",{className:mo.contactLayoutContainer,children:p(za,{children:p("div",{className:mo.contactContainer,children:R("div",{className:mo.contactFormContainer,children:[p(co,{}),p("div",{className:mo.contactInfoContainer,children:R("div",{className:mo.iconCardContainer,children:[p(Vs,{icon:"/assets/chatIcon.91e0b429.png",title:"Chat Now",subtitle:"Right from this website",cta:a,className:mo.iconCard}),p(Vs,{icon:"/assets/emailIcon.fd8032b5.png",title:"Email",subtitle:"From your email app",cta:n,className:mo.iconCard}),p(Vs,{icon:"/assets/smsIcon.d1cca0a0.png",title:"Call or Text",subt
1itle:"From your phone",cta:i,className:mo.iconCard})]})}),p(oo,{})]})})})}),R("div",{children:[p(Js,{}),p(za,{children:R("div",{className:mo.faqContainer,children:[p("div",{className:mo.faqTitleContainer,children:p(Vt,{variant:"h3",children:e("frequently-asked-questions")})}),p("div",{className:mo.faqContentContainer,children:r&&r.sort(((e,t)=>e.position-t.position)).map(((e,t)=>p(Os,{faqItem:e},t)))})]})})]})]})};var uo,ho;(ho=uo||(uo={})).CONTENT_PAGE="content-page",ho.PUBLICATION="publication",ho.PERSON="people",ho.ANALYSES="analyses",ho.LOCATION="location",ho.HELP_ARTICLES="search-sym-link";var vo=uo;const go=[Tt.ETS_DIFFERENCE,Tt.TERMS_AND_CONDITIONS_AND_CREDIT_AGREEMENT,Tt.ABOUT_US,Tt.OUR_STORY,Tt.PEOPLE,Tt.QUALITY,Tt.APPLIED_INNOVATION,Tt.SEMINARS,Tt.SERVICES,Tt.VINTAGE_PORTAL,Tt.EXPERTISE_ON_CALL,Tt.ALL_ANALYSES,Tt.EXPORTING_ANALYSES,Tt.CONTACT],yo=m.exports.createContext({openDialog:()=>console.log("MISSING PROVIDER"),closeDialog:()=>console.log("MISSING PROVIDER")}),bo=m.exports.createContext({modal:!1,setModal:()=>console.log("MISSING PROVIDER"),personForModal:{},setPersonForModal:()=>console.log("MISSING PROVIDER")});var _o="SearchResult_textRed_1";const No=({searchResult:e})=>{const t=f(),{modal:a,setModal:n,personForModal:i,setPersonForModal:r}=m.exports.useContext(bo);return e._index===vo.CONTENT_PAGE?p($t,{variant:"standardSemiBold",className:_o,onClick:()=>{var a;return t(null!=(a=(e=>{const t=e.toLowerCase().replace(/\s+/g,"-");return"technical-tools"===t&&window.open("https://www.etslabs.com/technical-tools"),"privacy"===t&&window.open("https://www.etslabs.com/explore/privacy"),go.find((e=>e.includes(t)))})(e._source.title))?a:"")},children:e._source.title},e._id):e._index===vo.PUBLICATION?p($t,{variant:"standardSemiBold",onClick:()=>{return a=e,t(Q(Tt.PUBLICATION,{id:a._source.id.toString()}));var a},className:_o,children:p(mn,{html:e._source.title})},e._id):e._index===vo.ANALYSES?p($t,{variant:"standardSemiBold",className:_o,onClick:()=>{return a=e,t(Q(Tt.ANALYSES_DETAILS,{id:a._id.toString()}));var a},children:p(mn,{html:`${e._source.testName} (${e._source.sampleType})`})},e._id):e._index===vo.PERSON?p($t,{variant:"standardSemiBold",className:_o,onClick:()=>{r(e._source),t(Tt.HOME),n(!0)},children:p(mn,{html:e._source.name})},e._id):e._index===vo.HELP_ARTICLES?p($t,{variant:"standardSemiBold",className:_o,onClick:()=>window.open(e._source.url,"_self"),children:p(mn,{html:e._source.title})},e._id):e._index===vo.LOCATION?R($t,{variant:"standardSemiBold",className:_o,onClick:()=>t(Tt.LOCATIONS),children:[e._source.name,", ",e._source.street_1,",",e._source.city,", ",e._source.postalCode]},e._id):p(k,{})};var fo="Category_container_1",Co="Category_category_8",So="Category_content_11";const xo=({searchResult:e,category:t})=>R("div",{className:fo,children:[p($t,{variant:"standardSemiBold",className:Co,children:t===vo.CONTENT_PAGE?G("content-page"):t&&t===vo.HELP_ARTICLES?G("help-articles"):t}),p("div",{className:So,children:e.map(((e,t)=>p(No,{searchResult:e},t)))})]});var Ao={container:"GlobalSearch_container_1",searchBarContainer:"GlobalSearch_searchBarContainer_12",searchBar:"GlobalSearch_searchBar_12",icon:"GlobalSearch_icon_47",grayUnderline:"GlobalSearch_grayUnderline_51",searchResultsContainer:"GlobalSearch_searchResultsContainer_54"};const Io=()=>{const e=Wt(),[t,a]=m.exports.useState(""),n=Qt(t,1e3),{data:i,refetch:r}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getSearchCMSData"],(()=>cn.getSearchCMSData(e)),{enabled:!1,keepPreviousData:!0,onSuccess:e=>{console.log("Get search cms data",e)},onError:e=>{console.log("Get search cms data error",e),a.open(fa(e,t("get-search-cms-data-error")),{severity:"error"})}})})(n);m.exports.useEffect((()=>{r()}),[n]);const s=null==i?void 0:i.reduce(((e,t)=>(e[t._index]=e[t._index]||[],e[t._index].push(t),e)),[]),o=s&&Object.values(s);return R("div",{className:Ao.container,children:[p("div",{className:Ao.searchBarContainer,children:p(H,{variant:"standard",className:Ao.searchBar,name:"searchTerm",value:t,onChange:e=>a(null==e?void 0:e.target.value),placeholder:e("type-something"),InputProps:{startAdornment:p(Sn,{spriteUrl:gr,className:Ao.icon})}})}),p("div",{className:Ao.searchResultsContainer,children:p("div",{className:Ao.categoryContainer,children:null==o?void 0:o.map(((e,t)=>p(xo,{searchResult:e,category:e[0]._index},t)))})})]})};var wo={container:"ResultsYouCanTrust_container_1",headerContainer:"ResultsYouCanTrust_headerContainer_14",cardContainer:"ResultsYouCanTrust_cardContainer_29",cardIcon:"ResultsYouCanTrust_cardIcon_35",card:"ResultsYouCanTrust_card_29",cta:"ResultsYouCanTrust_cta_72",arrowRightIcon:"ResultsYouCanTrust_arrowRightIcon_81",button:"ResultsYouCanTrust_button_96",imageContainer:"ResultsYouCanTrust_imageContainer_102"};const To=()=>{const e=Wt(),t=f(),a=[{id:1,title:e("complete-toolkit-title"),description:e("complete-toolkit-description"),image:"/assets/lab_at_night.8713a4c7.webp",buttonText:"Learn More",route:Tt.SERVICES,labelTag:"Service"},{id:2,title:e("continuous-quality-title-short"),description:e("continuous-quality-description"),image:"/assets/cont_quality.cc7f5f9f.webp",buttonText:"Learn More",route:Tt.QUALITY,labelTag:"Quality"},{id:3,title:e("committed-to-craft-title-short"),description:e("committed-to-craft-description"),image:"/assets/committed_to_craft.edfc1b5f.webp",buttonText:"Learn More",route:Tt.EXPERTISE_ON_CALL,labelTag:"Support"}];return R("div",{className:wo.container,children:[p("div",{className:wo.headerContainer,children:p(Vt,{variant:"h2",className:wo.header,children:e("results-you-can-trust-heading")})}),p("div",{className:wo.cardContainer,children:a.map((({id:e,image:a,title:n,description:i,route:r,buttonText:s,labelTag:o})=>R("div",{className:`${wo.card} related-card`,onClick:()=>t(r),children:[R("div",{className:wo.imageContainer,children:[p("img",{src:a,alt:i}),p("div",{className:wo.cardContainer,children:p("div",{className:wo.openClosedContainer,children:p($t,{variant:"small",children:o})})})]}),p($t,{variant:"bigSemiBold",children:n}),p($t,{variant:"standard",children:i}),p(P,{className:wo.cta,onClick:()=>t(r),size:"small",endIcon:p(Sn,{className:wo.arrowRightIcon,spriteUrl:nr}),children:s})]},e)))})]})};var Ro={container:"AnalysesList_container_1",content:"AnalysesList_content_23",contentHeader:"AnalysesList_contentHeader_30",contentHeaderTextRed:"AnalysesList_contentHeaderTextRed_33",relatedAnalysesContainer:"AnalysesList_relatedAnalysesContainer_46",relatedAnalysesCard:"AnalysesList_relatedAnalysesCard_58",cta:"AnalysesList_cta_71",arrowRightIcon:"AnalysesList_arrowRightIcon_87",buttonContent:"AnalysesList_buttonContent_91",textRed:"AnalysesList_textRed_98",textGray:"AnalysesList_textGray_101",truncate:"AnalysesList_truncate_104"};const ko=()=>{const e=Wt(),t=f(),a=[{id:1,categoryId:"7061",label:e("for-wineries")},{id:2,categoryId:"7063",label:e("for-breweries")},{id:3,categoryId:"7055",label:e("for-distilled-spirits")}],{ref:n,inView:i,entry:r}=re({triggerOnce:!0,threshold:0});return R("div",{className:`${Ro.container}`,children:[R("div",{className:Ro.heading,children:[p(Vt,{variant:"h2",children:e("analyses-list-heading")}),p($t,{variant:"big",children:e("analyses-list-description")})]}),R("div",{className:Ro.content,children:[p("div",{className:Ro.contentHeader,children:p($t,{className:Ro.contentHeaderTextRed,onClick:()=>t(Tt.ALL_ANALYSES),children:e("view-all-analyses")})}),p("div",{className:Ro.relatedAnalysesContainer,children:a.map((({id:e,categoryId:a,label:r})=>p("div",{ref:n,className:`${Ro.relatedAnalysesCard} related-card ${i?"show":"hidden"}`,children:p(P,{className:Ro.cta,onClick:()=>t(Tt.ALL_ANALYSES,{state:{sampleTypeId:a}}),size:"small",endIcon:p(Sn,{className:Ro.arrowRightIcon,spriteUrl:nr}),children:p("div",{className:Ro.buttonContent,children:p($t,{variant:"standard",className:I(Ro.textRed,Ro.truncate),children:r})})})},e)))})]})]})};var Eo={container:"CourierService_container_1",courierContainer:"CourierService_courierContainer_15",requestCourierContainer:"CourierService_requestCourierContainer_26",scheduleButton:"CourierService_scheduleButton_40",timeContainer:"CourierService_timeContainer_48",requestButton:"CourierService_requestButton_62",timeWrapper:"C
1ourierService_timeWrapper_72",time:"CourierService_time_48",textGreen:"CourierService_textGreen_83"};const Mo=({isUserLoggedIn:e})=>{const t=Wt(),a=f(),n=h(),i=A(n.breakpoints.up("lg")),r=()=>{const e=(new Date).toLocaleString("en-US",{timeZone:"America/Los_Angeles"}),t=`${(new Date).toLocaleString("en-US",{timeZone:"America/Los_Angeles"}).split(",")[0]}, 10:00:00 AM`,a=Date.parse(t)-Date.parse(e);let n={hours:0,minutes:0,seconds:0};return a>0&&(n={hours:Math.floor(a/36e5),minutes:Math.floor(a/1e3/60%60),seconds:Math.floor(a/1e3%60)}),n},[s,o]=m.exports.useState(r());return m.exports.useEffect((()=>{setTimeout((()=>{o(r())}),1e3)})),!1===e?p(k,{}):R("div",{className:Eo.container,children:[R("div",{className:Eo.courierContainer,children:[p(Vt,{variant:"h4",children:t("courier-service")}),!e&&p($t,{variant:"bigSemiBold",className:Eo.textGreen,children:t("courier-pickup-request-text")}),p($t,{variant:"big",children:t("courier-description-landing-page")})]}),i&&p("div",{className:Eo.divider,children:p(te,{orientation:"vertical"})}),p("div",{className:Eo.requestCourierContainer,children:e?R(k,{children:[p($t,{variant:"big",className:Eo.requestCourierTitle,children:t("schedule-question-courier-landing-page")}),p(P,{className:Eo.scheduleButton,variant:"contained",color:"primary",onClick:()=>a(Tt.REQUEST_COURIER),children:t("schedule-cta-text-landing-page")})]}):p(k,{children:R("div",{className:Eo.timeContainer,children:[R("div",{className:Eo.timeWrapper,children:[R("div",{className:Eo.time,children:[p(Vt,{variant:"h3",children:`${s.hours.toString().padStart(2,"0")}`}),p($t,{variant:"standard",children:"HRS"})]}),R("div",{className:Eo.time,children:[p(Vt,{variant:"h3",children:":"}),p("div",{})]}),R("div",{className:Eo.time,children:[R(Vt,{variant:"h3",children:[` ${s.minutes.toString().padStart(2,"0")}`," "]}),p($t,{variant:"standard",children:"MIN"})]}),R("div",{className:Eo.time,children:[p(Vt,{variant:"h3",children:":"}),p("div",{})]}),R("div",{className:Eo.time,children:[R(Vt,{variant:"h3",children:[`${s.seconds.toString().padStart(2,"0")}`," "]}),p($t,{variant:"standard",children:"SEC"})]})]}),p(P,{className:Eo.requestButton,variant:"contained",color:"primary",onClick:()=>a(Tt.REQUEST_COURIER),children:t("request-courier")})]})})})]})};var Do="BrowseTheArchive_browseArchiveContainer_1",Po="BrowseTheArchive_browseArchive_1";const Lo=()=>p("div",{className:Do,children:p("a",{href:"https://issuu.com/etslabs/docs/ets_harvest_guide_2026_325437a4514d06",target:"_blank",children:p($t,{className:Po,variant:"bigSemiBold",children:"ETS Harvest Guide - Click to View"})})});var Bo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJ+SURBVHgB7ZlPaBNBFMbfrG2sdMGNh9ZDbCUp2Iv9gxfBElSEilgQPFmU0oNe9KCCXvQkeKmgF73ooYjVQ0Fo8WJAJFTEXsQaT4LWFDzYHjRCgjVCx/eeRmqNm4W+dDowPwiT3XkL3zfz5s1OogAZbdq7fSOo0SUNPUpBAOscpdXEd7V0bngxm1ckvlGrVzYI/wsNhbLSvQ0x5d3AK7vEEzjglDUeaH0ELEVjyntgMzgLdhtAnAHTOAOmcQZMY72BBhCiMfBh2+G+SLHzz2agNPcJJBAzcGj6NjS3b40US+InOwdBAhED8e4OFk/CaHTDSOAsUWwlfrWIGPDbWrklQdMnR0Jj0+M+JAb6IN6VEjEgsoiDrg5uP+fe14wtzc1zGzXdaiGUQilut+Co7r5zMTTWb/slPP7b9GoRMRDb7HPbku6BlojP+O2tIIFYFSLeXL0LpXx4XtOC33HmKEghYqCIeU0jXy4UYXYsExqbXPaMBCKLeHbsMbedOLK0of0PWrg7Lw/x91rlNioiBhamXuNnhgUeyFyvWmHoXnr8yp/6/+FeBiRQ95v2aRBguXje0NDQwlSO+4LuJKSOH+TZob4n/efFXiXEDBCcIpeGIHmiv2o/zdKLUyNi4glRAxXISGJgD+y6dpqvX164BV9y7zjVpKmLgQqD355y+2DTfqgX7kBjGnciW0m1k1kSS2j5a5E3rx+4W0sivoipjFZ225VQNXp78yFIIj4D9C5EsxALmv/p+/joOUhT1zK6FrgqZBpnwDTOgGmcAdPYbwD/LC6AxXie0jK/b5hA60lPAQzbOAukGcWf9Y4tZvMblO7FOxNgASQc3z6zpJm0/wTbXszdVPaSAAAAAABJRU5ErkJggg==",Oo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK0SURBVHgB7Zk/aBNRHMd/72xjxYLNkjoUlLZgljTtJlSLSiE4+AcVxKJIly52UFfFSQcXM1gXl1LUbpF2ESIi0ambjV0MWKmbuPSEiDVCn+/76CvJteUufT9yPbgPhEvu3oPv732/9+53rSDFdMepo/tJTK9LGhSCumiPI6SY+yvW74yvlVYExLdL8SkKwhuQ5NaEHGpLCCevfkVLPFALjtQ4JOVFiihSRd6hKKNciHYBiriAsIkLCJu4gLCJC7jwZVZ/WjXPSxtZcvDIYdoNu53nxbqA399/aDFjf94HGjufHqNktl//rv2qki3WEVr9/JWaJZnp00e33PxcL9YO/PxYpp5zJ9Rxkd7l7gaa03N+WB+XXxbJFmsHvr0oUs2tUmpkkFIns77jETcUDFC8LdYOIMeVZwXK3LtJo2/zW66b3IP2rk4aLT7R35cezuhrtrA8BypPC75ijHg4gLFLj2aIA5YC4ALyb4owqz574Iw+QjTEJwf69bWg90oQxKuO05KYMELrVzlxqFPHCw4Y8RzRMbAWACAegntv5BrOY5f6cPUB/XPt9/562HshrO7CxGP9qV/pqvoON7hhj9CxyUtUmXq9KR5OwBETK+4IsTlg8p+evKL2+eHN83hOQDSe2PX3CBdsDqCzhDAIhWBk3ZzzAgfeHJ9guR9YHMjcb4yInzCMTd+6TBxYOwAxZxeeU0Jtk9jz/fKdGsmqGOX1swPjbV2wdqBb9T8Qj20yyM2J/gdjsSP1Xs+RLda9kLez3Cn329GtGsDKVIFssHYA7QFYLS9TsyQH+sgWtldKd+PFxnSefuANjmM7ZXmlbOU8L+y9UKuJ/y4UNnEBYRMXEDZxAWHjqH8WuxRhHEfIRYoqUs47gmg8ii5AsxJ/27m2VlrZJ+SQOjNHEQDCVfNWgmZo/w/CSSw888FLogAAAABJRU5ErkJggg==",Fo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMXSURBVHgB7ZlNSF
1RRGIa/c1MTFRpdZAtNMWHcOI60KxuKAmuhRbopsHDTxoRq0cZdYRBBLcoWbSSloMjQ3GS0EEmqReTPRsFEyUW2yAlGsBE8nfd4z5jQTBPng+uF+8DlzM8deN97vr/DCFL05h+t3E2id0NSVAgK0Q5HSDH4S2xcbV8bXRAQnyvFZz8I34akeFLI+pw84dxT7/wlHqgHjqhxSMoz5FOkCnmH/IzaBX8bUAQGvCYw4DWBAa/JIWb2HolSWfMhKm9qoMKKffqzlak5Wpmco+nuPlpd/EaciCf5xyQxkBsqokjXRQpfbsl43+z9FzR1q4/W4wnigMUAxJ8YuUvFkWotbKZngJbHJuj72KT+vjhyQBlrpaq2Rv0eO/K28RqLCRYDB+906CeP8ICwdGGCkIJRrNiJT9cfki3WSQwxJmwyiQfGYFI9+XBnq8qXOrLF2kBt1wW9zvePZJWguGdWhRgoa24gW6wNlNRV63XmwUDWv0F+gPKmw2SLtYFQZNNAXCVmtpjkNmXWhqATm7j/n4QsdsMuPpn9rqXD2sDS8LheS2PRrH8T7jir1x9TX8gWawNfh9/pNdzZklVM456qtpP69XT3Y7LF2gASclZVoLw9RakmlQ7TyACqFsdcxNKJIf74m81RAsz3v1YCX6YqEwa80lgd1aiGh7Fjx40SACZOfXz0zzBK/kzQUM15tmGOrYxCmBGPrvxnX0ComEYHo1ziAdt5wJRGiP1w6fZf70HnhUlcXOcCth3IVU8WZBK24u4Kxmsu2AyUuKISi8tp70nGV/Wa55rlgM2Aif+tzhyl0zNP9VXmDm0mL0JuuHHAlgOFFaV6RTLHnt3YNirHnt/UpdWY49wBNgNF7g7gdAbM0RKEO1pS3ReUMOYAm4GC/Vv1f+nVuDou9qSeOMpqrTrwmzNxQaX9GG1gM7CuQgfXe1VCzbxvMKV1Sc1NZoe4YOvEXhEcaLwmMOA1gQGv8b8B9WdxnHyM4wg5QX5FyiFHELX7cRegWYm/4pxbG13YJWS9+mSQfACEq9lnFJqh/TdbiTyZAfVjBQAAAABJRU5ErkJggg==";var Ho={container:"Innovation_container_1",headerContainer:"Innovation_headerContainer_14",cardContainer:"Innovation_cardContainer_29",cardIcon:"Innovation_cardIcon_35",card:"Innovation_card_29",cta:"Innovation_cta_64",arrowRightIcon:"Innovation_arrowRightIcon_73",button:"Innovation_button_88",rightAlign:"Innovation_rightAlign_108"};const Uo=()=>{const e=Wt(),t=f();e("complete-toolkit-title"),e("complete-toolkit-description"),Tt.SERVICES,e("complete-toolkit-button-text"),e("continuous-quality-title"),e("continuous-quality-description"),Tt.QUALITY,e("continuous-quality-button-text"),e("committed-to-craft-title"),e("committed-to-craft-description"),Tt.EXPERTISE_ON_CALL,e("committed-to-craft-button-text"),re({triggerOnce:!0,threshold:0});return R("div",{className:`${Ho.container}`,children:[R("div",{className:Ho.headerContainer,children:[p(Vt,{variant:"h2",children:p(mn,{html:e("innovation-heading-text")})}),p($t,{variant:"big",children:e("innovation-heading-description")})]}),p(Vt,{variant:"h4",className:Ho.subHeader,children:"Our Newest Addition: Nuclear Magnetic Resonance (NMR)"}),p(mn,{html:'<div style="padding:56.25% 0 0 0;position:relative;"><iframe loading="lazy" src="https://player.vimeo.com/video/423751809?h=732602c848&badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Digital Signature"></iframe></div><script src="https://player.vimeo.com/api/player.js"><\/script>'}),p("div",{className:Ho.rightAlign,children:p(P,{className:Ho.cta,onClick:()=>t(Tt.APPLIED_INNOVATION),size:"small",endIcon:p(Sn,{className:Ho.arrowRightIcon,spriteUrl:nr}),children:e("innovation-learn-more")})})]})};var zo="FormInputPassword_container_1",Go="FormInputPassword_label_6",qo="FormInputPassword_formInput_9",Wo="FormInputPassword_input_13",Vo="FormInputPassword_inputAdornment_20",Yo="FormInputPassword_eyeIcon_23",jo="FormInputPassword_errorContainer_28",$o="FormInputPassword_messageError_32",Qo="FormInputPassword_helpMessage_35";const Ko=e=>{var t=e,{label:a,error:n,errorMessage:i,name:r,helpMessage:s,className:l}=t,d=c(t,["label","error","errorMessage","name","helpMessage","className"]);const[h,v]=m.exports.useState({[r]:!1});return R("div",{className:I(zo,l),children:[p(u,{variant:"badge",className:Go,children:a}),p(H,{variant:"standard",className:qo,label:"",name:r,error:n,type:h[r]?"text":"password",inputProps:o({className:Wo},d),InputProps:{endAdornment:p(J,{position:"end",className:Vo,children:p(F,{"aria-label":"toggle password visibility",onClick:()=>{v((e=>({[r]:!e[r]})))},children:h[r]?p(Sn,{className:Yo,spriteUrl:"/assets/eyeCrossed.a39fa0e4.svg"}):p(Sn,{className:Yo,spriteUrl:"/assets/eye.97a72cb0.svg"})})})}}),n&&i&&p("div",{className:jo,children:p($t,{variant:"extraSmall",className:$o,children:i})}),s&&p($t,{className:Qo,variant:"extraSmall",children:s})]})},Xo={user:{email:"",password:""}};var Zo={container:"LoginForm_container_1",form:"LoginForm_form_6",logicSection:"LoginForm_logicSection_9",resetPassword:"LoginForm_resetPassword_15",link:"LoginForm_link_21",formButton:"LoginForm_formButton_24"};const Jo=()=>{const e=Wt(),{state:t}=y(),{mutateAsync:a}=Ca(),n=z().shape({email:Ni(e("required-email")),password:Ni(e("required-password"))}),i=t;return p("div",{className:Zo.container,children:p(q,{initialValues:Xo.user,onSubmit:e=>a({user:e}),validationSchema:n,validateOnBlur:!1,enableReinitialize:!0,children:({handleBlur:t,handleChange:a,errors:n,touched:r,values:s,isValid:o,isSubmitting:l})=>{var c;return R(W,{className:Zo.form,children:[R("div",{className:Zo.logicSection,children:[p(di,{name:"email",value:null!=(c=s.email)?c:i.email,onChange:a,onBlur:t,label:e("email-label"),placeholder:e("email-placeholder"),errorMessage:n.email,error:!!n.email&&r.email,type:"email",className:Zo.formInput}),p(Ko,{name:"password",value:s.password,onChange:a,onBlur:t,label:e("password-label"),placeholder:e("password-placeholder"),errorMessage:n.password,error:!!n.password&&r.password,className:Zo.formInput})]}),p("div",{className:Zo.resetPassword,children:R(jt,{underline:"none",variant:"small",className:Zo.link,to:Tt.REQUEST_PASSWORD_RESET,children:[e("forgot-your-password-title"),"?"]})}),p(bi,{className:Zo.formButton,variant:"contained",color:"primary",loading:l,disabled:!o||!s.email||!s.password,type:"submit",children:e("login")})]})}})})};var el="LandingHero_container_1",tl="LandingHero_textWhite_8",al="LandingHero_button_11",nl="LandingHero_textGray_22",il="LandingHero_contentContainer_31",rl="LandingHero_textContainer_44",sl="LandingHero_formWrapper_55",ol="LandingHero_loginContainer_60",ll="LandingHero_formSection_66",cl="LandingHero_formText_73",dl="LandingHero_createAccount_76",ml="LandingHero_formButton_81";const pl=({isUserLoggedIn:e})=>{const t=Wt(),a=f();return p("div",{className:el,children:R("div",{className:il,children:[R("div",{className:rl,children:[p(Vt,{variant:"h1",className:tl,children:p(mn,{html:t("landing-hero-heading")})}),p($t,{variant:"big",className:nl,children:t("landing-hero-description")}),e&&p(P,{variant:"contained",className:al,onClick:()=>a(Tt.DASHBOARD),children:t("view-dashboards")})]}),!e&&R("div",{className:sl,children:[p("div",{className:I(ol,ll),children:p(Jo,{})}),p("div",{className:I(ol,ll),children:R("div",{className:dl,children:[R($t,{className:cl,children:[t("dont-have-an-account-yet"),"?"]}),p(P,{className:ml,variant:"contained",color:"secondary",onClick:()=>a(Tt.REGISTRATION),children:t("create-an-account")}
1)]})})]})]})})},ul=()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getPublicationCategories"],(()=>cn.getPublicationsCategories()),{keepPreviousData:!0,staleTime:6e5,cacheTime:6e5,onError:a=>{t.open(fa(a,e("get-publications-categories-error")),{severity:"error"})}})},hl=(e,t)=>{var a,n;return null!=(n=null==(a=null==t?void 0:t.find((t=>t.id===e)))?void 0:a.name)?n:""},vl=()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getAllPublications"],(()=>cn.getAllPublications()),{keepPreviousData:!0,staleTime:6e5,cacheTime:6e5,onError:a=>{t.open(fa(a,e("get-publications-error")),{severity:"error"})}})};var gl={container:"Publications_container_1",header:"Publications_header_14",textRed:"Publications_textRed_19",content:"Publications_content_31",card:"Publications_card_44",imageContainer:"Publications_imageContainer_65",image:"Publications_image_65",textContainer:"Publications_textContainer_86",textHeader:"Publications_textHeader_93",textGray:"Publications_textGray_93",text:"Publications_text_19",buttonContainer:"Publications_buttonContainer_101",cta:"Publications_cta_107",arrowRightIcon:"Publications_arrowRightIcon_113",cursorPointer:"Publications_cursorPointer_117",truncate:"Publications_truncate_120",cardContainer:"Publications_cardContainer_126",cardIcon:"Publications_cardIcon_132",button:"Publications_button_101",rightAlign:"Publications_rightAlign_227"};const yl=()=>{const e=Wt(),t=f(),{data:a,isLoading:n}=vl(),{data:i}=ul();return n?p(pn,{className:"spinnerCenter"}):R("div",{className:gl.container,children:[p("div",{children:p(Vt,{variant:"h4",children:p(mn,{html:e("landing-page-publications-heading")})})}),p("div",{className:gl.cardContainer,children:null==a?void 0:a.filter(((e,t)=>t<4)).map((({id:e,title:a,description:n,heroUrl:r,heroImageFileName:s,categoryId:o})=>R("div",{className:`${gl.card} related-card`,onClick:()=>t(Q(Tt.PUBLICATION,{id:e.toString()})),children:[R("div",{className:gl.imageContainer,children:[p("img",{src:r,alt:s,loading:"lazy"}),p("div",{className:gl.cardContainer,children:p("div",{className:gl.openClosedContainer,children:p($t,{variant:"small",children:hl(o,null!=i?i:[])})})})]}),p($t,{variant:"standardSemiBold",children:a}),p($t,{variant:"standard",className:gl.truncate,children:n})]},e)))}),p("div",{className:gl.rightAlign,children:p(P,{className:gl.cta,onClick:()=>t(Tt.PUBLICATIONS),size:"small",endIcon:p(Sn,{className:gl.arrowRightIcon,spriteUrl:nr}),children:e("view-all-publications")})})]})};var bl="RowComponent_bottomHeroContainer_1",_l="RowComponent_contentContainer_25",Nl="RowComponent_leftContainer_39",fl="RowComponent_rightContainer_50",Cl="RowComponent_grayBackground_63",Sl="RowComponent_whiteBackground_67",xl="RowComponent_orderFirst_71",Al="RowComponent_orderSecond_75";const Il=({leftRow:e,rightRow:t,whiteBackground:a,orderFirstLeftRow:n,orderFirstRightRow:i})=>{const r=h(),s=A(r.breakpoints.up("lg"));return p("div",{className:I(bl,a?Sl:Cl),children:R("div",{className:_l,children:[p("div",{className:I(Nl,!s&&n?xl:Al),children:e}),p("div",{className:I(fl,!s&&i?xl:Al),children:t})]})})};var wl="LandingPage_firstComponentLeftContainer_31",Tl="LandingPage_berriesCard_36",Rl="LandingPage_barleyCard_36",kl="LandingPage_grapeCard_36",El="LandingPage_cardImageContainer_62",Ml="LandingPage_description_85",Dl="LandingPage_firstComponentRightContainer_113",Pl="LandingPage_textRed_229",Ll="LandingPage_cta_237",Bl="LandingPage_arrowRightIcon_246";const Ol=()=>{const e=f(),{authenticatedUser:t}=m.exports.useContext(_a),{data:a,isLoading:n}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getPeople"],(()=>cn.getPeople()),{keepPreviousData:!0,cacheTime:6e5,staleTime:6e5,onSuccess:e=>{console.log("get people",e)},onError:a=>{console.log("get people error",a),t.open(fa(a,e("get-people-error")),{severity:"error"})}})})();null==a||a.filter(((e,t)=>t<3)).map((({imageUrl:e})=>e));const{ref:i,inView:r,entry:s}=re({triggerOnce:!0,threshold:1});return R("div",{children:[p(pl,{isUserLoggedIn:t.isLoggedIn}),p(Mo,{isUserLoggedIn:t.isLoggedIn}),p(Lo,{}),p(To,{}),p(Il,{orderFirstRightRow:!0,rightRow:R("div",{ref:i,className:`${wl}`,children:[R("div",{className:`${kl} related-card-x`,children:[p("div",{className:El,children:p("img",{src:"/assets/courier_holding_samples.27d47a2e.webp"})}),R("div",{className:Ml,children:[p($t,{variant:"bigSemiBold",className:Pl,children:G("on-demand-courier-service-title")}),p($t,{variant:"standard",children:G("on-demand-courier-service-description")})]})]}),R("div",{className:`${Rl} related-card-x}`,children:[p("div",{className:El,children:p("img",{src:"/assets/speed_and_service.946a339d.webp"})}),R("div",{className:Ml,children:[p($t,{variant:"bigSemiBold",className:Pl,children:G("speed-and-service-title")}),p($t,{variant:"standard",children:G("speed-and-service-description")})]})]}),R("div",{className:`${Tl} related-card-x`,children:[p("div",{className:El,children:p("img",{src:"/assets/on_your_doorstep.a83131c3.webp"})}),R("div",{className:Ml,children:[p($t,{variant:"bigSemiBold",className:Pl,children:G("on-your-doorstep-worldwide-title")}),p($t,{variant:"standard",children:G("on-your-doorstep-worldwide-description")})]})]})]}),leftRow:R("div",{className:Dl,children:[p(Vt,{variant:"h2",children:G("beyond-lab-heading")}),p($t,{variant:"big",children:G("beyond-lab-description")}),p(P,{className:Ll,onClick:()=>e(Tt.DASHBOARD),size:"small",endIcon:p(Sn,{className:Bl,spriteUrl:nr}),children:G("beyond-lab-cta-text")})]})}),p(Uo,{}),p(yl,{}),p(ko,{}),p(ur,{})]})};var Fl,Hl,Ul="/assets/lockIcon.ec86222a.svg",zl="/assets/mapPin.b983f4f2.svg";(Hl=Fl||(Fl={})).CA="CA",Hl.OR="OR",Hl.WA="WA";var Gl=Fl;const ql={[Gl.CA]:"California",[Gl.OR]:"Oregon",[Gl.WA]:"Washington"};const Wl=e=>
1{const t=(new Date).toLocaleString("en-US",{timeZone:"America/Los_Angeles"}),a=ia(t,"HH:mm"),n=((e=new Date,t="en-US")=>e.toLocaleDateString(t,{weekday:"long"}))(),i=e.find((e=>e.dayName===n)),r=null==i?void 0:i.openTime.split(/T/)[1].split(/:00.000Z/)[0],s=null==i?void 0:i.closeTime.split(/T/)[1].split(/:00.000Z/)[0],o=Number(null==r?void 0:r.replace(/\b0+/g,"").split(":")[0]),l=Number(null==s?void 0:s.replace(/\b0+/g,"").split(":")[0]),c=Number(a.replace(/\b0+/g,"").split(":")[0]);return{openTimeOnlyHours:o,closeTimeOnlyHours:l,myTimeInPstOnlyHours:c,isLaboratoryOpen:c>=o&&c<l,isLaboratoryClosingSoon:c>o&&l-c==1,formattedOpenTime:i?ia(null==i?void 0:i.openTime.replace(/Z/,"")):"",formattedCloseTime:i?ia(null==i?void 0:i.closeTime.replace(/Z/,"")):"",reOpensAt:(()=>{const t=((e,t)=>{let a=e%t.length;for(let n=0;n<t.length;n++){if(t[a].openOnDay)return t[a];a=(a+1)%t.length}return{}})((null==i?void 0:i.openOnDay)&&function(e){const t=new Date,a=new Date(e);a.setFullYear(t.getFullYear()),a.setMonth(t.getMonth()),a.setDate(t.getDate());const n=a.getTime();return Date.now()>n}(null==i?void 0:i.closeTime)?(null==i?void 0:i.day)+1||0:(null==i?void 0:i.day)||0,e);return(null==t?void 0:t.openTime)?`${t.dayName}, ${ia(null==t?void 0:t.openTime.replace(/Z/,""))}`:"TBD"})()}},Vl=(e,t)=>{const a=document.createElement("a");a.target="_blank",a.rel="noopener noreferrer",a.href=`https://maps.google.com/?saddr=Current+Location&daddr=${e},${t}`,a.click(),a.remove()};var Yl={container:"DropboxesGroupedByState_container_1",dropboxesContainer:"DropboxesGroupedByState_dropboxesContainer_7",dropbox:"DropboxesGroupedByState_dropbox_7",headerContainer:"DropboxesGroupedByState_headerContainer_29",icon:"DropboxesGroupedByState_icon_34",headerRed:"DropboxesGroupedByState_headerRed_42",contentContainer:"DropboxesGroupedByState_contentContainer_46",buttonContainer:"DropboxesGroupedByState_buttonContainer_54",cta:"DropboxesGroupedByState_cta_66",arrowRightIcon:"DropboxesGroupedByState_arrowRightIcon_74"};const jl=({state:e,dropboxes:t,setDropboxForModalAndOpenModal:a})=>{const n=Wt();return R("div",{className:Yl.container,children:[p("div",{className:Yl.titleContainer,children:p(Vt,{variant:"h5",children:ql[e]})}),p("div",{className:Yl.dropboxesContainer,children:t.map((e=>R("div",{className:Yl.dropbox,children:[R("div",{className:Yl.headerContainer,children:[p(Sn,{spriteUrl:zl,className:Yl.icon,onClick:()=>Vl(e.jsonGeocodeAddress[0],e.jsonGeocodeAddress[1])}),p($t,{variant:"bigSemiBold",className:Yl.headerRed,onClick:()=>Vl(e.jsonGeocodeAddress[0],e.jsonGeocodeAddress[1]),children:`${e.city}, ${e.state}`})]}),p("div",{className:Yl.contentContainer,children:R($t,{variant:"standard",children:[`${e.street_1}`,p("br",{}),`${e.city}, ${e.state}, ${e.postalCode}`]})}),R("div",{className:Yl.buttonContainer,children:[p(Sn,{spriteUrl:Ul,className:Yl.icon}),p(P,{className:Yl.cta,onClick:()=>a(e),size:"small",endIcon:p(Sn,{className:Yl.arrowRightIcon,spriteUrl:nr}
1),children:n("view-access-details")})]})]},e.id)))})]})};var $l={container:"Dropboxes_container_1",infoBar:"Dropboxes_infoBar_7",headerWithIcon:"Dropboxes_headerWithIcon_26",icon:"Dropboxes_icon_32",textRed:"Dropboxes_textRed_37",dropboxesContainer:"Dropboxes_dropboxesContainer_40",modalContainer:"Dropboxes_modalContainer_47",closeIconContainer:"Dropboxes_closeIconContainer_65",closeIcon:"Dropboxes_closeIcon_65",contentContainer:"Dropboxes_contentContainer_79",imageContainer:"Dropboxes_imageContainer_97",dropboxInfoContainer:"Dropboxes_dropboxInfoContainer_138",dropboxInfo:"Dropboxes_dropboxInfo_138",headerContainer:"Dropboxes_headerContainer_155",headerRed:"Dropboxes_headerRed_170",securityCodeContainer:"Dropboxes_securityCodeContainer_174",buttonContainer:"Dropboxes_buttonContainer_184",cta:"Dropboxes_cta_196",arrowRightIcon:"Dropboxes_arrowRightIcon_204",descriptionContainer:"Dropboxes_descriptionContainer_208"};const Ql=({dropboxes:e})=>{const t=Wt(),a=f(),{authenticatedUser:{isLoggedIn:n}}=m.exports.useContext(_a),[i,r]=m.exports.useState(!1),[s,o]=m.exports.useState({}),l=e.reduce(((e,t)=>(e[t.state]=e[t.state]||[],e[t.state].push(t),e)),[]),c=Object.values(l),d=e=>{o(e),r(!0)};return R("div",{className:$l.container,id:"sample-dropboxes",children:[p(Vt,{variant:"h4",children:t("dropboxes")}),!n&&R("div",{className:$l.infoBar,children:[R("div",{className:$l.headerWithIcon,children:[p(Sn,{spriteUrl:Ul,className:$l.icon}),p($t,{variant:"standardSemiBold",children:t("dropbox-access-is-private")})]}),p("div",{className:$l.textContainer,children:p($t,{variant:"standard",children:t("please-login-to-enable-dropbox-access-information")})}),p("div",{className:$l.textContainer,children:p($t,{variant:"standard",className:$l.textRed,onClick:()=>a(Tt.LOGIN),children:t("login")})})]}),p("div",{className:$l.dropboxesContainer,children:c.map(((e,t)=>p(jl,{state:e[0].state,dropboxes:e,setDropboxForModalAndOpenModal:d},t)))}),p(wi,{open:i,setModal:()=>r(!1),fullScreen:!0,children:R("div",{className:$l.modalContainer,children:[p("div",{className:$l.closeIconContainer,children:p(Sn,{className:$l.closeIcon,spriteUrl:jr,onClick:()=>r(!1)})}),p("div",{className:$l.contentContainer,style:{background:`url(https://webapi.etslabs.com/images/locations/dropboxes/${null==s?void 0:s.imageName})`,backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"center 25%"},children:R("div",{className:$l.dropboxInfoContainer,children:[p($t,{variant:"standard",style:{letterSpacing:"0.12em"},children:"NEAREST DROPBOX"}),p(Vt,{variant:"h2",children:null==s?void 0:s.name}),R("div",{className:$l.dropboxInfo,children:[R("div",{className:$l.headerContainer,children:[p(Sn,{spriteUrl:zl,className:$l.icon,onClick:()=>Vl(s.jsonGeocodeAddress[0],s.jsonGeocodeAddress[1])}),p($t,{variant:"bigSemiBold",className:$l.headerRed,onClick:()=>Vl(s.jsonGeocodeAddress[0],s.jsonGeocodeAddress[1]),children:`${s.city}, ${s.state}`})]}),p("div",{className:$l.dropboxAddress,children:R($t,{variant:"standard",children:[s.street_1,",",p("br",{})," ",s.city,","," ",s.state,", ",s.postalCode]})}),R("div",n?{className:$l.securityCodeContainer,children:[p(Sn,{spriteUrl:Ul,className:$l.icon}),R($t,{variant:"standard",children:[t("secure-pin"),s.securityCode]})]}:{className:$l.buttonContainer,children:[p(Sn,{spriteUrl:Ul,className:$l.icon}),p(P,{className:$l.cta,onClick:()=>a(Tt.LOGIN),size:"small",endIcon:p(Sn,{className:$l.arrowRightIcon,spriteUrl:nr}
1),children:t("view-access-details")})]})]}),R("div",{className:$l.descriptionContainer,children:[n&&p($t,{variant:"standard",children:s.description}),p($t,{variant:"standard"})]})]})})]})})]})};var Kl={modalContainer:"DropboxModal_modalContainer_5",closeIconContainer:"DropboxModal_closeIconContainer_23",closeIcon:"DropboxModal_closeIcon_23",imageContainer:"DropboxModal_imageContainer_37",dropboxContainer:"DropboxModal_dropboxContainer_55",pinContainer:"DropboxModal_pinContainer_60",icon:"DropboxModal_icon_66",headerRed:"DropboxModal_headerRed_74",dropboxAddress:"DropboxModal_dropboxAddress_78",buttonContainer:"DropboxModal_buttonContainer_81",cta:"DropboxModal_cta_93",arrowRightIcon:"DropboxModal_arrowRightIcon_101"};const Xl=({dropbox:e})=>{const t=Wt(),a=f(),{authenticatedUser:{isLoggedIn:n}}=m.exports.useContext(_a),{setSelectedDropboxId:i}=m.exports.useContext(eo);return R("div",{className:Kl.modalContainer,children:[p("div",{className:Kl.closeIconContainer,children:p(Sn,{className:Kl.closeIcon,spriteUrl:jr,onClick:()=>i("")})}),(null==e?void 0:e.imageName)?p("div",{className:Kl.imageContainer,children:p("img",{className:Kl.image,src:`https://webapi.etslabs.com/images/locations/dropboxes/${null==e?void 0:e.imageName.replace(/location-/,"")}`,alt:e.description})}):"",R("div",{className:Kl.dropboxContainer,children:[R("div",{className:Kl.pinContainer,children:[p(Sn,{spriteUrl:zl,className:Kl.icon,onClick:()=>Vl(e.jsonGeocodeAddress[0],e.jsonGeocodeAddress[1])}),p($t,{variant:"bigSemiBold",className:Kl.headerRed,onClick:()=>Vl(e.jsonGeocodeAddress[0],e.jsonGeocodeAddress[1]),children:`${e.city}, ${e.state}`})]}),p("div",{className:Kl.dropboxAddress,children:R($t,{variant:"standard",children:[e.street_1,", ",e.city,", ",e.state,", ",e.postalCode]})}),p("div",{className:Kl.buttonContainer,children:n?p($t,{variant:"standard",children:e.description}):R(k,{children:[p(Sn,{spriteUrl:Ul,className:Kl.icon}),p(P,{className:Kl.cta,onClick:()=>a(Tt.LOGIN),size:"small",endIcon:p(Sn,{className:Kl.arrowRightIcon,spriteUrl:nr}
1),children:t("view-access-details")})]})})]}),p("div",{className:Kl.additionalInfoContainer,children:p($t,{variant:"standard",children:t("samples-left-overnight-will-be-processed")})})]})},Zl=[{elementType:"geometry",stylers:[{color:"#F5F5F5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#F5F5F5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#BDBDBD"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#EEEEEE"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#E5E5E5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9E9E9E"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#FFFFFF"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#DADADA"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9E9E9E"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#E5E5E5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#EEEEEE"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#C9C9C9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9E9E9E"}]}];var Jl="DropboxesMap_container_1",ec="DropboxesMap_sideWindow_6";const tc=({dropboxes:e})=>{const{selectedDropboxId:t,setSelectedDropboxId:a}=m.exports.useContext(eo),n=e.find((({id:e})=>e.toString()===t)),[i,r]=m.exports.useState({lat:e[0].jsonGeocodeAddress[0],lng:e[0].jsonGeocodeAddress[1]});return p("div",{className:Jl,children:p(ie,{apiKey:"AIzaSyBNQZqLnEF0smmyYzrEqAEDYK493BXyi5o",children:R(ao,{center:i,zoom:5,styles:Zl,style:{height:"100%",width:"100%",position:"relative"},children:[e.map((({jsonGeocodeAddress:e,id:t})=>p(to,{position:{lat:e[0],lng:e[1]},title:t.toString()},t))),n&&p("div",{className:ec,children:p(Xl,{dropbox:n})})]})})})};var ac="/assets/statusDot.e984813d.svg";var nc="OperatingHoursCollapse_locationCollapse_1",ic="OperatingHoursCollapse_collapseHeader_1",rc="OperatingHoursCollapse_icon_8",sc="OperatingHoursCollapse_operatingHoursList_12",oc="OperatingHoursCollapse_operatingHoursListItem_17";const lc=({operatingHours:e})=>{const[t,a]=m.exports.useState(!1);return R("div",{className:nc,children:[R("div",{className:ic,children:[p($t,{variant:"bigSemiBold",children:G("hours")}),p(F,{onClick:()=>a(!t),size:"small",children:p(Sn,{className:rc,spriteUrl:t?Yi:Vi})})]}),p(j,{in:t,timeout:"auto",children:p("div",{className:sc,children:e.map((({day:e,dayName:t,openTime:a,closeTime:n,openOnDay:i})=>R("div",{className:oc,children:[p($t,{className:"standard",children:t}),i?R($t,{className:"standard",children:[ia(a.replace(/Z/,""))," -"," ",ia(n.replace(/Z/,""))]}):p($t,{className:"standard",children:G("closed")})]},e)))})})]})};var cc="LaboratoryLocations_container_1",dc="LaboratoryLocations_locationsContainer_6",mc="LaboratoryLocations_location_6",pc="LaboratoryLocations_locationContent_30",uc="LaboratoryLocations_imageContainer_36",hc="LaboratoryLocations_cardContainer_52",vc="LaboratoryLocations_openClosedContainer_68",gc="LaboratoryLocations_textGray_73",yc="LaboratoryLocations_icon_76",bc="LaboratoryLocations_iconClosed_76",_c="LaboratoryLocations_iconClosingSoon_76",Nc="LaboratoryLocations_iconOpen_76",fc="LaboratoryLocations_textContainer_89",Cc="LaboratoryLocations_locationHeader_94",Sc="LaboratoryLocations_textRed_100",xc="LaboratoryLocations_locationAddress_112",Ac="LaboratoryLocations_locationContact_120";const Ic=({locations:e})=>{const t=Wt();return R("div",{className:cc,children:[p(Vt,{variant:"h4",children:t("laboratory-locations")}),p("div",{className:dc,children:e.map((({id:e,description:a,city:n,state:i,street_1:r,postalCode:s,phoneNumber:o,operatingHours:l,imageName:c,jsonGeocodeAddress:d})=>{const{closeTimeOnlyHours:m,openTimeOnlyHours:u,isLaboratoryOpen:h,isLaboratoryClosingSoon:v,formattedOpenTime:g,formattedCloseTime:y,reOpensAt:b}=Wl(null!=l?l:[]);return R("div",{className:mc,children:[R("div",{className:pc,children:[R("div",{className:uc,children:[p("img",{src:`https://webapi.etslabs.com/images/locations/${c}`,alt:a}),R("div",{className:hc,children:[R("div",{className:vc,children:[p($t,{variant:"small",children:t(v?"closing-soon":h?"open-now":"closed")}
1),p($t,{variant:"extraSmall",className:gc,children:v?t("closes-in-one-hour",{time:y}):h?t("open-until-time",{time:y}):t("reopens-at-time",{time:b})})]}),p(Sn,{spriteUrl:ac,className:I(yc,v?_c:h?Nc:bc)})]})]}),R("div",{className:fc,children:[R("div",{className:Cc,children:[p(Sn,{spriteUrl:zl,className:yc,onClick:()=>Vl(d[0],d[1])}),R($t,{variant:"bigSemiBold",className:Sc,onClick:()=>Vl(d[0],d[1]),children:[n,", ",i]})]}),p("div",{className:xc,children:R($t,{variant:"standard",children:[r,",",p("br",{}),n,",",i,", ",s]})}),R("div",{className:Ac,children:[p($t,{variant:"standard",className:Sc,children:"[email protected]"}),p($t,{variant:"standard",className:Sc,children:o})]})]})]}),p(lc,{operatingHours:l})]},e)}))})]})};var wc,Tc;(Tc=wc||(wc={})).LOCATION="location",Tc.DROPBOX="dropbox";var Rc=wc;const kc=(e,t=!0)=>{const a=Wt(),n=m.exports.useContext(Na);return L(["getLocations"],(()=>cn.getLocationsOrDropBoxes(l(o({},e),{type:Rc.LOCATION}))),{enabled:t,keepPreviousData:!0,staleTime:6e5,cacheTime:18e4,onSuccess:e=>{console.log("Get cms locations",e)},onError:e=>{console.error("Get cms locations error",e),n.open(fa(e,a("get-cms-locations-error")),{severity:"error"})}})},Ec=({children:e})=>{const[t,a]=m.exports.useState("");return p(eo.Provider,{value:{selectedDropboxId:t,setSelectedDropboxId:a},children:e})};var Mc={container:"Locations_container_1",additionalInfo:"Locations_additionalInfo_12",infoBar:"Locations_infoBar_18",headerWithIcon:"Locations_headerWithIcon_34",icon:"Locations_icon_40",pointer:"Locations_pointer_47",textRed:"Locations_textRed_47",contentContainer:"Locations_contentContainer_53"};const Dc=()=>{const e=Wt(),t=f(),{data:a}=kc(),{data:n}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getDropboxes"],(()=>cn.getLocationsOrDropBoxes(l(o({},e),{type:Rc.DROPBOX}))),{keepPreviousData:!0,staleTime:6e5,cacheTime:6e5,onSuccess:e=>{console.log("Get cms dropboxes",e)},onError:e=>{console.error("Get cms dropboxes error",e),a.open(fa(e,t("get-cms-dropboxes-error")),{severity:"error"})}})})();return S(),Aa(),R(k,{children:[p(on,{title:"ets-is-here-to-help-short",subtitle:"locaations-lab-and-sample-dropbox",textAlignment:"left",sideLayout:Ba.SMALL,withWhiteText:!0,display:!0,ctaButton:p("div",{className:Mc.ctaHeroButton,children:p(P,{variant:"contained",className:Mc.button,onClick:()=>t(Tt.CONTACT),children:e("contact-us")})})}),p("div",{className:Mc.container,children:R("div",{className:Mc.contentContainer,children:[a&&p(Ic,{locations:a}),n&&p(Ql,{dropboxes:n})]})}),p(Ec,{children:p("div",{style:{width:"100%"},children:n&&p(tc,{dropboxes:n})})}),p(Js,{}),p(Ln,{sideLayout:Ba.BIG,heading:"have-question-for-the-team",ctaText:"send-message",contactRoute:Tt.CONTACT,phoneNumber:"urgent-sample-number",faqCtaText:"faq-for-popular-common-questions",faqRoute:Tt.CONTACT})]})};var Pc="NewCustomer_ctaHeroButton_1",Lc="NewCustomer_cardContainer_6",Bc="NewCustomer_headerContainer_18",Oc="NewCustomer_cardIcon_38",Fc="NewCustomer_card_6",Hc="NewCustomer_button_91",Uc="NewCustomer_nextStepContainer_98",zc="NewCustomer_leftSideColumn_114",Gc="NewCustomer_rightSideColumn_129",qc="NewCustomer_bottomContainer_144",Wc="NewCustomer_buttonContainer_152";const Vc=()=>{const e=Wt(),t=f(),a=[{id:1,icon:Oo,title:e("complete-toolkit-title"),description:e("complete-toolkit-description")},{id:2,icon:Fo,title:e("continuous-quality-title"),description:e("continuous-quality-description")},{id:3,icon:Bo,title:e("committed-to-craft-title"),description:e("committed-to-craft-description")}],{trackEvent:n}=S();return n("new-customer-page-viewed"),R(k,{children:[p(on,{title:"new-customer-heading-hero",subtitle:"new-customer-subtitle-hero",description:"new-customer-description-hero",textAlignment:"left",sideLayout:Ba.SMALL,withWhiteText:!0,ctaButton:p("div",{className:Pc,children:p(P,{variant:"contained",className:Hc,onClick:()=>t(Tt.REGISTRATION),children:e("create-account")})})}),p(za,{sideLayout:Ba.SMALL,children:R("div",{className:Lc,children:[p("div",{className:Bc,children:p(Vt,{variant:"h2",children:e("new-customer-cards-heading-text")})}),p("div",{className:Lc,children:a.map((({id:e,icon:t,title:a,description:n})=>R("div",{className:Fc,children:[p("img",{src:t,className:Oc}),p($t,{variant:"bigSemiBold",children:a}),p($t,{variant:"standard",children:n})]},e)))})]})}),R("div",{className:Uc,children:[R("div",{className:zc,children:[p($t,{children:e("become-ets-client")}
1),p(Vt,{variant:"h2",children:e("what-is-next")}),p($t,{variant:"big",children:e("what-is-next-description")}),p(P,{variant:"contained",className:Hc,onClick:()=>t(Tt.REGISTRATION),children:e("create-account")})]}),R("div",{className:Gc,children:[R("div",{className:Fc,children:[p($t,{variant:"bigSemiBold",children:e("setup-personal-login-heading")}),p($t,{variant:"standard",children:e("setup-personal-login-description")})]}),R("div",{className:Fc,children:[p($t,{variant:"bigSemiBold",children:e("your-business-heading")}),p($t,{variant:"standard",children:e("your-business-description")})]})]})]}),p(za,{sideLayout:Ba.SMALL,children:R("div",{className:qc,children:[p(Vt,{variant:"h2",children:e("already-an-ets-client")}),R("div",{className:Wc,children:[p(P,{variant:"outlined",className:Hc,onClick:()=>t(Tt.CONTACT),children:e("send-message")}),p(P,{variant:"contained",className:Hc,onClick:()=>t(Tt.DASHBOARD),children:e("view-dashboards")})]})]})})]})},Yc=[{routesToMatch:[Tt.SERVICES,Tt.VINTAGE_PORTALCMS,Tt.VINTAGE_REPORTS,Tt.EXPERTISE_ON_CALL],links:[{labelKey:"nav-services",pathname:Tt.SERVICES},{labelKey:"nav-vintage-portal",pathname:Tt.VINTAGE_PORTALCMS},{labelKey:"nav-vintage-reports",pathname:Tt.VINTAGE_REPORTS},{labelKey:"nav-expertise-on-call",pathname:Tt.EXPERTISE_ON_CALL}],isBeta:[!1,!1,!1,!1]}],jc=()=>(Aa(),R(k,{children:[p(wa,{menuItems:Yc,isTextOnlyPageLayout:!1}),p(E,{})]})),$c=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.EXPERTISE_ON_CALL)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"expertise-on-call-title",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})},Qc=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.OUR_SERVICES)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"our-services-title",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})},Kc=()=>{var e;const{data:t,isLoading:a}=dn(),n=null==t?void 0:t.find((e=>e.title===La.VINTAGE_PORTALCMS)),i=un(null!=(e=null==n?void 0:n.content)?e:"");return R(k,{children:[p(on,{title:"vintage-portal-title",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:a?p(pn,{className:"spinnerCenter"}):p(mn,{html:i})})]})};var Xc="PublicationCard_container_1",Zc="PublicationCard_publicationContainer_7",Jc="PublicationCard_imageContainer_21",ed="PublicationCard_image_21",td="PublicationCard_contentContainer_43",ad="PublicationCard_textContainer_50",nd="PublicationCard_textGray_60",id="PublicationCard_textDescription_63",rd="PublicationCard_textTitle_70",sd="PublicationCard_buttonContainer_73",od="PublicationCard_button_73",ld="PublicationCard_arrowRightIcon_87";const cd=({publications:e})=>{const t=Wt(),a=f();return p("div",{className:Xc,children:e.map((({id:e,title:n,description:i,heroUrl:r,heroImageFileName:s,categoryName:o,versionNumber:l,reviewedAt:c},d)=>R("div",{className:Zc,onClick:()=>a(Q(Tt.PUBLICATION,{id:e.toString()})),children:[p("div",{className:Jc,children:p("img",{src:r,className:ed,alt:s})}),R("div",{className:td,children:[R("div",{className:ad,children:[p($t,{className:nd,children:o}),p($t,{variant:"bigSemiBold",className:rd,children:p(mn,{html:n})}),p($t,{className:id,children:p(mn,{html:i})})]}),R("div",{className:sd,children:[p($t,{variant:"p",children:R("b",{children:[null!=c?c:"",l?` Version: ${l}`:""]})}),p(P,{className:od,onClick:()=>a(Q(Tt.PUBLICATION,{id:e.toString()})),size:"small",endIcon:p(Sn,{className:ld,spriteUrl:nr}),children:t("read-more")})]})]})]},d)))})};var dd="PublicationsCategories_collapseContainer_1",md="PublicationsCategories_collapseButton_8",pd="PublicationsCategories_icon_14",ud="PublicationsCategories_iconUp_19",hd="PublicationsCategories_textRed_23",vd="PublicationsCategories_categoryText_28",gd="PublicationsCategories_categoriesHeader_45";const yd=({publicationsCategories:e,categoryId:t,setCategoryId:a})=>{const n=h(),i=A(n.breakpoints.up("lg")),[r,s]=m.exports.useState(!1),o=p(k,{children:null==e?void 0:e.map((({name:e,id:n},i)=>p($t,{id:null==n?void 0:n.toString(),variant:"standard",className:I(vd,t===(null==n?void 0:n.toString())?hd:""),onClick:e=>a(e.currentTarget.id),children:e},i)))}),l=R(k,{children:[R("div",{className:md,children:[p($t,{variant:"standard",className:gd,onClick:()=>a(""),children:G("all-categories")}),p(Sn,{onClick:()=>s(!r),spriteUrl:Vi,className:I(pd,r?ud:"")})]}),p(j,{className:dd,in:r,timeout:"auto",unmountOnExit:!0,children:null==e?void 0:e.map((({name:e,id:n})=>p($t,{id:null==n?void 0:n.toString(),variant:"standard",className:I(vd,t===n.toString()?hd:""),onClick:e=>a(e.currentTarget.id),children:e},n)))})]});return i?o:l};var bd,_d;(_d=bd||(bd={})).NEWEST="newest",_d.OLDEST="oldest",_d.ALPHABETICAL="alphabetical";var Nd=bd;var fd="Publications_browseArchiveContainer_1",Cd="Publications_browseArchive_1",Sd="Publications_contentContainer_26",xd="Publications_categoriesContainer_38",Ad="Publications_search_53",Id="Publications_inputAdornment_58",wd="Publications_searchIcon_61",Td="Publications_inputField_68",Rd="Publications_formControlRoot_102",kd="Publications_categories_38",Ed="Publications_publications_110",Md="Publications_filterContainer_116",Dd="Publications_selectContainer_126",Pd="Publications_sortBy_132",Ld="Publications_cardContainer_137",Bd="Publications_card_137",Od="Publications_button_181",Fd="Publications_categoriesHeader_188";const Hd=()=>{var e,t,a;const n=f(),i=h(),r=A(i.breakpoints.up("lg")),[s,o]=se(),{authenticatedUser:l}=m.exports.useContext(_a),{data:c,isLoading:d,isSuccess:u}=vl(),{data:v,isLoading:g}=ul(),y=null!=(e=s.get("searchTerm"))?e:"",b=null!=(t=s.get("categoryId"))?t:"",[_,N]=m.exports.useState(y),[C,S]=m.exports.useState(Nd.NEWEST),[x,w]=m.exports.useState(b);m.exports.useEffect((()=>{const e=new URLSearchParams;_&&e.set("searchTerm",_),x&&e.set("categoryId",x),o(e,{replace:!0})}),[x,_,o]);const T=m.exports.useMemo((()=>{var e;return null!=(e=null==c?void 0:c.filter((({description:e,title:t,categoryName:a})=>e.toLowerCase().includes(_.toLowerCase())||t.toLowerCase().includes(_.toLowerCase())||a&&_.toLowerCase().split(" ").every((e=>a.toLowerCase().includes(e))))).sort(((e,t)=>{const a=new Date(e.createdAt).getTime(),n=new Date(t.createdAt).getTime();return C===Nd.NEWEST?n-a:C===Nd.OLDEST?a-n:e.title.localeCompare(t.title)})).filter((e=>""===x?e:e.categoryId===Number(x))))?e:[]}),[c,_,C,x]),k=`${""===x?G("all-categories"):null==(a=null==v?void 0:v.find((e=>e.id.toString()===x)))?void 0:a.name} (${null==T?void 0:T.length})`,E=[{id:1,title:G("need-sample-tubes-title"),description:G("need-sample-tubes-description"),route:Tt.ORDER_SUPPLIES,buttonText:G("need-sample-tubes-button-text"),disabled:!1}
1,{id:2,title:G("submit-sample-title"),description:G("submit-sample-description"),route:Tt.LOCATIONS,buttonText:G("submit-sample-button-text"),disabled:!1},{id:3,title:G("courier-pickup-title"),description:G("courier-pickup-description"),route:Tt.REQUEST_COURIER,buttonText:G("courier-pickup-button-text"),disabled:!1},{id:4,title:G("become-new-client-title"),description:G("become-new-client-description"),route:Tt.REGISTRATION,buttonText:G("become-new-client-button-text"),disabled:l.isLoggedIn}];return R("div",{children:[p(on,{title:"publications-title",description:"publications-description",textAlignment:"left",sideLayout:Ba.MEDIUM}),R("div",{className:fd,children:[p($t,{variant:"bigSemiBold",children:G("browse-the-archive-text")}),p("a",{href:"https://issuu.com/etslabs",target:"_blank",children:p($t,{className:Cd,variant:"bigSemiBold",children:G("browse-the-archive-cta")})})]}),R(za,{sideLayout:Ba.MEDIUM,children:[d?p(pn,{className:"spinnerCenter"}):R("div",{className:Sd,children:[R("div",{className:xd,children:[p("div",{className:Ad,children:p(H,{className:I(Td,Rd),InputProps:{startAdornment:p(J,{position:"start",className:Id,children:p(Sn,{spriteUrl:gr,className:wd})})},name:"search",value:_,onChange:e=>N(null==e?void 0:e.target.value),placeholder:G("search-articles")})}),R("div",{className:kd,children:[r&&p($t,{variant:"standard",className:Fd,onClick:()=>w(""),children:G("all-categories")}),v&&p(yd,{publicationsCategories:v,categoryId:x,setCategoryId:w})]})]}),R("div",{className:Ed,children:[R("div",{className:Md,children:[r&&p($t,{variant:"standard",children:k}),R("div",{className:Dd,children:[p($t,{variant:"standard",className:Pd,children:G("sort-by")}),R(xr,{label:"select-address",name:"address",disabled:0===(null==c?void 0:c.length),defaultValue:C,value:C,onChange:e=>S(e.target.value),children:[p(Z,{value:Nd.NEWEST,children:p($t,{variant:"standard",children:G("newest")})}),p(Z,{value:Nd.OLDEST,children:p($t,{variant:"standard",children:G("oldest")})}),p(Z,{value:Nd.ALPHABETICAL,children:p($t,{variant:"standard",children:G("alphabetical")})})]})]})]}),p(cd,{publications:T})]})]}),p("div",{className:Ld,children:E.map((({id:e,title:t,description:a,route:i,disabled:r,buttonText:s})=>R("div",{className:Bd,children:[p($t,{variant:"bigSemiBold",children:t}),p($t,{variant:"standard",children:a}),p(P,{variant:"contained",className:Od,disabled:r,onClick:()=>n(i),children:s})]},e)))})]})]})};var Ud="FurtherReading_container_1",zd="FurtherReading_header_12",Gd="FurtherReading_textRed_17",qd="FurtherReading_content_29",Wd="FurtherReading_card_41",Vd="FurtherReading_imageContainer_61",Yd="FurtherReading_image_61",jd="FurtherReading_textContainer_82",$d="FurtherReading_textHeader_88",Qd="FurtherReading_textGray_88",Kd="FurtherReading_text_17",Xd="FurtherReading_buttonContainer_96",Zd="FurtherReading_cta_102",Jd="FurtherReading_arrowRightIcon_108",em="FurtherReading_cursorPointer_112",tm="FurtherReading_truncate_115";const am=({relatedPublications:e})=>{const t=Wt(),a=f(),{data:n}=ul();return R("div",{className:Ud,children:[R("div",{className:zd,children:[p($t,{variant:"bigSemiBold",children:t("further-reading")}),p($t,{className:I(Gd,em),onClick:()=>a(Tt.PUBLICATIONS),children:t("see-all-articles")})]}),p("div",{className:qd,children:null==e?void 0:e.filter(((e,t)=>t<2)).map((({id:e,title:i,description:r,heroUrl:s,heroImageFileName:o,categoryId:l})=>R("div",{className:Wd,children:[p("div",{className:Vd,children:p("img",{className:Yd,src:s,alt:o})}),R("div",{className:jd,children:[p("div",{className:$d,children:p($t,{variant:"standard",className:Qd,children:hl(l,null!=n?n:[])})}),R("div",{className:Kd,children:[p($t,{variant:"standardSemiBold",children:i}),p($t,{variant:"standard",className:tm,children:r})]}),p("div",{className:Xd,children:p(P,{className:Zd,onClick:()=>a(Q(Tt.PUBLICATION,{id:e.toString()})),size:"small",endIcon:p(Sn,{className:Jd,spriteUrl:nr}),children:t("read-more")})})]})]},e)))})]})};var nm="PublicationHero_container_1",im="PublicationHero_textContainer_18",rm="PublicationHero_categoryAndVersion_34",sm="PublicationHero_categoryContainer_39";const om=({publication:e})=>{var t,a;Wt();const n=C().getQueryData("getPublicationCategories");return null==n||n.find((t=>t.id===e.categoryId)),p("div",{style:{background:`linear-gradient(180deg, rgba(100, 100, 100, 0.5) 0%, rgba(0, 0, 0, 0.29) 100%), url(${e.heroUrl})`},className:nm,children:R("div",{className:im,children:[R("div",{className:rm,children:[p("div",{className:sm,children:p($t,{variant:"standard",children:null!=(t=null==e?void 0:e.categoryName)?t:""})}),p($t,{variant:"standard",children:R("b",{children:[null!=(a=null==e?void 0:e.reviewedAt)?a:"",(null==e?void 0:e.versionNumber)?` Version: ${null==e?void 0:e.versionNumber}`:""]})})]}),p("div",{children:p(Vt,{variant:"h2",children:p(mn,{html:e.title})})})]})})},lm=(e,t="")=>{const a=e.split("/").map((e=>e.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,(e=>e.toUpperCase())))),n=a[a.length-1],i=a[a.length-2];""===t&&""===n?document.title="ETS Labs":""!==t?document.title=`ETS Labs - ${t}`:/\d/.test(n)&&""===t?document.title=`ETS Labs - ${i} ${n}`:document.title=`ETS Labs - ${n}`};
1var cm={container:"RelatedAnalyses_container_1",content:"RelatedAnalyses_content_23",contentHeader:"RelatedAnalyses_contentHeader_30",contentHeaderTextRed:"RelatedAnalyses_contentHeaderTextRed_33",relatedAnalysesContainer:"RelatedAnalyses_relatedAnalysesContainer_46",relatedAnalysesCard:"RelatedAnalyses_relatedAnalysesCard_58",cta:"RelatedAnalyses_cta_70",arrowRightIcon:"RelatedAnalyses_arrowRightIcon_86",buttonContent:"RelatedAnalyses_buttonContent_90",textRed:"RelatedAnalyses_textRed_97",textGray:"RelatedAnalyses_textGray_100",truncate:"RelatedAnalyses_truncate_103"};const dm=({relatedAnalyses:e})=>{const t=Wt(),a=f();return R("div",{className:cm.container,children:[p("div",{className:cm.heading,children:p(Vt,{variant:"h2",children:t("related-analyses")})}),R("div",{className:cm.content,children:[p("div",{className:cm.contentHeader,children:p($t,{className:cm.contentHeaderTextRed,onClick:()=>a(Tt.ALL_ANALYSES),children:t("view-all-analyses")})}),p("div",{className:cm.relatedAnalysesContainer,children:null==e?void 0:e.filter(((e,t)=>t<3)).map((({id:e,testName:t,categoryName:n,technique:i})=>p("div",{className:cm.relatedAnalysesCard,children:p(P,{className:cm.cta,onClick:()=>a(Q(Tt.ANALYSES_DETAILS,{id:e.toString()})),size:"small",endIcon:p(Sn,{className:cm.arrowRightIcon,spriteUrl:nr}),children:R("div",{className:cm.buttonContent,children:[p($t,{variant:"standard",className:I(cm.textRed,cm.truncate),children:p(mn,{html:t})}),R($t,{variant:"standard",className:I(cm.textGray,cm.truncate),children:[p(mn,{html:n})," / ",p(mn,{html:i})]})]})})},e)))})]})]})},mm=()=>{var e;const{data:t,isLoading:a}=vl(),{data:n}=Vr({categoryId:"",matrixId:"",collectionId:"",countryCode:"",limit:"",offset:"0",searchPhrase:""}),{id:i}=$(),r=null==t?void 0:t.find((e=>e.id.toString()===i)),s=null==t?void 0:t.filter((e=>null==r?void 0:r.relatedPublicationIds.includes(e.id))),o=null==n?void 0:n.filter((e=>null==r?void 0:r.analysisIds.includes(e.id))),l=y();if(lm(l.pathname,null==r?void 0:r.title),Aa(),a)return p(pn,{className:"spinnerCenter"});const c=un(r?r.description+r.content:"");return R("div",{children:[r&&p(om,{publication:r}),p(za,{sideLayout:Ba.BIG,children:p(mn,{html:null!=c?c:""})}),0!==(null==(e=null==r?void 0:r.analysisIds)?void 0:e.length)&&p(dm,{relatedAnalyses:null!=o?o:[]}),0!==(null==r?void 0:r.relatedPublicationIds.length)&&p(am,{relatedPublications:null!=s?s:[]})]})};var pm={container:"SustainabilityHero_container_1",textContainer:"SustainabilityHero_textContainer_8",categoryContainer:"SustainabilityHero_categoryContainer_24",dateContainer:"SustainabilityHero_dateContainer_30",date:"SustainabilityHero_date_30",textGray:"SustainabilityHero_textGray_45"};const um=()=>(Wt(),p("div",{className:pm.blur,children:p("div",{style:{background:"linear-gradient(180deg, rgba(100, 100, 100, 0.5) 0%, rgba(0, 0, 0, 0.29) 100%), url(https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_hero.jpg)"},className:pm.container,children:R("div",{className:pm.textContainer,children:[p("div",{className:pm.categoryContainer,children:p($t,{variant:"standard",children:"Sustainability"})}),p("div",{children:p(Vt,{variant:"h1",children:"ETS and Corporate Social Responsibility"})})]})})}));var hm={sustainabilityList:"Sustainability_sustainabilityList_1",environmentImage:"Sustainability_environmentImage_8",contentWrapper:"Sustainability_contentWrapper_15",parallaxBanner:"Sustainability_parallaxBanner_20",contentOverlay:"Sustainability_contentOverlay_26",textSection:"Sustainability_textSection_33",sectionHeading:"Sustainability_sectionHeading_37",heroWrapper:"Sustainability_heroWrapper_41",heroLeft:"Sustainability_heroLeft_46",heroRight:"Sustainability_heroRight_53",heroOwnerStatement:"Sustainability_heroOwnerStatement_72",ContentLayout_container_1:"Sustainability_ContentLayout_container_1_84",arrowRightIcon:"Sustainability_arrowRightIcon_88"};const vm=()=>(Aa(),R(oe,{children:[p(um,{}),p(za,{sideLayout:Ba.SMALL,children:p(le,{speed:10,className:hm.textSection,children:R("div",{className:hm.heroWrapper,children:[p("div",{className:hm.heroLeft,children:p("div",{className:hm.heroOverview,children:R($t,{variant:"intro",children:["ISO 26000 is an internationally recognized standard that provides guidance on social responsibility for organizations of all types and sizes in order to foster ethical and transparent business practices.",p("br",{}),p("br",{}),"ETS has reviewed our practices to assure alignment with the ISO 26000 guidelines. We have always, and will continue, to foster a culture of trust, integrity, and excellence to ensure a positive impact on our employees, clients, and the communities we serve.",p("br",{}),p("br",{}),p($t,{variant:"big",className:hm.privacyText,children:R(v,{href:"https://www.iso.org/iso-26000-social-responsibility.html",target:"_blank",underline:"none",color:"primary",rel:"noopener noreferrer",sx:{dis
1play:"inline-flex",alignItems:"center"},children:["Click here to learn more about ISO 26000",p(Sn,{className:hm.arrowRightIcon,spriteUrl:nr})]})})]})})}),p("div",{className:hm.heroRight,children:p("img",{src:"/assets/srg.279251b2.png"})})]})})}),R("div",{className:hm.contentWrapper,children:[p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_01.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:10,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"1. Organizational Governance"}),p($t,{variant:"big",children:"We prioritize honesty, transparency, and accountability in all our endeavors to foster enduring relationships with employees, clients, and all other stakeholders."}),p("br",{}),p($t,{variant:"big",children:"Our commitment to social sustainability promotes lasting environmental, social, and economic impact. We continually work to create a stronger community for future generations of winemakers and scientists."})]})})}),p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_02.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:5,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"2. Human Rights"}),p($t,{variant:"big",children:"We ensure ethical treatment, fair labor practices, and respect for all employees' rights and dignity. Our team members and their well-being are a main priority."}),p("br",{}),p($t,{variant:"big",children:"We promote ethical practices by emphasizing non-discrimination, equal opportunities, and the right to a safe and healthy working environment. We foster a culture of dignity and respect, ensuring that all employees are treated fairly and in compliance with all applicable regulations."})]})})})]}),R("div",{className:hm.contentWrapper,children:[p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_03.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:5,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"3. Labor Practices"}),p($t,{variant:"big",children:"ETS continues to take meaningful action, using ISO26000 as our guideline, to promote fair wages, safe working conditions, and equitable treatment for everyone on our team."}),p("br",{}),p($t,{variant:"big",children:"We strive to prioritize employees' rights and well-being by emphasizing fair hiring practices, non-discriminatory policies, and opportunities for professional growth."}),p("br",{}),p($t,{variant:"big",children:"We value hiring for expertise, which has led to a knowledge-based workforce of extraordinary diversity and inclusion. We are honored to work every day with a global team from many different scientific and cultural backgrounds."})]})})})]}),R("div",{className:hm.contentWrapper,children:[p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_04.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:5,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"4. Environment"}),p($t,{variant:"big",children:"ETS cares deeply about health today, and into the future, of the environment. We are committed to creating positive environmental outcomes for all stakeholders."}),p("br",{}),p($t,{variant:"big",children:"We maintain sustainable practices in our laboratories. Our sustainability efforts are driven by employee and customer feedback, industry trends, and alignment with ISO26000, as well as the UN Sustainable Development Goals (SDGs)."})]})})})]}),R("div",{className:hm.contentWrapper,children:[p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_05.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:5,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"5. Fair Operating Practices"}),p($t,{variant:"big",children:"We prioritize honesty, transparency, and accountability in all our endeavors, both personal and in the laboratory. Enduring relationships with our team and our clients spring from dedication to excellence, and to fulfilling promises we have made."}),p("br",{}),p($t,{variant:"big",children:"In addition to ISO 26000 guidelines, our culture of quality is guided by our rigorous ISO17025 accreditation. We continually audit our performance on behalf of our clients."})]})})})]}),R("div",{className:hm.contentWrapper,children:[p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_06.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:5,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"6. Consumer Issues"}),p($t,{variant:"big",children:"Our company is committed to advancing winemaking science. We are deeply rooted in the wine industry and value our customers and their needs. Through ongoing investment in research and innovative technologies, we continue to develop cutting-edge analytical tools that empower winemakers to enhance their craft. We value sharing knowledge through educational seminars and collaborations with the academic community, while remaining always willing to answer the questions of our clients one-on-one."}),p("br",{}),p($t,{variant:"big",children:"Our focus will always be to improve the quality and reliability of laboratory results to ensure that our clients get the best value from their data. Through our ISO17025 accreditation, we can guarantee we are meeting the needs and expectations of our clients, while continuing to strive for more innovation that will better serve them in years to come. We have grown with the wine industry and will continue to innovate and meet the needs of our clients and their winemaking endeavors."}),p("br",{}),p($t,{variant:"big",children:"We maintain a culture of quality through our strict quality system and rigorous ISO17025 accreditation. We continually audit our performance on behalf of our clients and offer the industryâs largest scope of ISO-accredited analyses."})]})})})]}),R("div",{className:hm.contentWrapper,children:[p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_07.webp",speed:-20}],className:hm.parallaxBanner}),p("div",{className:hm.contentOverlay,children:p(za,{sideLayout:Ba.SMALL,children:R(le,{speed:5,className:hm.textSection,children:[p(Vt,{variant:"h4",className:hm.sectionHeading,children:"7.
1Community Involvement and Development"}),p("br",{}),p($t,{variant:"big",children:"Our dedication to Corporate Social Responsibility and ISO26000 extends beyond our laboratory doors. Weâre deeply committed to the communities we serve and have been since 1978."}),p("br",{}),p($t,{variant:"big",children:"We annually participate in and support our communities by:"}),p("br",{}),R("ul",{className:hm.sustainabilityList,children:[p("li",{children:"Actively engaging as contributing members of 20 industry-supporting organizations. We value collaboration and collective advancement within the wine industry in all regions."}),p("li",{children:"Investing and believing in the future of the wine industry by supporting research and nurturing the next generation of professionals. We provide financial and analytical support including scholarships to multiple universities across the United States, empowering students and researchers to drive innovation and excellence."}),p("li",{children:"Fostering community development through annual charitable contributions. We prioritize the regions where our locations are situated, and work with local non-profits to address the unique needs of each community. Our goal is to make a meaningful and lasting impact by supporting the communities that our clients and team members and their families live."}),p("li",{children:"Supporting winemakers at every stage of their careers is central to our ethos. We collaborate with organizations focused on micro and small production wineries, providing resources, mentorship, and opportunities for growth. By championing these initiatives, we contribute to the vitality and sustainability of all aspects of the wine industry."})]}),p("br",{}),p($t,{variant:"big",children:"We will continue to support our wine industry communities using sustainable practices aligned with ISO 26000. We will continue to create positive social, economic, and environmental outcomes, which foster a thriving community for future generations, winemakers, and scientists."})]})})}),p(ce,{layers:[{image:"https://d1ud6akddpch7x.cloudfront.net/website-imgs/sust_08.webp",speed:-20}],className:hm.parallaxBanner})]})]}));var gm={container:"ReportVerification_container_1",formWrapper:"ReportVerification_formWrapper_10",formSection:"ReportVerification_formSection_17",formText:"ReportVerification_formText_28",formButton:"ReportVerification_formButton_31",contactButton:"ReportVerification_contactButton_35",phoneNumberTextColor:"ReportVerification_phoneNumberTextColor_39"};const ym=()=>{const e=Wt(),t=f(),{reportNumber:a}=$(),[n,i]=m.exports.useState(""),{refetch:r,isFetched:s,isSuccess:o,isFetching:l}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getReportVerification"],(()=>cn.getReportVerification(e)),{enabled:!1,onSuccess:e=>{console.log("Get report verification",e)},onError:e=>{console.error("Get report verification error",e),a.open(fa(e,t("get-report-verification-error")),{severity:"error"})}})})({id:null!=a?a:"",accessToken:n}),c=e("report-phone-number");return m.exports.useEffect((()=>{const e=document.createElement("a");if(s&&o){const t=(({id:e,accessToken:t})=>`https://webapi.etslabs.com/report_verification/${e}.json?access_token=${t}`)({id:null!=a?a:"",accessToken:n});e.href=t,e.download,e.click()}return()=>{e.remove()}}),[s,o]),p("main",{className:gm.container,children:R("div",{className:gm.formWrapper,children:[R("div",{className:gm.formSection,children:[p($t,{variant:"introSerif",className:gm.formText,children:e("report-verification")}),p(di,{name:"reportVerification",value:n,onChange:e=>i(e.target.value),label:e("report-verification-label"),placeholder:e("report-verification-placeholder"),type:"text",className:gm.formInput}),p(P,{className:gm.formButton,variant:"contained",color:"primary",onClick:e=>{e.stopPropagation(),r()},disabled:""===n||l,children:e("verify-report",{report:a})})]}),R("div",{className:gm.formSection,children:[R($t,{className:gm.formText,children:[e("verify-report-contact-text-first"),p("a",{href:`tel:${null==a?void 0:a.replace(/\D/g,"")}`,className:gm.phoneNumberTextColor,children:c}),e("verify-report-contact-text-second")]}),p(P,{className:gm.contactButton,variant:"contained",color:"secondary",onClick:()=>t(Tt.CONTACT),children:e("contact-us")})]})]})})};var bm="/assets/arrowLeftCircle.b3f05fac.svg";var _m="Breadcrumbs_separator_1",Nm="Breadcrumbs_link_11",fm="Breadcrumbs_last_18",Cm="Breadcrumbs_cursor_28";const Sm=({routes:e,className:t})=>{const a=Wt(),n=f(),i=$(),{pathname:r}=y(),s=r.split("/").filter((e=>e));return p(de,{separator:"âº","aria-label":"breadcrumb",className:t,classes:{separator:_m},children:s.map(((t,r)=>{const o=r===s.length-1,l=`/${s.slice(0,r+1).join("/")}`,c=((e,t)=>{const a=e.find((e=>{const a=b(t,e.path);return null==a?void 0:a.pathname}));return null==a?void 0:a.name})(e,l);switch(t){case"group":return p(v,{variant:"p",className:I(Nm,Cm),onClick:i.batchId?()=>n(Tt.RESULTS,{state:{batchId:i.batchId}}):void 0,children:`${t} ${i.batchId}`},r);default:return c?p(v,{variant:"p",className:I(Nm,{[fm]:o}),onClick:o?void 0:()=>n(l),children:a(c)},l):void 0}}))})},xm=[{path:Tt.HOME,name:"bc-home"},{path:Tt.MY_PROFILE,name:"bc-my-profile"},{path:Tt.LOGIN,name:"bc-login"},{path:Tt.REQUEST_PASSWORD_RESET,name:"bc-request-reset-password"},{path:Tt.RESET_PASSWORD,name:"bc-reset-password"},{path:Tt.CATEGORIES,name:"bc-categories"},{path:Tt.SALE,name:"bc-sale"},{path:Tt.CONTACT_US,name:"bc-contact-us"},{path:Tt.TEAMS,name:"bc-teams"}
1,{path:Tt.PRIVACY,name:"bc-privacy"},{path:Tt.SECURITY,name:"bc-security"},{path:Tt.REGISTRATION,name:"bc-registration"},{path:Tt.USERS,name:"bc-users"},{path:Tt.ADD_USER,name:"bc-users-add"},{path:Tt.EDIT_USER,name:"bc-users-edit"},{path:Tt.LAUNCHPAD,name:"bc-launchpad"},{path:Tt.CLIENTS,name:"bc-clients"},{path:Tt.NEW_CLIENT,name:"bc-new-client"},{path:Tt.DASHBOARD,name:"bc-dashboard"},{path:Tt.RESULTS,name:"bc-results"},{path:Tt.VINTAGE_PORTAL,name:"bc-vintage-trends"},{path:Tt.BILLING,name:"bc-billing"},{path:Tt.TEAM_SETTINGS,name:"bc-team-settings"},{path:Tt.SHOP,name:"bc-shop"},{path:Tt.REQUEST_COURIER,name:"bc-request-courier"},{path:Tt.ORDER_ANALYSES,name:"bc-order-analyses"},{path:Tt.ORDER_SUPPLIES,name:"bc-order-supplies"},{path:Tt.TECHNICAL_TOOLS,name:"bc-technical-tools"},{path:Tt.SAMPLE_DETAILS,name:"bc-sample-details"},{path:Tt.ANALYSIS_DETAILS,name:"bc-analysis-details"},{path:Tt.ANALYSES,name:"bc-analyses"},{path:Tt.LOCATIONS,name:"bc-locations"},{path:Tt.PAYMENT_METHODS,name:"bc-payment-methods"},{path:Tt.RECEIPT,name:"bc-receipt"}];var Am={container:"DashboardNavigationHistory_container_1",btn:"DashboardNavigationHistory_btn_8",icon:"DashboardNavigationHistory_icon_12"};const Im=()=>{const e=f(),t=y(),a=Wt();return!!(b({path:Tt.RESULTS,end:!0},t.pathname)||b({path:Tt.TEAM_SETTINGS,end:!0},t.pathname)||b({path:Tt.CLIENT_SETTINGS,end:!0},t.pathname)||b({path:Tt.ORDER_SUPPLIES,end:!0},t.pathname)||b({path:Tt.VINTAGE_PORTAL,end:!0},t.pathname)||b({path:Tt.REQUEST_COURIER,end:!0},t.pathname)||b({path:Tt.BILLING,end:!0},t.pathname))?null:R("div",{className:Am.container,children:[p(Sm,{routes:xm,className:Am.breadcrumbs}),(!!b(Tt.SAMPLE_DETAILS,t.pathname)||!!b(Tt.ANALYSIS_DETAILS,t.pathname))&&p(P,{className:Am.btn,variant:"text",size:"small",startIcon:p(Sn,{className:Am.icon,spriteUrl:bm}),onClick:()=>e(-1),children:a("go-back")})]})};const wm=new class{async getAllClients({id:e}){const t=aa.responseHandler(await aa.get(`/users/${e}.json`));return na(t.client_list,oa)}async getGodmodeAllClients({userId:e,q:t}){const a=aa.responseHandler(await aa.get(`/users/${e}/clients`,{params:{q:t}}));return na(a.data,oa)}async createBusinessAccount(e){const t=aa.responseHandler(await aa.post("/clients.json",na(e,ca)));return na(t,oa)}async updateProfileInformation(e){const t=ln(o({},e)),a=aa.responseHandler(await aa.put(`/users/${t.id}.json`,na(t,ca)));return na(a,oa)}async updateActiveClient(e){const t=aa.responseHandler(await aa.put(`/users/${e.id}.json`,na(e,ca)));return na(t,oa)}async addAddressAfterCreatingBusinessAccount(e){const t=aa.responseHandler(await aa.post("/addresses.json",na(e,ca)));return na(t,oa)}async authPing(){const e=aa.responseHandler(await aa.get("/auth-ping.json"));return na(e,oa)}},Tm=e=>{const t=Wt(),a=m.exports.useContext(Na),{setActiveClient:n,activeClient:i}=m.exports.useContext(_a);return L(["getAllClients"],(()=>wm.getAllClients(e)),{keepPreviousData:!0,staleTime:3e5,cacheTime:2e5,onSuccess:e=>{const t=e.find((e=>e.id===i.id));t&&n(t),console.log("get all clients",e)},onError:e=>{console.log("get all clients error",e),a.open(fa(e,t("get-all-clients-error")),{severity:"error"})}})};var Rm="DashboardSidebarMenuHeader_container_1",km="DashboardSidebarMenuHeader_link_6",Em="DashboardSidebarMenuHeader_icon_12",Mm="DashboardSidebarMenuHeader_clientCode_16";const Dm=()=>{const e=Wt(),{activeClient:t,authenticatedUser:a}=m.exports.useContext(_a),{user:{id:n}}=a,{data:i}=Tm({id:n}),r=null==i?void 0:i.find((e=>e.id===(null==t?void 0:t.id)));return R("div",{className:Rm,children:[R(v,{className:km,underline:"none",component:g,to:Tt.LAUNCHPAD,variant:"small",children:[p(Sn,{spriteUrl:bm,className:Em}),e("all-clients")]}),p(Vt,{variant:"h4",children:""!==t.name?t.name:null==r?void 0:r.name}),p("div",{className:Mm,children:e("client-code-with-code",{clientCode:t.code})})]})};var Pm="/assets/flaskExperiment.a4ccb92c.svg";const Lm=(e,t)=>{const a={[e]:t};return[{[ga.BILLING_USER]:Tt.RESULTS},{[ga.REPORTING_USER]:Tt.BILLING}].some((e=>JSON.stringify(e)===JSON.stringify(a)))},Bm=()=>{var e;const{authenticatedUser:{user:{id:t}},activeClient:a}=m.exports.useContext(_a);return null==(e=null==a?void 0:a.teamMembers.find((e=>e.userId===t)))?void 0:e.role},Om=()=>{var e;const{authenticatedUser:{user:{id:t}},activeClient:a}=m.exports.useContext(_a);return(null==(e=null==a?void 0:a.teamMembers.find((e=>e.userId===t)))?void 0:e.role)===ga.ADMINISTRATOR};var Fm="NMRPortalWrapper_container_1",Hm="NMRPortalWrapper_dashboardSidebar_14",Um="NMRPortalWrapper_sideBarContainer_24",zm="NMRPortalWrapper_mainContentContainer_39",Gm="NMRPortalWrapper_nmrBrand_45",qm="NMRPortalWrapper_icon_58",Wm="NMRPortalWrapper_pageContent_64";var Vm={container:"SidebarMenuDesktop_container_1",groupContainer:"SidebarMenuDesktop_groupContainer_1",groupLabel:"SidebarMenuDesktop_groupLabel_9",tabMenu:"SidebarMenuDesktop_tabMenu_12",tab:"SidebarMenuDesktop_tab_12",icon:"SidebarMenuDesktop_icon_25",active:"SidebarMenuDesktop_active_31",indicator:"SidebarMenuDesktop_indicator_35"};var Ym={container:"TabWithSubTabs_container_1",tabWithIcon:"TabWithSubTabs_tabWithIcon_8",iconHeader:"TabWithSubTabs_iconHeader_16",activeIcon:"TabWithSubTabs_activeIcon_22",tabMenu:"TabWithSubTabs_tabMenu_26",subTab:"TabWithSubTabs_subTab_30",icon:"TabWithSubTabs_icon_16",activeSubtab:"TabWithSubTabs_activeSubtab_46",indicator:"TabWithSubTabs_indicator_51",tab:"TabWithSubTabs_tab_8",active:"TabWithSubTabs_active_22"};const jm=({topLevelPath:e,topLevelLabel:t,subLinks:a,icon:n,tooltip:i})=>{var r,s;const o=Wt(),l=y(),[c,d]=m.exports.useState(!!b({path:e,end:!1},l.pathname));return R("div",{className:Ym.container,children:[p(me,{title:i||"",placement:"right",arrow:!0,children:R("div",{className:Ym.tabWithIcon,onClick:()=>{b({path:e,end:!1},l.pathname)?d(!0):d(!c)},children:[p(T,{icon:p(Sn,{spriteUrl:null!=n?n:"",className:Ym.icon}),iconPosition:"start",label:R(u,{variant:"standard",className:Ym.standard,children:[o(t)," "]}),component:g,value:e,to:e,className:I(Ym.tab,{[Ym.active]:!!b({path:e,end:!1},l.pathname)})},t),p(Sn,{spriteUrl:c?Yi:Vi,className:I(Ym.iconHeader,{[Ym.activeIcon]:!!b({path:e,end:!1},l.pathname)})})]})},t),p(j,{in:c,timeout:"auto",children:p(w,{orientation:"vertical",variant:"standard",textColor:"inherit",value:null!=(s=null==(r=xa(a.map((e=>e.pathname))))?void 0:r.pattern.path)&&s,classes:{flexContainerVertical:Ym.tabMenu,indicator:Ym.indicator},children:a.map((e=>p(T,{iconPosition:"start",label:p(u,{variant:"standard",className:Ym.standard,children:p(mn,{html:o(e.labelKey)})}),component:g,value:e.pathname,to:e.pathname,className:I(Ym.subTab,{[Ym.activeSubtab]:!!b({path:e.pathname,end:!1},l.pathname)})},e.labelKey)))})})]})},$m=({menuItems:e,showGroupLabel:t})=>{const a=Wt();return m.exports.useContext(_a),p("div",{className:Vm.container,children:e.map((({groupLabel:e,links:n,routesToMatch:i,toolTips:r})=>{var s,o;return R("div",{className:Vm.groupContainer,children:[t&&p($t,{variant:"small",className:Vm.groupLabel,children:a(e)}),R(w,{orientation:"vertical",variant:"standard",textColor:"inherit",value:null!=(o=null==(s=xa(i))?void 0:s.pattern.path)&&o,classes:{flexContainerVertical:Vm.tabMenu,indicator:Vm.indicator},children:['console.log("Tab Values: ", links);',n.map((({labelKey:e,pathname:t,icon:n,hidden:i,subMenuItems:s},o)=>!i&&(s?p(jm,{topLevelLabel:e,topLevelPath:t,subLinks:s,icon:n,tooltip:r?r[o]:""}):p(T,{icon:p(Sn,{spriteUrl:null!=n?n:"",className:Vm.icon}),iconPosition:"start",label:p(me,{title:r?r[o]:"",placement:"right",arrow:!0,children:R(u,{variant:"standard",className:Vm.standard,children:[a(e)," "]})},e),component:g,value:t,to:t,className:I(Vm.tab,{[Vm.active]:!!b({path:t,end:!1},location.pathname)})},e))))]})]},e)}))})};var Qm="SidebarMenuMobile_tabs_1",Km="SidebarMenuMobile_tabsFlexContainer_1",Xm="SidebarMenuMobile_tab_1",Zm="SidebarMenuMobile_active_19",Jm="SidebarMenuMobile_indicator_22";const ep=({menuItems:e,routesToMatch:t})=>{var a,n;const i=Wt();return p(w,{orientation:"horizontal",variant:"scrollable",scrollButtons:!0,textColor:"inherit",value:null!=(n=null==(a=xa(t))?void 0:a.pattern.path)&&n,classes:{root:Qm,flexContainer:Km,indicator:Jm},children:e.map((({labelKey:e,pathname:t,hidden:a})=>!a&&p(T,{label:p($t,{children:i(e)}),component:g,value:t,to:t,className:I(Xm,{[Zm]:!!b({path:t,end:!1},location.pathname)})},e)))})};var tp="SidebarMenuLayout_sidebar_1";const ap=e=>{var t=e,{header:a,menuItems:n,showGroupLabel:i,className:r}=t,s=c(t,["header","menuItems","showGroupLabel","className"]);const d=h(),m=A(d.breakpoints.up("lg")),{mobileMenuItems:u,mobileRoutesToMatch:v}=(e=>{const t=[],a=[];for(let n=0;n<e.length;n++)e[n].links.forEach((e=>{t.push(e)}
1)),e[n].routesToMatch.forEach((e=>{a.push(e)}));return{mobileMenuItems:t,mobileRoutesToMatch:a}})(n);return R("div",l(o({className:I(tp,r)},s),{children:[a,m?p($m,{menuItems:n,showGroupLabel:i}):p(ep,{menuItems:u,routesToMatch:v})]}))};const np=new class{async getUnpaidInvoicesFlag(e){const t=aa.responseHandler(await aa.get(`/clients/${e}/invoices/overdue_balance_report.json`));return na(t,oa)}},ip=(e,t)=>{const a=m.exports.useContext(Na);return L(["getUnpaidInvoicesFlag"],(()=>np.getUnpaidInvoicesFlag(e)),{onSuccess:e=>{console.log("get unpaid invoices flag by client id",e)},onError:e=>{a.open(fa(e,e.message),{severity:"error"})},enabled:t})};var rp={container:"NMRNavigation_container_1",icon:"NMRNavigation_icon_13",header:"NMRNavigation_header_18",itemActive:"NMRNavigation_itemActive_27",subNavContainer:"NMRNavigation_subNavContainer_34",linksContainer:"NMRNavigation_linksContainer_38",list:"NMRNavigation_list_44",link:"NMRNavigation_link_38",button:"NMRNavigation_button_65",tabsContainer:"NMRNavigation_tabsContainer_78",headerContainer:"NMRNavigation_headerContainer_87",tabs:"NMRNavigation_tabs_78",tabsFlexContainer:"NMRNavigation_tabsFlexContainer_127",tab:"NMRNavigation_tab_78",active:"NMRNavigation_active_148",indicator:"NMRNavigation_indicator_151"};const sp=[{labelKey:"nmr-nav-compare",pathname:Tt.NMR_COMPARE},{labelKey:"nmr-nav-reports",pathname:Tt.NMR_REPORTS},{labelKey:"nmr-nav-about",pathname:Tt.NMR_ABOUT},{labelKey:"nmr-nav-help",pathname:Tt.NMR_HELP},{labelKey:"nmr-nav-faq",pathname:Tt.NMR_FAQ}];var op="NewReport_button_1",lp="NewReport_icon_11",cp="NewReport_container_16",dp="NewReport_header_21",mp="NewReport_content_36",pp="NewReport_videoContainer_44",up="NewReport_instructions_48",hp="NewReport_buttonContainer_69",vp="NewReport_items_88",gp="/assets/crossMark.2c1d0ba0.svg";const yp=[{title:"Comparing Samples",videoFilePath:"/videos/howToCompareNmr.mp4",content:"\n <h3>Step 1: Compare Samples</h3>\n <p>To generate a report go to Compare Samples page.</p>\n <h3>Step 2: Choose Report Type</h3>\n <p>Choose either Comparison or Multi-Point Comparison to generate for your sample comparison. Comparison will display your samples as Baseline vs a Sample, while the Multi-Point Comparison will display a timeline of the baseline and chosen samples.</p>\n <h3>Step 3: Sample Cart</h3>\n <p>Start selecting samples from the sample list on the Compare Samples page.</p>\n <p>As samples are selected, they will begin to populate the sample cart.</p>\n <p>You can remove any samples from the sample cart by clicking the delete icon by the sample in the sample cart.</p>\n <p>A minimum of two samples and a maximum of eight samples must be selected to generate a report.</p>\n <h3>Step 4: Report Wizard</h3>\n <p>Once all the samples for your report are selected, click the Create Report With Selected Samples button.</p>\n <p>This will open a wizard popup to help through the process of constructing your report.</p>\n <p>The first step in the wizard process will be to select a baseline sample to compare the rest of your selected samples against. If you need help understanding which sample you should select as a baseline sample, click the Learn how to choose one at the bottom of the window.</p>\n <p>If you have chosen Multi-Point Comparison, there will be an optional second step to order the samples in the desired display order.</p>\n <p>The last step in the wizard will be to review your selections and optionally name your report.</p>\n <h3>Step 5: Submit</h3>\n <p>After reviewing your selections and the selections are correct, click Generate Report to proceed to the generate report page.</p>\n <p>If you would like to change the selected samples, you can leave the wizard popup at any time to change your selected samples and return back to the wizard popup by clicking the Create Report With Selected Samples button.</p>\n <h3>Step 6: Offline Reports</h3>\n <p>A wizard popup helping you through the report process</p>\n <p>A minimum of two samples and a maximum of eight samples must be selected to generate a report.</p>\n "},{title:"Navigating About NMR",videoFilePath:"/videos/howToAboutNmr.mp4",content:"\n <p>The About NMR page contains educational content about NMR Spectra and what your comparison results mean.</p>\n <h3>The About NMR Topics</h3>\n <p>You will first see the About NMR topic cards. Each topic contains some short articles with detailed information about the topic.</p>\n <p>To learn more about the topic, click any of the article links in the topic card. This will bring you to a page with the article.</p>\n <h3>Paging Through Articles</h3>\n <p>Once on the article page, you can click between any of the articles under the same topic as the initial article you have selected by clicking either the Next or Previous buttons at the top of the article.</p>\n <h3>Returning to the About NMR Topics</h3>\n <p>To return back to the NMR Topics page, click the Go Back To Topics button at the top of the article page. This will bring you back to the About NMR Topics page where you can continue to learn about NMR by selecting other articles under the other NMR Topics.
1</p>\n "}],bp=({open:e,setOpen:t,show:a,setShow:n,showHandler:i})=>{const r=f(),s=yp.findIndex((e=>"Comparing Samples"===e.title));return p(wi,{open:e,setModal:()=>{a&&i(),t(!1)},medium:!0,children:R("div",{className:cp,children:[R("div",{className:dp,children:[p(Vt,{variant:"h4",children:"How to Compare NMR Samples - Tutorial"}),p(Sn,{spriteUrl:gp,className:lp,onClick:()=>t(!1)})]}),p("div",{className:mp,children:R("div",{className:up,children:[""!==yp[s].videoFilePath&&R("video",{controls:!0,autoPlay:!0,width:"70%",className:pp,children:[" ",p("source",{src:yp[s].videoFilePath,type:"video/mp4"})," Your browser does not support the video tag. "]}),p(mn,{html:yp[s].content})]})}),p("div",{className:hp,children:R("div",{className:vp,children:[p(pe,{label:"Do not show again",control:p(ue,{checked:!a,onChange:()=>n(!a),sx:{"&.Mui-checked":{color:"#5160EB"}}})}),p(P,{variant:"contained",className:op,onClick:()=>{a||i(),r(Tt.NMR_COMPARE),t(!1),n(!1)},children:"Start Comparing Samples"})]})})]})})};var _p="RecentGeneratedReports_container_1",Np="RecentGeneratedReports_header_5",fp="RecentGeneratedReports_icon_15",Cp="RecentGeneratedReports_content_20";var Sp="SideModal_paper_1",xp="SideModal_medium_12",Ap="SideModal_large_23",Ip="SideModal_fullScreen_34";const wp=({open:e,setModal:t,children:a,fullScreen:n,medium:i,large:r})=>p(V,{classes:{paper:n||i||r?n?Ip:i?xp:r?Ap:Sp:Sp},open:e,onClose:()=>t({modalState:!1,modalData:{}}),children:a});var Tp,Rp;(Rp=Tp||(Tp={})).CHECKING="CHECKING",Rp.SAVINGS="SAVINGS";var kp,Ep,Mp=Tp;(Ep=kp||(kp={})).BUSINESS="CCD",Ep.PERSONAL="PPD";var Dp,Pp,Lp=kp;(Pp=Dp||(Dp={})).PAID="PAID",Pp.UNPAID="UNPAID",Pp.PENDING="PENDING";var Bp,Op,Fp=Dp;(Op=Bp||(Bp={})).ALL="",Op.PAID="PAID",Op.UNPAID="UNPAID",Op.PENDING="PENDING";var Hp,Up,zp=Bp;(Up=Hp||(Hp={})).JANUARY="Jan",Up.FEBRUARY="Feb",Up.MARCH="Mar",Up.APRIL="Apr",Up.MAY="May",Up.JUNE="Jun",Up.JULY="Jul",Up.AUGUST="Aug",Up.SEPTEMBER="Sep",Up.OCTOBER="Oct",Up.NOVEMBER="Nov",Up.DECEMBER="Dec";var Gp,qp=Hp;(Gp||(Gp={})).SUCCESSFUL="successful";var Wp,Vp,Yp=Gp;(Vp=Wp||(Wp={})).CARD="CARD",Vp.ACH="ACH";var jp,$p,Qp=Wp;($p=jp||(jp={})).VISA="VISA",$p.MASTERCARD="MASTERCARD",$p.AMERICAN_EXPRESS="AMERICAN_EXPRESS",$p.DISCOVER="DISCOVER";var Kp,Xp,Zp=jp;(Xp=Kp||(Kp={})).DAILY="DAILY",Xp.WEEKLY="WEEKLY",Xp.MONTHLY="MONTHLY",Xp.NONE="";var Jp,eu,tu=Kp;(eu=Jp||(Jp={})).ACTIVE="ACTIVE",eu.INACTIVE="INACTIVE";var au,nu,iu=Jp;(nu=au||(au={})).INVOICE="Invoice",nu.FINANCE_CHARGE="Finance Charge";var ru,su,ou=au;(su=ru||(ru={})).PAYMENTS="Make a Payment",su.REPORTS="Send Invoices";var lu=ru;const cu=(e,t,a)=>`https://webapi.etslabs.com//clients/${e}/batches/${t}/report?report_type=${a}`;var du,mu;(mu=du||(du={})).SAMPLE="sample",mu.RESULTS_BY_ANALYSIS="";var pu,uu,hu=du;(uu=pu||(pu={})).GROUPS="reportBatchId",uu.SAMPLES="description",uu.LOGGED="loggedAt",uu.STATUS="status";var vu,gu,yu=pu;(gu=vu||(vu={})).NUMBER="number",gu.DESCRIPTION="description",gu.LOGGED_AT="logged_at",gu.VALIDATION_STATUS="validation_status";var bu,_u,Nu=vu;(_u=bu||(bu={})).EREPORT="ereport",_u.BILLING="billing";var fu,Cu,Su=bu;(Cu=fu||(fu={})).ANALYTE="analyte",Cu.LOGGED_AT="loggedAt",Cu.FORMATTED_RESULT="formattedResult",Cu.REPORT_BATCH_ID="reportBatchId",Cu.DESCRIPTION="description",Cu.PANEL_DESCRIPTION="panelDescription",Cu.STATUS="status",Cu.FRIENDLY_NUMBER="friendlyNumber",Cu.QUICK_VIEW="quickView";var xu,Au,Iu=fu;(Au=xu||(xu={})).ANALYTE="analyte",Au.LOGGED_AT="logged_at",Au.FORMATTED_RESULT="formatted_result",Au.REPORT_BATCH_ID="report_batch_id",Au.DESCRIPTION="description",Au.PANEL_DESCRIPTION="panel_description",Au.STATUS="status",Au.FRIENDLY_NUMBER="friendly_number";var wu,Tu,Ru=xu;(Tu=wu||(wu={})).PENDING="Pending",Tu.PRELIMINARY="Preliminary",Tu.COMPLETED="Completed";var ku=wu;const Eu={[Iu.ANALYTE]:Ru.ANALYTE,[Iu.DESCRIPTION]:Ru.DESCRIPTION,[Iu.FORMATTED_RESULT]:Ru.FORMATTED_RESULT,[Iu.PANEL_DESCRIPTION]:Ru.PANEL_DESCRIPTION,[Iu.REPORT_BATCH_ID]:Ru.REPORT_BATCH_ID,[Iu.LOGGED_AT]:Ru.LOGGED_AT,[Iu.STATUS]:Ru.STATUS,[Iu.FRIENDLY_NUMBER]:Ru.FRIENDLY_NUMBER,[yu.SAMPLES]:Nu.DESCRIPTION,[yu.LOGGED]:Nu.LOGGED_AT,[yu.GROUPS]:Nu.NUMBER,[yu.STATUS]:Nu.VALIDATION_
1STATUS};var Mu={container:"Pagination_container_1",select:"Pagination_select_9",arrowIcon:"Pagination_arrowIcon_17",selected:"Pagination_selected_24",displayedRows:"Pagination_displayedRows_30"};const Du=()=>{const e=Wt(),t=he(),{page:a,pageCount:n,pageSize:i,rowCount:r}=ve(t,ge),{setPage:s,setPageSize:l}=t.current;return R("div",{className:Mu.container,children:[p(ye,{component:"div",count:r,onPageChange:()=>console.log("page changed"),page:a,rowsPerPage:i,rowsPerPageOptions:[],onRowsPerPageChange:e=>{l(parseInt(null==e?void 0:e.target.value))},labelRowsPerPage:"",labelDisplayedRows:()=>{if(0!==r)return`${e("results")}: ${0===a?1:a*i+1} ${e("to")} ${a===n-1?r:i*(a+1)} ${e("from")} ${r}`},nextIconButtonProps:{style:{display:"none"}},backIconButtonProps:{style:{display:"none"}},classes:{root:Mu.tablePaginationRoot,select:Mu.select,selectIcon:Mu.selectIcon,displayedRows:Mu.displayedRows}}),p(be,{color:"primary",shape:"rounded",count:n,page:a+1,onChange:(e,t)=>s(t-1),renderItem:e=>0!==r&&n>1?p(_e,o({components:{},classes:{selected:Mu.selected}},e)):""})]})};var Pu={rowPointer:"DataGrid_rowPointer_1",isPanel:"DataGrid_isPanel_5",panelDescription:"DataGrid_panelDescription_17",tableContainer:"DataGrid_tableContainer_21",root:"DataGrid_root_26",main:"DataGrid_main_29",columnHeaders:"DataGrid_columnHeaders_33",columnHeadersNMR:"DataGrid_columnHeadersNMR_36",columnSeparator:"DataGrid_columnSeparator_39",iconButtonContainer:"DataGrid_iconButtonContainer_42",sortIcon:"DataGrid_sortIcon_49",columnHeader:"DataGrid_columnHeader_33","MuiDataGrid-columnHeader--sorted":"DataGrid_MuiDataGrid-columnHeader--sorted_52",footerContainer:"DataGrid_footerContainer_58"};const Lu=function({columns:e,rows:t,rowCount:a,clickableRows:n,onRowClick:i,setQueryOptions:r,setSelectedInvoices:s,selectedInvoices:c,pageSize:d,isLoading:u,components:h,componentsProps:v,getRowId:g,showPagination:y=!0,checkboxSelection:b=!1,noRowsLabel:_,page:N,paymentsAsideViewType:f,selectedNMRSamples:C,setSelectedNMRSamples:S,stylingNMR:x,autoHeight:A}){const[I,w]=m.exports.useState((null==c?void 0:c.map((e=>null==e?void 0:e.batchNumber)))||(null==C?void 0:C.map((e=>null==e?void 0:e.id)))||[]);m.exports.useEffect((()=>{w((null==c?void 0:c.map((e=>null==e?void 0:e.batchNumber)))||(null==C?void 0:C.map((e=>null==e?void 0:e.id)))||[])}),[c,C]);return p(M,{autoHeight:!0,hideFooter:0===a||!y,paginationMode:"server",rowCount:null!=a?a:0,rows:t,columns:e,hideFooterPagination:!y,loading:u,rowsPerPageOptions:[50,100,150],pageSize:null!=d?d:50,page:void 0!==N&&N>0?N-1:0,onPageChange:e=>{r&&r((t=>l(o({},t),{start:e+1})))},onPageSizeChange:e=>{r&&r((t=>l(o({},t),{length:e})))},onSortModelChange:e=>{r&&r((t=>l(o({},t),{sortOption:ra(e[0])?{field:"logged_at",sort:"ASC"}:{field:Eu[e[0].field],sort:e[0].sort}})))},getRowClassName:e=>{var t;return e.row.isPanel?Pu.isPanel:null!==e.row.panelDescription&&(null==(t=e.row.panelDescription)?void 0:t.length)>0?Pu.panelDescription:n?Pu.rowPointer:""},classes:{root:Pu.root,main:Pu.main,columnHeaders:x?Pu.columnHeadersNMR:Pu.columnHeaders,columnHeader:Pu.columnHeader,footerContainer:Pu.footerContainer,columnSeparator:Pu.columnSeparator,iconButtonContainer:Pu.iconButtonContainer,sortIcon:Pu.sortIcon,cell:Pu.cell,checkboxInput:Pu.disabled},checkboxSelection:b,headerHeight:56,getRowHeight:()=>A?"auto":56,onCellClick:e=>i(e),onSelectionModelChange:e=>(e=>{if(c&&s){const a=e.map((e=>t.find((t=>t.invoiceNumber===e))||(null==c?void 0:c.find((t=>(null==t?void 0:t.invoiceNumber)===e))))).map((e=>({invoiceNumber:e.invoiceNumber,batchNumber:e.invoiceNumber,price:e.amountDue||e.price,docType:e.docType,dateIssued:e.dateIssued})));s&&s(a)}if(C&&S)if(C.length<8){const a=e.map((e=>t.find((t=>t.id===e))||(null==C?void 0:C.find((t=>(null==t?void 0:t.id)===e))))).map((e=>({id:e.id,friendlyNumber:e.friendlyNumber,description:e.description,collectionDate:e.collectionDate,validationStatus:e.validationStatus,loggedAt:e.loggedAt,testDate:e.testDate,clientCode:e.clientCode,batchNumber:e.batchNumber,sampleType:e.sampleType,analysisType:e.analysisType,status:e.status})));S&&S(a)}else if(8===C.length&&e.length<=8){const t=e.map((e=>null==C?void 0:C.find((t=>(null==t?void 0:t.id)===e)))).map((e=>{if(e)return{id:e.id,friendlyNumber:e.friendlyNumber,description:e.description,collectionDate:e.collectionDate,validationStatus:e.validationStatus,loggedAt:e.loggedAt,testDate:e.testDate,clientCode:e.clientCode,batchNumber:e.batchNumber,sampleType:e.sampleType,analysisType:e.analysisType,status:e.status}}));S&&S(t)}})(e),selectionModel:I,disableSelectionOnClick:!0,keepNonExistentRowsSelected:!0,componentsProps:l(o({},v),{baseCheckbox:{sx:{"&.Mui-disabled":{display:"none"}}}}),components:o({LoadingOverlay:Ne,Pagination:Du},h),isRowSelectable:({row:e})=>e.status===Fp.UNPAID||f===lu.REPORTS||"Completed"===e.status,getRowId:g,disableColumnMenu:!0,hideFooterSelectedRowCount:!0,localeText:{toolbarColumns:"",noRowsLabel:null!=_?_:""},sx:x?{"& .MuiDataGrid-row.Mui-selected":{backgroundColor:"#edf0f7","&:hover":{backgroundColor:"#edf0f7"}},"& .MuiDataGrid-row:hover":{backgroundColor:"#edf0f7"},"& .MuiDataGrid-columnHeaderCheckbox .MuiCheckbox-root.Mui-checked":{color:"#4F6379"},"& .MuiDataGrid-columnHeaderCheckbox":{display:"none"},"& .MuiDataGrid-columnHeader":b?{paddingLeft:"60px"}:{},"& .MuiDataGrid-row .MuiCheckbox-root.Mui-checked":{color:"#4F6379"}}:{}})};var Bu="GeneratedReportsColumns_cellContainerStack_35",Ou="GeneratedReportsColumns_cellContainerWrap_42",Fu="GeneratedReportsColumns_tableHeader_64",Hu="GeneratedReportsColumns_tableHeaderContainer_70";const Uu=e=>e&&""!==e?e.includes("T")?`${e.split("T")[0].replace(/-/g,"/")} ${e.split("T")[1].split(".")[0]}`:`${e.split(" ")[0].replace(/-/g,"/")} ${e.split(" ")[1]}`:"Invalid Date",zu=e=>{if(""===e)return"Invalid Date";return N(Date.parse(e),"EEE, LLL d, yyyy h:mm a")},Gu=e=>{if(""===e)return"Invalid Date";return N(Date.parse(e),"MM/dd/yyyy")};const qu=new class{async getNMRSamples({clientCode:e,searchTerm:t,startDate:a,endDate:n}){const i=ln({searchTerm:t,startDate:a,endDate:n}),r=aa.responseHandler(await aa.get(`/clients/${e}/nmr_results`,{params:na(i,ca)}));return na(r,oa)}async getNMRSample(e,t){const a=aa.responseHandler(await aa.get(`/clients/${e}/nmr_results/${t}`));return na(a,oa)}async generateComparisonReport({clientCode:e,formData:t}){const a=aa.responseHandler(await aa.post(`/clients/${e}/nmr_results/comparison_report`,na(t,ca)));return na(a,oa)}async generateMultipointComparisonReport({clientCode:e,requestData:t}){const a=aa.responseHandler(await aa.post(`/clients/${e}/nmr_results/multipoint_comparison_report`,na(t,ca)));return na(a,oa)}async cacheNMRSampleData({sampleIds:e,clientCode:t}){const a=aa.responseHandler(await aa.post(`/clients/${t}/nmr_reports/start_caching_sample_data`,{sample_ids:e}));return na(a,oa)}async cacheNMRComparisonData({clientCode:e,requestData:t}){const a=aa.responseHandler(await aa.post(`/clients/${e}/nmr_reports/start_caching_comparison_data`,na(t,ca)));return na(a,oa)}async createNMRReportOrder({clientCode:e,formData:t}){const a=aa.responseHandler(await aa.post(`/clients/${e}/nmr_reports`,na(t,ca)));return na(a,oa)}async getNMRReportOrder(e,t){const a=aa.responseHandler(await aa.get(`/clients/${e}/nmr_reports/${t}`));return na(a,oa)}async getGeneratedReports(e){const t=aa.responseHandler(await aa.get(`/clients/${e}/nmr_reports`));return na(t,oa)}},Wu=({open:e,setOpen:t})=>{var a,n;const{activeClient:i}=m.exports.useContext(_a),r=f(),s=(()=>{Wt();const e=e=>{var t,a;return p("div",{className:Bu,children:null==(a=null==(t=e.row)?void 0:t.comparisonSamples)?void 0:a.map((e=>p(Vt,{variant:"h6",children:e.description},e.id)))})};return[{field:"title",sortable:!1,renderHeader:()=>p(me,{title:"report name",children:p("div",{className:Hu,children:p(Vt,{variant:"h6",className:Fu,children:"Title"})})}),flex:.75,renderCell:e=>p("div",{className:Ou,children:p(Vt,{variant:"h6",children:e.value?e.value:`Web report ${e.row.id}`})})},{field:"reportType",sortable:!1,renderHeader:()=>p(me,{title:"report type",children:p("div",{className:Hu,children:p(Vt,{variant:"h6",className:Fu,children:"Type"})})}),flex:.75,renderCell:e=>p("div",{className:Ou,children:p(Vt,{variant:"h6",children:"multipoint_comparison"===e.value?"Multi-Point Comparison":"Comparison"})})},{field:"baselineSample",sortable:!1,renderHeader:()=>p(me,{title:"baseline",children:p("div",{className:Hu,children:p(Vt,{variant:"h6",className:Fu,children:"Baseline"})})}),flex:1,renderCell:e=>{var t;return p("div",{className:Ou,children:p(Vt,{variant:"h6",children:null==(t=e.value)?void 0:t.description})})}},{field:"comparisonSamples",sortable:!1,renderHeader:()=>p(me,{title:"baseline",children:p("div",{className:Hu,children:p(Vt,{variant:"h6",className:Fu,children:"Comparison Samples"})})}),flex:1,renderCell:t=>p(e,{row:t.row})},{field:"notes",sortable:!1,renderHeader:()=>p(me,{title:"Test Date",children:p("div",{className:Hu,children:p(Vt,{variant:"h6",className:Fu,children:"Notes"})})}),flex:.5,renderCell:e=>p("div",{className:Ou,children:p(Vt,{variant:"h6",children:e.value})})},{field:"createdAt",sortable:!1,renderHeader:()=>p(me,{title:"Test Date",children:p("div",{className:Hu,children:p(Vt,{variant:"h6",className:Fu,children:"Generated At"})})}),flex:1,renderCell:e=>p("div",{className:Ou,children:p(Vt,{variant:"h6",children:e.value?zu(e.value):""})})}]})(),{data:o}=((e,t)=>{Wt();const a=m.exports.useContext(Na);return L(["getGeneratedReports"],(()=>qu.getGeneratedReports(e)),{keepPreviousData:!1,onSuccess:e=>{console.log("Get NMR generated reports order",e)},onError:e=>{console.error("Get NMR generated reports error",e),a.open(fa(e,"Get NMR generated reports error"),{severity:"error"})},enabled:t})}
1)(i.code,e);return p(wp,{open:e,setModal:()=>t(!1),medium:!0,children:R("div",{className:_p,children:[R("div",{className:Np,children:[R("div",{children:[p(Vt,{variant:"h2",children:"Recently Generated Comparisons"}),p($t,{variant:"standard",children:"To view a recently generated comparison, click on a row in the table."})]}),p(Sn,{spriteUrl:jr,className:fp,onClick:()=>t(!1)})]}),p("div",{className:Cp,children:p(Lu,{rowCount:null!=(a=null==o?void 0:o.totalCount)?a:0,rows:null!=(n=null==o?void 0:o.reports)?n:[],columns:s,getRowId:e=>e.id,onRowClick:e=>{r(Q(Tt.NMR_GENERATED_REPORT,{reportId:e.row.id.toString(),reportType:e.row.reportType})),t(!1)},showPagination:!1,checkboxSelection:!1,stylingNMR:!0,clickableRows:!0,page:null==o?void 0:o.currentPage,autoHeight:!0})})]})})},Vu=()=>{const e=f(),t=Wt(),a=h(),n=A(a.breakpoints.up("lg")),[i,r]=m.exports.useState(!1),[s,o]=m.exports.useState(!1),[l,c]=m.exports.useState(!0);return m.exports.useEffect((()=>{"true"===localStorage.getItem("doNotShowComparisonModal")&&c(!1)}),[]),R(k,{children:[R("div",n?{className:rp.container,children:[R("div",{onClick:()=>e(Tt.NMR_HOME),className:I(rp.header,{[rp.itemActive]:!!b({path:Tt.NMR_HOME,end:!0},location.pathname)}),children:[p(Sn,{spriteUrl:Pm,className:rp.icon}),p($t,{variant:"big",children:p("b",{children:"NMR Portal Home"})})]}),p("div",{className:rp.subNavContainer,children:p("div",{className:rp.linksContainer,children:R("ul",{className:rp.list,children:[sp.map((e=>p("li",{className:rp.listItem,children:p(jt,{variant:"standard",to:e.pathname,className:I(rp.link,{[rp.itemActive]:!!b({path:e.pathname,end:!0},location.pathname)}),children:t(e.labelKey)})},e.labelKey))),p("li",{className:rp.listItem,children:p(jt,{ariant:"standard",to:location.pathname,className:I(rp.link),onClick:()=>r(!0),children:"Recent Comparisons"})},"recent_reports")]})})}),p(P,{variant:"outlined",className:rp.button,startIcon:p($t,{className:rp.icon,children:"+"}),onClick:()=>{l?o(!0):e(Tt.NMR_COMPARE)},children:"Start Comparing"}),p(bp,{open:s,setOpen:o,show:l,setShow:c,showHandler:()=>{c(!1),localStorage.setItem("doNotShowComparisonModal","true")}})]}:{className:rp.tabsContainer,children:[p("div",{className:rp.headerContainer,children:R("div",{onClick:()=>e(Tt.NMR_HOME),className:I(rp.header,{[rp.itemActive]:!!b({path:Tt.NMR_HOME,end:!0},location.pathname)}),children:[p(Sn,{spriteUrl:Pm,className:rp.icon}),p($t,{variant:"big",children:p("b",{children:"NMR Portal"})})]})}),p(w,{orientation:"horizontal",variant:"scrollable",scrollButtons:!0,textColor:"inherit",classes:{root:rp.tabs,flexContainer:rp.tabsFlexContainer,indicator:rp.indicator},children:sp.map((e=>p(T,{label:p($t,{children:p(mn,{html:t(e.labelKey)})}),component:jt,value:e.pathname,to:e.pathname,className:I(rp.tab,{[rp.active]:!!b({path:e.pathname,end:!1},location.pathname)})},e.labelKey)))})]}),p(Wu,{open:i,setOpen:r})]})},Yu=["[email protected]","[email protected]","[email protected]"],ju=()=>{var e;const t=h(),a=A(t.breakpoints.up("lg")),n=Wt(),{activeClient:i}=m.exports.useContext(_a),r=f(),s=m.exports.useContext(Na),o=Bm(),{authenticatedUser:l}=m.exports.useContext(_a);ip(null!=(e=null==i?void 0:i.id)?e:0,i&&0!==i.id),m.exports.useEffect((()=>{Yu.includes(l.user.email)||r(Tt.DASHBOARD,{replace:!0})}),[l.user.email]);const c={email:l.user.email,name:l.user.firstname+" "+l.user.lastname,phone:l.user.phone,customAttributes:{company:{id:i.code,name:i.name,created_at:i.createdAt,business_type:i.businessType,primary_phone:i.primaryPhone,status:i.status},widget:{activator:"#IntercomDefaultWidget"},user_hash:l.user.intercomUserHash}},{update:d}=S();d(c),i.teamMembers.find((e=>e.userId===l.user.id));return m.exports.useEffect((()=>{JSON.stringify(i)===JSON.stringify(ya)&&r(Tt.LAUNCHPAD),JSON.stringify(i)!==JSON.stringify(ya)&&i.status===va.CREDIT_HOLD&&(o===ga.REPORTING_USER?s.open(R(k,{children:[n("credit-hold-text-info-part-one"),p(jt,{variant:"body2",to:Tt.CONTACT,underline:"always",color:"#32DFAB",target:"_blank",rel:"noopener noreferrer",children:n("contact-ets")}),n("credit-hold-text-info-part-two")]}),{severity:"warning"}):r(Tt.BILLING))}),[]),R("main",{className:Fm,children:[p("section",{className:Um,children:p(ap,{header:p(Dm,{}),menuItems:[Ku(),Qu()],showGroupLabel:!0,className:Hm})}),p("section",{className:zm,children:R(m.exports.Suspense,{fallback:p(k,{}),children:[a?R("div",{className:Gm,onClick:()=>r(Tt.NMR_HOME),children:[p(Sn,{spriteUrl:Pm,className:qm}),p($t,{variant:"big",children:"NMR Portal"})]}):p(Vu,{}),p("div",{className:Wm,children:p(E,{})})]})})]})},$u=()=>{const{activeClient:e,authenticatedUser:t}=m.exports.useContext(_a),a=Bm();return[{labelKey:"dashboard-menu-results",pathname:Tt.RESULTS,icon:"/assets/tubeExperiment.bfabfb80.svg",hidden:!t.user.administrator&&Lm(a,Tt.RESULTS)||!t.user.administrator&&e.status===va.CREDIT_HOLD},{labelKey:"dashboard-menu-nmr",pathname:Tt.NMR_HOME,icon:Pm,hidden:!Yu.includes(t.user.email)||!t.user.administrator&&e.status===va.CREDIT_HOLD,subMenuItems:[{labelKey:"nmr-nav-compare",pathname:Tt.NMR_COMPARE},{labelKey:"nmr-nav-samples",pathname:Tt.NMR_SAMPLES},{labelKey:"nmr-nav-reports",pathname:Tt.NMR_REPORTS},{labelKey:"nmr-nav-about",pathname:Tt.NMR_ABOUT},{labelKey:"nmr-nav-help",pathname:Tt.NMR_HELP}]},{labelKey:"dashboard-menu-billing",pathname:Tt.BILLING,icon:"/assets/invoiceMail.90fb8051.svg",hidden:!t.user.administrator&&Lm(a,Tt.BILLING)||e.resignAgreement},{labelKey:"dashboard-menu-request-courier",pathname:Tt.REQUEST_COURIER,icon:ir,hidden:e.resignAgreement},{labelKey:"dashboard-menu-order-supplies",pathname:Tt.ORDER_SUPPLIES,icon:"/assets/shipmentUpload.cd478b52.svg",hidden:e.resignAgreement},{labelKey:"dashboard-menu-vintage-portal",pathname:Tt.VINTAGE_PORTAL,icon:"/assets/wineGlass.2dcb2e9c.svg",hidden:e.resignAgreement},{labelKey:"dashboard-menu-smoke-impact-reports",pathname:Tt.SMOKE_IMPACT_REPORTS,icon:"/assets/chartLine.fe67a06e.svg",hidden:e.resignAgreement}
1,{labelKey:"dashboard-menu-team-settings",pathname:Tt.TEAM_SETTINGS,icon:"/assets/multipleUsers.e4563239.svg",hidden:!1},{labelKey:"dashboard-menu-client-settings",pathname:Tt.CLIENT_SETTINGS,icon:"/assets/clientSettings.02e44f0e.svg",hidden:e.resignAgreement}]},Qu=()=>({groupLabel:"dashboard-account-settings-header",routesToMatch:[Tt.TEAM_SETTINGS,Tt.CLIENT_SETTINGS],links:$u().filter((e=>e.pathname===Tt.TEAM_SETTINGS||e.pathname===Tt.CLIENT_SETTINGS)),toolTips:["Add, edit, and remove team members. Set permissions for each team member.","Edit your account information, including your addresses & contact details."],isBeta:[!1,!1]}),Ku=()=>({groupLabel:"laboratory-services",routesToMatch:[Tt.RESULTS,Tt.NMR_HOME,Tt.BILLING,Tt.REQUEST_COURIER,Tt.ORDER_SUPPLIES,Tt.VINTAGE_PORTAL,Tt.SMOKE_IMPACT_REPORTS],links:$u().filter((e=>e.pathname===Tt.RESULTS||e.pathname===Tt.NMR_HOME||e.pathname===Tt.BILLING||e.pathname===Tt.REQUEST_COURIER||e.pathname===Tt.ORDER_SUPPLIES||e.pathname===Tt.VINTAGE_PORTAL||e.pathname===Tt.SMOKE_IMPACT_REPORTS)),toolTips:["View & search laboratory results","View NMR Spectral Signature Portal","View invoices, download receipts & pay bills","Request a courier pickup (if within one of our service areas)","Request sample tubes, shipping supplies, & more","Identify vintage trends in juice chemistry and grape phenolic development in real-time","View the results of smoke impact analyses in the context of background concentrations observed to date"],isBeta:[!1,!1,!1,!1,!1,!1,!0]}),Xu=m.exports.createContext({isScrolledToBottom:0,setIsScrolledToBottom:()=>console.log("MISSING SCROLL PROVIDER")});var Zu="SidebarWithContentWrapper_mainContainer_1",Ju="SidebarWithContentWrapper_firstColumn_19",eh="SidebarWithContentWrapper_secondColumn_34";const th=({columnOne:e,columnTwo:t})=>{const{setIsScrolledToBottom:a}=m.exports.useContext(Xu),n=fe((()=>a(!0)));return R("main",{className:Zu,children:[p("section",{className:Ju,children:e}),p("section",{ref:n,className:eh,children:t})]})};var ah="/assets/infoCircleIcon.dbc7060a.svg";const nh=new class{async getAllAddresses({clientId:e}){const t=aa.responseHandler(await aa.get(`/clients/${e}/addresses.json`));return na(t,oa)}async addAddress(e){const t=aa.responseHandler(await aa.post("/addresses.json",na(e,ca)));return na(t,oa)}async editAddress(e){const t=aa.responseHandler(await aa.put(`/addresses/${e.id}.json`,na(e,ca)));return na(t,oa)}async deleteAddress(e){const t=aa.responseHandler(await aa.delete(`/addresses/${e}.json`));return na(t,oa)}async goPaperless({clientId:e}){const t=aa.responseHandler(await aa.get(`/clients/${e}/go_paperless.json`));return na(t,oa)}async getAllFaxes({clientId:e}){const t=aa.responseHandler(await aa.get(`/clients/${e}/faxes.json`));return na(t,oa)}async addFax(e){const t=aa.responseHandler(await aa.post("/faxes.json",na(e,ca)));return na(t,oa)}async editFax(e){var t=e,{id:a}=t,n=c(t,["id"]);const i=aa.responseHandler(await aa.put(`/faxes/${a}.json`,na(o({},n),ca)));return na(i,oa)}async deleteFax({id:e}){const t=aa.responseHandler(await aa.delete(`/faxes/${e}.json`));return na(t,oa)}async editClientInformation(e){const t=aa.responseHandler(await aa.put(`/clients/${e.id}`,na(e,ca)));return na(t,oa)}};var ih={container:"GoPaperlessWarning_container_1",icon:"GoPaperlessWarning_icon_11",buttonContainer:"GoPaperlessWarning_buttonContainer_17",button:"GoPaperlessWarning_button_17"};const rh=({clientId:e})=>{const t=Wt(),{mutateAsync:a,data:n}=(()=>{const e=C(),t=m.exports.useContext(Na);return m.exports.useContext(_a),x(nh.goPaperless,{onSuccess:a=>{e.invalidateQueries("getAllClients"),t.open("Thank you for making the switch. Paperless settings have been updated.",{severity:"success"})},onError:e=>{console.log("go paperless error",e),t.open(fa(e,e.message),{severity:"error"})}})})();return m.exports.useEffect((()=>{console.log("GoPaperlessWarning Results: ",n)}),[n]),R("div",{className:ih.container,children:[p(Sn,{spriteUrl:ah,className:ih.icon}),R($t,{children:[p(mn,{html:t("go-paperless-pitch")}),p("div",{className:ih.buttonContainer,children:p(P,{className:ih.backButton,fullWidth:!0,variant:"contained",onClick:()=>a({clientId:e}),children:"Simply click here to go paperless now."})})]})]})};var sh="Dashboard_dashboardSidebar_1",oh="Dashboard_notification_12",lh="Dashboard_header_24",ch="Dashboard_textBlock_27",d
1h="Dashboard_text_27";const mh=()=>{var e;const t=Wt(),{activeClient:a}=m.exports.useContext(_a),n=f(),i=m.exports.useContext(Na),r=Bm(),{authenticatedUser:s}=m.exports.useContext(_a),{data:o}=ip(null!=(e=null==a?void 0:a.id)?e:0,a&&0!==a.id);console.log("Unpaid flag",o),console.log("Contains active client?",a&&0!==a.id);const l={email:s.user.email,name:s.user.firstname+" "+s.user.lastname,phone:s.user.phone,customAttributes:{company:{id:a.code,name:a.name,created_at:a.createdAt,business_type:a.businessType,primary_phone:a.primaryPhone,status:a.status},widget:{activator:"#IntercomDefaultWidget"},user_hash:s.user.intercomUserHash}},{update:c}=S();c(l);const d=a.teamMembers.find((e=>e.userId===s.user.id));return m.exports.useEffect((()=>{JSON.stringify(a)===JSON.stringify(ya)&&n(Tt.LAUNCHPAD),JSON.stringify(a)===JSON.stringify(ya)||a.status!==va.CREDIT_HOLD&&!a.resignAgreement||(a.resignAgreement?n(Tt.RESULTS):r===ga.REPORTING_USER?i.open(R(k,{children:[t("credit-hold-text-info-part-one"),p(jt,{variant:"body2",to:Tt.CONTACT,underline:"always",color:"#32DFAB",target:"_blank",rel:"noopener noreferrer",children:t("contact-ets")}),t("credit-hold-text-info-part-two")]}),{severity:"warning"}):n(Tt.BILLING))}),[]),p(th,{columnOne:p(ap,{header:p(Dm,{}),menuItems:[Ku(),Qu()],showGroupLabel:!0,className:sh}),columnTwo:R(m.exports.Suspense,{fallback:p(k,{}),children:[!0===a.receivesMailedDocuments&&(!0===s.user.godmode||(null==d?void 0:d.role)===ga.ADMINISTRATOR)&&p(rh,{clientId:a.id}),!a.resignAgreement&&(null==o?void 0:o.hasOverdueInvoices)&&R("div",{className:oh,children:[p(Vt,{variant:"h6",className:lh,children:t("unpaid-invoices-notice-header")}),R("div",{className:ch,children:[p($t,{variant:"small",className:dh,children:t("unpaid-invoices-notice-p1")}),p($t,{variant:"small",className:dh,children:t("unpaid-invoices-notice-p2")})]})]}),p(Im,{}),p(E,{})]})})},ph=[Lp.PERSONAL,Lp.BUSINESS],uh={accountNumber:"",confirmAccountNumber:"",achAccountType:Mp.CHECKING,achType:Lp.PERSONAL,businessAchAgreement:!1,generalAchAgreement:!1,routingNumber:"",type:Qp.ACH},hh={street:"",city:"",country:"",zip:"",state:"",id:""},vh={number:"",expiryMonth:"",expiryYear:"",type:Qp.CARD,firstName:"",lastName:"",street:"",city:"",country:"",zip:"",state:""},gh={vaultId:0,uri:"",type:"",accountType:"",lastFour:"",cardExpMonth:0,cardExpYear:0,created:new Date,lastModified:new Date,address:{addressId:0,uri:"",address:"",city:"",state:"",country:"",zip:"",created:new Date,lastModified:new Date},id:"",clientCode:0,userPid:0,paymentUserId:0},yh={frequency:tu.NONE,state:iu.INACTIVE},bh=[{label:"All",value:zp.ALL},{label:"Paid",value:zp.PAID},{label:"Unpaid",value:zp.UNPAID},{label:"Pending",value:zp.PENDING}],_h=[{title:"scheduled-payment-daily-title",description:"scheduled-payment-daily-description",value:tu.DAILY},{title:"scheduled-payment-weekly-title",description:"scheduled-payment-weekly-description",value:tu.WEEKLY},{title:"scheduled-payment-monthly-title",description:"scheduled-payment-monthly-description",value:tu.MONTHLY}],Nh={[qp.JANUARY]:"01",[qp.FEBRUARY]:"02",[qp.MARCH]:"03",[qp.APRIL]:"04",[qp.MAY]:"05",[qp.JUNE]:"06",[qp.JULY]:"07",[qp.AUGUST]:"08",[qp.SEPTEMBER]:"09",[qp.OCTOBER]:"10",[qp.NOVEMBER]:"11",[qp.DECEMBER]:"12"},fh=e=>{if(e&&""!==e){const t=e.toString().split(" "),a=t[2],n=t[1];return`${t[3]}-${Nh[n]}-${a}`}return"Invalid Date Format"};var Ch="/assets/calendar.10b060fa.svg";var Sh={container:"BillingToolbar_container_1",filterAndStatusContainer:"BillingToolbar_filterAndStatusContainer_18",dateContainer:"BillingToolbar_dateContainer_52",dateInput:"BillingToolbar_dateInput_62",inputField:"BillingToolbar_inputField_67",calendarIcon:"BillingToolbar_calendarIcon_103",formControlRoot:"BillingToolbar_formControlRoot_109",clearContainer:"BillingToolbar_clearContainer_113",clearButton:"BillingToolbar_clearButton_117"};const xh=({setQueryOptions:e,setSearchNumberForInvoice:t,searchNumberForInvoice:a,status:n,startDate:i,endDate:r})=>{const s=Wt(),[c,d]=m.exports.useState({startDate:!1,endDate:!1}),u={status:"",startDate:null,endDate:null};return R("div",{className:Sh.container,children:[R("div",{className:Sh.filterAndStatusContainer,children:[R("div",{className:Sh.filterContainer,children:[p($t,{children:s("filter")}),p(H,{value:a,onChange:e=>t(e.target.value),className:I(Sh.inputField,Sh.formControlRoot),placeholder:s("search-by-invoice-number")})]}),R("div",{className:Sh.statusContainer,children:[p($t,{children:s("status")}),R(xr,{name:"status",value:n,onChange:t=>e((e=>l(o({},e),{status:t.target.value}))),children:[p(Z,{value:"test",disabled:!0,selected:!0,children:s("choose-a-status")}),bh.map((({label:e,value:t})=>p(Z,{value:t,children:e},t)))]})]})]}),R("div",{className:Sh.dateContainer,children:[R("div",{className:Sh.fromContainer,children:[p($t,{children:s("from-title")}),p(Ce,{dateAdapter:Se,children:p(xe,{componentsProps:{actionBar:{actions:["clear"]}},open:c.startDate,onOpen:()=>d({startDate:!0,endDate:!1}),onClose:()=>d({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:Sh.calendarIcon})},InputAdornmentProps:{className:Sh.inputAdornment},value:i?Ae(i):null,onChange:t=>{e((e=>l(o({},e),{startDate:t?fh(t):null})))},renderInput:e=>p(H,l(o({onClick:()=>d({startDate:!0,endDate:!1}),classes:{root:Sh.formControlRoot},className:I(Sh.inputField,Sh.dateInput),onKeyDown:e=>e.preventDefault()},e),{inputProps:l(o({},e.inputProps),{placeholder:s("date")})}))})})]}),R("div",{className:Sh.toContainer,children:[p($t,{children:s("to-title")}),p(Ce,{dateAdapter:Se,children:p(xe,{componentsProps:{actionBar:{actions:["clear"]}},open:c.endDate,onOpen:()=>d({startDate:!1,endDate:!0}),onClose:()=>d({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:Sh.calendarIcon})},InputAdornmentProps:{className:Sh.inputAdornment},value:r?Ae(r):null,onChange:t=>e((e=>l(o({},e),{endDate:t?fh(t):null}))),renderInput:e=>p(H,l(o({onClick:()=>d({startDate:!1,endDate:!0}),classes:{root:Sh.formControlRoot},className:I(Sh.inputField,Sh.dateInput),onKeyDown:e=>e.preventDefault()},e),{inputProps:l(o({},e.inputProps),{placeholder:s("date")})}))})})]})]}),p("div",{className:Sh.clearContainer,children:p("button",{className:Sh.clearButton,onClick:()=>(t(""),void e((e=>o(o({},e),u)))),children:p($t,{variant:"small",children:s("clear-fields")})})})]})};var Ah="CreditHoldWarning_container_1",Ih="CreditHoldWarning_icon_10";const wh=()=>{const e=Wt();return R("div",{className:Ah,children:[p(Sn,{spriteUrl:ah,className:Ih}),R($t,{children:[e("credit-hold-text-info-part-one"),p(jt,{variant:"body2",to:Tt.CONTACT,underline:"always",color:"inherit",target:"_blank",rel:"noopener noreferrer",children:e("contact-ets")}),e("credit-hold-text-info-part-two")]})]})};const Th=new class{async getAllInvoices({clientId:e,number:t,status:a,startDate:n,endDate:i,start:r,length:s}){const o=ln({number:t,status:a,startDate:n,endDate:i,start:r,length:s}),l=aa.responseHandler(await aa.get(`/clients/${e}/invoices.json`,{params:na(o,ca)}));return na(l,oa)}async getInvoiceDetails({clientCode:e,orderNumber:t}){const a=aa.responseHandler(await aa.get(`/orders/${e}/${t}.json`));return na(a,oa)}async getSamplesForInvoice({clientId:e,batchId:t}){const a=aa.responseHandler(await aa.get(`/clients/${e}/batches/${t}/samples.json`));return na({data:a},oa)}async getAllPaymentMethods({pid:e,clientCode:t}){const a=aa.responseHandler(await aa.get(`/users/${e}/clients/${t}/payment_methods.json`));return na(a,oa)}async getScheduledPayment(e){const t=aa.responseHandler(await aa.get(`/clients/${e}/scheduled_payment.json`));return na(t,oa)}async updateScheduledPayment({clientCode:e,paymentData:t}){const a=aa.responseHandler(await aa.post(`/clients/${e}/scheduled_payment.json`,na(t,ca)));return na(a,oa)}async deletePaymentMethod({userPid:e,clientCode:t,id:a}){const n=aa.responseHandler(await aa.delete(`/users/${e}/clients/${t}/payment_methods/${a}.json`));return na(n,oa)}async createCreditCardPayment(e){const t=c(e,[]),{userPid:a,clientCode:n,number:i,expiryMonth:r,expiryYear:s,type:l,firstName:d,lastName:m}=t,p=c(t,["userPid","clientCode","number","expiryMonth","expiryYear","type","firstName","lastName"]),u={paymentObject:{number:i,expiryMonth:"object"==typeof r?r.getMonth()+1:r.split("-")[1],expiryYear:s,type:l,firstName:d,lastName:m},billingAddress:o({},p)},h=aa.responseHandler(await aa.post(`/users/${a}/clients/${n}/payment_methods.json`,na(o({},u),ca)));return na(h,oa)}async createAchCardPayment(e){const t=c(e,[]),{userPid:a,clientCode:n,routingNumber:i,accountNumber:r,achAccountType:s,achType:l,type:d}=t,m=(c(t,["userPid","clientCode","routingNumber","accountNumber","achAccountType","achType","type"]),{paymentObject:{routingNumber:i,accountNumber:r,achAccountType:s,achType:l,type:d}}),p=aa.responseHandler(await aa.post(`/users/${a}/clients/${n}/payment_methods.json`,na(o({},m),ca)));return na(p,oa)}async createOrder(e){const t=aa.responseHandler(await aa.post("/orders.json",na(e,ca)));return na(t,oa)}async createInvoiceReport({recipients:e,invoices:t}){const a=aa.responseHandler(await aa.post("/finance_reports.json",na({recipients:e,invoices:t},ca)));return na(a,oa)}async payInvoices(e){const t=aa.responseHandler(await aa.post(`/order/${e.orderId}/payments/${e.paymentMethodId}.json`,na(e,ca)));return na(t,oa)}},Rh=()=>{const e=Wt(),t=m.exports.useContext(Na),a=f();return x(Th.getSamplesForInvoice,{onSuccess:e=>{console.log("Get samples from invoice",e),a(Q(Tt.SAMPLE_DETAILS,{batchId:e.data[0].reportBatchId,sampleId:e.data[0].id.toString()}),{state:{number:e.data[0].id.toString()}})},onError:a=>{console.error("Get samples from invoice error",a),t.open(fa(a,e("get-samples-for-invoice-error")),{severity:"error"})}})};var kh="ReportBatchCard_container_1";const Eh=({noRowsLabel:e})=>p("div",{className:kh,children:p($t,{variant:"standard",children:e})}),Mh=(e,t)=>`https://webapi.etslabs.com//clients/${e}/orders/${t}/receipt`;var Dh="InvoiceStatus_container_1",Ph="InvoiceStatus_unpaidBackgroun
1d_6",Lh="InvoiceStatus_paidBackground_10",Bh="InvoiceStatus_pendingBackground_14",Oh="InvoiceStatus_text_18",Fh="InvoiceStatus_unpaidText_23",Hh="InvoiceStatus_paidText_27",Uh="InvoiceStatus_pendingText_31";const zh=({status:e})=>p("div",{className:I(Dh,{[Lh]:e===Fp.PAID,[Ph]:e===Fp.UNPAID,[Bh]:e===Fp.PENDING}),children:p($t,{variant:"small",className:I(Oh,{[Hh]:e===Fp.PAID,[Fh]:e===Fp.UNPAID,[Uh]:e===Fp.PENDING}),children:e.toLowerCase()})});var Gh={container:"InvoiceCardMobileAndTablet_container_1",invoice:"InvoiceCardMobileAndTablet_invoice_9",labelAndText:"InvoiceCardMobileAndTablet_labelAndText_15",label:"InvoiceCardMobileAndTablet_label_15",downloadLinks:"InvoiceCardMobileAndTablet_downloadLinks_22",link:"InvoiceCardMobileAndTablet_link_26"};const qh=({invoice:e,client:t,setSelectedInvoices:a,selectedInvoices:n,viewSample:i,userRole:r})=>{const s=n.some((({batchNumber:t})=>t===e.invoiceNumber)),{showNewMessage:o}=S();return R("div",{className:Gh.container,children:[R("div",{className:Gh.invoice,children:[R("div",{className:Gh.invoice,onClick:i,children:[p($t,{children:e.invoiceNumber}),p(zh,{status:e.status}),R("div",{className:Gh.labelAndText,children:[R($t,{className:Gh.label,children:[G("date-issued"),":"]}),p($t,{className:Gh.text,children:e.dateIssued})]}),R("div",{className:Gh.labelAndText,children:[R($t,{className:Gh.label,children:[G("amount"),":"]}),p($t,{className:Gh.text,children:e.totalAmount})]}),R("div",{className:Gh.labelAndText,children:[R($t,{className:Gh.label,variant:"standardSemiBold",children:[G("amount-due"),":"]}),p($t,{className:Gh.text,variant:"standardSemiBold",children:e.amountDue})]})]}),R("div",{className:Gh.downloadLinks,children:[e.isOfflineInvoice||e.docType==ou.FINANCE_CHARGE?p("a",{className:Gh.link,onClick:()=>o(`I would like to request a copy of service charge invoice #${e.invoiceNumber} for ${t.name}. Thank you!`),download:!0,children:p($t,{children:"Contact ETS For Invoice"})}):p("a",{className:Gh.link,href:cu(t.id||null,e.invoiceNumber,Su.BILLING),download:!0,children:p($t,{children:G("invoice")})}),r!==ga.BILLING_USER&&!e.isOfflineInvoice&&t.status!==va.CREDIT_HOLD&&e.docType!==ou.FINANCE_CHARGE&&p("a",{className:Gh.link,href:cu(t.id||null,e.invoiceNumber,Su.EREPORT),download:!0,children:p($t,{children:G("lab-report")})}),(e.status===Fp.PAID||e.status===Fp.PENDING)&&null!==e.orderNumber&&p("a",{className:Gh.link,href:Mh(t.id||null,e.orderNumber.toString()),children:p($t,{children:G("receipt")})})]})]}),p("div",{className:Gh.action,children:e.status===Fp.UNPAID&&p(ue,{onClick:()=>{if(s){const t=n.findIndex((({batchNumber:t})=>t===e.invoiceNumber));a([...n.slice(0,t),...n.slice(t+1)])}else a((t=>[...t,{orderNumber:e.orderNumber,batchNumber:e.invoiceNumber,price:e.amountDue,docType:e.docType}]))},checked:s})})]})};var Wh="InvoiceCardListMobileAndTablet_container_1";const Vh=({invoices:e,setQueryOptions:t,setSelectedInvoices:a,selectedInvoices:n,length:i,start:r,numberOfInvoices:s,client:o,userRole:l})=>{const c=Wt(),{mutateAsync:d}=Rh(),u=m.exports.useContext(Na);return p("div",{className:Wh,children:0===e.length?p(Eh,{noRowsLabel:c("no-invoices")}):p(k,{children:e.map((e=>p(qh,{userRole:l,viewSample:()=>(async e=>{e.docType==ou.FINANCE_CHARGE?u.open("This item is a service charge for past-due invoices. Past-due invoices incurr a 2%, per month, service charge. For more information please contact our accounting team at: (707) 302-1057"):l!==ga.BILLING_USER&&o.status!==va.CREDIT_HOLD&&!0!==e.isOfflineInvoice&&await d({clientId:o.id,batchId:e.invoiceNumber})})(e),invoice:e,client:o,setSelectedInvoices:a,selectedInvoices:n},e.invoiceNumber)))})})};var Yh,jh;(jh=Yh||(Yh={})).INVOICE_NUMBER="invoiceNumber",jh.DATE_ISSUED="dateIssued",jh.STATUS="status",jh.AMOUNT_DUE="amountDue",jh.INVOICE_AMOUNT="totalAmount";var $h=Yh;var Qh="InvoicesColumns_downloadLinksContainer_1",Kh="InvoicesColumns_tableHeaderTruncate_13";var Xh="/assets/arrowLeft.e0860c36.svg";var Zh="PaginationMobile_container_1",Jh="PaginationMobile_cardsPerPage_7",ev="PaginationMobile_pages_10",tv="PaginationMobile_icon_15",av="PaginationMobile_disabled_20";const nv=({totalItems:e,cardsPerPage:t,cardsPerPageOptions:a,onCardsPerPageChange:n,onGoPreviousPage:i,onGoNextPage:r,currentPage:s})=>
1{const o=Wt(),l=Math.ceil(e/t),c=s>1,d=s<l;return e<1?null:R("div",{className:Zh,children:[p(X,{variant:"standard",className:Jh,disableUnderline:!0,value:t,onChange:e=>n(Number(e.target.value)),children:a.map((e=>p(Z,{value:e,children:e},e)))}),R("div",{className:ev,children:[p(Sn,{spriteUrl:Xh,className:I(tv,{[av]:!c}),onClick:()=>c&&i()}),R($t,{children:[s,"Â ",o("of"),"Â ",l]}),p(Sn,{spriteUrl:nr,className:I(tv,{[av]:!d}),onClick:()=>d&&r()})]})]})},iv=e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getAllInvoices",e],(()=>Th.getAllInvoices(e)),{keepPreviousData:!1,onSuccess:e=>{console.log("Get all invoices",e)},onError:e=>{console.error("Get all invoices error",e),a.open(fa(e,t("get-all-invoices-error")),{severity:"error"})}})},rv=e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getAllPaymentMethods"],(()=>Th.getAllPaymentMethods({pid:e.pid,clientCode:e.clientCode})),{keepPreviousData:!1,onSuccess:e=>{console.log("Get all payment methods",e)},onError:e=>{console.error("Get all payment methods error",e),a.open(fa(e,t("get-all-payment-methods-error")),{severity:"error"})}})};var sv="/assets/tooltipIcon.d28883f5.svg";const ov=e=>"$"+e.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),lv=e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getScheduledPayment"],(()=>Th.getScheduledPayment(e)),{keepPreviousData:!1,staleTime:500,onSuccess:e=>{console.log("Get scheduled payment",e)},onError:e=>{console.error("Get scheduled payment error",e),a.open(fa(e,t("get-scheduled-payment-method-error")),{severity:"error"})}})};var cv={balanceContainer:"AccountBalance_balanceContainer_1",header:"AccountBalance_header_8",numSelectedInvoices:"AccountBalance_numSelectedInvoices_13",selectPaymentMethod:"AccountBalance_selectPaymentMethod_19",paymentActions:"AccountBalance_paymentActions_24",paymentButtons:"AccountBalance_paymentButtons_29",paddingTop30:"AccountBalance_paddingTop30_34",noPaymentOptionSelected:"AccountBalance_noPaymentOptionSelected_37",selectedInvoicesContainer:"AccountBalance_selectedInvoicesContainer_40",selectedInvoiceHeader:"AccountBalance_selectedInvoiceHeader_49",selectedInvoiceRow:"AccountBalance_selectedInvoiceRow_56",selectedInvoicesBalance:"AccountBalance_selectedInvoicesBalance_62",noSelectedInvoices:"AccountBalance_noSelectedInvoices_73",buttonsContainer:"AccountBalance_buttonsContainer_80",cta:"AccountBalance_cta_92",arrowRightIcon:"AccountBalance_arrowRightIcon_99",paymentSettingsContainer:"AccountBalance_paymentSettingsContainer_104",placeholderText:"AccountBalance_placeholderText_109",collectionSelectedText:"AccountBalance_collectionSelectedText_114",borderBottom:"AccountBalance_borderBottom_129","MuiInput-underline":"AccountBalance_MuiInput-underline_137",toolTipIcon:"AccountBalance_toolTipIcon_141",autoPayContainer:"AccountBalance_autoPayContainer_148",statusHeader:"AccountBalance_statusHeader_153",statusActive:"AccountBalance_statusActive_160",statusInActive:"AccountBalance_statusInActive_165",configHeader:"AccountBalance_configHeader_170",configDetail:"AccountBalance_configDetail_175",autoPayButton:"AccountBalance_autoPayButton_180",helpText:"AccountBalance_helpText_185"};const dv=({balance:e,selectedInvoices:t,invoices:a})=>{var n,i,r;const s=Wt(),o=f(),[l,c]=m.exports.useState(gh),{activeClient:d,authenticatedUser:u}=m.exports.useContext(_a),{data:h}=rv({pid:u.user.pid,clientCode:null!=(n=null==d?void 0:d.code)?n:""}),{data:v}=lv(null!=(i=null==d?void 0:d.code)?i:""),{data:g}=iv({clientId:null!=(r=null==d?void 0:d.id)?r:0,number:"",status:zp.ALL,startDate:"",endDate:"",start:1,length:0}),{mutateAsync:y,isLoading:b}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(Th.createOrder,{onSuccess:e=>{console.log("Create order success",e)},onError:a=>{console.error("Create order error",a),t.open(fa(a,e("create-order-error")),{severity:"error"})}})})(),{mutateAsync:_,isLoading:N}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(Th.payInvoices,{onSuccess:e=>{a.invalidateQueries({queryKey:["getAllInvoices"]}),console.log("Pay invoice success",e)},onError:a=>{console.error("Pay invoice error",a),t.open(fa(a,e("pay-invoice-error")),{severity:"error"})}})})(),S=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),A=null==t?void 0:t.reduce(((e,{price:t})=>e+Number(t.replace("$","").replace(".00",""))),0);return R(k,{children:[R("div",{className:cv.balanceContainer,children:[p("div",{children:p(Vt,{variant:"h5",children:"Make a Payment"})}),p("div",{children:p(Vt,{variant:"h6",children:"Selected Invoices:"})}),R("div",{className:cv.selectedInvoicesContainer,children:[R("div",{className:cv.selectedInvoiceHeader,children:[p("span",{children:"Invoice No"}),p("span",{children:"Amount Due"})]}),t.length>0?R(k,{children:[null==t?void 0:t.map((e=>R("div",{className:cv.selectedInvoiceRow,children:[p("span",{children:e.batchNumber}),p("span",{children:e.price})]},e.batchNumber))),R("div",{className:cv.selectedInvoicesBalance,children:[p(Vt,{variant:"h6",children:s("total")}),p("span",{className:cv.numSelectedInvoices,children:`${S.format(A)}`})]})]}):p("span",{className:cv.noSelectedInvoices,children:s("no-invoices-selected")})]}),h&&(null==h?void 0:h.length)>0&&R("div",{className:cv.selectPaymentMethod,children:[p(me,{title:s("select-payment-method-description"),placement:"right",children:p("span",{children:R(Vt,{variant:"h6",className:cv.paymentMethodsTitle,children:[s("select-payment-method"),p(Sn,{className:cv.toolTipIcon,spriteUrl:sv})]})})}),p(xr,{label:"payment-methods-select",name:"id",style:cv.borderBottom,onChange:e=>{const t=null==h?void 0:h.find((({id:t})=>t===Number(e.target.value)));var a;
1(a=t)&&c(a)},value:l.id.toString(),children:null==h?void 0:h.map((({id:e,lastFour:t,accountType:a})=>p(Z,{sx:{textTransform:"capitalize"},value:e,children:p($t,{variant:"standard",className:cv.collectionSelectedText,children:`${a.toLowerCase()} ****${t}`})},e)))})]}),p("div",{className:I(cv.paymentActions),children:h&&0===(null==h?void 0:h.length)?R("div",{className:I(cv.paymentButtons,cv.paddingTop30),children:[p(P,{fullWidth:!0,variant:"contained",color:"primary",onClick:()=>o(Tt.PAYMENT_METHODS),children:s("add-payment-method")}),p($t,{variant:"small",children:s("add-payment-method-description")})]}):R("div",{className:I(""===l.id?cv.noPaymentOptionSelected:cv.paymentButtons),children:[p(bi,{loading:t.length>0&&b||t.length>0&&N,fullWidth:!0,color:"primary",variant:"contained",onClick:async()=>{var e,a;const n=t.map((({batchNumber:e,price:t,docType:a})=>({invoiceNumber:e,batchNumber:e,docType:a,price:"string"==typeof t?Number(t.replace("$","").replace(".00","")):t}))),i=await y({order:{userPid:u.user.pid,clientCode:null!=(e=null==d?void 0:d.code)?e:"",lineItemsAttributes:n}}),r={orderId:i.orderNumber.toString(),paymentMethodId:l.id.toString(),userPid:u.user.pid,clientCode:null!=(a=null==d?void 0:d.code)?a:""};(await _(r)).state===Yp.SUCCESSFUL&&window.localStorage.removeItem(`${null==d?void 0:d.id}_selectedInvoices`),o(Tt.RECEIPT,{state:{selectedInvoices:t,paymentCard:l,orderInfo:i}})},className:I(t.length>0?"":cv.noPaymentOptionSelected),disabled:t.length<=0||""===l.id||0===t.length&&b||0===t.length&&N,children:s("pay-selected-invoices")}),p(bi,{loading:0===t.length&&b||0===t.length&&N,fullWidth:!0,color:"tertiary",variant:"contained",className:I(0===t.length?"":cv.noPaymentOptionSelected),onClick:async()=>{var e,a,n;const i=null==g?void 0:g.data,r=null==i?void 0:i.filter((e=>e.status===Fp.UNPAID)),s=null!=(e=null==r?void 0:r.map((({invoiceNumber:e,nakedBalance:t,docType:a})=>({invoiceNumber:e,batchNumber:e,price:t,docType:a}))))?e:[],c=await y({order:{userPid:u.user.pid,clientCode:null!=(a=null==d?void 0:d.code)?a:"",lineItemsAttributes:s}}),m={orderId:c.orderNumber.toString(),paymentMethodId:l.id.toString(),userPid:u.user.pid,clientCode:null!=(n=null==d?void 0:d.code)?n:""};(await _(m)).state===Yp.SUCCESSFUL&&window.localStorage.removeItem(`${null==d?void 0:d.id}_selectedInvoices`),o(Tt.RECEIPT,{state:{selectedInvoices:t,paymentCard:l,orderInfo:c}})},disabled:""===l.id||t.length>0&&b||t.length>0&&N,children:s("pay-entire-balance",{balanceToBePaid:ov(Number(e))})}),p($t,{variant:"small",className:I(0===t.length?cv.helpText:cv.noPaymentOptionSelected),children:s("pay-entire-balance-description")})]})})]}),R("div",{className:cv.balanceContainer,children:[p("div",{children:p(me,{title:s("autopay-description"),placement:"bottom",children:p("span",{children:R(Vt,{variant:"h5",children:["Automatic Payments",p(Sn,{className:cv.toolTipIcon,spriteUrl:sv})]})})})}),R("div",{className:cv.autoPayContainer,children:[R("div",{className:cv.statusHeader,children:[p("svg",{className:"ACTIVE"===(null==v?void 0:v.state)?cv.statusActive:cv.statusInActive,children:p("use",{href:"/src/assets/icons/statusDot.svg#icon"})}),R("h5",{children:["AutoPay is ",null==v?void 0:v.state]})]}),R("div",{children:[p("span",{className:cv.configHeader,children:"Billing Cycle: "}),p("span",{className:cv.configDetail,children:null==v?void 0:v.frequency})]}),R("div",{children:[p("span",{className:cv.configHeader,children:"Current Balance: "}),p("span",{className:cv.configDetail,children:ov(Number(e))})]})]}),p("div",{className:I(cv.buttonsContainer,cv.paymentSettingsContainer),children:p(P,{className:I(cv.cta,cv.autoPayButton),variant:"contained",color:"secondary",onClick:()=>o(Tt.PAYMENT_METHODS),endIcon:p(Sn,{className:cv.arrowRightIcon,spriteUrl:nr}),children:s("enroll-in-autopay")})})]}),p("div",{className:I(cv.buttonsContainer,cv.paymentSettingsContainer),children:p(P,{className:cv.cta,variant:"contained",color:"secondary",onClick:()=>o(Tt.PAYMENT_METHODS),endIcon:p(Sn,{className:cv.arrowRightIcon,spriteUrl:nr}),children:s("payment-methods")})})]})};var mv="BillingAndReportsAside_balanceAndButtonsContainer_1",pv="BillingAndReportsAside_viewAsOptionsButtons_17",uv="BillingAndReportsAside_buttonGroup_30",hv="BillingAndReportsAside_button_30";const vv=({viewType:e,handleSetSidebarViewType:t,children:a})=>{Wt();const{authenticatedUser:n}=m.exports.useContext(_a),{user:{administrator:i}}=n;return R("div",{className:mv,children:[i?p("div",{className:pv,children:R(Ie,{className:uv,children:[p(P,{className:hv,variant:"contained",color:e===lu.PAYMENTS?"primary":"secondary",onClick:()=>t(lu.PAYMENTS),children:p($t,{children:p(me,{arrow:!0,title:"Search for sample names and descriptions. Use the Analysis tab to search using the name of specific analyses.",children:p("span",{children:lu.PAYMENTS})})})}),p(P,{variant:"contained",color:e===lu.REPORTS?"primary":"secondary",className:hv,onClick:()=>t(lu.REPORTS),children:p($t,{children:lu.REPORTS})})]})}):null,a]})};var gv={balanceContainer:"InvoiceAndReceiptReport_balanceContainer_1",header:"InvoiceAndReceiptReport_header_9",numSelectedInvoices:"InvoiceAndReceiptReport_numSelectedInvoices_14",selectPaymentMethod:"InvoiceAndReceiptReport_selectPaymentMethod_20",paymentActions:"InvoiceAndReceiptReport_paymentActions_25",paymentButtons:"InvoiceAndReceiptReport_paymentButtons_30",paddingTop30:"InvoiceAndReceiptReport_paddingTop30_35",noPaymentOptionSelected:"InvoiceAndReceiptReport_noPaymentOptionSelected_38",selectedInvoicesContainer:"InvoiceAndReceiptReport_selectedInvoicesContainer_41",row:"InvoiceAndReceiptReport_row_49",cell:"InvoiceAndReceiptReport_cell_56",selectedInvoiceHeader:"InvoiceAndReceiptReport_selectedInvoiceHeader_65",selectedInvoiceRow:"InvoiceAndReceiptReport_selectedInvoiceRow_72",fullWidthRow:"InvoiceAndReceiptReport_fullWidthRow_78",noInvoicesSelected:"InvoiceAndReceiptReport_noInvoicesSelected_83",selectedInvoicesCount:"InvoiceAndReceiptReport_selectedInvoicesCount_88",numSelectedInvoicesTooMany:"InvoiceAndReceiptReport_numSelectedInvoicesTooMany_105",noSelectedInvoices:"InvoiceAndReceiptReport_noSelectedInvoices_111",toolTipIcon:"InvoiceAndReceiptReport_toolTipIcon_117",collectionSelectedText:"InvoiceAndReceiptReport_collectionSelectedText_123",resetButton:"InvoiceAndReceiptReport_resetButton_131"};const yv=({invoicesForReport:e,handleResetReportInvoices:t})=>{m.exports.useContext(_a);const{authenticatedUser:a}=m.exports.useContext(_a),n=m.exports.useContext(Na);ga.ADMINISTRATOR,ga.FULL_USER,ga.BILLING_USER;const i=[a.user],[r,s]=m.exports.useState(""),{mutateAsync:o,isSuccess:l,isError:c,isLoading:d}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(Th.createInvoiceReport,{onSuccess:e=>{console.log("Invoice report sent, success",e)},onError:a=>{console.error("Invoice report error",a),t.open(fa(a,e("create-order-error")),{severity:"error"})}})})();m.exports.useEffect((()=>{l&&(n.open(`The Selected Invoices Have Been Sent to ${r}`,{severity:"success"}),s(""),t())}),[l]);return R("div",{className:gv.balanceContainer,children:[p("div",{children:p("h3",{children:"Send invoices to email"})}),R("div",{className:gv.selectedInvoicesContainer,children:[R("div",{className:I(gv.row,gv.header),children:[p("span",{className:gv.cell,children:"Invoice No"}),p("span",{className:gv.cell,children:"Issue Date"}),p("span",{className:gv.cell,children:"Amount Due"})]}),e.length>0?R(k,{children:[null==e?void 0:e.map((e=>R("span",{className:gv.row,children:[p("span",{className:gv.cell,children:e.invoiceNumber}),p("span",{className:gv.cell,children:e.dateIssued}),p("span",{className:gv.cell,children:e.price})]},e.invoiceNumber))),p("div",{className:gv.fullWidthRow,children:R("span",{className:e.length<=20?gv.numSelectedInvoices:gv.numSelectedInvoicesTooMany,children:["(Max limit of 20 per email): ",e.length,"/20"]})})]}):p("span",{className:gv.noInvoicesSelected,children:"No invoices selected"})]}),R("div",{children:[p(me,{title:"Select who will receive this report",placement:"left",children:p("span",{children:R(Vt,{variant:"h6",className:gv.paymentMethodsTitle,children:["Select Report Recipient",p(Sn,{className:gv.toolTipIcon,spriteUrl:sv})]})})}),p(xr,{name:"recipients",disabled:0===(null==i?void 0:i.length),label:"invoices-report-recipient",value:r,style:gv.borderBottom,onChange:e=>{return t=e.target.value,void s(t);var t},children:null==i?void 0:i.map((({email:e,id:t})=>p(Z,{value:e,children:p($t,{variant:"standard",className:gv.collectionSelectedText,children:e})},t)))})]}),e.length>0&&r.length>3&&p(bi,{loading:d,fullWidth:!0,color:"primary",variant:"contained",onClick:()=>{const t={invoices:e.map((e=>e.invoiceNumber)),recipients:[r]};o(t)},children:"Send Invoices"}),p("div",{className:gv.resetButton,onClick:()=>{s(""),t(),n.open("Send Invoices Form Has Been Reset",{severity:"success"})},children:"Reset All Selections"})]})};var bv="Invoices_container_1",_v="Invoices_tableContainer_12",Nv="Invoices_buttonContainer_16";const fv=({invoices:e,balance:t,numberOfInvoices:a,isFetched:n,start:i,length:r,setQueryOptions:s,client:c})=>{const d=Wt(),u=m.exports.useContext(Na),v=f(),g=h(),y=A(g.breakpoints.up("lg")),b=Bm(),[_,N]=Yr([],`${null==c?void 0:c.id}_selectedInvoices`);Rh();const[C,x]=m.exports.useState(lu.PAYMENTS),[I,w]=m.exports.useState([]),T=(e=>{const t=Wt(),a=Bm(),{showNewMessage:n}=S();return[{field:$h.INVOICE_NUMBER,renderHeader:()=>p(me,{title:t("invoice-number"),children:p("div",{children:p(Vt,{variant:"h6",className:Kh,children:t("invoice-number")})})}),flex:1,sortable:!0},{field:$h.DATE_ISSUED,renderHeader:()=>p(me,{title:t("issue-date"),children:p("div",{children:p(Vt,{variant:"h6",className:Kh,children:t("issue-date")})})}),flex:1,sortable:!0,valueFormatter:e=>new Date(e.value).getTime(),renderCell:({row:e})=>p($t,{children:e.dateIssued})},{field:$h.INVOICE_AMOUNT,renderHeader:()=>p(me,{title:t("amount"),children:p("div",{children:p(Vt,{variant:"h6",className:Kh,children:t("amount")})})}),flex:1,sortable:!0},{field:$h.AMOUNT_DUE,renderHeader:()=>p(me,{title:t("amount-due"),children:p("div",{children:p(Vt,{variant:"h6",className:Kh,children:t("amount-due")})})}),flex:1,sortable:!0},{field:$h.STATUS,renderHeader:()=>p(me,{title:t("status"),children:p("div",{children:p(Vt,{variant:"h6",className:Kh,children:t("status")})})}),renderCell:({row:e})=>p(zh,{status:e.status}),flex:1,sortable:!0},{field:"download",renderHeader:()=>p(me,{title:t("download"),children:p("div",{children:p(Vt,{variant:"h6",className:Kh,children:t("download")})})}),flex:2,sortable:!1,renderCell:({row:i})=>i.docType==ou.FINANCE_CHARGE?R("div",{className:Qh,children:[p("a",{onClick:()=>n(`I would like to request a copy of service charge invoice # ${i.invoiceNumber} for ${e.name}
1. Thank you!`),download:!0,children:p($t,{children:"Contact for Invoice"})}),(i.status===Fp.PAID||i.status===Fp.PENDING)&&null!==i.orderNumber&&p("a",{href:Mh(e.id||null,i.orderNumber),children:p($t,{children:t("receipt")})})]}):i.isOfflineInvoice?R("div",{className:Qh,children:[p("a",{onClick:()=>n(`I would like to request a copy of invoice # ${i.invoiceNumber} for ${e.name}. Thank you!`),download:!0,children:p($t,{children:"Contact for Invoice"})}),(i.status===Fp.PAID||i.status===Fp.PENDING)&&null!==i.orderNumber&&p("a",{href:Mh(e.id||null,i.orderNumber),children:p($t,{children:t("receipt")})})]}):R("div",{className:Qh,children:[p("a",{href:cu(e.id||null,i.invoiceNumber,Su.BILLING),download:!0,children:p($t,{children:t("invoice")})}),a!==ga.BILLING_USER&&e.status!==va.CREDIT_HOLD&&p("a",{href:cu(e.id||null,i.invoiceNumber,Su.EREPORT),download:!0,children:p($t,{children:t("lab-report")})}),(i.status===Fp.PAID||i.status===Fp.PENDING)&&null!==i.orderNumber&&p("a",{href:Mh(e.id||null,i.orderNumber),children:p($t,{children:t("receipt")})})]})}]})(c);return R("div",{className:bv,children:[y&&p("div",{className:_v,children:p(Lu,{setSelectedInvoices:C===lu.PAYMENTS?N:w,selectedInvoices:C===lu.PAYMENTS?_:I,setQueryOptions:s,checkboxSelection:!0,rowCount:a,isLoading:!n,pageSize:r,page:i,clickableRows:b!==ga.BILLING_USER,rows:e||[],showPagination:!0,columns:T,getRowId:e=>e.invoiceNumber,paymentsAsideViewType:C,onRowClick:({field:e,row:t})=>{t.docType==ou.FINANCE_CHARGE&&"__check__"!==e&&"download"!==e?u.open("This item is a service charge for past-due invoices. Past-due invoices incurr a 2%, per month, service charge. For more information please contact our accounting team at: (707) 302-1057"):"__check__"!==e&&"download"!==e&&b!==ga.BILLING_USER&&c.status!==va.CREDIT_HOLD&&!0!==t.isOfflineInvoice&&v(Tt.RESULTS,{state:{batchId:t.invoiceNumber}})},noRowsLabel:d("no-invoices")})}),p(vv,{handleSetSidebarViewType:e=>{x(e)},viewType:C,children:C===lu.PAYMENTS?p(dv,{balance:null!=t?t:"",invoices:e,selectedInvoices:_}):p(yv,{invoicesForReport:I,handleResetReportInvoices:()=>{w([])}})}),!y&&R(k,{children:[p(Vh,{client:c,userRole:b,start:i,length:r,numberOfInvoices:a,invoices:e,setQueryOptions:s,setSelectedInvoices:N,selectedInvoices:_}),p(nv,{totalItems:a,currentPage:i,cardsPerPage:r,cardsPerPageOptions:[50,100],onCardsPerPageChange:e=>{s((t=>l(o({},t),{start:1,length:e})))},onGoPreviousPage:()=>{s((e=>l(o({},e),{start:e.start-1})))},onGoNextPage:()=>{s((e=>l(o({},e),{start:e.start+1})))}}),p("div",{className:Nv,children:!n&&p($t,{variant:"standard",children:d("loading-more-results")})})]})]})};var Cv={container:"Billing_container_1"};const Sv=()=>{var e,t,a,n;const{activeClient:i}=m.exports.useContext(_a),[r,s]=m.exports.useState({clientId:null!=(e=null==i?void 0:i.id)?e:0,number:"",status:zp.ALL,startDate:"",endDate:"",start:1,length:50}),[c,d]=m.exports.useState(r.number),[u,h]=m.exports.useState(!1),v=Qt(c,1e3);m.exports.useEffect((()=>{u?s(l(o({},r),{number:c})):h(!0)}),[v]);const{data:g,isFetched:y}=iv(r);return R("div",{className:Cv.container,children:[p("div",{className:Cv.header,children:p(Vt,{variant:"h4",children:G("billing-title")})}),R("main",{children:[(null==i?void 0:i.status)===va.CREDIT_HOLD&&p(wh,{}),p(xh,l(o({},r),{setQueryOptions:s,searchNumberForInvoice:c,setSearchNumberForInvoice:d})),p(fv,l(o({invoices:null!=(t=null==g?void 0:g.data)?t:[],balance:null!=(a=null==g?void 0:g.balance)?a:"",numberOfInvoices:null!=(n=null==g?void 0:g.recordsTotal)?n:0,isFetched:y},r),{setQueryOptions:s,client:i}))]})]})};var xv="/assets/addCircleIcon.eaed25b1.svg";var Av={container:"ACHPaymentForm_container_1",buttonContainer:"ACHPaymentForm_buttonContainer_6",errorText:"ACHPaymentForm_errorText_12",formContainer:"ACHPaymentForm_formContainer_17",formContainerHeader:"ACHPaymentForm_formContainerHeader_22",formStepNumber:"ACHPaymentForm_formStepNumber_27",form:"ACHPaymentForm_form_17",inputContainer:"ACHPaymentForm_inputContainer_39",radioContainer:"ACHPaymentForm_radioContainer_53",formWithLegalBox:"ACHPaymentForm_formWithLegalBox_58",legalContainer:"ACHPaymentForm_legalContainer_68",checkboxContainer:"ACHPaymentForm_checkboxContainer_77",agreement:"ACHPaymentForm_agreement_82",legalText:"ACHPaymentForm_legalText_91"};const Iv=({handleCloseNewPaymentMethodForm:e})=>{const t=Wt(),{authenticatedUser:a,activeClient:n}=m.exports.useContext(_a),{mutateAsync:i,isSuccess:r}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(Th.createAchCardPayment,{onSuccess:e=>{a.invalidateQueries("getAllPaymentMethods"),console.log("Create ach payment method",e)},onError:a=>{console.error("Create ach payment method error",a),t.open(fa(a,e("create-ach-payment-method-error")),{severity:"error"})}})})(),s=z().shape({routingNumber:Ni(t("field-error-required",{field:t("routing-number")})),accountNumber:Ni(t("field-error-required",{field:t("account-number")})),confirmAccountNumber:U().label(t("confirm-account-number")).required().oneOf([we("accountNumber"),null],t("account-number-match-error")),generalAchAgreement:Te().oneOf([!0],"Field must be checked"),businessAchAgreement:Te().oneOf([!0],"Field must be checked")});return m.exports.useEffect((()=>{r&&e()}),[r]),p(q,{initialValues:uh,onSubmit:e=>i(l(o({},e),{userPid:a.user.pid,clientCode:null==n?void 0:n.code})),validationSchema:s,validateOnBlur:!0,enableReinitialize:!0,children:({isValid:n,handleChange:i,handleBlur:r,errors:s,touched:o,values:l,setFieldValue:c,dirty:d,isSubmitting:m})=>p(W,{children:R("div",{className:Av.container,children:[R("div",{className:Av.formContainer,children:[R("div",{className:Av.formContainerHeader,children:[p($t,{className:Av.formStepNumber,children:"2"}),p($t,{children:t("enter-ach-account-information")})]}),R("div",{className:Av.form,children:[R("div",{className:Av.inputContainer,children:[p(di,{name:"routingNumber",placeholder:t("routing-number"),value:l.routingNumber,onChange:i,onBlur:r,errorMessage:s.routingNumber,error:!!s.routingNumber&&o.routingNumber,type:"text",disabled:a.user.godmode}),p(xr,{name:"achType",onChange:i,disabled:a.user.godmode,value:l.achType,children:null==ph?void 0:ph.map((e=>p(Z,{sx:{textTransform:"capitalize"},value:e,className:Av.selectText,children:t(e)},e)))}),p(di,{name:"accountNumber",placeholder:t("account-number"),value:l.accountNumber,onChange:i,onBlur:r,errorMessage:s.accountNumber,error:!!s.accountNumber&&o.accountNumber,type:"text",disabled:a.user.godmode}),p(di,{name:"confirmAccountNumber",placeholder:t("confirm-account-number"),value:l.confirmAccountNumber,onChange:i,onBlur:r,errorMessage:s.confirmAccountNumber,error:!!s.confirmAccountNumber&&o.confirmAccountNumber,type:"text",disabled:a.user.godmode})]}),p("div",{className:Av.radioContainer,children:p(K,{disabled:a.user.godmode,children:R(Re,{className:Av.container,value:l.achAccountType,children:[p(pe,{value:Mp.CHECKING,onChange:()=>{c("achAccountType",Mp.CHECKING)},control:p(ke,{}),label:Mp.CHECKING}),p(pe,{value:Mp.SAVINGS,onChange:()=>{c("achAccountType",Mp.SAVINGS)},control:p(ke,{}),label:Mp.SAVINGS})]})})})]})]}),R("div",{className:Av.formContainer,children:[R("div",{className:Av.formContainerHeader,children:[p($t,{className:Av.formStepNumber,children:"3"}),p($t,{children:t("ets-client-agreement")})]}),p("div",{className:Av.formWithLegalBox,children:R("div",{className:Av.legalContainer,children:[p(Vt,{variant:"h6",color:"primary",children:t("terms-conditions-ach-agreement")}),R("div",{className:Av.agreement,children:[p(Vt,{variant:"h6",children:t("terms-conditions-ach-agreement")}),p("div",{className:Av.legalText,children:p($t,{children:p(mn,{html:t("terms-conditions-ach-agreement-text")})})})]}),p("div",{className:Av.checkboxContainer,children:R(Ee,{children:[p(pe,{onBlur:r,name:"generalAchAgreement",value:l.generalAchAgreement,onChange:i,control:p(ue,{required:!0}),label:R($t,{variant:"small",children:[t("terms-of-service-text"),p(jt,{variant:"small",to:Tt.TERMS_AND_CON
1DITIONS_AND_CREDIT_AGREEMENT,underline:"none",color:"primary",target:"_blank",rel:"noopener noreferrer",children:t("terms-of-service-label")})]})}),o.generalAchAgreement&&!!s.generalAchAgreement&&p(Me,{className:Av.errorText,children:s.generalAchAgreement}),p(pe,{onBlur:r,name:"businessAchAgreement",value:l.businessAchAgreement,onChange:i,control:p(ue,{required:!0}),label:p($t,{variant:"small",children:t("ach-account-enabled")})}),o.businessAchAgreement&&!!s.businessAchAgreement&&p(Me,{className:Av.errorText,children:s.businessAchAgreement})]})})]})})]}),R("div",{className:Av.buttonContainer,children:[p(P,{variant:"contained",color:"tertiary",onClick:e,children:t("cancel")}),p(bi,{loading:m,color:"primary",variant:"contained",type:"submit",disabled:!n||!d,children:t("continue")})]})]})})})},wv=["The United States of America","United States","United States of America","US","U.S.","US.","U.S.A","U.S.A.","USA"],Tv=()=>{const{activeClient:e}=m.exports.useContext(_a),t=Wt(),a=m.exports.useContext(Na);return L(["getAllAddresses"],(()=>{var t;return nh.getAllAddresses({clientId:null!=(t=null==e?void 0:e.id)?t:0})}),{select:e=>e.map((e=>((wv.includes(e.country)||""===e.country)&&(e.country="United States"),e))),onError:e=>{console.error("Get all addresses error",e),a.open(fa(e,t("get-all-address-error")),{severity:"error"})}})};var Rv="CreditCardPaymentForm_container_1",kv="CreditCardPaymentForm_buttonContainer_6",Ev="CreditCardPaymentForm_formContainer_12",Mv="CreditCardPaymentForm_formContainerHeader_17",Dv="CreditCardPaymentForm_formStepNumber_22",Pv="CreditCardPaymentForm_form_12",Lv="CreditCardPaymentForm_inputContainer_34",Bv="CreditCardPaymentForm_multipleInputContainer_48",Ov="CreditCardPaymentForm_multipleInputContainerAddress_71",Fv="CreditCardPaymentForm_multipleInputContainerDates_90",Hv="CreditCardPaymentForm_addressSelectContainer_111",Uv="CreditCardPaymentForm_hidden_120",zv="CreditCardPaymentForm_open_124",Gv="CreditCardPaymentForm_dateInput_130",qv="CreditCardPaymentForm_inputField_135",Wv="CreditCardPaymentForm_formControlRoot_170";const Vv=({handleCloseNewPaymentMethodForm:e})=>{const t=Wt(),{authenticatedUser:a,activeClient:n}=m.exports.useContext(_a),{data:i}=Tv(),{mutateAsync:r,isSuccess:s}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(Th.createCreditCardPayment,{onSuccess:e=>{a.invalidateQueries("getAllPaymentMethods"),console.log("Create credit card payment method")},onError:a=>{console.error("Create credit card payment method error",a),t.open(fa(a,e("create-credit-payment-method-error")),{severity:"error"})}})})(),[d,u]=m.exports.useState(o(o({},vh),hh)),[h,v]=m.exports.useState({startDate:!1,endDate:!1}),g=z().shape({firstName:Ni(t("field-error-required",{field:t("first-name")})),lastName:Ni(t("field-error-required",{field:t("last-name")})),number:Ni(t("field-error-required",{field:t("card-number")})),expiryMonth:Ni(t("field-error-required",{field:t("expiry-month")})),expiryYear:Ni(t("field-error-required",{field:t("expiry-year")})),street:Ni(t("field-error-required",{field:t("street")})),state:Ni(t("field-error-required",{field:t("state")})),city:Ni(t("field-error-required",{field:t("city")})),country:Ni(t("field-error-required",{field:t("country")})),zip:Ni(t("field-error-required",{field:t("zip")}))});m.exports.useEffect((()=>{s&&e()}),[s]);const y=e=>{const t=null==i?void 0:i.find((t=>t.id===Number(e.target.value)));if(t&&""!==e.target.value){const{street_1:e,city:a,state:n,country:i,postalCode:r,id:s}=t;u((t=>l(o({},t),{street:e,city:a,state:n,country:i,zip:r,id:s.toString()})))}else u((e=>o(o({},e),hh)))},b=e=>{u((t=>l(o({},t),{[e.target.name]:e.target.value})))},_=e=>{const{number:t,expiryMonth:a,expiryYear:n,type:i,firstName:r,lastName:s,street:o,city:l,country:d,zip:m,state:p}=e,u={number:t,expiryMonth:a,expiryYear:n,type:i,firstName:r,lastName:s},h={street:o,city:l,country:d,zip:m,state:p},v=vh,{street:g,city:y,country:b,state:_,zip:N}=v,f=c(v,["street","city","country","state","zip"]),C=hh,{id:S}=C,x=c(C,["id"]);return JSON.stringify(u)===JSON.stringify(f)||JSON.stringify(h)===JSON.stringify(x)};return p(q,{initialValues:o({},d),onSubmit:e=>r(l(o({},e),{userPid:a.user.pid,clientCode:null==n?void 0:n.code})),validationSchema:g,validateOnBlur:!0,enableReinitialize:!0,children:({isValid:a,handleChange:n,handleBlur:r,errors:s,touched:c,values:m,isSubmitting:g})=>{var N,f,C,S,x;return p(W,{children:R("div",{className:Rv,children:[R("div",{className:Ev,children:[R("div",{className:Mv,children:[p($t,{className:Dv,children:"2"}),p($t,{children:t("enter-payment-information")})]}),R("div",{className:Pv,children:[R("div",{className:Bv,children:[p("div",{className:Lv,children:p(di,{name:"firstName",placeholder:t("first-name"),value:m.firstName,onChange:b,onBlur:r,errorMessage:s.firstName,error:!!s.firstName&&c.firstName,type:"text"})}),p("div",{className:Lv,children:p(di,{name:"lastName",placeholder:t("last-name"),value:m.lastName,onChange:b,onBlur:r,errorMessage:s.lastName,error:!!s.lastName&&c.lastName,type:"text"})})]}),p("div",{className:Lv,children:p(di,{name:"number",placeholder:t("card-number"),value:m.number,onChange:b,onBlur:r,errorMessage:s.number,error:!!s.number&&c.number,type:"text"})}),p(Vt,{variant:"h6",children:t("expiration-date")}),p("div",{className:Fv,children:R(Ce,{dateAdapter:Se,children:[p(xe,{PopperProps:{sx:{"& .css-1dozdou":{display:"none"}}},views:["month"],open:h.startDate,onOpen:()=>v({startDate:!0,endDate:!1}),onClose:()=>v({startDate:!1,endDate:!1}),disableMaskedInput:!0,inputFormat:"MM",ignoreInvalidInputs:!0,value:m.expiryMonth,onChange:e=>{u((t=>l(o({},t),{expiryMonth:null!=e?e:""})))},renderInput:e=>p(H,l(o({name:"expiryMonth",onClick:()=>v({startDate:!0,endDate:!1}),classes:{root:Wv},className:I(qv,Gv),onKeyDown:e=>e.preventDefault()},e),{inputProps:l(o({},e.inputProps),{placeholder:t("month")})}))}),p(xe,{views:["year"],open:h.endDate,onOpen:()=>v({startDate:!1,endDate:!0}),onClose:()=>v({startDate:!1,endDate:!1}),inputFormat:"yyyy",ignoreInvalidInputs:!0,minDate:new Date,value:Ae(m.expiryYear.toString()),onChange:e=>{u((t=>l(o({},t),{expiryYear:e.getFullYear().toString()})))},renderInput:e=>p(H,l(o({name:"expiryYear",onClick:()=>v({startDate:!1,endDate:!0}),classes:{root:Wv},className:I(qv,Gv),onKeyDown:e=>e.preventDefault()},e),{inputProps:l(o({},e.inputProps),{placeholder:t("year")})}))})]})})]})]}),R("div",{className:Ev,children:[R("div",{className:Mv,children:[p($t,{className:Dv,children:"3"}),p($t,{children:t("enter-billing-address-for-payment-method")})]}),R("div",{className:Pv,children:[p(Vt,{variant:"h6",className:""===d.id?zv:Uv,children:t("address-book")}),p("div",{className:I(Hv,""===d.id?zv:Uv),children:R(xr,{label:"select-address",value:d.id?d.id.toString():"",defaultValue:d.id?d.id.toString():"",name:"addressId",onChange:y,children:[null==i?void 0:i.map((({id:e,street_1:t,city:a,state:n,postalCode:i,country:r})=>p(Z,{value:e,children:`${t}, ${a}, ${n} ${i}, ${r}`},e))),p(Z,{value:"",children:t("new-address")})]})}),p("div",{children:R("div",{className:Ov,children:[p(di,{name:"street",value:null!=(N=m.street)?N:"",placeholder:t("street"),onChange:n,onBlur:r,errorMessage:s.street,error:!!s.street&&c.street}),p(di,{name:"city",value:null!=(f=m.city)?f:"",placeholder:t("city"),onChange:n,onBlur:r,errorMessage:s.city,error:!!s.city&&c.city}),p(di,{name:"state",value:null!=(C=m.state)?C:"",placeholder:t("state"),onChange:n,onBlur:r,errorMessage:s.state,error:!!s.state&&c.state}),p(di,{name:"country",value:null!=(S=m.country)?S:"",placeholder:t("country"),onChange:n,onBlur:r,errorMessage:s.country,error:!!s.country&&c.country}),p(di,{name:"zip",value:null!=(x=m.zip)?x:"",placeholder:t("zip-or-postcode-placeholder"),onChange:n,onBlur:r,errorMessage:s.zip,error:!!s.zip&&c.zip})]})})]})]}),R("div",{className:kv,children:[p(P,{variant:"contained",color:"tertiary",onClick:e,children:t("cancel")}),p(bi,{loading:g,color:"primary",variant:"contained",type:"submit",disabled:!a||_(m)||""===m.expiryMonth||""===m.expiryYear,children:t("continue")})]})]})})}})};var Yv="PaymentMethodTypeRadio_container_1",jv="PaymentMethodTypeRadio_cardText_6";const $v=({paymentMethodType:e,setPaymentMethodType:t})=>p(K,{children:R(Re,{className:Yv,value:e,children:[p(pe,{onChange:()=>
1t(Qp.ACH),value:Qp.ACH,control:p(ke,{}),label:Qp.ACH}),p(pe,{onChange:()=>t(Qp.CARD),className:jv,value:Qp.CARD,control:p(ke,{}),label:Qp.CARD.toLowerCase()})]})});var Qv="AddNewPaymentMethodForm_container_1",Kv="AddNewPaymentMethodForm_formContainer_10",Xv="AddNewPaymentMethodForm_formContainerHeader_15",Zv="AddNewPaymentMethodForm_formStepNumber_20";const Jv=({handleCloseNewPaymentMethodForm:e})=>{const t=Wt(),[a,n]=m.exports.useState(Qp.ACH);return R("div",{className:Qv,children:[p($t,{variant:"bigSemiBold",children:t("create-new-payment-method")}),R("div",{className:Kv,children:[R("div",{className:Xv,children:[p($t,{className:Zv,children:"1"}),p($t,{children:t("select-payment-method")})]}),p($v,{paymentMethodType:a,setPaymentMethodType:n})]}),a===Qp.ACH&&p(Iv,{handleCloseNewPaymentMethodForm:e}),a===Qp.CARD&&p(Vv,{handleCloseNewPaymentMethodForm:e})]})};var eg="AsideBoxWrapper_aside_1";const tg=({children:e,className:t})=>p("div",{className:I(eg,t),children:e});var ag={autopay:"AutoPayForm_autopay_1",header:"AutoPayForm_header_9",noPaymentMethodsHeader:"AutoPayForm_noPaymentMethodsHeader_15",container:"AutoPayForm_container_20",title:"AutoPayForm_title_26",icon:"AutoPayForm_icon_31",iconUp:"AutoPayForm_iconUp_37",formContainer:"AutoPayForm_formContainer_40",selectContainer:"AutoPayForm_selectContainer_45",checkboxesContainer:"AutoPayForm_checkboxesContainer_48",checkboxLabel:"AutoPayForm_checkboxLabel_53",switchContainer:"AutoPayForm_switchContainer_57",asideContentContainer:"AutoPayForm_asideContentContainer_62",contactContainer:"AutoPayForm_contactContainer_68",contactTitle:"AutoPayForm_contactTitle_75"};const ng=({scheduledPaymentData:e,allPaymentMethodsData:t})=>{const a=Wt(),{activeClient:n}=m.exports.useContext(_a),[i,r]=m.exports.useState(gh),{showNewMessage:s}=S();m.exports.useEffect((()=>{const a=null==t?void 0:t.find((({id:t})=>t===(null==e?void 0:e.paymentObjectId)));a&&r(a)}),[t,e]);const o=(null==i?void 0:i.id)===(null==e?void 0:e.paymentObjectId)?{frequency:e.frequency,state:e.state,userPid:e.userPid,paymentObjectId:e.paymentObjectId}:{userPid:i.userPid,paymentObjectId:null==i?void 0:i.id,frequency:null==yh?void 0:yh.frequency,state:null==yh?void 0:yh.state},{mutateAsync:l,isLoading:c}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(Th.updateScheduledPayment,{onSuccess:e=>{a.invalidateQueries("getScheduledPayment"),console.log("Update scheduled payment",e)},onError:a=>{console.error("Update scheduled payment error",a),t.open(fa(a,e("update-scheduled-payment-error")),{severity:"error"})}})})(),d=z().shape({frequency:Ni(a("field-error-required",{field:a("frequency")})),paymentObjectId:Ni(a("field-error-required",{field:a("payment-object-id")}))});return R("div",{className:ag.asideContentContainer,children:[p(tg,{className:ag.autopay,children:t.length>0?R(k,{children:[R("header",{className:ag.header,children:[p(Vt,{variant:"h5",children:a("autopay-box-title")}),p($t,{variant:"standard",children:a("autopay-box-description")})]}),R("div",{className:ag.container,children:[p("div",{className:ag.title,children:p(Vt,{variant:"h6",children:a("autopay-box-payment-title")})}),p(q,{initialValues:o,onSubmit:e=>(e=>{var t;l({clientCode:null!=(t=null==n?void 0:n.code)?t:"",paymentData:e})})(e),validationSchema:d,validateOnMount:!0,enableReinitialize:!0,children:({handleBlur:e,handleChange:n,errors:i,touched:s,values:o,isValid:l,dirty:d,submitForm:m,isSubmitting:u,setFieldValue:h})=>p(W,{children:R("div",{className:ag.formContainer,children:[p("div",{className:ag.selectContainer,children:p(xr,{name:"id",onChange:e=>{const a=null==t?void 0:t.find((({id:t})=>t===Number(e.target.value)));r(a)},value:o.paymentObjectId.toString(),label:"autopay-select-payment-method",children:null==t?void 0:t.map((({id:e,lastFour:t,accountType:a})=>p(Z,{sx:{textTransform:"capitalize"},value:e,className:ag.selectText,children:`${a.toLowerCase()} ****${t}`},e)))})}),R("div",{className:ag.checkboxesContainer,children:[p(Vt,{variant:"h6",children:a("autopay-box-billing-frequency-title")}),_h.map((({title:e,description:t,value:n})=>p(pe,{name:"frequency",value:n,onChange:(e,t)=>
1{const a=e.target;h("frequency",a.value)},control:p(ue,{color:"primary",checked:o.frequency===n}),label:R("div",{className:ag.checkboxLabel,children:[p(Vt,{variant:"h6",children:a(e)}),p($t,{variant:"small",children:a(t)})]}),disableTypography:!0},n)))]}),R("div",{className:ag.switchContainer,children:[p(De,{className:ag.switch,name:"state",onChange:e=>{n(e),h("state",e.target.checked?iu.ACTIVE:iu.INACTIVE)},color:"primary",checked:o.state===iu.ACTIVE}),p($t,{children:a(o.state===iu.ACTIVE?"active":"inactive")})]}),p("div",{className:ag.buttonContainer,children:p(bi,{loading:c,disabled:!d||!l,fullWidth:!0,color:"primary",variant:"contained",type:"submit",children:a("save-changes")})})]})})})]})]}):R("header",{className:ag.noPaymentMethodsHeader,children:[p(Vt,{variant:"h5",children:a("autopay-box-title")}),p($t,{variant:"standard",children:a("no-autopay-box-description")})]})}),R("div",{className:ag.contactContainer,children:[p("div",{className:ag.contactTitle,children:p(Vt,{variant:"h5",children:"We're here to help."})}),p($t,{variant:"standardMedium",children:"Have questions about making Online Payments, AutoPay or Invoices?"}),p(P,{variant:"contained",color:"tertiary",className:ag.btn,onClick:()=>s(),children:a("contact-ets-button-text")}),p(Vt,{variant:"h6",children:"Related Help Articles"}),p($t,{variant:"standardMedium",children:p("ul",{children:p("li",{children:p("a",{href:"https://help.etslabs.com/en/articles/772912-setting-up-automatic-payments",target:"_blank",children:"Setting up automatic payments"})})})})]})]})};var ig="/assets/deleteIcon.efd57a5c.svg";var rg="PaymentMethodCard_container_1",sg="PaymentMethodCard_contentContainer_18",og="PaymentMethodCard_imageContainer_24",lg="PaymentMethodCard_img_33",cg="PaymentMethodCard_icon_37",dg="PaymentMethodCard_infoContainer_42",mg="PaymentMethodCard_titleContainer_56",pg="PaymentMethodCard_title_56",ug="PaymentMethodCard_subTitle_64",hg="PaymentMethodCard_statusMessage_67",vg="PaymentMethodCard_actionContainer_70",gg="PaymentMethodCard_trashIcon_74";const yg=({paymentMethod:{type:e,accountType:t,lastFour:a,cardExpMonth:n,cardExpYear:i,id:r,userPid:s},isEnrolledInAutopay:o})=>{const l=Wt(),{openDialog:c,closeDialog:d}=m.exports.useContext(yo),{activeClient:u}=m.exports.useContext(_a),{mutateAsync:h}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(Th.deletePaymentMethod,{onSuccess:e=>{a.invalidateQueries("getAllPaymentMethods"),console.log("Delete payment method",e)},onError:a=>{console.error("Delete payment method error",a),t.open(fa(a,e("delete-payment-method-error")),{severity:"error"})}})})(),v={[Zp.VISA]:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAoCAYAAABD0IyuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARuSURBVHgB7ZpRaFtVGMe/e2vT1pm1Q7DbdNqALJNUmWAG7VDXbUr7IMoY7KVC+7CCE9aXygSdDw5BoYIVnKAPGzgfKiobCpuM6uawYis4t5RtVWzc1nXdBm2ark2yLXfnf26+k3OzXQZNCoOcHzQ5OTnn3PP97/d95yu5FuX4a2ysrq76wW5ynA2OQxuovDiZdZy+Jx9bsZ87LLycmZhoqMpav1QHKhuWBR+iQKCSbMuiciGVzlByfp5m51LxdMZpeSq0Ii6t/2/88tiy4JKGOiFKOTOdnKWp5PV4IjP/bMW/Fyc6gktqOh6uXUrlTnVVQHjPjbqKrJW2Rch0B2tqyOAiIofsCutFW7TXQimDS6CyknD42GTwIELIfSfDXTHC+GCE8cEI44MRxgcjjA9GGB8eoCLp3XuCYmcnaSaZ8vT3ffAKrVpZ6+nr2PmtGtez43k1H0TWLKc9uzbLduzcJH1z8BQdHhilC5cSsq8xXE/bX4/StteeUevhu90fHlVrtm4MU5cYUwqKFoYN7BeG9H5+gi6Mu4Zgw/s/3arGDQ6fpyM/j8r2qkdrqTn6BO3+6KjsB43h5e46h05R9zs/3nEdiJVIpj19vXt/VWsCfH/fCMPgTsLgLZ1fy88jwot0vjzwh2pvb193x5im6OPSA3RRWjeupsY19cIj0sIrL4v2I541B4fOez6PSM9N09JgFRVLyYQBEWEENoXNwUjeJNqHB/5R49qEwYC9BUAAXSiEoe5xhcBDOcz4mgAeGykQcCGUNPnWBqulgQzuMoDLM+xZuij4jD/9TkvvefcHZXwhnJswr2fHC6r/t+H/qRSU/FRC7mBiZ6/Id93lt736dO67vHdEwvVqbrMIKab/4GmKvvyZEoGBqCwY5ughNnLOG8ILZRGEyRuGTeouj1Bj4X7/M67NyYv5/b52efroQBh4D9N/6G/V7hL5KqJ56eDQfewxHBLYJE4Zpqs9b3DszBXVLkyqe3a9RMM/vUmtm1arPngP5y60AfJQQhzVI8IzuTTg3FYsi1LgrV/neg02ybkEuYBrEPTruQNiFhqD8W/lSgGdL74aUm2ssaXzgPzT1+PcVgwlPZWYpucaPKcQ0MNFP3049AZF0kTt0yxEjeRqGhR5DCfnIwOjdC+Q2/TrLYRFEQbH8XuieNPpeSN/9/WTgws79OXD5LRnLgTZ17fVk69QCb//9mY1BiHVufM72YbIxRZ6iyIM7i5qiZkZNzzaRKmOPgZhwzmhKecx68UdhifFckWaXEeMadsUFgVhVM7/WFTWPA8JutAr+JoXxxNULJb4TckJrawnQ56xS5Pmv2s/jDA+GGF8MML4YITxwQjjgxHGBylMVvyKbfCCB6eOZTI3yOCSymTEq3XSzt5yjk8lr5PBJTmXEhGU7bPtm6lPhEpxIw7hMTOanZuP4yFFOxQKTVu20zKdnI1fnZ7JuVL5gPwKmyeuTeEZvLiVcVrQ73k0E8/j2WR1i961VE44dMxxnOOIHjgKum4DIU30MnEeKoMAAAAASUVORK5CYII=",[Zp.AMERICAN_EXPRESS]:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAQCAYAAAB6Hg0eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAXXSUR
1BVHgBjVVrbFRFFD7zuHdffVKkLRW6FQ0UpC0/NDExZYkmxsRoDYpRHrERA8EoEoMaY2LwEU1EafyhBgwUEZD6gKpEIWpaEhAwKY2VR6PShZBuH9Zuabt3d++dOZ57t7sUJWlnM3vPnDlz5jvPYTAxFu0ZrjWkscSlUUNsZGCw3E4kgXGIXkmNn64wQitgiqGBOWCnL3PDuMVdp1H/yRFMyflcRevBoT5PjiHvRaZne7SGKHIIu7TS0AZNy6IuLbNKpc/XhMDjwF1gamkgP7+byB4CuTQszVeZ4BsZY2cQ8SH6tmbPIUCE5E+4ODyG34xwzl1+1ESMEOcoyfcSoyEUCB2xLGsR8apAs2OcMUGg6hnCb4AYdLWRAc2uGu7+1R1EQszCTOGmsYS9jhQxI8/3qRUcWkvkKQL1USo5/szFkeanSHzg4qZwo9bY7k5SEE2NDj9NqtoBeSso6y4G0KZs/SFd+LbjiA0ZWbW7qKL0FdT6WdIR4j69OQ3G42ToELl6JwJ+Ndn7HjBlXV1jp+wdWrD78wNyISjc4/JLixes0Aw/0KhjAX9hf5lYXp87KPh8d2rEKi8kHJ4gAxqYWTArK8OUOiyF2s8524VCHJFJfKOyovqcIeU5d9/A9EoG/E24wfCAcdNsNKWxjwP/BRyI0gVfZ+IkIqGZwWEAsRIZPn9dPild6M5MNF3rsIUMaNVO+tacjFZjlFB+YBC9tCn8PRm5Q0krXVxcsn/GTRVB4q9jaLQDY7/+D1hNS+IRJ21f8HAwtQ0l7IIxf6edUn+4PGGGVl16IXxC+OSD151kcCozWdRbCv4uKrWTvh05GdNYbYBooFA+OW9rTwOF+DWGuMNJy+3S5iEuhAncbrKb6jv+C4zVtlgHKM51jNMPYG8qmawx/L4wxX2YLl5CSen6pIf+a5Lxq132eLKaQvN5VgHlRoQ+3UTMd0WF4DHSV27b9qhhGIuJbmMZ8BHHsV+iyt9gK8cGjZzS4O6+WO8gY/w8aQqTx99STcuaXb0ymUjupWTY512SNI9zE/JSiURt9uK0pYfNAC9Wyo5TLyhSoPxU1pPHDxmEGBdCphRmNoUhyTaMknFh9KLt7L68+ba2qveudHOBxSAoXOggV3xQC+XlZT5AZzwXkClGzTdWFR+Hysk8ayS+sLuv7ONwQXQ1LXN7lLADVARIwEuveRS6OKrbkYncXRQbzRF/Vwg1EyiSsZ7+g8q0KrylA/EpgdV9Ye22HVUvpYhmedpRYWtoJGanktUpK53LDyGAS0l9TIjvaBmngjHogvmUvG7lfpsDxuABrfUZ6mOdE4zGpGV1DPw94BUBtZk7JExjpEdHt4iCwgvkjUoq7zGRtM/6Swrbh87HVhWUzEzItHNWS+M+SonTaVtHIJ06aXCTkSeKegqGjofHS46OWdaL+T7/vZ4XEQIg2VrtQJ0HROJsM+Bff3P53Lor/VGqcD49YO7gUpTRm1GNAut1nv9nOeavLS6Z9TA1zDXa4OvpttepfvYGDdGeUIr6HK4FwZfMic96lBkqGJDc7dvzMq5lwkpaRUHTHyGvzkNkpeTcSsbtiCF81Y6yM31sOoPetnwUrBw1FlDeys5GFqdsKprYjhN/i7Z1VCFudxka2Y9K41aAhJvIptA+k7iVmQmRgC/wiUsrv3iOQhcC4bwDnM0pLStfF8rLE9P2GL1t/fSIdlFpd4DEI7UtiU6p+fJ4byymTFZODXYbtYELkmVUUq5vJA/XSulbphF6wQ9x7T5bni59J4H4DCk31Gg6JAzRTeH9ya3d8ZGEv7iouGhayU9lX0nvbc8196mlZGUXckZVxduIUWSPjhecayy5p+r9nmaSKKWwLSAv/kWZTEiZuz6ZPU6X1hOIY54qxDDtubl2yFsDtRfEk1N7zIFdXOgw4KTmhay187HQocUHxhsEy4TTKAhecr92ymlG4YS9oyn2j/ThjBtobc8SyURijz8YnJtdU/i/7Ht54eF/AXPKw89290wcAAAAAElFTkSuQmCC",[Zp.DISCOVER]:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAoCAYAAABD0IyuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAX9SURBVHgB7Zp7TBRHHMe/t3fc8RA5wBQxIKCt1aoIVnyA8kiqPJWmUiNvmlYN1ITUqqDxj6a11dpQa6ytj7Y+Aa08TLWi2FQUkmqlCiiBROFOOOQor6N38jjubjqz6DXXdJMe/sl+krmdm53dmf3O7zez+8tI8Ix7KpVS6eicC0IiCUEkJhZ1FkIOvOzjfeJ5gYT9NHV2+isskuuOcgd/d9dJkMsdwEkkmCgMjxihHxqCYXBYPWIkUXMCvNX807d2aFXuri7+SirKREanN6Bf/1Q9YBwKlj7SdGa5ujhlebpNxkTHUSGn1jOqlFokIxx1mVxXJyeIjEE9B5xUEsHRfBBTSmQMuYMD2OLDQcQG6kJjR4j8J6IwAojCCCAKI4AojACiMAKIwgggCiOAKIwAMtjJzrw8/iinnxFz58/HypWroFQq8UdtLUrPn8ene/eira0N3x09Am2nFisiIhCfkABPT08MDAzg5InjuF/fgFHTKFJS07AqOhrDAzo0nvoBI00NkJmG4bFwCXySUtHQosKFsjJso226e3jw7apUKhw7fBjpWVkoLy2FQa+39m3Hrl0o2LcPRqMRMvpqHxQchJiYWFRUVGBtUhLswW6LKS4ugqajAz29vdhfUID4mBhoNBo+sXMWiwXvZmXi1q1bCFoYjCtXKjBEYx3azk6siY/HmVOnMd3fD15eXrh06SIG+3pxNTkRkuKD8H5Uhama36C4uB/d29fC38sTZ88W03TW2v73x46iuvomvL2n4md6fVNzEyRSjk+M0rJSPKFtGQx6bN2yBUVFhVgWugx2Q2MxxB78fX1IeVkpn+/u7iYL5s0l72Rlkgvl5fy5vr4+/rgzP49QkazXbd3yAVkasoi0t7dby7RaLan5ZBepX+5PHsdOJ+1xvkST4EuevOVDtOunEf253WRzTjaJj4nm6/f09JDgwPnk8z2fEbPZTEKXLCaHvj5o0795r80hp0+d5PNx9LqM9DRiL0yTF5pjpkyZgvTMTOoa9dYyNzc3bMrORlFhIWjHcK64mLei+ro6xFGL8fHxsdZlVoPmBignWSCVEkjlBDJnC2QuNE22wNJSgdS0NDQ2NqKhoR5V13/F4OAgUtLSrff4kVrT+nXr+DQyMsKXNTc10/bPQE3dLioqCuPB7jnm3zA3kUqlNmX5O3YiMiISpaUlyM/bDpPZxNd7Fkm1wdH0FA5yCzgqikRBwDlSgag4nBMVy8MRi0IWw8/PDyeOH0f74zasoq7LxGViMwJmzETY8jA+/7wfNTXVKDxzGhs2bkJaegbGwwtZTAedayouX0ZoWJhN+YP797E0NBRfFHyJGbTjDx8+5OtUXr0C6mrWegaDAS8tj+CFkFKrkbmZ4aA0QaY00zz97x8ImUxGLSQNl366iNraO0hKetumrZDFIXhvw0Y+sbqM9IwMvDp7NlpbWyAZZ+x6XBZTUlKCmuoa/HKtEu7u7nTVyMfvt2/z5+7dvYvU5GQkvpkIOg/wncvZ/D5C6MhX37yJxIR4ftTNoyb09tMJfM8e6NsvQGLUgOMthdqVIx0xTz/Iw7bx91yfnMJP9DNnzsaK8HCbvlyrrOQHiMEslaFQKHDom2+xmrZ19MgRZOfkwF6kuR9u/cjdjiD4n11d/DziIFcgYfUafLx7N78UM1dhQR5mur6+Pqi9cwdmau4ZmVlITkmFG13So2NjYTKZ0PjgAUwWM8LDIxD4+iIoQhLAORjBuTlDOjUAsjmroXjjACQuXtYHNZvMiKPL/iuzZln70sX3hcaqaciNJSaaTqfjByFwwQI6aB5obXlE80Fwdnb+38+o0z+FhM3AAdO8IPIPqidd4puvEKIwAojCCCAKI4AojACiMAKIwgggCiOAKIwAvDAW9kotYgPbOFVlNI5CZIxhGhaln7F1nMVMbvTTjyaRMfSDw9SDLAc4zjT8FVVJLYoDts0MhsEhNdukyAUEBOgkHInS6Q3qbt1fz0xp4sDmV/bMnT39bA+eWmIkfCzUJrzF9uPReHsuLQ3CRIKgisbAbzDvYYbCiv4GWq76HWij0AwAAAAASUVORK5CYII=",[Zp.MASTERCARD]:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAoCAYAAABD0IyuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAa/SURBVHgB7VoJbBRVGP5ml+1Bu+1SIlh6sCuI1BYEqghBAwUVokYOuQwoeJBgjNQDUQgRggciQTkE1IBiAmLiEUBilISjCBpB7kv
1L0eXsQaFbtnt0t93xe30QA7QlzBtC0u6XvO7u67zd+b/5/uvNaLiMPUVFDkdcy3zoej9dRz80L+yN6PqCjumpK65MaOLPkeJiZ2xE2xwXY3O2siciJsYGi6ahuSBYHYI3EECVP+iuDul5Wa5Ud531J86WFLWyJzgdJKU5w+OtQoXX564MBbpbj50pHm9PiB/fOjkJzR1xsTFUT9hhjWjVFrpMvj0+HlFI0HNgsWp9LXzfTTAVhUSMzQaRfCyI4irQheQroqgXLXCr4LkErF4D7NoH7DsEXPTw16xA6xSgoxPI6wM81hdIS61/fZjrT/0EVBzgdx0EQpW8jDzdmFZAogtow/VtuT7+TtwKaEzVuqtdW5iGs8XAW+8B634DfP7Gj21BQ58ZAsyaAjgz5FzgLMutmUDJRqAm0Ph6jbGxPddnTwZaZsAsFJ0rNZmYH9YDb8wATp+7qWV1pMykcf1tVBdJDRTf3PoErs+ZCmQOhRkwl5g5nwHvfADDSGLQG83xSASGkTMNyHoVqhDEmBN8l68Gps+BYdxLQl7mYPjASYVW5PBcWvUdzIA6Me7TwJRZjAc1MIQ7OB7lCOpyXIBxRMJ0xXcB/xmoQj0rfbhQZhyjsFMhW69RSRk/DzLoUmEvUPg5y9b3oQI1Yg4VAl8rSDeRBOQJUvTr/1fK+bY6DOHEKiBjGEuDHjAKNWLW/GLchQR6cjgaMF7FyWuDJHbTbSRmQ4F8zekMpDhkIedIZm2RziB6Ro7GcIGq2NFAsBUZf2hEGhfHQFT5L1BVhBsiOZvuxGKwdBuD+mQYhRoxx9zydfk8Xn0akM1KdCF9e8DDwIuvA0dpSLIdOPCPJKl3Lg1l6jnFIm4ps9iu+SRmO+sXVrFhKm/jViC9HeuSBJ4ZSenxEkl+moQwwHuPMuvw+EQng3Qp49oeftf9fF9OhbCQbMmLUc33vZYA+1k2VOyBCtSIKSkD2I2iR1dZ8T7eX6pHQOwAjhvJrNMayL0PWMXyftRTwGYSse8wSaJRGzkm5vN7zgPdc4CDXwIDmaK68qpv/4vtAn1tAz/7TsrvzJ3NP6x2M54kuT8CrmfZLuwFrCTSYpPH2DuSyBMkSSW9qaZr0Yl2zWIfE5bGjh8N/LGTtQSv8GEGZrGdIVyMW6WIUAHs57FtB+f5ufA453lV+9D4cFi2D0M6AJ2dVNEiGsv1lUf+JyWWBId9dCv2WhpPO4HHVZPQ499SRXeRyHFU8Aqqp5rEHJe/pQA1xQg1ZHWiS+ynq5CMDLpBId0nie7z1afAvC+A87xytSTl48U0koYto9ttJ3llnA/y+FAI+HUtsJZNY3obYO4LwFSqqldvKpBKTOlOI2vZNlB98WncoF4AtBtEpfI3KqiWGq7T6Ya2ZNlUeth0WuOlim4bMZ14hTs4ZQftY8O3aLlUQMGflD2Nmv4aCSiXLrefWaK2VrrSThqUPwHYvQxYT1KWkEQ/649t39MlS0isUAtd8xJdpv86Bmkq6yT/134ElUPF+E6RkCqg/G8G2d9lb/XQSirKIz9nDOZcKVSg1ivN+gSYMReG8QBdcUADWUmcUpoo8hqocxqDNQ645xXZdRuA6JXUFDOIwfYjxoNAEIZA1cPKeNGiHsPHXKl8DcSKCN0z/QmoQC349uwGTBgLwxC9kYXulXTN6CfqF4Xg6WISSM6CCtSbyDcnymBrFLvpKnfzNLpcHrkcHRRIsSXJNK4IdWIymSnms7u2GfTKINXxDYlgYYtC0WHz1WhCEWm8y3QGZp8M0AowZ8/3+dEy80ybDUPwkBBhxygOl8JGVfbbVBvVokckSQow7y7B1EnAysWyT7pZpDIFTWK5P5JpO8HAerEh/uBS1lST5GdN3Sxzb5+MYau/haX/cyPkRveNEBcLDB7Iavln2T44KZm+XN9+OI2z3ni9SMtpotbhXnPmEJgJ8+8SXIEo1ET3vYkF1zFWw+UX6fvMOOIeueiLcrsAY4fLbrw++Nlel3J9GQtCX5HsfYSLiODq4NoUFpCZw2TFazLMv0vQRGDeZngTRB0xEcVOtClCPDi1JSS2DaKoQ1B0+9D2WiK1ekGF14coJLz+ID0ossBiqQnOJ0vuKDkQj5mhyh9wi4cULS6Xy6NZ9DyPt8p93nPpspSaD0R8FTYXl1eIZ/DcWkjPE/NXbYaI5/Es0PI52w3NCTq26LpeILxHCEVM/Qfq3F3bGKqiOAAAAABJRU5ErkJggg=="};return R("div",{className:rg,children:[R("div",{className:sg,children:[p("div",{className:og,children:e===Qp.CARD?p("img",{src:v[t],alt:"card.",className:lg}):p(Sn,{spriteUrl:"/assets/savingBank.6c992310.svg",className:cg})}),R("div",{className:dg,children:[R("div",{className:mg,children:[R($t,{variant:"standardSemiBold",className:pg,children:[e===Qp.CARD&&`${t.toLowerCase()} ****${a}`,e===Qp.ACH&&`${l("accounting-no")} ****${a}`]}),R($t,{variant:"small",className:ug,children:[e===Qp.CARD&&`${l("expires")} ${n}/${i}`,e===Qp.ACH&&`${t.toLowerCase()} ${l("account")}`]})]}),o&&p($t,{variant:"small",className:hg,children:l("autopay-enrolled")})]})]}),R("div",{className:vg,children:[!o&&p(Sn,{spriteUrl:ig,className:gg,onClick:()=>c((async()=>{var e;h({userPid:s.toString(),clientCode:null!=(e=null==u?void 0:u.code)?e:"",id:Number(r)}),d()}),"delete-warning-title","delete-warning-description","yes","no")}),o&&p(me,{title:p(mn,{html:'This payment method is currently used for AutoPay & cannot be currently deleted. <br><br>To delete, either please select an alternative payment method for AutoPay from the "Select Payment Method" dropdown below & then click on "Save Changes". <br><br>If there no other payment options availiable, you can create one using the "Add New Payment Method" link at the top of the page.'}),placement:"right",children:p("span",{children:p(Sn,{spriteUrl:ig,className:gg})})})]})]})};var bg="PaymentMethods_container_1",_g="PaymentMethods_header_6",Ng="PaymentMethods_actions_11",fg="PaymentMethods_btn_17",Cg="PaymentMethods_icon_24",Sg="PaymentMethods_disabled_31",xg="PaymentMethods_content_34",Ag="PaymentMethods_paymentMethods_44",Ig="PaymentMethods_list_50",wg="PaymentMethods_noPaymentMethods_55";const Tg=()=>{var e,t;const a=Wt(),n=f(),{activeClient:i,authenticatedUser:r}=m.exports.useContext(_a),{data:s}=rv({pid:r.user.pid,clientCode:null!=(e=null==i?void 0:i.code)?e:""}),{data:o}=lv(null!=(t=null==i?void 0:i.code)?t:""),[l,c]=m.exports.useState(0===(null==s?void 0:s.length));return R("div",{className:bg,children:[R("header",{className:_g,children:[p(Vt,{variant:"h4",children:a("payment-methods")}),R("div",{className:Ng,children:[p(P,{className:fg,variant:"text",size:"small",startIcon:p(Sn,{className:Cg,spriteUrl:bm}),onClick:()=>n(-1),children:a("back-to-invoices")}),p(P,{className:fg,disabled:l,variant:"text",size:"small",color:"secondary",onClick:()=>c(!0),startIcon:p(Sn,{spriteUrl:xv,className:I(Cg,l&&Sg)}),children:a("add-new-payment-method")})]})]}),R("main",{className:xg,children:[R("div",{className:Ag,children:[0===(null==s?void 0:s.length)&&p($t,{variant:"standard",className:wg,children:a("no-payment-methods")}),l&&p(Jv,{handleCloseNewPaymentMethodForm:()=>{c(!1)}}),p("div",{className:Ig,children:null==s?void 0:s.map((e=>p(yg,{paymentMethod:e,isEnrolledInAutopay:e.id===(null==o?void 0:o.paymentObjectId)},e.id)))})]}),o&&s&&p(ng,{scheduledPaymentData:o,allPaymentMethodsData:s})]})]})};var Rg="/assets/downloadIcon.ec59de58.svg";var kg="Receipt_container_1",Eg="Receipt_textContainer_12",Mg="Receipt_buttonContainer_21",Dg="Receipt_arrowRightIcon_21",Pg="Receipt_downloadButton_25",Lg="Receipt_backButton_46",Bg="Receipt_paymentInfoContainer_55",Og="Receipt_invoices_69",Fg="Receipt_divider_75";const Hg=()=>{var e,t,a,n,i,r,s,o,l,c,d;const u=Wt(),h=f(),v=y(),{authenticatedUser:g,activeClient:b}=m.exports.useContext(_a),_=v.state,N=C();return m.exports.useEffect((()=>{N.invalidateQueries({queryKey:["getAllInvoices"]})}),[]),R("div",{className:kg,children:[p(Vt,{variant:"h4",children:u("thank-you")}),p($t,{variant:"bigSemiBold",children:u("successfully-processed-payment-info")}),p("div",{className:Eg,children:p($t,{children:u("copy-of-receipt-text",{email:g.user.email})})}),p("div",{className:Mg,children:R("a",{className:Pg,href:(S=null!=(e=null==b?void 0:b.code)?e:"",x=null==(t=null==_?void 0:_.orderInfo)?void 0:t.orderNumber,`https://webapi.etslabs.com//clients/${S}/orders/${x}/receipt`),download:!0,children:[u("download-receipt-button",{orderNumber:null==(a=null==_?void 0:_.orderInfo)?void 0:a.orderNumber}),p(Sn,{className:Dg,spriteUrl:Rg})]})}),R("div",{className:Bg,children:[R("div",{className:Og,children:[R(Vt,{variant:"h5",children:[u("payment")," ",null==(n=null==_?void 0:_.orderInfo)?void 0:n.orderNumber]}),R(Vt,{variant:"h5",children:["$",null==(i=null==_?void 0:_.orderInfo)?void 0:i.orderTotal]})]}),(null==(r=null==_?void 0:_.selectedInvoices)?void 0:r.length)>0&&(null==(s=null==_?void 0:_.selectedInvoices)?void 0:s.map(((e,t)=>R("div",{className:Og,children:[R($t,{children:[u("invoices"),": ",e.batchNumber]}
1),p($t,{children:e.price})]},t)))),p(te,{className:Fg}),p($t,{children:u("paid-on",{date:Uu(null==(o=null==_?void 0:_.orderInfo)?void 0:o.paidAt),card:null==(l=null==_?void 0:_.paymentCard)?void 0:l.accountType,lastCardNumber:null==(d=null==(c=null==_?void 0:_.paymentCard)?void 0:c.lastFour)?void 0:d.slice(-3)})})]}),p("div",{className:Mg,children:p(P,{className:Lg,variant:"contained",color:"secondary",onClick:()=>(N.invalidateQueries({queryKey:["getAllInvoices"]}),void h(Tt.BILLING)),children:u("return-on-billing")})})]});var S,x};var Ug,zg;(zg=Ug||(Ug={})).CORPORATION="Corporation",zg.LIMITED_LIABILITY_CORPORATION="Limited Liability Corporation (LLC)",zg.PARTNERSHIP="Partnership",zg.INDIVIDUAL_DBA="Individual/DBA (Sole Proprietorship",zg.OTHER="Other";var Gg=Ug;const qg=[Gg.CORPORATION,Gg.LIMITED_LIABILITY_CORPORATION,Gg.PARTNERSHIP,Gg.INDIVIDUAL_DBA,Gg.OTHER];var Wg="FormWrapper_container_1",Vg="FormWrapper_withBgAndPadding_6",Yg="FormWrapper_formContainer_6",jg="FormWrapper_content_13";const $g=({title:e,formContent:t,aside:a,withBgAndPadding:n,titleVariant:i="h5"})=>{const r=Wt();return R("div",{className:I(Wg,{[Vg]:n}),children:[e&&p(Vt,{variant:i,children:r(e)}),R("div",{className:jg,children:[p("div",{className:Yg,children:t}),a&&p("aside",{children:a})]})]})};var Qg={container:"ClientInformation_container_2",collapseAndAdditionalInfoAsideContainer:"ClientInformation_collapseAndAdditionalInfoAsideContainer_7",infoAsideContainer:"ClientInformation_infoAsideContainer_12",collapseContainer:"ClientInformation_collapseContainer_22",collapseHeader:"ClientInformation_collapseHeader_31",collapseHeaderTitles:"ClientInformation_collapseHeaderTitles_36",collapseActionContainer:"ClientInformation_collapseActionContainer_41",icon:"ClientInformation_icon_41",collapse:"ClientInformation_collapse_7",form:"ClientInformation_form_48",inputs:"ClientInformation_inputs_53",actions:"ClientInformation_actions_70",btn:"ClientInformation_btn_75","collapseHidden ":"ClientInformation_collapseHidden _78"};const Kg=({clientInformation:e})=>{const t=Wt();f();const{activeClient:a,authenticatedUser:n}=m.exports.useContext(_a);Om();const[i,r]=m.exports.useState(!0),{mutateAsync:s}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(nh.editClientInformation,{onSuccess:n=>{console.log("edited client information",n),e.invalidateQueries("getAllClients"),a.open(t("edit-client-information-success"),{severity:"success"})},onError:e=>{console.log("failed to client information",e),a.open(fa(e,t("edit-address-error")),{severity:"error"})}})})(),c=z().shape({name:Ni(t("field-error-required",{field:t("company-operating-name-placeholder")})),officialBusinessName:Ni(t("field-error-required",{field:t("official-business-name-placeholder")})),businessType:Ni(t("field-error-required",{field:t("business-type-placeholder")}))});return p($g,{title:"client-information",formContent:p("div",{className:Qg.container,children:p("div",{className:Qg.collapseAndAdditionalInfoAsideContainer,children:R("div",{className:Qg.collapseContainer,children:[R("div",{className:Qg.collapseHeader,children:[p("div",{className:Qg.collapseHeaderTitles,children:p(Vt,{variant:"h6",children:t("company-operating-information")})}),p("div",{className:Qg.collapseActionContainer,children:p(F,{onClick:()=>r(!i),size:"small",children:p(Sn,{className:Qg.icon,spriteUrl:i?Yi:Vi})})})]}),p(j,{in:i,timeout:"auto",className:i?Qg.collapse:Qg.collapseHidden,children:p(q,{initialValues:e,onSubmit:e=>{var t;return s(l(o({},e),{id:null!=(t=null==a?void 0:a.id.toString())?t:""}))},validationSchema:c,validateOnBlur:!0,enableReinitialize:!0,children:({handleBlur:e,handleChange:a,errors:n,touched:i,values:r,isValid:s,dirty:o,isSubmitting:l})=>{var c,d;return p(W,{className:Qg.form,children:R("div",{className:Qg.inputs,children:[p(di,{disabled:!0,name:"name",value:r.name,onChange:a,onBlur:e,placeholder:t("company-operating-name-placeholder"),errorMessage:n.name,error:!!n.name&&i.name,type:"text",className:Qg.formInput}),p(di,{disabled:!0,name:"officialBusinessName",value:null!=(c=r.officialBusinessName)?c:"",onCh
1ange:a,onBlur:e,placeholder:t("official-business-name-placeholder"),errorMessage:n.officialBusinessName,error:!!n.officialBusinessName&&i.officialBusinessName,type:"text",className:Qg.formInput}),p(xr,{disabled:!0,label:"business-type-placeholder",name:"businessType",value:null!=(d=r.businessType)?d:"",onChange:a,items:qg})]})})}})})]})})})})},Xg={aid:"",apiModifiedAt:"",apiSyncedAt:null,city:"",clientId:0,country:"",createdAt:"",id:0,inServiceArea:!1,invoices:!1,label:"",mailing:!1,mostRecent:!1,notes:"",phone:"",postalCode:"",primary:!1,reports:!1,state:"",street_1:"",street_2:"",updatedAt:""};var Zg,Jg;(Jg=Zg||(Zg={})).MAILING="mailing",Jg.SHIPPING="shipping",Jg.OTHER="other",Jg.NEW="new";var ey=Zg;const ty=ae.forwardRef(((e,t)=>p(Pe,l(o({},e),{format:"###-###-####",mask:"_"})))),ay=ae.forwardRef(((e,t)=>p(Pe,l(o({},e),{format:"#####",mask:"_"})))),ny=["United States","Canada","American Samoa","Argentina","Australia","Austria","Bahamas","Barbados","Belgium","Belize","Brazil","Chile","China","Colombia","Costa Rica","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Dominican Republic","Ecuador","Egypt","El Salvador","Estonia","Fiji","Finland","France","French Polynesia","Germany","Gibraltar","Greece","Grenada","Guadeloupe","Guam","Guatemala","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Korea, Republic of","Latvia","Liechtenstein","Lithuania","Luxembourg","Macao","Malaysia","Maldives","Malta","Marshall Islands","Mexico","Moldova, Republic of","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Netherlands","New Zealand","Norway","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Romania","Russian Federation","Saint Lucia","Samoa","San Marino","Seychelles","Singapore","Slovakia","Slovenia","Solomon Islands","South Africa","Spain","Sweden","Switzerland","Thailand","Trinidad and Tobago","Tunisia","Turkey","Turks and Caicos Islands","Ukraine","United Arab Emirates","United Kingdom","Virgin Islands, British","Virgin Islands, U.S."];var iy={container:"MyLocation_container_1",collapseAndAdditionalInfoAsideContainer:"MyLocation_collapseAndAdditionalInfoAsideContainer_6",infoAsideContainer:"MyLocation_infoAsideContainer_17",infoAsideContainerHidden:"MyLocation_infoAsideContainerHidden_35",collapseContainer:"MyLocation_collapseContainer_45",collapseHeader:"MyLocation_collapseHeader_60",collapseHeaderTitles:"MyLocation_collapseHeaderTitles_65",primaryTitle:"MyLocation_primaryTitle_70",collapseActionContainer:"MyLocation_collapseActionContainer_73",icon:"MyLocation_icon_79",iconGray:"MyLocation_iconGray_83",collapse:"MyLocation_collapse_6",form:"MyLocation_form_91",inputs:"MyLocation_inputs_96",switchesContainer:"MyLocation_switchesContainer_116",switchTitle:"MyLocation_switchTitle_126",switches:"MyLocation_switches_116",switchContainer:"MyLocation_switchContainer_133",trueReportColor:"MyLocation_trueReportColor_138",actions:"MyLocation_actions_141",btn:"MyLocation_btn_146",collapseHidden:"MyLocation_collapseHidden_149",collapseActionContainerHidden:"MyLocation_collapseActionContainerHidden_152"};const ry=({myLocation:e,mailType:t,activeClientId:a,addAddress:n,editAddress:i,deleteAddress:r,closeNewLocationForm:s,openDialog:c,closeDialog:d})=>{const u=Wt(),{authenticatedUser:h}=m.exports.useContext(_a),v=Om(),[g,y]=m.exports.useState(!1),[b,_]=m.exports.useState(!1);gs();const[N,f]=m.exports.useState(!0),{user:{administrator:C}}=h,S=`${""!==(null==e?void 0:e.street_1)?`${null==e?void 0:e.street_1},`:""} ${""!==(null==e?void 0:e.city)?`${null==e?void 0:e.city},`:""} ${""!==(null==e?void 0:e.state)?`${null==e?void 0:e.state},`:""} ${""!==(null==e?void 0:e.postalCode)?`${null==e?void 0:e.postalCode},`:""}`,[x,A]=m.exports.useState(null==e?void 0:e.country),I=z().shape({country:Ni(u("field-error-required",{field:u("country")})),street_1:Ni(u("field-error-required",{field:u("street-1")})),city:Ni(u("field-error-required",{field:u("city")})),state:Ni(u("field-error-required",{field:u("state")})),postalCode:Ni(u("field-error-required",{field:u("postal-code")})),phone:Ni(u("field-error-required",{field:u("phone-number")}))});return p("div",{className:iy.container,children:p("div",{className:iy.collapseAndAdditionalInfoAsideContainer,children:R("div",{className:iy.collapseContainer,children:[R("div",{className:iy.collapseHeader,children:[R("div",{className:iy.collapseHeaderTitles,children:[t===ey.MAILING&&p(Vt,{variant:"h6",className:iy.primaryTitle,children:u("primary-mailing-address")}),t===ey.SHIPPING&&p(Vt,{variant:"h6",className:iy.primaryTitle,children:u("primary-shipping-address")}),t===ey.OTHER&&p(Vt,{variant:"h6",children:u("location")}),t!==ey.NEW&&p($t,{variant:"small",children:N?"":S})]}),R("div",{className:iy.collapseActionContainer,children:[t===ey.OTHER&&p(F,{onClick:async()=>c&&c((async()=>{var t;r&&await r(null!=(t=null==e?void 0:e.id)?t:0),d&&d()}),"delete-warning-title","delete-warning-description","yes","no"),size:"small",children:p(Sn,{className:iy.iconGray,spriteUrl:ig})}),t!==ey.NEW&&p(F,{onClick:()=>f(!N),size:"small",children:p(Sn,{className:iy.icon,spriteUrl:N?Yi:Vi})})]})]}),p(j,{in:t===ey.NEW||N,timeout:"auto",className:t===ey.NEW||N?iy.collapse:iy.collapseHidden,children:p(q,{initialValues:e,onSubmit:r=>(async r=>{const{label:c,street_1:d,street_2:m,city:p,state:u,country:h,phone:v,postalCode:g,notes:y,primary:b,invoices:_,reports:N,mailing:C}=r,S={label:c,street_1:d,street_2:m,city:p,state:u,country:h,phone:v,postalCode:g,notes:y,primary:b,invoices:_,reports:N,mailing:C};t!==ey.NEW&&0!==e.id||(n&&await n(l(o({},S),{clientId:a})),s&&s()),t!==ey.NEW&&(i&&await i(l(o({},S),{clientId:a,id:e.id})),f(!1))})(r),validationSchema:I,validateOnBlur:!0,enableReinitialize:!0,children:({handleBlur:e,handleChange:a,errors:n,touched:i,values:r,dirty:o,isValid:l,isSubmitting:c})=>R(W,{className:iy.form,children:[R("div",{className:iy.inputs,children:[p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"label",value:r.label,onChange:a,onBlur:e,placeholder:u("name-placeholder"),errorMessage:n.label,error:!!n.label&&i.label,type:"text",className:iy.formInput}),p(xr,{disabled:t===ey.MAILING&&!v&&!C,label:"country",name:"country",defaultValue:r.country,value:r.country,onChange:e=>{a(e),(e=>{A(e.target.value)})(e)},SelectDisplayProps:{style:{paddingTop:0}},children:null==ny?void 0:ny.map((e=>p(Z,{value:e,className:iy.locationSelect,children:e},e)))}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"street_1",value:r.street_1,onChange:a,onBlur:e,placeholder:u("street-1-placeholder"),errorMessage:n.street_1,error:!!n.street_1&&i.street_1,type:"text",className:iy.formInput}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"street_2",value:r.street_2,onCh
1ange:a,onBlur:e,placeholder:u("street-2-placeholder"),errorMessage:n.street_2,error:!!n.street_2&&i.street_2,type:"text",className:iy.formInput}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"city",value:r.city,onChange:a,onBlur:e,placeholder:u("city-placeholder"),errorMessage:n.city,error:!!n.city&&i.city,type:"text",className:iy.formInput}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"state",value:r.state,onChange:a,onBlur:e,placeholder:u("state-placeholder"),errorMessage:n.state,error:!!n.state&&i.state,type:"text",className:iy.formInput}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"postalCode",value:r.postalCode,onChange:a,onBlur:e,placeholder:u("zip-or-postcode-placeholder"),errorMessage:n.postalCode,error:!!n.postalCode&&i.postalCode,type:"text",className:iy.formInput,InputProps:"United States"===x?{inputComponent:ay}:{}}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"phone",value:r.phone,onChange:a,onBlur:e,placeholder:u("phone-placeholder"),errorMessage:n.phone,error:!!n.phone&&i.phone,type:"text",className:iy.formInput,InputProps:"United States"===x?{inputComponent:ty}:{}}),p(di,{disabled:t===ey.MAILING&&!v&&!C,name:"notes",value:r.notes,onChange:a,onBlur:e,placeholder:u("notes-placeholder"),errorMessage:n.notes,error:!!n.notes&&i.notes,type:"text",className:iy.formInput}),p("div",{}),t===ey.MAILING&&(v||C)&&(r.invoices||r.reports||g||b)&&R("div",{className:iy.switchesContainer,children:[p($t,{variant:"small",className:iy.switchTitle,children:p(mn,{html:u("receive-mailed-copies-of")})}),R("div",{className:iy.switches,children:[(r.invoices||!r.invoices&&g)&&R("div",{className:iy.switchContainer,children:[p(De,{disabled:t===ey.MAILING&&!v&&!C,name:"invoices",onChange:e=>{a(e),y(!0)},color:"primary",checked:r.invoices}),p($t,{className:iy.trueReportColor,children:u("invoices")})]}),(r.reports||!r.reports&&b)&&R("div",{className:iy.switchContainer,children:[p(De,{disabled:t===ey.MAILING&&!v&&!C,name:"reports",onChange:e=>{a(e),_(!0)},color:"primary",checked:r.reports}),p($t,{className:iy.trueReportColor,children:u("reports")})]})]})]}),(t===ey.OTHER||t===ey.NEW)&&R("div",{className:iy.switchesContainer,children:[p($t,{variant:"small",className:iy.switchTitle,children:u("primary-shipping-address")}),p("div",{className:iy.switches,children:R("div",{className:iy.switchContainer,children:[p(De,{name:"primary",onChange:a,color:"primary",checked:r.primary}),p($t,{className:!0===r.primary?iy.trueReportColor:iy.none,children:!0===r.primary?u("on"):u("off")})]})})]})]}),R("div",{className:iy.actions,children:[p(P,{className:iy.btn,size:"medium",variant:"contained",color:"tertiary",onClick:()=>t===ey.NEW?s&&s():f(!1),disabled:t===ey.MAILING&&!v&&!C,children:u("cancel")}),p(bi,{className:iy.btn,size:"medium",loading:c,color:"primary",variant:"contained",type:"submit",disabled:!l||!o||t===ey.MAILING&&!v&&!C,children:u(t===ey.NEW?"add-location":"save")})]})]})})})]})})})};var sy="MyLocations_container_1",oy="MyLocations_locationContainer_6",ly="MyLocations_description_11",cy="MyLocations_btnContainer_17",dy="MyLocations_btn_17",my="MyLocations_icon_27";const py=({clientAddresses:e})=>{var t,a,n;const i=Wt(),{activeClient:r,authenticatedUser:s}=m.exports.useContext(_a),{mutateAsync:o}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(nh.addAddress,{onSuccess:()=>
1{console.log("use add address success!"),e.invalidateQueries("getAllAddresses"),a.open(t("added-address-success"),{severity:"success"})},onError:e=>{console.log("failed to add new address error",e),a.open(fa(e,t("add-new-address-error")),{severity:"error"})}})})(),{mutateAsync:l}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(nh.deleteAddress,{onSuccess:()=>{e.invalidateQueries("getAllAddresses"),a.open(t("delete-address-success"),{severity:"success"})},onError:e=>{console.log("delete address error",e),a.open(fa(e,t("delete-address-error")),{severity:"error"})}})})(),{mutateAsync:c}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(nh.editAddress,{onSuccess:()=>{e.invalidateQueries("getAllAddresses"),a.open(t("edit-address-success"),{severity:"success"})},onError:e=>{console.log("failed to edit address",e),a.open(fa(e,t("edit-address-error")),{severity:"error"})}})})(),{openDialog:d,closeDialog:u}=m.exports.useContext(yo),[h,v]=m.exports.useState(!1),g=()=>v(!1),y=null==e?void 0:e.find((e=>!0===e.mailing)),b=null==e?void 0:e.find((e=>!0===e.primary)),_=null==e?void 0:e.filter((e=>!0!==e.primary&&!0!==e.mailing));return R("div",{className:sy,children:[p(Vt,{variant:"h5",children:i("my-locations")}),p("div",{className:oy,children:p($g,{aside:p("div",{className:ly,children:p($t,{variant:"small",children:i("aside-my-locations-text")})}),formContent:p(ry,{myLocation:null!=y?y:Xg,mailType:ey.MAILING,closeNewLocationForm:g,editAddress:c,addAddress:o,activeClientId:null!=(t=null==r?void 0:r.id)?t:0})})}),p("div",{className:oy,children:p($g,{formContent:p(ry,{myLocation:null!=b?b:Xg,mailType:ey.SHIPPING,closeNewLocationForm:g,editAddress:c,activeClientId:null!=(a=null==r?void 0:r.id)?a:0})})}),R("div",{className:oy,children:[p(Vt,{variant:"h5",children:i("other-locations")}),p("div",{className:cy,children:p(P,{onClick:()=>v(!0),className:dy,variant:"text",size:"small",color:"secondary",startIcon:p(Sn,{spriteUrl:xv,className:my}),children:i("add-other-locations")})}),h&&p($g,{formContent:p(ry,{myLocation:Xg,mailType:ey.NEW,addAddress:o,closeNewLocationForm:g,activeClientId:null!=(n=null==r?void 0:r.id)?n:0})}),null==_?void 0:_.map(((e,t)=>{var a;return p($g,{formContent:p(ry,{myLocation:e,mailType:ey.OTHER,closeNewLocationForm:g,editAddress:c,deleteAddress:l,openDialog:d,closeDialog:u,activeClientId:null!=(a=null==r?void 0:r.id)?a:0},t)},t)}))]})]})};var uy="ClientSettings_container_1",hy="ClientSettings_formsContainer_6";const vy=()=>{var e;const t=Wt(),{activeClient:a}=m.exports.useContext(_a),{data:n,isLoading:i}=Tv(),{data:r,isLoading:s}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getAllFaxes"],(()=>nh.getAllFaxes(e)),{keepPreviousData:!0,onSuccess:e=>{console.log("Get all faxes",e)},onError:e=>{console.error("Get all faxes error",e),a.open(fa(e,t("get-all-team-members-error")),{severity:"error"})}})})({clientId:null!=(e=null==a?void 0:a.id)?e:0});(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);x(nh.addFax,{onSuccess:n=>{console.log("successfully created fax",n),e.invalidateQueries("getAllFaxes"),a.open(t("add-fax-success"),{severity:"success"})},onError:e=>{console.log("failed to create fax error",e),a.open(fa(e,t("add-team-member-error")),{severity:"error"})}})})(),(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);x(nh.editFax,{onSuccess:n=>{console.log("edit fax success",n),e.invalidateQueries(["getAllFaxes"]),a.open(t("edit-fax-success"),{severity:"success"})},onError:e=>{console.error("edit fax error",e),a.open(fa(e,t("edit-team-member-error")),{severity:"error"})}})})(),(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);x(nh.deleteFax,{onSuccess:n=>{console.log("Delete fax success",n),e.invalidateQueries(["getAllFaxes"]),a.open(t("delete-fax-success"),{severity:"success"})},onError:e=>{console.error("Delete fax error",e),a.open(fa(e,t("delete-team-member-error")),{severity:"error"})}})})();const o={name:null==a?void 0:a.name,officialBusinessName:null==a?void 0:a.officialBusinessName,businessType:null==a?void 0:a.businessType};return z().shape({label:Ni(t("field-error-required",{field:t("label")})),fax:Ni(t("field-error-required",{field:t("fax")}))}),i||s?p(pn,{className:"spinnerCenter"}):R("div",{className:uy,children:[p(Vt,{variant:"h4",children:t("client-settings")}),R("div",{className:hy,children:[p(Kg,{clientInformation:o}),p(py,{clientAddresses:null!=n?n:[]})]})]})};var gy="CourierAsideCollapse_asideContainer_1",yy="CourierAsideCollapse_container_6",by="CourierAsideCollapse_phoneNumberTextColor_11",_y="CourierAsideCollapse_header_18",Ny="CourierAsideCollapse_iconContainer_23",fy="CourierAsideCollapse_icon_23",Cy="CourierAsideCollapse_collapse_27";const Sy=()=>{const e=Wt(),[t,a]=m.exports.useState(!1),[n,i]=m.exports.useState(!1),[r,s]=m.exports.useState(!1),o=e("urgent-sample-number");return R(tg,{className:gy,children:[R("div",{className:yy,children:[R("header",{className:_y,children:[p(Vt,{variant:"h6",children:e("urgent-sample")}),p("div",{className:Ny,children:p(F,{onClick:()=>a(!t),size:"small",children:p(Sn,{className:fy,spriteUrl:t?Yi:Vi})})})]}),p(j,{in:t,timeout:"auto",className:Cy,children:R($t,{children:[e("if-you-have-an-urgent-sample"),p("a",{href:`tel:${null==o?void 0:o.replace(/\D/g,"")}`,className:by,children:e("urgent-sample-number")})]})})]}),R("div",{className:yy,children:[R("header",{className:_y,children:[p(Vt,{variant:"h6",children:e("courier-requests")}),p("div",{className:Ny,children:p(F,{onClick:()=>i(!n),size:"small",children:p(Sn,{className:fy,spriteUrl:n?Yi:Vi})})})]}),p(j,{in:n,timeout:"auto",className:Cy,children:p($t,{children:e("courier-requests-for-same-day-service")})})]}),R("div",{className:yy,children:[R("header",{className:_y,children:[p(Vt,{variant:"h6",children:e("courier-service")}),p("div",{className:Ny,children:p(F,{onClick:()=>s(!r),size:"small",children:p(Sn,{className:fy,spriteUrl:r?Yi:Vi})})})]}),p(j,{in:r,timeout:"auto",className:Cy,children:p($t,{children:e("courier-service-is-available-year-round")})})]})]})};var xy="CourierDetailsModal_container_1",Ay="CourierDetailsModal_header_8",Iy="CourierDetailsModal_closeIcon_14",wy="CourierDetailsModal_timeline_26",Ty="CourierDetailsModal_connectorLine_32",Ry="CourierDetailsModal_timelineItem_39",ky="CourierDetailsModal_textContainer_44",Ey="CourierDetailsModal_textGray_50",My="CourierDetailsModal_iconContainer_53",Dy="CourierDetailsModal_logoIcon_62";const Py=({courierRequest:e,handleCloseModal:t})=>{const a=Wt();return R("div",{className:xy,children:[R("div",{className:Ay,children:[p(Vt,{variant:"h4",children:a("courier-request-status")}),p(Sn,{className:Iy,spriteUrl:jr,onClick:t})]}),R("main",{children:[p($t,{variant:"standard",children:a("shipment-status")}
1),R("div",{className:wy,children:[R("div",{className:Ry,children:[p("div",{className:My,children:p(Sn,{className:Dy,spriteUrl:ir})}),R("div",{className:ky,children:[p($t,{variant:"standard",children:a("the-order-has-been",{orderStatus:"Received"})}),p($t,{variant:"standard",className:Ey,children:e&&Uu(e.createdAt)})]})]}),p("div",{className:Ty}),R("div",{className:Ry,children:[p("div",{className:My,children:p(Sn,{className:Dy,spriteUrl:ir})}),R("div",{className:ky,children:[p($t,{variant:"standard",children:a("the-order-has-been",{orderStatus:null==e?void 0:e.status})}),p($t,{variant:"standard",className:Ey,children:e&&Uu(e.updatedAt)})]})]})]})]})]})};var Ly,By;(By=Ly||(Ly={})).PENDING="pending",By.CONFIRMED="confirmed",By.CANCELLED="cancelled";var Oy,Fy,Hy=Ly;(Fy=Oy||(Oy={})).REQUESTED_ON="createdAt",Fy.SCHEDULED="updatedAt",Fy.ADDRESS="address",Fy.STATUS="status",Fy.MORE_INFO="moreInfo";var Uy=Oy;var zy="CourierRequestStatus_container_1",Gy="CourierRequestStatus_cancelledBackground_6",qy="CourierRequestStatus_confirmedBackground_10",Wy="CourierRequestStatus_receivedBackground_14",Vy="CourierRequestStatus_text_18",Yy="CourierRequestStatus_cancelledText_23",jy="CourierRequestStatus_confirmedText_27",$y="CourierRequestStatus_receivedText_31";const Qy=({status:e})=>p("div",{className:I(zy,{[qy]:e===Hy.CONFIRMED,[Wy]:e===Hy.PENDING,[Gy]:e===Hy.CANCELLED}),children:p($t,{variant:"small",className:I(Vy,{[jy]:e===Hy.CONFIRMED,[$y]:e===Hy.PENDING,[Yy]:e===Hy.CANCELLED}),children:e.toLowerCase()})});var Ky="CourierRequestMobileAndTabletCard_container_1",Xy="CourierRequestMobileAndTabletCard_courierRequestKeyAndValueTextContainer_9",Zy="CourierRequestMobileAndTabletCard_grayText_13",Jy="CourierRequestMobileAndTabletCard_redText_16";const eb=({courierRequest:e,setCourierRequest:t,setModal:a})=>{const n=Wt();return R("div",{className:Ky,children:[p(Qy,{status:e.status}),R("div",{className:Xy,children:[R($t,{className:Zy,children:[n("requested-on"),":"]}),p($t,{children:Uu(e.createdAt)})]}),R("div",{className:Xy,children:[R($t,{className:Zy,children:[n("scheduled"),":"]}),p($t,{children:Uu(e.updatedAt)})]}),R("div",{className:Xy,children:[R($t,{className:Zy,children:[n("address-mandatory"),":"]}),p($t,{children:e.address})]}),R("div",{className:Xy,children:[R($t,{className:Zy,children:[n("more-info"),":"]}),p($t,{className:Jy,onClick:()=>{t(e),a(!0)},children:n("view")})]})]})};var tb="CourierRequestMobileAndTabletCardList_container_1";const ab=({courierRequests:e,setCourierRequest:t,numberOfCourierRequests:a,courierRequestsQueryOptions:n,setCourierRequestsQueryOptions:i,setModal:r})=>R("div",{className:tb,children:[e.map((e=>p(eb,{courierRequest:e,setCourierRequest:t,setModal:r},e.id))),p(nv,{totalItems:a,currentPage:n.start,cardsPerPage:n.length,cardsPerPageOptions:[10,25,50],onCardsPerPageChange:e=>{i((t=>l(o({},t),{start:1,length:e})))},onGoPreviousPage:()=>{i((e=>l(o({},e),{start:e.start-1})))},onGoNextPage:()=>{i((e=>l(o({},e),{start:e.start+1})))}})]});var nb="CourierRequestsColumns_viewText_1",ib="CourierRequestsColumns_tableHeaderTruncate_7";var rb="RequestCourierFailure_container_1",sb="RequestCourierFailure_etsAddressContainer_8",ob="RequestCourierFailure_link_13",lb="RequestCourierFailure_number_19";const cb=()=>{const e=Wt(),t=f(),a=e("urgent-sample-number");return R("div",{className:rb,children:[p($t,{variant:"standardSemiBold",children:e("no-available-locations")}),p($t,{children:e("none-of-pacific-wines-locations")}),p($t,{children:e("but-ets-can-still-help")}),R("div",{className:sb,children:[p($t,{variant:"bigSemiBold",children:"899 Adams Street"}),p($t,{variant:"bigSemiBold",children:"Suite A"}),p($t,{variant:"bigSemiBold",children:"St. Helena, CA"})]}),p($t,{className:ob,onClick:()=>t(Tt.CONTACT),children:e("learn-more-about-shipping")}),R($t,{children:[e("if-you-have-any-questions-contact")," ",p("a",{href:`tel:${null==a?void 0:a.replace(/\D/g,"")}`,className:lb,children:e("urgent-sample-number")})]})]})};var db={container:"RequestCourierForm_container_1",form:"RequestCourierForm_form_1",formErrorMessage:"RequestCourierForm_formErrorMessage_19"};const mb=({values:e,setFieldValue:t,onBlur:a,handleChange:n,errors:i,touched:r})=>{const s=Wt(),{activeClient:c}=m.exports.useContext(_a),{data:d}=Tv(),u=null==d?void 0:d.map((e=>l(o({},e),{id:e.id.toString()})));return R("div",{className:db.container,children:[p("div",{className:db.formHeader,children:p($t,{variant:"standardSemiBold",children:null==c?void 0:c.name})}),R("div",{className:db.form,children:[R(K,{variant:"standard",error:!0,children:[p(Me,{id:"address-required-helper
1-text",children:s("required-field")}),R(xr,{label:"company-address",name:"addressId",onChange:e=>{t("addressId",e.target.value);const a=null==u?void 0:u.find((t=>t.id===e.target.value));t("address",`${null==a?void 0:a.street_1}, ${null==a?void 0:a.city}, ${null==a?void 0:a.state}, ${null==a?void 0:a.postalCode}`)},value:e.addressId,children:[p(Z,{value:"",disabled:!0,selected:!0,children:s("company-address")}),null==u?void 0:u.map((({id:e,street_1:t,city:a,country:n})=>p(Z,{sx:{textTransform:"capitalize"},value:e,children:`${t}, ${a}, ${n}`},e)))]}),!!i.address&&r.address&&p(Me,{className:db.formErrorMessage,children:i.address})]}),R(K,{variant:"standard",error:!0,children:[p(Me,{id:"phone-number-required-helper-text",children:s("required-field")}),p(di,{name:"phoneNumber",placeholder:s("phone-number-mandatory"),value:e.phoneNumber,onChange:e=>t("phoneNumber",e.target.value),onBlur:a,errorMessage:i.phoneNumber,error:!!i.phoneNumber&&r.phoneNumber,type:"text",InputProps:{inputComponent:ty}})]}),R(K,{variant:"standard",children:[p(Me,{id:"instructions-optional-helper-text",children:s("optional")}),p(di,{name:"instructions",placeholder:s("special-instructions"),value:e.instructions,onChange:e=>t("instructions",e.target.value),type:"textarea"})]})]})]})};var pb="RequestCourierSuccess_container_1",ub="RequestCourierSuccess_textContainer_7",hb="RequestCourierSuccess_iconContainer_12",vb="RequestCourierSuccess_icon_12";const gb=()=>{const e=Wt();return R("div",{className:pb,children:[R("div",{className:ub,children:[p($t,{variant:"bigSemiBold",children:e("request-sent-successfully")}),p($t,{variant:"standardSemiBold",children:e("we-received-your-pickup-request")}),p($t,{children:e("we-will-contact-you-at-the-phone-number")})]}),p("div",{className:hb,children:p(Sn,{spriteUrl:"/assets/greenSuccessCircleIcon.bf744987.svg",className:vb})})]})},yb={clientId:"",address:"",addressId:"",phoneNumber:"",instructions:"",nextDayService:!1};const bb=new class{async getCourierRequests({clientId:e,start:t,length:a}){const n=ln({page:t,length:a}),i=aa.responseHandler(await aa.get(`/clients/${e}/courier_requests.json`,{params:na(n,ca)}));return na(i,oa)}async requestCourier(e){const t=aa.responseHandler(await aa.post("/courier_requests.json",na(e,ca)));return na(t,oa)}};var _b="/assets/exportIcon.89f5f8a6.svg";var Nb={container:"CourierRequests_container_1",titleContainer:"CourierRequests_titleContainer_6",requestCourierContainer:"CourierRequests_requestCourierContainer_11",courierFormButtonAndFormContainer:"CourierRequests_courierFormButtonAndFormContainer_23",formInstructionsContainer:"CourierRequests_formInstructionsContainer_29",icon:"CourierRequests_icon_43",courierFormContainer:"CourierRequests_courierFormContainer_48",courierFormButton:"CourierRequests_courierFormButton_23",asideInfoContainer:"CourierRequests_asideInfoContainer_58",instructionsContainer:"CourierRequests_instructionsContainer_69",pastCutoffContainer:"CourierRequests_pastCutoffContainer_88",courierTableContainer:"CourierRequests_courierTableContainer_114",dataGridHeader:"CourierRequests_dataGridHeader_120",button:"CourierRequests_button_135"};const fb=()=>{var e,t,a,n,i;const r=Wt(),s=h(),l=A(s.breakpoints.up("lg")),{activeClient:c}=m.exports.useContext(_a),[d,u]=m.exports.useState({clientId:null!=(e=null==c?void 0:c.id)?e:0,start:1,length:10}),[v,g]=m.exports.useState(null),{data:y,isFetched:b}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getCourierRequests",e],(()=>bb.getCourierRequests(e)),{onSuccess:e=>{console.log("Get courier requests",e)},onError:e=>{console.error("Get courier requests error",e),a.open(fa(e,t("get-courier-requests-error")),{severity:"error"})}})})(d),[_,N]=m.exports.useState(!1),{mutateAsync:f,isLoading:S,isSuccess:I,isError:w}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(bb.requestCourier,{onSuccess:e=>{a.invalidateQueries("getCourierRequests"),console.log("Request courier success",e)},onError:a=>{console.error("Request courier error",a),t.open(fa(a,e("request-courier-error")),{severity:"error"})}})})(),[T,k]=m.exports.useState(!1),E=(e=>{const t=Wt();return[{field:Uy.REQUESTED_ON,renderHeader:()=>
1p(me,{title:t("requested-on"),children:p("div",{children:p(Vt,{variant:"h5",className:ib,children:t("requested-on")})})}),renderCell:({row:e})=>p($t,{children:Uu(e.createdAt)}),sortable:!0,flex:1},{field:Uy.ADDRESS,renderHeader:()=>p(me,{title:t("address-mandatory"),children:p("div",{children:p(Vt,{variant:"h5",className:ib,children:t("address-mandatory")})})}),flex:2,sortable:!1},{field:Uy.STATUS,renderHeader:()=>p(me,{title:t("status"),children:p("div",{children:p(Vt,{variant:"h5",className:ib,children:t("status")})})}),renderCell:({row:e})=>p(Qy,{status:e.status}),flex:1,sortable:!0},{field:Uy.MORE_INFO,renderHeader:()=>p(me,{title:t("more-info"),children:p("div",{children:p(Vt,{variant:"h5",className:ib,children:t("more-info")})})}),renderCell:({row:e})=>p($t,{className:nb,children:t("view")}),flex:1,sortable:!1}]})(null==c?void 0:c.id),M=z().shape({phoneNumber:Ni(r("field-error-required",{field:r("phone-number-mandatory")})),address:Ni(r("field-error-required",{field:r("company-address")}))});m.exports.useEffect((()=>{(w||I)&&N(!0)}),[I,w]);const[D,B]=m.exports.useState(!1),[O,F]=m.exports.useState(D);m.exports.useEffect((()=>{const e=new Date,t=new Date;t.setHours(10,0,0),B(e>t)}),[]);return R("div",{className:Nb.container,children:[R("div",{className:Nb.titleContainer,children:[p(Vt,{variant:"h4",children:r("request-courier")}),(!1===D||!0===O)&&p(Vt,{variant:"h5",children:r(_&&I?"courier-scheduled":"schedule-a-new-courier")})]}),!_&&D&&!O&&p("div",{className:Nb.requestCourierContainer,children:p("div",{className:Nb.pastCutoffContainer,children:R("div",{className:Nb.instructionsContainer,children:[p("div",{className:Nb.titleContainer,children:p("h3",{children:"Courier Requests for same-day service must be requested before 10:00 AM."})}),p("div",{className:Nb.instructionsBody,children:R("h4",{children:["If you have an urgent sample, please call us to see if our driver is still in your area: Â ",p("a",{href:"tel:707 963-4806",className:Nb.phoneNumberTextColor,children:"707 963-4806"})]})}),p("div",{className:Nb.instructionsBody,children:p("h4",{children:"Would you like to schedule a pick-up for tomorrow?"})}),p("div",{className:Nb.instructionsBody,children:p(P,{variant:"contained",color:"primary",onClick:()=>{F(!O)},children:"Yes, continue to next step..."})})]})})}),!_&&(!1===D||!0===O)&&p(q,{initialValues:o({},yb),onSubmit:e=>(async e=>{var t;const{address:a,addressId:n,phoneNumber:i,instructions:r}=e;await f({clientId:null!=(t=null==c?void 0:c.id)?t:0,address:a,addressId:Number(n),phoneNumber:i,instructions:r})})(e),validationSchema:M,validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,children:({isValid:e,handleChange:t,handleBlur:a,errors:n,touched:i,values:s,setFieldValue:o,dirty:l,isSubmitting:c})=>p(W,{children:R("div",{className:Nb.requestCourierContainer,children:[R("div",{className:Nb.courierFormButtonAndFormContainer,children:[R("div",{className:Nb.formInstructionsContainer,children:[p(Sn,{spriteUrl:ah,className:Nb.icon}),p($t,{children:"Company Address and Phone Number are required fields."})]}),p("div",{className:Nb.courierFormContainer,children:p(mb,{values:s,setFieldValue:o,onBlur:a,handleChange:t,touched:i,errors:n})}),p("div",{className:Nb.courierFormButton,children:p(bi,{type:"submit",variant:"contained",loading:S,color:"primary",children:r("submit")})})]}),R("aside",{className:Nb.asideInfoContainer,children:[R("div",{className:Nb.instructionsContainer,children:[p(Sn,{spriteUrl:ah,className:Nb.icon}),p($t,{children:r("for-same-day-pick-up-text")})]}),p("div",{className:Nb.collapseContainer,children:p(Sy,{})})]})]})})}),_&&R("div",{className:Nb.requestCourierContainer,children:[R("div",{className:Nb.courierFormButtonAndFormContainer,children:[R("div",{className:Nb.courierFormContainer,children:[I&&p(gb,{}),w&&p(cb,{})]}),p("div",{className:Nb.courierFormButton,children:p(P,{variant:"contained",color:"primary",onClick:()=>N(!1),children:r(I?"ok-got-it":"go-back")})})]}),R("aside",{className:Nb.asideInfoContainer,children:[R("div",{className:Nb.instructionsContainer,children:[p(Sn,{spriteUrl:ah,className:Nb.icon}),p($t,{children:r("for-same-day-pick-up-text")})]}),p("div",{className:Nb.collapseContainer,children:p(Sy,{})})]})]}),(!1===D||!0===O)&&R("div",{className:Nb.courierTableContainer,children:[R("div",{className:Nb.dataGridHeader,children:[p(Vt,{variant:"h5",children:r("courier-orders")}),p(P,{startIcon:p(Sn,{className:Nb.icon,spriteUrl:_b}),variant:"contained",color:"secondary",className:Nb.button,disabled:0===(null==y?void 0:y.data.length),href:(H=null!=(t=null==c?void 0:c.id)?t:0,`https://webapi.etslabs.com/clients/${H}/courier_requests/export_to_csv`),download:!0,children:r("export-csv")})]}),l&&p(Lu,{isLoading:!b,onRowClick:e=>{"moreInfo"===e.field&&(g(e.row),k(!0))},rowCount:null!=(a=null==y?void 0:y.recordsTotal)?a:0,rows:(null==y?void 0:y.data)||[],setQueryOptions:u,clickableRows:!0,columns:E,pageSize:d.length,noRowsLabel:r("no-courier-requests")}),!l&&(0===(null==y?void 0:y.data.length)?p(Eh,{noRowsLabel:r("no-courier-requests")}):p(ab,{courierRequests:null!=(n=null==y?void 0:y.data)?n:[],courierRequestsQueryOptions:d,setCourierRequestsQueryOptions:u,numberOfCourierRequests:null!=(i=null==y?void 0:y.recordsTotal)?i:0,setCourierRequest:g,setModal:k})),p(wi,{open:T,setModal:()=>k(!1),children:p(Py,{courierRequest:v,handleCloseModal:()=>k(!1)})})]})]});var H};const Cb=new class{async getReportBatches({clientId:e,searchPhrase:t,startDate:a,endDate:n,length:i,start:r}){const s=ln({searchPhrase:t,startDate:a,endDate:n,length:i,start:r}),c=aa.responseHandler(await aa.get(`/clients/${e}/batches/dashboard_index?`,{params:s})),d=c.data.map((e=>l(o({},e),{isRowExpanded:!1}))).map((e=>e.samples.map(((e,t)=>l(o({},e),0===t?{isFirstInBatch:!0}:{isFirstInBatch:!1}))))).flat();return na({totalBatches:c.totalBatches,dataGrid:d,mobile:c.data},oa)}async getReportBatchDetails({clientId:e,batchId:t}){const a=ln({clientId:e,batchId:t}),n=aa.responseHandler(await aa.get(`/clients/${e}/batches/${t}.json`,{params:a}));return na({data:n},oa)}async getSampleDetails({clientId:e,batchId:t,friendlyNumber:a}){const n=aa.responseHandler(await aa.get(`/clients/${e}/batches/${t}/samples/${a}.json`));return na({data:n},oa)}async getAnalysisDetails({clientId:e,sampleId:t}){const a=aa.responseHandler(await aa.get(`/clients/${e}/results/${t}.json`));return na({data:a},oa)}async getResultsByAnalysis({clientId:e,start:t,length:a,searchPhrase:n,startDate:i,endDate:r,sortOption:s,level:l}){const c=ln({start:t,length:a,searchPhrase:n,startDate:i,endDate:r,level:l}),d=aa.responseHandler(await aa.get(`/clients/${e}/results.json`,{params:o(o({},c),s)}));return na(d,oa)}async exportResultsByAnalysis({clientId:e,searchTerm:t,startDate:a,endDate:n,length:i}){const r=ln({searchTerm:t,startDate:a,endDate:n,length:i});return aa.responseHandler(await aa.get(`/clients/${e}/results/export.json`,{params:o({},r)}))}async exportAllBatchesReport({clientId:e,searchTerm:t,startDate:a,endDate:n,length:i}){const r=ln({searchTerm:t,startDate:a,endDate:n,length:i});return aa.responseHandler(await aa.get(`/clients/${e}/batches/export.json`,{params:o({},r)}))}async exportBatchReport({clientId:e,batchId:t}){return aa.responseHandler(await aa.get(`/clients/${e}/batches/export.json?batch_id=${t}`))}async exportAllResultsForSample({clientId:e,batchId:t,sampleId:a}){return aa.responseHandler(await aa.get(`/clients/${e}/batches/export.json?batch_id=${t}&sample_number=${a}`))}};var Sb="TextTruncateWithTooltip_textTruncate_1";
1const xb=({text:e,variant:t})=>p(me,{title:null!=e?e:"",children:p(u,{variant:t,component:"span",className:Sb,children:e})});var Ab="ResultsByAnalysisColumns_tableHeaderTruncate_1";var Ib="CardList_list_1";const wb=({children:e})=>p("ul",{className:Ib,children:e});var Tb="Card_card_1",Rb="Card_linearLoading_11",kb="Card_cardExpanded_17",Eb="Card_header_20",Mb="Card_title_26",Db="Card_headerIcon_31",Pb="Card_iconUp_36",Lb="Card_content_39";const Bb=({title:e,titleClassName:t="",subtitle:a,cardContent:n,expandedCardContent:i,isFetching:r,fetchExpandedCardContent:s,onContentClick:o})=>{const[l,c]=m.exports.useState(!0);return R(ee,{className:I(Tb,{[kb]:l}),elevation:0,children:[r&&p(Ne,{className:Rb}),R("header",{className:Eb,onClick:async()=>{s&&await s(),c(!l)},children:[R("div",{className:Mb,children:[p(Vt,{variant:"h6",className:t,children:e}),a&&p($t,{variant:"small",children:a})]}),p(Sn,{spriteUrl:Vi,className:I(Db,{[Pb]:l})})]}),R("div",{className:Lb,onClick:o,children:[n,p(j,{in:l,timeout:"auto",children:i}
1)]})]})};var Ob="CardInfoItem_info_1",Fb="CardInfoItem_label_6",Hb="CardInfoItem_value_9";const Ub=({label:e,value:t,isValueHighlighted:a,className:n=""})=>{const i=Wt();return R("div",{className:I(Ob,n),children:[R($t,{className:Fb,children:[i(e),":"]}),a?p(Vt,{variant:"h6",className:Hb,children:t}):p($t,{className:Hb,children:t||i("not-available")})]})};var zb="AnalysisResultCard_cardContent_1";const Gb=({item:e})=>{var t;const a=f();return p(Bb,{onContentClick:()=>a(Q(Tt.ANALYSIS_DETAILS,{batchId:e.reportBatchId,sampleId:e.friendlyNumber,id:e.id.toString()})),title:e.description,cardContent:R("div",{className:zb,children:[p(Ub,{label:"analysis",value:e.analyte,isValueHighlighted:!0}),p(Ub,{label:"logged-date",value:Uu(e.loggedAt)})]}),expandedCardContent:R("div",{className:zb,children:[p(Ub,{label:"group-id",value:e.reportBatchId}),p(Ub,{label:"sample-id",value:e.friendlyNumber}),p(Ub,{label:"result",value:e.formattedResult}),p(Ub,{label:"panel",value:null!=(t=e.panelDescription)?t:"-"})]})})},qb=({data:e,totalItems:t,queryOptions:a,setQueryOptions:n})=>{const i=Wt();return p(k,{children:0===e.length?p(Eh,{noRowsLabel:i("no-results")}):R(k,{children:[p(wb,{children:e.map(((e,t)=>p(Gb,{item:e},t)))}),p(nv,{totalItems:t,currentPage:a.start,cardsPerPage:a.length,cardsPerPageOptions:[50,100],onCardsPerPageChange:e=>{n((t=>l(o({},t),{start:1,length:e})))},onGoPreviousPage:()=>{n((e=>l(o({},e),{start:e.start-1})))},onGoNextPage:()=>{n((e=>l(o({},e),{start:e.start+1})))}})]})})},Wb=({resultsByAnalysisQueryOptions:e,setResultsByAnalysisQueryOptions:t,setExportNumResults:a})=>{var n,i,r;const s=Wt(),o=h(),l=f(),c=A(o.breakpoints.up("lg")),{data:d,isFetched:u}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getResultsByAnalysis",e],(()=>Cb.getResultsByAnalysis(e)),{keepPreviousData:!0,onSuccess:e=>{console.log("get results by analysis",e)},onError:e=>{a.open(fa(e,t("get-results-by-analysis-error")),{severity:"error"})}})})(e),v=(null==d?void 0:d.data.some((e=>"Pending Validation"===e.validationStatus)))||!1,g=-1!=document.cookie.indexOf("preLimResultsAgreement"),y=v&&!g;m.exports.useMemo((()=>{a((null==d?void 0:d.totalItems)&&(null==d?void 0:d.totalItems)>500?null==d?void 0:d.totalItems:500),y&&u&&(null==d?void 0:d.data)&&(d.data=null==d?void 0:d.data.map((e=>(e.formattedResult="Preliminary",e))))}),[u,d]);const b=(()=>{const e=Wt();return[{sortable:!0,field:Iu.LOGGED_AT,renderHeader:()=>p(me,{title:e("logged"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("logged")})})}),flex:1,renderCell:({row:e})=>p($t,{children:Gu(e.loggedAt)})},{field:Iu.REPORT_BATCH_ID,renderHeader:()=>p(me,{title:e("group-id"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("group-id")})})}),flex:1,sortable:!0,renderCell:e=>p($t,{children:e.value})},{field:Iu.FRIENDLY_NUMBER,renderHeader:()=>p(me,{title:e("sample-id"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("sample-id")})})}),flex:1,sortable:!0,renderCell:e=>p($t,{children:e.value})},{field:Iu.DESCRIPTION,renderHeader:()=>p(me,{title:e("sample-name"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("sample-name")})})}),flex:2,sortable:!0,renderCell:e=>p(xb,{variant:"h6",text:e.value})},{field:Iu.ANALYTE,renderHeader:()=>p(me,{title:e("analysis"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("analysis")})})}),flex:2,sortable:!0,renderCell:e=>p(xb,{variant:"h6",text:e.value})},{field:Iu.FORMATTED_RESULT,renderHeader:()=>p(me,{title:e("result"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("result")})})}),flex:1,sortable:!0,renderCell:e=>p($t,{children:e.value})},{field:Iu.PANEL_DESCRIPTION,renderHeader:()=>p(me,{title:e("panel"),children:p("div",{children:p(Vt,{variant:"h6",className:Ab,children:e("panel")})})}),flex:2,sortable:!0,renderCell:e=>p(xb,{variant:"p",text:e.value})}]})();return u?R(k,{children:[u&&!c&&p(qb,{data:null!=(n=null==d?void 0:d.data)?n:[],totalItems:null!=(i=null==d?void 0:d.totalItems)?i:0,queryOptions:e,setQueryOptions:t}),u&&c&&p(Lu,{rowCount:null!=(r=null==d?void 0:d.totalItems)?r:0,isLoading:!u,rows:(null==d?void 0:d.data)||[],setQueryOptions:t,clickableRows:!0,columns:b,pageSize:e.length,page:e.start,onRowClick:({row:e})=>{l(Q(Tt.ANALYSIS_DETAILS,{batchId:e.reportBatchId,sampleId:e.friendlyNumber,id:e.id}))},getRowId:e=>e.id,components:{Row:void 0},noRowsLabel:s("no-results")})]}):p(k,{})};var Vb="ResultsToolbar_container_1",Yb="ResultsToolbar_viewAsOptionsButtons_13",jb="ResultsToolbar_buttonGroup_25",$b="ResultsToolbar_button_25",Qb="ResultsToolbar_filtersAndExport_39",Kb="ResultsToolbar_filterInputs_51",Xb="ResultsToolbar_searchBar_68",Zb="ResultsToolbar_datePickers_82",Jb="ResultsToolbar_datePicker_82",e_="ResultsToolbar_inputAdornment_93",t_="ResultsToolbar_exportCsvContainer_96",a_
1="ResultsToolbar_exportCsvButton_96",n_="ResultsToolbar_svgIcon_100",i_="ResultsToolbar_dateInput_105",r_="ResultsToolbar_inputField_110",s_="ResultsToolbar_clearContainer_146",o_="ResultsToolbar_clearButton_150",l_="ResultsToolbar_calendarIcon_164",c_="ResultsToolbar_formControlRoot_170";const d_=function({setQueryOptions:e,queryOptions:t,resultsType:a,setResultsType:n,setSharedQueryOptions:i,clientId:r,exportNumResults:s}){const c=Wt(),d=h(),u=A(d.breakpoints.up("lg")),[v,g]=m.exports.useState(!1),[y,b]=m.exports.useState(t.searchPhrase),_=Qt(y,250);f();const N={searchPhrase:"",startDate:null,endDate:null},C={clientId:r,searchTerm:null==t?void 0:t.searchPhrase,startDate:null==t?void 0:t.startDate,endDate:null==t?void 0:t.endDate,length:s},[S,x]=m.exports.useState({startDate:!1,endDate:!1}),{refetch:w}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["exportResultsByAnalysis",e.clientId],(()=>Cb.exportResultsByAnalysis(e)),{keepPreviousData:!0,enabled:!1,onSuccess:()=>{console.log("results by analysis sent to mail"),a.open(t("sent-to-mail-success"),{severity:"success"})},onError:e=>{console.log("results by analysis sent to mail error",e),a.open(fa(e,t("export-results-analysis-error")),{severity:"error"})}})})(C),{refetch:T}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["exportBatchesReport",e.clientId],(()=>Cb.exportAllBatchesReport(e)),{keepPreviousData:!0,enabled:!1,onSuccess:()=>{console.log("batches report sent to mail"),a.open(t("sent-to-mail-success"),{severity:"success"})},onError:e=>{console.log("batches report sent to mail error",e),a.open(fa(e,t("export-batches-report-error")),{severity:"error"})}})})(C),k=e=>{e===hu.SAMPLE?n(hu.SAMPLE):e===hu.RESULTS_BY_ANALYSIS&&n(hu.RESULTS_BY_ANALYSIS)};return m.exports.useEffect((()=>{v?i((e=>l(o({},e),{searchPhrase:_}))):g(!0)}),[_]),m.exports.useEffect((()=>{b(t.searchPhrase)}),[t]),R("div",{className:Vb,children:[p(Vt,{variant:"h4",children:c("dashboard-menu-results")}),R("div",{className:Yb,children:[u?p(Vt,{variant:"h6",children:c("view-as")}):p($t,{children:c("view-as")}),R(Ie,{className:jb,children:[p(P,{className:$b,variant:"contained",color:a===hu.SAMPLE?"primary":"secondary",onClick:()=>k(hu.SAMPLE),children:p($t,{children:p(me,{arrow:!0,title:"Search for sample names and descriptions. Use the Analysis tab to search using the name of specific analyses.",children:p("span",{children:"Samples"})})})}),p(P,{variant:"contained",color:a===hu.SAMPLE?"secondary":"primary",className:$b,onClick:()=>k(hu.RESULTS_BY_ANALYSIS),children:p($t,{children:c("analysis-results")})})]})]}),R("div",{className:Qb,children:[R("div",{className:Kb,children:[R("div",{className:Xb,children:[p($t,{children:p(me,{arrow:!0,title:"Search for sample names and descriptions. Use the Analysis tab to search using the name of specific analyses.",children:p("span",{children:"Filter"})})}),p(H,{className:I(r_,c_),name:"search",value:y,onChange:e=>b(null==e?void 0:e.target.value),placeholder:a===hu.SAMPLE?c("enter-a-sample-name"):c("search-all-test-results")})]}),R("div",{className:Zb,children:[p(Ce,{dateAdapter:Se,children:R("div",{className:Jb,children:[p($t,{children:c("from")}),p(xe,{componentsProps:{actionBar:{actions:["clear"]}},open:S.startDate,onOpen:()=>x({startDate:!0,endDate:!1}),onClose:()=>x({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:l_})},InputAdornmentProps:{className:e_},value:t.startDate?Ae(t.startDate.toString()):null,onChange:e=>i((t=>l(o({},t),{startDate:e?fh(e):null}))),renderInput:e=>p(H,l(o({onClick:()=>x({startDate:!0,endDate:!1}),onKeyDown:e=>e.preventDefault(),classes:{root:c_},className:I(r_,i_)},e),{inputProps:l(o({},e.inputProps),{placeholder:c("date")})}))})]})}),p(Ce,{dateAdapter:Se,children:R("div",{className:Jb,children:[p($t,{children:c("to")}),p(xe,{componentsProps:{actionBar:{actions:["clear"]}},open:S.endDate,onOpen:()=>x({startDate:!1,endDate:!0}),onClose:()=>x({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:l_})},InputAdornmentProps:{className:e_}
1,value:t.endDate?Ae(t.endDate.toString()):null,onChange:e=>i((t=>l(o({},t),{endDate:e?fh(e):null}))),renderInput:e=>p(H,l(o({onClick:()=>x({startDate:!1,endDate:!0}),onKeyDown:e=>e.preventDefault(),classes:{root:c_},className:I(r_,i_)},e),{inputProps:l(o({},e.inputProps),{placeholder:c("date")})}))})]})})]}),p("div",{className:s_,children:p("button",{className:o_,onClick:()=>(b(""),void i((e=>o(o({},e),N)))),children:p($t,{variant:"small",children:c("clear-fields")})})})]}),p("div",{className:t_,children:p(P,{startIcon:p(Sn,{className:n_,spriteUrl:_b}),variant:"contained",color:"secondary",size:"small",className:a_,onClick:()=>{a===hu.SAMPLE?T():w()},children:c("export-csv")})})]})]})};var m_="/assets/pdfDownload.26cee509.svg";var p_="ReportBatchActionButtons_actionButtons_1",u_="ReportBatchActionButtons_actionButton_1",h_="ReportBatchActionButtons_actionIcon_21";const v_=({clientId:e,reportBatchId:t,isCard:a})=>{const n=Wt(),{mutateAsync:i}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(Cb.exportBatchReport,{onSuccess:a=>{console.log("successfully exported batch report",a),t.open(e("sent-to-mail-success"),{severity:"success"})},onError:a=>{console.log("failed to export batch report",a),t.open(fa(a,e("export-batch-report-failure")),{severity:"error"})}})})(),r=Bm();return R("div",{className:p_,children:[p(me,{title:n("download-lab-report"),children:R(v,{className:u_,variant:"p",underline:"none",onClick:e=>{e.stopPropagation()},href:cu(e||null,t,Su.EREPORT),download:!0,children:[p(Sn,{spriteUrl:m_,className:h_}),a&&n("lab-report")]})}),r!==ga.REPORTING_USER&&p(me,{title:n("download-invoice"),children:R(v,{className:u_,variant:"p",underline:"none",onClick:e=>{e.stopPropagation()},href:cu(e||null,t,Su.BILLING),download:!0,children:[p(Sn,{spriteUrl:"/assets/invoice.d29619ab.svg",className:h_}),a&&n("invoice")]})}),p(me,{title:n("export-csv"),children:R(v,{className:u_,variant:"p",underline:"none",onClick:a=>{a.stopPropagation(),i({clientId:e,batchId:t})},children:[p(Sn,{spriteUrl:_b,className:h_}),a&&n("export-csv")]})})]})};var g_="ReportBatchesColumns_groupWidth_10",y_="ReportBatchesColumns_groupCell_15",b_="ReportBatchesColumns_groupCellHidden_23",__="ReportBatchesColumns_tableHeaderTruncate_27",N_="ReportBatchesColumns_tableHeaderContainer_33",f_="ReportBatchesColumns_status_40",C_="ReportBatchesColumns_preliminary_53",S_="ReportBatchesColumns_completed_59",x_="ReportBatchesColumns_view_66";var A_="ReportBatchDetails_containerMobile_1",I_="ReportBatchDetails_sample_6",w_="ReportBatchDetails_status_18",T_="ReportBatchDetails_preliminary_31",R_="ReportBatchDetails_completed_37",k_="ReportBatchDetails_view_76";const E_=({samples:e})=>{const t=Wt(),a=f();return p("div",{className:A_,children:null==e?void 0:e.map((e=>R("div",{className:I_,onClick:()=>{a(Q(Tt.SAMPLE_DETAILS,{batchId:e.reportBatchId,sampleId:e.id.toString()}))},children:[p(Vt,{variant:"h6",children:e.description}),R($t,{children:[t("reported"),"Â ",Uu(e.loggedAt)]}),R("div",{className:I(w_,{[T_]:e.status===ku.PRELIMINARY,[R_]:e.status===ku.COMPLETED}),children:[p("span",{}),p($t,{children:e.status})]}),p("div",{children:p($t,{className:k_,children:"View Results"})})]},e.number)))})};var M_="ReportBatchCard_cardContent_1";const D_=({batches:e})=>p(k,{children:null==e?void 0:e.map((e=>p("div",{children:p(Bb,{title:e.number,cardContent:R("div",{className:M_,children:[p(Ub,{label:"logged-date",value:Uu(e.updatedAt)}),p(Ub,{label:"status",value:e.status})]}),expandedCardContent:e.samples.length>0&&R("div",{className:M_,children:[e.status===ku.COMPLETED&&p(v_,{isCard:!0,clientId:e.clientId,reportBatchId:e.number}),p(E_,{samples:e.samples})]})})},e.number)))}),P_=({data:e,totalItems:t,queryOptions:a,setQueryOptions:n})=>{const i=Wt();return p(k,{children:0===e.length?p(Eh,{noRowsLabel:i("no-results")}):R(k,{children:[p(wb,{children:p(D_,{batches:e})}),t&&n&&a&&p(nv,{totalItems:t,currentPage:a.start,cardsPerPage:a.length,cardsPerPageOptions:[50,100,150],onCardsPerPageChange:e=>{n((t=>l(o({},t),{start:1,length:e})))},onGoPreviousPage:()=>{n((e=>l(o({},e),{start:e.start-1})))},onGoNextPage:()=>{n((e=>l(o({},e),{start:e.start+1})))}})]})})};var L_="SamplesResults_buttonContainer_1";const B_=({samplesQueryOptions:e,setSamplesQueryOptions:t,setExportNumResults:a})=>{var n,i,r,s;const o=Wt(),l=h(),c=f(),d=A(l.breakpoints.up("lg")),{data:u,isLoading:v,isFetching:g,isFetched:y}=(e=>{const t=C(),a=Wt(),n=m.exports.useContext(Na);return L(["getReportBatches",e],(()=>Cb.getReportBatches(e)),{keepPreviousData:!1,staleTime:6e5,onSuccess:e=>{t.invalidateQueries("")},onError:e=>{console.log("get report batches error",e),n.open(fa(e,a("get-report-batches-error")),{severity:"error"})}})})(e),b=u,_=(e=>{const t=Wt();return[{field:yu.GROUPS,sortable:!1,renderHeader:()=>p(me,{title:t("group"),children:R("div",{className:N_,children:[p(Vt,{variant:"h6",className:__,children:t("group")}),p(Vt,{variant:"h6",className:__,children:"Downloads"})]})}),flex:1,renderCell:t=>R("div",{className:t.row.isFirstInBatch?y_:b_,children:[p(Vt,{variant:"h6",className:g_,children:t.value}),t.row.status===ku.COMPLETED&&p(v_,{clientId:e,reportBatchId:t.row.reportBatchId})]})},{field:yu.SAMPLES,sortable:!1,renderHeader:()=>p(me,{title:t("samples"),children:p("div",{children:p(Vt,{variant:"h6",className:__,children:t("samples")})})}),flex:2,renderCell:e=>p("div",{className:y_,children:p(Vt,{variant:"h6",children:e.value})})},{field:yu.LOGGED,sortable:!1,renderHeader:()=>p(me,{title:t("logged"),children:p("div",{children:p(Vt,{variant:"h6",className:__,children:t("logged")})})}),flex:.5,renderCell:({row:e})=>p($t,{children:Gu(e.loggedAt)})},{field:yu.STATUS,sortable:!1,renderHeader:()=>p(me,{title:t("status"),children:p("div",{children:p(Vt,{variant:"h6",className:__,children:t("status")})})}),flex:.5,renderCell:e=>R("div",{className:I(f_,{[C_]:e.value===ku.PRELIMINARY,[S_]:e.value===ku.COMPLETED}),children:[p("span",{}),p($t,{children:e.value})]})},{field:"view-results",sortable:!1,renderHeader:()=>"",flex:.5,renderCell:()=>p("div",{children:p($t,{className:x_,children:"View Results"})})}]})(e.clientId);return null==b||b.totalBatches,null==b||b.mobile.length,m.exports.useEffect((()=>{a((null==u?void 0:u.totalBatches)&&(null==u?void 0:u.totalBatches)>500?null==u?void 0:u.totalBatches:500)}),[y,u]),v?p(pn,{className:"spinnerCenter"}):R(k,{children:[d?p(Lu,{rowCount:null!=(r=null==b?void 0:b.totalBatches)?r:0,isLoading:!y,rows:null!=(s=null==b?void 0:b.dataGrid)?s:[],clickableRows:!0,columns:_,showPagination:!0,pageSize:e.length,setQueryOptions:t,page:e.start,onRowClick:({row:e})=>{c(Q(Tt.SAMPLE_DETAILS,{batchId:e.reportBatchId.toString(),sampleId:e.id}))},getRowId:e=>e.id,components:{Row:void 0},noRowsLabel:o("no-results")}):p(P_,{data:null!=(n=null==b?void 0:b.mobile)?n:[],setQueryOptions:t,queryOptions:e,totalItems:null!=(i=null==b?void 0:b.totalBatches)?i:0}),p("div",{className:L_,children:g&&!y&&p($t,{variant:"standard",children:o("loading-more-results")})})]})};
1var O_={container:"ResignAgreement_container_1",headerContainer:"ResignAgreement_headerContainer_7",text:"ResignAgreement_text_17",userAuthContainer:"ResignAgreement_userAuthContainer_22",userAuthContainerCheck:"ResignAgreement_userAuthContainerCheck_32",checkContainer:"ResignAgreement_checkContainer_47",helpContainer:"ResignAgreement_helpContainer_61",agreementContainer:"ResignAgreement_agreementContainer_72",userFormGrid:"ResignAgreement_userFormGrid_82",termsAndConditionsContainer:"ResignAgreement_termsAndConditionsContainer_94",title:"ResignAgreement_title_104",termsContainer:"ResignAgreement_termsContainer_107",agreementText:"ResignAgreement_agreementText_116",agreementCheck:"ResignAgreement_agreementCheck_120",link:"ResignAgreement_link_126",buttonContainer:"ResignAgreement_buttonContainer_129",formInput:"ResignAgreement_formInput_133"};const F_=new class{async resignClientAgreement({clientId:e,formData:t}){const a=aa.responseHandler(await aa.put(`/clients/${e}/resign_client_agreement`,na(t,ca)));return na(a,oa)}},H_=()=>{const e=Wt(),t=m.exports.useContext(Na),{setAuthenticatedUser:a}=m.exports.useContext(_a);return x(wm.updateActiveClient,{onSuccess:e=>{a((t=>l(o({},t),{user:e})))},onError:a=>{console.log("failed to update user active client",a),t.open(fa(a,e("update-user-active-client-error")),{severity:"error"})}})},U_=()=>{var e;const t=Wt(),a=f(),[n,i]=m.exports.useState(!1),[r,s]=m.exports.useState(!1),c=m.exports.useRef(null),{activeClient:d,authenticatedUser:u,setActiveClient:h}=m.exports.useContext(_a),{mutateAsync:v}=(()=>{Wt();const e=m.exports.useContext(Na);return x({mutationFn:F_.resignClientAgreement,onSuccess:t=>{e.open("Client agreement successfully submitted",{severity:"success"}),console.log("Agreement submitted successfully:",t)},onError:async t=>{console.log("failed to resign client agreement",t),e.open(fa(t,"Failed to resign client agreement"),{severity:"error"})}})})(),{mutateAsync:g}=H_(),y=(null==(e=null==d?void 0:d.teamMembers)?void 0:e.filter((e=>"Administrator"===e.role)))||[],b=y.some((e=>e.email===u.user.email));m.exports.useEffect((()=>()=>{c.current&&clearTimeout(c.current)}),[]);const _=z().shape({jobTitle:Ni(t("field-error-required",{field:t("job-title")})),firstname:Ni(t("field-error-required",{field:t("first-name")})),lastname:Ni(t("field-error-required",{field:t("last-name")})),acceptTerms:Ni("The terms must be accepted for the agreement to be submitted.")});return p("div",{children:p(q,{initialValues:{jobTitle:"",acceptTerms:!1,firstname:"",lastname:""},onSubmit:e=>{(async e=>{if(!r)try{s(!0);const t={clientId:d.id,formData:{jobTitle:e.jobTitle,firstname:e.firstname,lastname:e.lastname,acceptTerms:e.acceptTerms,id:d.id}},n=await v(t);if(!n||n.resignAgreement)throw new Error("Agreement submission failed - agreement still required");h(n),await g(l(o({},u.user),{id:u.user.id,lastClientId:d.id})),c.current=setTimeout((()=>{a(Tt.RESULTS),c.current=null}),100),s(!1)}catch(t){console.error("Failed to submit agreement:",t)}finally{s(!1)}})(e)},validationSchema:_,validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,children:({handleChange:e,errors:a,values:s})=>R(W,{className:O_.container,children:[R("div",{className:O_.headerContainer,children:[p(Vt,{variant:"h3",children:t("resign-title")}),R("div",{className:O_.text,children:[p($t,{variant:"standard",children:t("resign-agreement-intro-1")}),p($t,{variant:"standard",children:t("resign-agreement-intro-2")})]})]}),!(u.user.administrator||b)&&R("div",{className:O_.userAuthContainer,children:[p(Vt,{variant:"h4",children:t("resign-user-auth")}),p($t,{variant:"standard",children:t("resign-user-not-admin",{client:d.name})}),p(Vt,{variant:"h5",children:t("resign-account-admin",{client:d.name})}),p("ul",{children:y.map((e=>R("li",{children:[e.firstname?`${e.firstname} `:"",e.lastname?`${e.lastname} `:"",e.email&&(e.firstname||e.lastname)?` (${e.email})`:`${e.email}`]})))})]}),(u.user.administrator||b)&&R("div",{className:O_.userAuthContainerCheck,children:[R("div",{className:O_.checkContainer,children:[p(Vt,{variant:"h4",children:t("resign-user-auth")}),p(pe,{label:p($t,{variant:"standard",children:t("resign-user-auth-confirmation",{client:d.name})}),control:p(ue,{checked:n,onChange:()=>{i(!n)},disabled:r})})]}),R("div",{className:O_.helpContainer,children:[p(Vt,{variant:"h5",children:t("resign-help-title")}),p($t,{variant:"standard",children:t("resign-help-1")}),R("ul",{children:[p("li",{children:p($t,{variant:"standard",children:t("resign-help-bullet-1")})}),p("li",{children:p($t,{variant:"standard",children:t("resign-help-bullet-2")}
1)})]}),p($t,{variant:"standard",children:t("resign-help-end")})]})]}),(u.user.administrator||b)&&n&&R(k,{children:[R("div",{className:O_.agreementContainer,children:[p(Vt,{variant:"h4",children:t("resign-sig-info")}),R("div",{className:O_.userFormGrid,children:[R(K,{variant:"standard",error:!0,children:[p(Me,{children:t("required-field")}),p(di,{className:O_.formInput,name:"firstname",value:s.firstname,onChange:e,placeholder:"First Name",error:!!a.firstname,errorMessage:a.firstname,disabled:r})]}),R(K,{variant:"standard",error:!0,children:[p(Me,{children:t("required-field")}),p(di,{className:O_.formInput,name:"lastname",value:s.lastname,onChange:e,placeholder:"Last Name",error:!!a.lastname,errorMessage:a.lastname,disabled:r})]})]}),p("div",{className:O_.userFormGrid,children:R(K,{variant:"standard",error:!0,children:[p(Me,{children:t("required-field")}),p(di,{className:O_.formInput,name:"jobTitle",value:s.jobTitle,onChange:e,placeholder:"Job Title",error:!!a.jobTitle,errorMessage:a.jobTitle,disabled:r})]})})]}),R("div",{className:O_.termsAndConditionsContainer,children:[p(Vt,{variant:"h4",children:t("ets-client-agreement")}),p(Vt,{variant:"h6",className:O_.title,children:t("terms-conditions-credit-agreement")}),R("div",{className:O_.termsContainer,children:[p(Vt,{variant:"h6",children:t("general-terms-and-conditions")}),p($t,{variant:"small",className:O_.agreementText,children:p(mn,{html:t("general-terms-and-conditions-text")})})]}),p("div",{className:O_.agreementCheck,children:p(pe,{name:"acceptTerms",value:s.acceptTerms,onChange:e,control:p(ue,{color:"tertiary",disabled:r}),label:R($t,{variant:"small",children:[t("terms-of-service-check-text"),p(jt,{underline:"none",variant:"small",target:"_blank",className:O_.link,to:Tt.TERMS_AND_CONDITIONS_AND_CREDIT_AGREEMENT,children:t("terms-of-service")})]}),disableTypography:!0})})]}),p("div",{className:O_.buttonContainer,children:p(P,{variant:"contained",type:"submit",className:O_.button,onClick:()=>(e=>{const t=Object.keys(e);if(t.length){const e=document.querySelector(`input[name=${t[0]}]`);null==e||e.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}})(a),disabled:r,children:r?"Submitting Agreement...":"Submit"})})]})]})})})},z_=()=>{var e,t,a;const{activeClient:n}=m.exports.useContext(_a),i=y(),r=f(),s=i.state,[c,d]=m.exports.useState(hu.SAMPLE),[u,h]=m.exports.useState(500),[v,g]=Yr({clientId:null!=(e=null==n?void 0:n.id)?e:0,start:1,length:100,searchPhrase:"",startDate:"",endDate:"",level:"test",sortOption:{field:"logged_at",sort:"desc"}},`${null==n?void 0:n.id}_analysisQueryOptions`),[b,_]=Yr({clientId:null!=(t=null==n?void 0:n.id)?t:0,searchPhrase:"",startDate:"",endDate:"",length:50,start:1},`${null==n?void 0:n.id}_samplesQueryOptions`);return m.exports.useEffect((()=>{g((e=>l(o({},e),{searchPhrase:b.searchPhrase,startDate:b.startDate,endDate:b.endDate})))}),[b]),m.exports.useEffect((()=>{s&&void 0!==s.batchId&&(_((e=>l(o({},e),{searchPhrase:s.batchId}))),r("",{}))})),n.resignAgreement?p("div",{children:p(U_,{})}):R(k,{children:[p(d_,{clientId:n.id,resultsType:c,setResultsType:d,activeClient:null!=(a=null==n?void 0:n.name)?a:"",exportNumResults:u,queryOptions:c===hu.RESULTS_BY_ANALYSIS?v:b,setQueryOptions:c===hu.RESULTS_BY_ANALYSIS?g:_,setSharedQueryOptions:_}),c===hu.RESULTS_BY_ANALYSIS?p(Wb,{resultsByAnalysisQueryOptions:v,setResultsByAnalysisQueryOptions:g,setExportNumResults:h}):p(B_,{samplesQueryOptions:b,setSamplesQueryOptions:_,setExportNumResults:h})]})},G_={id:0,number:"",friendlyNumber:"",validationStatus:"",description:"",result:"",units:"",comments:"",analyte:"",isPanel:!1,acode:"",testMethod:"",testDate:"",submittedAt:"",loggedAt:"",reportedAt:"",sortOrder:0,status:"",panelDescription:"",formattedResult:"",clientId:0,analysisDescription:""},q_={description:"",loggedAt:"",reportedAt:"",sampleId:"",reportBatchId:"",friendlyNumber:""};var W_="AsideInfo_container_1",V_="AsideInfo_btn_16";const Y_=({title:e,text:t,buttonText:a,buttonAction:n})=>R("aside",{className:W_,children:[p(Vt,{variant:"h5",children:e}),p($t,{variant:"small",children:t}),a&&p(P,{variant:"contained",color:"tertiary",className:V_,onClick:n,children:a})]});var j_="AnalysisDetailsContent_container_1",$_="AnalysisDetailsContent_analysisHeader_11",Q_="AnalysisDetailsContent_closeIcon_17",K_="AnalysisDetailsContent_statusContainer_26",X_="AnalysisDetailsContent_statusIcon_31",Z_="AnalysisDetailsContent_completed_35",J_="AnalysisDetailsContent_preliminary_38",eN="AnalysisDetailsContent_pending_41",tN="AnalysisDetailsContent_statusText_44";
1const aN=({analysis:e,isModal:t,setModal:a})=>{Wt();const n=e.result?e.result.replace(/(\r\n|\n|\r)/gm,"<br />"):"",i=p(mn,{html:n});return R("div",{className:j_,children:[t&&R("div",{className:$_,children:[p(Vt,{variant:"h4",children:e.analyte}),p(Sn,{className:Q_,spriteUrl:jr,onClick:a})]}),p($t,{variant:"standard",children:p(mn,{html:e.analyte.toUpperCase()})}),p(Vt,{variant:"h3",color:"primary",children:e.formattedResult?e.formattedResult:i}),R("div",{className:K_,children:[p(Sn,{spriteUrl:ac,className:I(X_,{[Z_]:e.status===ku.COMPLETED,[eN]:e.status===ku.PENDING,[J_]:e.status===ku.PRELIMINARY})}),p($t,{className:I(tN,{[Z_]:e.status===ku.COMPLETED,[eN]:e.status===ku.PENDING,[J_]:e.status===ku.PRELIMINARY}),children:e.status})]}),p("br",{}),p(Vt,{variant:"h5",children:"Description"}),p($t,{variant:"standard",children:p(mn,{html:un(e.analysisDescription)})})]})};var nN="SampleDetailsHeader_container_1",iN="SampleDetailsHeader_sampleDetailsContent_7",rN="SampleDetailsHeader_sampleInfo_12",sN="SampleDetailsHeader_item_26",oN="SampleDetailsHeader_buttonContainer_32",lN="SampleDetailsHeader_export_37",cN="SampleDetailsHeader_icon_37",dN="SampleDetailsHeader_button_32";const mN=({data:e,onExportResultsForSample:t,downloadPdf:a})=>{const n=Wt(),i=m.exports.useContext(Na),r=()=>{i.open(n("download-not-available"),{severity:"error"})};return R("header",{className:nN,children:[p(Vt,{variant:"h4",children:e.description}),R("div",{className:iN,children:[R("div",{className:rN,children:[p(Ub,{className:sN,label:"logged-date",value:e.loggedAt||""!==e.loggedAt?zu(e.loggedAt):n("not-available")}),p(Ub,{className:sN,label:"reported",value:e.reportedAt&&""!==e.reportedAt?zu(e.reportedAt):n("not-available")}),p(Ub,{className:sN,label:"ets-sample-id",value:e.friendlyNumber}),p(Ub,{className:sN,label:"group-id",value:e.reportBatchId})]}),null!==e.reportedAt&&R("div",{className:oN,children:[t&&p("div",{className:lN,children:p(P,{startIcon:p(Sn,{className:cN,spriteUrl:_b}),variant:"contained",color:"secondary",className:dN,onClick:t,children:n("export-csv")})}),a&&p("div",{className:lN,children:p(P,{startIcon:p(Sn,{className:cN,spriteUrl:m_}),variant:"contained",color:"secondary",className:dN,href:cu(a.clientId,a.batchId,a.reportType),download:!0,children:n("download-lab-report")})})]}),null===e.reportedAt&&R("div",{className:oN,children:[t&&p("div",{className:lN,children:p(P,{startIcon:p(Sn,{className:cN,spriteUrl:_b}),variant:"contained",color:"secondary",className:dN,onClick:r,children:n("export-csv")})}),a&&p("div",{className:lN,children:p(P,{startIcon:p(Sn,{className:cN,spriteUrl:m_}),variant:"contained",color:"secondary",className:dN,onClick:r,children:n("download-lab-report")})})]})]})]})},pN=({setRequirePreLimAgreement:e})=>{const t=Wt();return p(k,{children:p("div",{className:iy.container,children:p("div",{className:iy.collapseAndAdditionalInfoAsideContainer,children:p("div",{className:iy.collapseContainer,children:R("div",{className:iy.actions,children:[p(Vt,{variant:"h4",className:iy.primaryTitle,children:t("preliminary-view-results-header")}),p("br",{}),p($t,{children:p(mn,{html:t("preliminary-view-results-description-body-text")})}),p("br",{}),p(P,{className:iy.btn,size:"medium",variant:"contained",color:"tertiary",onClick:()=>{e(!1),document.cookie="preLimResultsAgreement=true"},children:t("preliminary-proceed-to-results-button-text")})]})})})})})};var uN="AnalysisDetails_container_1",hN="AnalysisDetails_contentWrapper_5";const vN=()=>{var e;const t=Wt(),{activeClient:a}=m.exports.useContext(_a),{id:n}=$(),{data:i,isLoading:r}=((e,t)=>{const a=Wt(),n=m.exports.useContext(Na);return L(["getAnalysisDetails",t],(()=>Cb.getAnalysisDetails({clientId:e,sampleId:t})),{onSuccess:e=>{console.log("get analysis details",e)},onError:e=>{console.log("get analysis details error",e),n.open(fa(e,a("get-analysis-details-error")),{severity:"error"})}})})(null!=(e=null==a?void 0:a.id)?e:0,null!=n?n:""),[s,o]=m.exports.useState(!1),l=-1!=document.cookie.indexOf("preLimResultsAgreement"),[c,d]=m.exports.useState(!1);m.exports.useEffect((()=>{const e="Preliminary"===(null==i?void 0:i.data.status);d(e&&!l)}),[i]);const{showNewMessage:u}=S();return r?p(pn,{className:"spinnerCenter"}):R(k,{children:[c&&p(pN,{setRequirePreLimAgreement:d}),!r&&!c&&R("div",{className:uN,children:[p(mN,{data:(null==i?void 0:i.data)?{description:null==i?void 0:i.data.description,loggedAt:null==i?void 0:i.data.loggedAt,reportedAt:null==i?void 0:i.data.reportedAt,sampleId:null==i?void 0:i.data.number,reportBatchId:null==i?void 0:i.data.reportBatchId,friendlyNumber:null==i?void 0:i.data.friendlyNumber}:q_}),R("div",{className:hN,children:[(null==i?void 0:i.data)&&p(aN,{analysis:i.data}),p(Y_,{title:t("contact-aside-title"),text:t("contact-aside-text"),buttonText:t("contact-ets-button-text"),buttonAction:()=>u(`I have a question about my ${null==i?void 0:i.data.analyte} results for sample ${null==i?void 0:i.data.description} in group ${null==i?void 0:i.data.reportBatchId}...\n\n`)}),p(wi,{open:s,setModal:()=>o(!1),children:p(Ci,{handleCloseModal:()=>o(!1),analysisACode:null==i?void 0:i.data.acode})})]})]})]})};var gN="SampleAnalysesColumns_view_1",yN="SampleAnalysesColumns_tableHeaderTruncate_5";var bN="SampleAnalysisCard_cardTitle_1",_N="SampleAnalysisCard_cardContent_5",NN="SampleAnalysisCard_status_10",fN="SampleAnalysisCard_preliminary_23",CN="SampleAnalysisCard_completed_29",SN="SampleAnalysisCard_quickView_35",xN="SampleAnalysisCard_label_40",AN="SampleAnalysisCard_value_43";
1const IN=({analysis:e,onViewClick:t,onViewAnalysisDetails:a})=>{const n=Wt();return p(Bb,{title:e.analyte,titleClassName:bN,cardContent:R("div",{className:_N,onClick:a,children:[R("div",{className:I(NN,{[fN]:e.status===ku.PRELIMINARY,[CN]:e.status===ku.COMPLETED}),children:[p("span",{}),p($t,{children:e.status})]}),R("div",{className:SN,children:[R($t,{className:xN,children:[n("quick-view"),":"]}),p($t,{className:AN,onClick:a=>{a.stopPropagation(),t(e)},children:n("view")})]})]}),expandedCardContent:R("div",{className:_N,children:[p(Ub,{label:"result",value:e.formattedResult}),p(Ub,{label:"test-date",value:Uu(e.testDate)})]})})},wN=e=>{let t=[];const a=e.filter((e=>null===e.panelDescription)),n=e.filter((e=>null!==e.panelDescription)),i=n.filter((e=>e.isPanel)),r=n.filter((e=>!e.isPanel)),s=i.reduce(((e,t)=>{var a,n;const i=e[null!=(a=t.panelDescription)?a:""]||[];return i.push(t),e[null!=(n=t.panelDescription)?n:""]=i,e}),{});t=t.concat(a);for(const[,l]of Object.entries(s))t=t.concat(l);const o=r.reduce(((e,t)=>{var a,n;const i=e[null!=(a=t.panelDescription)?a:""]||[];return i.push(t),e[null!=(n=t.panelDescription)?n:""]=i,e}),{});for(const[,l]of Object.entries(o)){const e=l[0];t.push(e),t=t.concat(l.slice(1))}return t},TN=()=>{var e,t,a,n,i,r,s,o;const l=Wt(),{activeClient:c}=m.exports.useContext(_a),d=h(),u=f(),{state:v}=y(),g=v,{batchId:b,sampleId:_}=$(),N={clientId:null!=(e=null==c?void 0:c.id)?e:0,batchId:null!=b?b:"",sampleId:null!=_?_:""},C={clientId:null!=(t=null==c?void 0:c.id)?t:null,batchId:null!=b?b:"",reportType:Su.EREPORT},{mutateAsync:I}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(Cb.exportAllResultsForSample,{onSuccess:a=>{console.log("successfully exported results for sample report",a),t.open(e("sent-to-mail-success"),{severity:"success"})},onError:a=>{console.log("failed to export results for sample report",a),t.open(fa(a,e("export-results-for-sample-report-failure")),{severity:"error"})}})})(),w=A(d.breakpoints.up("lg")),[T,E]=m.exports.useState({modalState:!1,modalData:G_}),{data:M,isFetched:D}=((e,t,a)=>{const n=Wt(),i=m.exports.useContext(Na);return L(["useGetSampleDetails",t],(()=>Cb.getSampleDetails({clientId:e,batchId:t,friendlyNumber:a})),{onSuccess:e=>{console.log("get sample details",e)},onError:e=>{console.log("get sample details error",e),i.open(fa(e,n("get-sample-details-error")),{severity:"error"})}})})(null!=(a=null==c?void 0:c.id)?a:0,null!=(n=null==g?void 0:g.reportBatchId)?n:b,null!=(i=null==g?void 0:g.friendlyNumber)?i:_),P=(()=>{const e=Wt();return[{field:Iu.ANALYTE,renderHeader:()=>p(me,{title:e("analysis"),children:p("div",{children:p(Vt,{variant:"h5",className:yN,children:e("analysis")})})}),flex:1,sortable:!0,renderCell:e=>p($t,{children:e.value})},{sortable:!0,field:Iu.LOGGED_AT,renderHeader:()=>p(me,{title:e("test-date"),children:p("div",{children:p(Vt,{variant:"h5",className:yN,children:e("test-date")})})}),flex:1,renderCell:({row:e})=>p($t,{children:Gu(e.loggedAt)})},{field:Iu.FORMATTED_RESULT,renderHeader:()=>p(me,{title:e("result"),children:p("div",{children:p(Vt,{variant:"h5",className:yN,children:e("result")})})}),flex:1,sortable:!0,renderCell:e=>""===e.value&&"Completed"===e.row.status?p($t,{children:"Please Click To View Results"}):p($t,{children:e.value})},{field:Iu.STATUS,renderHeader:()=>p(me,{title:e("status"),children:p("div",{children:p(Vt,{variant:"h5",className:yN,children:e("status")})})}),flex:1,sortable:!1,renderCell:e=>p($t,{children:e.value})},{field:Iu.QUICK_VIEW,renderHeader:()=>p(me,{title:e("quick-view"),children:p("div",{children:p(Vt,{variant:"h5",className:yN})})}),flex:1,sortable:!1,renderCell:()=>p($t,{className:gN,children:e("view")})}]})(),B=Le(["getAllSamplesFromBatch"]),O=-1!=document.cookie.indexOf("preLimResultsAgreement");let[F,H]=m.exports.useState(!1);m.exports.useEffect((()=>{H(void 0!==M&&M.data.containsPreliminaryResults&&!O)}),[M]);const{trackEvent:U}=S();return U("viewed-results",{batchId:b,sampleId:_}),D&&F?p(pN,{setRequirePreLimAgreement:H}):R(k,{children:[D&&p(mN,{data:(null==M?void 0:M.data.sample)?{description:null==M?void 0:M.data.sample.description,loggedAt:null==M?void 0:M.data.sample.loggedAt,reportedAt:null==M?void 0:M.data.sample.reportedAt,sampleId:null==M?void 0:M.data.sample.number,reportBatchId:null==M?void 0:M.data.sample.reportBatchId,friendlyNumber:null==M?void 0:M.data.sample.friendlyNumber}:q_,onExportResultsForSample:()=>I(N),downloadPdf:C}),D&&M?w?p(Lu,{rowCount:0,isLoading:!D||!!B,rows:wN(M.data.sample.analyses)||[],columns:P,clickableRows:!0,onRowClick:e=>{var t;u(Q(Tt.ANALYSIS_DETAILS,{batchId:b,sampleId:null!=(t=null==g?void 0:g.friendlyNumber)?t:_,id:e.row.id}))},getRowId:e=>e.id}):R(wb,{children:[!(null==M?void 0:M.data.sample)&&D&&p($t,{children:l("no-results")}),(null==M?void 0:M.data.sample)&&(null==(o=null==(s=null==(r=null==M?void 0:M.data)?void 0:r.sample)?void 0:s.analyses)?void 0:o.map((e=>p(IN,{analysis:e,onViewClick:e=>E({modalState:!0,modalData:e}),onViewAnalysisDetails:()=>{var t;return u(Q(Tt.ANALYSIS_DETAILS,{batchId:b,sampleId:null!=(t=null==g?void 0:g.friendlyNumber)?t:_,id:e.id.toString()}))}},e.id))))]}):null,p(wi,{open:T.modalState,setModal:()=>E({modalState:!1,modalData:G_}),children:p(aN,{isModal:!0,setModal:()=>E({modalState:!1,modalData:G_}),analysis:T.modalData})})]})};var RN={container:"AsideWithInfoMessage_container_1",iconContainer:"AsideWithInfoMessage_iconContainer_6",tooltipIcon:"AsideWithInfoMessage_tooltipIcon_6"};const kN=()=>{const e=Wt();return R(tg,{className:RN.container,children:[p("div",{className:RN.iconContainer,children:p(Sn,{className:RN.tooltipIcon,spriteUrl:sv})}),p("div",{className:RN.tooltipTextContainer,children:p($t,{children:e("supplies-will-be-shipped-free-of-charge")}
1)})]})};var EN={container:"AsideWithUserInformation_container_1",userInfoContainer:"AsideWithUserInformation_userInfoContainer_9"};const MN=({orderData:{firstname:e,lastname:t,street_1:a,city:n,postalCode:i,country:r}})=>{const s=Wt();return R("div",{className:EN.container,children:[p("div",{className:EN.titleContainer,children:p($t,{variant:"standardSemiBold",children:s("your-order-will-be-shipped-to")})}),R("div",{className:EN.userInfoContainer,children:[p($t,{children:`${e} ${t}`}),p($t,{children:a}),p($t,{children:`${n}, ${i}`}),p($t,{children:r})]})]})};var DN,PN,LN="/assets/sample_labels.1a61cc08.png";(PN=DN||(DN={})).THERMOPOD_ENVELOPES="thermopod_envelopes",PN.GLUTATHIONE_SAMPLING="glutathione_sampling",PN.SAMPLE_TUBES="sample_tubes",PN.SAMPLE_BOTTLES="sample_bottles",PN.ATMOSHPERIC_TRAPS="atmospheric_traps",PN.BERRY_SAMPLE_LABELS="berry_sample_labels",PN.JUICE_SAMPLE_LABELS="juice_sample_labels",PN.WINE_SAMPLE_LABELS="wine_sample_labels";var BN=DN;const ON={[BN.ATMOSHPERIC_TRAPS]:"/assets/atmospheric_traps.1f864536.png",[BN.GLUTATHIONE_SAMPLING]:"/assets/glutathione_sampling.92549970.png",[BN.THERMOPOD_ENVELOPES]:"/assets/shipping_pods.9085d800.png",[BN.SAMPLE_BOTTLES]:"/assets/sample_bottles.a7b1213a.png",[BN.SAMPLE_TUBES]:"/assets/sample_tubes.7d76c2b0.png",[BN.BERRY_SAMPLE_LABELS]:LN,[BN.WINE_SAMPLE_LABELS]:LN,[BN.JUICE_SAMPLE_LABELS]:LN};var FN="SupplyCardDesktopAndTablet_container_1",HN="SupplyCardDesktopAndTablet_textBody_8",UN="SupplyCardDesktopAndTablet_imageContainer_16",zN="SupplyCardDesktopAndTablet_textContainer_22",GN="SupplyCardDesktopAndTablet_textHeader_28",qN="SupplyCardDesktopAndTablet_textHeaderSubTitle_28",WN="SupplyCardDesktopAndTablet_inputContainer_31";const VN=({supply:e,setShop:t,value:a,userHasFinishedOrder:n})=>{const i=Wt();return R("div",{className:FN,children:[p("div",{className:UN,children:p("img",{src:ON[e.key],alt:e.key})}),R("div",{className:zN,children:[R("div",{className:GN,children:[p($t,{variant:"standardSemiBold",children:e.name}),p($t,{className:qN,children:e.subheading})]}),p("div",{className:HN,children:p(mn,{html:e.description})})]}),p("div",{className:WN,children:p(di,{disabled:n,name:e.key,type:"number",defaultValue:0===a?void 0:a,placeholder:i("enter-qty"),onChange:a=>t&&t((t=>l(o({},t),{[e.key]:parseInt(a.target.value)})))})})]})};var YN={container:"SupplyCardMobile_container_1",headerContainer:"SupplyCardMobile_headerContainer_7",textHeaderSubTitle:"SupplyCardMobile_textHeaderSubTitle_17",inputContainer:"SupplyCardMobile_inputContainer_20","Mui-disabled":"SupplyCardMobile_Mui-disabled_42"};const jN=({supply:e,setShop:t,value:a,userHasFinishedOrder:n})=>R("div",{className:YN.container,children:[R("div",{className:YN.headerContainer,children:[p("img",{src:ON[e.key],alt:e.key}),R("header",{className:YN.header,children:[p($t,{variant:"standardSemiBold",children:e.name}),p($t,{className:YN.textHeaderSubTitle,children:e.subheading})]})]}),p("div",{className:YN.textContainer,children:p(mn,{html:e.description})}),p("div",{className:YN.inputContainer,children:p(di,{disabled:n,name:e.key,type:"number",defaultValue:0===a?void 0:a,placeholder:G("enter-qty"),onChange:a=>t&&t((t=>l(o({},t),{[e.key]:parseInt(a.target.value)})))})})]});var $N="ConfirmationScreen_flexContainer_1",QN="ConfirmationScreen_container_6",KN="ConfirmationScreen_content_16",XN="ConfirmationScreen_asideContainer_26";const ZN=({supplies:e,shop:t,orderData:a})=>{const n=Wt(),i=e.filter((e=>t[e.key]>0)).map((e=>l(o({},e),{value:t[e.key]}))),r=h(),s=A(r.breakpoints.up("md"));return R("div",{className:$N,children:[p($t,{variant:"bigSemiBold",children:n("order-details")}),R("div",{className:QN,children:[R("div",{className:XN,children:[p(MN,{orderData:a}),p(kN,{})]}),R("div",{className:KN,children:[s&&(null==i?void 0:i.map(((e,t)=>p(VN,{supply:e,value:e.value,userHasFinishedOrder:!0},t)))),!s&&(null==i?void 0:i.map(((e,t)=>p(jN,{supply:e,value:e.value,userHasFinishedOrder:!0},t))))]})]})]})};const JN=new class{async getAllSupplies(){const e=aa.responseHandler(await aa.get("/cms/supplies.json"));return na(e,oa)}async createSupplyRequest({clientCode:e,clientName:t,request:a}){const n=aa.responseHandler(await aa.post("/supply_requests.json",{clientCode:e,clientName:t,request:a}));return na(n,oa)}},ef=[{state:"Alabama",abbrv:"AL"},{state:"Alaska",abbrv:"AK"},{state:"Arizona",abbrv:"AZ"},{state:"Arkansas",abbrv:"AR"},{state:"California",abbrv:"CA"},{state:"Colorado",abbrv:"CO"},{state:"Connecticut",abbrv:"CT"},{state:"Delaware",abbrv:"DE"},{state:"Florida",abbrv:"FL"},{state:"Georgia",abbrv:"GA"},{state:"Hawaii",abbrv:"HI"},{state:"Idaho",abbrv:"ID"},{state:"Illinois",abbrv:"IL"},{state:"Indiana",abbrv:"IN"},{state:"Iowa",abbrv:"IA"},{state:"Kansas",abbrv:"KS"},{state:"Kentucky",abbrv:"KY"},{state:"Louisiana",abbrv:"LA"},{state:"Maine",abbrv:"ME"},{state:"Maryland",abbrv:"MD"},{state:"Massachusetts",abbrv:"MA"},{state:"Michigan",abbrv:"MI"},{state:"Minnesota",abbrv:"MN"},{state:"Mississippi",abbrv:"MS"},{state:"Missouri",abbrv:"MO"},{state:"Montana",abbrv:"MT"},{state:"Nebraska",abbrv:"NE"},{state:"Nevada",abbrv:"NV"},{state:"New Hampshire",abbrv:"NH"},{state:"New Jersey",abbrv:"NJ"},{state:"New Mexico",abbrv:"NM"},{state:"New York",abbrv:"NY"},{state:"North Carolina",abbrv:"NC"},{state:"North Dakota",abbrv:"ND"},{state:"Ohio",abbrv:"OH"},{state:"Oklahoma",abbrv:"OK"},{state:"Oregon",abbrv:"OR"},{state:"Pennsylvania",abbrv:"PA"},{state:"Rhode Island",abbrv:"RI"},{state:"South Carolina",abbrv:"SC"},{state:"South Dakota",abbrv:"SD"},{state:"Tennessee",abbrv:"TN"},{state:"Texas",abbrv:"TX"},{state:"Utah",abbrv:"UT"},{state:"Vermot",abbrv:"VT"},{state:"Virginia",abbrv:"VA"},{state:"Washington",abbrv:"WA"},{state:"Washington DC",abbrv:"DC"},{state:"West Virginia",abbrv:"WV"},{state:"Wisconsin",abbrv:"WI"},{state:"Wyoming",abbrv:"WY"}];var tf={container:"Order_container_1",formAsideContainer:"Order_formAsideContainer_7",aside:"Order_aside_19",asideWrapper:"Order_asideWrapper_24",textContainer:"Order_textContainer_29",buttonContainer:"Order_buttonContainer_34",formsContainer:"Order_formsContainer_42",formContainer:"Order_formContainer_52",form:"Order_form_7",formErrorMessage:"Order_formErrorMessage_67"};const af=({shop:e,setStep:t,setOrderData:a})=>{var n;const i=Wt(),{activeClient:r,authenticatedUser:s}=m.exports.useContext(_a),c=null!=(n=null==r?void 0:r.addresses)?n:[],d=s.user,{mutateAsync:u,isSuccess:h,data:v}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(JN.createSupplyRequest,{onSuccess:e=>{console.log("create supply request success",e)},onError:a=>{console.log("create supply request error",a),t.open(fa(a,e("supplies-order-error")),{severity:"error"})}})})(),[g,y]=m.exports.useState(null),[b,_]=m.exports.useState(null==g?void 0:g.country),[N,f]=m.exports.useState(""),C=e=>{const t=c.find((t=>t.id===Number(e.target.value)));y(null!=t?t:null)},S=z().shape({firstname:Ni(i("field-error-required",{field:i("first-name")})),lastname:Ni(i("field-error-required",{field:i("last-name")})),street_1:Ni(i("field-error-required",{field:i("last-name")})),street_2:U().nullable().notRequired(),city:Ni(i("field-error-required",{field:i("city")})),state:Ni(i("field-error-required",{field:i("state")})),country:Ni(i("field-error-required",{field:i("country")})),postalCode:Ni(i("field-error-required",{field:i("zip")})),phone:Ni(i("field-error-required",{field:i("phone-placeholder")})),email:Ni(i("field-error-required",{field:i("email-placeholder")}),_i(i("email-error-invalid-format")))}),A={firstname:d.firstname,lastname:d.lastname,street_1:g?g.street_1:"",street_2:g?g.street_2:"",city:g?g.city:"",state:g?g.state:"",country:g?g.country:"",postalCode:g?g.postalCode:"",phone:g?g.phone:"",email:d.email},I=Object.fromEntries(Object.entries(e).filter((([e,t])=>0!==t&&!isNaN(t))));return m.exports.useEffect((()=>{var e;y(null!=(e=c.find((({primary:e})=>e)))?e:null)}),[]),m.exports.useEffect((()=>{h&&(a((e=>l(o({},e),{orderId:null==v?void 0:v.id}))),t(2))}),[h]),p(q,{initialValues:A,onSubmit:e=>(e=>{var t,n;u({clientCode:null!=(t=Number(null==r?void 0:r.code))?t:0,clientName:null!=(n=null==r?void 0:r.name)?n:"",request:l(o({},e),{supplies:o({},I)})});const{firstname:i,lastname:s,street_1:c,city:d,postalCode:m,country:p}=e;a((e=>l(o({},e),{firstname:i,lastname:s,street_1:c,city:d,postalCode:m,country:p})))})(e),validationSchema:S,validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,children:({handleBlur:e,handleChange:t,errors:a,touched:n,values:r,isValid:s,submitForm:o,isSubmitting:l})=>p("div",{className:tf.container,children:p(W,{children:R("div",{className:tf.formAsideContainer,children:[R("div",{className:tf.formsContainer,children:[p($t,{variant:"standardSemiBold",children:i("shipping-address")}),R("div",{className:tf.formContainer,children:[p($t,{children:i("address-book")}),p("div",{className:tf.form,children:p(K,{className:tf.formInput,children:R(xr,{label:"select-address",name:"address",defaultValue:g?g.id.toString():"",value:g?g.id.toString():"",onCh
1ange:C,children:[c.map((({id:e,street_1:t,city:a,state:n,postalCode:i,country:r})=>p(Z,{value:e,children:`${t}, ${a}, ${n} ${i}, ${r}`},e))),p(Z,{value:"",children:i("new-address")})]})})})]}),R("div",{className:tf.formContainer,children:[p($t,{children:i("informations")}),R("div",{className:tf.form,children:[R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"firstname",value:r.firstname,onChange:t,onBlur:e,placeholder:i("first-name"),errorMessage:a.firstname,error:!!a.firstname&&n.firstname,type:"text",className:tf.formInput})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"lastname",value:r.lastname,onChange:t,onBlur:e,placeholder:i("last-name"),errorMessage:a.lastname,error:!!a.lastname&&n.lastname,type:"text",className:tf.formInput})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"street_1",value:r.street_1,onChange:t,onBlur:e,placeholder:i("address-1-placeholder"),errorMessage:a.street_1,error:!!a.street_1&&n.street_1,type:"text",className:tf.formInput})]}),R(K,{className:tf.formInput,variant:"standard",children:[p(Me,{children:i("optional")}),p(di,{name:"street_2",value:r.street_2,onChange:t,onBlur:e,placeholder:i("address-2-placeholder"),errorMessage:a.street_2,error:!!a.street_2&&n.street_2,type:"text",className:tf.formInput})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"city",value:r.city,onChange:t,onBlur:e,placeholder:i("city-placeholder"),errorMessage:a.city,error:!!a.city&&n.city,type:"text",className:tf.formInput})]}),"United States"!==r.country&&R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"state",value:r.state,onChange:t,onBlur:e,placeholder:i("state-placeholder"),errorMessage:a.state,error:!!a.state&&n.state,type:"text",className:tf.formInput})]}),"United States"===r.country&&R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(xr,{label:"state",name:"state",value:r.state,onChange:e=>{t(e),f(e.target.value)},SelectDisplayProps:{style:{paddingTop:0}},children:null==ef?void 0:ef.map((e=>p(Z,{value:e.abbrv,className:tf.locationSelect,children:e.state},e.abbrv)))}),!!a.state&&n.state&&p(Me,{className:tf.formErrorMessage,children:a.state})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(xr,{label:"country",name:"country",defaultValue:r.country,value:r.country,onChange:e=>{t(e),(e=>{_(e.target.value)})(e)},SelectDisplayProps:{style:{paddingTop:0}},children:null==ny?void 0:ny.map((e=>p(Z,{value:e,className:tf.locationSelect,children:e},e)))}),!!a.country&&n.country&&p(Me,{className:tf.formErrorMessage,children:a.country})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"postalCode",value:r.postalCode,onChange:t,onBlur:e,placeholder:i("zip"),errorMessage:a.postalCode,error:!!a.postalCode&&n.postalCode,type:"text",className:tf.formInput,InputProps:"United States"===b?{inputComponent:ay}:{}})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"phone",value:r.phone,onChange:t,onBlur:e,placeholder:i("phone-placeholder"),errorMessage:a.phone,error:!!a.phone&&n.phone,type:"text",className:tf.formInput,InputProps:"United States"===b?{inputComponent:ty}:{}})]}),R(K,{className:tf.formInput,variant:"standard",error:!0,children:[p(Me,{children:i("required-field")}),p(di,{name:"email",value:r.email,onChange:t,onBlur:e,placeholder:i("email-placeholder"),errorMessage:a.email,error:!!a.email&&n.email,type:"email",className:tf.formInput})]})]})]})]}),R("aside",{className:tf.aside,children:[R(tg,{className:tf.asideWrapper,children:[R("header",{className:tf.textContainer,children:[p($t,{variant:"standardSemiBold",children:i("supplies-order-aside-title")}),p($t,{children:i("supplies-order-aside-description")})]}),p(bi,{className:tf.buttonContainer,type:"submit",variant:"contained",loading:l,color:"primary",children:i("supplies-order-aside-button")})]}),p(kN,{})]})]})})})})};var nf="OrderPlaced_container_1",rf="OrderPlaced_orderIdContainer_7",sf="OrderPlaced_orderText_11";const of=({orderId:e})=>{const t=Wt();return R("div",{className:nf,children:[p($t,{variant:"bigSemiBold",children:t("your-order-has-been-placed")}),p($t,{children:t("your-order-is-being-processed")}),R("div",{className:rf,children:[p($t,{className:sf,children:t("order-number")}),p($t,{children:e})]})]})};var lf="AsideCollapse_asideContainer_1",cf="AsideCollapse_container_6",df="AsideCollapse_header_14",mf="AsideCollapse_iconContainer_19",pf="AsideCollapse_icon_19",uf="AsideCollapse_collapse_23";const hf=()=>{const e=Wt(),[t,a]=m.exports.useState(!1),[n,i]=m.exports.useState(!1),[r,s]=m.exports.useState(!1);return R(tg,{className:lf,children:[R("div",{className:cf,children:[R("header",{className:df,children:[p(Vt,{variant:"h6",children:e("need-supplies-question")}),p("div",{className:mf,children:p(F,{onClick:()=>a(!t),size:"small",children:p(Sn,{className:pf,spriteUrl:t?Yi:Vi})})})]}),p(j,{in:t,timeout:"auto",className:uf,children:p($t,{children:e("we-offer-our-customers")})})]}),R("div",{className:cf,children:[R("header",{className:df,children:[p(Vt,{variant:"h6",children:e("in-a-hurry-question")}),p("div",{className:mf,children:p(F,{onClick:()=>i(!n),size:"small",children:p(Sn,{className:pf,spriteUrl:n?Yi:Vi})})})]}),p(j,{in:n,timeout:"auto",className:uf,children:p($t,{children:e("if-you-need-them-sooner")})})]}),R("div",{className:cf,children:[R("header",{className:df,children:[p(Vt,{variant:"h6",children:e("not-sure-what-you-need-question")}),p("div",{className:mf,children:p(F,{onClick:()=>s(!r),size:"small",children:p(Sn,{className:pf,spriteUrl:r?Yi:Vi})})})]}),p(j,{in:r,timeout:"auto",className:uf,children:p($t,{children:e("you-will-find-the-required-volume")})})]})]})};var vf="AsideWithButton_container_1",gf="AsideWithButton_textContainer_6";const yf=({title:e,subTitle:t,buttonText:a,isButtonLoading:n=!1,buttonAction:i,isDisabled:r})=>{const s=Wt();return R(tg,{className:vf,children:[R("header",{className:gf,children:[p($t,{variant:"standardSemiBold",children:s(e)}),t&&p($t,{children:s(t)})]}),p(bi,{loading:n,disabled:r,onClick:i,variant:"contained",color:"primary",children:s(a)})]})};var bf="Shop_container_1",_f="Shop_content_11",Nf="Shop_asideContainer_21";const ff=({supplies:e,shop:t,setShop:a,setStep:n})=>{const i=h(),r=A(i.breakpoints.up("md")),s=m.exports.useContext(Na),o=Object.values(t).every((e=>0===e||isNaN(e)));return 0===e.length?p(pn,{className:"spinnerCenter"}):R("div",{className:bf,children:[R("div",{className:Nf,children:[p(yf,{title:"supplies-order",buttonText:"order-items",isDisabled:o,buttonAction:()=>{Object.values(t).some((e=>Number(e)<0))?s.open("Negative amount has been entered for a supply. Please only enter numbers greater than zero.",{severity:"error"}):n(1)}}),p(hf,{}),p(kN,{})]}),R("div",{className:_f,children:[r&&(null==e?void 0:e.map(((e,n)=>p(VN,{supply:e,setShop:a,value:t[e.key]},n)))),!r&&(null==e?void 0:e.map(((e,n)=>p(jN,{supply:e,setShop:a,value:t[e.key]},n))))]})]})},Cf={[BN.GLUTATHIONE_SAMPLING]:0,[BN.ATMOSHPERIC_TRAPS]:0,[BN.SAMPLE_BOTTLES]:0,[BN.BERRY_SAMPLE_LABELS]:0,[BN.JUICE_SAMPLE_LABELS]:0,[BN.WINE_SAMPLE_LABELS]:0,[BN.SAMPLE_TUBES]:0,[BN.THERMOPOD_ENVELOPES]:0};var Sf="Supplies_container_1",xf="Supplies_btn_12",Af="Supplies_icon_19";const If=()=>{f();const e=Wt(),{data:t}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getAllSupplies"],(()=>JN.getAllSupplies()),{keepPreviousData:!0,onSuccess:e=>{console.log("get all supplies",e)},onError:a=>{console.log("get all supplies error",a),t.open(fa(a,e("get-all-supplies-error")),{severity:"error"})}})})(),[a,n]=m.exports.useState(Cf),[i,r]=m.exports.useState(0),[s,o]=m.exports.useState({orderId:0,firstname:"",lastname:"",street_1:"",street_2:"",city:"",postalCode:"",country:"",email:"",state:"",phone:""});return R("div",{className:Sf,children:[0===i&&R(k,{children:[p(Vt,{variant:"h4",children:e("supplies")}),p(ff,{supplies:null!=t?t:[],shop:a,setShop:n,setStep:r})]}),1===i&&R(k,{children:[p(P,{className:xf,variant:"text",size:"small",startIcon:p(Sn,{className:Af,spriteUrl:bm}),onClick:()=>r(0),children:e("back-to-supplies")}),p(Vt,{variant:"h4",children:e("order")}),p(af,{shop:a,setStep:r,setOrderData:o})]}),2===i&&R(k,{children:[p(P,{className:xf,variant:"text",size:"small",startIcon:p(Sn,{className:Af,spriteUrl:bm}),onClick:()=>{n(Cf),r(0)},children:e("back-to-supplies")}),p(Vt,{variant:"h4",children:e("thank-you")}),p(of,{orderId:s.orderId}),p(ZN,{supplies:null!=t?t:[],shop:a,orderData:s})]})]})};var wf,Tf;(Tf=wf||(wf={})).ACCOUNTING="primaryAccounting",Tf.REPORTING="primaryReporting";var Rf=wf;
1const kf=new class{async getAllTeamMembers({clientId:e}){const t=aa.responseHandler(await aa.get(`/clients/${e}/team_members.json`));return na(t,oa)}async addTeamMember(e){var t=e,{clientId:a}=t,n=c(t,["clientId"]);const i=aa.responseHandler(await aa.post(`/clients/${a}/memberships.json`,n));return na(i,oa)}async editTeamMember(e){var t=e,{clientId:a,membershipId:n}=t,i=c(t,["clientId","membershipId"]);const r=aa.responseHandler(await aa.put(`/clients/${a}/memberships/${n}.json`,na(o({},i),ca)));return na(r,oa)}async deleteTeamMember({clientId:e,membershipId:t}){const a=aa.responseHandler(await aa.delete(`/clients/${e}/memberships/${t}.json`));return na(a,oa)}},Ef=()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(kf.editTeamMember,{onSuccess:n=>{console.log("edit team member success",n),e.invalidateQueries(["getAllTeamMembers"]),a.open(t("edit-team-member-success"),{severity:"success"})},onError:e=>{console.error("edit team member error",e),a.open(fa(e,t("edit-team-member-error")),{severity:"error"})}})};var Mf="PrimaryContacts_container_1",Df="PrimaryContacts_logicContainer_6",Pf="PrimaryContacts_selectContainer_17";const Lf=({teamMembers:e,activeClientId:t})=>{var a,n;const i=Wt(),r=Om(),{authenticatedUser:s}=m.exports.useContext(_a),{user:{administrator:c}}=s,d=e.map((({email:e})=>e)),u=e.find((e=>!0===e.primaryAccounting)),h=e.find((e=>!0===e.primaryReporting)),[v,g]=m.exports.useState(null!=(a=null==u?void 0:u.email)?a:""),[y,b]=m.exports.useState(null!=(n=null==h?void 0:h.email)?n:""),{mutateAsync:_}=Ef(),N=async(a,n)=>{const i=e.find((e=>e.email===a));i&&await _(l(o({},i),{clientId:t,membershipId:i.id,[n]:!0}))};return R("div",{className:Mf,children:[p(Vt,{variant:"h5",children:i("primary-contacts")}),R("div",{className:Df,children:[R("div",{className:Pf,children:[p(Vt,{variant:"h6",children:i("accounting")}),p(xr,{disabled:!r&&!c,label:"business-type-placeholder",name:"businessType",value:v,onChange:e=>{g(e.target.value),N(e.target.value,Rf.ACCOUNTING)},items:d})]}),R("div",{className:Pf,children:[p(Vt,{variant:"h6",children:i("reporting")}),p(xr,{disabled:!r&&!c,label:"business-type-placeholder",name:"businessType",value:y,onChange:e=>{b(e.target.value),N(e.target.value,Rf.REPORTING)},items:d})]})]})]})},Bf=[{dataKeyName:["email"],headerCellTitle:"email-address",type:"input",editable:!1,isWithTooltipIcon:!1,positionInOrder:0},{dataKeyName:["role"],headerCellTitle:"role",type:"select",editable:!0,isWithTooltipIcon:!0,toolTipText:"Assign each user permissions. A Full User can access laboratory results & invoices but cannot make any changes to the client account settings. A Reporting User can only view laboratory results (not invoices). A Bulling User can only view invoices (not laboratory results).",positionInOrder:1},{dataKeyName:["invoices","reports"],headerCellTitle:"email-notifications",type:"switch",editable:!0,isWithTooltipIcon:!0,toolTipText:"Select which users should receive copies of laboratory reports and / or invoices by email.",positionInOrder:2}],Of={email:"",reports:!1,invoices:!1,primaryReporting:!1,primaryAccounting:!1,role:ga.FULL_USER},Ff=[ga.ADMINISTRATOR,ga.FULL_USER,ga.REPORTING_USER,ga.BILLING_USER];var Hf="DynamicFormTableHeader_headers_1",Uf="DynamicFormTableHeader_head_1",zf="DynamicFormTableHeader_icon_20";const Gf=function({rowHeader:e}){const t=Wt();return R("div",{className:Hf,children:[e.map((({headerCellTitle:e,isWithTooltipIcon:a,toolTipText:n,positionInOrder:i})=>R("div",{className:Uf,children:[""!==e&&p(Vt,{variant:"h6",children:t(e)}),a&&p(me,{title:n||"",children:p("span",{children:p(Sn,{spriteUrl:ah,className:zf})})})]},i))),p("div",{className:Uf})]})},qf=({role:e,handleChange:t,isAdmin:a,godMode:n})=>p(xr,{label:"role",name:"role",value:e,items:Ff,onChange:t,disabled:!a&&!n});var Wf,Vf;(Vf=Wf||(Wf={})).ADD_NEW="addNew",Vf.EXISTING="existing";var Yf=Wf;var jf={container:"DynamicCardForm_container_1",formContainer:"DynamicCardForm_formContainer_6",field:"DynamicCardForm_field_15",label:"DynamicCardForm_label_24",switchContainer:"DynamicCardForm_switchContainer_27",switchList:"DynamicCardForm_switchList_37",switch:"DynamicCardForm_switch_27",buttonsContainer:"DynamicCardForm_buttonsContainer_47"};
1const $f=function({isAdmin:e,godMode:t,data:a,dataDescription:n,dataType:i,validationSchema:r,handleSubmit:s,handleDelete:o,setIsFormOpen:l}){const c=Wt(),{openDialog:d,closeDialog:u}=m.exports.useContext(yo);return p("div",{className:jf.container,children:a.map(((a,m)=>p(q,{initialValues:a,onSubmit:async e=>{await s(e),i===Yf.ADD_NEW&&l(!1)},validationSchema:r,validateOnBlur:!1,enableReinitialize:!0,children:({isValid:a,handleChange:r,handleBlur:s,errors:h,touched:v,values:g,dirty:y,isSubmitting:b})=>R(W,{className:jf.formContainer,children:[n.map((({headerCellTitle:a,dataKeyName:n,type:o,editable:l},d)=>{switch(o){case"input":return R("div",{className:jf.field,children:[""!==a&&p($t,{className:jf.label,children:c(a)}),p(di,{name:n[0],value:g[n[0]],disabled:i===Yf.EXISTING&&!l||!e&&!t,onChange:r,onBlur:s,placeholder:c(`${String(n[0])}-placeholder`),errorMessage:h[n[0]],error:!!h[n[0]]&&v[n[0]],type:"text"})]},d);case"select":return R("div",{className:jf.field,children:[""!==a&&p($t,{className:jf.label,children:c(a)}),p(qf,{godMode:t,isAdmin:e,role:g[n[0]],handleChange:r})]},d);case"switch":return R("div",{className:jf.switchContainer,children:[""!==a&&p($t,{className:jf.label,children:c(a)}),p("div",{className:jf.switchList,children:n.map(((a,n)=>R("div",{className:jf.switch,children:[p(De,{disabled:!e&&!t,name:a,onChange:r,color:"primary",size:"small",checked:g[a]}),p($t,{className:jf.switchText,children:a})]},n)))})]},d)}})),R("div",{className:jf.buttonsContainer,children:[p(P,{size:"small",className:jf.btn,variant:"text",disabled:!e&&!t,onClick:()=>{i===Yf.ADD_NEW?l(!1):d((async()=>{o&&o(g),u()}),"delete-warning-title","delete-warning-description","yes","no")},children:i===Yf.ADD_NEW?c("cancel"):c("delete")}),p(bi,{size:"small",variant:"text",className:jf.btn,loading:b,type:"submit",color:"primary",disabled:!a||!e&&!t||!y,children:c("save")})]})]},m)},m)))})};var Qf={container:"DynamicFormTableRows_container_1",tableRow:"DynamicFormTableRows_tableRow_8",switchContainer:"DynamicFormTableRows_switchContainer_23",buttonsContainer:"DynamicFormTableRows_buttonsContainer_28",deleteBtn:"DynamicFormTableRows_deleteBtn_32",textEmpty:"DynamicFormTableRows_textEmpty_35"};const Kf=function({isAdmin:e,godMode:t,data:a,dataDescription:n,dataType:i,validationSchema:r,handleSubmit:s,handleDelete:o,setIsFormOpen:l}){const c=Wt(),{openDialog:d,closeDialog:u}=m.exports.useContext(yo);return p("div",{className:Qf.container,children:0===a.length?p("div",{className:Qf.tableRow,children:p($t,{variant:"standard",className:Qf.textEmpty,children:c("no-data-found")})}):p(k,{children:a.map(((a,m)=>p(q,{initialValues:a,onSubmit:async e=>{await s(e),i===Yf.ADD_NEW&&l(!1)},validationSchema:r,validateOnBlur:!1,enableReinitialize:!0,children:({isValid:a,handleChange:r,handleBlur:s,errors:h,touched:v,values:g,dirty:y,isSubmitting:b})=>R(W,{className:Qf.tableRow,children:[n.map((({dataKeyName:a,type:n,editable:o},l)=>{switch(n){case"input":return p(di,{className:Qf.tableCell,name:a[0],value:g[a[0]],disabled:i===Yf.EXISTING&&!o||!e&&!t,onChange:r,onBlur:s,placeholder:c(`${String(a[0])}-placeholder`),errorMessage:h[a[0]],error:!!h[a[0]]&&v[a[0]],type:"text"},l);case"select":return p(qf,{godMode:t,isAdmin:e,role:g[a[0]],handleChange:r},l);case"switch":return p("div",{className:Qf.switchContainer,children:a.map(((a,n)=>R("div",{style:{display:"flex",alignItems:"center",textTransform:"capitalize"},children:[p(De,{disabled:!e&&!t,name:a,onChange:r,color:"primary",checked:g[a]},n),p($t,{className:Qf.switchText,children:a})]},n)))},l)}})),R("div",{className:Qf.buttonsContainer,children:[p(bi,{className:Qf.btn,size:"small",variant:"text",loading:b,type:"submit",disabled:!a||!e&&!t||!y,children:c("save")}),p(P,{size:"small",className:Qf.deleteBtn,variant:"text",disabled:!e&&!t,onClick:()=>{i===Yf.ADD_NEW?l(!1):d((async()=>{o&&o(g),u()}),"delete-warning-title","delete-warning-description","yes","no")},children:i===Yf.ADD_NEW?c("cancel"):c("delete")})]})]},m)},m)))})})};var Xf="DynamicFormTable_container_1",Zf="DynamicFormTable_btnContainer_6",Jf="DynamicFormTable_btn_6",eC="DynamicFormTable_icon_16",tC="DynamicFormTable_cards_21";const aC=function({entityName:e,validationSchema:t,handleSubmit:a,handleDelete:n,empty
1Data:i,data:r,rowHeaderModel:s,addNewButtonText:o}){const l=Wt(),{authenticatedUser:c}=m.exports.useContext(_a),d=Om(),u=h(),v=A(u.breakpoints.up("lg")),[g,y]=m.exports.useState(!1),{user:{administrator:b}}=c;return R("div",{className:Xf,children:[p(Vt,{variant:"h5",children:e}),(d||b)&&p("div",{className:Zf,children:p(P,{onClick:()=>y(!0),className:Jf,variant:"text",size:"small",color:"secondary",startIcon:p(Sn,{spriteUrl:xv,className:eC}),children:o})}),R("div",v?{children:[p(Gf,{rowHeader:s}),g&&p(Kf,{godMode:b,isAdmin:d,dataDescription:s,data:i,dataType:Yf.ADD_NEW,validationSchema:t,setIsFormOpen:y,handleSubmit:a,handleDelete:n}),r&&p(Kf,{godMode:b,isAdmin:d,dataDescription:s,data:r,dataType:Yf.EXISTING,validationSchema:t,setIsFormOpen:y,handleSubmit:a,handleDelete:n})]}:{className:tC,children:[g&&p($f,{godMode:b,isAdmin:d,dataDescription:s,data:i,dataType:Yf.ADD_NEW,validationSchema:t,setIsFormOpen:y,handleSubmit:a,handleDelete:n}),0!==(null==r?void 0:r.length)||g?p($f,{godMode:b,isAdmin:d,dataDescription:s,data:r,dataType:Yf.EXISTING,validationSchema:t,setIsFormOpen:y,handleSubmit:a,handleDelete:n}):p(Eh,{noRowsLabel:l("no-data-found")})]})]})};var nC={container:"TeamSettings_container_1",formsContainer:"TeamSettings_formsContainer_6"};const iC=()=>{var e,t;const a=Wt(),{activeClient:n}=m.exports.useContext(_a),{data:i,isLoading:r}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getAllTeamMembers"],(()=>kf.getAllTeamMembers(e)),{keepPreviousData:!1,staleTime:5e5,cacheTime:1e5,onSuccess:e=>{console.log("Get all team members",e)},onError:e=>{console.error("Get all team members error",e),a.open(fa(e,t("get-all-team-members-error")),{severity:"error"})}})})({clientId:null!=(e=null==n?void 0:n.id)?e:0}),{mutateAsync:s}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(kf.addTeamMember,{onSuccess:n=>{console.log("successfully added team member",n),e.invalidateQueries("getAllTeamMembers"),a.open(t("added-team-member-success"),{severity:"success"})},onError:e=>{console.log("failed to add team member error",e),a.open(fa(e,t("add-team-member-error")),{severity:"error"})}})})(),{mutateAsync:c}=Ef(),{mutateAsync:d}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(kf.deleteTeamMember,{onSuccess:n=>{console.log("Delete team member success",n),e.invalidateQueries(["getAllTeamMembers"]),a.open(t("delete-team-member-success"),{severity:"success"})},onError:e=>{console.error("Delete team member error",e),a.open(fa(e,t("delete-team-member-error")),{severity:"error"})}})})(),u=z().shape({email:Ni(a("field-error-required",{field:a("email")}),_i(a("email-error-invalid-format"))),role:Ni(a("field-error-required",{field:a("role")}))});return r?p(pn,{className:"spinnerCenter"}):R("div",{className:nC.container,children:[p(Vt,{variant:"h4",children:a("team-members")}),p("div",{className:nC.primaryContacts,children:p(Lf,{activeClientId:null!=(t=null==n?void 0:n.id)?t:0,teamMembers:null!=i?i:[]})}),p("div",{className:nC.formsContainer,children:p(aC,{entityName:a("team-members-entity-name",{teamMembersLength:null==i?void 0:i.length}),validationSchema:u,handleSubmit:e=>(e=>{var t,a;return"id"in e&&0!==e.id?c(l(o({},e),{clientId:null!=(t=null==n?void 0:n.id)?t:0,membershipId:e.id})):s(l(o({},e),{clientId:null!=(a=null==n?void 0:n.id)?a:0}))})(e),handleDelete:e=>d({clientId:e.clientId,membershipId:e.id}),emptyData:[Of],data:null!=i?i:[],rowHeaderModel:Bf,addNewButtonText:a("add-team-member")})})]})},rC=e=>getComputedStyle(document.documentElement).getPropertyValue(e).trim();var sC="VintageChart_container_1";const oC=({dateYear:e,dateMonth:t,dateDay:a})=>new Date(e,t-1,a),lC=({result:e})=>parseFloat(e),cC=({chartData:e})=>{const t=e=>{let t=oC(e[0]),a=oC(e[0]),n=1e3,i=0;return e.forEach((e=>{oC(e)>a&&(a=oC(e)),oC(e)<t&&(t=oC(e)),lC(e)>i&&(i=lC(e)),lC(e)<n&&(n=lC(e))})),{colors:[rC("--primary-dark")],height:413,chartArea:{right:30,left:90},explorer:{actions:["dragToZoom","rightClickToReset"],axis:"horizontal",keepInBounds:!0,maxZoomIn:12},title:e[0].analyte,hAxis:{title:"",minValue:t,maxValue:a,format:"dd MMM yyyy"},vAxis:{title:e[0].analyte,minValue:n,maxValue:i},legend:"none",trendlines:{0:{type:"exponential",visibleInLegend:!0,showR2:!0,color:rC("--gray-dark-300")}}}},a=Object.entries(e.reduce(((e,t)=>(e[t.analyte]||(e[t.analyte]=[]),e[t.analyte].push(t),e)),{})).map((([e,t])=>[...t]));return p("div",{className:sC,children:a.map(((e,a)=>{const n=e.map((e=>[oC(e),lC(e)]));return p(Be,{options:t(e),chartType:"ScatterChart",data:[["Timeline","Date & Result"],...n],width:"100%"},a)}))})};var dC="VintageInstructions_container_1",mC="VintageInstructions_textContainer_11",pC="VintageInstructions_icon_19";const uC=()=>{const e=Wt();return R("div",{className:dC,children:[p(Sn,{spriteUrl:ah,className:pC}),R("div",{className:mC,children:[p($t,{children:e("instructions")}),p($t,{children:e("vintage-portal-instructions")})]})]})};var hC={container:"VintagePortalSelect_container_1",spinner:"VintagePortalSelect_spinner_18"};
1const vC=({analysesOptions:e,varietalsOptions:t,regionsOptions:a,vintageReportFilterQueryOptions:n,setVintageReportFilterQueryOptions:i,getResults:r,isVintagePortalVarietalsFetching:s,isVintagePortalRegionsFetching:c,areResultsFetched:d})=>{const m=Wt();return R("div",{className:hC.container,children:[p($t,{variant:"standardSemiBold",children:m("vintage-report-filter")}),p(xr,{name:"analysisFilterId",value:n.analysisFilterId,onChange:e=>i((t=>l(o({},t),{analysisFilterId:e.target.value,varietalFilterId:"",regionFilterId:""}))),label:"select-analysis-label",children:null==e?void 0:e.map((({id:e,name:t})=>p(Z,{sx:{textTransform:"capitalize"},value:e,className:hC.selectText,children:t},e)))}),p(xr,{disabled:s&&0===e.length||0===t.length,name:"varietalFilterId",value:n.varietalFilterId,onChange:e=>i((t=>l(o({},t),{varietalFilterId:e.target.value}))),label:s?"loading":"select-varietal-label",children:0!==t.length&&(null==t?void 0:t.map((({id:e,name:t})=>p(Z,{sx:{textTransform:"capitalize"},value:e,className:hC.selectText,children:t},e))))}),p(xr,{disabled:c&&0===t.length||0===a.length,name:"regionFilterId",onChange:e=>i((t=>l(o({},t),{regionFilterId:e.target.value}))),value:n.regionFilterId,label:c?"loading":"select-region-label",children:(!ra(a)||Array.isArray(a)&&a.length>0)&&(null==a?void 0:a.map((({id:e,name:t})=>p(Z,{sx:{textTransform:"capitalize"},value:e,className:hC.selectText,children:t},e))))}),p(bi,{disabled:""===n.analysisFilterId||""===n.varietalFilterId||""===n.regionFilterId,onClick:r,loading:d,children:m("run-report")})]})};const gC=new class{async getVintagePortalAnalyses(){const e=aa.responseHandler(await aa.get("/vintage_portal/analyses.json"));return na(e,oa)}async getVintagePortalVarietals(e){const t=aa.responseHandler(await aa.get(`/vintage_portal/varietals.json?analyses=${e}`));return na(t,oa)}async getVintagePortalRegions(e,t){const a=aa.responseHandler(await aa.get(`/vintage_portal/regions.json?analyses=${e}&varietal=${t}`));return na(a,oa)}async getVintagePortalAnalysesReport(e,t,a){const n=aa.responseHandler(await aa.get(`/vintage_portal/analyses_report.json?analyses=${e}&varietal=${t}&ava=${a}`)).sort(((e,t)=>new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime())).map((e=>l(o({},e),{result:Number(e.result)})));return na(n,oa)}};var yC="VintagePortal_container_1",bC="VintagePortal_headerContainer_6",_C="VintagePortal_selectContainer_20";const NC=()=>{const e=Wt(),[t,a]=m.exports.useState({analysisFilterId:"",varietalFilterId:"",regionFilterId:""}),{data:n}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getVintagePortalAnalyses"],gC.getVintagePortalAnalyses,{keepPreviousData:!0,onSuccess:e=>{console.log("Get all vintage analyses",e)},onError:a=>{console.error("Get all vintage analyses error",a),t.open(fa(a,e("get-vintage-trends-analyses-error")),{severity:"error"})}})})(),{data:i,refetch:r,isFetching:s}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getVintagePortalVarietals"],(()=>gC.getVintagePortalVarietals(e)),{keepPreviousData:!0,enabled:!1,onSuccess:e=>{console.log("Get vintage trends varietals",e)},onError:e=>{console.error("Get vintage trends varietals error",e),a.open(fa(e,t("get-vintage-trends-varietals-error")),{severity:"error"})}})})(t.analysisFilterId),{data:o,refetch:l,isFetching:c}=((e,t)=>{const a=Wt(),n=m.exports.useContext(Na);return L(["getVintagePortalRegions"],(()=>gC.getVintagePortalRegions(e,t)),{keepPreviousData:!0,enabled:!1,onSuccess:e=>{console.log("Get vintage trends regions",e)},onError:e=>{console.error("Get vintage trends regions error",e),n.open(fa(e,a("get-vintage-trends-regions-error")),{severity:"error"})}})})(t.analysisFilterId,t.varietalFilterId),{data:d,refetch:u,isFetching:h,isFetched:v}=((e,t,a)=>{const n=Wt(),i=m.exports.useContext(Na);return L(["getVintagePortalAnalysesReport"],(()=>gC.getVintagePortalAnalysesReport(e,t,a)),{enabled:!1,onSuccess:e=>{console.log("Get vintage trends analyses report",e)},onError:e=>{console.error("Get vintage trends analyses report error",e),i.open(fa(e,n("get-vintage-trends-analyses-report-error")),{severity:"error"})}})})(t.analysisFilterId,t.varietalFilterId,t.regionFilterId);return m.exports.useEffect((()=>{""!==t.analysisFilterId&&r()}),[t.analysisFilterId]),m.exports.useEffect((()=>{""!==t.varietalFilterId&&l()}),[t.varietalFilterId]),R("div",{className:yC,children:[R("div",{className:bC,children:[p(Vt,{variant:"h4",children:e("vintage-portal-menu")}),p(Vt,{variant:"h5",children:e("vintage-report")})]}),R("main",{children:[p("div",{className:_C,children:p(vC,{vintageReportFilterQueryOptions:t,setVintageReportFilterQueryOptions:a,analysesOptions:null!=n?n:[],varietal
1sOptions:null!=i?i:[],regionsOptions:null!=o?o:[],isVintagePortalVarietalsFetching:s,isVintagePortalRegionsFetching:c,areResultsFetched:h,getResults:u})}),!v&&!h&&p(uC,{}),h&&p(pn,{className:"spinnerCenter"}),v&&p(cC,{chartData:null!=d?d:[]})]})]})};var fC="SmokeCharts_container_1",CC="SmokeCharts_exportBtn_31",SC="SmokeCharts_icon_34";function xC({JSONSmokeReport:e,varietal:t}){var a;let n,i=null;if(!e||0===e.length)return p("div",{children:"loading..."});if(!e[0]||"object"!=typeof e[0])return console.error("SmokeCharts: Invalid data received",e),p("div",{children:"No data available"});try{n=(e=>{var t;const a=e.JSONSmokeReport,n=null==(t=null==a?void 0:a.analytes)?void 0:t.map((e=>{const{analyte:t,percentile_99:a,percentile_95:n,result:i}=e;return{analyte:t,percentile_99:a,percentile_95:n,result:i}}));return{friendlyNumber:a.friendlyNumber,description:a.description,loggedAt:a.loggedAt,reportedAt:a.reportedAt,analytes:n}})({JSONSmokeReport:e[0]})}catch(h){return console.error("SmokeCharts: Error parsing data",h,e[0]),p("div",{children:"Error loading chart data"})}if(!n.analytes||0===(null==(a=null==n?void 0:n.analytes)?void 0:a.length))return p("div",{});const r=e=>{try{let t="";return t="-1"===e.result?"Not Applicable*":e.result.includes("<")?" Below Reportable Level":`${e.result}`,t}catch(h){return console.warn("Display value formatting error:",h),`${e.result}`}},s=(e,t)=>{var a,n,i,r;try{return"result"===t?"-1"===e.result?"Not Applicable*":e.result&&e.result.includes("<")?e.result:e.result||"0":"percentile_95"===t?"lt"===(null==(a=e.percentile_95)?void 0:a.operator)?`< ${e.percentile_95.value}`:(null==(n=e.percentile_95)?void 0:n.value)||"0":"percentile_99"===t?"lt"===(null==(i=e.percentile_99)?void 0:i.operator)?`< ${e.percentile_99.value}`:(null==(r=e.percentile_99)?void 0:r.value)||"0":"0"}catch(h){return console.warn("Display value formatting error:",h),"0"}},l=e=>{try{if(!e)return"";const t=new Date(e);return t.toLocaleDateString()+" "+t.toLocaleTimeString()}catch(h){return console.warn("Date formatting error:",h),""}},c=l(n.loggedAt),d=l(n.reportedAt);let m=`Sample Number: ${n.friendlyNumber||"Unknown"}`;c&&(m+=`. Logged: ${c}`),d&&(m+=`. Reported: ${d}`),m+=n.analytes.some((e=>"-1"===e.result))?"<br/><br/>*Sample not analyzed for the full combined panel Extended Volatile AND Glycosylated Markers":"";const u={type:"msbar2d",width:"100%",height:"1200",dataSource:{chart:{caption:`Smoke Impact Comparative Report (For Grape Samples) - Sample: ${n.description||"Unknown Sample"}${t?` (${t})`:""}<br/><br/>`,subcaption:m,theme:"fusion",xAxisName:"Analytes",yAxisName:"Results µg/kg",chartOrientation:"horizontal",placevaluesInside:"0",showValues:"1",legendPosition:"right",numDivLines:"8",showLabels:"1",plotPaddingPercent:"10",captionAlignment:"center",captionPadding:"20",valuePadding:"5",legendIconScale:2,showToolTip:"1",toolTipBgColor:"#ffffff",toolTipBorderColor:"#cccccc",toolTipSepChar:"",exportEnabled:"1",exportMode:"client",exportFormats:"PDF=Export as PDF",exportShowMenuItem:"0",exportAtClientSide:"1"},categories:[{category:n.analytes.map((e=>({label:e.analyte})))}],dataset:[{seriesname:"Sample Result",color:"#48b2de",data:n.analytes.map((e=>({value:"-1"===e.result?0:e.result.includes("<")?.1:e.result.replace("<",""),displayValue:s(e,"result"),toolText:`<b>${e.analyte}</b><br/>Your Sample Result: <b>${r(e)}</b><br/>Baseline, 95th Percentile: <b>${s(e,"percentile_95")}</b><br/>Baseline, 99th Percentile: <b>${s(e,"percentile_99")}</b>`})))},{seriesname:"Baseline: 95th Percentile",color:"#bec3c6",data:n.analytes.map((e=>({value:"lt"===e.percentile_95.operator?.1:e.percentile_95.value,displayValue:s(e,"percentile_95"),toolText:`<b>${e.analyte}</b><br/>Your Sample Result: <b>${r(e)}</b><br/>Baseline, 95th Percentile: <b>${s(e,"percentile_95")}</b><br/>Baseline, 99th Percentile: <b>${s(e,"percentile_99")}</b>`})))},{seriesname:"Baseline: 99th Percentile",color:"#98989c",data:n.analytes.map((e=>({value:"lt"===e.percentile_99.operator?.1:e.percentile_99.value,displayValue:s(e,"percentile_99"),toolText:`<b>${e.analyte}</b><br/>Your Sample Result: <b>${r(e)}</b><br/>Baseline, 95th Percentile: <b>${s(e,"percentile_95")}</b><br/>Baseline, 99th Percentile: <b>${s(e,"percentile_99")}</b>`})))}]},events:{rendered:e=>{i=e.sender}}};return R("div",{className:fC,children:[p(P,{className:CC,onClick:()=>
1{if(i){const e=`smoke_impact_report_${n.friendlyNumber||"sample"}_${t?t.replace(/[^a-zA-Z0-9]/g,"_"):"unknown"}`;i.exportChart({exportFormat:"pdf",exportFileName:e,exportCallback:()=>{console.log("Chart exported successfully")}})}},variant:"outlined",size:"small",startIcon:p(Sn,{spriteUrl:_b,className:SC}),children:"Export Report"}),p(Oe,o({},u))]})}Oe.fcRoot(Fe,He,Ue);var AC="SmokeImpactInstructions_container_1",IC="SmokeImpactInstructions_textContainer_11";const wC=()=>{const e=Wt();return p("div",{className:AC,children:R("div",{className:IC,children:[p("h4",{children:"Background"}),p($t,{variant:"standard",children:p(mn,{html:e("smoke-impact-reports-instructions")})})]})})};var TC={container:"SmokeImpactReportForm_container_1",invalidFilterIcon:"SmokeImpactReportForm_invalidFilterIcon_17",validFilterIcon:"SmokeImpactReportForm_validFilterIcon_24",filterEntryStatus:"SmokeImpactReportForm_filterEntryStatus_31",spinner:"SmokeImpactReportForm_spinner_38"},RC="/assets/errorFilled.689fd892.svg",kC="/assets/checkmarkFilled.5b143207.svg";const EC=({smokeImpactVarietals:e,smokeImpactQueryOptions:t,setSmokeImpactQueryOptions:a,areResultsFetched:n,getResults:i})=>{const r=Wt(),[s,c]=m.exports.useState([{}]);return m.exports.useEffect((()=>{""===t.sampleNumber&&""===t.varietalCode?c([{icon:RC,text:"ETS Sample Number Is Required",valid:!1},{icon:RC,text:"A Varietal Is Required",valid:!1}]):""===t.sampleNumber&&""!==t.varietalCode?c([{icon:RC,text:"ETS Sample Number Is Required",valid:!1},{icon:kC,text:"A Varietal Is Required",valid:!0}]):""!==t.sampleNumber&&""===t.varietalCode?c([{icon:kC,text:"ETS Sample Number Is Required",valid:!0},{icon:RC,text:"A Varietal Is Required",valid:!1}]):c([{icon:kC,text:"ETS Sample Number Is Required",valid:!0},{icon:kC,text:"A Varietal Is Required",valid:!0}])}),[t]),R("div",{className:TC.container,id:"smoke-impact-form",children:[p($t,{variant:"standardSemiBold",children:r("smoke-impact-form-title")}),p(di,{name:"sampleNumber",placeholder:r("sample-number"),value:t.sampleNumber,onChange:e=>a((t=>l(o({},t),{sampleNumber:e.target.value}))),type:"text",className:TC.formInput}),p(xr,{name:"smokeImpactVarietal",value:t.varietalCode,onChange:e=>a((t=>l(o({},t),{varietalCode:e.target.value}))),label:"select-varietal-label",children:null==e?void 0:e.map((e=>p(Z,{sx:{textTransform:"capitalize"},value:e[0],className:TC.selectText,children:e[1]},e[0])))}),p(bi,{disabled:""===t.sampleNumber||""===t.varietalCode||0===t.clientId,onClick:()=>i(),loading:!1,children:r("run-report")}),s.map(((e,t)=>R("span",{className:TC.filterEntryStatus,children:[p(Sn,{spriteUrl:e.icon,className:e.valid?TC.validFilterIcon:TC.invalidFilterIcon}),p($t,{variant:"standardMedium",children:e.text})]},t)))]})};const MC=new class{async getSmokeImpactReport(e,t,a){const n=aa.responseHandler(await aa.get(`/smoke-impact-report.json?sample_number=${t}&client_id=${e}&varietal_code=${a}`)),i=na(n,oa);return i&&0!==Object.keys(i).length?Array.isArray(i)?i:[i]:[]}async getSmokeImpactVarietals(){const e=aa.responseHandler(await aa.get("/smoke-impact/varietals.json"));return na(e,oa)}async getSmokeImpactSamples(e){const t=aa.responseHandler(await aa.get(`/results/${e}/smoke_impact_samples.json`));return na(t,oa)}};var DC,PC;(PC=DC||(DC={})).NUMBER="friendlyNumber",PC.DESCRIPTION="description",PC.LOGGED="loggedAt",PC.STATUS="status";var LC=DC;var BC="SmokeImpactColumns_groupWidth_10",OC="SmokeImpactColumns_groupCell_15",FC="SmokeImpactColumns_tableHeaderTruncate_27",HC="SmokeImpactColumns_status_33",UC="SmokeImpactColumns_preliminary_46",zC="SmokeImpactColumns_completed_52",GC="SmokeImpactColumns_view_59";var qC={cardTitle:"SmokeImpactSampleCard_cardTitle_1",cardContent:"SmokeImpactSampleCard_cardContent_5",status:"SmokeImpactSampleCard_status_10",preliminary:"SmokeImpactSampleCard_preliminary_23",completed:"SmokeImpactSampleCard_completed_29",quickView:"SmokeImpactSampleCard_quickView_35",label:"SmokeImpactSampleCard_label_40",value:"SmokeImpactSampleCard_value_43"};const WC=({item:e,setQueryOptions:t,handleClick:a})=>(f(),p(Bb,{onContentClick:()=>{a({row:{friendlyNumber:e.friendlyNumber}})},title:e.friendlyNumber,cardContent:R("div",{className:qC.cardContent,children:[p(Ub,{label:"description",value:e.description,isValueHighlighted:!0}),p(Ub,{label:"logged-date",value:Uu(e.loggedAt)})]}),expandedCardContent:p("div",{className:qC.cardContent,children:p("div",{children:p($t,{className:qC.view,children:"Select Sample"})})})})),VC=({smokeImpactSamples:e,setQueryOptions:t,handleClick:a})=>{const n=Wt();return p(k,{children:(null==e?void 0:e.data.length)<1?p(Eh,{noRowsLabel:n("no-results")}):p(wb,{children:null==e?void 0:e.data.map(((e,n)=>p(WC,{item:e,setQueryOptions:t,handleClick:a},n)))})})},YC=({smokeImpactSamples:e,setQueryOptions:t})=>{var a;const n=Wt(),i=h(),r=A(i.breakpoints.up("lg")),s=(()=>{const e=Wt();return[{field:LC.NUMBER,sortable:!1,renderHeader:()=>p(me,{title:"ETS Sample Number",children:p("div",{children:p(Vt,{variant:"h6",className:FC,children:"Sample Number"})})}),flex:1,renderCell:e=>p("div",{className:OC,children:p(Vt,{variant:"h6",className:BC,children:e.value})})},{field:LC.DESCRIPTION,sortable:!1,renderHeader:()=>p(me,{title:e("samples"),children:p("div",{children:p(Vt,{variant:"h6",className:FC,children:"Sample Description"})})}),flex:2,renderCell:e=>p("div",{className:OC,children:p(Vt,{variant:"h6",children:e.value})})},{field:LC.LOGGED,sortable:!1,renderHeader:()=>p(me,{title:e("logged"),children:p("div",{children:p(Vt,{variant:"h6",className:FC,children:"Logged Date"})})}),flex:.5,renderCell:({row:e})=>p($t,{children:Gu(e.loggedAt)})},{field:LC.STATUS,sortable:!1,renderHeader:()=>p(me,{title:e("status"),children:p("div",{children:p(Vt,{variant:"h6",className:FC,children:"Reporting Status"})})}),flex:.5,renderCell:e=>R("div",{className:I(HC,{[UC]:e.value===ku.PRELIMINARY,[zC]:e.value===ku.COMPLETED}),children:[p("span",{}),p($t,{children:e.value})]})},{field:"view-results",sortable:!1,renderHeader:()=>"",flex:.5,renderCell:()=>p("div",{children:p($t,{className:GC,children:"Select Sample"})})}]})(),c=e=>{t((t=>l(o({},t),{sampleNumber:e.row.friendlyNumber,varietalCode:""})))};return p(k,{children:r?p(Lu,{rowCount:null==e?void 0:e.data.length,rows:null!=(a=null==e?void 0:e.data)?a:[],clickableRows:!0,columns:s,showPagination:!1,pageSize:100,page:1,onRowClick:c,getRowId:t=>{var a;const n=null!=(a=null==e?void 0:e.data.indexOf(t))?a:0;return`${t.id}_${n}`},components:{Row:void 0},noRowsLabel:n("no-results")}):p(VC,{smokeImpactSamples:e,setQueryOptions:t,handleClick:c})})};var jC="SmokeImpactReports_container_1",$C="SmokeImpactReports_headerContainer_6",QC="SmokeImpactReports_selectContainer_23",KC="SmokeImpactReports_samplesContainer_52";const XC=new class{async postDisclaimerAcknowledgement(e){const t=aa.responseHandler(await aa.post("/product_disclaimers.json",na(e,ca)));return na(t,oa)}};var ZC={container:"DisclaimerForm_container_1",collapseAndAdditionalInfoAsideContainer:"DisclaimerForm_collapseAndAdditionalInfoAsideContainer_6",infoAsideContainer:"DisclaimerForm_infoAsideContainer_17",infoAsideContainerHidden:"DisclaimerForm_infoAsideContainerHidden_40",collapseContainer:"DisclaimerForm_collapseContainer_50"};const JC=({disclaimerTitle:e,disclaimerBody:t,disclaimerTag:a,setAcknowledgeDisclaimer:n})=>{Wt();const{activeClient:i,authenticatedUser:r}=m.exports.useContext(_a),s=null==r?void 0:r.user,[o,l]=m.exports.useState(!1);return p(k,{children:p("div",{className:ZC.container,children:p("div",{className:ZC.collapseAndAdditionalInfoAsideContainer,children:R("div",{className:ZC.collapseContainer,children:[p(Vt,{variant:"h4",className:ZC.primaryTitle,children:p(mn,{html:e})}),p($t,{children:p(mn,{html:t})}),p(Ee,{children:p(pe,{control:p(ue,{onClick:()=>l(!o),checked:o}),label:"By checking this box, I acknowledge that I have read, understood, and agreed to the above terms."})}),p(P,{className:ZC.btn,size:"medium",variant:"contained",color:"tertiary",disabled:!o,onClick:async()=>{var e;await XC.postDisclaimerAcknowledgement({clientCode:null!=(e=null==i?void 0:i.code)?e:0,userEmail:s.email,userPid:s.pid,agreementText:t,agreementTag:a}).then((e=>{n(!0),document.cookie=`disclaimerAcknowledged${a}=true`}))},children:"Continue"})]})})})})},eS=()=>{var e,t,a;const n=Wt(),{activeClient:i}=m.exports.useContext(_a),[r,s]=m.exports.useState({clientId:null!=(e=null==i?void 0:i.id)?e:0,sampleNumber:"",varietalCode:""}),{data:o,isFetched:l,refetch:c,isFetching:d}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getSmokeImpactReport",e.clientId,e.sampleNumber,e.varietalCode],(()=>MC.getSmokeImpactReport(e.clientId,e.sampleNumber,e.varietalCode)),{enabled:!1,keepPreviousData:!1,onSuccess:e=>{console.log("Get smoke impact report",e)},onError:e=>{console.error("Get smoke impact report error",e),a.open(fa(e,t("get-vintage-trends-analyses-error")),{severity:"error"})}})})(r),{data:u}=(()=>{const e=Wt(),t=m.exports.useContext(Na);
1return L(["useGetSmokeImpactVarietals"],(()=>MC.getSmokeImpactVarietals()),{keepPreviousData:!0,staleTime:6e5,cacheTime:18e5,refetchOnWindowFocus:!1,onSuccess:e=>{console.log("Get smoke impact varietals",e)},onError:a=>{console.error("Get smoke impact varietals error",a),t.open(fa(a,e("get-vintage-trends-analyses-error")),{severity:"error"})}})})(),{data:h,isFetching:v}=(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getSmokeImpactSamples",e],(()=>MC.getSmokeImpactSamples(e)),{enabled:!!e,keepPreviousData:!0,cacheTime:6e5,staleTime:3e5,refetchOnWindowFocus:!1,onSuccess:e=>{console.log("Get smoke impact samples",e)},onError:e=>{console.error("Get smoke impact samples error",e),a.open(fa(e,t("get-vintage-trends-analyses-error")),{severity:"error"})}})})(null!=(t=null==i?void 0:i.id)?t:0),[g,y]=m.exports.useState(-1!=document.cookie.indexOf("disclaimerAcknowledgedSmokeImpact"));return m.exports.useEffect((()=>{var e;r.sampleNumber&&(null==(e=document.getElementById("smoke-impact-form"))||e.scrollIntoView({behavior:"smooth"}))}),[r.sampleNumber]),m.exports.useEffect((()=>{var e;s({clientId:null!=(e=null==i?void 0:i.id)?e:0,sampleNumber:"",varietalCode:""})}),[null==i?void 0:i.id]),R("div",{className:jC,children:[p("div",{className:$C,children:p(Vt,{variant:"h4",children:n("smoke-impact-header")})}),g&&p("main",{children:R(k,{children:[p("div",{className:QC,children:p(EC,{smokeImpactVarietals:null!=u?u:[],smokeImpactQueryOptions:r,setSmokeImpactQueryOptions:s,areResultsFetched:l,getResults:c})}),p(wC,{})]})}),R("main",{children:[!g&&p(JC,{disclaimerTitle:"Terms & Conditions",disclaimerBody:'<ul>\n <li>\n Please read this disclaimer carefully before continuing. By checking the designated checkbox and utilizing the Smoke Impact Comparative Reporting Dashboard, you acknowledge and agree to the following terms and conditions: \n </li>\n <li>\n <ol>\n <li>General Information Only: The reports generated by the Smoke Impact Comparative Reporting Dashboard are based on general information available at the time of their creation. The data and content within these reports are not tailored to any specific individual or circumstance.</li>\n\n <li>Not Product Guidance: The reports generated by the Smoke Impact Comparative Reporting Dashboard are not intended to constitute product or professional advice. They are provided for informational purposes only, and should not be considered as a substitute for seeking professional guidance.</li>\n\n <li>Actions Based on Reports: Users should refrain from making any significant decisions or taking action solely based on the data contained within the reports. The information provided may not take into account individual circumstances, needs, or requirements.</li>\n\n <li>Consideration of Other Factors: It is essential to recognize that the reports generated by the Smoke Impact Comparative Reporting Dashboard may not encompass all the relevant factors that could impact a particular situation. Users should carefully consider additional information and factors before making any decisions.</li>\n\n <li>No Warranties or Guarantees: The Smoke Impact Comparative Reporting Dashboard and the reports it generates are provided "as is" and without any warranties or guarantees, either expressed or implied. We do not warrant the accuracy, completeness, or reliability of the information contained in the reports.</li>\n\n <li>Limited Liability: We shall not be liable for any direct, indirect, incidental, special, or consequential damages arising out of or in connection with the use of the Smoke Impact Comparative Reporting Dashboard, or reliance on the information provided within the reports.</li>\n\n <li>Updates and Changes: We reserve the right to modify, update, or discontinue the Smoke Impact Comparative Reporting Dashboard and its reports at any time without prior notice.</li>\n\n <li>Continued Acknowledgment: By checking the designated checkbox and proceeding to use the Smoke Impact Comparative Reporting Dashboard, you acknowledge that you have read, understood, and agreed to be bound by this disclaimer and all its terms.</li>\n </ol>\n </li>\n </ul>',disclaimerTag:"SmokeImpact",setAcknowledgeDisclaimer:y}),l&&!d&&g&&o&&o.length>0&&r.sampleNumber&&r.varietalCode&&p(xC,{JSONSmokeReport:o,varietal:(null==(a=null==u?void 0:u.find((e=>e[0]===r.varietalCode)))?void 0:a[1])||""})]}),g&&R("div",{className:KC,children:[p("div",{className:$C,children:p(Vt,{variant:"h5",children:"Samples Available for Smoke Impact Comparative Report"})}),v?p(pn,{className:"spinnerCenter"}):h&&p(YC,{smokeImpactSamples:h,setQueryOptions:s})]})]})};var tS="LaunchpadSidebarMenuHeader_container_1",aS="LaunchpadSidebarMenuHeader_info_7";const nS=()=>{const e=Wt();return p("div",{className:tS,children:R("div",{className:aS,children:[p($t,{variant:"small",children:e("client")}
1),p(Vt,{variant:"h4",children:e("launchpad")})]})})},iS={name:"",officialBusinessName:"",businessType:"",acceptTerms:"false",jobTitle:"",city:"",country:"United States",phone:"",postalCode:"",state:"",street_1:""};const rS=[{labelKey:"all-clients",pathname:Tt.CLIENTS,icon:"/assets/multipleUsersCircle.cb27bb37.svg"},{labelKey:"create-new-client",pathname:Tt.NEW_CLIENT,icon:"/assets/createNewClient.291703ca.svg"}],sS={groupLabel:"launchpad",routesToMatch:[Tt.CLIENTS,Tt.NEW_CLIENT],links:rS.filter((e=>e)),isBeta:[!1,!1]};var oS="Launchpad_launchpadSidebar_1";const lS=()=>p(th,{columnOne:p(ap,{header:p(nS,{}),menuItems:[sS],showGroupLabel:!1,className:oS}),columnTwo:p(E,{})});var cS="/assets/dot.4c471e45.svg";var dS="ClientCardDesktop_clientRow_1",mS="ClientCardDesktop_cursorPointer_14",pS="ClientCardDesktop_customLink_17",uS="ClientCardDesktop_clientCell_23",hS="ClientCardDesktop_grayDot_29",vS="ClientCardDesktop_clientBlocked_29",gS="ClientCardDesktop_billingIcon_29",yS="ClientCardDesktop_godmodeLinks_59";const bS=({client:e})=>{const t=Wt(),{setActiveClient:a,authenticatedUser:n}=m.exports.useContext(_a),i=m.exports.useContext(Na),r=f(),s=Bm(),{user:{administrator:c}}=n,{mutateAsync:d}=H_(),u=()=>{a(e),d(l(o({},n.user),{id:n.user.id,lastClientId:e.id})),e.status===va.CREDIT_HOLD?s===ga.REPORTING_USER?i.open(R(k,{children:[t("credit-hold-text-info-part-one"),p(jt,{variant:"body2",to:Tt.CONTACT,underline:"always",color:"#32DFAB",target:"_blank",rel:"noopener noreferrer",children:t("contact-ets")}),t("credit-hold-text-info-part-two")]}),{severity:"warning"}):r(Tt.BILLING):r(Tt.DASHBOARD)},h=t=>{a(e),r("viewClient"===t?Tt.RESULTS:Tt.BILLING)};return R("div",{className:I(dS,!c&&mS),onClick:()=>c?null:u(),children:[R("div",{className:I(uS,!c&&mS),children:[p(Vt,{variant:"h5",children:e.name}),p($t,{variant:"standard",children:e.code})]}),p("div",{className:I(uS,!c&&mS),children:p($t,{variant:"standard",children:c?e.code:Uu(e.updatedAt)})}),p("div",{className:I(uS,!c&&mS),children:!c&&e.status===va.CREDIT_HOLD&&R("div",{className:vS,children:[p(Sn,{className:gS,spriteUrl:"/assets/creditCardIcon.08b97833.svg"}),p($t,{children:t("billing-and-payments")})]})}),p("div",{className:I(uS,!c&&mS),children:c?R("div",{className:yS,children:[p(v,{id:"viewClient",className:pS,component:"button",variant:"body2",underline:"none",onClick:e=>h(e.currentTarget.id),children:t("view-client-link")}),p(v,{id:"billingAndInvoices",className:pS,component:"button",variant:"body2",underline:"none",onClick:e=>h(e.currentTarget.id),children:t("billing-and-invoices-link")})]}):p(Sn,{className:hS,spriteUrl:cS})})]},e.id)};var _S="ClientCardMobileAndIPad_clientRow_1",NS="ClientCardMobileAndIPad_cursorPointer_10",fS="ClientCardMobileAndIPad_customLink_13",CS="ClientCardMobileAndIPad_clientTextInformation_16",SS="ClientCardMobileAndIPad_clientName_21",xS="ClientCardMobileAndIPad_clientUpdatedAt_27",AS="ClientCardMobileAndIPad_clientVisualInformation_30",IS="ClientCardMobileAndIPad_grayDot_35",wS="ClientCardMobileAndIPad_billingIcon_35",TS="ClientCardMobileAndIPad_godmodeLinks_52";const RS=({client:e})=>{const{setActiveClient:t,authenticatedUser:a}=m.exports.useContext(_a),n=m.exports.useContext(Na),i=f(),r=Bm(),{user:{administrator:s}}=a,{mutateAsync:c}=H_(),d=()=>{c(l(o({},a.user),{id:a.user.id,lastClientId:e.id})),t(e),e.status===va.CREDIT_HOLD?r===ga.REPORTING_USER?n.open(R(k,{children:[G("credit-hold-text-info-part-one"),p(jt,{variant:"body2",to:Tt.CONTACT,underline:"always",color:"#32DFAB",target:"_blank",rel:"noopener noreferrer",children:G("contact-ets")}),G("credit-hold-text-info-part-two")]}),{severity:"warning"}):i(Tt.BILLING):i(Tt.DASHBOARD)},u=a=>{t(e),i("viewClient"===a?Tt.RESULTS:Tt.BILLING)};return R("div",{className:I(_S,!s&&NS),onClick:()=>s?null:d(),children:[R("div",{className:CS,children:[p(Vt,{variant:"h5",className:SS,children:e.name}),p($t,{className:xS,children:s?e.code:Uu(e.updatedAt)})]}),R("div",{className:AS,children:[!s&&e.status===va.CREDIT_HOLD&&p(Sn,{className:wS,spriteUrl:"/assets/creditCardIcon.08b97833.svg"}),s?R("div",{className:TS,children:[p(v,{id:"viewClient",className:fS,component:"button",variant:"body2",underline:"none",onClick:e=>u(e.currentTarget.id),children:G("view-client-link")}),p(v,{id:"billingAndInvoices",className:fS,component:"button",variant:"body2",underline:"none",onClick:e=>u(e.currentTarget.id),children:G("billing-and-invoices-link")})]}):p(Sn,{className:IS,spriteUrl:cS}
1)]})]},e.id)};var kS="NoClients_container_1",ES="NoClients_text_6";const MS=()=>{const e=Wt();return R("div",{className:kS,children:[p($t,{children:e("this-email-is-not-linked")}),R($t,{children:[e("already-an-ets-client")," ",e("contact-us-to-link-your-email"),p("br",{}),e("otherwise"),p(jt,{variant:"standard",className:ES,to:Tt.NEW_CLIENT,underline:"none",color:"primary",children:e("create-new-client-label")}),"."]})]})};var DS={container:"ClientsList_container_1",header:"ClientsList_header_11",cta:"ClientsList_cta_16",arrowRightIcon:"ClientsList_arrowRightIcon_22",search:"ClientsList_search_26",inputField:"ClientsList_inputField_31",formControlRoot:"ClientsList_formControlRoot_65",tableContainer:"ClientsList_tableContainer_68",dataHeader:"ClientsList_dataHeader_68",head:"ClientsList_head_11",spinner:"ClientsList_spinner_78"};const PS=()=>{var e,t;const a=Wt(),{authenticatedUser:n}=m.exports.useContext(_a),i=h(),r=A(i.breakpoints.up("lg")),[s,o]=m.exports.useState(""),l=f(),{user:{id:c,administrator:d}}=n,u=Qt(s,1e3),{data:v,isLoading:g,isFetching:y}=d?(e=>{const t=Wt(),a=m.exports.useContext(Na);return L(["getGodmodeAllClients",e.q],(()=>wm.getGodmodeAllClients(e)),{keepPreviousData:!0,staleTime:6e5,onSuccess:e=>{console.log("get all godmode clients",e)},onError:e=>{console.log("get all godmode clients error",e),a.open(fa(e,t("get-all-godmode-clients-error")),{severity:"error"})}})})({userId:c,q:u}):Tm({id:c});return m.exports.useEffect((()=>{!n.user.administrator&&v&&0===v.length&&l(Tt.NEW_CLIENT)}),[v]),g?p(pn,{className:"spinnerCenter"}):R("div",{className:DS.container,children:[R("div",{className:DS.header,children:[p(Vt,{variant:"h4",className:DS.title,children:a("all-clients")}),p(P,{className:DS.cta,onClick:()=>l(Tt.NEW_CLIENT),size:"small",endIcon:p(Sn,{className:DS.arrowRightIcon,spriteUrl:nr}),children:a("create-new-client-cta")})]}),p("div",{children:p($t,{variant:"standard",children:`${a("welcome")}, ${null==(e=null==n?void 0:n.user)?void 0:e.firstname} \n ${null==(t=null==n?void 0:n.user)?void 0:t.lastname}`})}),!d&&v&&(null==v?void 0:v.length)<=0&&p(MS,{}),R("div",{className:DS.search,children:[p($t,{children:a("search")}),p(H,{className:I(DS.inputField,DS.formControlRoot),name:"search",value:s,onChange:e=>o(null==e?void 0:e.target.value),placeholder:a("enter-client-name")})]}),R("div",{className:DS.tableContainer,children:[r&&v&&(null==v?void 0:v.length)>0&&R("div",{className:DS.dataHeader,children:[p("div",{className:DS.head,children:p(Vt,{variant:"h6",children:a("client")})}),p("div",{className:DS.head,children:p(Vt,{variant:"h6",children:a(d?"client-code":"last-updated")})}),p("div",{className:DS.head}),p("div",{className:DS.head,children:!d&&p(Vt,{variant:"h6",children:a("new-activity")})})]}),(()=>{switch(d){case!0:return y?p(pn,{className:DS.spinner}):r?v&&(null==v?void 0:v.length)>0&&(null==v?void 0:v.map((e=>p(bS,{client:e},e.id)))):v&&(null==v?void 0:v.length)>0&&(null==v?void 0:v.map((e=>p(RS,{client:e},e.id))));case null:case!1:return r?v&&(null==v?void 0:v.length)>0&&(null==v?void 0:v.filter((e=>e.name.toLowerCase().includes(s.toLowerCase()))).map((e=>p(bS,{client:e},e.id)))):v&&(null==v?void 0:v.length)>0&&(null==v?void 0:v.filter((e=>e.name.toLowerCase().includes(s.toLowerCase()))).map((e=>p(RS,{client:e},e.id))))}})()]})]})};var LS="ClientAgreement_description_1",BS="ClientAgreement_formContainer_7",OS="ClientAgreement_title_12",FS="ClientAgreement_agreementContainer_15",HS="ClientAgreement_agreementText_24",US="ClientAgreement_agreementCheck_28",zS="ClientAgreement_link_34";const GS=({handleChange:e,values:t})=>{const a=Wt();return p($g,{withBgAndPadding:!0,title:"ets-client-agreement",aside:R("div",{className:LS,children:[p(Vt,{variant:"h6",children:a("what-is-this-contract")}),p($t,{variant:"small",children:a("ets-operates-on-a-credit-system")})]}),formContent:R("div",{className:BS,children:[p(Vt,{variant:"h6",className:OS,children:a("terms-conditions-credit-agreement")}),R("div",{className:FS,children:[p(Vt,{variant:"h6",children:a("general-terms-and-conditions")}),p($t,{variant:"small",className:HS,children:p(mn,{html:a("general-terms-and-conditions-text")})})]}),p("div",{className:US,children:p(pe,{name:"acceptTerms",value:t.acceptTerms,onChange:e,control:p(ue,{color:"tertiary"}),label:R($t,{variant:"small",children:[a("terms-of-service-check-text"),p(jt,{underline:"none",variant:"small",target:"_blank",className:zS,to:Tt.TERMS_AND_CON
1DITIONS_AND_CREDIT_AGREEMENT,children:a("terms-of-service")})]}),disableTypography:!0})})]})})};var qS={description:"ClientInformationForm_description_1",form:"ClientInformationForm_form_7",formControl:"ClientInformationForm_formControl_12",formInput:"ClientInformationForm_formInput_28",formErrorMessage:"ClientInformationForm_formErrorMessage_31",addressTitle:"ClientInformationForm_addressTitle_36"};const WS=({handleChange:e,values:t,handleBlur:a,errors:n,touched:i})=>{const r=Wt(),[s,o]=m.exports.useState("United States"),[l,c]=m.exports.useState("");return p($g,{withBgAndPadding:!0,title:"client-information",aside:R("div",{className:qS.description,children:[p(Vt,{variant:"h6",children:r("do-i-need-to-give-you-more-information")}),p($t,{variant:"small",children:r("this-is-basic-information")})]}),formContent:R("div",{className:qS.form,children:[R("div",{className:qS.formControl,children:[R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"name",value:t.name,onChange:e,onBlur:a,errorMessage:n.name,error:!!n.name&&i.name,type:"text",placeholder:r("company-operating-name-placeholder")})]}),R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"officialBusinessName",value:t.officialBusinessName,onChange:e,onBlur:a,errorMessage:n.officialBusinessName,error:!!n.officialBusinessName&&i.officialBusinessName,type:"text",placeholder:r("legal-business-name-placeholder")})]})]}),p("div",{className:qS.formControl,children:R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(xr,{label:"business-type-placeholder",name:"businessType",value:t.businessType,onChange:e,items:qg}),!!n.businessType&&i.businessType&&p(Me,{className:qS.formErrorMessage,children:n.businessType})]})}),p($t,{variant:"small",className:qS.addressTitle,children:r("address-non-optional")}),R("div",{className:qS.formControl,children:[R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"street_1",value:t.street_1,onChange:e,onBlur:a,errorMessage:n.street_1,error:!!n.street_1&&i.street_1,type:"text",placeholder:r("street-placeholder")})]}),R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"city",value:t.city,onChange:e,onBlur:a,errorMessage:n.city,error:!!n.city&&i.city,type:"text",placeholder:r("city-placeholder")})]})]}),R("div",{className:qS.formControl,children:[R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(xr,{label:"country",name:"country",value:t.country,onChange:t=>{e(t),(e=>{o(e.target.value)})(t)},SelectDisplayProps:{style:{paddingTop:0}},children:null==ny?void 0:ny.map((e=>p(Z,{value:e,className:qS.locationSelect,children:e},e)))}),!!n.country&&i.country&&p(Me,{className:qS.formErrorMessage,children:n.country})]}),"United States"!==s&&R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"state",value:t.state,onChange:e,onBlur:a,errorMessage:n.state,error:!!n.state&&i.state,type:"text",placeholder:r("state-of-region-placeholder")})]}),"United States"===s&&R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(xr,{label:"state",name:"state",value:t.state,onChange:t=>{e(t),c(t.target.value)},SelectDisplayProps:{style:{paddingTop:0}},children:null==ef?void 0:ef.map((e=>p(Z,{value:e.abbrv,className:qS.locationSelect,children:e.state},e.abbrv)))}),!!n.state&&i.state&&p(Me,{className:qS.formErrorMessage,children:n.state})]})]}),R("div",{className:qS.formControl,children:[R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"postalCode",value:t.postalCode,onChange:e,onBlur:a,errorMessage:n.postalCode,error:!!n.postalCode&&i.postalCode,type:"text",placeholder:r("zip-or-postcode-placeholder"),InputProps:"United States"===s?{inputComponent:ay}:{}})]}),R(K,{className:qS.formInput,variant:"standard",error:!0,children:[p(Me,{children:r("required-field")}),p(di,{className:qS.formInput,name:"phone",value:t.phone,onChange:e,onBlur:a,errorMessage:n.phone,error:!!n.phone&&i.phone,type:"text",placeholder:r("phone-number-placeholder"),InputProps:"United States"===s?{inputComponent:ty}:{}})]})]})]})})};var VS={container:"UserInformation_container_1",formAndAdditionalFormInfoContainer:"UserInformation_formAndAdditionalFormInfoContainer_7",formContainer:"UserInformation_formContainer_18",titleColor:"UserInformation_titleColor_26",additionaInfoContainer:"UserInformation_additionaInfoContainer_29"};const YS=({handleChange:e,values:t,errors:a,touched:n,handleBlur:i})=>p($g,{withBgAndPadding:!0,title:"user-information",formContent:p("div",{className:VS.formContainer,children:R(K,{className:VS.formInput,variant:"standard",error:!0,children:[p(Me,{children:G("required-field")}),p(di,{className:VS.formInput,name:"jobTitle",value:t.jobTitle,onChange:e,onBlur:i,errorMessage:a.jobTitle,error:!!a.jobTitle&&n.jobTitle,type:"text",placeholder:G("job-title-label")})]})})});var jS="CreateNewClient_container_1",$S="CreateNewClient_title_8",QS="CreateNewClient_form_11",KS="CreateNewClient_actions_16",XS="CreateNewClient_button_27",ZS="CreateNewClient_formInstructionsContainer_35",JS="CreateNewClient_icon_48";const ex=()=>{const e=Wt(),t=f(),{authenticatedUser:a,setActiveClient:n}=m.exports.useContext(_a),{mutateAsync:i}=H_(),r=z().shape({name:Ni(e("field-error-required",{field:e("name")}
1)),officialBusinessName:Ni(e("field-error-required",{field:e("business-name")})),businessType:Ni(e("field-error-required",{field:e("business-type")})),jobTitle:Ni(e("field-error-required",{field:e("job-title")})),acceptTerms:Ni(e("field-error-required",{field:e("terms")})),state:Ni(e("field-error-required",{field:e("state")})),postalCode:Ni(e("field-error-required",{field:e("postal-code")})),street_1:Ni(e("field-error-required",{field:e("street")})),city:Ni(e("field-error-required",{field:e("city")})),country:Ni(e("field-error-required",{field:e("country")})),phone:Ni(e("field-error-required",{field:e("phone-number-non-optional")}))}),{mutateAsync:s}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(wm.createBusinessAccount,{onSuccess:n=>{console.log("successfully created business account",n),e.invalidateQueries("getAllClients"),a.open(t("create-business-account-success"),{severity:"success"})},onError:e=>{console.log("failed to create business account",e),a.open(fa(e,t("create-business-account-error")),{severity:"error"})}})})(),{mutateAsync:c}=(()=>{const e=C(),t=Wt(),a=m.exports.useContext(Na);return x(wm.addAddressAfterCreatingBusinessAccount,{onSuccess:()=>{e.invalidateQueries("getAllAddresses")},onError:e=>{console.log("failed to add new address error",e),a.open(fa(e,t("add-new-address-error")),{severity:"error"})}})})();return R("div",{className:jS,children:[p(Vt,{variant:"h4",className:$S,children:e("create-new-client-account")}),p(q,{initialValues:iS,onSubmit:e=>(async e=>{const{name:r,businessType:d,officialBusinessName:m,jobTitle:p,acceptTerms:u}=e,{city:h,country:v,phone:g,postalCode:y,state:b,street_1:_}=e,N=await s({name:r,officialBusinessName:m,businessType:d,acceptTerms:u,jobTitle:p});N.id&&await c({clientId:N.id,city:h,country:v,phone:g,postalCode:y,state:b,street_1:_}),n(N),await i(l(o({},a.user),{id:a.user.id,lastClientId:N.id})),t(Tt.DASHBOARD)})(e),validationSchema:r,validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,children:({isSubmitting:a,isValid:n,handleChange:i,handleBlur:r,errors:s,touched:o,values:l,initialValues:c})=>R(W,{className:QS,children:[R("div",{className:ZS,children:[p(Sn,{spriteUrl:ah,className:JS}),p($t,{children:e("create-new-client-instructions")})]}),p(WS,{handleChange:i,values:l,handleBlur:r,errors:s,touched:o}),p(YS,{handleChange:i,values:l,handleBlur:r,errors:s,touched:o}),p(GS,{handleChange:i,values:l,handleBlur:r,errors:s,touched:o}),R("div",{className:KS,children:[p(P,{className:XS,variant:"contained",color:"secondary",onClick:()=>t(Tt.CLIENTS),children:e("cancel")}),p(bi,{className:XS,color:"primary",variant:"contained",loading:a,type:"submit",onClick:()=>(e=>{const t=Object.keys(e);if(t.length){const e=document.querySelector(`input[name=${t[0]}]`);null==e||e.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}})(s),children:e("create-client")})]})]})})]})};var tx="/assets/etsLogo.96485635.svg";const ax={notifications:[{id:0,messageBody:"",sortOrder:0}]},nx=m.exports.createContext({notifications:ax,locationData:[],location:{lat:"",long:""}}),ix=[{labelKey:"nav-home",pathname:Tt.HOME},{labelKey:"nav-about-us",pathname:Tt.ABOUT_US,subMenuItems:[{labelKey:"nav-our-story",pathname:Tt.OUR_STORY},{labelKey:"nav-the-ets-difference",pathname:Tt.ETS_DIFFERENCE},{labelKey:"nav-quality",pathname:Tt.QUALITY},{labelKey:"nav-applied-innovation",pathname:Tt.APPLIED_INNOVATION},{labelKey:"nav-seminars",pathname:Tt.SEMINARS}],icon:Vi},{labelKey:"nav-our-services",pathname:Tt.OUR_SERVICES,subMenuItems:[{labelKey:"nav-services",pathname:Tt.SERVICES},{labelKey:"nav-vintage-portal",pathname:Tt.VINTAGE_PORTALCMS},{labelKey:"nav-vintage-reports",pathname:Tt.VINTAGE_REPORTS},{labelKey:"nav-expertise-on-call",pathname:Tt.EXPERTISE_ON_CALL}],icon:Vi},{labelKey:"nav-analyses",pathname:Tt.ANALYSES,subMenuItems:[{labelKey:"nav-analyses-all",pathname:Tt.ALL_ANALYSES},{labelKey:"nav-exporting",pathname:Tt.EXPORTING_ANALYSES}],icon:Vi},{labelKey:"nav-publications",pathname:Tt.PUBLICATIONS},{labelKey:"nav-sustainability",pathname:Tt.SUSTAINABILITY},{labelKey:"nav-contact",pathname:Tt.CONTACT,subMenuItems:[{labelKey:"nav-contact-us",pathname:Tt.CONTACT},{labelKey:"laboratory-locations",pathname:Tt.LOCATIONS},{labelKey:"nav-sample-dropboxes",pathname:Tt.DROPBOX_LOCATIONS}],icon:Vi}],rx=[],sx=[];var ox="AccountMenuData_menuList_1",lx="AccountMenuData_divider_7",cx="AccountMenuData_menuListItem_10",dx="AccountMenuData_label_17",mx="AccountMenuData_accountName_20",px="AccountMenuData_link_23",ux="AccountMenuData_logout_26",hx="AccountMenuData_logoutIcon_35";const vx=({onCloseMobileNav:e})=>{const t=Wt(),{mutate:a}=Sa(),{setActiveClient:n,authenticatedUser:i}=m.exports.useContext(_a),{email:r}=i.user,s=f(),c=i.user.clientList.find((e=>e.id===i.user.lastClientId)),{mutateAsync:d}=H_(),u=[c,...(()=>{let e=i.user.clientList.sort(((e,t)=>e.name.localeCompare(t.name)))||[];return c&&(e=e.filter((e=>e.id!==c.id))),e.slice(0,5)})()],h=u.map(((e,t)=>{if(!e)return null;let a=[];return a.push(p(v,{className:px,onClick:()=>(e=>{n(e),d(l(o({},i.user),{id:i.user.id,lastClientId:e.id})),e.status===va.CREDIT_HOLD?s(Tt.BILLING):s(Tt.DASHBOARD)})(e),underline:"none",variant:"standard",to:Tt.DASHBOARD,component:g,children:null==e?void 0:e.name},t)),t+1==u.length&&a.push(p(v,{className:px,underline:"none",variant:"standard",to:Tt.DASHBOARD,component:g,children:"..."},t+1)),[...a]}));return console.log("recentClients",h),R("div",{className:ox,children:[R("div",{className:cx,children:[p($t,{variant:"small",className:dx,children:t("account-menu-user-label")}),p($t,{variant:"standard",className:mx,children:r}),p(v,{className:px,onClick:e,underline:"none",variant:"standard",to:Tt.MY_PROFILE,component:g,children:t("nav-user-settings")})]}),p(te,{className:lx}),R("div",{className:cx,children:[p($t,{variant:"small",className:dx,children:t("account-menu-client-label")}),h,h.filter((e=>null!==e)).length>0||i.user.administrator?p(v,{className:px,onClick:e,underline:"none",variant:"standard",to:Tt.LAUNCHPAD,component:g,children:"View All Clients"},-1):p(v,{className:px,onClick:e,underline:"none",variant:"standard",to:Tt.NEW_CLIENT,component:g,children:"Create A New Client"},-2)]}),p(te,{className:lx}),R("div",{className:I(cx,ux),onClick:a,children:[p(Sn,{spriteUrl:"/assets/logout.3a5949f2.svg",className:hx}),p($t,{variant:"standard",children:t("logout")})]})]})};var gx={linkWithIcon:"LinkWithSubLinks_linkWithIcon_1",icon:"LinkWithSubLinks_icon_6",iconDown:"LinkWithSubLinks_iconDown_11",subLinksList:"LinkWithSubLinks_subLinksList_15",subLinkItem:"LinkWithSubLinks_subLinkItem_23"};const yx=({to:e,subLinks:t,children:a,variant:n,className:i,activeClassName:r,closeDrawer:s})=>{const o=Wt(),[l,c]=m.exports.useState(!1),d=y(),u=d.pathname!==Tt.ABOUT_US&&d.pathname!==Tt.SERVICES&&d.pathname!==Tt.ANALYSES;return R(k,{children:[R("div",{className:gx.linkWithIcon,children:[p(jt,{onClick:e=>{u&&e.preventDefault(),c(!l)},to:e,className:I(gx.link,i,{[r]:!!b({path:e,end:!1},d.pathname)}),variant:null!=n?n:"h3",children:a}),p(Sn,{spriteUrl:Yi,onClick:()=>c(!l),className:I(gx.icon,{[gx.iconDown]:!l})})]}),p(j,{in:l,timeout:"auto",children:p("ul",{className:gx.subLinksList,children:t.map((({labelKey:e,pathname:t})=>p("li",{children:p(jt,{to:t,onClick:s,className:I(gx.subLink,{[r]:!!b({path:t,end:!1},d.pathname)}),variant:"button",children:o(e)})},e)))})})]})};var bx="NearestLab_container_1",_x="NearestLab_location_7",Nx="NearestLab_status_16",fx="NearestLab_statusIcon_19",Cx="NearestLab_open_23",Sx="NearestLab_closingIn_26",xx="NearestLab_closed_29",Ax="NearestLab_lightText_37",Ix="NearestLab_darkText_40";const wx=({closeMobileDrawer:e})=>{const t=Wt(),a=f(),n=h(),i=A(n.breakpoints.up("lg"),{noSsr:!0}),r=Kt(),{location:s,locationData:o}=m.exports.useContext(nx);kc();const{closeTimeOnlyHours:l,openTimeOnlyHours:c,isLaboratoryOpen:d,isLaboratoryClosingSoon:u,formattedOpenTime:v,formattedCloseTime:g,reOpensAt:y}=Wl(o.length>0?o[0].operatingHours:[]);return R("div",{onClick:()=>{e&&e(),a(Tt.LOCATIONS)},className:I(bx,r&&i?Ax:Ix),children:[R("div",{className:_x,children:[p($t,{variant:"extraSmall",children:t("nearest-lab")}),p($t,{variant:"small",children:o.length>0&&`${o[0].city}, ${o[0].state}`}),p($t,{variant:"extraSmall",children:u?t("closes-in-one-hour",{time:g}):d?t("open-until-time",{time:g}):t("reopens-at-time",{time:y})})]}),p("div",{className:Nx,children:p(Sn,{spriteUrl:ac,className:I(fx,u?Sx:d?Cx:xx)})})]})};var Tx="MobileNavMenu_menu_1",Rx="MobileNavMenu_navHeader_5",kx="MobileNavMenu_closeButton_12",Ex="MobileNavMenu_navContent_16",Mx="MobileNavMenu_navList_24",Dx="MobileNavMenu_navListItem_30",Px="MobileNavMenu_link_33",Lx="MobileNavMenu_active_33",Bx="MobileNavMenu_search_36",Ox="MobileNavMenu_searchIcon_40",Fx="MobileNavMenu_searchIconActive_40";const Hx=({open:e,onClose:t,menuItems:a})=>{const n=Wt(),i=y(),r=f(),{authenticatedUser:s}=m.exports.useContext(_a),o=s.isLoggedIn,l=a.find((e=>e.pathname===Tt.CAREERS)),c=a.filter((e=>e.pathname!==Tt.CAREERS));return R(ze,{open:e,onClose:t,classes:{paper:Tx},children:[R("div",{className:Rx,children:[p(wx,{closeMobileDrawer:t}),p(P,{className:kx,variant:"text",size:"small",color:"primary",onClick:t,children:n("close")})]}),R("div",{className:Ex,children:[R("ul",{className:Mx,children:[p("li",{className:I(Dx,Bx),onClick:()=>{r(Tt.GLOBAL_SEARCH),t()},children:p(Sn,{spriteUrl:gr,className:b(Tt.GLOBAL_SEARCH,i.pathname)?Fx:Ox})}),c.map((({labelKey:e,pathname:a,subMenuItems:r})=>p("li",r?{className:Dx,children:p(yx,{to:a,subLinks:r,onClick:t,closeDrawer:t,variant:"h4",className:I(Px),activeClassName:Lx,children:n(e)})}:{className:Dx,children:p(jt,{className:I(Px,{[Lx]:!!b({path:a,end:!0},i.pathname)}),variant:"h4",to:a,onClick:t,children:n(e)})},e))),p("li",{className:Dx,children:p(jt,{className:I(Px),variant:"h4",to:Tt.NO_TO_LINK,onClick:()=>window.open(null==l?void 0:l.externalLink),children:n("nav-careers")})},null==l?void 0:l.labelKey)]}),o&&p(vx,{onCloseMobileNav:t})]})]})};var Ux="/assets/menu.17f8184d.svg";var zx={icons:"AccountMenu_icons_1",userIcon:"AccountMenu_userIcon_12",arrowDownIcon:"AccountMenu_arrowDownIcon_17",menu:"AccountMenu_menu_23",paper:"AccountMenu_paper_23",button:"AccountMenu_button_31"};const Gx=()=>{const[e,t]=ae.useState(null),a=Boolean(e),n=()=>{t(null)},{refetch:i}=L(["authPing"],(()=>wm.authPing()),{keepPreviousData:!1,onSuccess:e=>{console.log("authPing",e)},onError:e=>{console.log("authPing error",e)}});m.exports.useEffect((()=>{const e=setInterval((()=>{i()}),6e4);return()=>clearInterval(e)}),[]);const r=h(),s=A(r.breakpoints.up("lg"));return p(k,{children:R(P,{variant:"contained",color:"primary",size:s?"medium":"small",className:zx.button,children:[R("div",{className:zx.icons,onClick:e=>{t(e.currentTarget)},children:["My Accounts",p(Sn,{spriteUrl:Vi,className:I(zx.arrowDownIcon)})]}),p(Ge,{anchorEl:e,className:zx.menu,id:"account-menu",open:a,onClose:n,onClick:n,classes:{list:zx.menuList,paper:zx.paper},disableAutoFocusItem:!0,transformOrigin:{horizontal:"right",vertical:"top"}
1,anchorOrigin:{horizontal:"right",vertical:"bottom"},children:p(vx,{})})]})})};var qx="HoverDropdown_tooltip_1",Wx="HoverDropdown_label_9",Vx="HoverDropdown_arrow_16",Yx="HoverDropdown_menuList_20",jx="HoverDropdown_menuItem_20";const $x=({label:e,menuItems:t,icon:a,className:n})=>{const i=Wt(),r=f(),s=p(qe,{className:Yx,children:t.map((({labelKey:e,pathname:t})=>p(Z,{onClick:()=>r(t),className:jx,children:i(e)},e)))});return p(me,{title:s,classes:{tooltip:qx,arrow:Vx},arrow:!0,placement:"bottom-start",children:R("span",{className:I(Wx,null!=n?n:""),onClick:e=>{r(t[0].pathname)},children:[e,a]})})};var Qx="NavLink_navLink_1",Kx="NavLink_lightText_4",Xx="NavLink_itemActive_10",Zx="NavLink_darkText_23",Jx="NavLink_icon_43",eA="NavLink_linkWithDropdown_48";const tA=({labelKey:e,pathname:t,subMenuItems:a,icon:n,externalLink:i})=>{const r=Wt(),s=Kt();return a?p($x,{className:I(eA,s?Kx:Zx,{[Xx]:!!b({path:t,end:!1},location.pathname)}),label:p(jt,{onClick:e=>e.preventDefault(),variant:"h6",to:t,children:r(e)}),menuItems:a,icon:p(Sn,{spriteUrl:null!=n?n:"",className:I(Jx)})}):p(jt,{variant:"h6",to:t,onClick:()=>{i&&window.open(i)},className:I(Qx,s?Kx:Zx,{[Xx]:!!b({path:t,end:!0},location.pathname)}),children:r(e)})};var aA="Navbar_navMobile_1",nA="Navbar_menuIcon_7",iA="Navbar_navDesktop_14",rA="Navbar_list_18",sA="Navbar_listItem_25",oA="Navbar_button_34",lA="Navbar_searchIcon_37",cA="Navbar_searchIconActive_43",dA="Navbar_divider_50",mA="Navbar_transparent_54",pA="Navbar_nonTransparent_63";const uA=({onOpen:e,menuItems:t})=>{const a=Wt(),n=h(),i=f(),{authenticatedUser:r}=m.exports.useContext(_a),s=A(n.breakpoints.up("lg")),l=r.isLoggedIn,c=Kt(),d=p(P,{variant:"contained",color:"primary",size:s?"medium":"small",onClick:()=>i(Tt.LOGIN),className:oA,children:a("nav-login")});t.find((e=>e.pathname===Tt.CONTACT));const u=t.find((e=>e.pathname===Tt.CAREERS)),v=t.filter((e=>e.pathname!==Tt.CAREERS));return R("div",s?{className:I(iA,c?mA:pA),children:[R("ul",{className:rA,children:[p(Sn,{spriteUrl:gr,className:b(Tt.GLOBAL_SEARCH,location.pathname)?cA:lA,onClick:()=>i(Tt.GLOBAL_SEARCH)}),v.map((e=>p("li",{className:sA,children:p(tA,o({},e))},e.labelKey))),u&&p("li",{className:sA,children:p(tA,{labelKey:u.labelKey,pathname:Tt.NO_TO_LINK,icon:u.icon,externalLink:u.externalLink})},u.labelKey),p("li",{className:sA,children:l?p(Gx,{}):d})]}),p(te,{orientation:"vertical",flexItem:!0,className:dA}),p(wx,{})]}:{className:aA,children:[!l&&d,p(Sn,{onClick:e,spriteUrl:Ux,className:nA})]})};var hA="NotificationsBar_container_1",vA="NotificationsBar_notificationsNumber_10",gA="NotificationsBar_iconPosition_19",yA="NotificationsBar_icon_19",bA="NotificationsBar_notifications_10",_A="NotificationsBar_notification_10",NA="NotificationsBar_expandMessage_47",fA="NotificationsBar_dismiss_52";const CA=({id:e,messageBody:t,truncateMessage:a,onDismiss:n})=>{const i=Wt(),[r,s]=m.exports.useState(!1);return R("div",{className:bA,children:[p("div",{className:_A,children:R($t,{children:[p(mn,{html:a?(e=>{if(e.length>350&&!r){const t=e.indexOf(" ",350),a=-1===t?350:t;return e.substring(0,a)}return e})(t):t}),a&&!r&&t.length>350&&p("span",{onClick:()=>s(!0),className:NA,children:"...more"})]})}),p($t,{variant:"standard",className:fA,onClick:()=>n(e.toString()),children:i("dismiss")})]},e)},SA=({notifications:e})=>{var t,a;const n=Wt(),i=window.matchMedia("(max-width: 768px)").matches,r=e.notifications.some((e=>e.showPriority))||!1,[s,o]=m.exports.useState(r&&!i),l=(null==(t=e.notifications.find((e=>e.showPriority)))?void 0:t.title)||"",{mutateAsync:c}=(()=>{const e=Wt(),t=m.exports.useContext(Na),a=C();return x(cn.markNotificationAsRead,{onSuccess:e=>{console.log("Mark as read notification",e),a.invalidateQueries(["getNotifications"])},onError:a=>{console.log("failed to mark notification as read",a),t.open(fa(a,e("mark-notification-as-read-error")),{severity:"error"})}})})();return R(k,{children:[R("div",{className:hA,children:[p("div",{className:vA,children:p($t,{children:e.notifications.length})}),R($t,{variant:"standard",children:[`${1===e.notifications.length?n("notification"):n("notifications")}`,l&&`: ${l}`]}),p("div",{className:gA,children:p(F,{onClick:()=>o(!s),size:"small",children:p(Sn,{className:yA,spriteUrl:s?Yi:Vi})})})]}),p(j,{in:s,timeout:"auto",children:null==(a=null==e?void 0:e.notifications)?void 0:a.map((e=>p(CA,{id:e.id,messageBody:e.messageBody,truncateMessage:e.truncateMessage,onDismiss:c},e.id)))})]})},xA=e=>{const t=f();return p("div",{onClick:()=>t(Tt.HOME),className:e.className,dangerouslySetInnerHTML:{__html:'<svg id="ets-logo" enable-background="new 0 0 100 50" space="preserve" version="1.1" viewBox="0 0 100 50" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">\n <switch>\n <g opacity="0.5">\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="0.5" x2="0.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="4.5" x2="4.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="8.5" x2="8.5" y1="0.7" y2="38.3"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="12.5" x2="12.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="16.5" x2="16.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="20.5" x2="20.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="24.5" x2="24.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="28.5" x2="28.5" y1="0.7" y2="38.3"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="32.5" x2="32.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="36.5" x2="36.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="40.5" x2="40.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="44.5" x2="44.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="48.5" x2="48.5" y1="0.7" y2="38.3"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="52.5" x2="52.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="56.5" x2="56.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="60.5" x2="60.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="64.5" x2="64.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="68.5" x2="68.5" y1="0.7" y2="38.3"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="72.5" x2="72.5" y1="6.4" y2="32.1"></line>\n <line class="logo-line" fill="none" stroke="#FFFFFF" stroke-miterlimit="2.6" stroke-width="0.5" x1="76.5" x2="76.5" y1="6.4" y2="32.1"></line>\n </g>\n </switch>\n <switch>\n <g>\n <path class="logo-letter" d="M23.5,12.3c-1.2,0-10.9,0-11.1,0c-0.2,0-0.5,0.1-0.5,0.3c-0.1,0.3,0.1,0.5,0.4,0.6c0.7,0.3,1,0.8,1,1.8v8.4\nc0,
11-0.3,1.5-1,1.8c-0.3,0.1-0.4,0.3-0.4,0.6c0,0.2,0.3,0.3,0.5,0.3c0.3,0,10.8,0,11.1,0c0.5,0,0.8-0.4,0.8-0.8c0-0.5,0-1.6,0-1.8\nc0-0.2-0.1-0.5-0.3-0.5c-0.3-0.1-0.5,0.1-0.6,0.4c-0.3,0.7-0.7,0.9-1.6,1h-4.1V20h1c0.9,0,1.5,0.3,1.8,1c0.1,0.3,0.3,0.4,0.6,0.4\nc0.2,0,0.3-0.3,0.3-0.5c0-0.3,0-3.3,0-3.5c0-0.2-0.1-0.5-0.3-0.5c-0.3-0.1-0.5,0.1-0.6,0.4c-0.3,0.7-0.8,1-1.7,1h-1.1v-4h3.9\nc0.9,0,1.5,0.3,1.7,1c0.1,0.3,0.3,0.4,0.6,0.4c0.2,0,0.3-0.3,0.3-0.5c0-0.3,0-1.5,0-1.9C24.3,12.7,24,12.3,23.5,12.3z" fill="#FFFFFF"></path>\n <path class="logo-letter" d="M44.8,12.3c-1.3,0-11.9,0-12.5,0c-0.5,0-0.8,0.4-0.8,0.8c0,0.1,0,1.6,0,1.9c0,0.2,0.1,0.5,0.3,0.5\nc0.3,0.1,0.5-0.1,0.6-0.4c0.3-0.7,0.8-1,1.8-1l0,0h2v9.5c0,0.8-0.3,1.3-1,1.6c-0.3,0.1-0.4,0.3-0.4,0.6c0,0.2,0.3,0.3,0.5,0.3\nc0.3,0,4.6,0,4.6,0s1.3,0,1.6,0c0.2,0,0.5-0.1,0.5-0.3c0.1-0.3-0.1-0.5-0.4-0.6c-0.7-0.3-1-0.8-1-1.8v-9.3h2.1c0.9,0,1.5,0.3,1.7,1\nc0.1,0.3,0.3,0.4,0.6,0.4c0.2,0,0.3-0.3,0.3-0.5c0-0.3,0-1.5,0-1.9C45.5,12.7,45.2,12.3,44.8,12.3z" fill="#FFFFFF"></path>\n <path class="logo-letter" d="M57.6,15.1c0-2.1,4.3-2.2,5.1,1.2c0,0.3,0.3,0.5,0.6,0.5c0.3,0,0.6-0.3,0.6-0.6c0-0.6,0-2.3,0-2.3l0,0\nc0-0.5,0-1.2,0-1.2c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2c-0.6,0.5-1.9,0.1-3.2-0.1l0,0c-0.4-0.1-0.8-0.1-1.3-0.1\nc-3.1,0-5.7,1.6-5.7,4.3c0,4.2,6.7,5.3,6.7,7.1c0,2.4-4.8,1.7-5.4-1.4c0,0,0,0,0,0c0-0.3-0.2-0.5-0.6-0.5c-0.3,0-0.6,0.3-0.6,0.6\nc0,0.6,0,2.3,0,2.3l0,0c0,0.6,0,1.4,0,1.5c0,0.3,0.3,0.6,0.6,0.6c0.2,0,0.3-0.1,0.5-0.2c0.8-0.6,2.1,0.2,4.5,0.2\nc4.3,0,6.1-1.9,6.1-4.1C64.3,18,57.6,17.1,57.6,15.1z" fill="#FFFFFF"></path>\n </g>\n <foreignObject>\n <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAAnCAMAAAB9uDW+AAABj1BMVEUAAAD///9tFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiamqKttFiamqKttFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiZtFiamqKttFiZtFiZtFiZtFiamqKttFiZtFiZtFiamqKttFiZtFiZtFiaekpedkpdtFiamqKuko6ejoKShnKBtFiZtFiaSdHyRc3ttFiaZh41tFiaYhYttFiaXg4ltFiaNaXJtFiaVfoRtFiaUeoGLYmuJX2iJXmdtFiaNaHFtFiaMZW5tFiaLZG2LY2yKYWqKYGltFiaJXmeARlJtFiaEUlyDTlltFiZtFiaCS1ZtFiZtFiZtFiZ+Qk5tFiZtFiZ9QExtFiZtFiZtFiZ4M0B7OUZtFiZtFiZ6OEVtFiZtFiZtFiZtFiZtFiZ0KDZyIzJzJjVxITBzJTRtFiZtFiZtFiZwHy5yIzFtFiZtFiZvHCxvGiptFiZtFiZvGyttFiZtFiZuGChtFiZuGChtFiZtFydtFibDSKDQAAAAhHRSTlMAAAECBQYJDg8REhUaICEjIyQoKy0wNjo/QUlKTlBUVFZbXGBgYmRpcHN1dnp7gICCg4WGiYyNj5CRkZKSk5SVlZeYmZydoKSlpqenqKmqrKyztra5uru8vcHExMbHx8nKy83Oz9DQ1NbX2Nzk5ebo6Orr7Ozs7/D09fb39/j6/P39/v5iBL4IAAABq0lEQVR42u2W90/CQBTHTxQUFbc4KyqiFZW6RUXcJ+69cI+6UXDgXtg/3Fd60oq2NeAPxvBNri/vc+8+SdukKYr7zaCP0OhrmG8YrcRitghtGbCyCIEKvVgZsZeZC2c0ORVRDWcxW/S2pFGKogZhjVFUAeH6Ab4nfFQfOqnrt9qqx7Nzq2RtOTecmFaBd3LSdJOTGqv/A8nfaQ+/fYzxnuuQcwocBxYwfgB8i/H8GyYn2wAEajKHVpVszCNMYb7X7rYIvH0aqhewB+pclzBnDwDYh32tW8l2TWzSiZBN7Kc4PhboCwPqttk8ZdswF8yMA8UbVWxuc9OrWdnWeCHonm0JSNEmRMXGUC9kcCtFxXbQvqRqQ0XnRLdZr/rcdorVbChlm+gmon6ndp8O0flHQdvKT2wltQq2Pq4SauIBb1uUtTXw25MGgz29/Mkp4VeALz/Z7kpppFkD/OSQsyWsc2IkNksQVGlEG7Rnrl24PpbJvlPjKcuyHlhell2uC/HkDS/PN1NDtg5/74jHd39x0pwW+/b+QZsJrhWE8NUkqYzYy8yFsdgf1/+zvQNzhe8QfA12sQAAAABJRU5ErkJggg==" alt="ETS Laboratories">\n </foreignObject>\n </switch>\n </svg>'}})};var AA="Header_container_1",IA="Header_transparent_16",wA="Header_nonTransparent_29",TA="Header_nav_38",RA="Header_logo_43";const kA=()=>{const{notifications:e}=m.exports.useContext(nx),[t,a]=m.exports.useState(!1),n=(()=>{const{authenticatedUser:e}=m.exports.useContext(_a),t=e.isLoggedIn;return[...ix,...t?[]:rx,...t?sx:[]]})(),i=f(),r=Kt();return R(We,{position:"static",color:"transparent",children:[p(Ve,{className:I(AA,r?IA:wA),children:R("nav",{className:TA,children:[r?p(xA,{className:RA}):p(Sn,{spriteUrl:r?"/assets/etsLogoWhite.cd33e2e1.svg":tx,className:RA,onClick:()=>i(Tt.HOME)}),p(uA,{onOpen:()=>a(!0),menuItems:n}),p(Hx,{open:t,onClose:()=>a(!1),menuItems:n})]})}),e.notifications.length>0&&0!==e.notifications[0].id&&p(SA,{notifications:e})]})},EA=m.exports.lazy((()=>wt((()=>import("./BackgroundImageWrapper.5904601e.js")),["assets/BackgroundImageWrapper.5904601e.js","assets/BackgroundImageWrapper.5de022fa.css","assets/vendor.ef7fe251.js"]))),MA=()=>{const{authenticatedUser:e,activeClient:t}=m.exports.useContext(_a),a=JSON.stringify(e.user)===JSON.stringify(ba);switch(e.isLoggedIn){case!0:return p(Ye,a||t?a||t?{to:Tt.HOME,replace:!0}:{to:Tt.DASHBOARD,replace:!0}:{to:Tt.LAUNCHPAD,replace:!0});case!1:return p(m.exports.Suspense,{fallback:p(k,{}),children:R(EA,{children:[p(kA,{}),p(m.exports.Suspense,{fallback:p(k,{}),children:p(E,{})})]})})}return p(k,{})};var DA={container:"PageNotFound_container_1",notFoundDescription:"PageNotFound_notFoundDescription_12",notFoundMessage:"PageNotFound_notFoundMessage_16"};const PA=()=>{const{t:e}=m.exports.useContext(qt);return R("div",{className:DA.container,children:[p(Vt,{variant:"h1",className:DA.notFoundTitle,children:"404"}),p($t,{variant:"intro",className:DA.notFoundDescription,children:e("page-not-found-description")}),p($t,{className:DA.notFoundMessage,children:e("page-not-found-message")}),p(P,{component:g,to:Tt.HOME,variant:"contained",className:DA.homeBtn,children:e("go-to-home")})]})},LA=()=>{const e=y(),{authenticatedUser:t}=m.exports.useContext(_a),a=JSON.stringify(t.user)===JSON.stringify(ba),n=Bm(),i=Lm(n,e.pathname);return n===ga.BILLING_USER&&b({path:Tt.RESULTS,end:!0},e.pathname)?p(Ye,{to:Tt.BILLING,replace:!0}):i&&n!==ga.ADMINISTRATOR?p(Ye,{to:Tt.LAUNCHPAD,replace:!0}):t.isLoggedIn&&!a?R(k,{children:[p(kA,{}),p(m.exports.Suspense,{fallback:p(k,{}),children:p(E,{})})]}):p(Ye,{to:Tt.LOGIN,replace:!0})};var BA={dialogTextContainer:"PopupDialog_dialogTextContainer_1",paper:"PopupDialog_paper_8",dialogButtons:"PopupDialog_dialogButtons_17",btn:"PopupDialog_btn_22"};const OA=({PopupIcon:e,open:t,handleClose:a,handleConfirm:n,title:i,description:r,confirmButtonText:s,cancelButtonText:o})=>R(V,{classes:{paper:BA.paper},open:t,onClose:a,children:[R("div",{className:BA.dialogTextContainer,children:[p(Vt,{className:BA.dialogTitle,variant:"h5",children:i}),p($t,{className:BA.dialogDescription,children:p(mn,{html:r})})]}),R(je,{className:BA.dialogButtons,children:[p(P,{size:"medium",className:BA.btn,variant:"outlined",color:"inherit",onClick:a,children:o}),p(P,{size:"medium",className:BA.btn,variant:"contained",onClick:n,autoFocus:!0,children:s})]})]}),FA=({children:e})=>{const[t,a]=m.exports.useState(!1),[n,i]=m.exports.useState({});return p(bo.Provider,{value:{modal:t,setModal:a,personForModal:n,setPersonForModal:i},children:e})};
1var HA={footer:"Footer_footer_1",footerBg:"Footer_footerBg_21",container:"Footer_container_34",row:"Footer_row_58",column:"Footer_column_78",etsInfo:"Footer_etsInfo_83",logo:"Footer_logo_87",address:"Footer_address_91",contactInfo:"Footer_contactInfo_92",accent:"Footer_accent_100",hrefAccent:"Footer_hrefAccent_100",dropOff:"Footer_dropOff_107",ourService:"Footer_ourService_110",otherLinks:"Footer_otherLinks_110",externalLink:"Footer_externalLink_134"};const UA=()=>{var e,t;const a=Wt(),{locationData:n}=m.exports.useContext(nx);console.log("locationData: ",n);const{closeTimeOnlyHours:i,openTimeOnlyHours:r,isLaboratoryOpen:s,isLaboratoryClosingSoon:o,formattedOpenTime:l,formattedCloseTime:c,reOpensAt:d}=Wl(n.length>0?n[0].operatingHours:[]),u=ix.find((e=>e.pathname===Tt.ABOUT_US)),h=ix.find((e=>e.pathname===Tt.OUR_SERVICES));ix.find((e=>e.pathname===Tt.CONTACT));const v=ix.find((e=>e.pathname===Tt.CAREERS)),g=ix.filter((e=>e.pathname!==Tt.ABOUT_US&&e.pathname!==Tt.OUR_SERVICES&&e.pathname!==Tt.SEARCH&&e.pathname!==Tt.CAREERS));return R("footer",{className:HA.footer,children:[p("img",{src:"/assets/footerBg.7062a58f.png",className:HA.footerBg}),R("div",{className:HA.container,children:[R("div",{className:HA.row,children:[R("div",{className:I(HA.column,HA.etsInfo),children:[p(Sn,{spriteUrl:tx,className:HA.logo}),R("div",{className:HA.address,children:[p($t,{variant:"small",children:"St. Helena CA 94574"}),p($t,{variant:"small",children:"899 Adams Street"})]}),R("div",{className:HA.contactInfo,children:[p("a",{href:"mailto:[email protected]",className:HA.hrefAccent,children:"[email protected]"}),p("a",{href:"tel:7079634806",className:HA.hrefAccent,children:"707-963-4806"})]})]}),p("div",{className:I(HA.column,HA.dropOff),children:n.length>0?R(k,{children:[p(Vt,{variant:"h5",children:a("nearest-lab")}),p($t,{variant:"small",children:`${n[0].street_1}`}),p($t,{variant:"small",children:`${n[0].city}, ${n[0].state}, ${n[0].postalCode}`}),p($t,{variant:"small",children:o?a("closes-in-one-hour",{time:c}):s?a("open-until-time",{time:c}):a("reopens-at-time",{time:d})})]}):R(k,{children:[p(Vt,{variant:"h5",children:"Primary Laboratory"}),p($t,{variant:"small",children:"899 Adams Street"}),p($t,{variant:"small",children:"St. Helena, CA, 94574"}),p($t,{variant:"small",children:p("a",{href:"tel:7079634806",className:HA.hrefAccent,children:"707-963-4806"})})]})}),u&&R("div",{className:I(HA.column,HA.aboutUs),children:[p(jt,{variant:"h5",to:u.pathname,children:a(u.labelKey)}),null==(e=u.subMenuItems)?void 0:e.map((e=>p(jt,{variant:"small",to:e.pathname,children:a(e.labelKey)},e.labelKey)))]}),h&&R("div",{className:I(HA.column,HA.ourService),children:[p(jt,{variant:"h5",to:h.pathname,children:a(h.labelKey)}),p(jt,{variant:"small",to:Tt.NO_TO_LINK,children:p($t,{variant:"small",className:HA.externalLink,onClick:()=>window.open("https://etslabs.box.com/s/9feznz5g2903qb33k3pa40z6rodqovx7"),children:a("nav-non-analytical-services")})}),null==(t=h.subMenuItems)?void 0:t.map((e=>p(jt,{variant:"small",to:e.pathname,children:a(e.labelKey)},e.labelKey)))]}),g&&R("div",{className:I(HA.column,HA.otherLinks),children:[g.map((e=>p(jt,{variant:"small",to:e.pathname,children:a(e.labelKey)},e.labelKey))),v&&p(jt,{variant:"small",to:Tt.NO_TO_LINK,children:p($t,{variant:"small",className:HA.externalLink,onClick:()=>window.open("https://etslabs.workable.com"),children:a("nav-careers")})})]})]}),R("div",{className:HA.row,children:[R("div",{className:HA.column,children:[p(jt,{variant:"small",to:Tt.ACCREDITATION,children:a("nav-accreditation")}),p($t,{variant:"small",className:HA.externalLink,onClick:()=>window.open("https://etslabs.workable.com"),children:a("nav-careers")}),p(jt,{variant:"small",to:Tt.TECHNICAL_TOOLS,children:a("nav-technical-tools")}),p(jt,{variant:"small",to:Tt.TERMS_AND_CONDITIONS,children:a("nav-terms-and-conditions")}),p(jt,{variant:"small",to:Tt.PRIVACY,children:a("nav-privacy")}),p($t,{variant:"small",className:HA.externalLink,onClick:()=>window.open("https://help.etslabs.com"),children:a("nav-help")})]}),p("div",{className:HA.column,children:p($t,{variant:"small",children:a("footer-copyright",{currentYear:(new Date).getFullYear()})})})]})]})]})},zA=m.exports.lazy((()=>wt((()=>
1import("./BackgroundImageWrapper.5904601e.js")),["assets/BackgroundImageWrapper.5904601e.js","assets/BackgroundImageWrapper.5de022fa.css","assets/vendor.ef7fe251.js"]))),GA=()=>{const e=y();return p(k,{children:p(m.exports.Suspense,{fallback:p(k,{}),children:R(zA,{children:[p(kA,{}),p(m.exports.Suspense,{fallback:p(k,{}),children:p(FA,{children:p(E,{})})}),!b(Tt.REPORT_VERIFICATION,e.pathname)&&p(UA,{})]})})})},qA=e=>{var t=e,{to:a}=t,n=c(t,["to"]);const i=$(),{id:r}=$(),s=y();return/^\/analyses\/[a-zA-Z0-9_%$#-]+$/.test(s.pathname)&&r&&!r.startsWith("analysis")?p(Ye,l(o({},n),{to:Q(`/analyses/analysis/${encodeURIComponent(r)}`,i)})):p(Ye,l(o({},n),{to:Q(a,i)}))};var WA="VintageReports_container_1",VA="VintageReports_contentContainer_20",YA="VintageReports_chartContainer_32",jA="VintageReports_imageContainer_38",$A="VintageReports_image_38",QA="VintageReports_buttonContainer_42",KA="VintageReports_buttonFilterHeader_60",XA="VintageReports_button_42",ZA="VintageReports_textRed_74",JA="VintageReports_buttonHeader_83";var eI="FileUploadButton_container_1";const tI=new class{async uploadImages(e){const t=new FormData;e.forEach(((e,a)=>{t.append(`image-${a}`,e.file,e.fileName)}));const a=await aa.responseHandler(await aa.post("/cms/vintage-trends/charts",t));return na(a,oa)}},aI=[{variatel:"Chardonnay",images:[{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-brix.png",fileName:"chardonnay-multi-vintage-brix.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-ph.png",fileName:"chardonnay-multi-vintage-ph.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-ta.png",fileName:"chardonnay-multi-vintage-ta.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-malic.png",fileName:"chardonnay-multi-vintage-malic.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-potassium.png",fileName:"chardonnay-multi-vintage-potassium.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-tartaric.png",fileName:"chardonnay-multi-vintage-tartaric.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-yan.png",fileName:"chardonnay-multi-vintage-yan.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-nopa.png",fileName:"chardonnay-multi-vintage-nopa.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/chardonnay-multi-vintage-ammonia.png",fileName:"chardonnay-multi-vintage-ammonia.png"}],time:0},{variatel:"Sauvignon Blanc",images:[{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-brix.png",fileName:"sauvignon-blanc-multi-vintage-brix.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-ph.png",fileName:"sauvignon-blanc-multi-vintage-ph.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-ta.png",fileName:"sauvignon-blanc-multi-vintage-ta.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-malic.png",fileName:"sauvignon-blanc-multi-vintage-malic.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-potassium.png",fileName:"sauvignon-blanc-multi-vintage-potassium.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-tartaric.png",fileName:"sauvignon-blanc-multi-vintage-tartaric.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-yan.png",fileName:"sauvignon-blanc-multi-vintage-yan.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-nopa.png",fileName:"sauvignon-blanc-multi-vintage-nopa.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/sauvignon-blanc-multi-vintage-ammonia.png",fileName:"sauvignon-blanc-multi-vintage-ammonia.png"}],time:0},{variatel:"Cabernet Sauvignon Phenolics",images:[{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-anthocyanins.png",f
1ileName:"cabernet-sauvignon-multi-vintage-anthocyanins.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-cat-tan-ratio.png",fileName:"cabernet-sauvignon-multi-vintage-cat-tan-ratio.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-catechin.png",fileName:"cabernet-sauvignon-multi-vintage-catechin.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-pa-tan.png",fileName:"cabernet-sauvignon-multi-vintage-pa-tan.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-polymeric-anthocyanin.png",fileName:"cabernet-sauvignon-multi-vintage-polymeric-anthocyanin.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-tannin.png",fileName:"cabernet-sauvignon-multi-vintage-tannin.png"}],time:0},{variatel:"Pinot Noir",images:[{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-brix.png",fileName:"pinot-noir-multi-vintage-brix.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-ph.png",fileName:"pinot-noir-multi-vintage-ph.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-ta.png",fileName:"pinot-noir-multi-vintage-ta.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-malic.png",fileName:"pinot-noir-multi-vintage-malic.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-potassium.png",fileName:"pinot-noir-multi-vintage-potassium.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-tartaric.png",fileName:"pinot-noir-multi-vintage-tartaric.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-yan.png",fileName:"pinot-noir-multi-vintage-yan.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-nopa.png",fileName:"pinot-noir-multi-vintage-nopa.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/pinot-noir-multi-vintage-ammonia.png",fileName:"pinot-noir-multi-vintage-ammonia.png"}],time:0},{variatel:"Cabernet Sauvignon",images:[{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-brix.png",fileName:"cabernet-sauvignon-multi-vintage-brix.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-ph.png",fileName:"cabernet-sauvignon-multi-vintage-ph.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-ta.png",fileName:"cabernet-sauvignon-multi-vintage-ta.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-malic.png",fileName:"cabernet-sauvignon-multi-vintage-malic.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-potassium.png",fileName:"cabernet-sauvignon-multi-vintage-potassium.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-tartaric.png",fileName:"cabernet-sauvignon-multi-vintage-tartaric.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-yan.png",fileName:"cabernet-sauvignon-multi-vintage-yan.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-nopa.png",fileName:"cabernet-sauvignon-multi-vintage-nopa.png"},{src:"https://s3.us-west-1.amazonaws.com/assets.etslabs.com/vintage-trends-images/cabernet-sauvignon-multi-vintage-ammonia.png",fileName:"cabernet-sauvignon-multi-vintage-ammonia.png"}],time:0}],nI=({inputText:e,imageName:t,varietal:a,images:n,setImages:i})=>{m.exports.useContext(Na),Wt();const{mutateAsync:r}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(tI.uploadImages,{onSuccess:a=>{console.log("Image upload success",a),t.open(e("image-upload-success"),{severity:"success"})},onError:a=>{console.log("Image upload error",a),t.open(fa(a,e("image-upload-error")),{severity:"error"})}})})();return p("div",{className:eI,onDrop:e=>(async e=>{e.preventDefault(),e.stopPropagation();const n=Object.values(e.dataTransfer.files).map((e=>
1({file:e,fileName:t})));if("Image uploaded successfully"===(await r(n)).message){const e=aI.map((e=>e.variatel===a?(e.time=Date.now(),e):e));i(e)}})(e),onDragEnter:e=>{return(t=e).preventDefault(),void t.stopPropagation();var t},onDragLeave:e=>{return(t=e).preventDefault(),void t.stopPropagation();var t},onDragOver:e=>{return(t=e).preventDefault(),void t.stopPropagation();var t},children:e})},iI=[{id:1,name:"Chardonnay"},{id:2,name:"Sauvignon Blanc"},{id:3,name:"Pinot Noir"},{id:4,name:"Cabernet Sauvignon"},{id:5,name:"Cabernet Sauvignon Phenolics"}],rI=()=>{const e=Wt(),[t,a]=m.exports.useState(aI),[n,i]=m.exports.useState(!0),[r,s]=m.exports.useState(!1),[o,l]=m.exports.useState(!1),[c,d]=m.exports.useState(!1),[u,h]=m.exports.useState(!1),[v,g]=m.exports.useState(!1),[y,b]=m.exports.useState(""),{authenticatedUser:_}=m.exports.useContext(_a),{user:{id:N,godmode:f}}=_,C=e=>{"Chardonnay"===e&&(s(!0),i(!1),l(!1),h(!1),d(!1),g(!1)),"Sauvignon Blanc"===e&&(i(!1),s(!1),l(!0),h(!1),d(!1),g(!1)),"Cabernet Sauvignon"===e&&(i(!1),s(!1),l(!1),h(!0),d(!1),g(!1)),"Cabernet Sauvignon Phenolics"===e&&(i(!1),s(!1),l(!1),h(!1),d(!1),g(!0)),"Pinot Noir"===e&&(i(!1),s(!1),l(!1),h(!1),d(!0),g(!1)),"All Varietals"===e&&(i(!0),s(!1),l(!1),h(!1),d(!1),g(!1),b(""))},S=t.map((e=>e.images.map(((n,i)=>R("div",{className:jA,children:[p("img",{src:n.src+`?version=${Date.now()}`,className:$A}),p("div",{children:f&&p(nI,{inputText:"Drag and Drop File to Update Above Image",imageName:n.fileName,varietal:e.variatel,images:t,setImages:a})})]},i))))),x=t.filter((e=>"Chardonnay"===e.variatel)).map((e=>e.images.map(((n,i)=>R("div",{className:jA,children:[p("img",{src:n.src+`?version=${Date.now()}`,className:$A}),p("div",{children:f&&p(nI,{inputText:"Drag and Drop File to Update Above Image",imageName:n.fileName,varietal:e.variatel,images:t,setImages:a})})]},i))))),A=t.filter((e=>"Sauvignon Blanc"===e.variatel)).map((e=>e.images.map(((n,i)=>R("div",{className:jA,children:[p("img",{src:n.src+`?version=${Date.now()}`,className:$A}),p("div",{children:f&&p(nI,{inputText:"Drag and Drop File to Update Above Image",imageName:n.fileName,varietal:e.variatel,images:t,setImages:a})})]},i))))),w=t.filter((e=>"Pinot Noir"===e.variatel)).map((e=>e.images.map(((n,i)=>R("div",{className:jA,children:[p("img",{src:n.src+`?version=${Date.now()}`,className:$A}),p("div",{children:f&&p(nI,{inputText:"Drag and Drop File to Update Above Image",imageName:n.fileName,varietal:e.variatel,images:t,setImages:a})})]},i))))),T=t.filter((e=>"Cabernet Sauvignon"===e.variatel)).map((e=>e.images.map(((n,i)=>R("div",{className:jA,children:[p("img",{src:n.src+`?version=${Date.now()}`,className:$A}),p("div",{children:f&&p(nI,{inputText:"Drag and Drop File to Update Above Image",imageName:n.fileName,varietal:e.variatel,images:t,setImages:a})})]},i))))),k=t.filter((e=>"Cabernet Sauvignon Phenolics"===e.variatel)).map((e=>e.images.map(((n,i)=>R("div",{className:jA,children:[p("img",{src:n.src+`?version=${Date.now()}`,className:$A}),p("div",{children:f&&p(nI,{inputText:"Drag and Drop File to Upload Above Image",imageName:n.fileName,varietal:e.variatel,images:t,setImages:a})})]},i)))));return R("div",{className:WA,children:[p(on,{title:"vintage-reports-menu",textAlignment:"left",sideLayout:Ba.MEDIUM,display:!0}),p(za,{sideLayout:Ba.MEDIUM,children:p("main",{children:R("div",{className:VA,children:[R("div",{className:QA,children:[p("div",{className:KA,children:p(Vt,{variant:"h5",children:e("vintage-report-filter")})}),p($t,{variant:"standard",className:JA,onClick:()=>C("All Varietals"),children:"All Varietals"}),null==iI?void 0:iI.map((({name:e,id:t},a)=>p($t,{id:null==t?void 0:t.toString(),variant:"standard",className:I(XA,y===(null==t?void 0:t.toString())?ZA:""),onClick:t=>{b(t.currentTarget.id),C(e)},children:e},a)))]}),R("div",{className:YA,children:[n&&S,r&&x,o&&A,c&&w,v&&k,u&&T]})]})})})]})},sI=()=>{var e,t,a,n,i,r,s,o;Wt();const{data:l,isLoading:c}=dn(),d=null==(n=null==(a=null==(t=null==(e=null==l?void 0:l.find((e=>e.title===La.QUALITY)))?void 0:e.content)?void 0:t.split("<h2>"))?void 0:a.at(3))?void 0:n.split("\n");let m=null==(s=null==(r=null==(i=null==d?void 0:d.at(6))?void 0:i.split("<h3>"))?void 0:r.at(1))?void 0:s.split("</h3>");m=["<h2>",null!=(o=null==m?void 0:m.at(0))?o:"","</h2>\r"];const u=null==d?void 0:d.slice(7).join("\n"),h=m.join("")+"\n"+u,v=un(null!=h?h:"");return R(k,{children:[p(on,{title:"accreditation-title",textAlignment:"left",sideLayout:Ba.BIG,display:!0}),p(za,{sideLayout:Ba.BIG,children:c?p(pn,{className:"spinnerCenter"}):p(mn,{html:v})})]})};var oI="Terramea_container_1";var lI="SoilSection_soil_1",cI="SoilSection_transition_6",dI="SoilSection_image_10",mI="SoilSection_content_13",pI="SoilSection_header_30",uI="SoilSection_headerText1_37",hI="SoilSection_headerText2_42",vI="SoilSection_text_47",gI="SoilSection_font_57",yI="SoilSection_soilCardsContainer_61",bI="SoilSection_row_67";var _I="SoilCard_container_1",NI="SoilCard_download_14",fI="SoilCard_icon_28",CI="SoilCard_content_41",SI="SoilCard_title_49",xI="SoilCard_font_53",AI="SoilCard_text_56",II="SoilCard_rive_60",wI="SoilCard_clickable_67";const TI=({icon:e,title:t,text:a,downloadUrl:n,isDownloadable:i=!1})=>{const r=h(),s=A(r.breakpoints.up("lg")),[o,l]=m.exports.useState(!1),{rive:c,RiveComponent:d}
1=$e.useRive({src:e,stateMachines:"State Machine 1",shouldDisableRiveListeners:!0,autoplay:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),u=$e.useStateMachineInput(c,"State Machine 1","hover");!s&&u&&(u.value=!0);const v=m.exports.useCallback((()=>{n&&i&&window.open(n,"_blank")}),[n,i]),g=m.exports.useCallback((()=>{u&&(u.value=!0),l(!0)}),[u]),y=m.exports.useCallback((()=>{u&&(u.value=!1),l(!1)}),[u]);return R("div",{className:`${_I} ${i?wI:""}`,onMouseEnter:g,onMouseLeave:y,onClick:i?v:void 0,style:{cursor:i?"pointer":"default"},children:[i&&p("div",{className:NI,children:p(Sn,{spriteUrl:Rg,className:fI})}),R("div",{className:CI,children:[p(d,{className:II}),p("div",{className:SI,children:p($t,{variant:"big",className:xI,children:t})}),p("div",{className:AI,children:p($t,{variant:"standard",children:a})})]})]})};const RI=()=>{const e=Wt(),t={offscreen:{y:40,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2}}};return R("div",{className:lI,children:[p("div",{className:cI,children:p("img",{src:"/assets/terrameaTransition2.811b757c.svg",className:dI})}),R("div",{className:mI,children:[R("div",{className:pI,children:[p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.4},transition:{duration:2},children:R(Qe.div,{variants:t,children:[p(Vt,{variant:"h1",className:hI,children:"Deep Soil"}),p(Vt,{variant:"h1",className:uI,children:"Knowledge"})]})}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.4},transition:{duration:2},children:p(Qe.div,{className:vI,variants:t,children:p($t,{variant:"big",className:gI,children:p(mn,{html:e("terramea-from-ground-soil")})})})})]}),R("div",{className:yI,children:[R("div",{className:bI,children:[p(TI,{icon:"/assets/terrameaFlask.659eec42.riv",title:e("terramea-soil-card-4-title"),text:e("terramea-soil-card-4-text"),downloadUrl:e("terramea-soil-card-4-download-url"),isDownloadable:!0}),p(TI,{icon:"/assets/terrameaGrapeHands.5c0d9a5c.riv",title:e("terramea-soil-card-5-title"),text:e("terramea-soil-card-5-text"),downloadUrl:e("terramea-soil-card-5-download-url"),isDownloadable:!0})]}),R("div",{className:bI,children:[p(TI,{icon:"/assets/terrameaGrapeArrow.1c9209e9.riv",title:e("terramea-soil-card-3-title"),text:e("terramea-soil-card-3-text")}),p(TI,{icon:"/assets/terrameaGrapeMagnify.f01ee2b9.riv",title:e("terramea-soil-card-1-title"),text:e("terramea-soil-card-1-text")}),p(TI,{icon:"/assets/terrameaGrapeRoot.8a47d719.riv",title:e("terramea-soil-card-2-title"),text:e("terramea-soil-card-2-text")})]})]})]})]})};var kI="BiomeSection_container_1",EI="BiomeSection_transition_6",MI="BiomeSection_image_10",DI="BiomeSection_content_13",PI="BiomeSection_worksHeader_32",LI="BiomeSection_title_46",BI="BiomeSection_headerRive_52",OI="BiomeSection_textHeader_55",FI="BiomeSection_titleBig_62",HI="BiomeSection_titleText_81",UI="BiomeSection_rive_91",zI="BiomeSection_text_55",GI="BiomeSection_header_52",qI="BiomeSection_headerText1_129",WI="BiomeSection_optimizeImage_141",VI="BiomeSection_cardsContainer_167",YI="BiomeSection_row_191",jI="BiomeSection_cardOne_203",$I="BiomeSection_cardTwo_212",QI="BiomeSection_cardThree_222",KI="BiomeSection_cardFour_232",XI="BiomeSection_cardFive_242",ZI="BiomeSection_button_252";var JI="BiomeCard_container_1",ew="BiomeCard_icon_16",tw="BiomeCard_rive_23",aw="BiomeCard_image_28",nw="BiomeCard_inner_34",iw="BiomeCard_title_54",rw="BiomeCard_title1_59",sw="BiomeCard_text_66",ow="BiomeCard_learn_70";const lw=({text:e,title:t,frame1:a,level:n})=>{const[i,r]=m.exports.useState(!1),{rive:s,RiveComponent:o}=$e.useRive({src:a,stateMachines:"State Machine 1",autoplay:!0,shouldDisableRiveListeners:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),l=$e.useStateMachineInput(s,"State Machine 1","hover");return R("div",{className:JI,onMouseEnter:()=>{l&&(l.value=!0),r(!0)},onMouseLeave:()=>{l&&(l.value=!1),r(!1)},children:[p("img",{src:"/assets/terrameaRing.fb91a104.svg",className:ew}),p("div",{className:aw,children:p("div",{className:tw,children:p(o,{})})}),R("div",{className:nw,"heirarchy-level":n,children:[p("div",{className:iw,children:p($t,{className:rw,children:t})}),p("div",{className:sw,children:p(mn,{html:e})}),p("div",{className:ow})]})]})};var cw="/assets/rippleEffect.01c84209.riv";const dw=()=>{const e=Wt(),t=h(),a=A(t.breakpoints.up("lg")),{rive:n,RiveComponent:i}
1=$e.useRive({src:cw,stateMachines:"State Machine 1",autoplay:!0,shouldDisableRiveListeners:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),r=$e.useStateMachineInput(n,"State Machine 1","hover"),s={offscreen:{y:40,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2}}},o={offscreen:{y:20,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2}}};return R("div",{className:kI,children:[p("div",{className:EI,children:p("img",{src:"/assets/terrameaTransition1.3f78c059.svg",className:MI})}),R("div",{className:DI,children:[R("div",{className:PI,children:[p("div",{className:LI,children:R(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.4},transition:{duration:3},className:BI,onMouseEnter:()=>{r&&(r.value=!0)},onMouseLeave:()=>{r&&(r.value=!1)},children:[a&&p(i,{className:UI}),R(Qe.div,{variants:{offscreen:{y:60,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:3}}},className:OI,children:[p(Vt,{variant:"h3",className:HI,children:"How"}),p("div",{className:FI,children:"3-Biom"}),p(Vt,{variant:"h3",className:HI,children:"analysis works"})]})]})}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.4},transition:{duration:2},children:p(Qe.div,{className:zI,variants:s,children:p($t,{variant:"big",children:p(mn,{html:e("terramea-biome-paragraph-1",{style:"color:#FFE1C3;font-weight:700;"})})})})})]}),R("div",{className:VI,"card-position":1,children:[p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.2},transition:{duration:2},children:p(Qe.div,{variants:o,className:jI,children:p(lw,{title:e("terramea-biome-card-1-title"),text:e("terramea-biome-card-1-text"),frame1:"/assets/terrameaMicroRive.2643fbe2.riv",level:"top"})})}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.3},transition:{duration:2},children:p(Qe.div,{variants:o,className:QI,children:p(lw,{title:e("terramea-biome-card-5-title"),text:e("terramea-biome-card-5-text"),frame1:"/assets/terrameaBact3Rive.586c70f2.riv"})})}),R("div",{className:YI,children:[p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.2},transition:{duration:2},children:p(Qe.div,{variants:o,className:KI,children:p(lw,{title:e("terramea-biome-card-3-title"),text:e("terramea-biome-card-3-text"),frame1:"/assets/terrameaBact2Rive.632c170c.riv"})})}),a&&p("div",{className:WI,children:p("img",{src:"/assets/terramea3Biom.3dbbbf6e.svg",className:MI})}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.2},transition:{duration:2},children:p(Qe.div,{variants:a?{offscreen:{y:20,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2,delay:.8}}}:o,className:$I,children:p(lw,{title:e("terramea-biome-card-2-title"),text:e("terramea-biome-card-2-text"),frame1:"/assets/terrameaBactRive.b7c4deb1.riv"})})})]}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.1},transition:{duration:2},children:p(Qe.div,{variants:o,className:XI,children:p(lw,{title:e("terramea-biome-card-4-title"),text:e("terramea-biome-card-4-text"),frame1:"/assets/terrameaRatioRive.af10826a.riv"})})})]}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.7},transition:{duration:2},className:GI,children:p(Qe.div,{variants:s,children:p(Vt,{variant:"h3",className:qI,children:p(mn,{html:e("terramea-biome-paragraph-2")})})})}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.7},transition:{duration:2},children:R(Qe.div,{variants:s,className:GI,style:{marginTop:"-6vh"},children:[p(Vt,{variant:"h4",className:qI,children:p(mn,{html:e("terramea-biome-button-label")})}
1),p(P,{variant:"contained",className:ZI,onClick:()=>window.open("https://www.etslabs.com/analyses/all-analyses","_blank"),children:e("terramea-button")})]})})]})]})};var mw="GetStarted_getStarted_1",pw="GetStarted_transition_6",uw="GetStarted_image_10",hw="GetStarted_content_13",vw="GetStarted_formHeader_28",gw="GetStarted_header_39",yw="GetStarted_headerText_57",bw="GetStarted_error_78",_w="GetStarted_getStartedForm_91",Nw="GetStarted_formContainer_104",fw="GetStarted_form_28",Cw="GetStarted_formInput_128",Sw="GetStarted_button_136",xw="GetStarted_sentConfirmationContainer_157",Aw="GetStarted_text_86";const Iw=()=>{const[e,t]=m.exports.useState(!1),a=Wt(),{mutateAsync:n}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return x(cn.terrameaContactETS,{onSuccess:a=>{console.log("successfully contacted ETS Labs",a),t.open(e("contact-ets-success"),{severity:"success"})},onError:a=>{console.log("failed to contact ETS Labs",a),t.open(fa(a,e("contact-ets-labs-error")),{severity:"error"})}})})(),i=z({fullName:Ni("Your name is required."),email:Ni(a("field-error-required",{field:a("email")}),_i(a("email-error-invalid-format"))),phone:Ni("Your phone number is required."),message:Ni("A message is required.")});return R("div",{className:mw,children:[p("div",{className:pw,children:p("img",{src:"/assets/terrameaTransition4.b7579a19.svg",className:uw})}),p("div",{className:hw,children:R("div",{className:_w,children:[R("div",{className:vw,children:[p($t,{variant:"big",className:yw,children:a("terramea-get-started")}),p(Vt,{variant:"h1",className:gw,children:a("terramea-get-started-header")})]}),!e&&p(q,{initialValues:{fullName:"",email:"",phone:"",message:""},validationSchema:i,validateOnBlur:!1,validateOnChange:!1,onSubmit:e=>{console.log("Sending message.",e);const a={name:e.fullName,email:e.email,message:e.message,phone:e.phone};n(a),t(!0)},children:({handleChange:e,errors:t,touched:a,values:n})=>p(W,{children:R("div",{className:Nw,children:[R("div",{className:fw,children:[R(K,{variant:"standard",children:[p(di,{className:Cw,name:"fullName",value:n.fullName,onChange:e,placeholder:"Full Name",type:"text",error:!!t.fullName&&a.fullName}),t.fullName&&p(Me,{className:bw,children:t.fullName})]}),R(K,{variant:"standard",children:[p(di,{className:Cw,name:"email",value:n.email,onChange:e,placeholder:"Email",type:"text",error:!!t.email&&a.email}),t.email&&p(Me,{className:bw,children:t.email})]}),R(K,{variant:"standard",children:[p(di,{className:Cw,name:"phone",value:n.phone,onChange:e,placeholder:"Phone Number",type:"text",error:!!t.phone&&a.phone}),t.phone&&p(Me,{className:bw,children:t.phone})]}),R(K,{variant:"standard",children:[p(H,{name:"message",className:Cw,value:n.message,onChange:e,placeholder:"Message",type:"text",id:"standard-multiline-static",variant:"standard",multiline:!0}),t.message&&p(Me,{className:bw,children:t.message})]})]}),p(P,{variant:"contained",type:"submit",className:Sw,children:"Contact Us"})]})})}),e&&R("div",{className:xw,children:[p($t,{variant:"big",className:Aw,children:"Thank you for contacting ETS!"}),p(P,{variant:"contained",className:Sw,onClick:()=>t(!1),children:"Send Another Message"})]})]})})]})};var ww="Optimize_optimize_1",Tw="Optimize_header_11",Rw="Optimize_headerText1_16",kw="Optimize_rive_36",Ew="Optimize_cardAndImage_41",Mw="Optimize_card_41",Dw="Optimize_optimizeImage_73",Pw="Optimize_riveBiom_87";var Lw="OptimizeCard_container_1",Bw="OptimizeCard_inner_36",Ow="OptimizeCard_title_56",Fw="OptimizeCard_title1_60",Hw="OptimizeCard_title2_67",Uw="OptimizeCard_text_73";const zw=({text:e,title:t,title2:a,position:n})=>(Wt(),p("div",{className:Lw,"card-position":n,children:R(Qe.div,{className:Bw,whileHover:{scaleY:1.05},transition:{duration:.3,type:"spring",bounce:.3}
1,children:[p("div",{className:Ow,children:R($t,{className:Fw,children:[" ",R("span",{children:[t," ",p("span",{className:Hw,children:a})]})]})}),p("div",{className:Uw,children:p(mn,{html:e})})]})}));const Gw=()=>{const e=Wt(),t=h(),a=A(t.breakpoints.up("lg")),{rive:n,RiveComponent:i}=$e.useRive({src:cw,stateMachines:"State Machine 1",autoplay:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),{rive:r,RiveComponent:s}=$e.useRive({src:cw,stateMachines:"State Machine 1",autoplay:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),{rive:o,RiveComponent:l}=$e.useRive({src:"/assets/terrameaRiverRive.0959a32c.riv",stateMachines:"State Machine 1",autoplay:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),{rive:c,RiveComponent:d}=$e.useRive({src:"/assets/terrameaBiomRive.c578dfbc.riv",stateMachines:"State Machine 1",autoplay:!0,onLoadError:()=>console.log("ERROR LOADING RIVE"),onLoad:()=>console.log("LOADED RIVE")}),u=$e.useStateMachineInput(n,"State Machine 1","hover"),v=$e.useStateMachineInput(r,"State Machine 1","hover"),g=m.exports.useCallback((()=>{null==u||u.fire()}),[u]),y=m.exports.useCallback((()=>{null==u||u.fire()}),[u]),b=m.exports.useCallback((()=>{null==v||v.fire()}),[v]),_=m.exports.useCallback((()=>{null==v||v.fire()}),[v]),N={offscreen:{y:40,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2}}};return R("div",{className:ww,children:[R(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.7},transition:{duration:2},className:Tw,onMouseEnter:g,onMouseLeave:y,children:[a&&p(i,{className:kw}),p(Qe.div,{variants:N,children:p(Vt,{variant:"h1",className:Rw,children:p(mn,{html:e("terramea-enable")})})})]}),R("div",{className:Ew,"card-position":1,children:[a&&p("div",{className:Dw,children:p(l,{className:kw})}),p(Qe.div,{initial:{y:40,opacity:0},whileInView:{y:0,opacity:1},viewport:{once:!0,amount:.4},transition:{type:"spring",duration:2},className:Mw,children:p(zw,{title:"The Unanswered",title2:"Questions",text:e("terramea-accurate-measurements-card"),position:1})})]}),R(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.6},transition:{duration:2},className:Tw,onMouseEnter:b,onMouseLeave:_,children:[a&&p(s,{className:kw}),p(Qe.div,{variants:N,children:p(Vt,{variant:"h1",className:Rw,children:p(mn,{html:e("terramea-optimize-paragraph-3")})})})]}),R("div",{className:Ew,"card-position":2,children:[p(Qe.div,{initial:{y:40,opacity:0},whileInView:{y:0,opacity:1},viewport:{once:!0,amount:.4},transition:{type:"spring",duration:2},className:Mw,children:p(zw,{title:"TerraMea 3-Biom",title2:"Analysis",text:e("terramea-3biom-analysis-card"),position:2})}),a&&p("div",{className:Dw,children:p(d,{className:Pw})})]})]})};var qw="TerrameaHeader_container_1",Ww="TerrameaHeader_logoContainer_17",Vw="TerrameaHeader_icon_21",Yw="TerrameaHeader_image_26",jw="TerrameaHeader_title_32",$w="TerrameaHeader_headerText_37",Qw="TerrameaHeader_textFont_49";const Kw=()=>{const e=Wt();return p("div",{className:qw,children:R("div",{className:jw,children:[R("div",{className:Ww,children:[p("img",{src:"/assets/terrameaSymbol.c162edde.png",className:Vw}),p("img",{src:"/assets/terremea.d8d6b4af.png",className:Yw})]}),p(Vt,{variant:"h1",className:$w,children:p(mn,{html:e("terramea-header-middle")})}),p($t,{className:Qw,children:p(mn,{html:e("terramea-soil-subheader")})})]})})};var Xw="ResultsSection_container_1",Zw="ResultsSection_transition_6",Jw="ResultsSection_image_10",eT="ResultsSection_content_13",tT="ResultsSection_resultsHeader_32",aT="ResultsSection_text_39",nT="ResultsSection_subheading_44",iT="ResultsSection_resultsInfo_56",rT="ResultsSection_tabContainer_64",sT="ResultsSection_button_78",oT="ResultsSection_active_97",lT="ResultsSection_subtabs_113",cT="ResultsSection_normal_125",dT="ResultsSection_tabContent_141",mT="ResultsSection_featuresFooter_153",pT="ResultsSection_reportButton_161",uT="ResultsSection_features_153";var hT="ResultsContent_container_1",vT="ResultsContent_textContainer_14",gT="ResultsContent_chartContainer_27",yT="ResultsContent_chart_27",bT="ResultsContent_no_43";const _T=({section:e,chart:t,text:a})=>R("div",{className:hT,children:[p("div",{className:gT,children:p("img",{src:t,className:3===e?yT:bT})}),p("div",{className:vT,children:p($t,{variant:"standard",children:a})})]});const NT=()=>{const e=Wt(),[t,a]=m.exports.useState(1),n=e=>{a(e)};m.exports.useEffect((()=>{const e=setInterval((()=>{a((e=>7===e?1:e+1))}),7e3);return()=>{clearInterval(e)}}),[]);const i={offscreen:{y:40,opacity:0}
1,onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2}}};return R("div",{className:Xw,children:[p("div",{className:Zw,children:p("img",{src:"/assets/terrameaTransition3.ebc7489d.svg",className:Jw})}),R("div",{className:eT,children:[p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.4},transition:{duration:3},children:R(Qe.div,{className:tT,variants:i,children:[p(Vt,{variant:"h1",className:aT,children:e("terramea-results")}),p($t,{variant:"big",className:nT,children:p(mn,{html:e("terramea-results-subheading")})})]})}),R("div",{className:iT,children:[R("div",{className:rT,children:[p(P,{variant:"contained",className:1===t||2===t?oT:sT,onClick:()=>n(1),children:"Soil Chemistry"}),p(P,{variant:"contained",className:3===t||4===t||5===t||6===t?oT:sT,onClick:()=>n(3),children:"Soil Microbiology"}),p(P,{variant:"contained",className:7===t?oT:sT,onClick:()=>n(7),children:"Soil Physics"})]}),R("div",{className:lT,children:[(1===t||2===t)&&R(k,{children:[p("div",{className:1===t?oT:cT,onClick:()=>n(1),children:"Total Organic Matter"}),p("div",{className:2===t?oT:cT,onClick:()=>n(2),children:"Cation Exchange Capacity"})]}),(3===t||4===t||5===t||6===t)&&R(k,{children:[p("div",{className:3===t?oT:cT,onClick:()=>n(3),children:"SBS Radar Chart"}),p("div",{className:4===t?oT:cT,onClick:()=>n(4),children:"Fungi Ratio"}),p("div",{className:5===t?oT:cT,onClick:()=>n(5),children:"Organic Matter and Necromass"}),p("div",{className:6===t?oT:cT,onClick:()=>n(6),children:"Necromass"})]}),7===t&&p(k,{children:p("div",{className:7===t?oT:cT,onClick:()=>n(1),children:"Soil Composition"})})]}),p("div",{className:dT,children:p(Ke,{exitBeforeEnter:!0,initial:!1,children:R(Qe.div,{initial:{x:300,opacity:0},animate:{x:0,opacity:1},exit:{x:-300,opacity:0},style:{position:"absolute",width:"100%",top:0,left:0},transition:{x:{type:"spring",stiffness:400,damping:30},opacity:{duration:.2},duration:.4},children:[1===t&&p(_T,{chart:"/assets/terrameaOMChart.8c5c4d05.svg",text:e("terramea-from-ground-results-1"),section:1}),2===t&&p(_T,{chart:"/assets/cecChart.f6683bdf.png",text:e("terramea-from-ground-results-1"),section:3}),3===t&&p(_T,{chart:"/assets/terrameaRadarChart.b920baa2.svg",text:e("terramea-from-ground-results-2"),section:2}),4===t&&p(_T,{chart:"/assets/ratioFungi.2830c8aa.png",text:e("terramea-from-ground-results-2"),section:3}),5===t&&p(_T,{chart:"/assets/omNecro.3dcac3bf.png",text:e("terramea-from-ground-results-2"),section:3}),6===t&&p(_T,{chart:"/assets/necroBar.d5d7a843.png",text:e("terramea-from-ground-results-2"),section:3}),7===t&&p(_T,{chart:"/assets/terrameaSoilChart.50b20c63.svg",text:e("terramea-from-ground-results-3"),section:3})]},t)})})]}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.4},transition:{duration:2},className:mT,children:R(Qe.div,{variants:i,children:[p(P,{variant:"contained",className:pT,style:{marginBottom:"11vh"},onClick:()=>window.open(e("terramea-example-report-url"),"_blank"),children:e("terramea-example-report-button")}),p("div",{className:uT,children:p(mn,{html:e("terramea-results-features")})})]})})]})]})};var fT="ScorpionsSection_container_1",CT="ScorpionsSection_header_24",ST="ScorpionsSection_headerText1_28",xT="ScorpionsSection_headerText2_33",AT="ScorpionsSection_content_38",IT="ScorpionsSection_text_50",wT="ScorpionsSection_font_55",TT="ScorpionsSection_carousel_67",RT="ScorpionsSection_image_89",kT="ScorpionsSection_tabs_100",ET="ScorpionsSection_tab_100",MT="ScorpionsSection_active_116",DT="ScorpionsSection_lastLine_119",PT="ScorpionsSection_button_124";const LT=()=>{const[e,t]=m.exports.useState(1);m.exports.useEffect((()=>{const e=setInterval((()=>{t((e=>3===e?1:e+1))}),7e3);return()=>{clearInterval(e)}}),[]);const a={offscreen:{y:40,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",duration:2}}};return R("div",{className:fT,children:[p("div",{className:CT,children:p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.3},transition:{duration:2},children:R(Qe.div,{variants:a,children:[p(Vt,{variant:"h1",className:xT,children:"Scorpions:"}),p(Vt,{variant:"h1",className:ST,children:" Microbial Ratios in Focus"})]})})}),R("div",{className:AT,children:[p("div",{className:IT,children:R($t,{variant:"big",className:wT,children:["The Scorpions PCR add-on takes soil biology one step further by measuring the relative abundance of key bacterial and fungal groups. While 3-BIOM establishes the overall vitality and balance of your soil, Scorpions provides a precise snapshot of the microbial community structure, showing which groups are most dominant and how fungi and bacteria compare in proportion.",p("br",{}),p("br",{}),"These ratios matter because they reflect how soil ecosystems function. For example, a shift toward more fungal activity can indicate stronger carbon storage and longer-term nutrient cycling, while more bacterial dominance may point to faster mineralization and short-term nutrient availability, giving you an additional layer of detail on the microbial dynamics at work in your vineyard soils."]})}),R("div",{className:TT,children:[R("div",{className:kT,children:[p("div",{className:I(ET,{[MT]:1===e}),onClick:()=>t(1),children:p("span",{})}),p("div",{className:I(ET,{[MT]:2===e}),onClick:()=>t(2),children:p("span",{})}),p("div",{className:I(ET,{[MT]:3===e}),onClick:()=>t(3),children:p("span",{})})]}),p(Ke,{exitBeforeEnter:!0,initial:!1,children:R(Qe.div,{initial:{x:30,opacity:0}
1,animate:{x:0,opacity:1},exit:{x:-30,opacity:0},style:{position:"relative",width:"100%",top:0,left:0},transition:{x:{type:"spring",stiffness:400,damping:30},opacity:{duration:.2},duration:.4},children:[1===e&&p("img",{src:"/assets/scorpionsFungiChart.a2bfd601.png",className:RT}),2===e&&p("img",{src:"/assets/scorpionsTable.d957dc0e.png",className:RT,"image-type":"table"}),3===e&&p("img",{src:"/assets/scorpionsBactChart.3228cbc0.png",className:RT})]},e)})]})]}),p(Qe.div,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0,amount:.3},transition:{duration:2},children:R(Qe.div,{variants:a,children:[p($t,{variant:"big",className:DT,children:"The Scorpions PCR analysis can be ordered as a stand-alone report or as an add-on to the TerraMea 3-BIOM analysis."}),p(P,{variant:"contained",className:PT,onClick:()=>window.open("https://www.etslabs.com/analyses/all-analyses","_blank"),children:"Learn More About 3-BIOM Scorpions"})]})})]})},BT=()=>R("div",{className:oI,id:"terramea-maketing-parent",children:[p(Kw,{}),p(Gw,{}),p(dw,{}),p(RI,{}),p(LT,{}),p(NT,{}),p(Iw,{})]});var OT="PesticidePanel_container_98",FT="PesticidePanel_header_104",HT="PesticidePanel_introText_110",UT="PesticidePanel_tableSection_124",zT="PesticidePanel_componentsTable_153";const GT=()=>(Aa(),p(za,{sideLayout:Ba.SMALL,children:R("div",{className:OT,children:[p(Vt,{variant:"h3",className:FT,children:"Agri-Chemical Panel - Component List"}),p($t,{variant:"standard",className:HT,children:"This is a comprehensive list of pesticides that can be identified by our Agri-Chemical Panel."}),p("div",{className:UT,children:p("table",{className:zT,children:R("tbody",{children:[R("tr",{children:[p("td",{children:"2,4-D"}),p("td",{children:"2,4-DDT; 4,4-DDE"}),p("td",{children:"2-phenylphenol"}),p("td",{children:"3,5-dichloroaniline"}),p("td",{children:"4,4-TDE; 4,4-DDT"}),p("td",{children:"Aclonifen"})]}),R("tr",{children:[p("td",{children:"Acrinathrin"}),p("td",{children:"Ametoctradine"}),p("td",{children:"Amisulbrom"}),p("td",{children:"Azoxystrobin"}),p("td",{children:"Benalaxyl (isomers)"}),p("td",{children:"Benoxacor"})]}),R("tr",{children:[p("td",{children:"Benthiavalicarbe"}),p("td",{children:"Beta-Cyfluthrin"}),p("td",{children:"Bifenthrin"}),p("td",{children:"Bitertanol"}),p("td",{children:"Boscalid"}),p("td",{children:"Bupirimate"})]}),R("tr",{children:[p("td",{children:"Buprofezin"}),p("td",{children:"Captan"}),p("td",{children:"Carbendazyme + Bénomyl"}),p("td",{children:"Carbétamide"}),p("td",{children:"Carfentrazone-ethyl"}),p("td",{children:"Chlorantraniliprole"})]}),R("tr",{children:[p("td",{children:"Chlormephos"}),p("td",{children:"Chloropropham"}),p("td",{children:"Chlorothalonil"}),p("td",{children:"Chlorpyrifos-ethyl"}),p("td",{children:"Chlorpyrifos-methyl"}),p("td",{children:"Clethodime"})]}),R("tr",{children:[p("td",{children:"Clofentezine"}),p("td",{children:"Cyazofamide"}),p("td",{children:"Cyhalofop-buty"}),p("td",{children:"Cyhalotrin (isomers)"}),p("td",{children:"Cycloxydim"}),p("td",{children:"Cyflufenamid"})]}),R("tr",{children:[p("td",{children:"Cymoxanil"}),p("td",{children:"Cypermethrin (isomers)"}),p("td",{children:"Cyproconazole"}),p("td",{children:"Cyprodinil"}),p("td",{children:"Deltamethrin"}),p("td",{children:"Diclofluanid"})]}),R("tr",{children:[p("td",{children:"Diclofop-methyl"}),p("td",{children:"Diethofencarbe"}),p("td",{children:"Difenoconazole"}),p("td",{children:"Diflufenican"}),p("td",{children:"Dimethoate"}),p("td",{children:"Dimetomorph"})]}),R("tr",{children:[p("td",{children:"Dithianon"}),p("td",{children:"Diuron + metabolite"}),p("td",{children:"Emamectine"}),p("td",{children:"Esfenvalerate"}),p("td",{children:"Ethoprofos"}),p("td",{children:"Etofenprox"})]}),R("tr",{children:[p("td",{children:"Etoxazole"}),p("td",{children:"Famoxadone"}),p("td",{children:"Fenamidone"}),p("td",{children:"Fenarimol"}),p("td",{children:"Fenazaquin"}),p("td",{children:"Fenbuconazole"})]}),R("tr",{children:[p("td",{children:"Fenhexamid"}),p("td",{children:"Fenitrothion"}),p("td",{children:"Fenoxaprop-ethyl"}),p("td",{children:"Fenoxycarb"}),p("td",{children:"Fenpropidine"}),p("td",{children:"Fenpropimorph"})]}),R("tr",{children:[p("td",{children:"Fenpyrazamine"}),p("td",{children:"Fenpyroximat"}),p("td",{children:"Fipronil"}),p("td",{children:"Flazasufuron"}),p("td",{children:"Fluazinam"}),p("td",{children:"Fluazifop-p-butyl"})]}
1),R("tr",{children:[p("td",{children:"Fludioxonil"}),p("td",{children:"Flufenoxuron"}),p("td",{children:"Flumioxazine"}),p("td",{children:"Fluopicolide"}),p("td",{children:"Fluopyram"}),p("td",{children:"Flurochloridone"})]}),R("tr",{children:[p("td",{children:"Flusilazole"}),p("td",{children:"Flutriafol"}),p("td",{children:"Fluxapyroxad"}),p("td",{children:"Folpel"}),p("td",{children:"Haloxafop-R-methyl"}),p("td",{children:"Hexaconazole"})]}),R("tr",{children:[p("td",{children:"Hexythiazox"}),p("td",{children:"Imazalil"}),p("td",{children:"Imidaclopride"}),p("td",{children:"Indoxacarbe"}),p("td",{children:"Iprodione"}),p("td",{children:"Iprovalicarb"})]}),R("tr",{children:[p("td",{children:"Isofetamide"}),p("td",{children:"Isoxaben"}),p("td",{children:"Kresoxim-methyl"}),p("td",{children:"Lindane"}),p("td",{children:"Lufenuron"}),p("td",{children:"Malathion"})]}),R("tr",{children:[p("td",{children:"Mandipropamide"}),p("td",{children:"Mepanipyrim"}),p("td",{children:"Metalaxyl (isomers)"}),p("td",{children:"Metrafenone"}),p("td",{children:"Metribuzin"}),p("td",{children:"Methoxyfenozide"})]}),R("tr",{children:[p("td",{children:"Myclobutanil"}),p("td",{children:"Napropamid"}),p("td",{children:"Oryzalin"}),p("td",{children:"Oxadiazon"}),p("td",{children:"Oxadixyl"}),p("td",{children:"Oxathiapiprolin"})]}),R("tr",{children:[p("td",{children:"Oxyfluorfen"}),p("td",{children:"Parathion-methyl"}),p("td",{children:"Penconazole"}),p("td",{children:"Pendimethaline"}),p("td",{children:"Penoxsulam"}),p("td",{children:"Phosmet"})]}),R("tr",{children:[p("td",{children:"Phthalimide"}),p("td",{children:"Piperonyl butoxide"}),p("td",{children:"Pirimicarb"}),p("td",{children:"Pirimiphos-methyl"}),p("td",{children:"Prochloraz"}),p("td",{children:"Procymidone"})]}),R("tr",{children:[p("td",{children:"Propaquizafop"}),p("td",{children:"Propargite"}),p("td",{children:"Propyzamide"}),p("td",{children:"Proquinazide"}),p("td",{children:"Prosulfocarb"}),p("td",{children:"Pyraclostrobine"})]}),R("tr",{children:[p("td",{children:"Pyraflufen-ethyl"}),p("td",{children:"Pyrethrins"}),p("td",{children:"Pyridaben"}),p("td",{children:"Pyrimethanil"}),p("td",{children:"Pyriofenone"}),p("td",{children:"Pyriproxyfen"})]}),R("tr",{children:[p("td",{children:"Quinoxyfen"}),p("td",{children:"Quizalifop-p-ethyl"}),p("td",{children:"S-Metalochlor"}),p("td",{children:"Spinetoram"}),p("td",{children:"Spinosad A+D"}),p("td",{children:"Spirodiclofen"})]}),R("tr",{children:[p("td",{children:"Spiroxamine"}),p("td",{children:"Tau-Fluvalinate"}),p("td",{children:"Tebuconazole"}),p("td",{children:"Tebufenozide"}),p("td",{children:"Tebufenpyrad"}),p("td",{children:"Teflubenzuron"})]}),R("tr",{children:[p("td",{children:"Terbuthylazine"}),p("td",{children:"Tetraconazole"}),p("td",{children:"Tetrahydrophthalimide"}),p("td",{children:"Thiabendazole"}),p("td",{children:"Thiametoxame"}),p("td",{children:"Thiophanate-methyl"})]}),R("tr",{children:[p("td",{children:"Tolclofos-methyl"}),p("td",{children:"Triadimefon"}),p("td",{children:"Triadimenol"}),p("td",{children:"Trifloxystrobin"}),p("td",{children:"Valifenalate"}),p("td",{children:"Vinchlozoline"})]}),R("tr",{children:[p("td",{children:"Zoxamide"}),p("td",{}),p("td",{}),p("td",{}),p("td",{}),p("td",{})]})]})})})]})}));var qT={container:"NMRPortal_container_1",cardsContainer:"NMRPortal_cardsContainer_7",quickActions:"NMRPortal_quickActions_14",signaturePreview:"NMRPortal_signaturePreview_19",chartContainer:"NMRPortal_chartContainer_24",chartHeader:"NMRPortal_chartHeader_31",icon:"NMRPortal_icon_38",chart:"NMRPortal_chart_24",samplesContainer:"NMRPortal_samplesContainer_56",header:"NMRPortal_header_62",mobileSamples:"NMRPortal_mobileSamples_87"};var WT={container:"NMRCard_container_1"};const VT=({amount:e,label:t,path:a,action:n,emphasize:i})=>{const r=f(),s=h(),o=A(s.breakpoints.up("lg"));return R("div",{className:WT.container,onClick:()=>{a?r(a):n&&n()},"is-focus":i?"true":"false",children:[p(Vt,{variant:o?"h4":"h5",className:WT.number,children:e}),t&&p($t,{variant:o?"standard":"p",children:t})]})},YT=[0,1,2,3,4],jT="#5E73EE",$T="#bdc6ef",QT="#3D679D",KT="#889DBC",XT={container:{width:"100%",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},chartContainer:{background:"white",borderRadius:"12px",position:"relative"},svgContainer:{width:"100%"},tooltip:{position:"absolute",background:"#2c3e50",color:"white",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",pointerEvents:"none",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.25)",maxWidth:"280px",transition:"opacity 0.15s"},tooltipTitle:{fontSize:"14px",marginBottom:"6px",fontWeight:600},tooltipContent:{color:"#a0aec0",margin:0,lineHeight:1.5,fontSize:"12px"},clickText:{color:"white",fontWeight:600},ppmValue:{color:"#68d391",fontWeight:500},intensityValue:{color:"#63b3ed",fontWeight:500},intensityValueSecondary:{color:"#3D679D",fontWeight:500},compoundLabel:{color:"#f6ad55",fontWeight:500,display:"block",marginTop:"4px"}};const ZT=function(e="Demo Sample - Merlot 2022"){const t=[],a=[{ppm:9.5,height:1.5,width:.05},{ppm:8.6,height:2.5,width:.08,label:"Malvidin"},{ppm:7.8,height:2,width:.06},{ppm:6.5,height:4,width:.1,label:"Epicatechin"},{ppm:5.2,height:6,width:.15},{ppm:4.5,height:5.5,width:.12},{ppm:3.8,height:8.5,width:.08},{ppm:3.65,height:9.2,width:.06},{ppm:2.5,height:2.5,width:.07},{ppm:1.2,height:4.5,width:.1,label:"Ethanol"},{ppm:.8,height:2,width:.06}];for(let n=10;n>=0;n-=.001){let e,i=.1+.15*Math.random();Math.random()<.05&&(i=-.05-.1*Math.random()),a.forEach((t=>{const a=Math.abs(n-t.ppm),r=t.height*Math.exp(-Math.pow(a/t.width,2));i+=r,"label"in t&&t.label&&a<.01&&r>1&&(e=t.label)}));const r={ppm:Math.round(1e3*n)/1e3,value:i};
1e&&(r.label=e),t.push(r)}return{baseline:{name:e,id:"DEMO-001",collectionDate:"2024-11-15"},comparison:null,regions:{aldehyde:{name:"Aldehyde",startPpm:10,endPpm:9.2,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{}},phenolic:{name:"Phenolic",startPpm:9.2,endPpm:5.5,magnification:1,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 242, 0.35)",subRegions:{color:{name:"Color",startPpm:9,endPpm:8.2,magnification:2,headerColor:"#6B7A8A",backgroundColor:"rgba(210, 220, 240, 0.5)"},freshness:{name:"Freshness",startPpm:8.2,endPpm:7.5,magnification:1.5,headerColor:"#7A8899",backgroundColor:"rgba(220, 228, 245, 0.4)"},body:{name:"Body",startPpm:7.5,endPpm:6.5,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)"},extraction:{name:"Extraction",startPpm:6.5,endPpm:5.5,magnification:1.2,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 242, 0.35)"}}},sugarGlycerol:{name:"Sugar / Glycerol",startPpm:5.5,endPpm:3,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{sugar:{name:"Sugar",startPpm:5.5,endPpm:4.2,magnification:1,headerColor:"#6B7A8A",backgroundColor:"rgba(210, 220, 240, 0.5)"},glycerol:{name:"Glycerol",startPpm:4.2,endPpm:3,magnification:1,headerColor:"#7A8899",backgroundColor:"rgba(220, 228, 245, 0.4)"}}},organicAminoAcids:{name:"Organic / Amino Acids",startPpm:3,endPpm:1.5,magnification:1,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 245, 0.35)",subRegions:{}},aliphatic:{name:"Aliphatic",startPpm:1.5,endPpm:.7,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{}}},spectrum:t}}();function JT({data:e=null,secondaryData:t=null,height:a=450,onRegionClick:n=null,focusRegion:i=null}){var r,s;const c=m.exports.useRef(null),d=m.exports.useRef(null),[u,h]=m.exports.useState({visible:!1,x:0,y:0,regionName:"",ppm:0,intensity:0,compoundLabel:null,chartType:"primary"}),v=e||ZT,g=null!==t,y=g?Math.max(a,600):a,b=m.exports.useMemo((()=>{var e,a,n,r,s,c,d,m;if(!i)return{regions:v.regions,ppmMin:.7,ppmMax:10,title:(null==(e=v.baseline)?void 0:e.name)||"NMR Spectrum",secondaryTitle:(null==(a=null==t?void 0:t.baseline)?void 0:a.name)||null,isSubRegionView:!1};const p=v.regions[i];if(!p)return console.warn(`focusRegion "${i}" not found in data.regions`),{regions:v.regions,ppmMin:.7,ppmMax:10,title:(null==(n=v.baseline)?void 0:n.name)||"NMR Spectrum",secondaryTitle:(null==(r=null==t?void 0:t.baseline)?void 0:r.name)||null,isSubRegionView:!1};const u=p.subRegions||{};return Object.keys(u).length>0?{regions:u,ppmMin:p.endPpm,ppmMax:p.startPpm,title:`${(null==(d=v.baseline)?void 0:d.name)||"NMR Spectrum"} â ${p.name}`,secondaryTitle:t?`${(null==(m=t.baseline)?void 0:m.name)||"Secondary"} â ${p.name}`:null,isSubRegionView:!0}:{regions:{[i]:l(o({},p),{subRegions:{}})},ppmMin:p.endPpm,ppmMax:p.startPpm,title:`${(null==(s=v.baseline)?void 0:s.name)||"NMR Spectrum"} â ${p.name}`,secondaryTitle:t?`${(null==(c=t.baseline)?void 0:c.name)||"Secondary"} â ${p.name}`:null,isSubRegionView:!0}}),[v,t,i]),_=m.exports.useMemo((()=>v.spectrum.filter((e=>e.ppm>=b.ppmMin&&e.ppm<=b.ppmMax)).sort(((e,t)=>t.ppm-e.ppm))),[v.spectrum,b.ppmMin,b.ppmMax]),N=m.exports.useMemo((()=>{if(!t)return[];return t.spectrum.filter((e=>e.ppm>=b.ppmMin&&e.ppm<=b.ppmMax)).sort(((e,t)=>t.ppm-e.ppm))}),[t,b.ppmMin,b.ppmMax]),f=e=>{const t=Object.entries(b.regions);return e.map((e=>{let a=1;for(let i=0;i<t.length;i++){const n=t[i][1];if(e.ppm<=n.startPpm&&e.ppm>=n.endPpm){a=n.magnification;break}}const n=Math.max(-.2,Math.min(4,e.value*a));return{ppm:e.ppm,value:n,label:e.label||null}}))},C=m.exports.useMemo((()=>f(_)),[_,b.regions]),S=m.exports.useMemo((()=>f(N)),[N,b.regions]);m.exports.useEffect((()=>{if(!c.current||!d.current)return;const e=d.current.clientWidth,a=y,i=46,r=30,s=60,m=e-s-r,p=a-i-45,u=g?20:0,f=g?(p-u)/2:p;Xe(c.current).selectAll("*").remove();const x=Xe(c.current).attr("width",e).attr("height",a),A=x.append("defs"),I=A.append("linearGradient").attr("id","primaryGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");I.append("stop").attr("offset","0%").attr("stop-color",jT),I.append("stop").attr("offset","100%").attr("stop-color",$T);const w=A.append("linearGradient").attr("id","secondaryGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");w.append("stop").attr("offset","0%").attr("stop-color",QT),w.append("stop").attr("offset","100%").attr("stop-color",KT);const T=Ze().domain([b.ppmMax,b.ppmMin]).range([0,m]);Ze().domain([-.2,4]).range([f,0]);
1const R=Object.entries(b.regions),k=Object.values(b.regions),E=function(e,t){const a=e-t;let n;n=a<=1?.1:a<=2?.2:a<=5?.5:1;const i=[];for(let r=Math.floor(e/n)*n;r>=t;r-=n)i.push(Math.round(10*r)/10);return i}(b.ppmMax,b.ppmMin),M=x.append("g");R.forEach((([e,t])=>{const a=s+T(t.startPpm),n=T(t.endPpm)-T(t.startPpm);M.append("rect").attr("x",a).attr("y",0).attr("width",n).attr("height",36).attr("fill",t.headerColor),M.append("text").attr("x",a+n/2).attr("y",19).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill","white").style("font-size","13px").style("font-weight","500").style("font-family","'Inter', system-ui, sans-serif").text(t.name)}));const D=(e,t,a,n,r,o)=>{const l=x.append("g").attr("transform",`translate(${s},${i+e})`),c=Ze().domain([-.2,4]).range([t,0]);l.selectAll(".region-background").data(k).enter().append("rect").attr("x",(e=>T(e.startPpm))).attr("y",0).attr("width",(e=>T(e.endPpm)-T(e.startPpm))).attr("height",t).attr("fill",(e=>e.backgroundColor)),R.forEach((([e,t])=>{if(t.magnification>1){const e=T(t.endPpm);l.append("text").attr("class","magnification-label").attr("x",e-8).attr("y",18).attr("text-anchor","end").attr("fill","#9ca3af").style("font-size","11px").style("font-weight","500").style("font-family","'Inter', system-ui, sans-serif").text(t.magnification+"x")}}));const d=Je(T).tickSize(-t).tickFormat((()=>"")).tickValues(E);l.append("g").attr("transform",`translate(0,${t})`).call(d).selectAll("line").attr("stroke","rgba(200, 200, 200, 0.3)");const p=et(c).tickSize(-m).tickFormat((()=>"")).tickValues(YT);l.append("g").call(p).selectAll("line").attr("stroke","rgba(200, 200, 200, 0.3)"),l.selectAll(".grid path").attr("stroke","none"),l.append("line").attr("x1",0).attr("x2",m).attr("y1",c(0)).attr("y2",c(0)).attr("stroke","rgba(100, 100, 100, 0.4)").attr("stroke-width",1),l.selectAll(".region-divider").data(k.slice(1)).enter().append("line").attr("x1",(e=>T(e.startPpm))).attr("x2",(e=>T(e.startPpm))).attr("y1",0).attr("y2",t).attr("stroke","rgba(100, 100, 100, 0.2)").attr("stroke-width",1).attr("stroke-dasharray","4, 4");const u=tt().x((e=>T(e.ppm))).y0(c(0)).y1((e=>c(e.value))).curve(at),h=nt().x((e=>T(e.ppm))).y((e=>c(e.value))).curve(at);l.append("path").datum(a).attr("d",u).attr("fill",`url(#${n})`).style("pointer-events","none");const v="secondary"===o?QT:jT;l.append("path").datum(a).attr("d",h).attr("fill","none").attr("stroke",v).attr("stroke-width",1).attr("stroke-opacity",.7).style("pointer-events","none"),l.append("text").attr("x",10).attr("y",25).attr("fill","#2d3748").style("font-size","15px").style("font-weight","600").style("font-family","'Inter', system-ui, sans-serif").text(r);const g=et(c).tickValues(YT);return l.append("g").call(g).selectAll("text").attr("fill","#888").style("font-size","11px"),l};D(0,f,C,"primaryGradient",b.title,"primary"),g&&S.length>0&&(x.append("line").attr("x1",s).attr("x2",e-r).attr("y1",i+f+u/2).attr("y2",i+f+u/2).attr("stroke","#e2e8f0").attr("stroke-width",2),D(f+u,f,S,"secondaryGradient",b.secondaryTitle||"Secondary Sample","secondary"));const P=g?p:f,L=x.append("line").attr("transform",`translate(${s},${i})`).attr("y1",0).attr("y2",P).attr("stroke","#8B3A3A").attr("stroke-width",1.5).attr("stroke-dasharray","4, 3").style("opacity",0).style("pointer-events","none"),B=!b.isSubRegionView&&n,O=(e,a,r,c)=>{x.append("g").attr("transform",`translate(${s},${i+e})`).selectAll(".region-overlay").data(R).enter().append("rect").attr("x",(e=>T(e[1].startPpm))).attr("y",0).attr("width",(e=>T(e[1].endPpm)-T(e[1].startPpm))).attr("height",a).attr("fill","transparent").style("cursor",B?"pointer":"crosshair").on("mouseenter",(()=>{L.style("opacity",1)})).on("mousemove",((e,t)=>{const a=t[1],n=d.current.getBoundingClientRect(),i=e.clientX-n.left-s,o=T(a.startPpm),l=T(a.endPpm),m=Math.max(o,Math.min(l,i));L.attr("x1",m).attr("x2",m);const p=T.invert(m),u=function(e,t){let a=null,n=1/0;for(let i=0;i<e.length;i++){const r=Math.abs(e[i].ppm-t);r<n&&(n=r,a=e[i])}return a}(c,p);let v=e.clientX-n.left+15;const g=e.clientY-n.top-10;v+280>n.width-20&&(v=e.clientX-n.left-295),h({visible:!0,x:v,y:g,regionName:a.name,ppm:p,intensity:(null==u?void 0:u.value)||0,compoundLabel:(null==u?void 0:u.label)||null,chartType:r})})).on("mouseleave",(()=>{L.style("opacity",0),h((e=>l(o({},e),{visible:!1})))})).on("click",((e,a)=>{if(B&&n){const e=a[0],i=a[1],s=function(e,t,a){return e.filter((e=>e.ppm<=t&&e.ppm>=a))}(("primary"===r?v:t).spectrum,i.startPpm,i.endPpm);n(e,i,s,r)}}))};O(0,f,"primary",_),g&&O(f+u,f,"secondary",N);const F=g?i+2*f+u:i+f,H=Je(T).tickValues(E);x.append("g").attr("transform",`translate(${s},${F})`).call(H).selectAll("text").attr("fill","#888").style("font-size","11px"),x.append("text").attr("x",s+m/2).attr("y",a-8).attr("text-anchor","middle").attr("fill","#718096").style("font-size","12px").text("Chemical Shift (ppm)");
1const U=g?i+p/2:i+f/2;x.append("text").attr("transform","rotate(-90)").attr("x",-U).attr("y",18).attr("text-anchor","middle").attr("fill","#718096").style("font-size","12px").text("Intensity")}),[v,t,b,C,S,y,g,n,_,N]);const x=b.isSubRegionView?null:"Click to drill down into sub-regions",A=g?"primary"===u.chartType?null==(r=v.baseline)?void 0:r.name:null==(s=null==t?void 0:t.baseline)?void 0:s.name:null;return p("div",{style:XT.container,children:R("div",{style:XT.chartContainer,ref:d,children:[p("div",{style:l(o({},XT.svgContainer),{height:`${y}px`}),children:p("svg",{ref:c,style:{width:"100%",height:"100%"}})}),R("div",{style:l(o({},XT.tooltip),{left:u.x,top:u.y,opacity:u.visible?1:0}),children:[R("div",{style:XT.tooltipTitle,children:[u.regionName,A&&R("span",{style:{fontWeight:400,color:"#a0aec0"},children:[" â ",A]})]}),R("div",{style:XT.tooltipContent,children:["PPM: ",p("span",{style:XT.ppmValue,children:u.ppm.toFixed(3)}),p("br",{}),"Intensity: ",p("span",{style:"secondary"===u.chartType?XT.intensityValueSecondary:XT.intensityValue,children:u.intensity.toFixed(4)}),u.compoundLabel&&p("span",{style:XT.compoundLabel,children:u.compoundLabel}),x&&R(k,{children:[p("br",{}),p("br",{}),p("em",{style:XT.clickText,children:x})]})]})]})]})})}const eR={container:{width:"100%",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",justifyItems:"center"},chartContainer:{position:"relative",width:"fit-content"},svgContainer:{width:"100%",maxWidth:"fit-content"},tooltip:{position:"absolute",background:"#2c3e50",color:"white",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",pointerEvents:"none",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.25)",maxWidth:"280px",transition:"opacity 0.15s"},tooltipTitle:{fontSize:"14px",marginBottom:"6px",fontWeight:600},tooltipContent:{color:"#a0aec0",margin:0,lineHeight:1.5,fontSize:"12px"}};function tR({percentage:e=0,description:t="",height:a=200}){const n=m.exports.useRef(null),i=m.exports.useRef(null),r=-2*Math.PI,s=0!==e?e/100*r:0;return m.exports.useEffect((()=>{if(!n.current||!i.current)return;const t=i.current.clientWidth,o=a,l=o/2-15,c=.7*l;Xe(n.current).selectAll("*").remove();const d=Xe(n.current).attr("width",t).attr("height",o),m=d.append("g").attr("transform","translate("+t/2+","+o/2+")");let p=1.75*Math.PI,u="#000000";var h=d.append("filter").attr("id","dropshadow").attr("x",1*Math.cos(p)-1.5).attr("y",-1.5-1*Math.sin(p)).attr("width",4).attr("height",4).attr("filterUnits","objectBoundingBox");h.append("feGaussianBlur").attr("in","SourceAlpha").attr("stdDeviation",2).attr("result","blur"),h.append("feOffset").attr("in","blur").attr("dx",7*Math.cos(p)).attr("dy",7*-Math.sin(p)).attr("result","offsetBlur"),h.append("feFlood").attr("in","offsetBlur").attr("flood-color",u).attr("flood-opacity",.25).attr("result","offsetColor"),h.append("feComposite").attr("in","offsetColor").attr("in2","offsetBlur").attr("operator","in").attr("result","offsetBlur");var v=h.append("feMerge");v.append("feMergeNode").attr("in","offsetBlur"),v.append("feMergeNode").attr("in","SourceGraphic");var g=d.append("filter").attr("id","dropshadowouter").attr("x",1*Math.cos(p)-1.5).attr("y",-1.5-1*Math.sin(p)).attr("width",4).attr("height",4).attr("filterUnits","objectBoundingBox");g.append("feGaussianBlur").attr("in","SourceAlpha").attr("stdDeviation",5).attr("result","blur"),g.append("feOffset").attr("in","blur").attr("dx",7*Math.cos(p)).attr("dy",7*-Math.sin(p)).attr("result","offsetBlur"),g.append("feFlood").attr("in","offsetBlur").attr("flood-color",u).attr("flood-opacity",.4).attr("result","offsetColor"),g.append("feComposite").attr("in","offsetColor").attr("in2","offsetBlur").attr("operator","in").attr("result","offsetBlur");var y=g.append("feMerge");y.append("feMergeNode").attr("in","offsetBlur"),y.append("feMergeNode").attr("in","SourceGraphic");const b=it().innerRadius(c).outerRadius(l).startAngle(0),_=it().innerRadius(c).outerRadius(l).startAngle(0),N=it().innerRadius(0).outerRadius(.8*l).startAngle(0);m.append("path").datum({endAngle:r}).style("fill","#edeef1").attr("filter","url(#dropshadowouter)").attr("d",_),m.append("path").datum({endAngle:0*r}).style("fill","#5160EB").attr("d",b).attr("id","percentageGaugeArc"),m.append("path").datum({endAngle:r}).style("fill","#FFFFFF").attr("filter","url(#dropshadow)").attr("d",N),m.append("text").style("fill","#60666fff").style("font-size","2.1em").style("font-weight","600").attr("text-anchor","middle").attr("dy","0.35em").text(`${e}`),d.selectAll("#percentageGaugeArc").transition().duration(2e3).attrTween("d",(function(e,t){var a=rt(0,s),n=it().innerRadius(c).outerRadius(l).startAngle(0).endAngle(0);return function(e){return n.endAngle(a(e)),n()}}))}),[e,t]),p("div",{style:eR.container,children:p("div",{style:eR.chartContainer,ref:i,children:p("div",{style:l(o({},eR.svgContainer),{height:`${a+20}px`,maxWidth:"fit-content"}),children:p("svg",{ref:n,style:{width:"100%",height:"100%",maxWidth:"230px"}})})})})}const aR=[-6,-4,-2,0,2,4,6],nR={container:{width:"100%",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},chartContainer:{background:"white",borderRadius:"12px",position:"relative"}
1,legend:{display:"flex",gap:"24px",marginBottom:"16px",padding:"12px 16px",background:"#f8fafc",borderRadius:"8px"},legendItem:{display:"flex",alignItems:"center",gap:"8px",fontSize:"13px",color:"#4a5568"},legendColorPositive:{width:"16px",height:"16px",borderRadius:"3px",background:"linear-gradient(180deg, #5E73EE 0%, #bdc6ef 100%)"},legendColorNegative:{width:"16px",height:"16px",borderRadius:"3px",background:"linear-gradient(0deg, #D56C49 0%, #e8c4b8 100%)"},svgContainer:{width:"100%"},tooltip:{position:"absolute",background:"#2c3e50",color:"white",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",pointerEvents:"none",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.25)",maxWidth:"300px",transition:"opacity 0.15s"},tooltipTitle:{fontSize:"14px",marginBottom:"6px",fontWeight:600},tooltipContent:{color:"#a0aec0",margin:0,lineHeight:1.5,fontSize:"12px"},clickText:{color:"white",fontWeight:600},ppmValue:{color:"#68d391",fontWeight:500},positiveValue:{color:"#63b3ed",fontWeight:500},negativeValue:{color:"#fc8181",fontWeight:500},compoundLabel:{color:"#f6ad55",fontWeight:500,display:"block",marginTop:"4px"}};const iR=function(){const e=[],t=[{ppm:9.5,height:.25,width:.05,direction:1},{ppm:8.6,height:.4,width:.08,direction:1,label:"Malvidin"},{ppm:7.8,height:-.35,width:.06,direction:-1},{ppm:6.5,height:.5,width:.1,direction:1,label:"Epicatechin"},{ppm:5.2,height:-.6,width:.15,direction:-1},{ppm:4.5,height:.55,width:.12,direction:1},{ppm:3.8,height:-.4,width:.08,direction:-1},{ppm:2.5,height:.35,width:.07,direction:1},{ppm:1.2,height:-.5,width:.1,direction:-1,label:"Ethanol"},{ppm:.8,height:.3,width:.06,direction:1}];for(let a=10;a>=0;a-=.001){let n,i=.04*(Math.random()-.5);t.forEach((e=>{const t=Math.abs(a-e.ppm),r=e.height*Math.exp(-Math.pow(t/e.width,2));i+=r,"label"in e&&e.label&&t<.01&&Math.abs(r)>.2&&(n=e.label)})),i=Math.max(-1,Math.min(1,i));const r={ppm:Math.round(1e3*a)/1e3,value:i};n&&(r.label=n),e.push(r)}return{baseline:{name:"Merlot 2022",id:"SA-2024-001",collectionDate:"2024-11-15"},comparison:{name:"Cabernet Sauvignon 2022",id:"SA-2024-002",collectionDate:"2024-11-18"},regions:{aldehyde:{name:"Aldehyde",startPpm:10,endPpm:9.2,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{}},phenolic:{name:"Phenolic",startPpm:9.2,endPpm:5.5,magnification:30,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 242, 0.35)",subRegions:{color:{name:"Color",startPpm:9,endPpm:8.2,magnification:1,headerColor:"#6B7A8A",backgroundColor:"rgba(210, 220, 240, 0.5)"},freshness:{name:"Freshness",startPpm:8.2,endPpm:7.5,magnification:1,headerColor:"#7A8899",backgroundColor:"rgba(220, 228, 245, 0.4)"},body:{name:"Body",startPpm:7.5,endPpm:6.5,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)"},extraction:{name:"Extraction",startPpm:6.5,endPpm:5.5,magnification:1,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 242, 0.35)"}}},sugarGlycerol:{name:"Sugar / Glycerol",startPpm:5.5,endPpm:3,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{sugar:{name:"Sugar",startPpm:5.5,endPpm:4.2,magnification:1,headerColor:"#6B7A8A",backgroundColor:"rgba(210, 220, 240, 0.5)"},glycerol:{name:"Glycerol",startPpm:4.2,endPpm:3,magnification:1,headerColor:"#7A8899",backgroundColor:"rgba(220, 228, 245, 0.4)"}}},organicAminoAcids:{name:"Organic / Amino Acids",startPpm:3,endPpm:1.5,magnification:1,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 245, 0.35)",subRegions:{}},aliphatic:{name:"Aliphatic",startPpm:1.5,endPpm:.7,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{}}},spectrum:e}}();function rR({data:e=null,height:t=500,onRegionClick:a=null,focusRegion:n=null}){var i,r,s,c;const d=m.exports.useRef(null),u=m.exports.useRef(null),[h,v]=m.exports.useState({visible:!1,x:0,y:0,regionName:"",ppm:0,value:0,compoundLabel:null}),g=e||iR,y=m.exports.useMemo((()=>{var e,t,a,i,r,s,c,d;if(!n)return{regions:g.regions,ppmMin:.7,ppmMax:10,title:`${(null==(e=g.baseline)?void 0:e.name)||"Baseline"} vs ${(null==(t=g.comparison)?void 0:t.name)||"Comparison"}`,isSubRegionView:!1};const m=g.regions[n];if(!m)return console.warn(`focusRegion "${n}
1" not found in data.regions`),{regions:g.regions,ppmMin:.7,ppmMax:10,title:`${(null==(a=g.baseline)?void 0:a.name)||"Baseline"} vs ${(null==(i=g.comparison)?void 0:i.name)||"Comparison"}`,isSubRegionView:!1};const p=m.subRegions||{};return Object.keys(p).length>0?{regions:p,ppmMin:m.endPpm,ppmMax:m.startPpm,title:`${(null==(c=g.baseline)?void 0:c.name)||"Baseline"} vs ${(null==(d=g.comparison)?void 0:d.name)||"Comparison"} â ${m.name}`,isSubRegionView:!0}:{regions:{[n]:l(o({},m),{subRegions:{}})},ppmMin:m.endPpm,ppmMax:m.startPpm,title:`${(null==(r=g.baseline)?void 0:r.name)||"Baseline"} vs ${(null==(s=g.comparison)?void 0:s.name)||"Comparison"} â ${m.name}`,isSubRegionView:!0}}),[g,n]),b=m.exports.useMemo((()=>g.spectrum.filter((e=>e.ppm>=y.ppmMin&&e.ppm<=y.ppmMax)).sort(((e,t)=>t.ppm-e.ppm))),[g.spectrum,y.ppmMin,y.ppmMax]),_=m.exports.useMemo((()=>{const e=Object.entries(y.regions);return b.map((t=>{let a=1;for(let i=0;i<e.length;i++){const n=e[i][1];if(t.ppm<=n.startPpm&&t.ppm>=n.endPpm){a=n.magnification;break}}let n=t.value*a;return n=Math.max(-6,Math.min(6,n)),{ppm:t.ppm,value:n,label:t.label||null}}))}),[b,y.regions]);m.exports.useEffect((()=>{if(!d.current||!u.current)return;const e=u.current.clientWidth,n=t,i=46,r=60,s=e-r-30,c=n-i-45;Xe(d.current).selectAll("*").remove();const m=Xe(d.current).attr("width",e).attr("height",n),p=m.append("defs"),h=p.append("linearGradient").attr("id","positiveGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");h.append("stop").attr("offset","0%").attr("stop-color","#5E73EE"),h.append("stop").attr("offset","100%").attr("stop-color","#bdc6ef");const N=p.append("linearGradient").attr("id","negativeGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");N.append("stop").attr("offset","0%").attr("stop-color","#fb7878"),N.append("stop").attr("offset","100%").attr("stop-color","#a50841");const f=m.append("g").attr("transform",`translate(${r},${i})`),C=Ze().domain([y.ppmMax,y.ppmMin]).range([0,s]),S=Ze().domain([-6.05,6.05]).range([c,0]),x=Object.entries(y.regions),A=Object.values(y.regions),I=m.append("g");x.forEach((([e,t])=>{const a=r+C(t.startPpm),n=C(t.endPpm)-C(t.startPpm);I.append("rect").attr("x",a).attr("y",0).attr("width",n).attr("height",36).attr("fill",t.headerColor),I.append("text").attr("x",a+n/2).attr("y",19).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill","white").style("font-size","13px").style("font-weight","500").style("font-family","'Inter', system-ui, sans-serif").text(t.name)})),f.selectAll(".region-background").data(A).enter().append("rect").attr("x",(e=>C(e.startPpm))).attr("y",0).attr("width",(e=>C(e.endPpm)-C(e.startPpm))).attr("height",c).attr("fill",(e=>e.backgroundColor)),x.forEach((([e,t])=>{if(t.magnification>1){const e=C(t.endPpm);f.append("text").attr("class","magnification-label").attr("x",e-8).attr("y",18).attr("text-anchor","end").attr("fill","#9ca3af").style("font-size","11px").style("font-weight","500").style("font-family","'Inter', system-ui, sans-serif").text(t.magnification+"x")}}));const w=function(e,t){const a=e-t;let n;n=a<=1?.1:a<=2?.2:a<=5?.5:1;const i=[];for(let r=Math.floor(e/n)*n;r>=t;r-=n)i.push(Math.round(10*r)/10);return i}(y.ppmMax,y.ppmMin),T=Je(C).tickSize(-c).tickFormat((()=>"")).tickValues(w);f.append("g").attr("transform",`translate(0,${c})`).call(T).selectAll("line").attr("stroke","rgba(200, 200, 200, 0.3)");const R=et(S).tickSize(-s).tickFormat((()=>"")).tickValues(aR);f.append("g").call(R).selectAll("line").attr("stroke",(e=>0===e?"rgba(100, 100, 100, 0.5)":"rgba(200, 200, 200, 0.3)")).attr("stroke-width",(e=>0===e?1.5:1)),f.selectAll(".grid path").attr("stroke","none"),f.selectAll(".region-divider").data(A.slice(1)).enter().append("line").attr("x1",(e=>C(e.startPpm))).attr("x2",(e=>C(e.startPpm))).attr("y1",0).attr("y2",c).attr("stroke","rgba(100, 100, 100, 0.2)").attr("stroke-width",1).attr("stroke-dasharray","4, 4");const k=tt().x((e=>C(e.ppm))).y0(S(0)).y1((e=>S(Math.max(0,e.value)))).curve(at),E=tt().x((e=>C(e.ppm))).y0(S(0)).y1((e=>S(Math.min(0,e.value)))).curve(at),M=nt().x((e=>C(e.ppm))).y((e=>S(Math.max(0,e.value)))).curve(at),D=nt().x((e=>C(e.ppm))).y((e=>S(Math.min(0,e.value)))).curve(at);f.append("path").datum(_).attr("d",k).attr("fill","url(#positiveGradient)").style("pointer-events","none"),f.append("path").datum(_).attr("d",E).attr("fill","url(#negativeGradient)").style("pointer-events","none"),f.append("path").datum(_).attr("d",M).attr("fill","none").attr("stroke","#5E73EE").attr("stroke-width",1).attr("stroke-opacity",.7).style("pointer-events","none"),f.append("path").datum(_).attr("d",D).attr("fill","none").attr("stroke","#a50841").attr("stroke-width",1).attr("stroke-opacity",.7).style("pointer-events","none"),f.append("text").attr("x",10).attr("y",25).attr("fill","#2d3748").style("font-size","15px").style("font-weight","600").style("font-family","'Inter', system-ui, sans-serif").text(y.title);const P=f.append("line").attr("y1",0).attr("y2",c).attr("stroke","#8B3A3A").attr("stroke-width",1.5).attr("stroke-dasharray","4, 3").style("opacity",0).style("pointer-events","none"),L=!y.isSubRegionView&&a;f.selectAll(".region-overlay").data(x).enter().append("rect").attr("x",(e=>C(e[1].startPpm))).attr("y",0).attr("width",(e=>C(e[1].endPpm)-C(e[1].startPpm))).attr("height",c).attr("fill","transparent").style("cursor",L?"pointer":"crosshair").on("mouseenter",(()=>{P.style("opacity",1)})).on("mousemove",((e,t)=>
1{const a=t[1],n=u.current.getBoundingClientRect(),i=e.clientX-n.left-r,s=C(a.startPpm),o=C(a.endPpm),l=Math.max(s,Math.min(o,i));P.attr("x1",l).attr("x2",l);const c=C.invert(l),d=function(e,t){let a=null,n=1/0;for(let i=0;i<e.length;i++){const r=Math.abs(e[i].ppm-t);r<n&&(n=r,a=e[i])}return a}(b,c);let m=e.clientX-n.left+15;const p=e.clientY-n.top-10;m+300>n.width-20&&(m=e.clientX-n.left-315),v({visible:!0,x:m,y:p,regionName:a.name,ppm:c,value:(null==d?void 0:d.value)||0,compoundLabel:(null==d?void 0:d.label)||null})})).on("mouseleave",(()=>{P.style("opacity",0),v((e=>l(o({},e),{visible:!1})))})).on("click",((e,t)=>{if(L&&a){const e=t[0],n=t[1],i=function(e,t,a){return e.filter((e=>e.ppm<=t&&e.ppm>=a))}(g.spectrum,n.startPpm,n.endPpm);a(e,n,i)}}));const B=Je(C).tickValues(w);f.append("g").attr("transform",`translate(0,${c})`).call(B).selectAll("text").attr("fill","#888").style("font-size","11px");const O=et(S).tickValues(aR);f.append("g").call(O).selectAll("text").attr("fill","#888").style("font-size","11px"),f.selectAll(".axis path, .axis line").attr("stroke","#ddd"),m.append("text").attr("x",r+s/2).attr("y",n-8).attr("text-anchor","middle").attr("fill","#718096").style("font-size","12px").text("Chemical Shift (ppm)"),m.append("text").attr("transform","rotate(-90)").attr("x",-(i+c/2)).attr("y",18).attr("text-anchor","middle").attr("fill","#718096").style("font-size","12px").text("Difference")}),[g,y,_,b,t,a]);const N=y.isSubRegionView?null:"Click to drill down into sub-regions",f=h.value>=0?`(higher in ${(null==(i=g.comparison)?void 0:i.name)||"Comparison"})`:`(higher in ${(null==(r=g.baseline)?void 0:r.name)||"Baseline"})`;return R("div",{style:nR.container,children:[R("div",{style:nR.legend,children:[R("div",{style:nR.legendItem,children:[p("div",{style:nR.legendColorPositive}),R("span",{children:["Higher in ",p("strong",{children:(null==(s=g.comparison)?void 0:s.name)||"Comparison"})]})]}),R("div",{style:nR.legendItem,children:[p("div",{style:nR.legendColorNegative}),R("span",{children:["Higher in ",p("strong",{children:(null==(c=g.baseline)?void 0:c.name)||"Baseline"})]})]})]}),R("div",{style:nR.chartContainer,ref:u,children:[p("div",{style:l(o({},nR.svgContainer),{height:`${t}px`}),children:p("svg",{ref:d,style:{width:"100%",height:"100%"}})}),R("div",{style:l(o({},nR.tooltip),{left:h.x,top:h.y,opacity:h.visible?1:0}),children:[p("div",{style:nR.tooltipTitle,children:h.regionName}),R("div",{style:nR.tooltipContent,children:["PPM: ",p("span",{style:nR.ppmValue,children:h.ppm.toFixed(3)}),p("br",{}),"Difference: ",R("span",{style:h.value>=0?nR.positiveValue:nR.negativeValue,children:[h.value>=0?"+":"",h.value.toFixed(4)]}),p("br",{}),p("span",{style:{fontSize:"11px",color:"#718096"},children:f}),h.compoundLabel&&p("span",{style:nR.compoundLabel,children:h.compoundLabel}),N&&R(k,{children:[p("br",{}),p("br",{}),p("em",{style:nR.clickText,children:N})]})]})]})]})]})}const sR="#5E73EE",oR="#bdc6ef",lR="#5E73EE",cR="#bdc6ef",dR="#fb7878",mR="#a50841",pR={container:{width:"100%",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},chartContainer:{background:"white",borderRadius:"12px",padding:"20px",position:"relative"},chartHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px",flexWrap:"wrap",gap:"12px"},chartHeaderLeft:{display:"flex",alignItems:"center",gap:"16px"},viewToggle:{display:"flex",background:"#f1f5f9",borderRadius:"8px",padding:"4px",gap:"4px"},viewToggleBtn:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",border:"none",background:"transparent",borderRadius:"6px",fontSize:"13px",fontWeight:500,color:"#64748b",cursor:"pointer",transition:"all 0.2s ease",fontFamily:"inherit"},viewToggleBtnActive:{background:"white",color:"#1e3a5f",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},svgContainer:{width:"100%"},chartFooter:{marginTop:"16px",paddingTop:"16px",borderTop:"1px solid #e2e8f0",textAlign:"center"},clickHint:{fontSize:"12px",color:"#94a3b8"},tooltip:{position:"absolute",background:"#1e293b",color:"white",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",pointerEvents:"none",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.25)",maxWidth:"280px",transition:"opacity 0.15s"},tooltipTitle:{fontSize:"14px",marginBottom:"8px",fontWeight:600},tooltipDate:{margin:0,lineHeight:1.5,color:"#94a3b8"},tooltipSimilarity:{fontSize:"18px",fontWeight:700,margin:"8px 0",color:"#5E73EE"},tooltipLabel:{margin:0,color:"#94a3b8"},modalOverlay:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.5)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center"},modalContent:{background:"white",borderRadius:"16px",width:"92%",maxWidth:"1000px",maxHeight:"85vh",overflow:"auto",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.3)"},modalHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"20px 24px",borderBottom:"1px solid #e2e8f0",gap:"16px",flexWrap:"wrap"},modalHeaderLeft:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap"},modalHeaderRight:{display:"flex",alignItems:"center",gap:"12px"},modalTitle:{fontSize:"18px",color:"#1e3a5f",fontWeight:600,margin:0},modalSubtitle:{fontSize:"13px",color:"#64748b",fontWeight:400},modalClose:{background:"none",border:"none",fontSize:"24px",color:"#64748b",cursor:"pointer",padding:"4px 8px",borderRadius:"4px",lineHeight:1,fontFamily:"inherit"},modalBody:{padding:"24px"},backButton:{display:"flex",alignItems:"center",gap:"4px",padding:"6px 12px",border:"1px solid #e2e8f0",background:"#f8fafc",borderRadius:"6px",fontSize:"13px",fontWeight:500,color:"#64748b",cursor:"pointer",fontFamily:"inherit"}},uR=R("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),p("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),p("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),hR=R("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p("polyline",{points:"15 3 21 3 21 9"}),p("polyline",{points:"9 21 3 21 3 15"}),p("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),p("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),vR=R("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p("rect",{x:"3",y:"3",width:"7",height:"7"}),p("rect",{x:"14",y:"3",width:"7",height:"7"}),p("rect",{x:"14",y:"14",width:"7",height:"7"}),p("rect",{x:"3",y:"14",width:"7",height:"7"})]}),gR=p("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})});function yR(e){const t=[],a=[{ppm:9.7,height:.8,width:.04},{ppm:8.5,height:1.2,width:.08},{ppm:7.2,height:1.5,width:.1},{ppm:6,height:2,width:.12},{ppm:4.8,height:3.2,width:.08},{ppm:4.2,height:2.8,width:.06},{ppm:3.6,height:3.8,width:.05},{ppm:2.5,height:1.8,width:.08},{ppm:1.8,height:2.2,width:.1},{ppm:1.2,height:1.5,width:.07}],n=function(e){let t=e;return()=>(t=(9301*t+49297)%233280,t/233280)}(e);for(let i=10;i>=.7;i-=.01){let e=.05+.08*n();a.forEach((t=>{const a=Math.abs(i-t.ppm),r=.9+.2*n();e+=t.height*r*Math.exp(-Math.pow(a/t.width,2))})),t.push({ppm:Math.round(100*i)/100,value:Math.max(-.2,Math.min(4,e))})}return t}const bR=function(){const e={oxidation:{name:"Oxidation",startPpm:10,endPpm:9.5,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{}},phenolics:{name:"Phenolics and Tannins",startPpm:9.5,endPpm:5.5,magnification:1,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 242, 0.35)",subRegions:{color:{name:"Color",startPpm:9,endPpm:8.2,magnification:1,headerColor:"#6B7A8A",backgroundColor:"rgba(210, 220, 240, 0.5)"},tannins:{name:"Tannins",startPpm:8.2,endPpm:6.5,magnification:1,headerColor:"#7A8899",backgroundColor:"rgba(220, 228, 245, 0.4)"},extraction:{name:"Extraction",startPpm:6.5,endPpm:5.5,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)"}}},sugarsAlcohols:{name:"Sugars and Alcohols",startPpm:5.5,endPpm:3,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{sugar:{name:"Sugar",startPpm:5.5,endPpm:4.2,magnification:1,headerColor:"#6B7A8A",backgroundColor:"rgba(210, 220, 240, 0.5)"},alcohols:{name:"Alcohols",startPpm:4.2,endPpm:3,magnification:1,headerColor:"#7A8899",backgroundColor:"rgba(220, 228, 245, 0.4)"}}},organicAcids:{name:"Organic Acid Profile",startPpm:3,endPpm:2,magnification:1,headerColor:"#8899A8",backgroundColor:"rgba(225, 232, 245, 0.35)",subRegions:{}},fermentation:{name:"Fermentation Fingerprint",startPpm:2,endPpm:.7,magnification:1,headerColor:"#5A6B7A",backgroundColor:"rgba(200, 215, 235, 0.5)",subRegions:{}}},t={name:"Opus One 2019 - Lot A",id:"4440",collectionDate:"2023-12-30"},a=yR(12345),n=[{name:"Distribution Point A",id:"4485",date:"2024-01-13",similarity:98.5,seed:13345},{name:"Distribution Point B",id:"4486",date:"2024-01-31",similarity:97.8,seed:14345},{name:"Warehouse Check C",id:"4492",date:"2024-03-16",similarity:84.2,seed:15345},{name:"Distribution Point D",id:"4501",date:"2024-04-03",similarity:99.1,seed:16345}
1,{name:"Retail Location E",id:"4512",date:"2024-05-20",similarity:91.3,seed:17345},{name:"Final Inspection F",id:"4520",date:"2024-06-08",similarity:98.9,seed:18345}].map((n=>{const i=yR(n.seed),r=function(e,t){return e.map(((e,a)=>({ppm:e.ppm,value:Math.max(-6,Math.min(6,e.value-t[a].value))})))}(i,a);return{sample:{name:n.name,id:n.id,collectionDate:n.date},similarityIndex:n.similarity,spectrumData:{baseline:{name:n.name,id:n.id,collectionDate:n.date},comparison:null,regions:e,spectrum:i},comparisonData:{baseline:{name:t.name,id:t.id,collectionDate:t.collectionDate},comparison:{name:n.name,id:n.id,collectionDate:n.date},regions:e,spectrum:r}}}));return{baseline:{name:t.name,id:t.id,collectionDate:t.collectionDate,spectrumData:{baseline:t,comparison:null,regions:e,spectrum:a}},comparisons:n,regions:e}}();function _R({data:e=null,onSampleClick:t=null,onViewChange:a=null}){var n;const i=m.exports.useRef(null),r=m.exports.useRef(null),[s,c]=m.exports.useState("individual"),[d,u]=m.exports.useState("compact"),[h,v]=m.exports.useState({visible:!1,x:0,y:0,name:"",date:"",isBaseline:!1,similarityIndex:null}),[g,y]=m.exports.useState(!1),[b,_]=m.exports.useState(null),[N,f]=m.exports.useState("individual"),[C,S]=m.exports.useState(null),[x,A]=m.exports.useState(0),I=e||bR,w=m.exports.useMemo((()=>[{id:I.baseline.id||"baseline",name:I.baseline.name,collectionDate:I.baseline.collectionDate,isBaseline:!0,similarityIndex:null,spectrum:I.baseline.spectrumData.spectrum,differenceSpectrum:null,spectrumData:I.baseline.spectrumData,comparisonData:null},...I.comparisons.slice().sort(((e,t)=>new Date(e.sample.collectionDate).getTime()-new Date(t.sample.collectionDate).getTime())).map((e=>({id:e.sample.id||e.sample.name,name:e.sample.name,collectionDate:e.sample.collectionDate,isBaseline:!1,similarityIndex:e.similarityIndex,spectrum:e.spectrumData.spectrum,differenceSpectrum:e.comparisonData.spectrum,spectrumData:e.spectrumData,comparisonData:e.comparisonData})))]),[I]),T=m.exports.useCallback((e=>{e!==s&&(c(e),null==a||a({chartView:e,sizeView:d}))}),[s,d,a]),k=m.exports.useCallback((e=>{e!==d&&(u(e),null==a||a({chartView:s,sizeView:e}))}),[s,d,a]),E=m.exports.useCallback(((e,a=null)=>{const n={name:e.name,id:e.id,collectionDate:e.collectionDate,isBaseline:e.isBaseline,similarityIndex:e.similarityIndex,regionKey:a};t?t(n):(_(e),f(s),S(a),y(!0))}),[s,t]),M=m.exports.useCallback((e=>{S(e)}),[]),D=m.exports.useCallback((e=>{f(e),S(null)}),[]);m.exports.useEffect((()=>{if(!i.current||!r.current)return;const e=i.current.parentElement,t=(null==e?void 0:e.clientWidth)||r.current.clientWidth;if(0===t)return;const a="expanded"===d,n=a?240:120,c=a?20:8,m=42,p=40,u=230,h=t-u-20,g=n+8,y=m+w.length*n+8*(w.length-1)+p;Xe(i.current).selectAll("*").remove();const b=Xe(i.current).attr("width",t).attr("height",y),_=b.append("defs"),N=_.append("linearGradient").attr("id","tl-spectrumGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");N.append("stop").attr("offset","0%").attr("stop-color",sR),N.append("stop").attr("offset","100%").attr("stop-color",oR);const f=_.append("linearGradient").attr("id","tl-positiveGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");f.append("stop").attr("offset","0%").attr("stop-color",lR),f.append("stop").attr("offset","100%").attr("stop-color",cR);const C=_.append("linearGradient").attr("id","tl-negativeGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");C.append("stop").attr("offset","0%").attr("stop-color",dR),C.append("stop").attr("offset","100%").attr("stop-color",mR);const S=Ze().domain([10,.7]).range([0,h]),x=Object.entries(I.regions);x.forEach((([,e],t)=>{_.append("clipPath").attr("id",`tl-region-clip-${t}`).append("rect").attr("x",S(e.startPpm)).attr("y",0).attr("width",S(e.endPpm)-S(e.startPpm)).attr("height",n)})),x.forEach((([,e])=>{const t=u+S(e.startPpm),a=S(e.endPpm)-S(e.startPpm);b.append("rect").attr("x",t).attr("y",0).attr("width",a).attr("height",32).attr("fill",e.headerColor),b.append("text").attr("x",t+a/2).attr("y",17).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill","white").style("font-size","11px").style("font-weight","500").style("font-family","'Inter', system-ui, sans-serif").text(e.name)}
1));const A=e=>({line:nt().x((e=>S(e.ppm))).y((t=>e(t.value))).curve(at),area:tt().x((e=>S(e.ppm))).y0(e(0)).y1((t=>e(t.value))).curve(at),positiveArea:tt().x((e=>S(e.ppm))).y0(e(0)).y1((t=>e(Math.max(0,t.value)))).curve(at),negativeArea:tt().x((e=>S(e.ppm))).y0(e(0)).y1((t=>e(Math.min(0,t.value)))).curve(at),positiveLine:nt().x((e=>S(e.ppm))).y((t=>e(Math.max(0,t.value)))).curve(at),negativeLine:nt().x((e=>S(e.ppm))).y((t=>e(Math.min(0,t.value)))).curve(at)}),T=.05,R=50,k=m+n/2,M=m+(w.length-1)*g+n/2;b.append("line").attr("x1",R).attr("x2",R).attr("y1",k).attr("y2",M).attr("stroke","#5E73EE").attr("stroke-width",2),w.forEach(((e,t)=>{const i=m+t*g,r=i+n/2,o=b.append("g").attr("transform",`translate(0,${i})`);x.forEach((([,e])=>{o.append("rect").attr("x",u+S(e.startPpm)).attr("y",0).attr("width",S(e.endPpm)-S(e.startPpm)).attr("height",n).attr("fill",e.backgroundColor)}));const l=o.append("g").attr("transform",`translate(${u},0)`);if("individual"===s)x.forEach((([,t],i)=>{const r=t.magnification||1,s=Ze().domain([-.2/r,4/r]).range([n-c,c]),o=A(s),d=e.spectrum.filter((e=>e.ppm<=t.startPpm+T&&e.ppm>=t.endPpm-T));if(d.length<2)return;const m=l.append("g").attr("clip-path",`url(#tl-region-clip-${i})`);m.append("path").datum(d).attr("d",o.area).attr("fill","url(#tl-spectrumGradient)").attr("opacity",.7),m.append("path").datum(d).attr("d",o.line).attr("fill","none").attr("stroke","#5E73EE").attr("stroke-width",a?1.5:1).attr("stroke-opacity",.8)}));else if(e.isBaseline){const e=Ze().domain([-6,6]).range([n-c,c]);l.append("line").attr("x1",0).attr("x2",h).attr("y1",e(0)).attr("y2",e(0)).attr("stroke","#94a3b8").attr("stroke-width",1).attr("stroke-dasharray","4,4"),l.append("text").attr("x",h/2).attr("y",e(0)-(a?15:10)).attr("text-anchor","middle").attr("fill","#94a3b8").style("font-size",a?"13px":"11px").style("font-style","italic").style("font-family","'Inter', system-ui, sans-serif").text("Baseline Reference")}else if(e.differenceSpectrum){const t=Ze().domain([-6,6]).range([n-c,c]);l.append("line").attr("x1",0).attr("x2",h).attr("y1",t(0)).attr("y2",t(0)).attr("stroke","#cbd5e1").attr("stroke-width",1),x.forEach((([,t],i)=>{const r=t.magnification||1,s=Ze().domain([-6/r,6/r]).range([n-c,c]),o=A(s),d=e.differenceSpectrum.filter((e=>e.ppm<=t.startPpm+T&&e.ppm>=t.endPpm-T));if(d.length<2)return;const m=l.append("g").attr("clip-path",`url(#tl-region-clip-${i})`);m.append("path").datum(d).attr("d",o.positiveArea).attr("fill","url(#tl-positiveGradient)").attr("opacity",.7),m.append("path").datum(d).attr("d",o.negativeArea).attr("fill","url(#tl-negativeGradient)").attr("opacity",.7),m.append("path").datum(d).attr("d",o.positiveLine).attr("fill","none").attr("stroke","#5E73EE").attr("stroke-width",a?1.5:1).attr("stroke-opacity",.7),m.append("path").datum(d).attr("d",o.negativeLine).attr("fill","none").attr("stroke","#a50841").attr("stroke-width",a?1.5:1).attr("stroke-opacity",.7)}))}b.append("circle").attr("cx",R).attr("cy",r).attr("r",a?8:6).attr("fill","#5E73EE").attr("stroke","white").attr("stroke-width",2).style("pointer-events","none"),b.append("line").attr("x1",R+(a?10:8)).attr("x2",75).attr("y1",r).attr("y2",r).attr("stroke","#cbd5e1").attr("stroke-width",1).style("pointer-events","none");const d=new Date(e.collectionDate+"T00:00:00"),p=d.toLocaleDateString("en-US",{month:"short",day:"numeric"}),v=d.getFullYear().toString();b.append("text").attr("x",38).attr("y",r-5).attr("text-anchor","end").attr("fill","#334155").style("font-size",a?"13px":"12px").style("font-weight","500").style("font-family","'Inter', system-ui, sans-serif").style("pointer-events","none").text(p),b.append("text").attr("x",38).attr("y",r+8).attr("text-anchor","end").attr("fill","#94a3b8").style("font-size",a?"11px":"10px").style("font-family","'Inter', system-ui, sans-serif").style("pointer-events","none").text(v);let y=e.name,_=null;if(y.length>18){let e=-1;for(let t=18;t>=8;t--)if(" "===y[t]||"_"===y[t]){e=t;break}if(e>0){const t=y.substring(e+1).trim();y=y.substring(0,e).trim(),_=t.length>18?t.substring(0,17)+"â¦":t}else y=y.substring(0,17)+"â¦"}const N=_?r-12:r-4,f=r+2,C=_?r+22:r+18;b.append("text").attr("x",80).attr("y",N).attr("fill",e.isBaseline?"#1e3a5f":"#334155").style("font-size",a?"15px":"13px").style("font-weight",(e.isBaseline,"600")).style("font-family","'Inter', system-ui, sans-serif").style("pointer-events","none").text(y),_&&b.append("text").attr("x",80).attr("y",f).attr("fill",e.isBaseline?"#1e3a5f":"#334155").style("font-size",a?"15px":"13px").style("font-weight",(e.isBaseline,"600")).style("font-family","'Inter', system-ui, sans-serif").style("pointer-events","none").text(_),e.isBaseline?b.append("text").attr("x",80).attr("y",C).attr("fill","#94a3b8").style("font-size",a?"15px":"13px").style("font-style","
1italic").style("font-family","'Inter', system-ui, sans-serif").style("pointer-events","none").text("Reference"):null!==e.similarityIndex&&b.append("text").attr("x",80).attr("y",C).attr("fill","#5E73EE").style("font-size",a?"15px":"13px").style("font-weight","600").style("font-family","'Inter', system-ui, sans-serif").style("pointer-events","none").text(`Similarity: ${e.similarityIndex.toFixed(1)}`)}));const D=m+w.length*n+8*(w.length-1)+10,P=Je(S).tickValues([10,9,8,7,6,5,4,3,2,1]);b.append("g").attr("transform",`translate(${u},${D})`).call(P).selectAll("text").attr("fill","#64748b").style("font-size","11px"),b.append("text").attr("x",u+h/2).attr("y",y-8).attr("text-anchor","middle").attr("fill","#64748b").style("font-size","12px").style("font-family","'Inter', system-ui, sans-serif").text("Chemical Shift (ppm)");const L=b.append("g");w.forEach(((e,a)=>{const s=m+a*g;L.append("rect").attr("x",0).attr("y",s).attr("width",t).attr("height",n).attr("fill","transparent").style("cursor","pointer").on("mouseenter",(()=>{v((t=>l(o({},t),{visible:!0,name:e.name,date:e.collectionDate,isBaseline:e.isBaseline,similarityIndex:e.similarityIndex})))})).on("mousemove",(e=>{if(!r.current)return;const t=r.current.getBoundingClientRect();let a=e.clientX-t.left+15;const n=e.clientY-t.top-10;a+280>t.width&&(a=e.clientX-t.left-295),v((e=>l(o({},e),{x:a,y:n})))})).on("mouseleave",(()=>{v((e=>l(o({},e),{visible:!1})))})).on("click",(t=>{var a;let n=null;if(r.current){const e=r.current.getBoundingClientRect(),s=null==(a=i.current)?void 0:a.parentElement,o=null==s?void 0:s.getBoundingClientRect(),l=t.clientX-((null==o?void 0:o.left)||e.left)-u;if(l>=0&&l<=h){const e=S.invert(l);for(const[t,a]of x)if(e<=a.startPpm&&e>=a.endPpm){n=t;break}}}E(e,n)}))}))}),[w,s,d,I.regions,E,x]),m.exports.useEffect((()=>{let e;const t=()=>{clearTimeout(e),e=setTimeout((()=>A((e=>e+1))),150)};return window.addEventListener("resize",t),()=>{clearTimeout(e),window.removeEventListener("resize",t)}}),[]);const P=h.date?new Date(h.date+"T00:00:00").toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):"";return R("div",{style:pR.container,children:[R("div",{style:pR.chartContainer,ref:r,children:[R("div",{style:pR.chartHeader,children:[p("div",{style:pR.chartHeaderLeft,children:R("div",{style:pR.viewToggle,children:[R("button",{style:o(o({},pR.viewToggleBtn),"individual"===s?pR.viewToggleBtnActive:{}),onClick:()=>T("individual"),children:[vR," Individual Spectra"]}),R("button",{style:o(o({},pR.viewToggleBtn),"comparison"===s?pR.viewToggleBtnActive:{}),onClick:()=>T("comparison"),children:[gR," Difference View"]})]})}),R("div",{style:pR.viewToggle,children:[R("button",{style:o(o({},pR.viewToggleBtn),"compact"===d?pR.viewToggleBtnActive:{}),onClick:()=>k("compact"),children:[uR," Compact"]}),R("button",{style:o(o({},pR.viewToggleBtn),"expanded"===d?pR.viewToggleBtnActive:{}),onClick:()=>k("expanded"),children:[hR," Expanded"]})]})]}),p("div",{style:pR.svgContainer,children:p("svg",{ref:i,style:{width:"100%",display:"block"}})}),R("div",{style:l(o({},pR.tooltip),{left:h.x,top:h.y,opacity:h.visible?1:0}),children:[p("div",{style:pR.tooltipTitle,children:h.name}),R("p",{style:pR.tooltipDate,children:["Collected: ",P]}),p("div",{style:pR.tooltipSimilarity,children:h.isBaseline?"Baseline Reference":null==(n=h.similarity
1Index)?void 0:n.toFixed(1)}),!h.isBaseline&&p("p",{style:pR.tooltipLabel,children:"Similarity Index"})]}),p("div",{style:pR.chartFooter,children:p("div",{style:pR.clickHint,children:"Click on any sample row to view detailed comparison"})})]}),g&&b&&p("div",{style:pR.modalOverlay,onClick:()=>y(!1),children:R("div",{style:pR.modalContent,onClick:e=>e.stopPropagation(),children:[R("div",{style:pR.modalHeader,children:[R("div",{style:pR.modalHeaderLeft,children:[R("div",{children:[p("h2",{style:pR.modalTitle,children:b.isBaseline?"Reference Sample":b.name}),!b.isBaseline&&null!==b.similarityIndex&&R("span",{style:pR.modalSubtitle,children:["Similarity",p("br",{}),"Index: ",b.similarityIndex.toFixed(1)]})]}),C&&p("button",{style:pR.backButton,onClick:()=>S(null),children:"â Back to Full Spectrum"})]}),R("div",{style:pR.modalHeaderRight,children:[!b.isBaseline&&R("div",{style:pR.viewToggle,children:[p("button",{style:o(o({},pR.viewToggleBtn),"individual"===N?pR.viewToggleBtnActive:{}),onClick:()=>D("individual"),children:"Individual Spectra"}),p("button",{style:o(o({},pR.viewToggleBtn),"comparison"===N?pR.viewToggleBtnActive:{}),onClick:()=>D("comparison"),children:"Difference View"})]}),p("button",{style:pR.modalClose,onClick:()=>y(!1),children:"Ã"})]})]}),p("div",{style:pR.modalBody,children:(()=>{if(!b)return null;if(b.isBaseline)return p(JT,{data:b.spectrumData,height:500,focusRegion:C,onRegionClick:M},`modal-baseline-${C||"full"}`);if("individual"===N){const e=w.find((e=>e.isBaseline));return p(JT,{data:e.spectrumData,secondaryData:b.spectrumData,height:600,focusRegion:C,onRegionClick:M},`modal-individual-${b.id}-${C||"full"}`)}return p(rR,{data:b.comparisonData,height:500,focusRegion:C,onRegionClick:M},`modal-comparison-${b.id}-${C||"full"}`)})()})]})})]})}const NR="#3e4c6d",fR="#4a5a70",CR="#9aa8b8",SR="rgba(200, 210, 225, 0.5)",xR="#7a8899",AR="#1e2a3a",IR="#8896a8",wR="#3e4c6d",TR="rgba(215, 225, 240, 0.5)",RR="rgba(240, 244, 250, 0.05)",kR="#3e4c6d",ER="#1e2a3a",MR="'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",DR={outerContainer:{width:"100%",fontFamily:MR},card:{background:"#ffffff",borderRadius:"12px",border:`1px solid ${"rgba(220, 228, 238, 0.7)"}`,padding:"20px 24px 16px",position:"relative",overflow:"visible"},svgContainer:{width:"100%",position:"relative"},tooltip:{position:"absolute",transform:"translateX(-50%)",background:ER,color:"#ffffff",padding:"10px 14px",borderRadius:"8px",fontSize:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",pointerEvents:"none",zIndex:100,whiteSpace:"nowrap",maxWidth:"280px"},tooltipArrow:{position:"absolute",bottom:"-6px",left:"50%",transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:`6px solid ${ER}`},legendContainer:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:"6px 16px",padding:"14px 12px 0",borderTop:"1px solid rgba(220, 228, 238, 0.6)",marginTop:"4px"},legendItem:{display:"flex",alignItems:"center",gap:"6px",fontSize:"11px",color:"#5a6878",whiteSpace:"nowrap"},legendNumber:{fontWeight:700,fontSize:"12px",color:wR,minWidth:"12px"},legendSeparator:{color:"#c0c8d4",fontSize:"10px"}};function PR(e,t=!1){const a=new Date(e),n=a.toLocaleDateString("en-US",{month:"short"}),i=a.getDate();if(t){return`${n} ${i}, ${a.getFullYear()}`}return`${n} ${i}`}function LR(e,t={},a={}){const n=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach((([e,t])=>n.setAttribute(e,String(t)))),Object.entries(a).forEach((([e,t])=>{void 0!==t&&(n.style[e]=t)})),n}const BR=({samples:e,reference:t,height:a=300,maxWidth:n=700,title:i="Similarity Index Overview",subtitle:r="vs Reference Sample",onPointClick:s})=>{const c=m.exports.useRef(null),d=m.exports.useRef(null),[u,h]=m.exports.useState(0),[v,g]=m.exports.useState({visible:!1,x:0,y:0,content:null}),y=m.exports.useMemo((()=>[t.collectionDate,...e.map((e=>e.collectionDate))].filter((e=>Boolean(e)))),[t,e]),b=m.exports.useMemo((()=>function(e){if(e.length<2)return!1;const t=e.map((e=>new Date(e).getFullYear()));return new Set(t).size>1}(y)),[y]),_=m.exports.useMemo((()=>
1[{name:t.name,similarityIndex:100,collectionDate:t.collectionDate,index:0,displayIndex:0,isReference:!0},...e.map(((e,t)=>({name:e.name,similarityIndex:e.similarityIndex,collectionDate:e.collectionDate,index:t+1,displayIndex:t+1,isReference:!1})))]),[e,t]);return m.exports.useEffect((()=>{if(!c.current)return;const e=new ResizeObserver((()=>h((e=>e+1))));return e.observe(c.current),()=>e.disconnect()}),[]),m.exports.useEffect((()=>{if(!d.current||!c.current||0===_.length)return;const e=c.current.getBoundingClientRect().width,t=44,n=56,m=e-n-28,p=a-t-52,u=d.current;for(;u.firstChild;)u.removeChild(u.firstChild);u.setAttribute("width",String(e)),u.setAttribute("height",String(a)),u.setAttribute("viewBox",`0 0 ${e} ${a}`);const h=LR("defs"),v=LR("linearGradient",{id:"chart-area-gradient",x1:"0",y1:"0",x2:"0",y2:"1"});v.appendChild(LR("stop",{offset:"0%","stop-color":TR})),v.appendChild(LR("stop",{offset:"100%","stop-color":RR})),h.appendChild(v),u.appendChild(h);const y=LR("g",{transform:`translate(${n},${t})`});u.appendChild(y),y.appendChild(LR("rect",{x:0,y:0,width:m,height:p,fill:"url(#chart-area-gradient)",rx:2}));const N=e=>m*e/Math.max(_.length-1,1),f=e=>p-p*e/100;[0,50,100].forEach((e=>{y.appendChild(LR("line",{x1:0,x2:m,y1:f(e),y2:f(e),stroke:SR,"stroke-width":1}));const t=LR("text",{x:-14,y:f(e),dy:"0.35em","text-anchor":"end",fill:xR},{fontSize:"11px",fontFamily:MR});t.textContent=String(e),y.appendChild(t)}));const C=LR("text",{transform:"rotate(-90)",x:-(t+p/2),y:16,"text-anchor":"middle",fill:xR},{fontSize:"11px",fontFamily:MR});if(C.textContent="Similarity Index",u.appendChild(C),_.forEach((e=>{if(!e.collectionDate)return;const a=N(e.index),i=LR("text",{x:n+a,y:t+p+24,"text-anchor":"middle",fill:xR},{fontSize:"10px",fontFamily:MR});i.textContent=PR(e.collectionDate,b),u.appendChild(i)})),_.length>1){const e=function(e,t=1){if(e.length<2)return"";if(2===e.length)return`M ${e[0][0]} ${e[0][1]} L ${e[1][0]} ${e[1][1]}`;let a=`M ${e[0][0]} ${e[0][1]}`;for(let n=0;n<e.length-1;n++){const i=e[0===n?n:n-1],r=e[n],s=e[n+1],o=e[n+2>=e.length?n+1:n+2];a+=` C ${r[0]+(s[0]-i[0])/6*t} ${r[1]+(s[1]-i[1])/6*t}, ${s[0]-(o[0]-r[0])/6*t} ${s[1]-(o[1]-r[1])/6*t}, ${s[0]} ${s[1]}`}return a}(_.map((e=>[N(e.index),f(e.similarityIndex)])),1);y.appendChild(LR("path",{d:e,fill:"none",stroke:CR,"stroke-width":2.5,"stroke-linejoin":"round","stroke-linecap":"round"}))}_.forEach((e=>{const a=N(e.index),i=f(e.similarityIndex),r=LR("g",{transform:`translate(${a},${i})`});if(e.isReference){const e=10,t=LR("path",{d:`M 0 ${-e} L ${e} 0 L 0 ${e} L ${-e} 0 Z`,fill:NR,stroke:"#2d3a4d","stroke-width":2},{cursor:"pointer"});r.appendChild(t);const a=LR("text",{x:16,y:-8,"text-anchor":"start",fill:kR},{fontSize:"9px",fontWeight:"700",fontFamily:MR,letterSpacing:"0.03em"});a.textContent="Ref Sample",r.appendChild(a)}else{r.appendChild(LR("circle",{r:8,fill:"#ffffff",stroke:fR,"stroke-width":2.5},{cursor:"pointer"}));const t=LR("text",{y:-14,"text-anchor":"middle",fill:AR},{fontSize:"12px",fontWeight:"700",fontFamily:MR});t.textContent=String(e.displayIndex),r.appendChild(t)}const c=LR("circle",{r:16,fill:"transparent"},{cursor:"pointer"});r.appendChild(c);r.addEventListener("mouseenter",(()=>{g({visible:!0,x:n+a,y:t+i-50,content:e})})),r.addEventListener("mouseleave",(()=>{g((e=>l(o({},e),{visible:!1})))})),s&&!e.isReference&&r.addEventListener("click",(()=>{s({name:e.name,similarityIndex:e.similarityIndex,collectionDate:e.collectionDate},e.index-1)})),y.appendChild(r)}));const S=LR("text",{x:n,y:24,fill:AR},{fontSize:"16px",fontWeight:"700",fontFamily:MR});S.textContent=i,u.appendChild(S);const x=S.getBBox?S.getBBox():{width:9*i.length},A=LR("text",{x:n+x.width+12,y:24,fill:IR},{fontSize:"14px",fontWeight:"400",fontFamily:MR});A.textContent=r,u.appendChild(A)}),[_,a,i,r,s,u,b]),p("div",{style:l(o({},DR.outerContainer),{maxWidth:`${n}px`}),children:R("div",{style:DR.card,children:[R("div",{ref:c,style:DR.svgContainer,children:[p("svg",{ref:d,style:{width:"100%",height:`${a}px`,display:"block",overflow:"visible"}}),v.visible&&v.content&&R("div",{style:l(o({},DR.tooltip),{left:v.x,top:v.y}),children:[p("div",{style:{fontWeight:600,marginBottom:"4px"},children:v.content.isReference?"Reference Sample":v.content.name}),R("div",{style:{color:"rgba(255,255,255,0.75)",fontSize:"11px"},children:[v.content.isReference?R(k,{children:[p("div",{children:v.content.name}),p("div",{style:{marginTop:"2px"},children:"Similarity Index: 100 (baseline)"})]}
1):R("div",{children:["Similarity Index: ",v.content.similarityIndex.toFixed(1)]}),v.content.collectionDate&&R("div",{style:{marginTop:"2px"},children:["Collected: ",PR(v.content.collectionDate,!0)]})]}),p("div",{style:DR.tooltipArrow})]})]}),R("div",{style:DR.legendContainer,children:[R("div",{style:DR.legendItem,children:[p("svg",{width:"12",height:"12",viewBox:"-7 -7 14 14",children:p("path",{d:"M 0 -5 L 5 0 L 0 5 L -5 0 Z",fill:NR,stroke:"#2d3a4d",strokeWidth:"1.5"})}),p("span",{style:{fontWeight:600,color:wR},children:"Ref"}),p("span",{style:DR.legendSeparator,children:":"}),p("span",{children:t.name})]}),e.map(((e,t)=>R("div",{style:DR.legendItem,children:[p("span",{style:DR.legendNumber,children:t+1}),p("span",{style:DR.legendSeparator,children:":"}),p("span",{children:e.name})]},t)))]})]})})};var OR={container:"SampleCardMobile_container_1",header:"SampleCardMobile_header_10",info:"SampleCardMobile_info_17",selectButton:"SampleCardMobile_selectButton_23",selectedButton:"SampleCardMobile_selectedButton_35",iconBtn:"SampleCardMobile_iconBtn_48",plus:"SampleCardMobile_plus_53",cols:"SampleCardMobile_cols_57",text:"SampleCardMobile_text_62",status:"SampleCardMobile_status_65",completed:"SampleCardMobile_completed_92",notes:"SampleCardMobile_notes_100",notesText:"SampleCardMobile_notesText_105",icon:"SampleCardMobile_icon_48"};const FR=({sample:e,selectedSamples:t,setSelectedSamples:a,singleSelect:n})=>{const i=Wt(),[r,s]=m.exports.useState(!n);return R("div",{className:OR.container,children:[R("div",{className:OR.header,onClick:()=>s(!r),children:[p($t,{variant:"standardSemiBold",children:e.description}),p(Sn,{spriteUrl:r?Yi:Vi,className:OR.icon})]}),R("div",{className:OR.content,children:[R("div",{className:OR.info,children:["Completed"===e.status&&p(P,{onClick:()=>{n?(e.id,e.sampleName,e.material,e.varietal,e.analyzedDate,a([e])):t.find((t=>e.id===t.id))?a(t.filter((t=>e.id!==t.id))):t.length<8&&(e.id,e.sampleName,e.material,e.varietal,e.analyzedDate,a([...t,e]))},variant:"outlined",className:t.find((t=>e.id===t.id))?OR.selectedButton:OR.selectButton,startIcon:t.find((t=>e.id===t.id))?p(Sn,{spriteUrl:gp,className:OR.iconBtn}):p($t,{variant:"big",className:OR.plus,children:"+"}),children:t.find((t=>e.id===t.id))?"Selected":"Add Sample"}),R("div",{className:OR.cols,children:[p($t,{variant:"standard",className:OR.text,children:i("nmr-sam-card-date",{date:Gu(e.testDate)})}),p($t,{className:I(OR.status,{[OR.pending]:"Pending"===e.status,[OR.completed]:"Completed"===e.status}),children:e.status})]})]}),r&&p("div",{children:R("div",{className:OR.cols,children:[R($t,{variant:"standard",children:["Logged Date: ",Gu(e.loggedAt)]}),p($t,{variant:"standard",children:i("nmr-sam-card-material",{material:e.sampleType})})]})})]})]},e.id)};var HR="SampleDisplayColumns_icon_1",UR="SampleDisplayColumns_action_10",zR="SampleDisplayColumns_cellContainerWrap_41",GR="SampleDisplayColumns_tableHeader_63",qR="SampleDisplayColumns_tableHeaderContainer_69",WR="SampleDisplayColumns_status_76",VR="SampleDisplayColumns_completed_95";const YR=()=>{Wt();const e=e=>p("div",{className:zR,children:R(Vt,{variant:"h6",onClick:t=>{t.stopPropagation(),console.log("Download sample report,",e.row.description)},className:UR,children:[p(Sn,{spriteUrl:m_,className:HR}),"Download"]})});return[{field:"description",sortable:!1,renderHeader:()=>p(me,{title:"Samples",children:p("div",{className:qR,children:p(Vt,{variant:"h6",className:GR,children:"Samples"})})}),flex:.75,renderCell:e=>p("div",{className:zR,children:p(Vt,{variant:"h6",children:e.value})})},{field:"loggedAt",sortable:!1,renderHeader:()=>p(me,{title:"Logged Date",children:p("div",{className:qR,children:p(Vt,{variant:"h6",className:GR,children:"Logged Date"})})}),flex:.5,renderCell:e=>p("div",{className:zR,children:p(Vt,{variant:"h6",children:e.value?Gu(e.value):""})})},{field:"testDate",sortable:!1,renderHeader:()=>p(me,{title:"Test Date",children:p("div",{className:qR,children:p(Vt,{variant:"h6",className:GR,children:"Test Date"})})}),flex:.5,renderCell:e=>p("div",{className:zR,children:p(Vt,{variant:"h6",children:e.value?Gu(e.value):""})})},{field:"actions",sortable:!1,renderHeader:()=>p(me,{title:"",children:p("div",{className:qR,children:p(Vt,{variant:"h6",className:GR})})}),flex:.5,renderCell:t=>p(e,{row:t.row})},{field:"status",sortable:!1,renderHeader:()=>p(me,{title:"Status",children:p("div",{className:qR,children:p(Vt,{variant:"h6",className:GR,children:"Status"})})}),flex:.5,renderCell:e=>p("div",{className:zR,children:R(Vt,{variant:"h6",className:I(WR,{[VR]:"
1Completed"===e.value}),children:[p("span",{}),e.value]})})}]};var jR={container:"SamplesToolbar_container_1",viewAsOptionsButtons:"SamplesToolbar_viewAsOptionsButtons_6",buttonGroup:"SamplesToolbar_buttonGroup_18",button:"SamplesToolbar_button_18",filtersAndExport:"SamplesToolbar_filtersAndExport_32",filterInputs:"SamplesToolbar_filterInputs_44",searchBar:"SamplesToolbar_searchBar_61",dropdownFilters:"SamplesToolbar_dropdownFilters_75",placeholderText:"SamplesToolbar_placeholderText_81",datePickers:"SamplesToolbar_datePickers_85",datePicker:"SamplesToolbar_datePicker_85",inputAdornment:"SamplesToolbar_inputAdornment_96",exportCsvContainer:"SamplesToolbar_exportCsvContainer_99",exportCsvButton:"SamplesToolbar_exportCsvButton_99",svgIcon:"SamplesToolbar_svgIcon_103",dateInput:"SamplesToolbar_dateInput_108",inputField:"SamplesToolbar_inputField_116",clearContainer:"SamplesToolbar_clearContainer_152",clearButton:"SamplesToolbar_clearButton_156",calendarIcon:"SamplesToolbar_calendarIcon_170",formControlRoot:"SamplesToolbar_formControlRoot_176","PrivatePickersFadeTransitionGroup-root":"SamplesToolbar_PrivatePickersFadeTransitionGroup-root_180"};const $R=["Pending","Completed"],QR=({queryOptions:e,setQueryOptions:t,reportBuilder:a})=>{const n=Wt(),[i,r]=m.exports.useState(!1),[s,c]=m.exports.useState(e.searchTerm),[d,u]=m.exports.useState(""),[h,v]=m.exports.useState(e.status),[g,y]=m.exports.useState({startDate:!1,endDate:!1}),b=Qt(s,250);return m.exports.useEffect((()=>{i?t((e=>l(o({},e),{searchTerm:b}))):r(!0)}),[b]),m.exports.useEffect((()=>{c(e.searchTerm)}),[e]),p("div",{className:jR.container,children:p("div",{className:jR.filtersAndExport,children:R("div",{className:jR.filterInputs,children:[R("div",{className:jR.searchBar,children:[p($t,{children:p(me,{arrow:!0,title:"Search samples.",children:p("span",{children:n("filter")})})}),p(H,{className:I(jR.inputField,jR.formControlRoot),name:"search",value:s,onChange:e=>c(null==e?void 0:e.target.value),placeholder:"Search samples"})]}),!a&&p("div",{className:jR.dropdownFilters,children:!a&&R(xr,{name:"status",value:h,onChange:e=>(e=>{v(e.target.value),t((t=>l(o({},t),{categoryId:""===e.target.value?null:e.target.value})))})(e),SelectDisplayProps:{style:{paddingTop:0}},children:[p(Z,{value:"",sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}},"&:hover":{backgroundColor:"#edf0f7"}},children:p("div",{className:jR.placeholderText,children:"Select Status"})},""),$R.map((e=>p(Z,{value:e,className:jR.sampleTypeSelect,sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}},"&:hover":{backgroundColor:"#edf0f7"}},children:e},e)))]})}),R("div",{className:jR.datePickers,children:[p(Ce,{dateAdapter:Se,children:R("div",{className:jR.datePicker,children:[p($t,{children:n("from")}),p(xe,{PopperProps:{sx:{"& .MuiPickersDay-root.Mui-selected":{backgroundColor:"#5160EB",color:"white"}}},open:g.startDate,onOpen:()=>y({startDate:!0,endDate:!1}),onClose:()=>y({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:jR.calendarIcon})},InputAdornmentProps:{className:jR.inputAdornment},value:e.startDate?Ae(e.startDate.toString()):null,onChange:e=>t((t=>l(o({},t),{startDate:e?fh(e):null}))),renderInput:e=>p(H,l(o({onClick:()=>y({startDate:!0,endDate:!1}),onKeyDown:e=>e.preventDefault(),classes:{root:jR.formControlRoot},className:I(jR.inputField,jR.dateInput)},e),{inputProps:l(o({},e.inputProps),{placeholder:n("date")})}))})]})}),p(Ce,{dateAdapter:Se,children:R("div",{className:jR.datePicker,children:[p($t,{children:n("to")}),p(xe,{PopperProps:{sx:{"& .MuiPickersDay-root.Mui-selected":{backgroundColor:"#5160EB",color:"white"}}},open:g.endDate,onOpen:()=>y({startDate:!1,endDate:!0}),onClose:()=>y({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:jR.calendarIcon})},InputAdornmentProps:{className:jR.inputAdornment},value:e.endDate?Ae(e.endDate.toString()):null,onChange:e=>t((t=>l(o({},t),{endDate:e?fh(e):null}))),renderInput:e=>p(H,l(o({onClick:()=>y({startDate:!1,endDate:!0}),onKeyDown:e=>e.preventDefault(),classes:{root:jR.formControlRoot},className:I(jR.inputField,jR.dateInput)},e),{inputProps:l(o({},e.inputProps),{placeholder:n("date")})}))})]})})]}),p("div",{className:jR.clearContainer,children:p("button",{className:jR.clearButton,onClick:()=>(v(""),c(""),u(""),void t((e=>l(o({},e),{status:a?"completed":"",material:"",searchTerm:"",startDate:"",endDate:""})))),children:p($t,{variant:"small",children:"reset"})})})]})})})},KR=e=>{Wt();const t=m.exports.useContext(Na);return L(["getNMRSamples",e],(()=>qu.getNMRSamples(e)),{keepPreviousData:!1,onSuccess:e=>{console.log("Get NMR samples",e)},onError:e=>{console.error("Get NMR samples error",e),t.open(fa(e,"Get NMR samples error"),{severity:"error"})}})},XR=(e,t,a)=>{Wt();const n=m.exports.useContext(Na);return L(["getNMRSampleDetails",t],(()=>qu.getNMRSample(e,t)),{keepPreviousData:!1,onSuccess:e=>{console.log("Get NMR sample details",e)},onError:e=>{console.error("Get NMR sample details error",e),n.open(fa(e,"Get NMR sampledetails error"),{severity:"error"})},enabled:a})},ZR=["Oxidation","Phenolics & Tannins","Sugars & Alcohols","Organic Acid Profile","Fermentation Fingerprint"],JR=["oxidation","phenolics and Tannins","sugars and Alcohols","organic Acid Profile","fermentation Fingerprint"];var ek="DrillDownModal_container_1",tk="DrillDownModal_header_7",ak="DrillDownModal_icon_18",nk="DrillDownModal_headerText_24",ik="DrillDownModal_subheader_30",rk="DrillDownModal_baseline_36",sk="DrillDownModal_sample_42",ok="DrillDownModal_content_48",lk="DrillDownModal_chartContainer_55",ck="DrillDownModal_tabsAndContentContainer_72",dk="DrillDownModal_tabsContainer_80",mk="DrillDownModal_tab_72",pk="DrillDownModal_itemActive_102",uk="DrillDownModal_title_119",hk="DrillDownModal_tabContentContainer_123",vk="DrillDownModal_subregionContent_129",gk="DrillDownModal_suggestedAnalysesContainer_138",yk="DrillDownModal_suggestedAnalyses_138",bk="DrillDownModal_analysis_157",_k="DrillDownModal_analysisHeader_166",Nk="DrillDownModal_labels_180",fk="DrillDownModal_label_180",Ck="DrillDownModal_analysisFooter_191",Sk="DrillDownModal_footer_197",xk="DrillDownModal_button_208",Ak="DrillDownModal_buttonTab_215",Ik="DrillDownModal_buttonText_234",wk="DrillDownModal_bottomText_234",Tk="DrillDownModal_direction_244";
1const Rk=[{title:"Oxidation",ppm:"approx. 9.5 ppm",subregions:[{title:"Oxidative Status (Acetaldehyde)",content:[{header:"Primary Signal: Acetaldehyde",content:"This sub-region acts as the definitive chemical sensor for wine oxidation. Acetaldehyde is the primary bridge molecule formed when ethanol oxidizes. In a protected wine, this region should be near-silent. A visible signal here confirms that oxygen intake has exceeded the binding capacity of free SOâ, causing the accumulation of free acetaldehyde."},{header:"Common Causes for Signal Detection:",content:'<ul><li style="font-size: 16px"><b>Post-Fermentation Exposure:</b> Inadequate topping of barrels or headspace in tanks.</li><li style="font-size: 16px"><b>Temperature Stress:</b> Elevated storage temperatures catalyzing the oxidation of ethanol.</li><li style="font-size: 16px"><b>Microbial Spoilage:</b> Surface growth of film-forming yeasts (Flor or Candida) which actively produce acetaldehyde.</li><li style="font-size: 16px"><b>Sulfur Depletion:</b> Missed SOâ additions during racking or bottling operations.</li></ul>'}]}],suggestedAnalyses:[{name:"Acetaldehyde",method:"GC-FID",tat:"3 Working Days",summary:"Acetaldehyde is the primary aldehyde found in wine and is more commonly associated with the oxidation of ethanol.",link:"https://www.etslabs.com/analyses/analysis/161808"},{name:"Acetaldehyde and Ethyl Acetate",method:"GC-FID",tat:"3 Working Days",summary:"Acetaldehyde and Ethyl Acetate have very distinct and powerful aromas, and can be pleasant at certain lower concentrations. However, in large quantities these compounds lead to sensory defects.",link:"https://www.etslabs.com/analyses/analysis/161809"}]}
1,{title:"Phenolics & Tannins",ppm:"5.5 - 9.0 ppm",subregions:[{title:"Flavonoid Foundation",subtitle:"5.80 â 7.00 ppm",content:[{header:"Signal Identification",content:'<ul><li style="font-size: 16px"><b>Primary Signals:</b> Catechins, Epicatechins, Caftaric Acid (olefinic protons).</li><li style="font-size: 16px"><b>Spectral Location:</b> 5.50 â 7.00 ppm.</li><li style="font-size: 16px"><b>Signal Type:</b> <ul><li>5.50â6.00: The "quiet zone" often containing Urea and the H6/H8 protons of the flavonoid A-ring.</li><li>6.00â7.00: The olefinic protons of hydroxycinnamates (Caftaric acid) and the aromatic rings of Flavan-3-ols.</li></ul></li></ul>'},{header:"Winemaking Insight",content:'<ul><li style="font-size: 16px"><b>Structure & Grip:</b> High intensity in the flavonoid regions correlates with seed/skin extraction and "mouth-coating" tannins.</li><li style="font-size: 16px"><b>Oxidation Precursors:</b> The hydroxycinnamates found here (Caftaric acid) are the primary substrates for enzymatic browning (PPO activity) in grape juice.</li></ul>'}]},{title:"Simple Phenolics",subtitle:"7.00 â 7.50 ppm",content:[{header:"Signal Identification",content:'<ul><li style="font-size: 16px"><b>Primary Signals:</b> Gallic Acid, Tyrosol, Phenylalanine.</li><li style="font-size: 16px"><b>Spectral Location:</b> 7.00 â 7.60 ppm</li><li style="font-size: 16px"><b>Signal Type:</b> <ul><li>Gallic Acid (~7.1 ppm): A sharp singlet.</li><li>Phenylalanine (~7.3-7.4 ppm): A massive multiplet often overlapping with the simple phenols.</li><li>Tyrosol (~7.0 & 7.2 ppm): Distinct doublets.</li></ul></li></ul>'},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Oak vs. Grape:</b> Gallic Acid is the 'hydrolyzable tannin' markerâhigh levels often indicate oak aging or high seed extraction.</li><li style='font-size: 16px'><b>Yeast Performance:</b> Phenylalanine levels remaining high can indicate incomplete nitrogen assimilation, whereas Tyrosol confirms active yeast metabolism (Ehrlich pathway).</li></ul>"}]},{title:"Advanced Aromatic Markers",subtitle:"7.50 â 9.20 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signals:</b> Trigonelline, Formic Acid.</li><li style='font-size: 16px'><b>Spectral Location:</b> 7.50 â 9.20 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> <ul><li>Trigonelline (~8.0, 8.8, 9.1 ppm): Distinct downfield singlets/multiplets.</li><li>Formic Acid (~8.4 ppm): A sharp singlet often appearing in this range.</li></ul></li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>The Varietal Fingerprint:</b> Trigonelline is genetically specific and highly stable, serving as a reliable varietal marker.</li><li style='font-size: 16px'><b>Stress Indicators:</b> Elevated Trigonelline is often a chemical marker for thermal stress (UV/Heat) or water deficit in the vineyard.</li></ul>"}]}],suggestedAnalyses:[{name:"Rapid Phenolic Profile",method:"HPLC",tat:"1 working day",summary:"Quantifies individual phenolic compounds affecting color, astringency, and antioxidant capacity.",link:"https://www.etslabs.com/analyses/analysis/161979"},{name:"Phenolic Antioxidants",method:"HPLC",tat:"5 Working Days",summary:"Several red wine phenolic antioxidants have been suggested as beneficial to good health. Resveratrol, quercetin, catechin and tannin are often discussed.",link:"https://www.etslabs.com/analyses/analysis/162358"},{name:"Red Wine Phenolic Panel",method:"HPLC",tat:"5 Working Days",summary:"The red wine phenolic profile provides a comprehensive profile on a variety of the phenolic compounds found in wine.",link:"https://www.etslabs.com/analyses/analysis/162366"},{name:"White Wine Phenolic Panel",method:"HPLC",tat:"5 Working Days",summary:"The white wine phenolic profile provides a comprehensive profile on the phenolic compounds found in white wine.",link:"https://www.etslabs.com/analyses/analysis/162045"}]}
1,{title:"Sugars & Alcohols",ppm:"3.0 - 5.5 ppm",subregions:[{title:'The "Body" Region',subtitle:"3.30 â 3.90 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signals:</b> Glycerol, Methanol, scyllo-Inositol.</li><li style='font-size: 16px'><b>Spectral Location:</b> 3.00 â 4.00 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> The most crowded region. Contains the Methanol singlet (~3.35 ppm) and Glycerol multiplets (3.5â3.8 ppm). Note: The large Ethanol Methylene quartet (~3.65 ppm) is suppressed/zeroed here to reveal these critical congeners.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Texture & Viscosity:</b> Glycerol is a primary driver of mouthfeel and wine body ('weight').</li><li style='font-size: 16px'><b>Maceration Indicators:</b> Methanol levels serve as a proxy for skin contact intensity, as it derives from the enzymatic breakdown of pectins in grape skins (higher in Reds/Orange wines).</li></ul>"}]},{title:"Tartrate Stability",subtitle:"4.20 â 4.60 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signal:</b> Tartaric Acid.</li><li style='font-size: 16px'><b>Spectral Location:</b> 4.00 â 4.65 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> The primary singlet for Tartaric Acid typically appears around 4.55â4.65 ppm (pH dependent). This range bridges the gap between the bulk sugar/alcohol region and the anomeric region.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Chemical Dominance:</b> Captures the chemically dominant acid in the wine.</li><li style='font-size: 16px'><b>Stabilization Tracking:</b> ntensity changes in this signal allow winemakers to track cold stabilization efficiency and the precipitation of potassium bitartrate crystals (KHT).</li></ul>"}]},{title:"Residual Sugar Specificity",subtitle:"4.60 â 5.40 ppm",content:[{header:"Signal Identification",content:'<ul><li style="font-size: 16px"><b>Primary Signals:</b> Glucose & Fructose (Anomeric Protons).</li><li style="font-size: 16px"><b>Spectral Location:</b> 4.55 â 5.50 ppm.</li><li style="font-size: 16px"><b>Signal Type:</b> The "anomeric" protons of residual sugars. Note the "Quiet Zone" at ~4.8 ppm where the water signal has been suppressed and zeroed.</li></ul>'},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Stuck Fermentation Diagnostics:</b> This region differentiates between Glucose and Fructose, which bulk sugar analysis often groups together.</li><li style='font-size: 16px'><b>Restart Difficulty:</b> A Fructose-dominant profile indicates a higher difficulty for restarting fermentation compared to a Glucose-dominant one ('Glucophilic' vs 'Fructophilic' yeast performance).</li></ul>"}]}],suggestedAnalyses:[{name:"Glycerol",method:"HPLC",tat:"5 Working Days",summary:"Glycerol is a fermentation byproduct that can also be digested by certain bacteria found in wine. The amount of glycerol produced during fermentation can be linked to yeast strain, SO2 concentration, and other factors.",link:"https://www.etslabs.com/analyses/analysis/161912"},{name:"Methanol",method:"GC-FID",tat:"3 Working Days",summary:"Methanol is one of the alcohols found in wine, and can be produced during fermentation by the enzyme pectin methylesterase.",link:"https://www.etslabs.com/analyses/analysis/161952"},{name:"tartaric acid",method:"Minerva",tat:"1 Working Day",summary:"Typically the most prevalent organic acid found naturally in grapes, tartaric acid is commonly used to adjust the acid balance of must and wine.",link:"https://www.etslabs.com/analyses/analysis/162013"},{name:"Cold Stability - Degree of Tartrate Instability (DIT)",method:"Conductivity",tat:"2 Working Days",summary:"The Degree of Tartrate Instability (Degré dâInstabilité Tartrique âDITâ) test is a conductivity test performed on a Stabilab⢠automated instrument using different parameters than the Modified Mini Contact (âUC Davisâ) conductivity test method.",link:"https://www.etslabs.com/analyses/analysis/161862"},{name:"Cold Stability - Critical Index of Tartrate Stability (ISTC50)",method:"Conductivity",tat:"2 Working Days",summary:"ISTC50 applies to wines cold stabilized by electrodialysis (ED). This test calculates a value based on changes in conductivity of a sample which is seeded lightly with potassium bitartrate, warmed, then cooled to -4°C and agitated for 2 hours (white or rose) or 4 hours (red) to determine the success of electrodialysis treatments.",link:"https://www.etslabs.com/analyses/analysis/161861"},{name:"Glucose + Fructose",method:"Sequential Analyzer",tat:"1 Working Day",summary:"Glucose and fructose are natural compounds produced by vines during photosynthesis.",link:"http://etslabs.com/analyses/analysis/161906"},{name:"Glucose and Fructose Panel",method:"Sequential Analyzer",tat:"1 Working Day",summary:"The Glucose and Fructose Panel provides the individual levels of glucose and fructose.",link:"https://www.etslabs.com/analyses/analysis/161908"}]}
1,{title:"Organic Acid Profile",subregions:[{title:"Volatile Acidity Marker",subtitle:"2.05 â 2.25 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signal:</b> Acetic Acid.</li><li style='font-size: 16px'><b>Spectral Location:</b> 2.05 â 2.30 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> The sharp, unambiguous singlet of Acetic Acid sits at ~2.08â2.10 ppm. This range also captures the underlying multiplets of Glutamine/Glutamate that often sit at the base of this region.</li></ul>"},{header:"Winemaking Insight",content:'<ul><li style="font-size: 16px"><b>Early Warning:</b> This signal provides an "early-warning system" for Acetobacter activity or stressed yeast before VA becomes sensory-detectable.</li><li style="font-size: 16px"><b>Precision:</b> Unlike enzymatic assays, the NMR signal here is free from ester interference, offering an exact snapshot of volatile acidity status.</li></ul>'}]},{title:"Yeast Metabolic Acids",subtitle:"2.50 â 2.70 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signal:</b> Succinic Acid (and Pyruvic Acid).</li><li style='font-size: 16px'><b>Spectral Location:</b> 2.30 â 2.65 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> The dominant singlet for Succinic Acid appears centrally at ~2.55 ppm. The transitional zone (2.30â2.50) captures Pyruvic acid and minor amino acid multiplets.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Fermentation Vigor:</b> Succinic acid concentration is strongly linked to yeast strain selection and fermentation temperature.</li><li style='font-size: 16px'><b>Sensory Impact:</b> Succinic acid contributes a complex salty-bitter taste, adding a savory dimension to the wine's acid backbone.</li></ul>"}]},{title:"Grape Acid Source",subtitle:"2.70 â 3.00 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signals:</b> Malic Acid, Citric Acid.</li><li style='font-size: 16px'><b>Spectral Location:</b> 2.65 â 3.00 ppm</li><li style='font-size: 16px'><b>Signal Type:</b> Complex multiplets. Malic acid signals dominate the 2.65â2.90 ppm range. Citric acid, if present (common in acidified wines), appears as broad doublets around 2.70â2.95 ppm, heavily overlapping with Malic.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Acid Balance:</b> This region allows for the assessment of the ratio between fermentation acids (Succinic) and grape acids (Malic).</li><li style='font-size: 16px'><b>Stability Check:</b> In red wines, the depletion of the Malic signal here tracks MLF progress; in white wines, its stability confirms the preservation of crispness.</li></ul>"}]}],suggestedAnalyses:[{name:"Volatile Acidity (acetic acid)",method:"Sequential Analyzer",tat:"1 working day",summary:'Acetic acid is synonymous with "Volatile Acidity" (VA).',link:"https://www.etslabs.com/analyses/analysis/162040"},{name:"L-Malic Acid",method:"Sequential Analyzer",tat:"1 Working Day",summary:"One of the major organic acids found naturally in grapes, L-malic acid contributes sharp green flavors to wine, similar to a sour apple.",link:"https://www.etslabs.com/analyses/analysis/161942"},{name:"Citric Acid",method:"Sequential Analyzer",tat:"5 Working Days",summary:"One of several organic acids in wine, citric acid can be used to adjust acidity. ",link:"https://www.etslabs.com/analyses/analysis/161860"}],ppm:"2.0 - 3.0 ppm"},{title:"Fermentation Fingerprint",subregions:[{title:"Higher Alcohols & BCAAs",subtitle:"0.70 â 1.25 ppm.",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signals:</b> Leucine, Valine, Isoleucine, and Isopentanol.</li><li style='font-size: 16px'><b>Spectral Location:</b> 0.70 â 1.25 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> A complex cluster of overlapping doublets and triplets. Note: The massive Ethanol triplet (centered at ~1.18 ppm) falls in this range but is suppressed/zeroed to reveal these critical metabolites.</li></ul>"},{header:"Winemaking Insight",content:'<ul><li style="font-size: 16px"><b>Fermentation Byproducts:</b>
1 This region visualizes the "fusel oils" and branched-chain amino acids.</li><li style="font-size: 16px"><b>Yeast Metabolism:</b> High concentrations here can indicate specific yeast strain activity or stress responses during fermentation. These compounds contribute significantly to the aromatic complexity and "vinous" character of the wine.</li></ul>'}]},{title:"Malo-Lactic Indicators",subtitle:"1.30 â 1.45 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signal:</b> Lactic Acid.</li><li style='font-size: 16px'><b>Spectral Location:</b> 1.30 â 1.45 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> A specific doublet signal for Lactic Acid. The ethanol signal (~1.2 ppm) typically found nearby has been suppressed and zeroed to isolate this critical marker.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>MLF Confirmation:</b> The emergence of this signal is the definitive biological confirmation of Malolactic Fermentation (MLF).</li><li style='font-size: 16px'><b>Completion Status:</b> When this peakâs intensity stabilizes and correlates with the disappearance of Malic Acid in Region 2, MLF is chemically complete.</li></ul>"}]},{title:"Yeast Nitrogen Usage",subtilte:"1.45 â 1.85 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signal:</b> Alanine (with Arginine contributions).</li><li style='font-size: 16px'><b>Spectral Location:</b> 1.45 â 1.85 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> The distinct doublet of Alanine (~1.48 ppm) anchors this region. The upper end (1.60â1.85 ppm) captures the multiplet signals of other assimilable amino acids like Arginine.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Yeast Assimilation:</b> Alanine and Arginine offer retrospective insight into the fermentation's nitrogen dynamics (YAN usage).</li><li style='font-size: 16px'><b>Metabolic Footprint:</b> Unlike stable amino acids, levels of these compounds fluctuate based on yeast assimilation, serving as a record of nitrogen consumption during primary fermentation.</li></ul>"}]},{title:"Grape Maturity",subtitle:"1.90 â 2.05 ppm",content:[{header:"Signal Identification",content:"<ul><li style='font-size: 16px'><b>Primary Signal:</b> Proline.</li><li style='font-size: 16px'><b>Spectral Location:</b> 1.90 â 2.05 ppm.</li><li style='font-size: 16px'><b>Signal Type:</b> Prominent multiplet signals for Proline.</li></ul>"},{header:"Winemaking Insight",content:"<ul><li style='font-size: 16px'><b>Cultivar Differentiation:</b> Proline is the most abundant amino acid in many varietals (like Cabernet and Pinot) and remains relatively stable because yeast cannot easily assimilate it under anaerobic conditions.</li><li style='font-size: 16px'><b>Maturity Marker:</b> Because it is preserved from the grape to the wine, this sub-region serves as a key marker for grape maturity, environmental stress (drought), and varietal fingerprinting.</li></ul>"}]}],ppm:"0.8 - 2.0 ppm",suggestedAnalyses:[{name:"Ethanol",method:"GC-FID",tat:"1 Working Day",summary:"Also known simply as alcohol, or grain alcohol, ethanol is the primary alcohol found in wine. Ethanol is a critical constituent of wine and is produced from sugar during fermentation.",link:"https://www.etslabs.com/analyses/analysis/161880"},{name:"Methanol",method:"GC-FID",tat:"3 Working Days",summary:"Methanol is one of the alcohols found in wine, and can be produced during fermentation by the enzyme pectin methylesterase. This enzyme converts chemicals found in pectin into methanol.",link:"https://www.etslabs.com/analyses/analysis/161952"},{name:"L-Lactic Acid",method:"Sequential Analyzer",tat:"1 Working Day",summary:"L-Lactic acid is one of the many compounds present that contributes to the overall acidity and flavor profile of wine.",link:"https://www.etslabs.com/analyses/analysis/161939"},{name:"Alpha-Amino Compounds (NOPA)",method:"Sequential Analyzer",tat:"1 Working Day",summary:"Alpha Amino Nitrogen, also referred to as Nitrogen by OPA, or NOPA, measures the amount of primary amino acids available for use by yeast during fermentation.",link:"https://www.etslabs.com/analyses/analysis/161819"}]}],kk=({open:e,setOpen:t,region:a,setRegion:n,baseline:i,sample:r,comparisonData:s,focus:o,setFocus:l})=>{var c,d;const u=Rk[null!=a?a:0],[h,v]=m.exports.useState(0),g=()=>{l(null),t(!1)},y=e=>"back"===e?0===a?ZR[JR.length-1]:ZR[a-1]:a===JR.length-1?ZR[0]:ZR[a+1];return p(wi,{open:e,setModal:g,large:!0,children:R("div",{className:ek,children:[R("div",{className:tk,children:[R("div",{className:nk,children:[R(Vt,{variant:"h4",children:[u.title," Region - Detailed View"]}
1),R("div",{className:ik,children:[R($t,{variant:"small",className:rk,children:["Baseline - ",i.description]}),r&&p($t,{variant:"small",className:sk,children:r.description}),p($t,{variant:"small",children:u.ppm})]})]}),p(Sn,{spriteUrl:gp,className:ak,onClick:g})]}),R("div",{className:ok,children:[s&&R("div",{className:lk,children:[p(Vt,{variant:"h5",children:"Difference Spectrum"}),R($t,{variant:"standard",children:[u.title,": Sub Regions"]}),p(rR,{data:null!=(c=s.reportData)?c:null,focusRegion:o})]}),R("div",{className:lk,children:[p(Vt,{variant:"h5",children:"NMR Spectra"}),R($t,{variant:"standard",children:[u.title,": Sub Regions"]}),r&&p(JT,{secondaryData:r.spectrumData,data:i.spectrumData,focusRegion:o}),!r&&p(JT,{data:i.spectrumData,focusRegion:o})]}),R("div",{className:ck,children:[u.subregions.length>1&&p("div",{className:dk,children:u.subregions.map(((e,t)=>p("div",{className:I(mk,{[pk]:t===h}),onClick:()=>v(t),"tab-position":0===t||t===u.subregions.length-1?0===t?"left":"right":"middle",children:p($t,{variant:"big",children:e.title})},t)))}),R("div",{className:hk,children:[R(Vt,{variant:"h5",className:uk,children:["About ",null==(d=u.subregions[h])?void 0:d.title," Sub Region"]}),u.subregions[h].content.map(((e,t)=>R("div",{className:vk,children:[p($t,{variant:"standard",children:e.header}),p($t,{children:p(mn,{html:e.content})})]},t)))]})]}),u&&u.suggestedAnalyses&&u.suggestedAnalyses.length>0&&R("div",{className:gk,children:[p(Vt,{variant:"h5",className:uk,children:"Suggested Analyses"}),p("div",{className:yk,children:u.suggestedAnalyses&&u.suggestedAnalyses.map(((e,t)=>R("div",{className:bk,children:[R("div",{className:_k,children:[p($t,{variant:"big",children:e.name}),R("div",{className:Nk,children:[R($t,{variant:"small",className:fk,children:["Method: ",e.method]}),R($t,{variant:"small",className:fk,children:["TAT: ",e.tat]})]})]}),p($t,{variant:"standard",children:e.summary}),p("div",{className:Ck,children:p(P,{variant:"contained",href:e.link,target:"_blank",size:"small",className:xk,children:"View Analysis"})})]},t)))})]})]}),R("div",{className:Sk,children:[p(P,{variant:"outlined",size:"small",className:Ak,startIcon:p(Sn,{spriteUrl:Xh,className:ak}),onClick:()=>{0===a?(n(JR.length-1),l(JR[JR.length-1])):(n(a-1),l(JR[a-1])),v(0)},children:R("div",{className:Ik,"button-align":"left",children:[p($t,{variant:"small",className:Tk,children:"Previous"}),p($t,{className:wk,children:y("back")})]})}),p(P,{variant:"outlined",size:"small",className:Ak,endIcon:p(Sn,{spriteUrl:nr,className:ak}),onClick:()=>{a===JR.length-1?(n(0),l(JR[0])):(n(a+1),l(JR[a+1])),v(0)},children:R("div",{className:Ik,"button-align":"right",children:[p($t,{variant:"small",className:Tk,children:"Next"}),p($t,{className:wk,children:y("next")})]})})]})]})})},Ek=()=>{var e,t;const{activeClient:a}=m.exports.useContext(_a),n=h(),i=A(n.breakpoints.up("lg")),r=m.exports.useRef(null),s=m.exports.useRef(null),c=f(),[d,u]=m.exports.useState(!0),[v,g]=m.exports.useState(!1),[y,b]=m.exports.useState(!1),[_,N]=m.exports.useState(!1),[C,S]=m.exports.useState(!1),[x,I]=m.exports.useState(0),[w,T]=m.exports.useState(null),[k,E]=m.exports.useState({searchTerm:"",page:1,material:"",status:"",startDate:"",endDate:"",clientCode:a.code}),{data:M,isFetched:D}=KR(k),[P,L]=m.exports.useState([]),B=e=>{"chart"===e?r.current&&r.current.scrollIntoView({behavior:"smooth",block:"start"}):s.current&&s.current.scrollIntoView({behavior:"smooth",block:"start"})};m.exports.useEffect((()=>{"true"===localStorage.getItem("doNotShowComparisonModal")&&u(!1)}),[]),m.exports.useEffect((()=>{D&&M&&L([M.data.find((e=>"Completed"===e.status))||{}])}),[D,M]),m.exports.useEffect((()=>{D&&M&&P.length>0&&H()}),[P]);const{data:O,isFetched:F,refetch:H}=XR(a.code,M&&M.data.length>0&&P&&P.length>0&&P[0]?P[0].id:"",D&&P.length>0&&!!M&&M.data.length>0),[U,z]=m.exports.useState(null!=O?O:{});m.exports.useEffect((()=>{O&&D&&z(O)}),[O,D]);const G=YR();return R("div",{className:qT.container,children:[M&&M.data.length<2&&p("div",{className:qT.welcome,children:p(Vt,{variant:"h5",children:"Some sort of welcome / marketing"})}),R("div",{className:qT.quickActions,children:[p(Vt,{variant:"h5",children:"Qu
1ick Actions"}),R("div",{className:qT.cardsContainer,children:[p(VT,{amount:"Start Comparing",action:()=>{d?b(!0):c(Tt.NMR_COMPARE)},emphasize:!0}),p(VT,{amount:"Recent Comparisons",action:()=>N(!0)}),p(VT,{amount:"20",label:"Completed Reports",path:Tt.NMR_REPORTS}),p(VT,{amount:"28",label:"Completed Samples",action:()=>B("samples")})]}),p(Wu,{open:_,setOpen:N}),p(bp,{open:y,setOpen:b,show:d,setShow:u,showHandler:()=>{u(!1),localStorage.setItem("doNotShowComparisonModal","true")}})]}),R("div",{className:qT.signaturePreview,children:[M&&M.data.length>0&&P&&P[0]&&R("div",{className:qT.chartContainer,ref:r,children:[R("div",{className:qT.chartHeader,children:[R(Vt,{variant:"h5",children:[P.length>0?P[0].description:""," NMR Spectrum"]}),p(Sn,{className:qT.icon,spriteUrl:v?"/assets/minimizeIcon.d200dd56.svg":"/assets/maximizeIcon.c764c9bd.svg",onClick:()=>g(!v)})]}),v&&U&&R("div",{className:qT.chart,children:[p(JT,{data:U.spectrumData,focusRegion:null,onRegionClick:e=>{((e,t)=>{if(console.log("region num",t,"focus",e),t)I(t),console.log("focus",e),T(e),S(!0);else{const t=JR.indexOf(e);if(console.log("regionIndex",t),!(t>-1))return void console.log("could not find region index from region text (probably not passed)");I(t),console.log("focus",e),T(e),S(!0)}})(e)}}),p(kk,{open:C,setOpen:S,region:x,setRegion:I,baseline:U,focus:w,setFocus:T})]})]}),R("div",{className:qT.samplesContainer,ref:s,children:[R("div",{className:qT.header,children:[p(Vt,{variant:"h5",children:"NMR Sample Library"}),p(QR,{queryOptions:k,setQueryOptions:E})]}),i?p(Lu,{rowCount:null!=(e=null==M?void 0:M.totalItems)?e:0,rows:null!=(t=null==M?void 0:M.data)?t:[],columns:G,getRowId:e=>e.id,onRowClick:e=>{(e=>{"Completed"===e.row.status&&L([e.row])})(e),g(!0),B("chart")},showPagination:!1,checkboxSelection:!1,stylingNMR:!0,clickableRows:!0,selectedNMRSamples:P,setSelectedNMRSamples:L}):R("div",{className:qT.mobileSamples,children:[null==M?void 0:M.data.map((e=>p(FR,{sample:e,selectedSamples:P,setSelectedSamples:L,singleSelect:!0}))),(null==M?void 0:M.totalItems)&&p(nv,{totalItems:M.totalItems,currentPage:k.page,cardsPerPage:50,cardsPerPageOptions:[50,100,150],onCardsPerPageChange:e=>{E((e=>l(o({},e),{start:1})))},onGoPreviousPage:()=>{E((e=>l(o({},e),{start:e.page-1})))},onGoNextPage:()=>{E((e=>l(o({},e),{start:e.page+1})))}})]})]})]})]})};var Mk="SampleLibrary_container_1",Dk="SampleLibrary_restartButtonContainer_6",Pk="SampleLibrary_restartButton_6",Lk="SampleLibrary_restartBtnIcon_17",Bk="SampleLibrary_samples_28",Ok="SampleLibrary_choosePathContainer_41",Fk="SampleLibrary_cards_57",Hk="SampleLibrary_button_67",Uk="SampleLibrary_sampleCartContainer_78";var zk="SamplesColumns_cellContainerWrap_30",Gk="SamplesColumns_tableHeader_52",qk="SamplesColumns_tableHeaderContainer_58",Wk="SamplesColumns_status_65",Vk="SamplesColumns_completed_84",Yk="SamplesColumns_selectButton_91",jk="SamplesColumns_selectedButton_103",$k="SamplesColumns_iconBtn_116",Qk="SamplesColumns_plus_122";const Kk=(e,t)=>{Wt();return[{field:"description",sortable:!1,renderHeader:()=>p(me,{title:"Samples",children:p("div",{className:qk,children:p(Vt,{variant:"h6",className:Gk,children:"Samples"})})}),flex:.75,renderCell:e=>p("div",{className:zk,children:p(Vt,{variant:"h6",children:e.value})})},{field:"loggedAt",sortable:!1,renderHeader:()=>p(me,{title:"Logged Date",children:p("div",{className:qk,children:p(Vt,{variant:"h6",className:Gk,children:"Logged Date"})})}),flex:.5,renderCell:e=>p("div",{className:zk,children:p(Vt,{variant:"h6",children:e.value?Gu(e.value):""})})},{field:"testDate",sortable:!1,renderHeader:()=>p(me,{title:"Test Date",children:p("div",{className:qk,children:p(Vt,{variant:"h6",className:Gk,children:"Test Date"})})}),flex:.5,renderCell:e=>p("div",{className:zk,children:p(Vt,{variant:"h6",children:e.value?Gu(e.value):""})})},{field:"status",sortable:!1,renderHeader:()=>p(me,{title:"Status",children:p("div",{className:qk,children:p(Vt,{variant:"h6",className:Gk,children:"Status"})})}),flex:.5,renderCell:e=>p("div",{className:zk,children:R(Vt,{variant:"h6",className:I(Wk,{[Vk]:"Completed"===e.value}),children:[p("span",{}),e.value]})})},{field:"actions",sortable:!1,renderHeader:()=>p(me,{title:"Actions",children:p("div",{className:qk,children:p(Vt,{variant:"h6",className:Gk,children:"Actions"})})}),flex:.5,renderCell:a=>{const n=a.api.isRowSelected(a.id);return p("div",{className:zk,children:"Completed"===a.row.status&&p(P,{variant:"outlined",size:"small",onClick:()=>((a,n)=>{if(n)e(t.filter((e=>e.id!==a.id)));else if(t.length<8){const n={id:a.id,friendlyNumber:a.friendlyNumber,description:a.description,collectionDate:a.collectionDate,validationStatus:a.validationStatus,loggedAt:a.loggedAt,testDate:a.testDate,clientCode:a.clientCode,batchNumber:a.batchNumber,sampleType:a.sampleType,analysisType:a.analysisType,status:a.status};e([...t,n])}})(a.row,n),className:n?jk:Yk,startIcon:n?p(Sn,{spriteUrl:gp,className:$k}):p($t,{variant:"big",className:Qk,children:"+"}),children:n?"Selected":"Add Sample"})})}}]};
1var Xk="SampleCart_container_1",Zk="SampleCart_header_11",Jk="SampleCart_title_16",eE="SampleCart_button_22",tE="SampleCart_samplesList_25",aE="SampleCart_sample_25",nE="SampleCart_icon_41";var iE="CompareSamplesWizard_button_1",rE="CompareSamplesWizard_container_11",sE="CompareSamplesWizard_right_17",oE="CompareSamplesWizard_left_23",lE="CompareSamplesWizard_headerText_32",cE="CompareSamplesWizard_subheaderText_37",dE="CompareSamplesWizard_blueText_41",mE="CompareSamplesWizard_helperTextContainer_46",pE="CompareSamplesWizard_dragDropAnimation_52",uE="CompareSamplesWizard_line_60",hE="CompareSamplesWizard_handImg_63",vE="CompareSamplesWizard_image_66",gE="CompareSamplesWizard_item_69",yE="CompareSamplesWizard_itemOrdering_77",bE="CompareSamplesWizard_itemNumber_87",_E="CompareSamplesWizard_helpContainer_97",NE="CompareSamplesWizard_header_32",fE="CompareSamplesWizard_tabsContainer_124",CE="CompareSamplesWizard_headerTabs_134",SE="CompareSamplesWizard_tab_124",xE="CompareSamplesWizard_itemActive_150",AE="CompareSamplesWizard_completeHeader_154",IE="CompareSamplesWizard_iconContainer_161",wE="CompareSamplesWizard_icon_161",TE="CompareSamplesWizard_contentHeader_173",RE="CompareSamplesWizard_contentHeaderText_179",kE="CompareSamplesWizard_contentSubheaderText_182",EE="CompareSamplesWizard_finishedContainer_190",ME="CompareSamplesWizard_text_203",DE="CompareSamplesWizard_finishedHelperText_206",PE="CompareSamplesWizard_content_173",LE="CompareSamplesWizard_helperText_46",BE="CompareSamplesWizard_samplesContainer_253",OE="CompareSamplesWizard_labelText_266",FE="CompareSamplesWizard_divider_269",HE="CompareSamplesWizard_orderedSamples_280",UE="CompareSamplesWizard_summaryContainer_300",zE="CompareSamplesWizard_cardsContainer_304",GE="CompareSamplesWizard_selectedSamples_325",qE="CompareSamplesWizard_reviewRow_331",WE="CompareSamplesWizard_reviewBox_341",VE="CompareSamplesWizard_selectedOption_350",YE="CompareSamplesWizard_formInput_378",jE="CompareSamplesWizard_footer_392",$E="CompareSamplesWizard_click_412",QE="CompareSamplesWizard_navigationButton_416",KE="CompareSamplesWizard_actionButton_444",XE="CompareSamplesWizard_footerHelp_450",ZE="/assets/twoTubes.ea1f8ac0.svg",JE="/assets/questionMarkIcon.ff6717d0.svg";var eM={container:"WizardSampleCard_container_1",icon:"WizardSampleCard_icon_31",orderingContainer:"WizardSampleCard_orderingContainer_36",ordering:"WizardSampleCard_ordering_36",orderingNumber:"WizardSampleCard_orderingNumber_51",itemActive:"WizardSampleCard_itemActive_54",itemInert:"WizardSampleCard_itemInert_66",itemNormal:"WizardSampleCard_itemNormal_73",blueText:"WizardSampleCard_blueText_84",sampleContent:"WizardSampleCard_sampleContent_87",section:"WizardSampleCard_section_11"};const tM=({sample:e,baseline:t,setBaseline:a,ordering:n,index:i})=>{const r=h(),s=A(r.breakpoints.up("lg"));return R("div",{className:I(eM.container,{[eM.itemActive]:!n&&t.id===e.id,[eM.inertItem]:!!n&&e.id===t.id,[eM.itemNormal]:!n||e.id!==t.id}),onClick:()=>{n||(t.id===e.id?a({}):a(e))},"ordering-item":n?"true":"false",children:[!n&&p(ue,{checked:t.id===e.id,icon:p(Sn,{spriteUrl:"/assets/circularCheck.b20300e7.svg",className:eM.icon}),checkedIcon:p(Sn,{spriteUrl:"/assets/circularCheckFilled.e66354c2.svg",className:eM.icon}),sx:{"&.Mui-checked":{color:"#5160EB"},"&:hover":{backgroundColor:"#5161eb09"}}}),n&&p("div",{className:eM.orderingContainer,children:p("div",{className:eM.ordering,children:p($t,{variant:"standard",className:eM.orderingNumber,children:i+1})})}),R("div",s?{className:eM.sampleContent,children:[R("div",{className:eM.section,children:[p($t,{variant:"standardSemiBold",children:e.description}),p($t,{className:eM.blueText,children:e.sampleType})]}),R("div",{className:eM.section,children:[p($t,{}),p($t,{className:eM.blueText,children:e.testDate?Gu(e.testDate):""})]})]}:{className:eM.sampleContent,children:[p("div",{className:eM.section,children:p($t,{variant:"standardSemiBold",children:e.description})}),p("div",{className:eM.section,children:p($t,{className:eM.blueText,children:e.testDate?Gu(e.testDate):""})}),R("div",{className:eM.section,children:[p($t,{className:eM.blueText,children:e.sampleType}),p($t,{})]})]})]},e.id)};var aM={container:"WizardHelpCard_container_1",content:"WizardHelpCard_content_16",contentText:"WizardHelpCard_contentText_29",iconHeader:"WizardHelpCard_iconHeader_34",iconBaseHeader:"WizardHelpCard_iconBaseHeader_48",containerSelectable:"WizardHelpCard_containerSelectable_61",itemActive:"WizardHelpCard_itemActive_69",checkbox:"WizardHelpCard_checkbox_75",icon:"WizardHelpCard_icon_34",iconBase:"WizardHelpCard_iconBase_48",titleText:"WizardHelpCard_titleText_104"};const nM=({icon:e,title:t,description:a,selectable:n,selectedOption:i,setSelectedOption:r,alignment:s})=>{const o=h(),l=A(o.breakpoints.up("lg"));return R("div",{className:I(aM.container,{[aM.itemActive]:n&&i&&i===t,[aM.containerSelectable]:n}),onClick:()=>{n&&r&&(r(t),r(i===t?"":t))},children:[n&&i&&i===t&&p(ue,{checked:i===t,className:aM.checkbox,sx:{"&.Mui-checked":{color:"#5160EB"}}}),R("div",{className:aM.content,"content-alignment":s,children:[n&&l&&p(Sn,{spriteUrl:e,className:"How does it Work?"===t||"How Should I Select One?"===t?aM.iconBase:aM.icon}),R("div",{className:aM.contentText,children:[R(Vt,{variant:"h4",className:aM.titleText,children:[!n&&l&&p(Sn,{spriteUrl:e,className:"How does it Work?"===t||"How Should I Select One?"===t?aM.iconBaseHeader:aM.iconHeader}),t]}),p($t,{variant:"standard",className:aM.text,children:a})]})]})]})},iM=({selectedSamples:e,setSelectedSamples:t,reportType:a,clientCode:n})=>{const i=f(),r=Wt(),s=h(),c=A(s.breakpoints.up("lg")),[d,u]=m.exports.useState(!1),[v,g]=m.exports.useState(0),[y,b]=m.exports.useState(!1),[_,N]=m.exports.useState(""),[C,S]=m.exports.useState(""),[w,T]=m.exports.useState({}),[E,M]=m.exports.useState(""),[D,L]=m.exports.useState(!1),[B,F]=m.exports.useState({notes:"",poNum:""}),[U,z]=m.exports.useState(""),{mutateAsync:G,isLoading:q}=(()=>{Wt();const e=m.exports.useContext(Na);return x(qu.createNMRReportOrder,{onSuccess:e=>{console.log("Create NMR report order",e)},onError:t=>{console.error("Create NMR report order error",t),e.open(fa(t,"Create NMR report order error"),{severity:"error"})}})})(),{mutateAsync:W}=x(qu.cacheNMRSampleData,{onSuccess:e=>{console.log("Started caching process for NMR Sample data",e)},onError:e=>{console.error("Started caching process for NMR Sample data error",e)}}),{mutateAsync:V}=x(qu.cacheNMRComparisonData,{onSuccess:e=>{console.log("Started caching process for NMR Comparison data",e)},onError:e=>{console.error("Started caching process for NMR Comparison data error",e)}}),[Y,j]=m.exports.useState(!1);m.exports.useEffect((()=>
1{if(D){const e=setTimeout((()=>{q||j(!0)}),0);return()=>clearTimeout(e)}}),[D,q]);const $=[{title:"Select Your Baseline",subtitle:"Select one sample to serve as your reference baseline. All other selected samples will be compared against this baseline."},{title:"Review Your Selected Options",subtitle:"Review the options you have selected for baseline sample and the samples that will be compared against the baseline."}],K=[{title:"Select Your Baseline",subtitle:"Select one sample to serve as your reference baseline. All other selected samples will be compared against this baseline."},{title:"Set the Order of Your Samples",subtitle:"Drag and Drop the samples in the order you would like them to be displayed."},{title:"Review Your Selected Options",subtitle:"Review the options you have selected for baseline sample and the samples that will be compared against the baseline."}],X=[{title:"Understanding Your Baseline",subtitle:"Learn what a bseline is and how to choose the right one for your analysis"}],Z=[{title:"Please, Choose Your Baseline",subtitle:"Select the basline you want to use as your reference point. All other samples will be compared against this one.",helpQ:"Not sure what a baseline is?",helpAction:"Learn how to choose one!"},{title:"Report Overview",subtitle:"Multi-Point Comparison"!==a?"Once the preview opens, you can interactively switch between comparison samples to explore different pairings":`${r("nmr-wizard-revire-multi-desc")}. Turnaround time for the report can be up to 5 business days.`,helpQ:"",helpAction:""}],J=[{title:"Please, Choose Your Baseline",subtitle:"Select the basline you want to use as your reference point. All other samples will be compared against this one.",helpQ:"Not sure what a baseline is?",helpAction:"Learn how to choose one!"},{title:"Please, Set Sample Order",subtitle:"Set the order of the samples. The order by default is set based on the provided sampling date of the sample.",helpQ:"",helpAction:""},{title:"Report Overview",subtitle:"Multi-Point Comparison"!==a?"Once the preview opens, you can interactively switch between comparison samples to explore different pairings":`${r("nmr-wizard-revire-multi-desc")}. Turnaround time for the report can be up to 5 business days.`,helpQ:"",helpAction:""}],ee=[R($t,{variant:"standard",className:LE,children:[r("nmr-wizard-help-baseline")," ",p("span",{onClick:()=>b(!0),className:$E,children:r("nmr-help-baseline-link")})]})],te=()=>{u(!1),g(0),ae()},ae=()=>{if("Multi-Point Comparison"===a&&1===v){const a=e.filter((e=>e.id!==w.id));t([w,...a])}},ne=e=>!(0===e&&!w.description);m.exports.useEffect((()=>{Y&&i(Q(Tt.NMR_GENERATED_REPORT,{reportId:U,reportType:a.includes("Multi")?"multipoint_comparison":a}))}),[Y]),m.exports.useEffect((()=>{d&&((async()=>{console.log("Start caching Sample Data");const t=e.map((e=>e.id)),a={clientCode:n,sampleIds:t};await W(a)})(),ie())}),[d]);const ie=()=>{e.sort(((e,t)=>new Date(e.collectionDate).getTime()-new Date(t.collectionDate).getTime()))};function re(){return R(m.exports.Fragment,{children:[p("svg",{width:0,height:0,children:p("defs",{children:R("linearGradient",{id:"my_gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"#ce5c7998"}),p("stop",{offset:"100%",stopColor:"#97a0f38f"})]})})}),p(O,{size:"13vh",sx:{"svg circle":{stroke:"url(#my_gradient)"}}})]})}return R(k,{children:[p(P,{className:iE,variant:"contained",onClick:()=>u(!0),disabled:e.length<2,children:r("nmr-wizard-btn")}),p(wi,{open:d,setModal:te,large:!0,children:R("div",{className:rE,children:[c&&!D&&R("div",{className:oE,children:[p(Vt,{variant:"h3",className:lE,children:"Multi-Point Comparison"===a?J[v].title:Z[v].title}),!y&&p($t,{variant:"big",className:cE,children:"Multi-Point Comparison"===a?J[v].subtitle:Z[v].subtitle}),!y&&R("div",{className:mE,children:[p($t,{variant:"big",children:"Multi-Point Comparison"===a?J[v].helpQ:Z[v].helpQ}),p($t,{variant:"big",className:dE,onClick:()=>b(!0),children:"Multi-Point Comparison"===a?J[v].helpAction:Z[v].helpAction})]}),y&&0===v&&R("div",{className:_E,children:[p(nM,{icon:ZE,title:r("nmr-wiz-base-help-1-title"),description:r("nmr-wiz-base-help-1-desc")}),p(nM,{icon:"/assets/checkboxSelect.9890f7e2.svg",title:r("nmr-wiz-base-help-2-title"),description:r("nmr-wiz-base-help-2-desc")}
1),p(nM,{icon:JE,title:r("nmr-wiz-base-help-3-title"),description:r("nmr-wiz-base-help-3-desc")}),p($t,{variant:"big",className:dE,onClick:()=>b(!1),style:{textAlign:"right"},children:"Got it!"})]}),!y&&"Multi-Point Comparison"===a&&1===v&&R("div",{className:pE,children:[p("div",{className:gE,children:p("div",{className:yE,children:p($t,{variant:"standard",className:bE,children:"1"})})}),p("div",{className:uE}),p(Qe.div,{animate:{x:[0,0,0,0,0,0,0,0,0,0],y:[0,0,0,82,82,82,82,0,0,0]},transition:{duration:4,ease:"easeInOut",times:[0,.1,.2,.3,.4,.5,.6,.7,.8,1],repeat:1/0,repeatType:"loop",repeatDelay:1},className:gE,children:p("div",{className:yE,children:p($t,{variant:"standard",className:bE})})}),p(Qe.div,{animate:{x:[0,0,0,0,0,0,0,0,0,0],y:[0,0,0,-82,-82,-82,-82,0,0,0]},transition:{duration:4,ease:"easeInOut",times:[0,.1,.2,.3,.4,.5,.6,.7,.8,1],repeat:1/0,repeatType:"loop",repeatDelay:1},className:gE,children:p("div",{className:yE,children:p($t,{variant:"standard",className:bE})})}),p("div",{className:gE,children:p("div",{className:yE,children:p($t,{variant:"standard",className:bE,children:"4"})})}),R("div",{children:[p(Qe.div,{className:hE,animate:{x:[270,270,270,270,270,230,230,230,230,270],y:[-130,-130,-130,-212,-212,-130,-130,-212,-212,-130]},transition:{duration:4,ease:"easeInOut",times:[0,.1,.2,.3,.4,.5,.6,.7,.8,1],repeat:1/0,repeatType:"loop",repeatDelay:1},children:p("img",{src:"/assets/hand.0d6eb214.png",className:vE})}),p(Qe.div,{animate:{x:[27,27,27,27,27,27,27,27,27,27],y:[-253,-253,-253,-253,-253,-253,-253,-253,-253,-253],opacity:[1,1,1,0,1,1,1,0,1,1]},style:{color:"white"},transition:{duration:4,ease:"easeInOut",times:[0,.1,.2,.25,.4,.5,.6,.65,.8,1],repeat:1/0,repeatType:"loop",repeatDelay:1},children:p($t,{variant:"standard",children:"2"})}),p(Qe.div,{animate:{x:[27,27,27,27,27,27,27,27,27,27],y:[-197,-197,-197,-197,-197,-197,-197,-197,-197,-197],opacity:[1,1,1,0,1,1,1,0,1,1]},style:{color:"white"},transition:{duration:4,ease:"easeInOut",times:[0,.1,.2,.25,.4,.5,.6,.65,.8,1],repeat:1/0,repeatType:"loop",repeatDelay:1},children:p($t,{variant:"standard",children:"3"})})]})]})]}),R("div",{className:sE,children:[R("div",{className:NE,children:[R("div",{className:fE,children:[!D&&R("div",{className:CE,children:[p("div",{className:I(SE,{[xE]:0===v||1===v||2===v})}),p("div",{className:I(SE,{[xE]:1===v||2===v})}),"Multi-Point Comparison"===a&&p("div",{className:I(SE,{[xE]:2===v})})]}),D&&p("div",{className:AE}),p("div",{className:I(IE,{[xE]:1===v}),children:p(Sn,{onClick:te,spriteUrl:gp,className:wE})})]}),!D&&R("div",{className:TE,children:[p(Vt,{variant:"h3",className:RE,children:y?c&&0===v?"Multi-Point Comparison"===a?K[v].title:$[v].title:X[v].title:"Multi-Point Comparison"===a?K[v].title:$[v].title}),p($t,{variant:"standard",className:kE,children:y?c&&0===v?"Multi-Point Comparison"===a?K[v].subtitle:$[v].subtitle:X[v].subtitle:"Multi-Point Comparison"===a?K[v].subtitle:$[v].subtitle})]})]}),!D&&R(k,{children:[R("div",{className:PE,children:[0===v&&(!y||c)&&p("div",{className:BE,children:e.map(((e,t)=>p(tM,{sample:e,baseline:w,setBaseline:T,index:t})))}),0===v&&y&&!c&&R("div",{className:_E,children:[p(nM,{icon:ZE,title:r("nmr-wiz-base-help-1-title"),description:r("nmr-wiz-base-help-1-desc")}),p(nM,{icon:"/assets/checkboxSelect.9890f7e2.svg",title:r("nmr-wiz-base-help-2-title"),description:r("nmr-wiz-base-help-2-desc")}),p(nM,{icon:JE,title:r("nmr-wiz-base-help-3-title"),description:r("nmr-wiz-base-help-3-desc")})]}),"Multi-Point Comparison"===a?R(k,{children:[1===v&&R("div",{className:BE,children:[R("div",{className:FE,children:[p($t,{variant:"standard",className:OE,children:"Baseline"}),p("span",{})]}),p(tM,{sample:w,baseline:w,setBaseline:T,ordering:!0,index:0}),R("div",{className:FE,children:[p($t,{variant:"standard",className:OE,children:"Samples"}),p("span",{})]}),p(st.Group,{values:e,onReorder:t,className:HE,children:e.filter((e=>e.id!==w.id)).map(((e,t)=>p(st.Item,{value:e,children:p(tM,{sample:e,baseline:w,setBaseline:T,ordering:!0,index:t+1})},e.id)))})]}),2===v&&p("div",{className:UE,children:R("div",{className:zE,children:[R("div",{className:qE,children:[R("div",{className:WE,children:[R("div",{children:[p($t,{variant:"big",children:"Report Name"}),p($t,{variant:"standard",className:dE,children:"Name your report so you can easily find it later."})]}
1),p(H,{name:"reportName",value:_,onChange:e=>N(null==e?void 0:e.target.value),placeholder:"Name your report (optional)",className:YE,InputLabelProps:{sx:{color:"#8c8d96",backgroundColor:"transparent","&.Mui-focused":{color:"#5160EB"}},shrink:!0},sx:{"& .MuiInput-underline:after":{borderBottomColor:"#5160EB",borderBottomWidth:"2px"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"},"& fieldset":{borderColor:"#3B54B01A"}}}})]}),R("div",{className:WE,children:[R("div",{children:[p($t,{variant:"big",children:"Report Notes"}),p($t,{variant:"standard",className:dE,children:"Add additional notes about the samples for later."})]}),p(H,{name:"notes",value:B.notes,onChange:e=>{F((t=>l(o({},t),{notes:null==e?void 0:e.target.value})))},placeholder:"Purpose / Notes (optional)",className:YE,InputLabelProps:{sx:{color:"#8c8d96",backgroundColor:"transparent","&.Mui-focused":{color:"#5160EB"}},shrink:!0},sx:{"& .MuiInput-underline:after":{borderBottomColor:"#5160EB",borderBottomWidth:"2px"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"},"& fieldset":{borderColor:"#3B54B01A"}}}})]})]}),p("div",{className:qE,children:R("div",{className:WE,children:[R("div",{children:[p($t,{variant:"big",children:r("nmr-wiz-re-base-title")}),p($t,{variant:"standard",className:dE,children:r("nmr-wiz-re-base-desc")})]}),p($t,{variant:"big",className:VE,children:w.description})]})}),R("div",{className:WE,children:[R("div",{children:[R($t,{variant:"big",children:[r("nmr-wiz-re-samples-title")," ",R("span",{className:ME,children:["(",e.length-1,")"]})]}),p($t,{variant:"standard",className:dE,children:r("nmr-wiz-re-samples-desc")})]}),p("div",{className:VE,children:e.map((e=>e.id!==w.id&&R("div",{className:GE,children:[p($t,{variant:"standard",children:e.description}),p($t,{variant:"standard",children:e.testDate?Gu(e.testDate):""})]})))})]})]})})]}):p(k,{children:1===v&&p("div",{className:UE,children:R("div",{className:zE,children:[R("div",{className:qE,children:[R("div",{className:WE,children:[R("div",{children:[p($t,{variant:"big",children:"Report Name"}),p($t,{variant:"standard",className:dE,children:"Name your report so you can easily find it later."})]}),p(H,{name:"reportName",value:_,onChange:e=>N(null==e?void 0:e.target.value),placeholder:"Name your report (optional)",className:YE,InputLabelProps:{sx:{color:"#8c8d96",backgroundColor:"transparent","&.Mui-focused":{color:"#5160EB"}},shrink:!0},sx:{"& .MuiInput-underline:after":{borderBottomColor:"#5160EB",borderBottomWidth:"2px"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"},"& fieldset":{borderColor:"#3B54B01A"}}}})]}),R("div",{className:WE,children:[R("div",{children:[p($t,{variant:"big",children:"Report Notes"}),p($t,{variant:"standard",className:dE,children:"Add additional notes about the samples for later."})]}),p(H,{name:"notes",value:B.notes,onChange:e=>{F((t=>l(o({},t),{notes:null==e?void 0:e.target.value})))},placeholder:"Purpose / Notes (optional)",className:YE,InputLabelProps:{sx:{color:"#8c8d96",backgroundColor:"transparent","&.Mui-focused":{color:"#5160EB"}},shrink:!0},sx:{"& .MuiInput-underline:after":{borderBottomColor:"#5160EB",borderBottomWidth:"2px"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"},"& fieldset":{borderColor:"#3B54B01A"}}}})]})]}),p("div",{className:qE,children:R("div",{className:WE,children:[R("div",{children:[p($t,{variant:"big",children:r("nmr-wiz-re-base-title")}),p($t,{variant:"standard",className:dE,children:r("nmr-wiz-re-base-desc")})]}),p($t,{variant:"big",className:VE,children:w.description})]})}),R("div",{className:WE,children:[R("div",{children:[R($t,{variant:"big",children:[r("nmr-wiz-re-samples-title")," ",R("span",{className:ME,children:["(",e.length-1,")"]})]}),p($t,{variant:"standard",className:dE,children:r("nmr-wiz-re-samples-desc")})]}),p("div",{className:VE,children:e.map((e=>e.id!==w.id&&R("div",{className:GE,children:[p($t,{variant:"standard",children:e.description}),p($t,{variant:"standard",children:e.testDate?Gu(e.testDate):""})]})))})]})]})})})]}),R("div",y?0===v&&c?{className:jE,children:[p(P,{variant:"outlined",disabled:0===v,onClick:()=>{g(v-1),b(!1),ae()},startIcon:p(Sn,{spriteUrl:Xh,className:wE}),className:QE,children:r("nmr-wiz-back")}),p(P,{variant:"outlined",onClick:()=>{g(v+1),b(!1)},endIcon:p(Sn,{spriteUrl:nr,className:wE}),className:QE,disabled:!ne(v),children:r("nmr-wiz-next")})]}:{className:XE,children:[p(P,{variant:"outlined",onClick:()=>b(!1),className:QE,children:r("nmr-wiz-back-opt")}),0===v&&p(P,{variant:"contained",className:KE,onClick:()=>{S("Compare Samples"===E||"Verify Identity"===E?"Comparison":"Monitor Consistency"===E?"Multi-Point Comparison":""),b(!1)},children:r("nmr-wiz-select-opt")})]}:{className:jE,children:[p(P,{variant:"outlined",disabled:0===v,onClick:()=>{g(v-1),ae()},startIcon:p(Sn,{spriteUrl:Xh,className:wE}),className:QE,children:r("nmr-wiz-back")}),1!==v&&!c&&ee[v],("Multi-Point Comparison"===a?2!==v:1!==v)&&p(P,{variant:"outlined",onClick:()=>{(async()=>{console.log("Start caching Comparison Data");const t=e.filter((e=>e.id!==w.id)).map((e=>e.id)),i={clientCode:n,requestData:{sampleIds:t,baselineId:w.id,reportType:a.includes("Multi")?"multipoint_comparison":a}};await V(i)})(),g(v+1),ae()},endIcon:p(Sn,{spriteUrl:nr,className:wE}),className:QE,disabled:!ne(v),children:r("nmr-wiz-next")}),1===v&&"Multi-Point Comparison"!==a&&p(P,{variant:"contained",className:KE,onClick:async()=>{const t=e.filter((e=>e.id!==w.id)).map((e=>e.id)),r={clientCode:n,formData:{reportType:a.includes("Multi")?"multipoint_comparison":a,baselineSampleId:w.id,comparisonSampleIds:t,title:""!==_?_:null,notes:""!==B.notes?B.notes:null}};console.log("report data",r),L(!0);const s=await G(r);z(s.id.toString()),Y&&i(Q(Tt.NMR_GENERATED_REPORT,{reportId:U,reportType:a.includes("Multi")?"multipoint_comparison":a}))},children:r("nmr-wiz-generate")}),2===v&&"Multi-Point Comparison"===a&&p(P,{variant:"contained",className:KE,onClick:async()=>{const t=e.filter((e=>e.id!==w.id)).map((e=>e.id)),r={clientCode:n,formData:{reportType:a.includes("Multi")?"multipoint_comparison":a,baselineSampleId:w.id,comparisonSampleIds:t,title:""!==_?_:null,notes:""!==B.notes?B.notes:null}};console.log("report data",r),L(!0);const s=await G(r);z(s.id.toString()),Y&&i(Q(Tt.NMR_GENERATED_REPORT,{reportId:U,reportType:a.includes("Multi")?"multipoint_comparison":a}))},children:r("nmr-wiz-generate")})]})]}),D&&p("div",{className:EE,children:R("div",{children:[p(re,{}),p(Vt,{variant:"h3",className:ME,children:"Generating Report..."}),p($t,{variant:"big",className:DE,children:"Select one sample to serve as your reference baseline. All other selected samples will be compared against this baseline."})]})})]})]})})]})},rM=({selectedSamples:e,setSelectedSamples:t,reportType:a,clientCode:n})=>{const i=Wt();return console.log(e),R("div",{className:Xk,children:[R("div",{className:Zk,children:[p(Vt,{variant:"h5",className:Jk,children:p(mn,{html:i("nmr-cart-title")})}),p(P,{size:"small",onClick:()=>{t([])},className:eE,children:p($t,{variant:"p",children:i("nmr-clear-all")})})]}),p("div",{className:tE,children:e.map((a=>R("div",{className:aE,children:[R("div",{children:[p($t,{children:a.description}),p($t,{variant:"small",children:a.sampleType})]}),p(Sn,{spriteUrl:ig,className:nE,onClick:()=>{return n=a.id,void t(e.filter((e=>e.id!==n)));var n}})]},a.id)))}),p(iM,{selectedSamples:e,setSelectedSamples:t,reportType:a,clientCode:n})]})};var sM="ReportTypeCard_container_1",oM="ReportTypeCard_recommendedContainer_7",lM="ReportTypeCard_recommended_7",cM="ReportTypeCard_itemActive_26",dM="ReportTypeCard_icon_29",mM="ReportTypeCard_text_41",pM="ReportTypeCard_desktopContent_86",uM="ReportTypeCard_cardContent_117",hM="ReportTypeCard_textContent_117",vM="ReportTypeCard_textContentHeader_117",gM="ReportTypeCard_tatText_117",yM="ReportTypeCard_checkbox_132";const bM=({icon:e,title:t,turnaroundTime:a,description:n,reportType:i,setReportType:r,recommended:s,alignment:o})=>{const l=h(),c=A(l.breakpoints.up("lg")),d=Wt();return R("div",{className:I(sM,{[cM]:i===t,[lM]:s&&s===t}),onClick:()=>{r(i===t?"":t)},children:[s&&p("div",{className:oM,"is-active":s===t?"true":"false",children:s===t&&p("div",{className:lM,children:p($t,{className:mM,children:d("nmr-report-card-rec")})})}),R("div",{className:I(pM,{[cM]:i===t,[lM]:s&&s===t}),"is-recommended":s&&s===t?"true":"false",children:[i===t&&p(ue,{checked:i===t,className:yM,sx:{"&.Mui-checked":{color:"#5160EB"}}}),R("div",{className:uM,"content-alignment":o,children:[c&&p(Sn,{spriteUrl:e,className:dM}),R("div",{className:hM,children:[R("div",{className:vM,children:[p(Vt,{variant:"h4",children:t}),p($t,{variant:"standard",className:gM,children:a})]}),p($t,{variant:"standard",children:n})]})]})]})]})};const _M=()=>{var e,t;const{activeClient:a}=m.exports.useContext(_a),n=h(),i=A(n.breakpoints.up("lg")),r=Wt(),[s,c]=m.exports.useState(""),[d,u]=m.exports.useState(!1);m.exports.useState("");const[v,g]=m.exports.useState([]),[y,b]=m.exports.useState({searchTerm:"",page:1,material:"",status:"completed",startDate:"",endDate:"",clientCode:a.code}),{data:_}=KR(y),N=Kk(g,v);return R("div",{className:Mk,children:[d&&p("div",{className:Dk,children:p(P,{variant:"text",className:Pk,onClick:()=>{g([]),c(""),u(!1),b({searchTerm:"",page:1,material:"",status:"completed",startDate:"",endDate:"",clientCode:a.code})},startIcon:p(Sn,{spriteUrl:bm,className:Lk}),children:"Restart from Beginning"})}),p(Vt,{variant:"h2",children:d?s:r("nmr-compare")}),p($t,{variant:"big",children:d?"Start selecting your Working Set of samples for report generation.":"Choose the type of comparison that best suites your needs."}),!d&&R("div",{className:Ok,children:[R("div",{className:Fk,children:[p(bM,{title:"Comparison",description:r("nmr-wizard-comparison-desc"),turnaroundTime:r("nmr-wizard-comparison-tat"),icon:"/assets/dropperIcon.0f50949d.svg",reportType:s,setReportType:c,alignment:"vertical"}),p(bM,{title:"Multi-Point Comparison",description:r("nmr-wizard-multi-desc"),turnaroundTime:r("nmr-wizard-comparison-tat"),icon:"/assets/multiTestTubes.ced0e941.svg",reportType:s,setReportType:c,alignment:"vertical"})]}),p(P,{variant:"contained",className:Hk,onClick:()=>{u(!0)},disabled:""===s,children:"Continue"})]}),d&&R("div",{className:Bk,children:[p(QR,{queryOptions:y,setQueryOptions:b,reportBuilder:!0}),i?p(Lu,{rowCount:null!=(e=null==_?void 0:_.totalItems)?e:0,rows:null!=(t=null==_?void 0:_.data)?t:[],columns:N,getRowId:e=>e.id,onRowClick:e=>{},showPagination:!1,checkboxSelection:!0,stylingNMR:!0,selectedNMRSamples:v,setSelectedNMRSamples:g}):R(k,{children:[null==_?void 0:_.data.map((e=>p(FR,{sample:e,selectedSamples:v,setSelectedSamples:g}))),(null==_?void 0:_.totalItems)&&p(nv,{totalItems:_.totalItems,currentPage:y.page,cardsPerPage:50,cardsPerPageOptions:[50,100,150],onCardsPerPageChange:e=>{b((e=>l(o({},e),{start:1})))},onGoPreviousPage:()=>{b((e=>l(o({},e),{start:e.page-1})))},onGoNextPage:()=>{b((e=>l(o({},e),{start:e.page+1})))}})]})]}),v.length>0&&p("div",{className:Uk,children:p(rM,{selectedSamples:v,setSelectedSamples:g,reportType:s,clientCode:a.code})})]})};var NM="ReportsLibrary_container_1",fM="ReportsLibrary_reports_6";var CM="ReportsColumns_icon_1",SM="ReportsColumns_cellContainerWrap_30",xM="ReportsColumns_tableHeader_52",AM="ReportsColumns_tableHeaderContainer_58",IM="ReportsColumns_status_65",wM="ReportsColumns_preliminary_78",TM="ReportsColumns_completed_84",RM="ReportsColumns_button_114";var kM={container:"ReportsToolbar_container_1",viewAsOptionsButtons:"ReportsToolbar_viewAsOptionsButtons_6",buttonGroup:"ReportsToolbar_buttonGroup_18",button:"ReportsToolbar_button_18",filtersAndExport:"ReportsToolbar_filtersAndExport_32",filterInputs:"ReportsToolbar_filterInputs_44",searchBar:"ReportsToolbar_searchBar_61",dropdownFilters:"ReportsToolbar_dropdownFilters_75",placeholderText:"ReportsToolbar_placeholderText_81",datePickers:"ReportsToolbar_datePickers_85",datePicker:"ReportsToolbar_datePicker_85",inputAdornment:"ReportsToolbar_inputAdornment_96",exportCsvContainer:"ReportsToolbar_exportCsvContainer_99",exportCsvButton:"ReportsToolbar_exportCsvButton_99",svgIcon:"ReportsToolbar_svgIcon_103",dateInput:"ReportsToolbar_dateInput_108",inputField:"ReportsToolbar_inputField_116",clearContainer:"ReportsToolbar_clearContainer_152",clearButton:"ReportsToolbar_clearButton_156",calendarIcon:"ReportsToolbar_calendarIcon_170",formControlRoot:"ReportsToolbar_formControlRoot_176","PrivatePickersFadeTransitionGroup-root":"ReportsToolbar_PrivatePickersFadeTransitionGroup-root_180"};const EM=({queryOptions:e,setQueryOptions:t})=>{const a=Wt(),[n,i]=m.exports.useState(!1),[r,s]=m.exports.useState(e.q),[c,d]=m.exports.useState(e.reportType),[u,h]=m.exports.useState(e.status),[v,g]=m.exports.useState({startDate:!1,endDate:!1}),y=Qt(r,250);return m.exports.useEffect((()=>{n?t((e=>l(o({},e),{q:y}))):i(!0)}),[y]),m.exports.useEffect((()=>{s(e.q)}),[e]),p("div",{className:kM.container,children:p("div",{className:kM.filtersAndExport,children:R("div",{className:kM.filterInputs,children:[R("div",{className:kM.searchBar,children:[p($t,{children:p(me,{arrow:!0,title:"Search reports.",children:p("span",{children:a("filter")})})}),p(H,{className:I(kM.inputField,kM.formControlRoot),name:"search",value:r,onChange:e=>s(null==e?void 0:e.target.value),placeholder:"Search Reports"})]}),R("div",{className:kM.dropdownFilters,children:[R(xr,{name:"reportType",value:c,onChange:e=>(e=>{d(e.target.value),t((t=>l(o({},t),{categoryId:""===e.target.value?null:e.target.value})))})(e),SelectDisplayProps:{style:{paddingTop:0}},children:[p(Z,{value:"",sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}}
1,"&:hover":{backgroundColor:"#edf0f7"}},children:p("div",{className:kM.placeholderText,children:"Select Report Type"})},""),["Comparison","Multi-Point Comparison"].map((e=>p(Z,{value:e,className:kM.sampleTypeSelect,sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}},"&:hover":{backgroundColor:"#edf0f7"}},children:e},e)))]}),R(xr,{name:"status",value:u,onChange:e=>(e=>{h(e.target.value),t((t=>l(o({},t),{categoryId:""===e.target.value?null:e.target.value})))})(e),SelectDisplayProps:{style:{paddingTop:0}},children:[p(Z,{value:"",sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}},"&:hover":{backgroundColor:"#edf0f7"}},children:p("div",{className:kM.placeholderText,children:"Select Status"})},""),$R.map((e=>p(Z,{value:e,className:kM.sampleTypeSelect,sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}},"&:hover":{backgroundColor:"#edf0f7"}},children:e},e)))]})]}),R("div",{className:kM.datePickers,children:[p(Ce,{dateAdapter:Se,children:R("div",{className:kM.datePicker,children:[p($t,{children:a("from")}),p(xe,{PopperProps:{sx:{"& .MuiPickersDay-root.Mui-selected":{backgroundColor:"#5160EB",color:"white"}}},open:v.startDate,onOpen:()=>g({startDate:!0,endDate:!1}),onClose:()=>g({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:kM.calendarIcon})},InputAdornmentProps:{className:kM.inputAdornment},value:e.startDate?Ae(e.startDate.toString()):null,onChange:e=>t((t=>l(o({},t),{startDate:e?fh(e):null}))),renderInput:e=>p(H,l(o({onClick:()=>g({startDate:!0,endDate:!1}),onKeyDown:e=>e.preventDefault(),classes:{root:kM.formControlRoot},className:I(kM.inputField,kM.dateInput)},e),{inputProps:l(o({},e.inputProps),{placeholder:a("date")})}))})]})}),p(Ce,{dateAdapter:Se,children:R("div",{className:kM.datePicker,children:[p($t,{children:a("to")}),p(xe,{PopperProps:{sx:{"& .MuiPickersDay-root.Mui-selected":{backgroundColor:"#5160EB",color:"white"}}},open:v.endDate,onOpen:()=>g({startDate:!1,endDate:!0}),onClose:()=>g({startDate:!1,endDate:!1}),ignoreInvalidInputs:!0,inputFormat:"MM/dd/yyyy",components:{OpenPickerIcon:()=>p(Sn,{spriteUrl:Ch,className:kM.calendarIcon})},InputAdornmentProps:{className:kM.inputAdornment},value:e.endDate?Ae(e.endDate.toString()):null,onChange:e=>t((t=>l(o({},t),{endDate:e?fh(e):null}))),renderInput:e=>p(H,l(o({onClick:()=>g({startDate:!1,endDate:!0}),onKeyDown:e=>e.preventDefault(),classes:{root:kM.formControlRoot},className:I(kM.inputField,kM.dateInput)},e),{inputProps:l(o({},e.inputProps),{placeholder:a("date")})}))})]})})]}),p("div",{className:kM.clearContainer,children:p("button",{className:kM.clearButton,onClick:()=>(s(""),d(""),h(""),void t((e=>l(o({},e),{q:"",status:"",reportType:"",startDate:"",endDate:""})))),children:p($t,{variant:"small",children:"reset"})})})]})})})};var MM={container:"ReportCardMobile_container_1",topContainer:"ReportCardMobile_topContainer_10",header:"ReportCardMobile_header_15",icon:"ReportCardMobile_icon_23",status:"ReportCardMobile_status_27",info:"ReportCardMobile_info_46",completed:"ReportCardMobile_completed_54",section:"ReportCardMobile_section_62",text:"ReportCardMobile_text_67",bottomContainer:"ReportCardMobile_bottomContainer_70",view:"ReportCardMobile_view_80",buttonContainer:"ReportCardMobile_buttonContainer_83",button:"ReportCardMobile_button_83"};const DM=({report:e})=>{const t=Wt(),[a,n]=m.exports.useState(!0);return R("div",{className:MM.container,children:[R("div",{className:MM.topContainer,children:[R("div",{className:MM.header,onClick:()=>n(!a),children:[p($t,{variant:"standardSemiBold",children:e.reportName}),p(Sn,{spriteUrl:a?Yi:Vi,className:MM.icon})]}),R("div",{className:MM.section,children:[p($t,{variant:"standard",className:MM.text,children:t("nmr-rep-card-type",{type:e.reportType})}),p($t,{variant:"standard",className:I(MM.status,{[MM.pending]:"pending"===e.status,[MM.completed]:"completed"===e.status,[MM.info]:"needs info"===e.status}),children:e.status})]})]}),a&&R("div",{className:MM.bottomContainer,children:[p($t,{variant:"standard",children:t("nmr-rep-card-req-date",{date:e.requestedDate})}),p($t,{variant:"standard",children:t("nmr-rep-card-com-date",{date:e.completedDate&&""!==e.completedDate?e.completedDate:"-"})}),"completed"===e.status&&p("div",{className:MM.buttonContainer,children:R(P,{className:MM.button,children:[p(Sn,{spriteUrl:m_,className:MM.icon}),t("nmr-rep-card-download")]})})]})]},e.id)},PM=()=>{var e;const t=[{id:0,sampleIds:["4","5555","23423"],requestedDate:"11/21/25",completedDate:"",reportType:"Comparison",reportName:"some name they came up with",status:"pending"},{id:1,sampleIds:["4","5555","23423"],requestedDate:"11/21/25",completedDate:"11/25/25",reportType:"Multi-Point Comparison",reportName:"generated name",status:"completed"},{id:2,sampleIds:["4","5555","23423"],requestedDate:"11/21/25",completedDate:"",reportType:"Comparison",reportName:"generated name",status:"pending"},{id:3,sampleIds:["4","5555","23423"],requestedDate:"11/21/25",completedDate:"11/25/25",reportType:"Comparison",reportName:"name created by client",status:"completed"},{id:4,sampleIds:["4","5555","23423"],requestedDate:"11/21/25",completedDate:"11/25/25",reportType:"Comparison",reportName:"optional name",status:"completed"},{id:5,sampleIds:["4","5555","23423"],requestedDate:"11/21/25",completedDate:"11/25/25",reportType:"Comparison",reportName:"generated name",status:"completed"}],a=h(),n=A(a.breakpoints.up("lg")),i=Wt(),[r,s]=m.exports.useState({q:"",page:1,startDate:"",endDate:"",status:"",reportType:""}),o=(()=>{Wt();const e=e=>p("div",{className:SM,children:"completed"===e.row.status&&p(P,{variant:"contained",size:"small",className:RM,startIcon:p(Sn,{spriteUrl:Rg,className:CM}),children:p($t,{children:"Download"})})});return[{field:"reportType",sortable:!1,renderHeader:()=>p(me,{title:"Report name",children:p("div",{className:AM,children:p(Vt,{variant:"h6",className:xM,children:"Report Type"})})}),flex:1,renderCell:e=>p("div",{className:SM,children:p(Vt,{variant:"h6",children:e.value})})},{field:"reportName",sortable:!1,renderHeader:()=>p(me,{title:"Report name",children:p("div",{className:AM,children:p(Vt,{variant:"h6",className:xM,children:"Report Name"})})}),flex:1,renderCell:e=>p("div",{className:SM,children:p(Vt,{variant:"h6",children:e.value})})},{field:"requestedDate",sortable:!1,renderHeader:()=>p(me,{title:"Requested Date",children:p("div",{className:AM,children:p(Vt,{variant:"h6",className:xM,children:"Requested Date"})})}),flex:.5,renderCell:e=>p("div",{className:SM,children:p(Vt,{variant:"h6",children:e.value})})},{field:"completedDate",sortable:!1,renderHeader:()=>p(me,{title:"Completed Date",children:p("div",{className:AM,children:p(Vt,{variant:"h6",className:xM,children:"Completed Date"})})}),flex:.5,renderCell:e=>p("div",{className:SM,children:p(Vt,{variant:"h6",children:e.value})})},{field:"status",sortable:!1,renderHeader:()=>p(me,{title:"Report name",children:p("div",{className:AM,children:p(Vt,{variant:"h6",className:xM,children:"Status"})})}),flex:.5,renderCell:e=>p("div",{className:SM,children:R(Vt,{variant:"h6",className:I(IM,{[wM]:"needs info"===e.value,[TM]:"completed"===e.value}),children:[p("span",{}),e.value]})})},{field:"actions",sortable:!1,renderHeader:()=>p(me,{title:"Actions",children:p("div",{className:AM,children:p(Vt,{variant:"h6",className:xM,children:"Actions"})})}),flex:.5,renderCell:t=>p(e,{row:t.row})}]})();return R("div",{className:NM,children:[p(Vt,{variant:"h2",children:i("nmr-reports")}),R("div",{className:fM,children:[p(EM,{queryOptions:r,setQueryOptions:s}),n?p(Lu,{rowCount:null!=(e=t.length)?e:0,rows:null!=t?t:[],columns:o,getRowId:e=>e.id,onRowClick:e=>{},showPagination:!1,stylingNMR:!0}):p(k,{children:t.map((e=>p(DM,{report:e})))})]})]})};var LM="AboutNMR_container_1",BM="AboutNMR_restartButtonContainer_7",OM="AboutNMR_restartButton_7",FM="AboutNMR_restartBtnIcon_18",HM="AboutNMR_cardsContainer_29",UM="AboutNMR_contentAndTabs_39",zM="AboutNMR_lineDivider_46",GM="AboutNMR_topicTabs_49",qM="AboutNMR_topicBtn_64",WM="AboutNMR_topicIcon_71",VM="AboutNMR_topicTitle_85",YM="AboutNMR_pageHeader_91",jM="AboutNMR_pageTitle_103",$M="AboutNMR_content_39";var QM="AboutTopicCard_container_1",KM="AboutTopicCard_header_10",XM="AboutTopicCard_iconHeader_19",ZM="AboutTopicCard_subheader_24",JM="AboutTopicCard_articlesContainer_28",eD="AboutTopicCard_article_28",tD="AboutTopicCard_icon_19",aD="/assets/arrowRightCircle.362e3a43.svg";const nD=({title:e,icon:t,subheader:a,articles:n,action:i})=>R("div",{className:QM,children:[R("div",{className:KM,children:[p(Sn,{spriteUrl:t,className:XM}),p(Vt,{variant:"h4",children:e})]}),p("div",{className:ZM,children:p($t,{variant:"standard",children:a})}),p("div",{className:JM,children:null==n?void 0:n.map(((t,a)=>R("div",{className:eD,onClick:()=>i(e,a),children:[p($t,{variant:"standard",children:t.title}),p(Sn,{spriteUrl:aD,className:tD})]},a)))})]});
1const iD=[{topic:"Understanding NMR",subheader:'Learn how we capture the "signature" of your wine and how to read the spectral map.',icon:"/assets/learnIcon.3270a4d5.svg",articles:[{title:"The Physics of the Fingerprint",content:'<p>At its core, Nuclear Magnetic Resonance (NMR) is a powerful window into the molecular reality of your wine, powered by the same advanced quantum mechanics used in medical MRI scanning. The process begins by placing a wine sample inside a massive, super-conducting magnetâone of the strongest continuous magnetic fields on earth. This field acts as a conductor, aligning the hydrogen atoms within the wineâs molecules. We then pulse the sample with specific radio frequencies (RF). This pulse disturbs the atoms, and as they relax back to their original state, they resonate, "singing" back to us at precise frequencies.</p>\n <p>Crucially, every molecule "sings" a unique note. Ethanol sounds different than Malic Acid; Proline sounds different than Glucose. Because NMR listens to the entire chorus at once, it doesn\'t just measure one or two things; it captures an all-encompassing, holistic snapshot of the sample\'s entire chemical composition in a single moment.</p>\n <p>This snapshot is the <b>Spectral Signature</b>âa dataset containing thousands of variables that define your wineâs identity. But how do you read such a complex signal?</p>\n '},{title:"Navigating the Spectrum: Axes & Scales",content:'\n <p>Think of your wineâs NMR signature as a map of its unique chemical landscape. The NMR spectrum is the detailed topographical map of that landscape, reveal
1ing every feature of its chemical terrain.</p>\n <p>At first glance, this map might look like a series of complex lines, but learning to read it is like learning to read any other map. You only need to understand the legendâthe two simple rules that govern what you see. Once you understand how to find a location and interpret the size of what\'s there, you can navigate your wine\'s composition with precision.</p>\n <p>Just like every map, an NMR spectrum conveys two fundamental pieces of information: <b>Location</b> (where something is) and <b>Scale</b> (how big it is).</p>\n <p>1. The Horizontal Axis: The "Coordinates" (What is it?)</p>\n <p>The horizontal axis on the map is the chemical shift, measured in parts per million (ppm). This is the <b>location</b>, or the specific set of coordinates, for every single compound in your wine.</p>\n <p>Just as a specific vineyard has a unique address, a molecule like malic acid has a fixed, predictable address on the NMR map. Ethanol has a different address. Glucose has another. This axis provides a reliable answer to the first critical question: <em>"What am I looking at?"</em></p>\n <p>2. The Vertical Axis: The "Topography" (How much is there?)</p>\n <p>The vertical axis represents signal intensity. This shows the scale of the feature at that location. Think of it as the <b>topography</b> of your map.</p>\n <p>A towering, sharp peak is like a mountainâit signifies a high concentration of a particular compound. A smaller peak is a hill, indicating a much lower concentration. The principle is powerfully straightforward and quantitative: the taller the peak, the more of that compound is in the wine. If the "mountain" of malic acid is replaced by a "hill" half its size, it\'s because exactly half of the malic acid has been consumed during malolactic conversion.</p>\n <p>By combining these two elementsâthe coordinates on the map (<em>what it is</em>) and the topography at those coordinates (<em>how much is there</em>)âyou begin to directly read a wineâs molecular landscape by reviewing its NMR signature.</p> \n '},{title:'The "Molecular Map" Metaphor',content:'\n <p>Once we have captured this high-resolution map of your wine, we move beyond simple observation. The ETS NMR Portal allows you to use these maps to protect, analyze, and understand your wine in three distinct ways:</p>\n <p>1. Spectral Signature Recording</p>\n <p>Charting the Ground Truth</p>\n <p>Every vintage is unique. By recording the <b>Spectral Signature</b> of your wine, you are archiving its chemical "Ground Truth." This acts as the master survey of your wine at a specific moment in time. Whether for historical comparison five years from now or for immediate quality control, having the detailed topography of your wine recorded means you never have to guess about the state of your product when it left the cellar.</p>\n <p>2. Comparison Analysis</p>\n <p>Surveying the Evolution</p>\n <p>Because an NMR map captures the entire landscape at once, it is the ultimate tool for overlaying different samples to spot changes instantly.</p>\n <ul>\n <li>\n <p><b>Track Evolution:</b> Overlay a map of your wine from last month against today to visualize exactly how the terrain has shifted during aging.</p>\n </li>\n <li>\n <p><b>Analyze Trials:</b> Compare a "Control" map against a "Trial" map. Did the new yeast strain create new hills (aromatics) or flatten existing mountains (acids)? The comparison highlights these divergences with forensic precision.</p>\n </li>\n </ul>\n <p>3. Authentication & Supply Chain Monitoring</p>\n <p>Verifying the Territory</p>\n <p>The wine world is global, and once a bottle leaves your loading dock, it faces risks. NMR provides the ultimate check to ensure the map still matches the territory.</p>\n <ul>\n <li>\n <p><b>Alpha to Omega:</b> We analyze samples at the start of the journey (Alpha) and the end (Omega). By overlaying these maps, we can mathematically verify that the wine arriving in Tokyo or New York is the exact same wine that left Napa.</p>\n </li>\n <li>\n <p><b>Integrity Monitoring:</b> If a wine is exposed to heat or external factors, the chemical landscape shiftsâpeaks move or new ones appear. <b>Similarity analysis</b> detects these variances, providing the data you need to protect your brand reputation and monitor the consistency of your supply chain.</p>\n </li>\n </ul>\n '}]},{topic:"Designing an Analysis",subheader:"Learn how to set meaningful comparisons in the portal and choosing the right Baseline for goals.",icon:"/assets/gearIcon.af96d373.svg",articles:[{title:"The Art of the Baseline: Choosing Your Anchor",content:'\n <h3><b>Every Comparison Needs a Reference Point</b></h3>\n <p>The Similarity Index is a relative metricâit measures the distance between two points. To get a meaningful answer, you must have a carefully and intentionally chosen starting point. This is your <b>Baseline Sample</b>.</p>\n <p>Your choice of Baseline dictates what the analysis actually measures. We recommend three primary strategies:</p>\n <p><b>Strategy A: The "Gold Standard" (Quality Control & Consistency)</b></p>\n <ul>\n <li style="font-size: 16px"><b>Goal:</b> To ensure the current lot maintains the specific quality or character of your target profile.</li>\n <li style="font-size: 16px"><b>The Baseline:</b> Your ideal representative sampleâwhether that is a specific blend approved by the winemaking team, or a benchmark bottle that perfectly captures the style you are aiming to replicate.</li>\n <li style="font-size: 16px"><b>The Interpretation:</b> You want the Similarity Index to be as high as possible. Any drop indicates the wine is drifting away from your established standard of quality.</li>\n </ul>\n <p><b>Strategy B: Sample Integrity Assurance (Supply Chain Security)</b></p>\n <ul>\n <li style="font-size: 16px"><b>Goal:</b> To ensure an unbroken chain of authenticity from the winery to the consumer. This strategy is for producers demanding transparency and security throughout the global supply chain.</li>\n <li style="font-size: 16px"><b>The Baseline:</b> The "Library Sample" retained at the source (the winery).</li>\n <li style="font-size: 16px"><b>The Interpretation:</b> This is a binary check for protection. A high Similarity Index confirms that the bottle arriving in Tokyo or New York is chemically identical to the one that left Napa. Any significant deviation alerts you to a break in the chainâwhether due to heat damage, oxidation, or tampering.</li>\n </ul>\n <p><b>Strategy C: Process Evolution (Monitoring Change)</b></p>\n <ul>\n <li style="font-size: 16px"><b>Goal:</b> To track chemical evolution over time, such as during fermentation, aging, or micro-oxygenation.</li>\n <li style="font-size: 16px"><b>The Baseline:</b> The sample taken on Day 1 (or immediately pre-treatment).</li>\n <li style="font-size: 16px"><b>The Interpretation:</b> In this context, you expect the Similarity Index to drop over time. This drop is the quantitative measure of your process doing its work. You are measuring the magnitude of the evolution.</li>\n </ul>\n '},{title:"Defining Sample Groups",content:'\n <h3><b>Structured Comparisons for Clearer Insights</b></h3>\n <p>The NMR Portal allows for high-resolution comparison of <b>groups of up to 8 samples</b> at a time. To maximize the clarity of your results, we recommend grouping samples that share a logical variable.</p>\n <p><b>Effective Grouping Examples:</b></p>\n <ul>\n <li style="font-size: 16px"><b>The "Integrity Check":</b> 1 Baseline Sample (Library Reference) vs. 4 Samples (Bottles retrieved from different distribution hubs).</li>\n <li style="font-size: 16px"><b>The "Vintage Vertical":</b> 1 Baseline Sample (2020) vs. 4 Samples (2021, 2022, 2023, 2024).</li>\n <li style="font-size: 16px"><b>The "Trial Series":</b> 1 Baseline (Control Tank) vs. 3 Samples (Yeast A, Yeast B, Yeast C).</li>\n </ul>\n <p><em style="font-size: 16px">
1Note: While the system allows you to add distinct varietals to the same group (e.g., comparing a Pinot Noir against a Cabernet), it should not be a surprise that the Similarity Index indicates a low degree of similarity. The fundamental chemical differences between not-directly related samples produce Similarity Index results that are very low, and often time zero.</em></p>\n '},{title:"Navigating the Comparison Wizard",content:'\n <h3>From Selection to Analysis</h3>\n <p>The Comparison Wizard is designed to walk you through the setup process to ensure your data is valid and your results are actionable for your intended application.\n <p><b>Step 1: Select Your Sample Set</b></p> \n <p>Choose the specific sample IDs from your library. You may select up to 8 distinct samples for a single comparison report.\n <p><b>Step 2: Assign the Baseline</b></p>\n <p>The Wizard will ask you to designate one sample as the Reference. This sample will be assigned the value of "100" (or 0 deviation), and all other samples in the group will be calculated relative to its signature.\n <p><b>Step 3: Proprietary Processing & Alignment</b></p> \n <p>Once submitted, the system engages our proprietary data analysis pipeline. This includes advanced spectral alignment to correct for minor environmental shifts and the application of our targeted masking algorithms.\n <p><b>Step 4: Reviewing the Output</b></p> \n <p>The final report will display:</p>\n <ul>\n <li style="font-size: 16px"><b>The Proton NMR Spectrum:</b> The raw "Signature" of each sample.</li>\n <li style="font-size: 16px"><b>The Difference Spectrum:</b> The specific chemical deviations.</li>\n <li style="font-size: 16px"><b>The Similarity Index:</b> The calculated score for each sample in the group with respect to the chosen baseline sample.</li>\n </ul>\n '}]},{topic:"Interperting Results",subheader:"Understand the quantitative metrics that define your wineâs profile.",icon:"/assets/chartLine.fe67a06e.svg",articles:[{title:"The Similarity Index: A Quantitative Assessment",content:'\n <p><b>Defining Identity Through Data</b></p> \n <p>The Similarity Index is a proprietary, composite metric designed to provide a definitive assessment of whether two wine samples are chemically equivalent. While expressed on a scale of 0 to 100, strictly speaking, it is not a percentage; it is a calculated index that evaluates the integrity of a sample against a chosen baseline.</p>\n <p><b>The Core Concept: Shape + Magnitude</b></p> \n <p>An NMR spectrum is defined by two critical dimensions. The Similarity Index independently assesses both before combining them into a final score:</p>\n <p><b>1. Spectral Shape (Qualitative Identity):</b> First, the algorithm examines the "Shape" of the spectrumâthe specific pattern of peaks across the chemical shift axis. This confirms the identity of the molecular components. If the shape matches, the fundamental chemical makeup is the same.</p>\n <p><b>2. Peak Magnitude (Quantitative Concentration):</b> Second, the algorithm measures the "Size" (intensity) of the peaks. This confirms the concentration of those components.</p>\n <p>The Result: By integrating these two dimensions, the Similarity Index confirms that not only are the same compounds present (Shape), but they are present in the exact same ratios (Magnitude). A score of 100 indicates the samples are indistinguishable within the analysis\'s strict tolerance parameters.</p>\n <img src="/assets/SimIndexBlending.ac3449c3.png" width="70%" style="alignSelf: center"/>\n '},{title:"The Difference Spectrum: Visualizing Deviation",content:'\n <p><b>Isolating Chemical Variance</b></p> \n <p>While the Similarity Index provides a summary score, the Difference Spectrum allows for granular visualization of chemical variance.</p>\n <p>The portal generates this view by mathematically subtracting the Baseline signal from the Sample signal.</p>\n <ul>\n <li style="font-size: 16px"><b>The Baseline (Zero Line):</b> Regions where the spectrum remains flat at zero indicate chemical equivalence.</li>\n <li style="font-size: 16px"><b>Positive/Negative Deviations:</b> Any deviation above or below the zero line represents a quantifiable difference in compound concentration.</li>\n </ul>\n <p>This visualization allows users to instantly identify <em style="font-size: 16px">specific</em> molecular changesâsuch as the appearance of spoilage markers or the degradation of specific acidsâwithout needing to manually compare complex spectral overlays.</p>\n '},{title:"Methodology: Ensuring Precision",content:'\n <p><b>Engineered for Real-World Accuracy</b></p> \n <p>To ensure the Similarity Index reflects true chemical changes rather than
1instrumental artifacts, the algorithm employs three critical processing steps:</p>\n <p><b>1. Spectral Alignment</b> Minor fluctuations in pH or temperature can cause slight chemical shifts (movements along the horizontal axis). Before comparison, our algorithm aligns the spectra to ensure that identical compounds are compared directly against one another.</p>\n <p><b>2. Solvent Suppression</b> Wine is dominated by water and ethanol. To prevent these bulk solvents from masking subtle chemical details, specific regions of the spectrum are computationally weighted to zero. This focuses the analysis on the trace compounds that define a wineâs unique compositional differences - the wineâs NMR Spectral Signature.</p>\n <p><b>3. Tolerance Thresholding & Sensitivity</b> The system incorporates a "Plateau Mode" which accounts for the natural noise floor of the instrument. The Index remains at <b>100</b> as long as the variance between samples falls within this acceptable noise tolerance.</p>\n <p>Crucially, the metric is designed to be highly sensitive once this limit is exceeded. If the variance rises above the noise threshold, the algorithm applies a steep penalty curve, causing the score to drop sharply. This ensures that a lower score is never ambiguous; it signals a definitive and observable difference in chemical composition rather than a minor measurement artifact.</p>\n '}]},{topic:"Case Studies",subheader:"Real-world examples of how to apply NMR analysis to production and logistics challenges.",icon:"/assets/documents.c5da7cb8.svg",articles:[{title:'Supply Chain Defense: The "Tokyo" Scenario',content:'\n <p><b>The Challenge:</b> A premium Napa Valley estate ships a container of their flagship Cabernet Sauvignon to a distributor in Tokyo. Upon arrival, the distributor claims the wine tastes "flat" and suggests heat damage. The logistics company denies liability, citing clean temperature logs.</p>\n <p><b>The Proactive Advantage (Digital Insurance):</b> Because this winery adopted the Spectral Signature protocol as part of their standard bottling QC, they already had the chemical "Ground Truth" of the lot archived in the ETS Portal before the wine ever left the dock.</p>\n <p><b>The Analysis:</b></p>\n <ul>\n <li style="font-size: 16px"><b>Baseline:</b> The pre-existing digital record from the bottling date.</li>\n <li style="font-size: 16px"><b>Sample:</b> The returned bottle from Tokyo.</li>\n <li style="font-size: 16px"><b>Result: Similarity Index: 82.</b> A catastrophic drop. The Difference Spectrum reveals a distinct spike in acetic acid and degradation of fruit estersâa forensic fingerprint of heat exposure.</li>\n </ul>\n <p><b>The Outcome:</b> The winery had definitive proof that the product was compromised after the timestamp of their original scan. The logistics providerâs claim was invalidated, and the winery protected its reputation and recouped the loss.</p>\n '},{title:'Sourcing Assurance: The "Bulk Buy" Shield',content:'\n <p><b>The Challenge:</b> A large producer is purchasing 20,000 gallons of bulk Cabernet on the spot market. The pre-contract sample sent by the broker is excellent. When the tanker trucks arrive, the winemaker asks: <em style="font-size: 16px">Is this the exact same wine we approved?</em></p>\n <p><b>The Analysis:</b></p>\n <ul>\n <li style="font-size: 16px"><b>Baseline:</b> The pre-contract "Broker Sample."</li>\n <li style="font-size: 16px"><b>Sample:</b> A sample drawn directly from the arriving tanker truck.</li>\n <li style="font-size: 16px"><b>Result: Similarity Index: 99.8.</b> The Difference Spectrum is flat, confirming no dilution, no substitution, and no spoilage.</li>\n </ul>\n <p><b>The Outcome:</b> The winery unloads the trucks with total confidence, using the portal as an instant "Quality Gate" to eliminate the financial risk of accepting inferior product.</p>\n <img src="/assets/NmrCaseStudy2.49adfd35.png" width="50%" style="alignSelf: center"/>\n '},{title:'Process Control: Optimizing "Sur Lie" Aging',content:'\n <p><b>The Challenge:</b> A winemaker is aging a premium Chardonnay on its lees to build texture. They need to know if the wine is still gaining benefit or if the process has plateaued, as standard lab panels (pH, TA) remain static during this phase.</p>\n <p><b>The Analysis:</b></p>\n <ul>\n <li style="font-size: 16px"><b>Baseline:</b> The wine immediately after primary fermentation (Day 0).</li>\n <li style="font-size: 16px"><b>Sample:</b> Monthly samples drawn from the tank.</li>\n <li style="font-size: 16px"><b>Result:</b> The winemaker drills down into the <b>Fermentation Fingerprint Region (0.6 - 2.0 ppm).</b> This view tracks the emergence of specific peaks (amino acids/peptides
1) from yeast autolysis.</li>\n <ul>\n <li style="font-size: 16px"><em style="font-size: 16px">Month 1-3:</em> Peaks grow taller (Active Extraction).</li>\n <li style="font-size: 16px"><em style="font-size: 16px">Month 4:</em> Peaks stop growing (Plateau).</li>\n </ul>\n </li>\n </ul>\n <p><b>The Outcome:</b> The data confirms autolysis is complete. The winemaker racks the wine immediately, optimizing tank turnover and bottling the product at its peak texture.</p>\n <img src="/assets/NmrCaseStudy3.6f3a3f16.png" width="70%" style="alignSelf: center"/>\n '},{title:'Consistency Management: Hitting the "Gold Standard"',content:'\n <p><b>The Challenge:</b> A brand faces a hot vintage pushing sugars and acids out of balance. They need the 2025 blend to deliver a profile as close as possible to the popular 2024 blend to maintain consumer loyalty.</p>\n <p><b>The Analysis:</b></p>\n <ul>\n <li style="font-size: 16px"><b>Baseline:</b> The 2024 vintage blend (The "Gold Standard").</li>\n <li style="font-size: 16px"><b>Result:</b></li>\n <ul>\n <li style="font-size: 16px"><em style="font-size: 16px">Trial A (Index 88):</em> Rejected due to large deviations.</li>\n <li style="font-size: 16px"><em style="font-size: 16px">Trial B (Index 95):</em> Promising score, but a drill-down into the <b style="font-size: 16px">Phenolic Region</b> reveals a deficit in tannin markers. It won\'t feel right.</li>\n <li style="font-size: 16px"><em style="font-size: 16px">Trial C (Index 98):</em> High score. A drill-down into the <b style="font-size: 16px">Organic Acid</b> and <b style="font-size: 16px">Sugar Regions</b> shows flat difference lines, confirming the structural balance is highly similar to the target.</li>\n </ul>\n </li>\n </ul>\n <p><b>The Outcome:</b> The team moves forward with Trial C, using the portal as a deep diagnostic tool to ensure the new vintage is chemically closer to the target than any other option.</p>\n <img src="/assets/NmrCaseStudy4.e149f313.png" width="50%" style="alignSelf: center"/>\n '}]}],rD=()=>{var e,t,a,n;const i=h(),r=A(i.breakpoints.up("lg")),[s,o]=m.exports.useState(""),[l,c]=m.exports.useState(0),[d,u]=m.exports.useState(),v=(e,t)=>
1{o(e),c(t);const a=iD.filter((t=>t.topic===e))[0];u(a),console.log(d)};return R("div",{className:LM,children:[""!==s&&p("div",{className:BM,children:p(P,{variant:"text",className:OM,onClick:()=>o(""),startIcon:p(Sn,{spriteUrl:bm,className:FM}),children:"Go Back to Topics"})}),p("div",{className:YM,children:R(Vt,{variant:"h2",className:jM,children:["About NMR",""!==s?r?` - ${s}`:p(mn,{html:`:<br>${s}`}):""]})}),""===s&&p("div",{className:HM,children:iD.map((e=>p(nD,{title:e.topic,icon:e.icon,subheader:e.subheader,articles:e.articles,action:v})))}),""!==s&&d&&R("div",{className:UM,children:[R("div",{className:GM,children:[p(P,{onClick:()=>{var e;const t=null==(e=iD.filter((e=>e.topic===s))[0])?void 0:e.articles.length;c(0===l?t-1:l-1)},startIcon:p(Sn,{spriteUrl:Xh,className:WM}),className:qM,children:r?"Previous":""}),p(Vt,{variant:"h4",className:VM,children:null==(e=null==d?void 0:d.articles[l])?void 0:e.title}),p(P,{className:qM,onClick:()=>{var e;const t=null==(e=iD.filter((e=>e.topic===s))[0])?void 0:e.articles.length;c(l===t-1?0:l+1)},endIcon:p(Sn,{spriteUrl:nr,className:WM}),children:r?"Next":""})]}),p("div",{className:zM}),p("div",{className:$M,children:p(mn,{html:null!=(n=null==(a=null==(t=d.articles)?void 0:t[l])?void 0:a.content)?n:""})})]})]})};var sD={container:"HelpNMR_container_1",header:"HelpNMR_header_8",icon:"HelpNMR_icon_13",restartButtonContainer:"HelpNMR_restartButtonContainer_26",restartButton:"HelpNMR_restartButton_26",restartBtnIcon:"HelpNMR_restartBtnIcon_37",cardContainer:"HelpNMR_cardContainer_48",leftCards:"HelpNMR_leftCards_58",card:"HelpNMR_card_48",subheader:"HelpNMR_subheader_77",articles:"HelpNMR_articles_80",article:"HelpNMR_article_80",contactCard:"HelpNMR_contactCard_122",contactHeader:"HelpNMR_contactHeader_128",subheaderText:"HelpNMR_subheaderText_134",contactOpts:"HelpNMR_contactOpts_139",contact:"HelpNMR_contact_122",label:"HelpNMR_label_165",action:"HelpNMR_action_181",faqCard:"HelpNMR_faqCard_199",faqs:"HelpNMR_faqs_218",faqContainer:"HelpNMR_faqContainer_224",title:"HelpNMR_title_232",expandedHelpTabs:"HelpNMR_expandedHelpTabs_243",tab:"HelpNMR_tab_249",activeTab:"HelpNMR_activeTab_254",content:"HelpNMR_content_258",contentSection:"HelpNMR_contentSection_267",videoContainer:"HelpNMR_videoContainer_272",contentTitle:"HelpNMR_contentTitle_281",arrowIcon:"HelpNMR_arrowIcon_292",topicBtn:"HelpNMR_topicBtn_297",topicIcon:"HelpNMR_topicIcon_304",topicTitle:"HelpNMR_topicTitle_313",instructions:"HelpNMR_instructions_319"};const oD=[{title:"I already run standard panels (Brix, pH, TA, Malic, etc.). Why do I need NMR?",content:'Standard chemical panels are like checking the vital signs of a patientâthey give you specific numbers for specific things. NMR is like taking a high-resolution MRI; it captures the complete chemical matrix in a single scan. While it validates those standard numbers, its real power lies in the "holistic" view. It creates a permanent, unalterable fingerprint of your wine that captures thousands of compounds simultaneously, allowing for detailed similarity assessment, historical tracking, and deep comparative analysis that standard panels cannot provide.'},{title:"Is advanced training in spectroscopy required to use this portal?",content:'No. This portal is designed to make high-level NMR data directly accessible to wine industry professionals. We recognize that winemakers already interpret complex chemical data daily. This tool simply translates the raw physics of NMR into the practical language of winemaking. With features like our "Region Guides," you can immediately apply this technology to monitor your specific fermentation and aging objectives without needing to be a specialist in quantum mechanics.'},{title:"Is my spectral data secure?",content:'Yes. Your wineâs spectral signature is treated with the same confidentiality as your standard lab results. The "Ground Truth" data is stored securely and is only accessible to authorized users within your organization.'},{title:'What exactly am I looking at in the "Spectrum" view?',content:'You are viewing the 1H NMR (Proton)
1Spectrum of your sample. The horizontal axis (0-10 ppm) represents the specific "address" of different chemical compounds, and the vertical axis represents their concentration. It functions like a topographical map: the location tells you what it is (e.g., Malic Acid is always at 2.8 ppm), and the height of the peak tells you how much is there.'},{title:'Why are some regions "suppressed" or flat?',content:'You may notice flat lines or "quiet zones" in certain areas, particularly around 4.8 ppm (water) and approximately 1.2 ppm and 3.6 ppm (ethanol). Since wine is primarily composed of water and ethanol, their signals are massive compared to everything else. If left unchecked, these huge peaks would naturally drown out the details of other compounds. We use selective radiofrequency pulses to suppress and remove these dominant signals so we can clearly resolve and analyze the thousands of trace compoundsâlike acids, sugars, and phenolicsâthat give your wine its unique character.'},{title:"Can I export the data for my own analysis?",content:"Currently, the primary way to interact with your data is through the comprehensive analysis tools built directly into the portal. You can view, manipulate, and analyze your spectral data within the interface, and any view or chart can be printed directly from the website for your records. For specific Similarity Analyses, your official reports are automatically saved to your Report Library. These reports are fully accessible at any time for viewing, printing, or downloading as PDF files."},{title:'How does the "Comparison Analysis" work?',content:'This tool allows you to overlay the spectral signatures of two or more wines. It is ideal for tracking evolution (e.g., Barrel A vs. Barrel B) or vintage variation (2023 vs. 2024). The portal automatically aligns the spectra, making it easy to spot where the chemical "terrain" differsâshowing you exactly where changes have occurred due to different yeast strains, oak treatments, or aging conditions.'},{title:'What is "Similarity Analysis" and when should I use it?',content:'Similarity Analysis is a supply chain protection or sample integrity service. It measures how closely the wine in the bottle matches the original "Ground Truth" recording of the wine in the tank. You can use this to ensure consistency when shipping high-value wines internationally, working with new distributors, or whenever you need scientific data to indicate that your product has not experienced significant variation or heat damage during transit.'},{title:"Can NMR predict the sensory quality of the wine?",content:"NMR quantifies chemical composition, not subjective preference. While the final judgment of quality remains the domain of the winemaker, NMR provides the objective metrics that underpin those sensory attributes. It precisely measures the chemical drivers of mouthfeel (such as glycerol), confirms microbial stability (via acetic or lactic acid profiles), and detects oxidation markers (like acetaldehyde). This allows you to correlate hard analytical data with your sensory evaluation."}];var lD="/assets/phoneIcon.761e5f12.svg",cD="/assets/mailIcon.dc978949.svg",dD="/assets/chatIcon.b3adb9db.svg";const mD=()=>{f();const e=h();A(e.breakpoints.up("lg"));const{show:t}=S(),a=m.exports.useRef(null),[n,i]=m.exports.useState(!1),[r,s]=m.exports.useState(!1),[o,l]=m.exports.useState(0),c=({faq:e,index:t})=>{const[a,n]=m.exports.useState(!1);return R("div",{className:sD.faqContainer,children:[R("div",{className:sD.title,onClick:()=>n(!a),children:[p($t,{variant:"standardSemiBold",children:e.title}),p(Sn,{spriteUrl:a?Yi:Vi,className:sD.icon})]}),a&&p("div",{className:sD.answer,children:p($t,{children:e.content})})]},t)},d=()=>{a.current&&a.current.scrollIntoView({behavior:"smooth",block:"start"})};return R("div",{className:sD.container,ref:a,children:[n&&p("div",{className:sD.restartButtonContainer,children:p(P,{variant:"text",className:sD.restartButton,onClick:()=>i(!1),startIcon:p(Sn,{spriteUrl:bm,className:sD.restartBtnIcon}),children:"Go Back to NMR Support"})}),R("div",{className:sD.header,children:[p(Vt,{variant:"h2",children:n?"Help Articles":"NMR Support"}),n&&p(Sn,{spriteUrl:r?gp:Ux,className:sD.icon,"expand-active":r?"true":"false",onClick:()=>s(!r)})]}
1),n&&r&&p("div",{className:sD.expandedHelpTabs,children:yp.map(((e,t)=>p($t,{onClick:()=>l(t),variant:"big",className:I(sD.tab,{[sD.activeTab]:t===o}),children:e.title},t)))}),!n&&R("div",{className:sD.cardContainer,children:[R("div",{className:sD.leftCards,children:[R("div",{className:sD.contactCard,children:[R("div",{className:sD.contactHeader,children:[p(Vt,{variant:"h4",className:sD.headerText,children:"Contact Us"}),p($t,{variant:"big",className:sD.subheaderText,children:"-"}),p($t,{variant:"standard",className:sD.subheaderText,children:"Please reach out via live chat, email or phone."})]}),R("div",{className:sD.contactOpts,children:[R("div",{className:sD.contact,children:[R("div",{className:sD.label,children:[p(Sn,{spriteUrl:dD,className:sD.icon,"use-stroke":"true"}),p($t,{variant:"standardSemiBold",children:"Chat Now"}),p($t,{children:"Right from this website"})]}),p(P,{onClick:()=>t(),className:sD.action,variant:"contained",children:"Message Us"})]}),R("div",{className:sD.contact,children:[R("div",{className:sD.label,children:[p(Sn,{spriteUrl:lD,className:sD.icon}),p($t,{variant:"standardSemiBold",children:"Call or Text"}),p($t,{children:"From your phone"})]}),p(P,{onClick:()=>window.open("tel:+17079634806"),className:sD.action,variant:"contained",children:"(707) 963-4806"})]}),R("div",{className:sD.contact,children:[R("div",{className:sD.label,children:[p(Sn,{spriteUrl:cD,className:sD.icon}),p($t,{variant:"standardSemiBold",children:"Email"}),p($t,{children:"From your email app"})]}),p(P,{onClick:()=>window.open("mailto:[email protected]"),className:sD.action,variant:"contained",children:"[email protected]"})]})]})]}),R("div",{className:sD.card,children:[p(Vt,{variant:"h4",className:sD.header,children:"Help Articles"}),p("div",{className:sD.subheader,children:p($t,{variant:"standard",children:"Guides on how to navigate around the NMR Portal."})}),p("div",{className:sD.articles,children:yp.map(((e,t)=>R("div",{className:sD.article,onClick:()=>(e=>{l(e),i(!0),d()})(t),children:[p($t,{variant:"standard",children:e.title}),p(Sn,{spriteUrl:aD,className:sD.icon})]},t)))})]})]}),R("div",{className:sD.faqCard,children:[p(Vt,{variant:"h4",className:sD.header,children:"FAQs"}),p("div",{className:sD.faqs,children:oD.map(((e,t)=>p(c,{faq:e,index:t})))})]})]}),n&&p("div",{className:sD.content,children:R("div",{className:sD.contentSection,children:[R("div",{className:sD.contentTitle,children:[p(P,{className:sD.topicBtn,onClick:()=>{l(0===o?yp.length-1:o-1)},startIcon:p(Sn,{spriteUrl:Xh,className:sD.topicIcon}),children:"Previous"}),p(Vt,{variant:"h4",className:sD.topicTitle,children:yp[o].title}),p(P,{className:sD.topicBtn,onClick:()=>{o===yp.length-1?l(0):l(o+1)},endIcon:p(Sn,{spriteUrl:nr,className:sD.topicIcon}),children:"Next"})]}),R("div",{className:sD.instructions,children:[""!==yp[o].videoFilePath&&R("video",{controls:!0,width:"70%",className:sD.videoContainer,children:[" ",p("source",{src:yp[o].videoFilePath,type:"video/mp4"})," Your browser does not support the video tag. "]}),p(mn,{html:yp[o].content})]})]})})]})};var pD={container:"FaqsNMR_container_1",header:"FaqsNMR_header_6",tab:"FaqsNMR_tab_14",activeTab:"FaqsNMR_activeTab_33",content:"FaqsNMR_content_40",faqContainer:"FaqsNMR_faqContainer_49",title:"FaqsNMR_title_57",icon:"FaqsNMR_icon_64"};const uD=()=>{const e=f(),t=h(),a=A(t.breakpoints.up("lg")),n=({faq:e,index:t})=>{const[a,n]=m.exports.useState(!1);return R("div",{className:pD.faqContainer,children:[R("div",{className:pD.title,onClick:()=>n(!a),children:[p($t,{variant:"standardSemiBold",children:e.title}),p(Sn,{spriteUrl:a?Yi:Vi,className:pD.icon})]}),a&&p("div",{className:pD.answer,children:p($t,{children:e.content})})]},t)};return R("div",{className:pD.container,children:[R("div",{className:pD.header,children:[p(Vt,{variant:"h4",className:pD.activeTab,children:a?"Fequently Asked Questions":"FAQs"}),p(Vt,{variant:"h4",className:pD.tab,"tab-position":"end",onClick:()=>e(Tt.NMR_CONTACT),children:"Contact Us"})]}),R("div",{className:pD.content,children:[p(Vt,{variant:"h4",children:"FAQs"}),oD.map(((e,t)=>p(n,{faq:e,index:t})))]})]})};var hD="ContactNMR_container_1",vD="ContactNMR_header_6",gD="ContactNMR_tab_14",yD="ContactNMR_activeTab_33",bD="ContactNMR_content_41",_D="ContactNMR_contactFormContainer_51",ND="ContactNMR_grid_57",fD="ContactNMR_formField_62",CD="ContactNMR_buttonContainer_67",SD="ContactNMR_button_67",xD="ContactNMR_contactInfoContainer_81",AD="ContactNMR_contactInfo_81";const ID=()=>{const e=f(),t=h(),a=A(t.breakpoints.up("lg"));return R("div",{className:hD,children:[R("div",{className:vD,children:[p(Vt,{variant:"h4",className:gD,onClick:()=>e(Tt.NMR_FAQ),children:a?"Fequently Asked Questions":"FAQs"}),p(Vt,{variant:"h4",className:yD,"tab-position":"end",children:"Contact Us"})]}),R("div",{className:bD,children:[p(Vt,{variant:"h4",children:"Contact Us"}),R("div",{className:xD,children:[R("div",{className:AD,children:[p($t,{children:"Address"}),p($t,{variant:"standard",children:"899 Adams Street Suite A, St. Helena, CA, 94574, USA"})]}),R("div",{className:AD,children:[p($t,{children:"Phone Number"}),p($t,{variant:"standard",children:"(707) 963-4806"})]})]}),p(Vt,{variant:"h4",children:"Send Us a Message"}
1),p(q,{initialValues:{firstname:"",lastname:"",email:"",phone:"",message:""},onSubmit:e=>{var t;t=e,console.log(t)},enableReinitialize:!0,children:({handleChange:e,values:t,resetForm:a,errors:n,touched:i})=>R(W,{className:_D,children:[R("div",{className:ND,children:[R("div",{className:fD,children:[p(Me,{children:"First Name"}),p(H,{name:"firstname",value:t.firstname,onChange:t=>e(t),sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"}}}})]}),R("div",{className:fD,children:[p(Me,{children:"Last Name"}),p(H,{name:"lastname",value:t.lastname,onChange:t=>e(t),sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"}}}})]}),R("div",{className:fD,children:[p(Me,{children:"Email Address"}),p(H,{name:"email",value:t.email,onChange:t=>e(t),sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"}}}})]}),R("div",{className:fD,children:[p(Me,{children:"Phone Number"}),p(H,{name:"phone",value:t.phone,onChange:t=>e(t),sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"}}}})]})]}),R("div",{className:fD,children:[p(Me,{children:"Message"}),p(H,{name:"message",value:t.message,onChange:t=>e(t),multiline:!0,rows:10,sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"}}}})]}),p("div",{className:CD,children:p(P,{variant:"contained",className:SD,type:"submit",children:"Send Message"})})]})})]})]})};var wD={container:"GeneratedReport_container_1",title:"GeneratedReport_title_7",text:"GeneratedReport_text_12",buttonContainer:"GeneratedReport_buttonContainer_15",header:"GeneratedReport_header_25",sampleOptionsContainer:"GeneratedReport_sampleOptionsContainer_38",left:"GeneratedReport_left_46",optionSelectContainer:"GeneratedReport_optionSelectContainer_53",baseline:"GeneratedReport_baseline_62",helperTextContainer:"GeneratedReport_helperTextContainer_68",helperText:"GeneratedReport_helperText_68",textBox:"GeneratedReport_textBox_81",blueText:"GeneratedReport_blueText_84",right:"GeneratedReport_right_88",helpButtonContainer:"GeneratedReport_helpButtonContainer_105",helpButton:"GeneratedReport_helpButton_105",icon:"GeneratedReport_icon_116",itemActive:"GeneratedReport_itemActive_121",helpContact:"GeneratedReport_helpContact_124",helpOptions:"GeneratedReport_helpOptions_144",option:"GeneratedReport_option_53",resultContainer:"GeneratedReport_resultContainer_180",headerText:"GeneratedReport_headerText_194",resultAndHelpContainer:"GeneratedReport_resultAndHelpContainer_197",result:"GeneratedReport_result_180",resultHelp:"GeneratedReport_resultHelp_213",resultHelpText:"GeneratedReport_resultHelpText_224",resultTimelineHelp:"GeneratedReport_resultTimelineHelp_229",timelineChart:"GeneratedReport_timelineChart_244",resultContainerMobile:"GeneratedReport_resultContainerMobile_255",spectraContainer:"GeneratedReport_spectraContainer_305",spectraHeader:"GeneratedReport_spectraHeader_319",chart:"GeneratedReport_chart_332",legend:"GeneratedReport_legend_336",multiSpectraContainer:"GeneratedReport_multiSpectraContainer_343",regionsInfoContainer:"GeneratedReport_regionsInfoContainer_386",regionCards:"GeneratedReport_regionCards_396",regionInfo:"GeneratedReport_regionInfo_406",description:"GeneratedReport_description_417",button:"GeneratedReport_button_15"};var TD={container:"NMRContactUs_container_1",tabs:"NMRContactUs_tabs_10",tab:"NMRContactUs_tab_10",itemActive:"NMRContactUs_itemActive_33",icon:"NMRContactUs_icon_38",tabContentContainer:"NMRContactUs_tabContentContainer_57",faqContent:"NMRContactUs_faqContent_68",faqContainer:"NMRContactUs_faqContainer_73",title:"N
1MRContactUs_title_81",contactOpts:"NMRContactUs_contactOpts_92",contact:"NMRContactUs_contact_92",label:"NMRContactUs_label_119",action:"NMRContactUs_action_135",contactFormContainer:"NMRContactUs_contactFormContainer_153",grid:"NMRContactUs_grid_159",formField:"NMRContactUs_formField_164",buttonContainer:"NMRContactUs_buttonContainer_169",button:"NMRContactUs_button_169",contactInfoContainer:"NMRContactUs_contactInfoContainer_183",contactInfo:"NMRContactUs_contactInfo_183",contactContainer:"NMRContactUs_contactContainer_198"};const RD=({helpRef:e,contactTab:t,setContactTab:a})=>{const n=h(),i=A(n.breakpoints.up("lg")),{show:r}=S(),s=({faq:e,index:t})=>{const[a,n]=m.exports.useState(!1);return R("div",{className:TD.faqContainer,children:[R("div",{className:TD.title,onClick:()=>n(!a),children:[p($t,{variant:"standardSemiBold",children:e.title}),p(Sn,{spriteUrl:a?Yi:Vi,className:TD.icon})]}),a&&p("div",{className:TD.answer,children:p($t,{children:e.content})})]},t)};return R("div",{className:TD.container,ref:e,children:[R("div",{className:TD.tabs,children:[p("div",{className:I(TD.tab,{[TD.itemActive]:0===t}),"tab-position":"left",onClick:()=>a(0),children:R($t,{variant:"big",className:TD.tabText,children:[i?p(Sn,{spriteUrl:JE,className:TD.icon}):"",i?"Frequently Asked Questions":"FAQs"]})}),p("div",{className:I(TD.tab,{[TD.itemActive]:1===t}),"tab-position":"right",onClick:()=>a(1),children:R($t,{variant:"big",children:[i?p(Sn,{spriteUrl:cD,className:TD.icon}):"",i?"Send Us a Message":"Send a Message"]})})]}),R("div",{className:TD.tabContentContainer,children:[0===t&&p("div",{className:TD.faqContent,children:oD.map(((e,t)=>p(s,{faq:e,index:t},t)))}),1===t&&R("div",{className:TD.contactContainer,children:[p(Vt,{variant:"h5",children:"Contact Us"}),p($t,{variant:"standard",children:"Please reach out via live chat, email, phone, or SMS - whichever method best suits your preference and convenience."}),R("div",{className:TD.contactOpts,children:[R("div",{className:TD.contact,children:[R("div",{className:TD.label,children:[p(Sn,{spriteUrl:dD,className:TD.icon,"use-stroke":"true"}),p($t,{variant:"standardSemiBold",children:"Chat Now"}),p($t,{children:"Right from this website"})]}),p(P,{onClick:()=>r(),className:TD.action,variant:"contained",children:"Message Us"})]}),R("div",{className:TD.contact,children:[R("div",{className:TD.label,children:[p(Sn,{spriteUrl:lD,className:TD.icon}),p($t,{variant:"standardSemiBold",children:"Call or Text"}),p($t,{children:"From your phone"})]}),p(P,{onClick:()=>window.open("tel:+17079634806"),className:TD.action,variant:"contained",children:"(707) 963-4806"})]}),R("div",{className:TD.contact,children:[R("div",{className:TD.label,children:[p(Sn,{spriteUrl:cD,className:TD.icon}),p($t,{variant:"standardSemiBold",children:"Email"}),p($t,{children:"From your email app"})]}),p(P,{onClick:()=>window.open("mailto:[email protected]"),className:TD.action,variant:"contained",children:"[email protected]"})]})]})]})]})]})};var kD="NMRUnderstandingModal_container_1",ED="NMRUnderstandingModal_header_7",MD="NMRUnderstandingModal_icon_16",DD="NMRUnderstandingModal_content_21",PD="NMRUnderstandingModal_chart_28",LD="NMRUnderstandingModal_explainContainer_35",BD="NMRUnderstandingModal_section_44",OD="NMRUnderstandingModal_list_48",FD="NMRUnderstandingModal_item_51",HD="NMRUnderstandingModal_redText_54",UD="NMRUnderstandingModal_blueText_58",zD="NMRUnderstandingModal_buttonContainer_62",GD="NMRUnderstandingModal_button_62",qD="NMRUnderstandingModal_linkButton_74",WD="NMRUnderstandingModal_helpButton_84";const VD=({section:e})=>{const t=f(),a=h(),n=A(a.breakpoints.up("lg")),[i,r]=m.exports.useState(!1);return R(k,{children:[p(P,{size:"small",className:WD,startIcon:p(Sn,{spriteUrl:sv,className:MD}),onClick:()=>r(!0),children:n?"difference"===e?"Understanding the Difference Spectrum":"Understanding the NMR Spectra":"NMR Help?"}),p(wi,{open:i,setModal:()=>r(!1),large:!0,children:R("div",{className:kD,children:[R("div",{className:ED,children:[R("div",{children:[p(Vt,{variant:"h4",children:"difference"===e?"Understanding the Difference Spectrum":"Understanding the NMR Spectra"}),p($t,{children:"difference"===e?"A single continuous waveform centered around zero shows where your two samples differ - not two overlapping spectra.":""})]}),p(Sn,{spriteUrl:gp,className:MD,onClick:()=>r(!1)})]}),R("div",{className:DD,children:[p("img",{src:"difference"===e?"/assets/annotatedDiffExNMR.532711b2.png":"/assets/annotatedSpectraExNMR.9616431c.png",className:PD}),R("div","difference"===e?{className:LD,children:[R($t,{variant:"big",children:[p("b",{children:"How to Read a Difference Spectrum: "}),"A visual guide to chemical variance"]}),R("div",{className:BD,children:[p($t,{variant:"standard",children:"The Concept â This chart shows the mathematical subtraction of one sample from another."}),R("ul",{className:OD,children:[p("li",{className:FD,children:p($t,{variant:"standard",children:"The Center Line (0.0): This represents a perfect match. If the line is flat, the two samples are chemically identical in that region."})}),p("li",{className:FD,children:p($t,{variant:"standard",children:"The Peaks: Spikes moving up or down represent differences in concentration of specific chemical compounds."})})]})]}),R("div",{className:BD,children:[p($t,{variant:"standard",children:"Decoding the Colors"}),R("ul",{className:OD,children:[p("li",{className:FD,children:R($t,{variant:"standard",children:[p("span",{className:UD,children:"Blue Peaks"})," â These compounds are present in higher concentrations in your primary sample compared to the baseline."]})}),p("li",{className:FD,children:R($t,{variant:"standard",children:[p("span",{className:HD,children:"Red Peaks"})," â These compounds are present in lower concentrations in your primary sample (or higher in the baseline)."]})})]})]}),R("div",{className:BD,children:[p($t,{variant:"standard",children:'The "Regions" (Top Bar) divides the horizontal axis (Chemical Shift) into winemaking zones to help understand what parts of the samples are differing.'}),p($t,{variant:"standard",children:"How to Interpret"}),R("ul",{className:OD,children:[p("li",{className:FD,children:p($t,{variant:"standard",children:'Check Magnitude: Taller spikes indicate a larger difference in concentration. Small "fuzz" near the center line is often just background noise.'})}),p("li",{className:FD,children:p($t,{variant:"standard",children:"Check Region: Are the differences mostly in the Acid Profile (tartaric adjustment?), the Sugar/Alcohol region (fermentation progress?), or are there signs of Oxidation occurring (acetaldehyde formation)?"})})]})]})]}:{className:LD,children:[R($t,{variant:"big",children:[p("b",{children:"Reading the Full Spectra:"})," Comparing the complete chemical fingerprints side-by-side"]}),R("div",{className:BD,children:[p($t,{variant:"standard",children:'The Concept â This chart displays the absolute chemical composition of your wines. Unlike the "Difference Spectrum" (which does the math for you), this view allows you to see the raw data for both samples independently.'}),R("ul",{className:OD,children:[p("li",{className:FD,children:p($t,{variant:"standard",children:"Top Chart: Your selected Baseline (Reference)."})}),p("li",{className:FD,children:p($t,{variant:"standard",children:"Bottom Chart: The sample currently being compared/analyzed."})})]})]}),R("div",{className:BD,children:[p($t,{variant:"standard",children:"How to Read Peaks â NMR data is quantitative. The rule of thumb is simple:"}),R("ul",{className:OD,children:[p("li",{className:FD,children:R($t,{variant:"standard",children:["Position (Horizontal): Tells you ",p("b",{children:"what"})," the compound is (Sugar, Acid, Phenolic compound, etc.)."]})}),p("li",{className:FD,children:R($t,{variant:"standard",children:["Height (Vertical): Tells you ",p("b",{children:"how much"})," is there. A taller peak means a higher concentration of that specific molecule."]})})]})]}),R("div",{className:BD,children:[p($t,{variant:"standard",children:"Why use this view?"}),R("ul",{className:OD,children:[p("li",{className:FD,children:p($t,{variant:"standard",children:'Context: Sometimes the Difference Spectrum shows a change, but you want to know the total amount. (e.g., "I know Sample B has less sugar than the baseline, but is it actually dry
1yet?")'})}),p("li",{className:FD,children:p($t,{variant:"standard",children:"Validation: Use this to view the overall NMR spectral signature, verify that the main structural components look normal before diving into minute differences."})})]})]})]}),R("div",{className:zD,children:[p(P,{size:"small",startIcon:p(Sn,{spriteUrl:sv,className:MD}),className:qD,onClick:()=>t(Tt.NMR_ABOUT),children:p($t,{variant:"small",children:"difference"===e?"Learn more about NMR spectra differences":"Learn more about NMR spectra"})}),p(P,{variant:"contained",className:GD,onClick:()=>r(!1),children:"Got It"})]})]})]})})]})};var YD="RequestReport_button_1",jD="RequestReport_icon_7",$D="RequestReport_container_12",QD="RequestReport_header_17",KD="RequestReport_content_28",XD="RequestReport_optionsContainer_34",ZD="RequestReport_left_41",JD="RequestReport_right_47",eP="RequestReport_reviewCard_53",tP="RequestReport_cardText_57",aP="RequestReport_helperText_64",nP="RequestReport_samples_67",iP="RequestReport_nameContainer_75",rP="RequestReport_formInput_80",sP="RequestReport_buttonContainer_107",oP="RequestReport_thank_112",lP="RequestReport_doneIcon_136";const cP=({reportName:e,baseline:t,samples:a,reportType:n,comparisons:i})=>{const[r,s]=m.exports.useState(!1),[o,l]=m.exports.useState(null!=e?e:""),[c,d]=m.exports.useState(!1),u=()=>{s(!1),d(!1),l(null!=e?e:"")};return R(k,{children:[p(P,{variant:"contained",className:YD,onClick:()=>s(!0),children:"Request Official Lab Report"}),p(wi,{open:r,setModal:u,medium:!0,children:R("div",{className:$D,children:[R("div",{className:QD,children:[p(Vt,{variant:"h4",children:c?"":"Request Official Lab Report"}),p(Sn,{spriteUrl:gp,className:jD,onClick:u})]}),R("div",c?{className:KD,children:[p(Sn,{spriteUrl:kC,className:lP}),p(Vt,{variant:"h4",className:oP,children:"Thank you, your request has been received by the lab!"})]}:{className:KD,children:[p($t,{variant:"big",children:"You are requesting an official lab report that will be generated, review and validated by our NMR team. There is no additional charge for this report and the expected turnaround time is 3 days or less."}),R("div",{className:XD,children:[R("div",{className:ZD,children:[p("div",{className:iP,children:p(H,{name:"nameReport",value:o,onChange:e=>l(null==e?void 0:e.target.value),placeholder:"Name your report (optional)",className:rP,label:"Report Name",InputLabelProps:{sx:{color:"#8c8d96",backgroundColor:"transparent","&.Mui-focused":{color:"#5160EB"}},shrink:!0},sx:{"& .MuiInput-underline:after":{borderBottomColor:"#5160EB",borderBottomWidth:"2px"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{borderColor:"#5160EB"}},"& .MuiOutlinedInput-root fieldset":{borderColor:"#505C78",borderWidth:"1px"}}})}),R("div",{className:eP,children:[p($t,{variant:"small",className:aP,children:"Report Type"}),p($t,{variant:"standard",className:tP,children:"multipoint_comparison"===n?"Multi-Point Comparison":"Comparison"})]}),R("div",{className:eP,children:[p($t,{variant:"small",className:aP,children:"Baseline"}),p($t,{variant:"standard",className:tP,children:t.description})]})]}),p("div",{className:JD,children:R("div","multipoint_comparison"===n?{children:[p($t,{variant:"small",className:aP,children:"Samples"}),i&&p("div",{className:nP,"two-col":i.length/2>2?"true":"false",children:i&&i.map((e=>p("div",{className:eP,children:p($t,{variant:"standard",className:tP,children:e.sample.name})},e.sample.id)))})]}:{children:[p($t,{variant:"small",className:aP,children:"Samples"}),a&&p("div",{className:nP,"two-col":a.length/2>2?"true":"false",children:a.map((e=>p("div",{className:eP,children:p($t,{variant:"standard",className:tP,children:e.description})},e.id)))})]})})]}),p("div",{className:sP,children:p(P,{variant:"contained",className:YD,onClick:()=>{d(!0)},children:"Submit Request"})})]})]})})]})};var dP="LoadingModal_container_1",mP="LoadingModal_finishedContainer_7",pP="LoadingModal_finishedIcon_17",uP="LoadingModal_text_20",hP="LoadingModal_finishedHelperText_23";const vP=({open:e,setOpen:t,reportType:a})=>{const n=Wt();function i(){return R(m.exports.Fragment,{children:[p("svg",{width:0,height:0,children:p("defs",{children:R("linearGradient",{id:"my_gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"#ce5c7998"}),p("stop",{offset:"100%",stopColor:"#97a0f38f"})]})})}
1),p(O,{size:"13vh",sx:{"svg circle":{stroke:"url(#my_gradient)"}}})]})}return p(wi,{open:e,setModal:()=>t(!0),large:!0,children:p("div",{className:dP,children:p("div",{className:mP,children:R("div",{children:["multipoint_comparison"===a&&p(Sn,{spriteUrl:kC,className:pP}),"multipoint_comparison"!==a&&p(i,{}),p(Vt,{variant:"h3",className:uP,children:"multipoint_comparison"!==a?"Generating Report...":n("nmr-wiz-submit-finish")}),p($t,{variant:"big",className:hP,children:"Select one sample to serve as your reference baseline. All other selected samples will be compared against this baseline."})]})})})})};var gP="DrillDownModalMultipoint_container_1",yP="DrillDownModalMultipoint_header_7",bP="DrillDownModalMultipoint_titleText_18",_P="DrillDownModalMultipoint_sampleNav_23",NP="DrillDownModalMultipoint_iconContainer_28",fP="DrillDownModalMultipoint_icon_28",CP="DrillDownModalMultipoint_headerText_40",SP="DrillDownModalMultipoint_subheader_45",xP="DrillDownModalMultipoint_baseline_50",AP="DrillDownModalMultipoint_sample_23",IP="DrillDownModalMultipoint_content_62",wP="DrillDownModalMultipoint_chartContainer_69",TP="DrillDownModalMultipoint_tabsAndContentContainer_86",RP="DrillDownModalMultipoint_tabsContainer_94",kP="DrillDownModalMultipoint_tab_86",EP="DrillDownModalMultipoint_itemActive_116",MP="DrillDownModalMultipoint_title_18",DP="DrillDownModalMultipoint_tabContentContainer_137",PP="DrillDownModalMultipoint_subregionContent_143",LP="DrillDownModalMultipoint_suggestedAnalysesContainer_152",BP="DrillDownModalMultipoint_suggestedAnalyses_152",OP="DrillDownModalMultipoint_analysis_171",FP="DrillDownModalMultipoint_analysisHeader_180",HP="DrillDownModalMultipoint_labels_194",UP="DrillDownModalMultipoint_label_194",zP="DrillDownModalMultipoint_analysisFooter_205",GP="DrillDownModalMultipoint_footer_211",qP="DrillDownModalMultipoint_button_222",WP="DrillDownModalMultipoint_buttonTab_229",VP="DrillDownModalMultipoint_btnIcon_237",YP="DrillDownModalMultipoint_buttonText_248",jP="DrillDownModalMultipoint_bottomText_248",$P="DrillDownModalMultipoint_direction_258";const QP=({open:e,setOpen:t,region:a,setRegion:n,baseline:i,comparisons:r,focus:s,setFocus:o,sampleIndex:l,setSampleIndex:c})=>{var d,u,h,v,g,y;const b=Rk[null!=a?a:0],[_,N]=m.exports.useState(0),f=e=>"back"===e?0===a?ZR[JR.length-1]:ZR[a-1]:a===JR.length-1?ZR[0]:ZR[a+1],C=()=>{o(null),t(!1)};return p(wi,{open:e,setModal:C,large:!0,children:R("div",{className:gP,children:[R("div",{className:yP,children:[p("div",{className:NP,children:p(Sn,{spriteUrl:gp,className:fP,onClick:C})}),R("div",{className:_P,children:[p(P,{variant:"outlined",size:"small",className:WP,startIcon:p(Sn,{spriteUrl:Xh,className:VP}),onClick:()=>{c(0===l?r.length-1:l-1)},children:R("div",{className:YP,"button-align":"left",children:[p($t,{variant:"small",className:$P,children:"Previous"}),p($t,{className:jP,children:0===l?(null==(x=null==(S=r[r.length-1])?void 0:S.sample)?void 0:x.name)?r[r.length-1].sample.name:"":(null==(w=null==(A=r[l-1])?void 0:A.sample)?void 0:w.name)?r[l-1].sample.name:""})]})}),p("div",{className:bP,children:R("div",{className:CP,children:[R(Vt,{variant:"h4",children:[null==(d=r[l])?void 0:d.sample.name," ",b.title," Region - Detailed View"]}),R("div",{className:SP,children:[R($t,{variant:"small",className:xP,children:["Baseline - ",i.description]}),r&&p($t,{variant:"small",className:AP,children:null==(h=null==(u=r[l])?void 0:u.sample)?void 0:h.name}),p($t,{variant:"small",children:b.ppm})]})]})}),p(P,{variant:"outlined",size:"small",className:WP,endIcon:p(Sn,{spriteUrl:nr,className:VP}),onClick:()=>{l===r.length-1?c(0):c(l+1)},children:R("div",{className:YP,"button-align":"right",children:[p($t,{variant:"small",className:$P,children:"Next"}),p($t,{className:jP,children:(()=>{var e,t,a,n;return l===r.length-1?(null==(t=null==(e=r[0])?void 0:e.sample)?void 0:t.name)?r[0].sample.name:"":(null==(n=null==(a=r[l+1])?void 0:a.sample)?void 0:n.name)?r[l+1].sample.name:""})()})]})})]})]}),R("div",{className:IP,children:[r&&r[l]&&R("div",{className:wP,children:[p(Vt,{variant:"h5",children:"Difference Spectrum"}),R($t,{variant:"standard",children:[b.title,": Sub Regions"]}),p(rR,{data:null!=(g=null==(v=r[l])?void 0:v.comparisonData)?g:null,focusRegion:s})]}),R("div",{className:wP,children:[p(Vt,{variant:"h5",children:"NMR Spectra"}),R($t,{variant:"standard",children:[b.title,": Sub Regions"]}
1),r&&r[l]&&p(JT,{secondaryData:r[l].spectrumData,data:i.spectrumData,focusRegion:s}),!r&&!r[l]&&p(JT,{data:i.spectrumData,focusRegion:s})]}),R("div",{className:TP,children:[b.subregions.length>1&&p("div",{className:RP,children:b.subregions.map(((e,t)=>p("div",{className:I(kP,{[EP]:t===_}),onClick:()=>N(t),"tab-position":0===t||t===b.subregions.length-1?0===t?"left":"right":"middle",children:p($t,{variant:"big",children:e.title})},t)))}),R("div",{className:DP,children:[R(Vt,{variant:"h5",className:MP,children:["About ",null==(y=b.subregions[_])?void 0:y.title," Sub Region"]}),b.subregions[_].content.map(((e,t)=>R("div",{className:PP,children:[p($t,{variant:"standard",children:e.header}),p($t,{children:p(mn,{html:e.content})})]},t)))]})]}),b&&b.suggestedAnalyses&&b.suggestedAnalyses.length>0&&R("div",{className:LP,children:[p(Vt,{variant:"h5",className:MP,children:"Suggested Analyses"}),p("div",{className:BP,children:b.suggestedAnalyses&&b.suggestedAnalyses.map(((e,t)=>R("div",{className:OP,children:[R("div",{className:FP,children:[p($t,{variant:"big",children:e.name}),R("div",{className:HP,children:[R($t,{variant:"small",className:UP,children:["Method: ",e.method]}),R($t,{variant:"small",className:UP,children:["TAT: ",e.tat]})]})]}),p($t,{variant:"standard",children:e.summary}),p("div",{className:zP,children:p(P,{variant:"contained",href:e.link,target:"_blank",size:"small",className:qP,children:"View Analysis"})})]},t)))})]})]}),R("div",{className:GP,children:[p(P,{variant:"outlined",size:"small",className:WP,startIcon:p(Sn,{spriteUrl:Xh,className:VP}),onClick:()=>{0===a?(n(JR.length-1),o(JR[JR.length-1])):(n(a-1),o(JR[a-1])),N(0)},children:R("div",{className:YP,"button-align":"left",children:[p($t,{variant:"small",className:$P,children:"Previous"}),p($t,{className:jP,children:f("back")})]})}),p(P,{variant:"outlined",size:"small",className:WP,endIcon:p(Sn,{spriteUrl:nr,className:VP}),onClick:()=>{a===JR.length-1?(n(0),o(JR[0])):(n(a+1),o(JR[a+1])),N(0)},children:R("div",{className:YP,"button-align":"right",children:[p($t,{variant:"small",className:$P,children:"Next"}),p($t,{className:jP,children:f("next")})]})})]})]})});var S,x,A,w},KP=()=>{var e,t,a,n,i,r,s,o,l,c;const{activeClient:d}=m.exports.useContext(_a),{reportId:u,reportType:v}=$(),g=f(),y=h(),b=A(y.breakpoints.up("lg")),_=m.exports.useRef(null),[N,C]=m.exports.useState(!0),[S,w]=m.exports.useState(0),{data:T,isFetched:E}=((e,t)=>{Wt();const a=m.exports.useContext(Na);return L(["getNMRReportOrder",t],(()=>qu.getNMRReportOrder(e,t)),{keepPreviousData:!1,onSuccess:e=>{console.log("Get NMR report order",e)},onError:e=>{console.error("Get NMR report order error",e),a.open(fa(e,"Get NMR report order error"),{severity:"error"})}})})(d.code,null!=u?u:""),[M,D]=m.exports.useState({}),[B,O]=m.exports.useState([]),[F,H]=m.exports.useState(!1),[U,z]=m.exports.useState(0),[G,q]=m.exports.useState(!1),[W,V]=m.exports.useState(0),[Y,j]=m.exports.useState(null!=(e=null==T?void 0:T.comparisonSampleIds[0])?e:""),{data:Q,isFetched:K}=XR(d.code,null!=(t=null==T?void 0:T.baselineSampleId)?t:"",!(!E||!T||""===T.baselineSampleId)),{data:J,refetch:ee,isFetched:te}=XR(d.code,Y,!(!Y||""===Y)),[ae,ne]=m.exports.useState(null),{mutateAsync:ie,isSuccess:re,isLoading:se}=(()=>{Wt();const e=m.exports.useContext(Na);return x(qu.generateComparisonReport,{onSuccess:e=>{console.log("Generate NMR comparison report",e)},onError:t=>{console.error("Generate NMR comparison report error",t),e.open(fa(t,"Generate NMR comparison report error"),{severity:"error"})}})})(),{mutateAsync:oe,isSuccess:le}=(()=>{Wt();const e=m.exports.useContext(Na);return x(qu.generateMultipointComparisonReport,{onSuccess:e=>{console.log("Generate NMR multipoint comparison report",e)},onError:t=>{console.error("Generate NMR multipoint comparison report error",t),e.open(fa(t,"Generate NMR multipoint comparison report error"),{severity:"error"})}})})(),ce=e=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"start"}),z("contact"===e?1:0)},de="The Similarity Index is a quantitative metric that measures the spectral correlation between multiple samples' NMR signatures to determine their degree of identity or variance relative to a defined baseline sample. In multi-sample analyses, this index allows for monitoring of compositional consistency across a process or supply chain, providing a comprehensive, data-driven assessment of stability and uniformity.";m.exports.useEffect((()=>{K&&("multipoint_comparison"===v||te)&&E&&(re||le)&&C(!1)}),[K,te,E,re,le]),m.exports.useEffect((()=>{T&&E&&(async()=>
1{if(T&&E&&"multipoint_comparison"!==v){const e={clientCode:d.code,formData:{baselineId:T.baselineSampleId,comparisonId:T.comparisonSampleIds[0],reportType:T.reportType}};j(T.comparisonSampleIds[0]);const t=await ie(e);D(t)}if(T&&E&&"multipoint_comparison"===v){const e={clientCode:d.code,requestData:{baselineId:T.baselineSampleId,sampleIds:T.comparisonSampleIds}},t=await oe(e);O(t)}})()}),[T,E]),m.exports.useEffect((()=>{Y&&""!==Y&&ee()}),[Y]);const me=async e=>{j(e.target.value);const t={clientCode:d.code,formData:{baselineId:null==T?void 0:T.baselineSampleId,comparisonId:e.target.value,reportType:null==T?void 0:T.reportType}},a=await ie(t);D(a)},pe=(e,t)=>{if(console.log("region num",t,"focus",e),t)V(t),console.log("focus",e),ne(e),q(!0);else{const t=JR.indexOf(e);if(console.log("regionIndex",t),!(t>-1))return void console.log("could not find region index from region text (probably not passed)");V(t),console.log("focus",e),ne(e),q(!0)}};return R("div",{className:wD.container,children:[R("div",{className:wD.title,children:[R("div",{className:wD.text,children:[p(Vt,{variant:"h3",children:"comparison"===v?"Comparison Results":"Multi-Point Comparison Results"}),p($t,{variant:"small",children:"Preview only - not an accredited report"})]}),R("div",{className:wD.buttonContainer,children:[p(cP,{reportName:null!=(a=null==T?void 0:T.title)?a:"",baseline:Q||{},samples:(null==T?void 0:T.comparisonSamples)?T.comparisonSamples:[],reportType:null!=(n=null==T?void 0:T.reportType)?n:"",comparisons:B&&le?B:[]}),p(P,{variant:"contained",className:wD.button,children:"Print Page"})]})]}),R("div",b?{className:wD.header,children:["multipoint_comparison"===v&&R(k,{children:[p("div",{className:wD.resultContainer,"is-expanded":F?"true":"false","is-multipoint":"true",children:p("div",{className:wD.result,children:p("div",{className:wD.timelineChart,children:Q&&p(BR,{reference:{name:Q.description,id:Q.id,collectionDate:Q.collectionDate},samples:B.map((e=>({name:e.sample.name,similarityIndex:e.similarityIndex,collectionDate:e.sample.collectionDate})))})})})}),R("div",{className:wD.sampleOptionsContainer,"is-multipoint":"true",children:[!F&&p("div",{className:wD.left,children:p("div",{className:wD.helperTextContainer,children:R("div",{className:wD.helperText,children:[p($t,{variant:"big",children:"What does the Similarity Index mean?"}),p($t,{variant:"standard",className:wD.textBox,children:de}),p($t,{className:wD.blueText,onClick:()=>g(Tt.NMR_ABOUT),children:"Learn More on About NMR"})]})})}),R("div",{className:wD.right,"is-expanded":F?"true":"false",children:[p("div",{className:wD.helpButtonContainer,children:p(P,{variant:"contained",size:"small",className:I(wD.helpButton,{[wD.itemActive]:F}),startIcon:p(Sn,{spriteUrl:JE,className:wD.icon}),onClick:()=>H(!F),children:"Help"})}),F&&R("div",{className:wD.helpContact,children:[R("div",{className:wD.header,children:[p(Vt,{variant:"h4",children:"Help & Support"}),p(Sn,{spriteUrl:gp,className:wD.icon,onClick:()=>H(!F)})]}),R("div",{className:wD.helpOptions,children:[R("div",{className:wD.option,onClick:()=>ce("faq"),children:[p(Sn,{spriteUrl:JE,className:wD.icon,"help-type":"faq"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"View FAQ"}),p($t,{variant:"small",children:"Common questions and answers"})]})]}),R("div",{className:wD.option,onClick:()=>window.open("tel:+17079634806"),children:[p(Sn,{spriteUrl:lD,className:wD.icon,"help-type":"call"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Call Support"}),p($t,{variant:"small",children:"+1 (707) 963-4806"})]})]}),R("div",{className:wD.option,onClick:()=>ce("contact"),children:[p(Sn,{spriteUrl:cD,className:wD.icon,"help-type":"contact"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Contact Us"}),p($t,{variant:"small",children:"Send us a message"})]})]})]})]})]})]})]}),"multipoint_comparison"!==v&&R(k,{children:[R("div",{className:wD.sampleOptionsContainer,children:[!F&&R("div",{className:wD.left,children:[p(Vt,{variant:"h4",children:"Select Samples to Compare"}),R("div",{className:wD.optionSelectContainer,"report-type":null==T?void 0:T.reportType,children:[p(Me,{children:"Baseline sample"}),p("div",{className:wD.baseline,children:p($t,{children:null==T?void 0:T.baselineSample.description})})]}),T&&R("div",{className:wD.optionSelectContainer,"report-type":null==T?void 0:T.reportType,children:[p(Me,{children:"Compared With"}),p(X,{name:"selectedSample",value:null!=Y?Y:"",onChange:e=>me(e),sx:{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"}},children:null==T?void 0:T.comparisonSamples.map((e=>p(Z,{value:e.id,className:wD.sampleTypeSelect,sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}}
1,"&:hover":{backgroundColor:"#edf0f7"}},children:e.description},e.id)))})]})]}),R("div",{className:wD.right,"is-expanded":F?"true":"false",children:[p("div",{className:wD.helpButtonContainer,children:p(P,{variant:"contained",size:"small",className:I(wD.helpButton,{[wD.itemActive]:F}),startIcon:p(Sn,{spriteUrl:JE,className:wD.icon}),onClick:()=>H(!F),children:"Help"})}),F&&R("div",{className:wD.helpContact,children:[R("div",{className:wD.header,children:[p(Vt,{variant:"h4",children:"Help & Support"}),p(Sn,{spriteUrl:gp,className:wD.icon,onClick:()=>H(!F)})]}),R("div",{className:wD.helpOptions,children:[R("div",{className:wD.option,onClick:()=>ce("faq"),children:[p(Sn,{spriteUrl:JE,className:wD.icon,"help-type":"faq"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"View FAQ"}),p($t,{variant:"small",children:"Common questions and answers"})]})]}),R("div",{className:wD.option,onClick:()=>window.open("tel:+17079634806"),children:[p(Sn,{spriteUrl:lD,className:wD.icon,"help-type":"call"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Call Support"}),p($t,{variant:"small",children:"+1 (707) 963-4806"})]})]}),R("div",{className:wD.option,onClick:()=>ce("contact"),children:[p(Sn,{spriteUrl:cD,className:wD.icon,"help-type":"contact"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Contact Us"}),p($t,{variant:"small",children:"Send us a message"})]})]})]})]})]})]}),T&&M&&R("div",{className:wD.resultContainer,"is-expanded":F?"true":"false",children:[R("div",{className:wD.result,children:[p(Vt,{variant:"h4",className:wD.headerText,children:"Similarity Results"}),p(tR,{percentage:M.reportData?null==(i=M.reportData.similarity)?void 0:i.score:0,description:M.reportData?null==(r=M.reportData.similarity)?void 0:r.result:""})]}),p("div",{className:wD.resultHelp,children:R("div",{className:wD.resultHelpText,children:[p($t,{variant:"big",children:"What does this mean?"}),p($t,{variant:"standard",children:"The Similarity Index provides a quantitative spectral correlation between two NMR signatures, measuring identity or variance against a baseline to ensure precise pairwise compositional consistency."})]})})]})]})]}:{className:wD.header,children:["multipoint_comparison"!==v&&R(k,{children:[R("div",{className:wD.sampleOptionsContainer,children:[!F&&T&&R("div",{className:wD.left,children:[p(Vt,{variant:"h4",children:"Select Samples to Compare"}),R("div",{className:wD.optionSelectContainer,children:[p(Me,{children:"Baseline sample"}),p("div",{className:wD.baseline,children:p($t,{children:null==T?void 0:T.baselineSample.description})})]}),R("div",{className:wD.optionSelectContainer,children:[p(Me,{children:"Compared With"}),p(X,{name:"selectedSample",value:Y,onChange:e=>me(e),sx:{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#5160EB"}},children:null==T?void 0:T.comparisonSamples.map((e=>p(Z,{value:e.id,className:wD.sampleTypeSelect,sx:{"&.Mui-selected":{backgroundColor:"#ccd0e8","&:hover":{backgroundColor:"#c3c6db"}},"&:hover":{backgroundColor:"#edf0f7"}},children:e.description},e.id)))})]})]}),R("div",{className:wD.right,"is-expanded":F?"true":"false",children:[p("div",{className:wD.helpButtonContainer,children:p(P,{variant:"contained",size:"small",className:I(wD.helpButton,{[wD.itemActive]:F}),startIcon:p(Sn,{spriteUrl:JE,className:wD.icon}),onClick:()=>H(!F),children:"Help"})}),F&&R("div",{className:wD.helpContact,children:[R("div",{className:wD.header,children:[p(Vt,{variant:"h4",children:"Help & Support"}),p(Sn,{spriteUrl:gp,className:wD.icon,onClick:()=>H(!F)})]}),R("div",{className:wD.helpOptions,children:[R("div",{className:wD.option,onClick:()=>ce("faq"),children:[p(Sn,{spriteUrl:JE,className:wD.icon,"help-type":"faq"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"View FAQ"}),p($t,{variant:"small",children:"Common questions and answers"})]})]}),R("div",{className:wD.option,onClick:()=>window.open("tel:+17079634806"),children:[p(Sn,{spriteUrl:lD,className:wD.icon,"help-type":"call"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Call Support"}),p($t,{variant:"small",children:"+1 (707) 963-4806"})]})]}),R("div",{className:wD.option,onClick:()=>ce("contact"),children:[p(Sn,{spriteUrl:cD,className:wD.icon,"help-type":"contact"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Contact Us"}),p($t,{variant:"small",children:"Send us a message"})]})]})]})]})]})]}),T&&M&&R("div",{className:wD.resultContainerMobile,"is-expanded":F?"true":"false",children:[p(Vt,{variant:"h4",className:wD.headerText,children:"Similarity Results"}),R("div",{className:wD.resultAndHelpContainer,children:[p(tR,{percentage:M.reportData?null==(s=M.reportData.similarity)?void 0:s.score:0,description:M.reportData?null==(o=M.reportData.similarity)?void 0:o.result:""}),R("div",{className:wD.resultHelp,children:[p($t,{variant:"big",children:"What does this mean?"}),p($t,{variant:"standard",children:de})]})]})]})]}),"multipoint_comparison"===v&&R(k,{children:[T&&M&&p("div",{className:wD.resultContainerMobile,"is-expanded":F?"true":"false","is-multipoint":"true",children:p("div",{className:wD.result,children:p("div",{className:wD.timelineChart,children:Q&&p(BR,{reference:{name:Q.description,id:
1Q.id,collectionDate:Q.collectionDate},samples:B.map((e=>({name:e.sample.name,similarityIndex:e.similarityIndex})))})})})}),R("div",{className:wD.sampleOptionsContainer,"is-multipoint":"true",children:[!F&&p("div",{className:wD.left,children:p("div",{className:wD.helperTextContainer,children:R("div",{className:wD.helperText,children:[p($t,{variant:"big",children:"What does the Similarity Index mean?"}),p($t,{variant:"standard",className:wD.textBox,children:de}),p($t,{className:wD.blueText,onClick:()=>g(Tt.NMR_ABOUT),children:"Learn More on About NMR"})]})})}),R("div",{className:wD.right,"is-expanded":F?"true":"false",children:[p("div",{className:wD.helpButtonContainer,children:p(P,{variant:"contained",size:"small",className:I(wD.helpButton,{[wD.itemActive]:F}),startIcon:p(Sn,{spriteUrl:JE,className:wD.icon}),onClick:()=>H(!F),children:"Help"})}),F&&R("div",{className:wD.helpContact,children:[R("div",{className:wD.header,children:[p(Vt,{variant:"h4",children:"Help & Support"}),p(Sn,{spriteUrl:gp,className:wD.icon,onClick:()=>H(!F)})]}),R("div",{className:wD.helpOptions,children:[R("div",{className:wD.option,onClick:()=>ce("faq"),children:[p(Sn,{spriteUrl:JE,className:wD.icon,"help-type":"faq"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"View FAQ"}),p($t,{variant:"small",children:"Common questions and answers"})]})]}),R("div",{className:wD.option,onClick:()=>window.open("tel:+17079634806"),children:[p(Sn,{spriteUrl:lD,className:wD.icon,"help-type":"call"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Call Support"}),p($t,{variant:"small",children:"+1 (707) 963-4806"})]})]}),R("div",{className:wD.option,onClick:()=>ce("contact"),children:[p(Sn,{spriteUrl:cD,className:wD.icon,"help-type":"contact"}),R("div",{children:[p($t,{variant:"standardSemiBold",children:"Contact Us"}),p($t,{variant:"small",children:"Send us a message"})]})]})]})]})]})]})]})]}),"multipoint_comparison"!==v&&R("div",{className:wD.spectraContainer,children:[R("div",{className:wD.spectraHeader,children:[p(Vt,{variant:"h4",children:"Difference Spectrum"}),p(VD,{section:"difference"})]}),re&&p(rR,{data:null!=(l=M.reportData)?l:null,height:450,focusRegion:null,onRegionClick:e=>{pe(e)}})]}),"multipoint_comparison"!==v&&R("div",{className:wD.spectraContainer,children:[R("div",{className:wD.spectraHeader,children:[p(Vt,{variant:"h4",children:"NMR Spectra"}),p(VD,{section:"spectra"})]}),p(JT,{data:Q?Q.spectrumData:null,secondaryData:J?J.spectrumData:null,height:450,focusRegion:null,onRegionClick:e=>{pe(e)}})]}),"multipoint_comparison"===v&&R("div",{className:wD.multiSpectraContainer,children:[R("div",{className:wD.spectraHeader,children:[p(Vt,{variant:"h4",children:"NMR Multi-Point Comparison Chart"}),p(VD,{section:"spectra"})]}),p("div",{className:wD.chart,children:Q&&K&&B&&le&&p(_R,{data:{regions:null==(c=null==Q?void 0:Q.spectrumData)?void 0:c.regions,baseline:{name:Q.description,id:Q.id,collectionDate:Q.collectionDate,spectrumData:Q.spectrumData},comparisons:B},onSampleClick:e=>{if(!e.isBaseline){const t=B.findIndex((t=>t.sample.id===e.id));w(t),pe(e.regionKey?e.regionKey:JR[0])}}})})]}),R("div",{className:wD.regionsInfoContainer,children:[p(Vt,{variant:"h4",children:"NMR Insights"}),R("div",{className:wD.regionCards,children:[R("div",{className:wD.regionInfo,onClick:()=>pe(JR[4],4),children:[p(Vt,{variant:"h5",children:"Fermentation Fingerprint (0.8 - 2.0 ppm)"}),p($t,{variant:"standard",children:"The Foundation of the Vintage"}),p($t,{className:wD.description,children:p(mn,{html:"This spectral region serves as the primary archive of microbial activity, containing\n the metabolic signatures of both primary (yeast) and secondary (bacterial)\n fermentation. While the landscape is dominated by the massive <b>Ethanol</b> methyl\n signal (~1.2 ppm), closer inspection reveals the status of Malolactic Fermentation\n through the <b>Lactic Acid</b> doublet (~1.35 ppm). Additionally, this region houses key\n <b>Amino Acids</b> like Alanine (~1.5 ppm) and Proline (~2.0 ppm), which offer\n retrospective insight into yeast assimilation and nitrogen usage."})})]}),R("div",{className:wD.regionInfo,onClick:()=>pe(JR[3],3),children:[p(Vt,{variant:"h5",children:"Organic Acid Profile (2.0 - 3.0 ppm)"}),p($t,{variant:"standard",children:"The Acid Backbone & Microbial Stability"}),p($t,{className:wD.description,children:p(mn,{html:"This section captures the organic acids that form the wine's structural backbone\n and provide critical indicators of stability. It clearly resolves the sharp singlet of\n <b>Acetic Acid</b> (~2.1 ppm), allowing for the detection of Volatile Acidity (VA) often\n before sensory thresholds are breached. The region also allows for the assessment\n of the ratio between <b>Succinic Acid</b> (~2.6 ppm), a byproduct of fermentation, and\n <b>Malic Acid</b> (~2.8 ppm), the crisp apple acid found in the original grape, providing a\n clear picture of the wine's acid balance and biological stability."})})]}),R("div",{className:wD.regionInfo,onClick:()=>pe(JR[2],2),children:[p(Vt,{variant:"h5",children:"Sugars & Alcohols (3.0 - 5.5 ppm)"}),p($t,{variant:"standard",children:"Texture, Body, and Dryness"}),p($t,{className:wD.description,children:p(mn,{html:"The most complex regi
1on of the spectrum, this area represents the heart of the\n wineâs body, texture, and alcoholic strength. It contains the signals for <b>Methanol</b>\n (~3.4 ppm) and <b>Glycerol</b> (~3.5 - 3.8 ppm), the latter being a primary driver of\n mouthfeel and viscosity. Crucially, this region distinguishes between the residual\n sugars <b>Glucose and Fructose</b> (3.2 - 4.0 ppm) and tracks <b>Tartaric Acid</b> (~4.3 - 4.5\n ppm). Note that the large water signal is typically suppressed in this region (~4.8\n ppm), creating a 'quiet zone' in the center of the carbohydrate signals."})})]}),R("div",{className:wD.regionInfo,onClick:()=>pe(JR[1],1),children:[p(Vt,{variant:"h5",children:"Phenolics & Tannins (5.5 - 9.0 ppm)"}),p($t,{variant:"standard",children:"Varietal Character & Aging Potential"}),p($t,{className:wD.description,children:p(mn,{html:"This region defines the wine's identity, color potential, and bitterness. While the\n signals hereârepresenting the aromatic rings of <b>Phenolic compounds</b> and\n <b>Flavonoids</b>âare significantly lower in intensity than the aliphatic regions, they\n constitute a unique \"fingerprint\" of the grape variety, extraction technique, and\n terroir. The complexity and topology of signals in this area, particularly the aromatic\n protons of molecules like <b>Gallic Acid</b> (~7.1 ppm), correlate directly with the\n phenolic loading and the wine's suitability for long-term aging."})})]})]}),R("div",{className:wD.regionInfo,onClick:()=>pe(JR[0],0),children:[p(Vt,{variant:"h5",children:"Oxidation (approx. 9.5 ppm)"}),p($t,{variant:"standard",children:"Critical Quality Control Check"}),p($t,{className:wD.description,children:p(mn,{html:'Situated at the far-left edge of the spectrum is a dedicated quality control zone for\n oxidative status. In a healthy, protected wine, this baseline should be flat. The\n appearance of a signal here is the specific marker for the aldehyde proton of\n <b>Acetaldehyde</b> (~9.7 ppm). A visible peak in this region serves as an unambiguous,\n early warning of oxidation, indicating that oxygen exposure has exceeded the\n protective capacity of the free SO2, potentially leading to nutty or "bruised apple"\n sensory flaws.'})})]})]}),p(RD,{helpRef:_,contactTab:U,setContactTab:z}),"multipoint_comparison"!==v&&Q&&J&&p(kk,{open:G,setOpen:q,region:W,setRegion:V,baseline:Q,sample:J,comparisonData:M,focus:ae,setFocus:ne}),"multipoint_comparison"===v&&Q&&K&&B&&le&&p(QP,{open:G,setOpen:q,region:W,setFocus:ne,setRegion:V,focus:ae,comparisons:B,baseline:Q,sampleIndex:S,setSampleIndex:w}),p(vP,{open:N,setOpen:C,reportType:""})]})},XP=m.exports.lazy((()=>wt((()=>import("./Login.52524581.js")),["assets/Login.52524581.js","assets/Login.41d6193a.css","assets/AuthSection.9e54c4c4.js","assets/AuthSection.e0ec4481.css","assets/vendor.ef7fe251.js"]))),ZP=m.exports.lazy((()=>wt((()=>import("./AcceptInvitation.37283691.js")),["assets/AcceptInvitation.37283691.js","assets/vendor.ef7fe251.js"]))),JP=m.exports.lazy((()=>wt((()=>import("./TermsAndConditionsAndCreditAgreement.8c5684af.js")),["assets/TermsAndConditionsAndCreditAgreement.8c5684af.js","assets/vendor.ef7fe251.js","assets/Terms.144a232a.js","assets/Terms.03fe8e9c.css"]))),eL=m.exports.lazy((()=>wt((()=>import("./TermsAndConditions.1f4e280f.js")),["assets/TermsAndConditions.1f4e280f.js","assets/vendor.ef7fe251.js","assets/Terms.144a232a.js","assets/Terms.03fe8e9c.css"]))),tL=m.exports.lazy((()=>wt((()=>import("./PrivacyPolicy.38bed732.js")),["assets/PrivacyPolicy.38bed732.js","assets/vendor.ef7fe251.js","assets/Terms.144a232a.js","assets/Terms.03fe8e9c.css"]))),aL=m.exports.lazy((()=>wt((()=>import("./TechnicalTools.45949118.js")),["assets/TechnicalTools.45949118.js","assets/vendor.ef7fe251.js","assets/Terms.144a232a.js","assets/Terms.03fe8e9c.css"]))),nL=m.exports.lazy((()=>wt((()=>import("./ForgotPassword.a688555e.js")),["assets/ForgotPassword.a688555e.js","assets/ForgotPassword.024c7a47.css","assets/vendor.ef7fe251.js","assets/AuthSection.9e54c4c4.js","assets/AuthSection.e0ec4481.css"]))),iL=m.exports.lazy((()=>wt((()=>import("./ResetPassword.faa32518.js")),["assets/ResetPassword.faa32518.js","assets/ResetPassword.2565ab7b.css","assets/vendor.ef7fe251.js","assets/passwordValidator.91930b76.js","assets/AuthSection.9e54c4c4.js","assets/AuthSection.e0ec4481.css"]))),rL=m.exports.lazy((()=>wt((()=>import("./Registration.0167e93a.js")),["assets/Registration.0167e93a.js","assets/Registration.7db05f97.css","assets/vendor.ef7fe251.js","assets/passwordValidator.91930b76.js","assets/AuthSection.9e54c4c4.js","assets/AuthSection.e0ec4481.css"]))),sL=m.exports.lazy((()=>wt((()=>import("./VerifyAccount.0ea9f38d.js")),["assets/VerifyAccount.0ea9f38d.js","assets/VerifyAccount.31632245.css","assets/vendor.ef7fe251.js","assets/AuthSection.9e54c4c4.js","assets/AuthSection.e0ec4481.css"]))),oL=m.exports.lazy((()=>wt((()=>import("./ProfilePersonalInformationForm.d241c4f6.js")),["assets/ProfilePersonalInformationForm.d241c4f6.js","assets/ProfilePersonalInformationForm.d816ec7d.css","assets/vendor.ef7fe251.js","assets/passwordValidator.91930b76.js"]))),lL=()=>{const e=y();lm(e.pathname);const t=()=>(window.location.replace("https://admin.etslabs.com"),null),a=()=>(window.location.replace("https://secure2.saashr.com/ta/i.ets.clock"),null),n=()=>(window.location.replace(Tt.HOME),null);return R(ot,{children:[R(lt,{element:p(GA,{}),children:[p(lt,{path:Tt.HOME,element:p(Ol,{})}),p(lt,{path:Tt.HOME_OLD_WEBSITE_PATCH,element:p(Ye,{to:Tt.HOME})}),p(lt,{path:Tt.ABOUT_US,element:p(fn,{})}),p(lt,{path:Tt.ACCEPT_INVITATION,element:p(ZP,{})}),p(lt,{path:Tt.REPORT_VERIFICATION,element:p(ym,{})}),p(lt,{path:Tt.NEW_CUSTOMER,element:p(Vc,{})}
1),p(lt,{path:Tt.TERMS_AND_CONDITIONS_AND_CREDIT_AGREEMENT,element:p(JP,{})}),p(lt,{path:Tt.PRIVACY,element:p(tL,{})}),p(lt,{path:Tt.SUSTAINABILITY,element:p(vm,{})}),p(lt,{path:Tt.TECHNICAL_TOOLS,element:p(aL,{})}),p(lt,{path:Tt.ACCREDITATION,element:p(sI,{})}),p(lt,{path:Tt.TERRAMEA,element:p(BT,{})}),p(lt,{path:Tt.TERMS_AND_CONDITIONS,element:p(eL,{})}),p(lt,{path:Tt.GLOBAL_SEARCH,element:p(Io,{})}),R(lt,{element:p(Ta,{}),children:[p(lt,{path:Tt.PEOPLE,element:p(n,{})}),p(lt,{path:Tt.QUALITY,element:p(Cn,{})}),p(lt,{path:Tt.APPLIED_INNOVATION,element:p(_n,{})}),p(lt,{path:Tt.ETS_DIFFERENCE,element:p(Nn,{})}),p(lt,{path:Tt.SEMINARS,element:p(Hn,{})}),p(lt,{path:Tt.OUR_STORY,element:p(fn,{})})]}),R(lt,{element:p(jc,{}),children:[p(lt,{path:Tt.EXPERTISE_ON_CALL,element:p($c,{})}),p(lt,{path:Tt.VINTAGE_PORTALCMS,element:p(Kc,{})}),p(lt,{path:Tt.SERVICES,element:p(Qc,{})}),p(lt,{path:Tt.VINTAGE_REPORTS,element:p(rI,{})})]}),p(lt,{path:Tt.PUBLICATIONS,element:p(Hd,{})}),p(lt,{path:Tt.PUBLICATIONS_OLD_WEBSITE_PATCH,element:p(Hd,{})}),p(lt,{path:Tt.PUBLICATION,element:p(mm,{})}),p(lt,{path:Tt.PUBLICATION_OLD_WEBSITE_PATCH,element:p(qA,{to:Tt.PUBLICATION})}),p(lt,{path:Tt.LOCATIONS,element:p(Dc,{})}),R(lt,{element:p(zn,{}),children:[p(lt,{path:Tt.EXPORTING_ANALYSES_GOOGLE_CACHED_LINK,element:p(Ye,{to:Tt.EXPORTING_ANALYSES,replace:!0})}),p(lt,{path:Tt.ANALYSES,element:p(Ye,{to:Tt.ALL_ANALYSES,replace:!0})}),p(lt,{path:Tt.ALL_ANALYSES_OLD_WEBSITE_PATCH,element:p(Ye,{to:Tt.ALL_ANALYSES,replace:!0})}),p(lt,{path:Tt.ALL_ANALYSES,element:p(cs,{})}),p(lt,{path:Tt.ANALYSES_DETAILS,element:p(vr,{})}),p(lt,{path:Tt.EXPORTING_ANALYSES,element:p(Ds,{})}),p(lt,{path:Tt.EXPORTING_ANALYSES_OLD_WEBSITE_PATCH,element:p(Ds,{})})]}),p(lt,{path:Tt.CONTACT,element:p(po,{})}),p(lt,{path:Tt.ANALYSES_DETAILS_OLD_WEBSITE_PATCH,element:p(qA,{to:Tt.ANALYSES_DETAILS})}),p(lt,{path:Tt.VERIFY_ACCOUNT,element:p(sL,{})}),p(lt,{path:Tt.POSITIVE_PAY,element:p(ka,{})}),p(lt,{path:Tt.PESTICIDE_PANEL,element:p(GT,{})})]}),R(lt,{element:p(MA,{}),children:[p(lt,{path:Tt.LOGIN,element:p(XP,{})}),p(lt,{path:Tt.REQUEST_PASSWORD_RESET,element:p(nL,{})}),p(lt,{path:Tt.RESET_PASSWORD,element:p(iL,{})}),p(lt,{path:Tt.REGISTRATION,element:p(rL,{})})]}),R(lt,{element:p(LA,{}),children:[R(lt,{element:p(lS,{}),children:[p(lt,{path:Tt.LAUNCHPAD,element:p(Ye,{to:Tt.CLIENTS,replace:!0})}),p(lt,{path:Tt.CLIENTS,element:p(PS,{})}),p(lt,{path:Tt.NEW_CLIENT,element:p(ex,{})}),p(lt,{path:Tt.MY_PROFILE,element:p(oL,{})})]}),R(lt,{element:p(mh,{}),children:[p(lt,{path:Tt.DASHBOARD,element:p(Ye,{to:Tt.RESULTS,replace:!0})}),p(lt,{path:Tt.RESULTS,element:p(z_,{})}),p(lt,{path:Tt.SAMPLE_DETAILS,element:p(TN,{})}),p(lt,{path:Tt.ANALYSIS_DETAILS,element:p(vN,{})}),p(lt,{path:Tt.VINTAGE_PORTAL,element:p(NC,{})}),p(lt,{path:Tt.SMOKE_IMPACT_REPORTS,element:p(eS,{})}),p(lt,{path:Tt.BILLING,element:p(Sv,{})}),p(lt,{path:Tt.RECEIPT,element:p(Hg,{})}),p(lt,{path:Tt.PAYMENT_METHODS,element:p(Tg,{})}),p(lt,{path:Tt.TEAM_SETTINGS,element:p(iC,{})}),p(lt,{path:Tt.CLIENT_SETTINGS,element:p(vy,{})}),R(lt,{path:Tt.SHOP,children:[p(lt,{path:Tt.REQUEST_COURIER,element:p(fb,{})}),p(lt,{path:Tt.ORDER_SUPPLIES,element:p(If,{})})]})]}),R(lt,{element:p(ju,{}),children:[p(lt,{path:Tt.NMR_HOME,element:p(Ek,{})}),p(lt,{path:Tt.NMR_COMPARE,element:p(_M,{})}),p(lt,{path:Tt.NMR_SAMPLES,element:p(Ek,{})}),p(lt,{path:Tt.NMR_GENERATED_REPORT,element:p(KP,{})}),p(lt,{path:Tt.NMR_REPORTS,element:p(PM,{})}),p(lt,{path:Tt.NMR_ABOUT,element:p(rD,{})}),p(lt,{path:Tt.NMR_HELP,element:p(mD,{})}),p(lt,{path:Tt.NMR_FAQ,element:p(uD,{})}),p(lt,{path:Tt.NMR_CONTACT,element:p(ID,{})})]})]}),p(lt,{path:"/admin",element:p(t,{})}),p(lt,{path:"/timeclock",element:p(a,{})}),p(lt,{path:Tt.NOT_FOUND,element:p(PA,{})})]})},cL=Ht(Ot.appLang)||Pt;ct.use(dt).use(mt).init({lng:cL,fallbackLng:Pt,supportedLngs:Gt,interpolation:{escapeValue:!1},react:{useSuspense:!1}});var dL=pt({breakpoints:{values:{sm:0,md:768,lg:1320}}}).breakpoints;var mL=pt({components:{MuiButton:{styleOverrides:{root:{maxHeight:"48px","&.MuiButton-sizeSmall":{".MuiButton-startIcon":{marginRight:8},".MuiButton-endIcon":{marginLeft:8}},"&.MuiButton-sizeMedium":{".MuiButton-startIcon":{marginRight:16},".MuiButton-endIcon":{marginLeft:16}}},startIcon:{marginLeft:0},endIcon:{marginRight:0}},variants:[{props:{variant:"contained"},style:{boxShadow:"none",borderRadius:"4px",":disabled":{fill:rC("--btn-primary-disabled-text"),color:rC("--btn-primary-disabled-text"),backgroundColor:rC("--btn-primary-disabled")}}},{props:{variant:"contained",color:"primary"},style:{color:rC("--btn-primary-text"),fill:rC("--white"),backgroundColor:rC("--btn-primary-bg"),":hover":{boxShadow:rC("--btn-shadow-hover"),backgroundColor:rC("--btn-primary-hover")}}},{props:{variant:"contained",color:"secondary"},style:{backgroundColor:rC("--btn-secondary-bg"),color:rC("--btn-secondary-main-text"),fill:rC("--btn-secondary-main-text"),border:rC("--btn-tertiary-border"),":hover":{color:rC("--btn-secondary-hover-text"),fill:rC("--btn-secondary-hover-text"),backgroundColor:rC("--btn-secondary-hover"),boxShadow:rC("--btn-shadow-hover")}}},{props:{variant:"contained",color:"tertiary"},style:{backgroundColor:rC("--btn-tertiary-bg"),border:rC("--btn-tertiary-border"),color:rC("--btn-tertiary-main-text"),fill:rC("--btn-tertiary-main-text"),":hover":{color:rC("--btn-tertiary-hover-text"),fill:rC("--btn-tertiary-hover-text"),backgroundColor:rC("--btn-tertiary-hover"),boxShadow:rC("--btn-shadow-hover")}}},{props:{variant:"outlined"},style:{color:rC("--primary-dark"),border:`1px solid ${rC("--primary-dark")}`,backgroundColor:"transparent",":hover":{border:`1px solid ${rC("--primary")}`,color:rC("--primary"),backgroundColor:"transparent",boxShadow:rC("--btn-shadow-hover")},":disabled":{color:rC("--btn-outlined-disabled-text"),border:`1px solid ${rC("--btn-outlined-disabled-text")}`,backgroundColor:"transparent"}}},{props:{variant:"text"},style:{color:rC("--btn-text-main-text"),fill:rC("--btn-text-main-text"),backgroundColor:"transparent",boxShadow:"none",":hover":{color:rC("--btn-text-hover-text"),fill:rC("--btn-text-hover-text"),backgroundColor:"transparent"},":disabled":{color:rC("--btn-text-disabled-text"),fill:rC("--btn-text-disabled-text")}}},{props:{size:"medium"},style:{padding:"16px 40px"}},{props:{size:"small"},style:{padding:"8px 16px"}}]},MuiDivider:{variants:[{props:{variant:"fullWidth"},style:{backgroundColor:rC("--white")}}]},MuiAppBar:{styleOverrides:{root:{boxShadow:"none"}}},MuiAlert:{variants:[{props:{severity:"success"},style:{color:rC("--white"),backgroundColor:rC("--toast-background-color"),borderRadius:"4px"}},{props:{severity:"warning"},style:{color:rC("--information-light"),backgroundColor:rC("--toast-background-color"),borderRadius:"4px"}},{props:{severity:"info"},style:{color:rC("--information-blue"),backgroundColor:rC("--toast-background-color"),borderRadius:"4px"}},{props:{severity:"error"},style:{color:rC("--error-dark"),backgroundColor:rC("--toast-background-color"),borderRadius:"4px"}}],styleOverrides:{root:{width:"100%"},icon:{marginRight:"16px",padding:0,opacity:1},message:{margin:"0",padding:0,width:"100%"},action:{margin:"0 8px 0 0"}}},MuiSnackbar:{styleOverrides:{root:{[dL.up("sm")]:{top:"24px",width:`calc(100% - ${rC("--mobile-outer-padding")}*2)`},[dL.up("md")]:{top:"32px",width:`calc(100% - ${rC("--tablet-outer-padding")}*2)`},[dL.up("lg")]:{width:"auto",top:"15%"}}}},MuiInput:{styleOverrides:{root:{"& input":{fontSize:"14px",lineHeight:"18px",fontWieght:500,paddingTop:"8px",paddingBottom:"8px","&::-webkit-input-placeholder":{opacity:1}},"&:before":{borderBottom:`1px solid ${rC("--gray-light-300")}`},"&:hover:not(.Mui-disabled):before":{borderBottom:`1px solid ${rC("--gray-dark-100")}`},"&:after":{borderBottom:`1px solid ${rC("--secondary-dark")}`},"&.Mui-error:after":{borderBottom:`1px solid ${rC("--gray-dark-400")}`}}}},MuiSelect:{styleOverrides:{standard:{fontSize:"14px",lineHeight:"18px",fontWieght:500,padding:"8px 0"}}},MuiFormLabel:{styleOverrides:{root:{backgroundColor:"black",color:"red"}}},MuiBadge:{styleOverrides:{badge:{backgroundColor:rC("--primary")}}},MuiTabs:{styleOverrides:{root:{".MuiTabScrollButton-root":{opacity:1,"&:first-of-type":{transform:"translateX(0)",transition:"all 200ms","&.Mu
1i-disabled":{transform:"translateX(-100%)",width:0,".MuiSvgIcon-root":{width:0}}},"&:last-of-type":{transform:"translateX(0)",transition:"all 200ms","&.Mui-disabled":{transform:"translateX(100%)",width:0,".MuiSvgIcon-root":{width:0}}}}}}}}}).components;var pL=pt({palette:{text:{primary:rC("--primary-text")},primary:{main:rC("--primary"),dark:rC("--primary-dark"),light:rC("--primary-light"),contrastText:"#000000"},secondary:{main:rC("--secondary"),dark:rC("--secondary-dark"),light:rC("--secondary-light")},tertiary:{main:rC("--tertiary")},info:{main:rC("--information-light"),dark:rC("--information-dark"),contrastText:"#000000"},success:{main:rC("--success-light"),dark:rC("--success-dark"),contrastText:"#000000"},error:{main:rC("--error-light"),dark:rC("--error-dark"),contrastText:"#000000"},warning:{main:rC("--warning-light"),dark:rC("--warning-dark"),contrastText:"#000000"},gray:{100:rC("--gray-light-100"),200:rC("--gray-light-200"),300:rC("--gray-light-300"),400:rC("--gray-light-400"),500:rC("--gray-light-500"),600:rC("--gray-light-600"),700:rC("--gray-light-700"),main:rC("--gray"),D100:rC("--gray-dark-100"),D200:rC("--gray-dark-200"),D300:rC("--gray-dark-300"),D400:rC("--gray-dark-400"),D500:rC("--gray-dark-500")}}}).palette;var uL=pt({typography:{fontFamily:rC("--font-primary"),h1:{fontFamily:rC("--font-secondary"),fontSize:"44px",lineHeight:"54px",fontWeight:500,[dL.up("md")]:{fontSize:"50px",lineHeight:"62px"},[dL.up("lg")]:{fontSize:"72px",lineHeight:"90px"}},h2:{fontFamily:rC("--font-secondary"),fontSize:"32px",lineHeight:"40px",fontWeight:500,[dL.up("md")]:{fontSize:"38px",lineHeight:"48px"},[dL.up("lg")]:{fontSize:"48px",lineHeight:"60px"}},h3:{fontSize:"24px",lineHeight:"30px",fontWeight:700,[dL.up("md")]:{fontSize:"28px",lineHeight:"34px"},[dL.up("lg")]:{fontSize:"36px",lineHeight:"48px"}},h4:{fontSize:"18px",lineHeight:"22px",fontWeight:700,[dL.up("md")]:{fontSize:"22px",lineHeight:"28px"},[dL.up("lg")]:{fontSize:"24px",lineHeight:"30px"}},h5:{fontSize:"16px",lineHeight:"20px",fontWeight:700,[dL.up("md")]:{fontSize:"16px",lineHeight:"20px"},[dL.up("lg")]:{fontSize:"18px",lineHeight:"24px"}},h6:{fontSize:"14px",lineHeight:"18px",fontWeight:700,[dL.up("md")]:{fontSize:"14px",lineHeight:"18px"},[dL.up("lg")]:{fontSize:"14px",lineHeight:"20px"}},introSerif:{fontFamily:rC("--font-secondary"),fontSize:"24px",lineHeight:"36px",fontWeight:500,[dL.up("md")]:{fontSize:"24px",lineHeight:"48px"}},intro:{fontSize:"24px",lineHeight:"36px",fontWeight:500,[dL.up("md")]:{fontSize:"24px",lineHeight:"48px"}},bigSerif:{fontFamily:rC("--font-secondary"),fontSize:"18px",lineHeight:"26px",fontWeight:500,[dL.up("md")]:{fontSize:"18px",lineHeight:"28px"}},big:{fontSize:"18px",lineHeight:"26px",fontWeight:500,[dL.up("md")]:{fontSize:"18px",lineHeight:"28px"}},bigSemiBold:{fontSize:"18px",lineHeight:"26px",fontWeight:600,[dL.up("md")]:{fontSize:"18px",lineHeight:"28px"}},p:{fontSize:"14px",lineHeight:"20px",fontWeight:500,[dL.up("md")]:{fontSize:"14px",lineHeight:"24px"}},standard:{fontSize:"16px",lineHeight:"22px",fontWeight:500,[dL.up("md")]:{fontSize:"16px",lineHeight:"26px"}},standardSemiBold:{fontSize:"16px",lineHeight:"22px",fontWeight:600,[dL.up("md")]:{fontSize:"16px",lineHeight:"26px"}},mediumSemiBoldHeavy:{fontSize:"15px",lineHeight:"16px",fontWeight:900,[dL.up("md")]:{fontSize:"15px",lineHeight:"16px"}},mediumSemiBold:{fontSize:"14px",lineHeight:"16px",fontWeight:600,[dL.up("md")]:{fontSize:"14px",lineHeight:"16px"}},standardMedium:{fontSize:"14px",lineHeight:"26px",fontWeight:100,[dL.up("md")]:{fontSize:"14px",lineHeight:"26px"}},smallSemiBold:{fontSize:"12px",lineHeight:"18px",fontWeight:600,[dL.up("md")]:{fontSize:"12px",lineHeight:"18px"}},small:{fontWeight:500,fontSize:"12px",lineHeight:"18px"},extraSmall:{fontWeight:500,fontSize:"10px",lineHeight:"12px"},button:{fontSize:"14px",lineHeight:"20px",fontWeight:600,textTransform:"capitalize",[dL.up("md")]:{fontSize:"16px",lineHeight:"24px"}},link:{fontSize:"14px",lineHeight:"20px",fontWeight:500,letterSpacing:"1px",textDecoration:"underline",[dL.up("md")]:{fontSize:"16px",lineHeight:"26px"}},linkSmall:{fontSize:"12px",lineHeight:"18px",fontWeight:500,textDecoration:"underline"},label:{fontSize:"12px",lineHeight:"16px",fontWeight:600,textTransform:"uppercase"},badge:{fontFamily:rC("--font-tertiary"),fontSize:"10px",lineHeight:"12px",fontWeight:400,textTransform:"capitalize"},toastTitle:{fontSize:"14px",lineHeight:"20px",fontWeight:600,[dL.up("md")]:{fontSize:"16px",lineHeight:"24px"}}}}).typography;let hL=pt();hL=l(o({},hL),{breakpoints:dL,typography:uL,palette:pL,components:mL});const vL=new gt({defaultOptions:{queries:{retry:!1}}});var gL,yL;(yL=gL||(gL={})).Dark="dark",yL.Light="light";var bL=gL;const _L=m.exports.createContext({theme:bL.Light,setTheme:()=>{console.log("Missing theme provider")}});var NL="Toast_alert_1",fL="Toast_icon_21",CL="Toast_closeIconColor_26",SL="Toast_alertContainer_34",xL="Toast_alertText_44",AL="Toast_alertButton_49",IL="Toast_errorAlertButton_62";const wL=({alertMessage:e,isOpen:t,handleClose:a,anchorOrigin:n,severity:i,variant:r,autoHideDuration:s,handleToastAction:o,toastButtonText:l})=>p(_t,{anchorOrigin:null!=n?n:{vertical:"top",horizontal:"right"},open:t,autoHideDuration:s,onClose:a,children:p(Nt,{className:NL,variant:null!=r?r:"filled",severity:i,icon:!1,action:p(F,{className:fL,size:"small","aria-label":"close",color:"inherit",onClick:a,children:p(Sn,{spriteUrl:jr,className:I(fL,CL)})}),children:R("div",{className:SL,children:[p($t,{className:xL,children:e}),o&&p(P,{className:I(AL,{[IL]:"error"===i}),variant:"text",onClick:o,children:l})]})})}),TL=((...e)=>e.reduce(((e,t)=>({children:a})=>p(e,{children:p(t,{children:a})})),(({children:e})=>p(k,{children:e}))))(...[Ct,({children:e})=>{const[t,a]=m.exports.useState(zt||Pt),{t:n,i18n:i}=ft();return m.exports.useEffect((()=>{a(t),i.changeLanguage(t),Ut(Ot.appLang,t)}),[t]),p(qt.Provider,{value:{language:t,setLanguage:a,t:(e,...t)=>n(e,...t)},children:e})},({children:e})=>R(yt,{client:vL,children:[e,p(bt.exports.ReactQueryDevtools,{initialIsOpen:!1})]}),({children:e})=>{const[t,a]=m.exports.useState(bL.Light);return m.exports.useEffect((()=>{document.body.setAttribute("data-theme",t)}),[t]),p(_L.Provider,{value:{theme:t,setTheme:a},children:e})},({children:e})=>
1p(ut,{injectFirst:!0,children:R(ht,{theme:hL,children:[p(vt,{}),e]})}),({children:e})=>{const[t,a]=m.exports.useState(!1),[n,i]=m.exports.useState(""),[r,s]=m.exports.useState();return R(Na.Provider,{value:{open:(e,t)=>{i(e),s(t),a(!0)}},children:[p(wL,o({isOpen:t,alertMessage:n,autoHideDuration:5e3,handleClose:()=>a(!1)},r)),e]})},({children:e})=>{var t,a,n;const[i,r]=m.exports.useState({isLoggedIn:null!=(t=Ht(Ot.isLoggedIn))&&t,user:null!=(a=Ht(Ot.user))?a:ba}),[s,o]=m.exports.useState(null!=(n=Ht(Ot.activeClient))?n:ya),l=C();return m.exports.useEffect((()=>{const{user:e,isLoggedIn:t}=i;Ut(Ot.user,e),Ut(Ot.isLoggedIn,t),Ut(Ot.activeClient,s);const a=Object.keys(window.localStorage),n=new RegExp(["_samplesQueryOptions","_analysisQueryOptions","_sharedQueryOptions","_selectedInvoices"].join("|"));for(let i of a)n.test(i)&&window.localStorage.removeItem(i);l.invalidateQueries({queryKey:["getAllTeamMembers"]}),l.invalidateQueries({queryKey:["getReportBatches"]}),document.cookie="disclaimerAcknowledgedSmokeImpact=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;",document.cookie="preLimResultsAgreement=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;"}),[i,s]),p(_a.Provider,{value:{authenticatedUser:i,setAuthenticatedUser:r,activeClient:s,setActiveClient:o},children:e})},({children:e})=>{const t=Wt(),[{isOpen:a,action:n,title:i,description:r,confirmButtonText:s,cancelButtonText:c},d]=m.exports.useState({isOpen:!1,action:()=>null,title:"",description:"",confirmButtonText:"",cancelButtonText:""});return R(yo.Provider,{value:{openDialog:(e,t,a,n,i)=>{d({isOpen:!0,action:e,title:t,description:a,confirmButtonText:n,cancelButtonText:i})},closeDialog:()=>{d((e=>l(o({},e),{isOpen:!1})))}},children:[e,p(OA,{open:a,handleClose:()=>{d((e=>l(o({},e),{isOpen:!1})))},handleConfirm:n,title:t(i),description:t(r),confirmButtonText:t(s),cancelButtonText:t(c)})]})},({children:e})=>{const{data:t,isFetched:a}=(()=>{const e=Wt(),t=m.exports.useContext(Na);return L(["getNotifications"],(()=>cn.getNotifications()),{keepPreviousData:!0,staleTime:18e4,cacheTime:3e5,onSuccess:e=>{console.log("Get notifications",e)},onError:a=>{console.error("Get notifications error",a),t.open(fa(a,e("get-notifications-error")),{severity:"error"})}})})(),[n,i]=m.exports.useState({lat:"",long:""}),{data:r,refetch:s,isFetched:o}=kc({lat:n.lat,long:n.long},""!==n.lat&&""!==n.long);return m.exports.useEffect((()=>{navigator.geolocation.getCurrentPosition((e=>{i({lat:e.coords.latitude.toString(),long:e.coords.longitude.toString()})}),(e=>e))}),[]),m.exports.useEffect((()=>{n.lat&&n.long&&s()}),[n.lat,n.long]),p(nx.Provider,{value:{notifications:a&&(null==t?void 0:t.notifications)?t:ax,location:{lat:n.lat,long:n.long},locationData:o&&r?r:[]},children:e})},({children:e})=>{const[t,a]=m.exports.useState(0);return p(Xu.Provider,{value:{isScrolledToBottom:t,setIsScrolledToBottom:()=>a(t+1)},children:e})}]); 2//! index.scss must be imported before CoreProvider because of CSS Variables 3St(),console.log=()=>null,xt.render(p(m.exports.StrictMode,{children:p(TL,{children:p(At,{appId:"j1hs1a4l",autoBoot:!0,children:p(lL,{})})})}),document.getElementById("root"));export{_a as A,di as F,Vt as H,Jo as L,$t as P,Tt as R,pn as S,Na as T,da as a,mn as b,cn as c,_i as d,fa as e,Uu as f,bi as g,Ko as h,Ca as i,jt as j,Sa as k,wm as l,$g as m,Ni as r,Wt as u};
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.