PageSourceSearch

https://basepaws.com/_next/static/chunks/8784.4a96f99007fc4bbd.js

js basepaws.com collected 2026-10-02 03:38:34 UTC 9,221 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="ef5b44a9-ad3a-4fbc-9289-463af750743c",e._sentryDebugIdIdentifier="sentry-dbid-ef5b44a9-ad3a-4fbc-9289-463af750743c")}catch(e){}}();var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};"use strict";e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:basepaws-3rd-party-filter-key":!0}),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8784],{88784:function(e,l,t){t.r(l),t.d(l,{CtfBlockSampleReportForm:function(){return CtfBlockSampleReportForm}});var i=t(85893),a=t(67294),r=t(25675),s=t.n(r),n=t(62423);let o=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/,d="Something went wrong. Please try again.",requestSampleReport=async e=>{let{email:l,species:t,listId:i}=e;try{let e=await fetch("/api/sample-report-request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,species:t,listId:i})}),a=await e.json().catch(()=>null);if(!e.ok||!(null==a?void 0:a.success))return(null==a?void 0:a.message)||d;return a.delivered||console.warn("[sample-report] Klaviyo delivery is off (".concat(a.reason,") — no email was sent.")),null}catch(e){return d}},SampleReportForm=e=>{let{species:l,placeholder:t,buttonText:r,onSubmit:s}=e,[d,c]=(0,a.useState)(""),[p,m]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),v=o.test(d),f=l?"".concat(l.toLowerCase()," "):"",handleChange=e=>{c(e),p&&m("")},handleSubmit=async e=>{if(e.preventDefault(),!v){m("Please provide a valid email.");return}h(!0);try{let e=await s(d);e&&m(e)}finally{h(!1)}};return(0,i.jsx)("form",{className:"sample-report__form ".concat(u?"is-submitting":""," ").concat(v?"is-validated":""," ").concat(p?"is-error":""),name:l?"sample-report-".concat(l.toLowerCase()):"sample-report",onSubmit:handleSubmit,noValidate:!0,children:(0,i.jsxs)("div",{className:"sample-report__field-wrap",children:[(0,i.jsxs)("div",{className:"sample-report__field",children:[(0,i.jsx)("input",{className:"sample-report__input input",type:"email",name:"email",autoComplete:"email","aria-label":"Email for the ".concat(f,"sample report"),placeholder:t,value:d,disabled:u,onChange:e=>handleChange(e.target.value)}),(0,i.jsx)(n.Z,{id:"check",width:20,height:20,className:"icon icon-check sample-report__check is-stroked"})]}),(0,i.jsx)("button",{className:"sample-report__btn btn btn--primary",type:"submit",disabled:u,children:u?"...":r}),!!p&&(0,i.jsxs)("div",{className:"sample-report__error",children:[(0,i.jsx)(n.Z,{id:"circle-information",width:20,height:20,className:"icon icon-circle-information sample-report__error-icon"}),(0,i.jsx)("span",{children:p})]})]})})},toSpecies=e=>"Cat"===e||"Dog"===e?e:null,CtfBlockSampleReportForm=e=>{var l,t,r,o,d,c,p,m,u,h,v,f;let{entry:_}=e,C=_&&"fields"in _?_.fields:_,[b,g]=(0,a.useState)(null),[w,y]=(0,a.useState)(!1),[x,j]=(0,a.useState)(""),[N,S]=(0,a.useState)(!1);if(!C)return null;let L=toSpecies(C.petContext),send=async(e,l)=>{let t="Dog"===l?C.dogKlaviyoListId:C.catKlaviyoListId,i=await requestSampleReport({email:e,species:l,listId:t});return i||S(!0),i},handleEmailSubmit=async e=>L?send(e,L):(g(e),null),handleChoice=async e=>{if(!b)return;y(!0),j("");let l=await send(b,e);y(!1),l&&j(l)},k=C.image,M=C.image,D=null==k?void 0:null===(l=k.fields)||void 0===l?void 0:l.file,R=null!==(m=null==D?void 0:D.url)&&void 0!==m?m:null==M?void 0:M.url,Z=R?R.startsWith("http")?R:"https:".concat(R):null;return(0,i.jsx)("section",{className:"sample-report-section section",children:(0,i.jsx)("div",{className:"container-fluid",children:(0,i.jsxs)("div",{className:"sample-report-section__main sample-report ".concat(N?"is-sent":""),children:[!!Z&&(0,i.jsx)("div",{className:"sample-report__preview",children:(0,i.jsx)(s(),{className:"sample-report__img",src:Z,width:null!==(h=null!==(u=null==D?void 0:null===(r=D.details)||void 0===r?void 0:null===(t=r.image)||void 0===t?void 0:t.width)&&void 0!==u?u:null==M?void 0:M.width)&&void 0!==h?h:768,height:null!==(f=null!==(v=null==D?void 0:null===(d=D.details)||void 0===d?void 0:null===(o=d.image)||void 0===o?void 0:o.height)&&void 0!==v?v:null==M?void 0:M.height)&&void 0!==f?f:480,sizes:"(min-width: 768px) 45vw, 100vw",alt:(null==k?void 0:null===(c=k.fields)||void 0===c?void 0:c.description)||(null==k?void 0:null===(p=k.fields)||void 0===p?void 0:p.title)||(null==M?void 0:M.description)||C.internalName,loading:"lazy"})}),(0,i.jsx)("div",{className:"sample-report__content",children:N?(0,i.jsxs)("div",{className:"sample-report__success",children:[(0,i.jsxs)("svg",{className:"icon icon-circle-check sample-report__success-icon",width:"48",height:"48",viewBox:"0 0 35 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M16.3604 34.3282C25.396 34.3282 32.7208 27.0034 32.7208 17.9678C32.7208 8.93222 25.39
16 1.60742 16.3604 1.60742C7.3248 1.60742 0 8.93222 0 17.9678C0 27.0034 7.3248 34.3282 16.3604 34.3282Z",fill:"#CEEAC5"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M34.3912 18.6232C34.5832 18.6348 34.7295 18.7999 34.7178 18.9919C34.358 24.938 31.0723 30.5828 25.4892 33.7034L25.489 33.7035C22.8096 35.1995 19.9114 35.9431 17.0368 35.9999C16.8445 36.0037 16.6855 35.8509 16.6817 35.6586C16.6779 35.4662 16.8307 35.3073 17.023 35.3035C19.7861 35.2488 22.572 34.5343 25.1493 33.0954C30.5165 30.0954 33.6764 24.6692 34.0225 18.9498C34.0341 18.7578 34.1992 18.6116 34.3912 18.6232Z",fill:"#30414C"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M32.7848 10.524C32.961 10.4468 33.1664 10.5271 33.2436 10.7033C33.7124 11.7735 34.0677 12.8676 34.314 13.9714C34.3559 14.1592 34.2377 14.3453 34.0499 14.3872C33.8622 14.4291 33.676 14.3109 33.6341 14.1231C33.3975 13.0629 33.0562 12.0116 32.6055 10.9828C32.5283 10.8066 32.6086 10.6012 32.7848 10.524Z",fill:"#30414C"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.81118 17.6182C2.00354 17.6182 2.15947 17.7741 2.15947 17.9665C2.15947 25.8081 8.51433 32.1674 16.3605 32.1674C16.5528 32.1674 16.7087 32.3234 16.7087 32.5157C16.7087 32.7081 16.5528 32.864 16.3605 32.864C8.12947 32.864 1.46289 26.1927 1.46289 17.9665C1.46289 17.7741 1.61883 17.6182 1.81118 17.6182Z",fill:"#30414C"}),(0,i.jsx)("path",{d:"M16.0357 26.0161H16.0218C15.3159 26.0161 14.6518 25.6911 14.2153 25.1384L6.49716 15.4188C5.69841 14.4157 5.86559 12.9529 6.86867 12.1542C7.87175 11.3554 9.33457 11.5226 10.1333 12.5257L16.0543 19.9791L29.828 3.00571C30.6361 2.01191 32.0989 1.85867 33.0927 2.6667C34.0865 3.47474 34.2397 4.93756 33.4317 5.93135L17.8375 25.157C17.3963 25.7004 16.7323 26.0161 16.0357 26.0161Z",fill:"white"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M30.0466 0.0778318C30.1959 0.199023 30.2188 0.418362 30.0976 0.567739L19.974 13.0458L19.9739 13.0458L16.3239 17.5457C16.2027 17.6951 15.9834 17.718 15.834 17.5968C15.6846 17.4756 15.6617 17.2563 15.7829 17.1069L19.433 12.607L19.433 12.607L29.5567 0.128866C29.6779 -0.0205108 29.8972 -0.0433595 30.0466 0.0778318Z",fill:"#30414C"}),(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.91678 9.59955C10.0674 9.47988 10.2865 9.50495 10.4061 9.65555L16.3272 17.1092C16.4468 17.2598 16.4216 17.4789 16.2709 17.5985C16.1202 17.7181 15.9011 17.6928 15.7816 17.5422L9.86078 10.0889C9.74111 9.93831 9.76618 9.71922 9.91678 9.59955Z",fill:"#30414C"})]}),(0,i.jsx)("h2",{className:"sample-report__title",children:C.successHeading})]}):!L&&b?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h2",{className:"sample-report__title",children:C.reportSelectionHeading||C.formHeading}),!!C.reportSelectionDescription&&(0,i.jsx)("p",{className:"sample-report__desc",children:C.reportSelectionDescription}),(0,i.jsx)("div",{className:"sample-report__choice",children:w?(0,i.jsx)("button",{className:"sample-report__choice-btn sample-report__choice-btn--pending btn btn--primary-reverse",type:"button",disabled:!0,children:"..."}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{className:"sample-report__choice-btn btn btn--primary-reverse",type:"button",onClick:()=>handleChoice("Cat"),children:C.catReportButtonLabel||"Cat Sample Report"}),(0,i.jsx)("button",{className:"sample-report__choice-btn btn btn--primary-reverse",type:"button",onClick:()=>handleChoice("Dog"),children:C.dogReportButtonLabel||"Dog Sample Report"})]})}),!!x&&(0,i.jsxs)("div",{className:"sample-report__error sample-report__error--static",children:[(0,i.jsx)(n.Z,{id:"circle-information",width:20,height:20,className:"icon icon-circle-information sample-report__error-icon"}),(0,i.jsx)("span",{children:x})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h2",{className:"sample-report__title",children:C.formHeading}),!!C.formDescription&&(0,i.jsx)("p",{className:"sample-report__desc",children:C.formDescription}),(0,i.jsx)(SampleReportForm,{species:null!=L?L:void 0,placeholder:C.emailPlaceholder,buttonText:C.submitButtonLabel,onSubmit:handleEmailSubmit})]})})]})})})}}}]);

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.