digital-rabbit-cl 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:var(--border-width, .15em);border-radius:var(--border-radius, 0px);border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:var(--button-padding-small)}.Button-module__sizeDefault___iwWOV{padding:var(--button-padding-default)}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:var(--form-label-padding-bottom)}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:var(--form-error-margin-top);font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:var(--form-group-margin-bottom)}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__indented___t61iz{padding-left:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.Input-module__input___WjT81{background-color:transparent;border-width:var(--border-width, .15em);border-radius:var(--border-radius, 0px);border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:var(--input-padding-small)}.Input-module__sizeDefault___AxPA0{padding:var(--input-padding-default)}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:var(--border-width, .15em);border-radius:var(--border-radius, 0px);border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:var(--textarea-padding-small)}.Textarea-module__sizeDefault___LL2Uc{padding:var(--textarea-padding-default)}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:var(--border-width, .15em);border-style:solid;border-radius:var(--border-radius, 0px);box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:var(--select-padding-small)}.Select-module__sizeDefault___EiWvW{padding:var(--select-padding-default)}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:var(--nav-padding-top);position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:var(--nav-link-padding);text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:var(--nav-button-margin)}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Stack-module__stack___yUU-B{display:flex;gap:.5em}.Stack-module__vertical___sKTyQ{flex-direction:column;margin-bottom:.5em}.Stack-module__horizontal___YsvtV{flex-direction:row;align-items:center}.ResponsiveSection-module__section___gBESK{width:100%;padding:0}.ResponsiveSection-module__innerDiv___r1bky{max-width:var(--max-width);margin:0 auto;padding:var(--section-padding)}.Hero-module__hero___IB2tg{padding:var(--hero-padding, 3rem 0)}.Hero-module__content___rkkfQ h1{font-size:var(--hero-h1-font-size, 2rem);margin-bottom:var(--hero-h1-margin-bottom)}.Hero-module__content___rkkfQ p{font-size:var(--hero-p-font-size, 1.125rem);line-height:1.6}.Footer-module__footer___A76NF{width:100%;margin-top:auto}.Footer-module__container___QneNs{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--footer-font-size);max-width:var(--footer-max-width);padding:var(--footer-padding)}.FeatureCard-module__card___XQt66{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--feature-card-padding)}.FeatureCard-module__icon___dXJ92{font-size:var(--feature-icon-font-size, 2.5rem);margin-bottom:var(--feature-icon-margin-bottom);color:var(--feature-icon-color, #0066cc)}.FeatureCard-module__title___KxXyA{font-size:var(--feature-title-font-size, 1.25rem);font-weight:600;margin-bottom:var(--feature-title-margin-bottom);color:var(--feature-title-color, inherit)}.FeatureCard-module__content___68xkw{font-size:1rem;line-height:1.6;color:var(--feature-content-color, #666)}.FeatureGridSection-module__section___wZrbC{padding:var(--section-padding-vertical) 0}.FeatureGridSection-module__grid___iwPJv{display:grid;gap:2rem;grid-template-columns:var(--grid-template-columns, 1fr)}.PageLayout-module__layoutContainer___diLdT{display:flex;flex-direction:column;min-height:100vh}.PageLayout-module__content___h2mBr{flex:1 0 auto;display:flex;flex-direction:column}.PageLayout-module__header___ChdTF{flex-shrink:0}.PageLayout-module__main___Sw7Pv{flex:1}.PageLayout-module__mainPadded___ZKio3{padding:var(--main-padding-vertical) 0}.PageLayout-module__footer___DUw6m{flex-shrink:0}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(function(z,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],g):(z=typeof globalThis<"u"?globalThis:z||self,g(z.DigitalRabbitCL={},z.jsxRuntime,z.React))})(this,(function(z,g,F){"use strict";const we={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},br=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverColor:o,hoverTextColor:n,outline:l})=>{let a,d,m;l?(a="transparent",d=t,m=t,e&&(a=o||t,d=o||t,m=n||s)):(a=t,d=t,m=s,e&&(a=o||t,d=o||t,m=n||s));let y=1;return r?y=.3:e&&(y=o||l?1:.75),{backgroundColor:a,borderColor:d,color:m,opacity:y}},at={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},ae={colors:at,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:at.secondary}},border:{radius:"0px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},lt=F.createContext(ae),Sr=({theme:e={},children:r})=>{var s;const t={...ae,...e,colors:{...ae.colors,...e.colors},fonts:{...ae.fonts,...e.fonts},buttons:{...ae.buttons,...e.buttons,primary:{...ae.buttons.primary,...(s=e.buttons)==null?void 0:s.primary}},border:{...ae.border,...e.border},breakpoints:{...ae.breakpoints,...e.breakpoints},layout:{...ae.layout,...e.layout}};return g.jsx(lt.Provider,{value:t,children:r})},T=()=>F.useContext(lt),Fr=({color:e,hoverColor:r,hoverTextColor:t,textColor:s,outline:o=!1,size:n,type:l="button",buttonProps:a={},children:d,disabled:m=!1,onClick:y,fontSize:h})=>{const f=T(),[S,C]=F.useState(!1);let w;s?w=s:w=e?f.buttons.textColor:f.buttons.primary.textColor;const L={...br({isActive:S,disabled:m,buttonColor:e||f.colors.primary,textColor:w,hoverColor:r,hoverTextColor:t,outline:o}),fontSize:h||f.fonts.size,"--border-width":f.border.width,"--border-radius":f.border.radius,"--button-padding-small":`calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 0.35)`,"--button-padding-default":`calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 0.35)`},k=[we.button,n==="small"?we.sizeSmall:we.sizeDefault,o?we.outline:""].filter(Boolean).join(" ");return g.jsx("button",{className:k,disabled:m,onClick:y,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),type:l,...a,style:{...L,...a.style},children:d})};var ct=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),wr=new Uint8Array(16);function kr(){if(!ct)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ct(wr)}for(var ut=[],ke=0;ke<256;++ke)ut[ke]=(ke+256).toString(16).substr(1);function Vr(e,r){var t=0,s=ut;return[s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]]].join("")}function dt(e,r,t){var s=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||kr)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r)for(var n=0;n<16;++n)r[s+n]=o[n];return r||Vr(o)}const Le={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},xr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{boxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},ft={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},Cr=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),Ve=({children:e,color:r,disabled:t=!1,error:s=!1,fontSize:o,htmlFor:n,style:l,...a})=>{const d=T(),m=d.colors.error,y=s?m:r||d.colors.primary,h=Cr({color:y,disabled:t,fontSize:o||".85em"}),f={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:h.color,fontSize:h.fontSize,opacity:h.opacity,cursor:h.cursor,...l},S=[ft.label,t?ft.disabled:""].filter(Boolean).join(" ");return g.jsx("label",{className:S,htmlFor:n,style:f,...a,children:e})},yt=({checked:e=!1,checkmarkColor:r,color:t,disabled:s=!1,error:o=!1,fontSize:n,id:l,inverted:a=!1,label:d,labelStyle:m,name:y,onChange:h,style:f,...S})=>{const C=T(),w=l||dt(),x=C.colors.error,L=o?x:t||C.colors.primary,k=xr({color:L,checkmarkColor:r,disabled:s,inverted:a}),A=M=>{s||h(M)},E={cursor:k.cursor,fontSize:n||C.fonts.size,opacity:k.opacity,...f},$={width:n||"1rem"};return g.jsxs("div",{className:Le.container,style:E,...S,children:[g.jsx("input",{id:w,checked:e,disabled:s,onChange:M=>A({target:{checked:M.target.checked,name:y,type:"checkbox"}}),name:y,style:{display:"none"},type:"checkbox"}),g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>A({target:{checked:!e,name:y,type:"checkbox"}}),style:$,className:Le.svg,children:[g.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:a&&e?k.boxColor:"transparent",strokeWidth:"25",stroke:k.boxColor}}),e&&g.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:k.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),d&&g.jsx(Ve,{htmlFor:w,className:Le.label,style:m,color:k.boxColor,disabled:s,error:o,fontSize:n,children:d})]})},$r=()=>{const e=T();return F.useLayoutEffect(()=>{const r=document.documentElement;e.fonts&&(e.fonts.fontFamily&&r.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&r.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&r.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&r.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&r.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&r.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&r.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&r.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&r.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&r.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&r.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&r.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&r.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&r.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&r.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&r.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&r.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&r.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&r.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null};var ge=e=>e.type==="checkbox",de=e=>e instanceof Date,Z=e=>e==null;const mt=e=>typeof e=="object";var U=e=>!Z(e)&&!Array.isArray(e)&&mt(e)&&!de(e),ht=e=>U(e)&&e.target?ge(e.target)?e.target.checked:e.target.value:e,zr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_t=(e,r)=>e.has(zr(r)),Er=e=>{const r=e.constructor&&e.constructor.prototype;return U(r)&&r.hasOwnProperty("isPrototypeOf")},Oe=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function W(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Oe&&(e instanceof Blob||s))&&(t||U(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Er(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=W(e[o]));else return e;return r}var xe=e=>/^\w*$/.test(e),I=e=>e===void 0,Te=e=>Array.isArray(e)?e.filter(Boolean):[],Me=e=>Te(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,r,t)=>{if(!r||!U(e))return t;const s=(xe(r)?[r]:Me(r)).reduce((o,n)=>Z(o)?o:o[n],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",P=(e,r,t)=>{let s=-1;const o=xe(r)?[r]:Me(r),n=o.length,l=n-1;for(;++s<n;){const a=o[s];let d=t;if(s!==l){const m=e[a];d=U(m)||Array.isArray(m)?m:isNaN(+o[s+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=d,e=e[a]}};const Ce={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ee={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gt=F.createContext(null);gt.displayName="HookFormContext";const Ie=()=>F.useContext(gt);var pt=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const l=n;return r._proxyFormState[l]!==ee.all&&(r._proxyFormState[l]=!s||ee.all),t&&(t[l]=!0),e[l]}});return o};const He=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Ar(e){const r=Ie(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[l,a]=F.useState(t._formState),d=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return He(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:m=>{!s&&a({...t._formState,...m})}}),[o,s,n]),F.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),F.useMemo(()=>pt(l,t,d.current,!1),[l,t])}var X=e=>typeof e=="string",Ue=(e,r,t,s,o)=>X(e)?(s&&r.watch.add(e),v(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),v(t,n))):(s&&(r.watchAll=!0),t),je=e=>Z(e)||!mt(e);function te(e,r,t=new WeakSet){if(je(e)||je(r))return e===r;if(de(e)&&de(r))return e.getTime()===r.getTime();const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const l=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const a=r[n];if(de(l)&&de(a)||U(l)&&U(a)||Array.isArray(l)&&Array.isArray(a)?!te(l,a,t):l!==a)return!1}}return!0}function Dr(e){const r=Ie(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:l,compute:a}=e||{},d=F.useRef(o),m=F.useRef(a),y=F.useRef(void 0),h=F.useRef(t),f=F.useRef(s);m.current=a;const[S,C]=F.useState(()=>{const E=t._getWatch(s,d.current);return m.current?m.current(E):E}),w=F.useCallback(E=>{const $=Ue(s,t._names,E||t._formValues,!1,d.current);return m.current?m.current($):$},[t._formValues,t._names,s]),x=F.useCallback(E=>{if(!n){const $=Ue(s,t._names,E||t._formValues,!1,d.current);if(m.current){const M=m.current($);te(M,y.current)||(C(M),y.current=M)}else C($)}},[t._formValues,t._names,n,s]);He(()=>((h.current!==t||!te(f.current,s))&&(h.current=t,f.current=s,x()),t._subscribe({name:s,formState:{values:!0},exact:l,callback:E=>{x(E.values)}})),[t,l,s,x]),F.useEffect(()=>t._removeUnmounted());const L=h.current!==t,k=f.current,A=F.useMemo(()=>{if(n)return null;const E=!L&&!te(k,s);return L||E?w():null},[n,L,s,k,w]);return A!==null?A:S}function Pr(e){const r=Ie(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:l}=e,a=_t(o._names.array,t),d=F.useMemo(()=>v(o._formValues,t,v(o._defaultValues,t,l)),[o,t,l]),m=Dr({control:o,name:t,defaultValue:d,exact:!0}),y=Ar({control:o,name:t,exact:!0}),h=F.useRef(e),f=F.useRef(void 0),S=F.useRef(o.register(t,{...e.rules,value:m,...J(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const C=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(y.errors,t)},isDirty:{enumerable:!0,get:()=>!!v(y.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!v(y.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!v(y.validatingFields,t)},error:{enumerable:!0,get:()=>v(y.errors,t)}}),[y,t]),w=F.useCallback(A=>S.current.onChange({target:{value:ht(A),name:t},type:Ce.CHANGE}),[t]),x=F.useCallback(()=>S.current.onBlur({target:{value:v(o._formValues,t),name:t},type:Ce.BLUR}),[t,o._formValues]),L=F.useCallback(A=>{const E=v(o._fields,t);E&&A&&(E._f.ref={focus:()=>A.focus&&A.focus(),select:()=>A.select&&A.select(),setCustomValidity:$=>A.setCustomValidity($),reportValidity:()=>A.reportValidity()})},[o._fields,t]),k=F.useMemo(()=>({name:t,value:m,...J(s)||y.disabled?{disabled:y.disabled||s}:{},onChange:w,onBlur:x,ref:L}),[t,s,y.disabled,w,x,L,m]);return F.useEffect(()=>{const A=o._options.shouldUnregister||n,E=f.current;E&&E!==t&&!a&&o.unregister(E),o.register(t,{...h.current.rules,...J(h.current.disabled)?{disabled:h.current.disabled}:{}});const $=(M,Y)=>{const ce=v(o._fields,M);ce&&ce._f&&(ce._f.mount=Y)};if($(t,!0),A){const M=W(v(o._options.defaultValues,t,h.current.defaultValue));P(o._defaultValues,t,M),I(v(o._formValues,t))&&P(o._formValues,t,M)}return!a&&o.register(t),f.current=t,()=>{(a?A&&!o._state.action:A)?o.unregister(t):$(t,!1)}},[t,o,a,n]),F.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),F.useMemo(()=>({field:k,formState:y,fieldState:C}),[k,y,C])}var We=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},pe=e=>Array.isArray(e)?e:[e],vt=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function bt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&U(o)&&n){const l=bt(o,n);U(l)&&(t[s]=l)}else e[s]&&(t[s]=n)}return t}var q=e=>U(e)&&!Object.keys(e).length,qe=e=>e.type==="file",re=e=>typeof e=="function",$e=e=>{if(!Oe)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},St=e=>e.type==="select-multiple",Ge=e=>e.type==="radio",Nr=e=>Ge(e)||ge(e),Ze=e=>$e(e)&&e.isConnected;function Br(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=I(e)?s++:e[r[s++]];return e}function Lr(e){for(const r in e)if(e.hasOwnProperty(r)&&!I(e[r]))return!1;return!0}function j(e,r){const t=Array.isArray(r)?r:xe(r)?[r]:Me(r),s=t.length===1?e:Br(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(U(s)&&q(s)||Array.isArray(s)&&Lr(s))&&j(e,t.slice(0,-1)),e}var Or=e=>{for(const r in e)if(re(e[r]))return!0;return!1};function Ft(e){return Array.isArray(e)||U(e)&&!Or(e)}function Qe(e,r={}){for(const t in e)Ft(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Qe(e[t],r[t])):I(e[t])||(r[t]=!0);return r}function fe(e,r,t){t||(t=Qe(r));for(const s in e)Ft(e[s])?I(r)||je(t[s])?t[s]=Qe(e[s],Array.isArray(e[s])?[]:{}):fe(e[s],Z(r)?{}:r[s],t[s]):t[s]=!te(e[s],r[s]);return t}const wt={value:!1,isValid:!1},kt={value:!0,isValid:!0};var Vt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?kt:{value:e[0].value,isValid:!0}:kt:wt}return wt},xt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>I(e)?e:r?e===""?NaN:e&&+e:t&&X(e)?new Date(e):s?s(e):e;const Ct={isValid:!1,value:null};var $t=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Ct):Ct;function zt(e){const r=e.ref;return qe(r)?r.files:Ge(r)?$t(e.refs).value:St(r)?[...r.selectedOptions].map(({value:t})=>t):ge(r)?Vt(e.refs).value:xt(I(r.value)?e.ref.value:r.value,e)}var Tr=(e,r,t,s)=>{const o={};for(const n of e){const l=v(r,n);l&&P(o,n,l._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},ze=e=>e instanceof RegExp,ve=e=>I(e)?e:ze(e)?e.source:U(e)?ze(e.value)?e.value.source:e.value:e,Et=e=>({isOnSubmit:!e||e===ee.onSubmit,isOnBlur:e===ee.onBlur,isOnChange:e===ee.onChange,isOnAll:e===ee.all,isOnTouch:e===ee.onTouched});const At="AsyncFunction";var Mr=e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===At||U(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===At)),Ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Dt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const be=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=v(e,o);if(n){const{_f:l,...a}=n;if(l){if(l.refs&&l.refs[0]&&r(l.refs[0],o)&&!s)return!0;if(l.ref&&r(l.ref,l.name)&&!s)return!0;if(be(a,r))break}else if(U(a)&&be(a,r))break}}};function Pt(e,r,t){const s=v(e,t);if(s||xe(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),l=v(r,n),a=v(e,n);if(l&&!Array.isArray(l)&&t!==n)return{name:t};if(a&&a.type)return{name:n,error:a};if(a&&a.root&&a.root.type)return{name:`${n}.root`,error:a.root};o.pop()}return{name:t}}var Hr=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return q(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(l=>r[l]===(!s||ee.all))},Ur=(e,r,t)=>!e||!r||e===r||pe(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),jr=(e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,Wr=(e,r)=>!Te(v(e,r)).length&&j(e,r),qr=(e,r,t)=>{const s=pe(v(e,t));return P(s,"root",r[t]),P(e,t,s),e};function Nt(e,r,t="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||J(e)&&!e)return{type:t,message:X(e)?e:"",ref:r}}var ye=e=>U(e)&&!ze(e)?e:{value:e,message:""},Bt=async(e,r,t,s,o,n)=>{const{ref:l,refs:a,required:d,maxLength:m,minLength:y,min:h,max:f,pattern:S,validate:C,name:w,valueAsNumber:x,mount:L}=e._f,k=v(t,w);if(!L||r.has(w))return{};const A=a?a[0]:l,E=D=>{o&&A.reportValidity&&(A.setCustomValidity(J(D)?"":D||""),A.reportValidity())},$={},M=Ge(l),Y=ge(l),ce=M||Y,Q=(x||qe(l))&&I(l.value)&&I(k)||$e(l)&&l.value===""||k===""||Array.isArray(k)&&!k.length,oe=We.bind(null,w,s,$),ne=(D,B,H,G=le.maxLength,K=le.minLength)=>{const ie=D?B:H;$[w]={type:D?G:K,message:ie,ref:l,...oe(D?G:K,ie)}};if(n?!Array.isArray(k)||!k.length:d&&(!ce&&(Q||Z(k))||J(k)&&!k||Y&&!Vt(a).isValid||M&&!$t(a).isValid)){const{value:D,message:B}=X(d)?{value:!!d,message:d}:ye(d);if(D&&($[w]={type:le.required,message:B,ref:A,...oe(le.required,B)},!s))return E(B),$}if(!Q&&(!Z(h)||!Z(f))){let D,B;const H=ye(f),G=ye(h);if(!Z(k)&&!isNaN(k)){const K=l.valueAsNumber||k&&+k;Z(H.value)||(D=K>H.value),Z(G.value)||(B=K<G.value)}else{const K=l.valueAsDate||new Date(k),ie=Ne=>new Date(new Date().toDateString()+" "+Ne),Fe=l.type=="time",_e=l.type=="week";X(H.value)&&k&&(D=Fe?ie(k)>ie(H.value):_e?k>H.value:K>new Date(H.value)),X(G.value)&&k&&(B=Fe?ie(k)<ie(G.value):_e?k<G.value:K<new Date(G.value))}if((D||B)&&(ne(!!D,H.message,G.message,le.max,le.min),!s))return E($[w].message),$}if((m||y)&&!Q&&(X(k)||n&&Array.isArray(k))){const D=ye(m),B=ye(y),H=!Z(D.value)&&k.length>+D.value,G=!Z(B.value)&&k.length<+B.value;if((H||G)&&(ne(H,D.message,B.message),!s))return E($[w].message),$}if(S&&!Q&&X(k)){const{value:D,message:B}=ye(S);if(ze(D)&&!k.match(D)&&($[w]={type:le.pattern,message:B,ref:l,...oe(le.pattern,B)},!s))return E(B),$}if(C){if(re(C)){const D=await C(k,t),B=Nt(D,A);if(B&&($[w]={...B,...oe(le.validate,B.message)},!s))return E(B.message),$}else if(U(C)){let D={};for(const B in C){if(!q(D)&&!s)break;const H=Nt(await C[B](k,t),A,B);H&&(D={...H,...oe(B,H.message)},E(H.message),s&&($[w]=D))}if(!q(D)&&($[w]={ref:A,...D},!s))return $}}return E(!0),$};const Gr={mode:ee.onSubmit,reValidateMode:ee.onChange,shouldFocusError:!0};function Zr(e={}){let r={...Gr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:re(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=U(r.defaultValues)||U(r.values)?W(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:W(o),l={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,m=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...y};const f={array:vt(),state:vt()},S=r.criteriaMode===ee.all,C=i=>c=>{clearTimeout(m),m=setTimeout(i,c)},w=async i=>{if(!r.disabled&&(y.isValid||h.isValid||i)){const c=r.resolver?q((await Y()).errors):await Q(s,!0);c!==t.isValid&&f.state.next({isValid:c})}},x=(i,c)=>{!r.disabled&&(y.isValidating||y.validatingFields||h.isValidating||h.validatingFields)&&((i||Array.from(a.mount)).forEach(u=>{u&&(c?P(t.validatingFields,u,c):j(t.validatingFields,u))}),f.state.next({validatingFields:t.validatingFields,isValidating:!q(t.validatingFields)}))},L=(i,c=[],u,b,p=!0,_=!0)=>{if(b&&u&&!r.disabled){if(l.action=!0,_&&Array.isArray(v(s,i))){const V=u(v(s,i),b.argA,b.argB);p&&P(s,i,V)}if(_&&Array.isArray(v(t.errors,i))){const V=u(v(t.errors,i),b.argA,b.argB);p&&P(t.errors,i,V),Wr(t.errors,i)}if((y.touchedFields||h.touchedFields)&&_&&Array.isArray(v(t.touchedFields,i))){const V=u(v(t.touchedFields,i),b.argA,b.argB);p&&P(t.touchedFields,i,V)}(y.dirtyFields||h.dirtyFields)&&(t.dirtyFields=fe(o,n)),f.state.next({name:i,isDirty:ne(i,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else P(n,i,c)},k=(i,c)=>{P(t.errors,i,c),f.state.next({errors:t.errors})},A=i=>{t.errors=i,f.state.next({errors:t.errors,isValid:!1})},E=(i,c,u,b)=>{const p=v(s,i);if(p){const _=v(n,i,I(u)?v(o,i):u);I(_)||b&&b.defaultChecked||c?P(n,i,c?_:zt(p._f)):H(i,_),l.mount&&w()}},$=(i,c,u,b,p)=>{let _=!1,V=!1;const N={name:i};if(!r.disabled){if(!u||b){(y.isDirty||h.isDirty)&&(V=t.isDirty,t.isDirty=N.isDirty=ne(),_=V!==N.isDirty);const O=te(v(o,i),c);V=!!v(t.dirtyFields,i),O?j(t.dirtyFields,i):P(t.dirtyFields,i,!0),N.dirtyFields=t.dirtyFields,_=_||(y.dirtyFields||h.dirtyFields)&&V!==!O}if(u){const O=v(t.touchedFields,i);O||(P(t.touchedFields,i,u),N.touchedFields=t.touchedFields,_=_||(y.touchedFields||h.touchedFields)&&O!==u)}_&&p&&f.state.next(N)}return _?N:{}},M=(i,c,u,b)=>{const p=v(t.errors,i),_=(y.isValid||h.isValid)&&J(c)&&t.isValid!==c;if(r.delayError&&u?(d=C(()=>k(i,u)),d(r.delayError)):(clearTimeout(m),d=null,u?P(t.errors,i,u):j(t.errors,i)),(u?!te(p,u):p)||!q(b)||_){const V={...b,..._&&J(c)?{isValid:c}:{},errors:t.errors,name:i};t={...t,...V},f.state.next(V)}},Y=async i=>{x(i,!0);const c=await r.resolver(n,r.context,Tr(i||a.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return x(i),c},ce=async i=>{const{errors:c}=await Y(i);if(i)for(const u of i){const b=v(c,u);b?P(t.errors,u,b):j(t.errors,u)}else t.errors=c;return c},Q=async(i,c,u={valid:!0})=>{for(const b in i){const p=i[b];if(p){const{_f:_,...V}=p;if(_){const N=a.array.has(_.name),O=p._f&&Mr(p._f);O&&y.validatingFields&&x([_.name],!0);const R=await Bt(p,a.disabled,n,S,r.shouldUseNativeValidation&&!c,N);if(O&&y.validatingFields&&x([_.name]),R[_.name]&&(u.valid=!1,c))break;!c&&(v(R,_.name)?N?qr(t.errors,R,_.name):P(t.errors,_.name,R[_.name]):j(t.errors,_.name))}!q(V)&&await Q(V,c,u)}}return u.valid},oe=()=>{for(const i of a.unMount){const c=v(s,i);c&&(c._f.refs?c._f.refs.every(u=>!Ze(u)):!Ze(c._f.ref))&&rt(i)}a.unMount=new Set},ne=(i,c)=>!r.disabled&&(i&&c&&P(n,i,c),!te(Ne(),o)),D=(i,c,u)=>Ue(i,a,{...l.mount?n:I(c)?o:X(i)?{[i]:c}:c},u,c),B=i=>Te(v(l.mount?n:o,i,r.shouldUnregister?v(o,i,[]):[])),H=(i,c,u={})=>{const b=v(s,i);let p=c;if(b){const _=b._f;_&&(!_.disabled&&P(n,i,xt(c,_)),p=$e(_.ref)&&Z(c)?"":c,St(_.ref)?[..._.ref.options].forEach(V=>V.selected=p.includes(V.value)):_.refs?ge(_.ref)?_.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(p)?V.checked=!!p.find(N=>N===V.value):V.checked=p===V.value||!!p)}):_.refs.forEach(V=>V.checked=V.value===p):qe(_.ref)?_.ref.value="":(_.ref.value=p,_.ref.type||f.state.next({name:i,values:W(n)})))}(u.shouldDirty||u.shouldTouch)&&$(i,p,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&_e(i)},G=(i,c,u)=>{for(const b in c){if(!c.hasOwnProperty(b))return;const p=c[b],_=i+"."+b,V=v(s,_);(a.array.has(i)||U(p)||V&&!V._f)&&!de(p)?G(_,p,u):H(_,p,u)}},K=(i,c,u={})=>{const b=v(s,i),p=a.array.has(i),_=W(c);P(n,i,_),p?(f.array.next({name:i,values:W(n)}),(y.isDirty||y.dirtyFields||h.isDirty||h.dirtyFields)&&u.shouldDirty&&f.state.next({name:i,dirtyFields:fe(o,n),isDirty:ne(i,_)})):b&&!b._f&&!Z(_)?G(i,_,u):H(i,_,u),Dt(i,a)&&f.state.next({...t,name:i}),f.state.next({name:l.mount?i:void 0,values:W(n)})},ie=async i=>{l.mount=!0;const c=i.target;let u=c.name,b=!0;const p=v(s,u),_=O=>{b=Number.isNaN(O)||de(O)&&isNaN(O.getTime())||te(O,v(n,u,O))},V=Et(r.mode),N=Et(r.reValidateMode);if(p){let O,R;const Be=c.type?zt(p._f):ht(i),ue=i.type===Ce.BLUR||i.type===Ce.FOCUS_OUT,Ts=!Ir(p._f)&&!r.resolver&&!v(t.errors,u)&&!p._f.deps||jr(ue,v(t.touchedFields,u),t.isSubmitted,N,V),nt=Dt(u,a,ue);P(n,u,Be),ue?(!c||!c.readOnly)&&(p._f.onBlur&&p._f.onBlur(i),d&&d(0)):p._f.onChange&&p._f.onChange(i);const it=$(u,Be,ue),Ms=!q(it)||nt;if(!ue&&f.state.next({name:u,type:i.type,values:W(n)}),Ts)return(y.isValid||h.isValid)&&(r.mode==="onBlur"?ue&&w():ue||w()),Ms&&f.state.next({name:u,...nt?{}:it});if(!ue&&nt&&f.state.next({...t}),r.resolver){const{errors:pr}=await Y([u]);if(_(Be),b){const Is=Pt(t.errors,s,u),vr=Pt(pr,s,Is.name||u);O=vr.error,u=vr.name,R=q(pr)}}else x([u],!0),O=(await Bt(p,a.disabled,n,S,r.shouldUseNativeValidation))[u],x([u]),_(Be),b&&(O?R=!1:(y.isValid||h.isValid)&&(R=await Q(s,!0)));b&&(p._f.deps&&(!Array.isArray(p._f.deps)||p._f.deps.length>0)&&_e(p._f.deps),M(u,R,O,it))}},Fe=(i,c)=>{if(v(t.errors,c)&&i.focus)return i.focus(),1},_e=async(i,c={})=>{let u,b;const p=pe(i);if(r.resolver){const _=await ce(I(i)?i:p);u=q(_),b=i?!p.some(V=>v(_,V)):u}else i?(b=(await Promise.all(p.map(async _=>{const V=v(s,_);return await Q(V&&V._f?{[_]:V}:V)}))).every(Boolean),!(!b&&!t.isValid)&&w()):b=u=await Q(s);return f.state.next({...!X(i)||(y.isValid||h.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!b&&be(s,Fe,i?p:a.mount),b},Ne=(i,c)=>{let u={...l.mount?n:o};return c&&(u=bt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),I(i)?u:X(i)?v(u,i):i.map(b=>v(u,b))},ur=(i,c)=>({invalid:!!v((c||t).errors,i),isDirty:!!v((c||t).dirtyFields,i),error:v((c||t).errors,i),isValidating:!!v(t.validatingFields,i),isTouched:!!v((c||t).touchedFields,i)}),As=i=>{i&&pe(i).forEach(c=>j(t.errors,c)),f.state.next({errors:i?t.errors:{}})},dr=(i,c,u)=>{const b=(v(s,i,{_f:{}})._f||{}).ref,p=v(t.errors,i)||{},{ref:_,message:V,type:N,...O}=p;P(t.errors,i,{...O,...c,ref:b}),f.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&b&&b.focus&&b.focus()},Ds=(i,c)=>re(i)?f.state.subscribe({next:u=>"values"in u&&i(D(void 0,c),u)}):D(i,c,!0),fr=i=>f.state.subscribe({next:c=>{Ur(i.name,c.name,i.exact)&&Hr(c,i.formState||y,Os,i.reRenderRoot)&&i.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Ps=i=>(l.mount=!0,h={...h,...i.formState},fr({...i,formState:h})),rt=(i,c={})=>{for(const u of i?pe(i):a.mount)a.mount.delete(u),a.array.delete(u),c.keepValue||(j(s,u),j(n,u)),!c.keepError&&j(t.errors,u),!c.keepDirty&&j(t.dirtyFields,u),!c.keepTouched&&j(t.touchedFields,u),!c.keepIsValidating&&j(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&j(o,u);f.state.next({values:W(n)}),f.state.next({...t,...c.keepDirty?{isDirty:ne()}:{}}),!c.keepIsValid&&w()},yr=({disabled:i,name:c})=>{(J(i)&&l.mount||i||a.disabled.has(c))&&(i?a.disabled.add(c):a.disabled.delete(c))},st=(i,c={})=>{let u=v(s,i);const b=J(c.disabled)||J(r.disabled);return P(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...c}}),a.mount.add(i),u?yr({disabled:J(c.disabled)?c.disabled:r.disabled,name:i}):E(i,!0,c.value),{...b?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:ve(c.min),max:ve(c.max),minLength:ve(c.minLength),maxLength:ve(c.maxLength),pattern:ve(c.pattern)}:{},name:i,onChange:ie,onBlur:ie,ref:p=>{if(p){st(i,c),u=v(s,i);const _=I(p.value)&&p.querySelectorAll&&p.querySelectorAll("input,select,textarea")[0]||p,V=Nr(_),N=u._f.refs||[];if(V?N.find(O=>O===_):_===u._f.ref)return;P(s,i,{_f:{...u._f,...V?{refs:[...N.filter(Ze),_,...Array.isArray(v(o,i))?[{}]:[]],ref:{type:_.type,name:i}}:{ref:_}}}),E(i,!1,void 0,_)}else u=v(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(_t(a.array,i)&&l.action)&&a.unMount.add(i)}}},ot=()=>r.shouldFocusError&&be(s,Fe,a.mount),Ns=i=>{J(i)&&(f.state.next({disabled:i}),be(s,(c,u)=>{const b=v(s,u);b&&(c.disabled=b._f.disabled||i,Array.isArray(b._f.refs)&&b._f.refs.forEach(p=>{p.disabled=b._f.disabled||i}))},0,!1))},mr=(i,c)=>async u=>{let b;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let p=W(n);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:_,values:V}=await Y();t.errors=_,p=W(V)}else await Q(s);if(a.disabled.size)for(const _ of a.disabled)j(p,_);if(j(t.errors,"root"),q(t.errors)){f.state.next({errors:{}});try{await i(p,u)}catch(_){b=_}}else c&&await c({...t.errors},u),ot(),setTimeout(ot);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:q(t.errors)&&!b,submitCount:t.submitCount+1,errors:t.errors}),b)throw b},Bs=(i,c={})=>{v(s,i)&&(I(c.defaultValue)?K(i,W(v(o,i))):(K(i,c.defaultValue),P(o,i,W(c.defaultValue))),c.keepTouched||j(t.touchedFields,i),c.keepDirty||(j(t.dirtyFields,i),t.isDirty=c.defaultValue?ne(i,W(v(o,i))):ne()),c.keepError||(j(t.errors,i),y.isValid&&w()),f.state.next({...t}))},hr=(i,c={})=>{const u=i?W(i):o,b=W(u),p=q(i),_=p?o:b;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const V=new Set([...a.mount,...Object.keys(fe(o,n))]);for(const N of Array.from(V))v(t.dirtyFields,N)?P(_,N,v(n,N)):K(N,v(_,N))}else{if(Oe&&I(i))for(const V of a.mount){const N=v(s,V);if(N&&N._f){const O=Array.isArray(N._f.refs)?N._f.refs[0]:N._f.ref;if($e(O)){const R=O.closest("form");if(R){R.reset();break}}}}if(c.keepFieldsRef)for(const V of a.mount)K(V,v(_,V));else s={}}n=r.shouldUnregister?c.keepDefaultValues?W(o):{}:W(_),f.array.next({values:{..._}}),f.state.next({values:{..._}})}a={mount:c.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!y.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!q(_),l.watch=!!r.shouldUnregister,f.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:p?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!te(i,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&n?fe(o,n):t.dirtyFields:c.keepDefaultValues&&i?fe(o,i):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},_r=(i,c)=>hr(re(i)?i(n):i,c),Ls=(i,c={})=>{const u=v(s,i),b=u&&u._f;if(b){const p=b.refs?b.refs[0]:b.ref;p.focus&&(p.focus(),c.shouldSelect&&re(p.select)&&p.select())}},Os=i=>{t={...t,...i}},gr={control:{register:st,unregister:rt,getFieldState:ur,handleSubmit:mr,setError:dr,_subscribe:fr,_runSchema:Y,_focusError:ot,_getWatch:D,_getDirty:ne,_setValid:w,_setFieldArray:L,_setDisabledField:yr,_setErrors:A,_getFieldArray:B,_reset:hr,_resetDefaultValues:()=>re(r.defaultValues)&&r.defaultValues().then(i=>{_r(i,r.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Ns,_subjects:f,_proxyFormState:y,get _fields(){return s},get _formValues(){return n},get _state(){return l},set _state(i){l=i},get _defaultValues(){return o},get _names(){return a},set _names(i){a=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Ps,trigger:_e,register:st,handleSubmit:mr,watch:Ds,setValue:K,getValues:Ne,reset:_r,resetField:Bs,clearErrors:As,unregister:rt,setError:dr,setFocus:Ls,getFieldState:ur};return{...gr,formControl:gr}}function Qr(e={}){const r=F.useRef(void 0),t=F.useRef(void 0),[s,o]=F.useState({isDirty:!1,isValidating:!1,isLoading:re(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:re(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!re(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...a}=Zr(e);r.current={...a,formState:s}}const n=r.current.control;return n._options=e,He(()=>{const l=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),n._formState.isReady=!0,l},[n]),F.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),F.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),F.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),F.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),F.useEffect(()=>{if(n._proxyFormState.isDirty){const l=n._getDirty();l!==s.isDirty&&n._subjects.state.next({isDirty:l})}},[n,s.isDirty]),F.useEffect(()=>{e.values&&!te(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(l=>({...l}))):n._resetDefaultValues()},[n,e.values]),F.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=pt(s,n),r.current}const Lt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=v(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ke=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Lt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Lt(o,t,e))}},Ot=(e,r)=>{r.shouldUseNativeValidation&&Ke(e,r);const t={};for(const s in e){const o=v(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Kr(r.names||Object.keys(e),s)){const l=Object.assign({},v(t,s));P(l,"root",n),P(t,s,l)}else P(t,s,n)}return t},Kr=(e,r)=>{const t=Tt(r);return e.some(s=>Tt(s).match(`^${t}\\.\\d+`))};function Tt(e){return e.replace(/\]|\[/g,"")}function Mt(e,r,t){function s(a,d){var m;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(m=a._zod).traits??(m.traits=new Set),a._zod.traits.add(e),r(a,d);for(const y in l.prototype)y in a||Object.defineProperty(a,y,{value:l.prototype[y].bind(a)});a._zod.constr=l,a._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function l(a){var d;const m=t!=null&&t.Parent?new n:this;s(m,a),(d=m._zod).deferred??(d.deferred=[]);for(const y of m._zod.deferred)y();return m}return Object.defineProperty(l,"init",{value:s}),Object.defineProperty(l,Symbol.hasInstance,{value:a=>{var d,m;return t!=null&&t.Parent&&a instanceof t.Parent?!0:(m=(d=a==null?void 0:a._zod)==null?void 0:d.traits)==null?void 0:m.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Jr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Xr={};function It(e){return Xr}function Yr(e,r){return typeof r=="bigint"?r.toString():r}const Ht="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ee(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ut(e,r,t){var o,n,l,a,d,m;const s={...e,path:e.path??[]};if(!e.message){const y=Ee((l=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:l.call(n,e))??Ee((a=r==null?void 0:r.error)==null?void 0:a.call(r,e))??Ee((d=t.customError)==null?void 0:d.call(t,e))??Ee((m=t.localeError)==null?void 0:m.call(t,e))??"Invalid input";s.message=y}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const jt=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Yr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rr=Mt("$ZodError",jt),Wt=Mt("$ZodError",jt,{Parent:Error}),es=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},l=r._zod.run({value:t,issues:[]},n);if(l instanceof Promise)throw new Jr;if(l.issues.length){const a=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Ut(d,n,It())));throw Ht(a,o==null?void 0:o.callee),a}return l.value})(Wt),ts=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let l=r._zod.run({value:t,issues:[]},n);if(l instanceof Promise&&(l=await l),l.issues.length){const a=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Ut(d,n,It())));throw Ht(a,o==null?void 0:o.callee),a}return l.value})(Wt);function qt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function rs(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,l=s.path.join(".");if(!t[l])if("unionErrors"in s){var a=s.unionErrors[0].errors[0];t[l]={message:a.message,type:a.code}}else t[l]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(y){return y.errors.forEach(function(h){return e.push(h)})}),r){var d=t[l].types,m=d&&d[s.code];t[l]=We(l,r,t,o,m?[].concat(m,s.message):s.message)}e.shift()}return t}function ss(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,l=s.path.join(".");if(!t[l])if(s.code==="invalid_union"&&s.errors.length>0){var a=s.errors[0][0];t[l]={message:a.message,type:a.code}}else t[l]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(y){return y.forEach(function(h){return e.push(h)})}),r){var d=t[l].types,m=d&&d[s.code];t[l]=We(l,r,t,o,m?[].concat(m,s.message):s.message)}e.shift()}return t}function os(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(qt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(l){return n.shouldUseNativeValidation&&Ke({},n),{errors:{},values:t.raw?Object.assign({},s):l}})},function(l){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(l))return{values:{},errors:Ot(rs(l.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw l}))}catch(l){return Promise.reject(l)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(qt(function(){return Promise.resolve((t.mode==="sync"?es:ts)(e,s,r)).then(function(l){return n.shouldUseNativeValidation&&Ke({},n),{errors:{},values:t.raw?Object.assign({},s):l}})},function(l){if((function(a){return a instanceof Rr})(l))return{values:{},errors:Ot(ss(l.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}const Gt=F.createContext(null);function Zt(){const e=F.useContext(Gt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function ns({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",...l}){const a=Qr({resolver:t?os(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),d=a.handleSubmit(e);return g.jsx(Gt.Provider,{value:a,children:g.jsx("form",{onSubmit:d,...l,children:typeof r=="function"?r(a):r})})}const is=ns,as={formError:"FormError-module__formError___kaUBn"},Qt=({children:e,className:r,style:t})=>{const s=T(),o={"--form-error-margin-top":`calc(${s.fonts.rhythm} * 0.17)`,color:s.colors.error,...t};return g.jsx("div",{className:`${as.formError} ${r||""}`.trim(),style:o,role:"alert","aria-live":"polite",children:e})},me={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},Kt=({children:e,label:r,name:t,error:s=!1,errorMessage:o,disabled:n=!1,required:l=!1,indent:a=!1,className:d,style:m,labelProps:y})=>{const h=T(),f=[me.formGroup,s?me.error:"",n?me.disabled:"",d].filter(Boolean).join(" "),S={"--form-group-margin-bottom":`calc(${h.fonts.rhythm} * 0.35)`,...m},C=F.Children.map(e,w=>{if(F.isValidElement(w)){const x={};if(n&&w.props.disabled===void 0&&(x.disabled=!0),s&&w.props.error===void 0&&(x.error=!0),t&&w.props.id===void 0&&(x.id=t),Object.keys(x).length>0)return F.cloneElement(w,x)}return w});return g.jsxs("div",{className:f,style:S,children:[r&&g.jsxs(Ve,{htmlFor:t,disabled:n,error:s,...y,children:[r,l&&g.jsxs("span",{className:me.required,"aria-label":"required",children:[" ","*"]})]}),g.jsx("div",{className:`${me.inputWrapper} ${a?me.indented:""}`,children:C}),s&&o&&g.jsx(Qt,{children:o})]})};function he({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:l,style:a,indent:d,labelProps:m}){const{control:y}=Zt(),{field:h,fieldState:{error:f}}=Pr({name:e,control:y,rules:o});return g.jsx(Kt,{label:r,name:e,error:!!f,errorMessage:f==null?void 0:f.message,disabled:n,required:t,className:l,style:a,indent:d,labelProps:m,children:s({value:h.value,onChange:h.onChange,onBlur:h.onBlur,name:h.name,error:!!f,indent:d})})}const Je={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},ls=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),Jt=({color:e,disabled:r=!1,error:t=!1,fontSize:s,name:o="",onChange:n,placeholder:l,placeholderOpacity:a=.3,size:d,style:m,type:y="text",value:h="",...f})=>{const S=T(),C=S.colors.error,w=t?C:e||S.colors.primary,x=ls({color:w,disabled:r,fontSize:s||S.fonts.size,placeholderOpacity:a}),L={"--placeholder-opacity":x.placeholderOpacity,"--border-width":S.border.width,"--border-radius":S.border.radius,"--input-padding-small":`calc(${S.fonts.rhythm} * 0.07) calc(${S.fonts.rhythm} * 0.17)`,"--input-padding-default":`calc(${S.fonts.rhythm} * 0.17) calc(${S.fonts.rhythm} * 0.35)`,borderColor:x.borderColor,color:x.color,fontSize:x.fontSize,opacity:x.opacity,...m},k=[Je.input,d==="small"?Je.sizeSmall:Je.sizeDefault].filter(Boolean).join(" ");return g.jsx("input",{className:k,disabled:r,name:o,onChange:n,placeholder:l,style:L,type:y,value:h,...f})};function cs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,...a}){return g.jsx(he,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,children:({value:d,onChange:m,onBlur:y,name:h,error:f})=>g.jsx(Jt,{...a,name:h,value:d||"",onChange:S=>m(S.target.value),onBlur:y,error:f})})}const Xe={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeDefault:"Textarea-module__sizeDefault___LL2Uc"},us=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),Xt=({color:e,disabled:r=!1,error:t=!1,fontSize:s,name:o="",onChange:n,placeholder:l,placeholderOpacity:a=.3,rows:d=3,size:m,style:y,value:h="",...f})=>{const S=T(),C=S.colors.error,w=t?C:e||S.colors.primary,x=us({color:w,disabled:r,placeholderOpacity:a}),L={"--placeholder-opacity":x.placeholderOpacity,"--border-width":S.border.width,"--border-radius":S.border.radius,"--textarea-padding-small":`calc(${S.fonts.rhythm} * 0.07) calc(${S.fonts.rhythm} * 0.17)`,"--textarea-padding-default":`calc(${S.fonts.rhythm} * 0.17) calc(${S.fonts.rhythm} * 0.35)`,borderColor:x.borderColor,color:x.color,fontSize:s||S.fonts.size,opacity:x.opacity,...y},k=[Xe.textarea,m==="small"?Xe.sizeSmall:Xe.sizeDefault].filter(Boolean).join(" ");return g.jsx("textarea",{className:k,disabled:r,name:o,onChange:n,placeholder:l,rows:d,style:L,value:h,...f})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,...a}){return g.jsx(he,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,children:({value:d,onChange:m,onBlur:y,name:h,error:f})=>g.jsx(Xt,{...a,name:h,value:d||"",onChange:S=>m(S.target.value),onBlur:y,error:f})})}const Ye={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},fs=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const l=`
|
|
2
|
+
(function(z,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],g):(z=typeof globalThis<"u"?globalThis:z||self,g(z.DigitalRabbitCL={},z.jsxRuntime,z.React))})(this,(function(z,g,F){"use strict";const Fe={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},br=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverColor:o,hoverTextColor:n,outline:l})=>{let a,d,m;l?(a="transparent",d=t,m=t,e&&(a=o||t,d=o||t,m=n||s)):(a=t,d=t,m=s,e&&(a=o||t,d=o||t,m=n||s));let y=1;return r?y=.3:e&&(y=o||l?1:.75),{backgroundColor:a,borderColor:d,color:m,opacity:y}},it={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},at={colors:it,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:it.secondary}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},lt=F.createContext(at),Sr=({theme:e=at,children:r})=>g.jsx(lt.Provider,{value:e,children:r}),T=()=>F.useContext(lt),Fr=({color:e,hoverColor:r,hoverTextColor:t,textColor:s,outline:o=!1,size:n,type:l="button",buttonProps:a={},children:d,disabled:m=!1,onClick:y,fontSize:h})=>{const f=T(),[S,C]=F.useState(!1);let w;s?w=s:w=e?f.buttons.textColor:f.buttons.primary.textColor;const L={...br({isActive:S,disabled:m,buttonColor:e||f.colors.primary,textColor:w,hoverColor:r,hoverTextColor:t,outline:o}),fontSize:h||f.fonts.size,"--border-width":f.border.width,"--border-radius":f.border.radius,"--button-padding-small":`calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 0.35)`,"--button-padding-default":`calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 0.35)`},k=[Fe.button,n==="small"?Fe.sizeSmall:Fe.sizeDefault,o?Fe.outline:""].filter(Boolean).join(" ");return g.jsx("button",{className:k,disabled:m,onClick:y,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),type:l,...a,style:{...L,...a.style},children:d})};var ct=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),wr=new Uint8Array(16);function kr(){if(!ct)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ct(wr)}for(var ut=[],we=0;we<256;++we)ut[we]=(we+256).toString(16).substr(1);function Vr(e,r){var t=0,s=ut;return[s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],"-",s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]],s[e[t++]]].join("")}function dt(e,r,t){var s=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||kr)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r)for(var n=0;n<16;++n)r[s+n]=o[n];return r||Vr(o)}const Be={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},xr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{boxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},ft={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},Cr=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),ke=({children:e,color:r,disabled:t=!1,error:s=!1,fontSize:o,htmlFor:n,style:l,...a})=>{const d=T(),m=d.colors.error,y=s?m:r||d.colors.primary,h=Cr({color:y,disabled:t,fontSize:o||".85em"}),f={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:h.color,fontSize:h.fontSize,opacity:h.opacity,cursor:h.cursor,...l},S=[ft.label,t?ft.disabled:""].filter(Boolean).join(" ");return g.jsx("label",{className:S,htmlFor:n,style:f,...a,children:e})},yt=({checked:e=!1,checkmarkColor:r,color:t,disabled:s=!1,error:o=!1,fontSize:n,id:l,inverted:a=!1,label:d,labelStyle:m,name:y,onChange:h,style:f,...S})=>{const C=T(),w=l||dt(),x=C.colors.error,L=o?x:t||C.colors.primary,k=xr({color:L,checkmarkColor:r,disabled:s,inverted:a}),A=M=>{s||h(M)},E={cursor:k.cursor,fontSize:n||C.fonts.size,opacity:k.opacity,...f},$={width:n||"1rem"};return g.jsxs("div",{className:Be.container,style:E,...S,children:[g.jsx("input",{id:w,checked:e,disabled:s,onChange:M=>A({target:{checked:M.target.checked,name:y,type:"checkbox"}}),name:y,style:{display:"none"},type:"checkbox"}),g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>A({target:{checked:!e,name:y,type:"checkbox"}}),style:$,className:Be.svg,children:[g.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:a&&e?k.boxColor:"transparent",strokeWidth:"25",stroke:k.boxColor}}),e&&g.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:k.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),d&&g.jsx(ke,{htmlFor:w,className:Be.label,style:m,color:k.boxColor,disabled:s,error:o,fontSize:n,children:d})]})},$r=()=>{const e=T();return F.useLayoutEffect(()=>{const r=document.documentElement;e.fonts&&(e.fonts.fontFamily&&r.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&r.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&r.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&r.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&r.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&r.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&r.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&r.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&r.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&r.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&r.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&r.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&r.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&r.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&r.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&r.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&r.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&r.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&r.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null};var _e=e=>e.type==="checkbox",ue=e=>e instanceof Date,Z=e=>e==null;const mt=e=>typeof e=="object";var U=e=>!Z(e)&&!Array.isArray(e)&&mt(e)&&!ue(e),ht=e=>U(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,zr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_t=(e,r)=>e.has(zr(r)),Er=e=>{const r=e.constructor&&e.constructor.prototype;return U(r)&&r.hasOwnProperty("isPrototypeOf")},Le=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function W(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Le&&(e instanceof Blob||s))&&(t||U(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Er(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=W(e[o]));else return e;return r}var Ve=e=>/^\w*$/.test(e),I=e=>e===void 0,Oe=e=>Array.isArray(e)?e.filter(Boolean):[],Te=e=>Oe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,r,t)=>{if(!r||!U(e))return t;const s=(Ve(r)?[r]:Te(r)).reduce((o,n)=>Z(o)?o:o[n],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",P=(e,r,t)=>{let s=-1;const o=Ve(r)?[r]:Te(r),n=o.length,l=n-1;for(;++s<n;){const a=o[s];let d=t;if(s!==l){const m=e[a];d=U(m)||Array.isArray(m)?m:isNaN(+o[s+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=d,e=e[a]}};const xe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ee={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gt=F.createContext(null);gt.displayName="HookFormContext";const Me=()=>F.useContext(gt);var pt=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const l=n;return r._proxyFormState[l]!==ee.all&&(r._proxyFormState[l]=!s||ee.all),t&&(t[l]=!0),e[l]}});return o};const Ie=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Ar(e){const r=Me(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[l,a]=F.useState(t._formState),d=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ie(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:m=>{!s&&a({...t._formState,...m})}}),[o,s,n]),F.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),F.useMemo(()=>pt(l,t,d.current,!1),[l,t])}var X=e=>typeof e=="string",He=(e,r,t,s,o)=>X(e)?(s&&r.watch.add(e),v(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),v(t,n))):(s&&(r.watchAll=!0),t),Ue=e=>Z(e)||!mt(e);function te(e,r,t=new WeakSet){if(Ue(e)||Ue(r))return e===r;if(ue(e)&&ue(r))return e.getTime()===r.getTime();const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const l=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const a=r[n];if(ue(l)&&ue(a)||U(l)&&U(a)||Array.isArray(l)&&Array.isArray(a)?!te(l,a,t):l!==a)return!1}}return!0}function Dr(e){const r=Me(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:l,compute:a}=e||{},d=F.useRef(o),m=F.useRef(a),y=F.useRef(void 0),h=F.useRef(t),f=F.useRef(s);m.current=a;const[S,C]=F.useState(()=>{const E=t._getWatch(s,d.current);return m.current?m.current(E):E}),w=F.useCallback(E=>{const $=He(s,t._names,E||t._formValues,!1,d.current);return m.current?m.current($):$},[t._formValues,t._names,s]),x=F.useCallback(E=>{if(!n){const $=He(s,t._names,E||t._formValues,!1,d.current);if(m.current){const M=m.current($);te(M,y.current)||(C(M),y.current=M)}else C($)}},[t._formValues,t._names,n,s]);Ie(()=>((h.current!==t||!te(f.current,s))&&(h.current=t,f.current=s,x()),t._subscribe({name:s,formState:{values:!0},exact:l,callback:E=>{x(E.values)}})),[t,l,s,x]),F.useEffect(()=>t._removeUnmounted());const L=h.current!==t,k=f.current,A=F.useMemo(()=>{if(n)return null;const E=!L&&!te(k,s);return L||E?w():null},[n,L,s,k,w]);return A!==null?A:S}function Pr(e){const r=Me(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:l}=e,a=_t(o._names.array,t),d=F.useMemo(()=>v(o._formValues,t,v(o._defaultValues,t,l)),[o,t,l]),m=Dr({control:o,name:t,defaultValue:d,exact:!0}),y=Ar({control:o,name:t,exact:!0}),h=F.useRef(e),f=F.useRef(void 0),S=F.useRef(o.register(t,{...e.rules,value:m,...J(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const C=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(y.errors,t)},isDirty:{enumerable:!0,get:()=>!!v(y.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!v(y.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!v(y.validatingFields,t)},error:{enumerable:!0,get:()=>v(y.errors,t)}}),[y,t]),w=F.useCallback(A=>S.current.onChange({target:{value:ht(A),name:t},type:xe.CHANGE}),[t]),x=F.useCallback(()=>S.current.onBlur({target:{value:v(o._formValues,t),name:t},type:xe.BLUR}),[t,o._formValues]),L=F.useCallback(A=>{const E=v(o._fields,t);E&&A&&(E._f.ref={focus:()=>A.focus&&A.focus(),select:()=>A.select&&A.select(),setCustomValidity:$=>A.setCustomValidity($),reportValidity:()=>A.reportValidity()})},[o._fields,t]),k=F.useMemo(()=>({name:t,value:m,...J(s)||y.disabled?{disabled:y.disabled||s}:{},onChange:w,onBlur:x,ref:L}),[t,s,y.disabled,w,x,L,m]);return F.useEffect(()=>{const A=o._options.shouldUnregister||n,E=f.current;E&&E!==t&&!a&&o.unregister(E),o.register(t,{...h.current.rules,...J(h.current.disabled)?{disabled:h.current.disabled}:{}});const $=(M,Y)=>{const le=v(o._fields,M);le&&le._f&&(le._f.mount=Y)};if($(t,!0),A){const M=W(v(o._options.defaultValues,t,h.current.defaultValue));P(o._defaultValues,t,M),I(v(o._formValues,t))&&P(o._formValues,t,M)}return!a&&o.register(t),f.current=t,()=>{(a?A&&!o._state.action:A)?o.unregister(t):$(t,!1)}},[t,o,a,n]),F.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),F.useMemo(()=>({field:k,formState:y,fieldState:C}),[k,y,C])}var je=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},ge=e=>Array.isArray(e)?e:[e],vt=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function bt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&U(o)&&n){const l=bt(o,n);U(l)&&(t[s]=l)}else e[s]&&(t[s]=n)}return t}var q=e=>U(e)&&!Object.keys(e).length,We=e=>e.type==="file",re=e=>typeof e=="function",Ce=e=>{if(!Le)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},St=e=>e.type==="select-multiple",qe=e=>e.type==="radio",Nr=e=>qe(e)||_e(e),Ge=e=>Ce(e)&&e.isConnected;function Br(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=I(e)?s++:e[r[s++]];return e}function Lr(e){for(const r in e)if(e.hasOwnProperty(r)&&!I(e[r]))return!1;return!0}function j(e,r){const t=Array.isArray(r)?r:Ve(r)?[r]:Te(r),s=t.length===1?e:Br(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(U(s)&&q(s)||Array.isArray(s)&&Lr(s))&&j(e,t.slice(0,-1)),e}var Or=e=>{for(const r in e)if(re(e[r]))return!0;return!1};function Ft(e){return Array.isArray(e)||U(e)&&!Or(e)}function Ze(e,r={}){for(const t in e)Ft(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Ze(e[t],r[t])):I(e[t])||(r[t]=!0);return r}function de(e,r,t){t||(t=Ze(r));for(const s in e)Ft(e[s])?I(r)||Ue(t[s])?t[s]=Ze(e[s],Array.isArray(e[s])?[]:{}):de(e[s],Z(r)?{}:r[s],t[s]):t[s]=!te(e[s],r[s]);return t}const wt={value:!1,isValid:!1},kt={value:!0,isValid:!0};var Vt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?kt:{value:e[0].value,isValid:!0}:kt:wt}return wt},xt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>I(e)?e:r?e===""?NaN:e&&+e:t&&X(e)?new Date(e):s?s(e):e;const Ct={isValid:!1,value:null};var $t=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Ct):Ct;function zt(e){const r=e.ref;return We(r)?r.files:qe(r)?$t(e.refs).value:St(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?Vt(e.refs).value:xt(I(r.value)?e.ref.value:r.value,e)}var Tr=(e,r,t,s)=>{const o={};for(const n of e){const l=v(r,n);l&&P(o,n,l._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},$e=e=>e instanceof RegExp,pe=e=>I(e)?e:$e(e)?e.source:U(e)?$e(e.value)?e.value.source:e.value:e,Et=e=>({isOnSubmit:!e||e===ee.onSubmit,isOnBlur:e===ee.onBlur,isOnChange:e===ee.onChange,isOnAll:e===ee.all,isOnTouch:e===ee.onTouched});const At="AsyncFunction";var Mr=e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===At||U(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===At)),Ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Dt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ve=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=v(e,o);if(n){const{_f:l,...a}=n;if(l){if(l.refs&&l.refs[0]&&r(l.refs[0],o)&&!s)return!0;if(l.ref&&r(l.ref,l.name)&&!s)return!0;if(ve(a,r))break}else if(U(a)&&ve(a,r))break}}};function Pt(e,r,t){const s=v(e,t);if(s||Ve(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),l=v(r,n),a=v(e,n);if(l&&!Array.isArray(l)&&t!==n)return{name:t};if(a&&a.type)return{name:n,error:a};if(a&&a.root&&a.root.type)return{name:`${n}.root`,error:a.root};o.pop()}return{name:t}}var Hr=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return q(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(l=>r[l]===(!s||ee.all))},Ur=(e,r,t)=>!e||!r||e===r||ge(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),jr=(e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,Wr=(e,r)=>!Oe(v(e,r)).length&&j(e,r),qr=(e,r,t)=>{const s=ge(v(e,t));return P(s,"root",r[t]),P(e,t,s),e};function Nt(e,r,t="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||J(e)&&!e)return{type:t,message:X(e)?e:"",ref:r}}var fe=e=>U(e)&&!$e(e)?e:{value:e,message:""},Bt=async(e,r,t,s,o,n)=>{const{ref:l,refs:a,required:d,maxLength:m,minLength:y,min:h,max:f,pattern:S,validate:C,name:w,valueAsNumber:x,mount:L}=e._f,k=v(t,w);if(!L||r.has(w))return{};const A=a?a[0]:l,E=D=>{o&&A.reportValidity&&(A.setCustomValidity(J(D)?"":D||""),A.reportValidity())},$={},M=qe(l),Y=_e(l),le=M||Y,Q=(x||We(l))&&I(l.value)&&I(k)||Ce(l)&&l.value===""||k===""||Array.isArray(k)&&!k.length,oe=je.bind(null,w,s,$),ne=(D,B,H,G=ae.maxLength,K=ae.minLength)=>{const ie=D?B:H;$[w]={type:D?G:K,message:ie,ref:l,...oe(D?G:K,ie)}};if(n?!Array.isArray(k)||!k.length:d&&(!le&&(Q||Z(k))||J(k)&&!k||Y&&!Vt(a).isValid||M&&!$t(a).isValid)){const{value:D,message:B}=X(d)?{value:!!d,message:d}:fe(d);if(D&&($[w]={type:ae.required,message:B,ref:A,...oe(ae.required,B)},!s))return E(B),$}if(!Q&&(!Z(h)||!Z(f))){let D,B;const H=fe(f),G=fe(h);if(!Z(k)&&!isNaN(k)){const K=l.valueAsNumber||k&&+k;Z(H.value)||(D=K>H.value),Z(G.value)||(B=K<G.value)}else{const K=l.valueAsDate||new Date(k),ie=Pe=>new Date(new Date().toDateString()+" "+Pe),Se=l.type=="time",he=l.type=="week";X(H.value)&&k&&(D=Se?ie(k)>ie(H.value):he?k>H.value:K>new Date(H.value)),X(G.value)&&k&&(B=Se?ie(k)<ie(G.value):he?k<G.value:K<new Date(G.value))}if((D||B)&&(ne(!!D,H.message,G.message,ae.max,ae.min),!s))return E($[w].message),$}if((m||y)&&!Q&&(X(k)||n&&Array.isArray(k))){const D=fe(m),B=fe(y),H=!Z(D.value)&&k.length>+D.value,G=!Z(B.value)&&k.length<+B.value;if((H||G)&&(ne(H,D.message,B.message),!s))return E($[w].message),$}if(S&&!Q&&X(k)){const{value:D,message:B}=fe(S);if($e(D)&&!k.match(D)&&($[w]={type:ae.pattern,message:B,ref:l,...oe(ae.pattern,B)},!s))return E(B),$}if(C){if(re(C)){const D=await C(k,t),B=Nt(D,A);if(B&&($[w]={...B,...oe(ae.validate,B.message)},!s))return E(B.message),$}else if(U(C)){let D={};for(const B in C){if(!q(D)&&!s)break;const H=Nt(await C[B](k,t),A,B);H&&(D={...H,...oe(B,H.message)},E(H.message),s&&($[w]=D))}if(!q(D)&&($[w]={ref:A,...D},!s))return $}}return E(!0),$};const Gr={mode:ee.onSubmit,reValidateMode:ee.onChange,shouldFocusError:!0};function Zr(e={}){let r={...Gr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:re(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=U(r.defaultValues)||U(r.values)?W(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:W(o),l={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,m=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...y};const f={array:vt(),state:vt()},S=r.criteriaMode===ee.all,C=i=>c=>{clearTimeout(m),m=setTimeout(i,c)},w=async i=>{if(!r.disabled&&(y.isValid||h.isValid||i)){const c=r.resolver?q((await Y()).errors):await Q(s,!0);c!==t.isValid&&f.state.next({isValid:c})}},x=(i,c)=>{!r.disabled&&(y.isValidating||y.validatingFields||h.isValidating||h.validatingFields)&&((i||Array.from(a.mount)).forEach(u=>{u&&(c?P(t.validatingFields,u,c):j(t.validatingFields,u))}),f.state.next({validatingFields:t.validatingFields,isValidating:!q(t.validatingFields)}))},L=(i,c=[],u,b,p=!0,_=!0)=>{if(b&&u&&!r.disabled){if(l.action=!0,_&&Array.isArray(v(s,i))){const V=u(v(s,i),b.argA,b.argB);p&&P(s,i,V)}if(_&&Array.isArray(v(t.errors,i))){const V=u(v(t.errors,i),b.argA,b.argB);p&&P(t.errors,i,V),Wr(t.errors,i)}if((y.touchedFields||h.touchedFields)&&_&&Array.isArray(v(t.touchedFields,i))){const V=u(v(t.touchedFields,i),b.argA,b.argB);p&&P(t.touchedFields,i,V)}(y.dirtyFields||h.dirtyFields)&&(t.dirtyFields=de(o,n)),f.state.next({name:i,isDirty:ne(i,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else P(n,i,c)},k=(i,c)=>{P(t.errors,i,c),f.state.next({errors:t.errors})},A=i=>{t.errors=i,f.state.next({errors:t.errors,isValid:!1})},E=(i,c,u,b)=>{const p=v(s,i);if(p){const _=v(n,i,I(u)?v(o,i):u);I(_)||b&&b.defaultChecked||c?P(n,i,c?_:zt(p._f)):H(i,_),l.mount&&w()}},$=(i,c,u,b,p)=>{let _=!1,V=!1;const N={name:i};if(!r.disabled){if(!u||b){(y.isDirty||h.isDirty)&&(V=t.isDirty,t.isDirty=N.isDirty=ne(),_=V!==N.isDirty);const O=te(v(o,i),c);V=!!v(t.dirtyFields,i),O?j(t.dirtyFields,i):P(t.dirtyFields,i,!0),N.dirtyFields=t.dirtyFields,_=_||(y.dirtyFields||h.dirtyFields)&&V!==!O}if(u){const O=v(t.touchedFields,i);O||(P(t.touchedFields,i,u),N.touchedFields=t.touchedFields,_=_||(y.touchedFields||h.touchedFields)&&O!==u)}_&&p&&f.state.next(N)}return _?N:{}},M=(i,c,u,b)=>{const p=v(t.errors,i),_=(y.isValid||h.isValid)&&J(c)&&t.isValid!==c;if(r.delayError&&u?(d=C(()=>k(i,u)),d(r.delayError)):(clearTimeout(m),d=null,u?P(t.errors,i,u):j(t.errors,i)),(u?!te(p,u):p)||!q(b)||_){const V={...b,..._&&J(c)?{isValid:c}:{},errors:t.errors,name:i};t={...t,...V},f.state.next(V)}},Y=async i=>{x(i,!0);const c=await r.resolver(n,r.context,Tr(i||a.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return x(i),c},le=async i=>{const{errors:c}=await Y(i);if(i)for(const u of i){const b=v(c,u);b?P(t.errors,u,b):j(t.errors,u)}else t.errors=c;return c},Q=async(i,c,u={valid:!0})=>{for(const b in i){const p=i[b];if(p){const{_f:_,...V}=p;if(_){const N=a.array.has(_.name),O=p._f&&Mr(p._f);O&&y.validatingFields&&x([_.name],!0);const R=await Bt(p,a.disabled,n,S,r.shouldUseNativeValidation&&!c,N);if(O&&y.validatingFields&&x([_.name]),R[_.name]&&(u.valid=!1,c))break;!c&&(v(R,_.name)?N?qr(t.errors,R,_.name):P(t.errors,_.name,R[_.name]):j(t.errors,_.name))}!q(V)&&await Q(V,c,u)}}return u.valid},oe=()=>{for(const i of a.unMount){const c=v(s,i);c&&(c._f.refs?c._f.refs.every(u=>!Ge(u)):!Ge(c._f.ref))&&tt(i)}a.unMount=new Set},ne=(i,c)=>!r.disabled&&(i&&c&&P(n,i,c),!te(Pe(),o)),D=(i,c,u)=>He(i,a,{...l.mount?n:I(c)?o:X(i)?{[i]:c}:c},u,c),B=i=>Oe(v(l.mount?n:o,i,r.shouldUnregister?v(o,i,[]):[])),H=(i,c,u={})=>{const b=v(s,i);let p=c;if(b){const _=b._f;_&&(!_.disabled&&P(n,i,xt(c,_)),p=Ce(_.ref)&&Z(c)?"":c,St(_.ref)?[..._.ref.options].forEach(V=>V.selected=p.includes(V.value)):_.refs?_e(_.ref)?_.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(p)?V.checked=!!p.find(N=>N===V.value):V.checked=p===V.value||!!p)}):_.refs.forEach(V=>V.checked=V.value===p):We(_.ref)?_.ref.value="":(_.ref.value=p,_.ref.type||f.state.next({name:i,values:W(n)})))}(u.shouldDirty||u.shouldTouch)&&$(i,p,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(i)},G=(i,c,u)=>{for(const b in c){if(!c.hasOwnProperty(b))return;const p=c[b],_=i+"."+b,V=v(s,_);(a.array.has(i)||U(p)||V&&!V._f)&&!ue(p)?G(_,p,u):H(_,p,u)}},K=(i,c,u={})=>{const b=v(s,i),p=a.array.has(i),_=W(c);P(n,i,_),p?(f.array.next({name:i,values:W(n)}),(y.isDirty||y.dirtyFields||h.isDirty||h.dirtyFields)&&u.shouldDirty&&f.state.next({name:i,dirtyFields:de(o,n),isDirty:ne(i,_)})):b&&!b._f&&!Z(_)?G(i,_,u):H(i,_,u),Dt(i,a)&&f.state.next({...t,name:i}),f.state.next({name:l.mount?i:void 0,values:W(n)})},ie=async i=>{l.mount=!0;const c=i.target;let u=c.name,b=!0;const p=v(s,u),_=O=>{b=Number.isNaN(O)||ue(O)&&isNaN(O.getTime())||te(O,v(n,u,O))},V=Et(r.mode),N=Et(r.reValidateMode);if(p){let O,R;const Ne=c.type?zt(p._f):ht(i),ce=i.type===xe.BLUR||i.type===xe.FOCUS_OUT,Ts=!Ir(p._f)&&!r.resolver&&!v(t.errors,u)&&!p._f.deps||jr(ce,v(t.touchedFields,u),t.isSubmitted,N,V),ot=Dt(u,a,ce);P(n,u,Ne),ce?(!c||!c.readOnly)&&(p._f.onBlur&&p._f.onBlur(i),d&&d(0)):p._f.onChange&&p._f.onChange(i);const nt=$(u,Ne,ce),Ms=!q(nt)||ot;if(!ce&&f.state.next({name:u,type:i.type,values:W(n)}),Ts)return(y.isValid||h.isValid)&&(r.mode==="onBlur"?ce&&w():ce||w()),Ms&&f.state.next({name:u,...ot?{}:nt});if(!ce&&ot&&f.state.next({...t}),r.resolver){const{errors:pr}=await Y([u]);if(_(Ne),b){const Is=Pt(t.errors,s,u),vr=Pt(pr,s,Is.name||u);O=vr.error,u=vr.name,R=q(pr)}}else x([u],!0),O=(await Bt(p,a.disabled,n,S,r.shouldUseNativeValidation))[u],x([u]),_(Ne),b&&(O?R=!1:(y.isValid||h.isValid)&&(R=await Q(s,!0)));b&&(p._f.deps&&(!Array.isArray(p._f.deps)||p._f.deps.length>0)&&he(p._f.deps),M(u,R,O,nt))}},Se=(i,c)=>{if(v(t.errors,c)&&i.focus)return i.focus(),1},he=async(i,c={})=>{let u,b;const p=ge(i);if(r.resolver){const _=await le(I(i)?i:p);u=q(_),b=i?!p.some(V=>v(_,V)):u}else i?(b=(await Promise.all(p.map(async _=>{const V=v(s,_);return await Q(V&&V._f?{[_]:V}:V)}))).every(Boolean),!(!b&&!t.isValid)&&w()):b=u=await Q(s);return f.state.next({...!X(i)||(y.isValid||h.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!b&&ve(s,Se,i?p:a.mount),b},Pe=(i,c)=>{let u={...l.mount?n:o};return c&&(u=bt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),I(i)?u:X(i)?v(u,i):i.map(b=>v(u,b))},ur=(i,c)=>({invalid:!!v((c||t).errors,i),isDirty:!!v((c||t).dirtyFields,i),error:v((c||t).errors,i),isValidating:!!v(t.validatingFields,i),isTouched:!!v((c||t).touchedFields,i)}),As=i=>{i&&ge(i).forEach(c=>j(t.errors,c)),f.state.next({errors:i?t.errors:{}})},dr=(i,c,u)=>{const b=(v(s,i,{_f:{}})._f||{}).ref,p=v(t.errors,i)||{},{ref:_,message:V,type:N,...O}=p;P(t.errors,i,{...O,...c,ref:b}),f.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&b&&b.focus&&b.focus()},Ds=(i,c)=>re(i)?f.state.subscribe({next:u=>"values"in u&&i(D(void 0,c),u)}):D(i,c,!0),fr=i=>f.state.subscribe({next:c=>{Ur(i.name,c.name,i.exact)&&Hr(c,i.formState||y,Os,i.reRenderRoot)&&i.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Ps=i=>(l.mount=!0,h={...h,...i.formState},fr({...i,formState:h})),tt=(i,c={})=>{for(const u of i?ge(i):a.mount)a.mount.delete(u),a.array.delete(u),c.keepValue||(j(s,u),j(n,u)),!c.keepError&&j(t.errors,u),!c.keepDirty&&j(t.dirtyFields,u),!c.keepTouched&&j(t.touchedFields,u),!c.keepIsValidating&&j(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&j(o,u);f.state.next({values:W(n)}),f.state.next({...t,...c.keepDirty?{isDirty:ne()}:{}}),!c.keepIsValid&&w()},yr=({disabled:i,name:c})=>{(J(i)&&l.mount||i||a.disabled.has(c))&&(i?a.disabled.add(c):a.disabled.delete(c))},rt=(i,c={})=>{let u=v(s,i);const b=J(c.disabled)||J(r.disabled);return P(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...c}}),a.mount.add(i),u?yr({disabled:J(c.disabled)?c.disabled:r.disabled,name:i}):E(i,!0,c.value),{...b?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:pe(c.min),max:pe(c.max),minLength:pe(c.minLength),maxLength:pe(c.maxLength),pattern:pe(c.pattern)}:{},name:i,onChange:ie,onBlur:ie,ref:p=>{if(p){rt(i,c),u=v(s,i);const _=I(p.value)&&p.querySelectorAll&&p.querySelectorAll("input,select,textarea")[0]||p,V=Nr(_),N=u._f.refs||[];if(V?N.find(O=>O===_):_===u._f.ref)return;P(s,i,{_f:{...u._f,...V?{refs:[...N.filter(Ge),_,...Array.isArray(v(o,i))?[{}]:[]],ref:{type:_.type,name:i}}:{ref:_}}}),E(i,!1,void 0,_)}else u=v(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(_t(a.array,i)&&l.action)&&a.unMount.add(i)}}},st=()=>r.shouldFocusError&&ve(s,Se,a.mount),Ns=i=>{J(i)&&(f.state.next({disabled:i}),ve(s,(c,u)=>{const b=v(s,u);b&&(c.disabled=b._f.disabled||i,Array.isArray(b._f.refs)&&b._f.refs.forEach(p=>{p.disabled=b._f.disabled||i}))},0,!1))},mr=(i,c)=>async u=>{let b;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let p=W(n);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:_,values:V}=await Y();t.errors=_,p=W(V)}else await Q(s);if(a.disabled.size)for(const _ of a.disabled)j(p,_);if(j(t.errors,"root"),q(t.errors)){f.state.next({errors:{}});try{await i(p,u)}catch(_){b=_}}else c&&await c({...t.errors},u),st(),setTimeout(st);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:q(t.errors)&&!b,submitCount:t.submitCount+1,errors:t.errors}),b)throw b},Bs=(i,c={})=>{v(s,i)&&(I(c.defaultValue)?K(i,W(v(o,i))):(K(i,c.defaultValue),P(o,i,W(c.defaultValue))),c.keepTouched||j(t.touchedFields,i),c.keepDirty||(j(t.dirtyFields,i),t.isDirty=c.defaultValue?ne(i,W(v(o,i))):ne()),c.keepError||(j(t.errors,i),y.isValid&&w()),f.state.next({...t}))},hr=(i,c={})=>{const u=i?W(i):o,b=W(u),p=q(i),_=p?o:b;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const V=new Set([...a.mount,...Object.keys(de(o,n))]);for(const N of Array.from(V))v(t.dirtyFields,N)?P(_,N,v(n,N)):K(N,v(_,N))}else{if(Le&&I(i))for(const V of a.mount){const N=v(s,V);if(N&&N._f){const O=Array.isArray(N._f.refs)?N._f.refs[0]:N._f.ref;if(Ce(O)){const R=O.closest("form");if(R){R.reset();break}}}}if(c.keepFieldsRef)for(const V of a.mount)K(V,v(_,V));else s={}}n=r.shouldUnregister?c.keepDefaultValues?W(o):{}:W(_),f.array.next({values:{..._}}),f.state.next({values:{..._}})}a={mount:c.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!y.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!q(_),l.watch=!!r.shouldUnregister,f.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:p?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!te(i,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&n?de(o,n):t.dirtyFields:c.keepDefaultValues&&i?de(o,i):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},_r=(i,c)=>hr(re(i)?i(n):i,c),Ls=(i,c={})=>{const u=v(s,i),b=u&&u._f;if(b){const p=b.refs?b.refs[0]:b.ref;p.focus&&(p.focus(),c.shouldSelect&&re(p.select)&&p.select())}},Os=i=>{t={...t,...i}},gr={control:{register:rt,unregister:tt,getFieldState:ur,handleSubmit:mr,setError:dr,_subscribe:fr,_runSchema:Y,_focusError:st,_getWatch:D,_getDirty:ne,_setValid:w,_setFieldArray:L,_setDisabledField:yr,_setErrors:A,_getFieldArray:B,_reset:hr,_resetDefaultValues:()=>re(r.defaultValues)&&r.defaultValues().then(i=>{_r(i,r.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Ns,_subjects:f,_proxyFormState:y,get _fields(){return s},get _formValues(){return n},get _state(){return l},set _state(i){l=i},get _defaultValues(){return o},get _names(){return a},set _names(i){a=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Ps,trigger:he,register:rt,handleSubmit:mr,watch:Ds,setValue:K,getValues:Pe,reset:_r,resetField:Bs,clearErrors:As,unregister:tt,setError:dr,setFocus:Ls,getFieldState:ur};return{...gr,formControl:gr}}function Qr(e={}){const r=F.useRef(void 0),t=F.useRef(void 0),[s,o]=F.useState({isDirty:!1,isValidating:!1,isLoading:re(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:re(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!re(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...a}=Zr(e);r.current={...a,formState:s}}const n=r.current.control;return n._options=e,Ie(()=>{const l=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),n._formState.isReady=!0,l},[n]),F.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),F.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),F.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),F.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),F.useEffect(()=>{if(n._proxyFormState.isDirty){const l=n._getDirty();l!==s.isDirty&&n._subjects.state.next({isDirty:l})}},[n,s.isDirty]),F.useEffect(()=>{e.values&&!te(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(l=>({...l}))):n._resetDefaultValues()},[n,e.values]),F.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=pt(s,n),r.current}const Lt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=v(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Qe=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Lt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Lt(o,t,e))}},Ot=(e,r)=>{r.shouldUseNativeValidation&&Qe(e,r);const t={};for(const s in e){const o=v(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Kr(r.names||Object.keys(e),s)){const l=Object.assign({},v(t,s));P(l,"root",n),P(t,s,l)}else P(t,s,n)}return t},Kr=(e,r)=>{const t=Tt(r);return e.some(s=>Tt(s).match(`^${t}\\.\\d+`))};function Tt(e){return e.replace(/\]|\[/g,"")}function Mt(e,r,t){function s(a,d){var m;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(m=a._zod).traits??(m.traits=new Set),a._zod.traits.add(e),r(a,d);for(const y in l.prototype)y in a||Object.defineProperty(a,y,{value:l.prototype[y].bind(a)});a._zod.constr=l,a._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function l(a){var d;const m=t!=null&&t.Parent?new n:this;s(m,a),(d=m._zod).deferred??(d.deferred=[]);for(const y of m._zod.deferred)y();return m}return Object.defineProperty(l,"init",{value:s}),Object.defineProperty(l,Symbol.hasInstance,{value:a=>{var d,m;return t!=null&&t.Parent&&a instanceof t.Parent?!0:(m=(d=a==null?void 0:a._zod)==null?void 0:d.traits)==null?void 0:m.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Jr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Xr={};function It(e){return Xr}function Yr(e,r){return typeof r=="bigint"?r.toString():r}const Ht="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ze(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ut(e,r,t){var o,n,l,a,d,m;const s={...e,path:e.path??[]};if(!e.message){const y=ze((l=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:l.call(n,e))??ze((a=r==null?void 0:r.error)==null?void 0:a.call(r,e))??ze((d=t.customError)==null?void 0:d.call(t,e))??ze((m=t.localeError)==null?void 0:m.call(t,e))??"Invalid input";s.message=y}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const jt=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Yr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rr=Mt("$ZodError",jt),Wt=Mt("$ZodError",jt,{Parent:Error}),es=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},l=r._zod.run({value:t,issues:[]},n);if(l instanceof Promise)throw new Jr;if(l.issues.length){const a=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Ut(d,n,It())));throw Ht(a,o==null?void 0:o.callee),a}return l.value})(Wt),ts=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let l=r._zod.run({value:t,issues:[]},n);if(l instanceof Promise&&(l=await l),l.issues.length){const a=new((o==null?void 0:o.Err)??e)(l.issues.map(d=>Ut(d,n,It())));throw Ht(a,o==null?void 0:o.callee),a}return l.value})(Wt);function qt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function rs(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,l=s.path.join(".");if(!t[l])if("unionErrors"in s){var a=s.unionErrors[0].errors[0];t[l]={message:a.message,type:a.code}}else t[l]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(y){return y.errors.forEach(function(h){return e.push(h)})}),r){var d=t[l].types,m=d&&d[s.code];t[l]=je(l,r,t,o,m?[].concat(m,s.message):s.message)}e.shift()}return t}function ss(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,l=s.path.join(".");if(!t[l])if(s.code==="invalid_union"&&s.errors.length>0){var a=s.errors[0][0];t[l]={message:a.message,type:a.code}}else t[l]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(y){return y.forEach(function(h){return e.push(h)})}),r){var d=t[l].types,m=d&&d[s.code];t[l]=je(l,r,t,o,m?[].concat(m,s.message):s.message)}e.shift()}return t}function os(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(qt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(l){return n.shouldUseNativeValidation&&Qe({},n),{errors:{},values:t.raw?Object.assign({},s):l}})},function(l){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(l))return{values:{},errors:Ot(rs(l.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw l}))}catch(l){return Promise.reject(l)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(qt(function(){return Promise.resolve((t.mode==="sync"?es:ts)(e,s,r)).then(function(l){return n.shouldUseNativeValidation&&Qe({},n),{errors:{},values:t.raw?Object.assign({},s):l}})},function(l){if((function(a){return a instanceof Rr})(l))return{values:{},errors:Ot(ss(l.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}const Gt=F.createContext(null);function Zt(){const e=F.useContext(Gt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function ns({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",...l}){const a=Qr({resolver:t?os(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),d=a.handleSubmit(e);return g.jsx(Gt.Provider,{value:a,children:g.jsx("form",{onSubmit:d,...l,children:typeof r=="function"?r(a):r})})}const is=ns,as={formError:"FormError-module__formError___kaUBn"},Qt=({children:e,className:r,style:t})=>{const s=T(),o={"--form-error-margin-top":`calc(${s.fonts.rhythm} * 0.17)`,color:s.colors.error,...t};return g.jsx("div",{className:`${as.formError} ${r||""}`.trim(),style:o,role:"alert","aria-live":"polite",children:e})},ye={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},Kt=({children:e,label:r,name:t,error:s=!1,errorMessage:o,disabled:n=!1,required:l=!1,indent:a=!1,className:d,style:m,labelProps:y})=>{const h=T(),f=[ye.formGroup,s?ye.error:"",n?ye.disabled:"",d].filter(Boolean).join(" "),S={"--form-group-margin-bottom":`calc(${h.fonts.rhythm} * 0.35)`,...m},C=F.Children.map(e,w=>{if(F.isValidElement(w)){const x={};if(n&&w.props.disabled===void 0&&(x.disabled=!0),s&&w.props.error===void 0&&(x.error=!0),t&&w.props.id===void 0&&(x.id=t),Object.keys(x).length>0)return F.cloneElement(w,x)}return w});return g.jsxs("div",{className:f,style:S,children:[r&&g.jsxs(ke,{htmlFor:t,disabled:n,error:s,...y,children:[r,l&&g.jsxs("span",{className:ye.required,"aria-label":"required",children:[" ","*"]})]}),g.jsx("div",{className:`${ye.inputWrapper} ${a?ye.indented:""}`,children:C}),s&&o&&g.jsx(Qt,{children:o})]})};function me({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:l,style:a,indent:d,labelProps:m}){const{control:y}=Zt(),{field:h,fieldState:{error:f}}=Pr({name:e,control:y,rules:o});return g.jsx(Kt,{label:r,name:e,error:!!f,errorMessage:f==null?void 0:f.message,disabled:n,required:t,className:l,style:a,indent:d,labelProps:m,children:s({value:h.value,onChange:h.onChange,onBlur:h.onBlur,name:h.name,error:!!f,indent:d})})}const Ke={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},ls=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),Jt=({color:e,disabled:r=!1,error:t=!1,fontSize:s,name:o="",onChange:n,placeholder:l,placeholderOpacity:a=.3,size:d,style:m,type:y="text",value:h="",...f})=>{const S=T(),C=S.colors.error,w=t?C:e||S.colors.primary,x=ls({color:w,disabled:r,fontSize:s||S.fonts.size,placeholderOpacity:a}),L={"--placeholder-opacity":x.placeholderOpacity,"--border-width":S.border.width,"--border-radius":S.border.radius,"--input-padding-small":`calc(${S.fonts.rhythm} * 0.07) calc(${S.fonts.rhythm} * 0.17)`,"--input-padding-default":`calc(${S.fonts.rhythm} * 0.17) calc(${S.fonts.rhythm} * 0.35)`,borderColor:x.borderColor,color:x.color,fontSize:x.fontSize,opacity:x.opacity,...m},k=[Ke.input,d==="small"?Ke.sizeSmall:Ke.sizeDefault].filter(Boolean).join(" ");return g.jsx("input",{className:k,disabled:r,name:o,onChange:n,placeholder:l,style:L,type:y,value:h,...f})};function cs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,...a}){return g.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,children:({value:d,onChange:m,onBlur:y,name:h,error:f})=>g.jsx(Jt,{...a,name:h,value:d||"",onChange:S=>m(S.target.value),onBlur:y,error:f})})}const Je={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeDefault:"Textarea-module__sizeDefault___LL2Uc"},us=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),Xt=({color:e,disabled:r=!1,error:t=!1,fontSize:s,name:o="",onChange:n,placeholder:l,placeholderOpacity:a=.3,rows:d=3,size:m,style:y,value:h="",...f})=>{const S=T(),C=S.colors.error,w=t?C:e||S.colors.primary,x=us({color:w,disabled:r,placeholderOpacity:a}),L={"--placeholder-opacity":x.placeholderOpacity,"--border-width":S.border.width,"--border-radius":S.border.radius,"--textarea-padding-small":`calc(${S.fonts.rhythm} * 0.07) calc(${S.fonts.rhythm} * 0.17)`,"--textarea-padding-default":`calc(${S.fonts.rhythm} * 0.17) calc(${S.fonts.rhythm} * 0.35)`,borderColor:x.borderColor,color:x.color,fontSize:s||S.fonts.size,opacity:x.opacity,...y},k=[Je.textarea,m==="small"?Je.sizeSmall:Je.sizeDefault].filter(Boolean).join(" ");return g.jsx("textarea",{className:k,disabled:r,name:o,onChange:n,placeholder:l,rows:d,style:L,value:h,...f})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,...a}){return g.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,children:({value:d,onChange:m,onBlur:y,name:h,error:f})=>g.jsx(Xt,{...a,name:h,value:d||"",onChange:S=>m(S.target.value),onBlur:y,error:f})})}const Xe={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},fs=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const l=`
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
4
4
|
<path
|
|
5
5
|
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
fill="transparent"
|
|
15
15
|
/>
|
|
16
16
|
</svg>
|
|
17
|
-
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(l)}")`})(e)}),Yt=({children:e,color:r,disabled:t=!1,error:s=!1,fontSize:o,name:n="",onChange:l,placeholder:a="",size:d,style:m,value:y="",...h})=>{const f=T(),S=f.colors.error,C=s?S:r||f.colors.primary,w=fs({color:C,disabled:t}),x={"--border-width":f.border.width,"--border-radius":f.border.radius,"--select-padding-small":`calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 1.2) calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 0.17)`,"--select-padding-default":`calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 1.4) calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 0.35)`,backgroundImage:w.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:w.borderColor,color:w.color,cursor:w.cursor,fontSize:o||f.fonts.size,opacity:w.opacity,...m},L=[
|
|
17
|
+
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(l)}")`})(e)}),Yt=({children:e,color:r,disabled:t=!1,error:s=!1,fontSize:o,name:n="",onChange:l,placeholder:a="",size:d,style:m,value:y="",...h})=>{const f=T(),S=f.colors.error,C=s?S:r||f.colors.primary,w=fs({color:C,disabled:t}),x={"--border-width":f.border.width,"--border-radius":f.border.radius,"--select-padding-small":`calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 1.2) calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 0.17)`,"--select-padding-default":`calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 1.4) calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 0.35)`,backgroundImage:w.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:w.borderColor,color:w.color,cursor:w.cursor,fontSize:o||f.fonts.size,opacity:w.opacity,...m},L=[Xe.select,d==="small"?Xe.sizeSmall:Xe.sizeDefault].filter(Boolean).join(" ");return g.jsxs("select",{className:L,disabled:t,name:n,onChange:l,style:x,value:y,...h,children:[a!==""&&g.jsx("option",{disabled:!0,value:"",children:a}),e]})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,children:a,...d}){return g.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,children:({value:m,onChange:y,onBlur:h,name:f,error:S})=>g.jsx(Yt,{...d,name:f,value:m||"",onChange:C=>y(C.target.value),onBlur:h,error:S,children:a})})}function ms({name:e,required:r,rules:t,disabled:s,className:o,style:n,...l}){return g.jsx(me,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:a,onChange:d,name:m,error:y})=>g.jsx(yt,{...l,name:m,checked:!!a,onChange:h=>d(h.target.checked),error:y})})}const Ye={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},hs=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),Rt=({checked:e=!1,color:r,disabled:t=!1,error:s=!1,fontSize:o,id:n,label:l,labelStyle:a,name:d,onChange:m,style:y,...h})=>{const f=T(),S=n||dt(),C=f.colors.error,w=s?C:r||f.colors.primary,x=hs({color:w,disabled:t}),L=M=>{t||m(M)},k={cursor:x.cursor,fontSize:o||f.fonts.size,opacity:x.opacity,...y},A={width:o||f.fonts.size},E={fill:"transparent",strokeWidth:"12.5",stroke:x.radioColor},$={fill:x.radioColor};return g.jsxs("div",{className:Ye.container,style:k,...h,children:[g.jsx("input",{id:S,checked:e,disabled:t,name:d,onChange:M=>L({target:{checked:M.target.checked,name:d,type:"radio"}}),style:{display:"none"},type:"radio"}),g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>L({target:{checked:!e,name:d,type:"radio"}}),className:Ye.svg,style:A,children:[g.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:E}),e&&g.jsx("circle",{cx:"50",cy:"50",r:"25",style:$})]}),l&&g.jsx(ke,{htmlFor:S,className:Ye.label,style:a,color:x.radioColor,disabled:t,error:s,fontSize:o,children:l})]})};function _s({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:l,value:a,...d}){return g.jsx(me,{name:e,required:t,rules:s,disabled:o,className:n,style:l,children:({value:m,onChange:y,name:h,error:f})=>g.jsx(Rt,{...d,name:h,checked:m===a,onChange:()=>y(a),error:f,label:r})})}const be={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},gs=({compact:e,color:r,visible:t,borderRadius:s})=>{const o=T();return F.useMemo(()=>{const n=e?{right:".5em"}:{};return{"--hamburger-border-radius":s||o.borderRadius||"10px",color:r||"inherit",display:t?"flex":"none",...n}},[r,t,e,s,o.borderRadius])},er=({visible:e,compact:r,color:t,hamburgerRef:s,open:o=!1,setOpen:n,buttonProps:l,borderRadius:a})=>{const d=gs({compact:r,color:t,visible:e,borderRadius:a}),m=[be.hamburger,o?be.open:""].filter(Boolean).join(" ");return g.jsxs("button",{ref:s,className:m,onClick:()=>n(!o),style:d,"aria-label":"Toggle menu","aria-expanded":o,...l,children:[g.jsx("div",{className:be.line}),g.jsx("div",{className:be.line}),g.jsx("div",{className:be.line})]})},tr={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},ps=({isSmallScreen:e=!1,maxWidth:r,paddingSm:t,padding:s,fontSize:o}={})=>{const n=T();return{"--header-max-width":r||n.layout.maxWidth,"--header-padding":e?t||n.layout.wrapperPaddingSm:s||n.layout.wrapperPadding,"--header-font-size":e?"0.75rem":o||n.fonts.size}},se=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const l=window.matchMedia(e);return l.addEventListener("change",n),()=>l.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return F.useSyncExternalStore(t,s,o)},rr=({children:e,breakPointSm:r,maxWidth:t,paddingSm:s,padding:o,fontSize:n,style:l={},headerProps:a={},headerRef:d})=>{const m=T(),h=(r||m.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),f=h?parseInt(h[1],10)-1:474,S=h?h[2]:"px",C=se(`(max-width: ${f}${S})`),w=ps({isSmallScreen:C,maxWidth:t,paddingSm:s,padding:o,fontSize:n});return g.jsx("header",{ref:d,className:tr.header,...a,children:g.jsx("div",{className:tr.container,style:{...w,...l},children:e})})},Ee={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},vs=({isMobile:e,isCompact:r,mobileBackground:t,mobileColor:s,mobileActiveBackground:o,mobileActiveColor:n,mobileButtonHoverColor:l})=>{const a=T();return F.useMemo(()=>{const{rhythm:d}=a.fonts;return{...e?{"--mobile-nav-background":t||a.colors.accent,"--mobile-nav-color":s||a.colors.primary,"--mobile-nav-active-background":o||a.colors.primary,"--mobile-nav-active-color":n||a.colors.accent,"--mobile-nav-button-hover-text-color":l||t||a.colors.accent,"--nav-padding-top":`calc(${d} * 3)`,"--nav-link-padding":`calc(${d} * 0.35) calc(${d} * 2)`,"--nav-button-margin":`calc(${d} * 0.5) calc(${d} * 1.4)`}:{}}},[t,s,o,n,l,a.colors.accent,a.colors.primary,a.fonts,e,r])};function sr(e){const t=parseInt(e)-1,s=e.replace(/[0-9]/g,"");return{maxWidth:t,unit:s}}const bs=({breakPointMd:e,breakPointSm:r,children:t,mobileBackground:s,mobileColor:o,mobileActiveBackground:n,mobileActiveColor:l,mobileButtonHoverColor:a,style:d,navProps:m})=>{const[y,h]=F.useState(!1),f=F.useRef(null),S=F.useRef(null),C=T(),w=e||C.breakpoints.md,x=r||C.breakpoints.sm,{maxWidth:L,unit:k}=sr(w),{maxWidth:A,unit:E}=sr(x),$=se(`(max-width: ${L}${k})`),M=se(`(max-width: ${A}${E})`),Y=vs({isMobile:$,isCompact:M,mobileBackground:s,mobileColor:o,mobileActiveBackground:n,mobileActiveColor:l,mobileButtonHoverColor:a});F.useEffect(()=>{const Q=oe=>{!S.current||S.current.contains(oe.target)||f.current&&f.current.contains(oe.target)||h(!1)};return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[f,S,h]);const le=[Ee.nav,$?Ee.navMobile:Ee.navDesktop,$&&y?Ee.open:""].filter(Boolean).join(" ");return g.jsxs(g.Fragment,{children:[g.jsx(er,{hamburgerRef:f,visible:$,compact:M,open:y,setOpen:h}),g.jsx("nav",{ref:S,className:le,style:{...Y,...d},...m,children:typeof t=="function"?t({setOpen:h}):t})]})},or=({size:e=2.5,color:r,innerColor:t,fullScreen:s=!0})=>{const o=T(),n=r||o.colors.primary,l=t||o.colors.secondary,a=g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{border:`0.25em solid ${n}`,borderTop:`0.25em solid ${l}`,borderRadius:"50%",width:`${e}em`,height:`${e}em`,animation:"spin 1s linear infinite"}}),g.jsx("style",{children:`
|
|
18
18
|
@keyframes spin {
|
|
19
19
|
0% { transform: rotate(0deg); }
|
|
20
20
|
100% { transform: rotate(360deg); }
|
|
21
21
|
}
|
|
22
|
-
`})]});return s?g.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw"},children:a}):a},Ss=({children:e,loadingComponent:r})=>{const[t,s]=F.useState(!1);return F.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?g.jsx(g.Fragment,{children:e}):r||g.jsx(or,{})},
|
|
22
|
+
`})]});return s?g.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw"},children:a}):a},Ss=({children:e,loadingComponent:r})=>{const[t,s]=F.useState(!1);return F.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?g.jsx(g.Fragment,{children:e}):r||g.jsx(or,{})},Re={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},Fs=({children:e,direction:r="column",className:t,style:s,...o})=>{const n=[Re.stack,r==="row"?Re.horizontal:Re.vertical,t].filter(Boolean).join(" ");return g.jsx("div",{className:n,style:s,...o,children:e})},nr={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},et=({children:e,background:r,color:t,className:s,style:o,verticalRhythm:n=3,...l})=>{const a=T(),d=se(`(min-width: ${a.breakpoints.sm})`),m={background:r,color:t||a.fonts.color,...o},y=`calc(${a.fonts.rhythm} * ${n})`,h=d?a.layout.wrapperPadding:a.layout.wrapperPaddingSm,f={"--max-width":a.layout.maxWidth,"--section-padding":`${y} ${h}`},S=[nr.section,s].filter(Boolean).join(" ");return g.jsx("section",{className:S,style:m,...l,children:g.jsx("div",{className:nr.innerDiv,style:f,children:e})})},ir={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},ws=({isMd:e=!1,isLg:r=!1,theme:t})=>F.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",l="1.125rem";return r?(o=`calc(${s} * 4) 0`,n="3.5rem",l="1.5rem"):e&&(o=`calc(${s} * 3.5) 0`,n="3rem",l="1.25rem"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":l,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),ks=({children:e,className:r,color:t,breakPointMd:s,breakPointLg:o,style:n,...l})=>{const a=T(),d=[ir.hero,r].filter(Boolean).join(" "),m=s||a.breakpoints.md,y=o||a.breakpoints.lg,h=se(`(min-width: ${m})`),f=se(`(min-width: ${y})`),S=ws({isMd:h,isLg:f,theme:a});return g.jsx(et,{className:d,color:t||a.fonts.color,style:{...S,...n},...l,children:g.jsx("div",{className:ir.content,children:e})})},ar={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},Vs=({isSmallScreen:e=!1,maxWidth:r,paddingSm:t,padding:s,fontSize:o,background:n,color:l}={})=>{const a=T();return{"--footer-max-width":r||a.layout.maxWidth,"--footer-padding":e?t||a.layout.wrapperPaddingSm:s||a.layout.wrapperPadding,"--footer-font-size":e?"0.75rem":o||a.fonts.size,background:n,color:l||a.fonts.color}},lr=({children:e,breakPointSm:r,maxWidth:t,paddingSm:s,padding:o,fontSize:n,background:l,color:a,style:d={},footerProps:m={},footerRef:y})=>{const h=T(),S=(r||h.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),C=S?parseInt(S[1],10)-1:474,w=S?S[2]:"px",x=se(`(max-width: ${C}${w})`),L=Vs({isSmallScreen:x,maxWidth:t,paddingSm:s,padding:o,fontSize:n,background:l,color:a});return g.jsx("footer",{ref:y,className:ar.footer,...m,children:g.jsx("div",{className:ar.container,style:{...L,...d},children:e})})},Ae={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},xs=({isMd:e=!1,theme:r})=>F.useMemo(()=>{const{rhythm:t}=r.fonts;return{"--feature-icon-font-size":e?"3rem":"2.5rem","--feature-title-font-size":e?"1.5rem":"1.25rem","--feature-card-padding":`calc(${t} * 1)`,"--feature-icon-margin-bottom":`calc(${t} * 0.7)`,"--feature-title-margin-bottom":`calc(${t} * 0.5)`}},[e,r.fonts]),Cs=({icon:e,title:r,children:t,className:s,style:o,breakPointMd:n})=>{const l=T(),a=[Ae.card,s].filter(Boolean).join(" "),d=n||l.breakpoints.md,m=se(`(min-width: ${d})`),y=xs({isMd:m,theme:l});return g.jsxs("div",{className:a,style:{...y,...o},children:[e&&g.jsx("div",{className:Ae.icon,children:e}),g.jsx("h3",{className:Ae.title,children:r}),g.jsx("div",{className:Ae.content,children:t})]})},cr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},$s=({columns:e,isMd:r=!1,isLg:t=!1})=>F.useMemo(()=>r?r&&!t&&(e===3||e===4)?{"--grid-template-columns":"repeat(2, 1fr)"}:{"--grid-template-columns":{1:"1fr",2:"repeat(2, 1fr)",3:"repeat(3, 1fr)",4:"repeat(4, 1fr)"}[e]}:{"--grid-template-columns":"1fr"},[e,r,t]),zs=({children:e,columns:r=3,className:t,breakPointMd:s,breakPointLg:o,style:n,...l})=>{const a=T(),d=[cr.section,t].filter(Boolean).join(" "),m=s||a.breakpoints.md,y=o||a.breakpoints.lg,h=se(`(min-width: ${m})`),f=se(`(min-width: ${y})`),S=$s({columns:r,isMd:h,isLg:f}),C={"--section-padding-vertical":`calc(${a.fonts.rhythm} * 2)`};return g.jsx(et,{className:d,style:C,...l,children:g.jsx("div",{className:cr.grid,style:{...S,...n},children:e})})},De={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv",mainPadded:"PageLayout-module__mainPadded___ZKio3"},Es=({children:e,header:r,footer:t,pagePadding:s=!1,className:o,style:n})=>{const l=T(),a=[De.layoutContainer,o].filter(Boolean).join(" "),d=[De.main,s?De.mainPadded:""].filter(Boolean).join(" "),m=s?{"--main-padding-vertical":`calc(${l.fonts.rhythm} * 1.4)`}:void 0;return g.jsxs("div",{className:a,style:n,children:[g.jsxs("div",{className:De.content,children:[r&&g.jsx(rr,{children:r}),g.jsx("main",{className:d,style:m,children:e})]}),t&&g.jsx(lr,{children:t})]})};z.Button=Fr,z.CSSReset=$r,z.Checkbox=yt,z.FeatureCard=Cs,z.FeatureGridSection=zs,z.Footer=lr,z.Form=is,z.FormCheckbox=ms,z.FormError=Qt,z.FormField=me,z.FormGroup=Kt,z.FormInput=cs,z.FormLabel=ke,z.FormRadio=_s,z.FormSelect=ys,z.FormTextarea=ds,z.Hamburger=er,z.Header=rr,z.Hero=ks,z.Input=Jt,z.LoadingSpinner=or,z.PageLayout=Es,z.Radio=Rt,z.ResponsiveNav=bs,z.ResponsiveSection=et,z.Select=Yt,z.Stack=Fs,z.StyleLoader=Ss,z.Textarea=Xt,z.ThemeProvider=Sr,z.useFormContext=Zt,z.useTheme=T,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -51,11 +51,8 @@ export interface Theme {
|
|
|
51
51
|
layout: ThemeLayout;
|
|
52
52
|
}
|
|
53
53
|
declare const ThemeContext: React.Context<Theme>;
|
|
54
|
-
export type DeepPartial<T> = {
|
|
55
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
56
|
-
};
|
|
57
54
|
export interface ThemeProviderProps {
|
|
58
|
-
theme?:
|
|
55
|
+
theme?: Theme;
|
|
59
56
|
children: ReactNode;
|
|
60
57
|
}
|
|
61
58
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;CACrB;AAmDD,QAAA,MAAM,YAAY,sBAAqC,CAAC;AAExD,MAAM,
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;CACrB;AAmDD,QAAA,MAAM,YAAY,sBAAqC,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAO,KAE3B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|