digital-rabbit-cl 1.3.8 → 1.3.9

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 +1 @@
1
- {"version":3,"file":"Hamburger.d.ts","sourceRoot":"","sources":["../../../src/components/Hamburger/Hamburger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,WAAW,EAEX,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC;IAErF,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAClD,IAAI,CAAC,EAAE,OAAO,CAAC;IAGf,MAAM,CAAC,EAAE,WAAW,CAAC;IAGrB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA6CvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Hamburger.d.ts","sourceRoot":"","sources":["../../../src/components/Hamburger/Hamburger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,WAAW,EAEX,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC;IAErF,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAClD,IAAI,CAAC,EAAE,OAAO,CAAC;IAGf,MAAM,CAAC,EAAE,WAAW,CAAC;IAGrB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAuDvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -2478,14 +2478,19 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2478
2478
  color: e,
2479
2479
  visible: r,
2480
2480
  border: n
2481
- }), f = [pe.hamburger, o ? pe.open : "", l].filter(Boolean).join(" ");
2481
+ }), f = o ? {
2482
+ position: "fixed",
2483
+ right: t ? "0.5em" : "1em",
2484
+ top: "1em",
2485
+ zIndex: 11
2486
+ } : {}, y = [pe.hamburger, o ? pe.open : "", l].filter(Boolean).join(" ");
2482
2487
  return /* @__PURE__ */ K(
2483
2488
  "button",
2484
2489
  {
2485
2490
  ref: s,
2486
- className: f,
2491
+ className: y,
2487
2492
  onClick: () => i(!o),
2488
- style: { ...m, ...d },
2493
+ style: { ...m, ...f, ...d },
2489
2494
  "aria-label": "Toggle menu",
2490
2495
  "aria-expanded": o,
2491
2496
  children: [
@@ -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-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__sizeLarge___yeZSH{padding:var(--button-padding-large)}.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-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__sizeLarge___4Boj3{padding:var(--input-padding-large)}.Textarea-module__textarea___Z-y6g{background-color:transparent;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__sizeLarge___5a3sf{padding:var(--textarea-padding-large)}.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-style:solid;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__sizeLarge___eBA1T{padding:var(--select-padding-large)}.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:relative;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, var(--accent-color));color:var(--mobile-nav-color, var(--primary-color));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, var(--primary-color));color:var(--mobile-nav-active-color, var(--accent-color))}.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, var(--accent-color))!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}.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, var(--primary-color))}.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, var(--primary-color))}.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__main___Sw7Pv{flex:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(N,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],_):(N=typeof globalThis<"u"?globalThis:N||self,_(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,_,w){"use strict";const Ve={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverBackgroundColor:o,hoverTextColor:n,outline:i})=>{let l,d,y;i?(l="transparent",d=t,y=t,e&&(l=o||t,d=o||t,y=n||s)):(l=t,d=t,y=s,e&&(l=o||t,d=o||t,y=n||s));let f=1;return r?f=.3:e&&(f=o?1:.75),{backgroundColor:l,borderColor:d,color:y,opacity:f}};function dt(e,r){const t={...e};return we(e)&&we(r)&&Object.keys(r).forEach(s=>{const o=r[s],n=e[s];we(o)&&we(n)?t[s]=dt(n,o):o!==void 0&&(t[s]=o)}),t}function we(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ge(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const o=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(o)?768:o-1,unit:n}}const t=parseFloat(r[1]),s=r[2];return{maxWidth:t-1,unit:s}}const ft={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Oe={colors:ft,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",paddingHorizontal:.35,primary:{textColor:ft.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"}},yt=w.createContext(Oe),Vr=({theme:e,children:r})=>{const t=e?dt(Oe,e):Oe;return _.jsx(yt.Provider,{value:t,children:r})},T=()=>w.useContext(yt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:i=!1,type:l="button",className:d,style:y,buttonProps:f={},onClick:m,children:g})=>{const V=T(),[k,h]=w.useState(!1);let C;r?C=r:C=e?V.buttons.textColor:V.buttons.primary.textColor;const E=e||V.colors.primary,$={...Fr({isActive:k,disabled:o,buttonColor:E,textColor:C,hoverBackgroundColor:t,hoverTextColor:s,outline:i}),fontSize:V.fonts.size,borderWidth:V.border.width,borderRadius:V.border.radius,"--button-padding-small":`calc(${V.fonts.rhythm} * ${V.sizes.small.paddingVertical}) calc(${V.fonts.rhythm} * ${V.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${V.fonts.rhythm} * ${V.sizes.large.paddingVertical}) calc(${V.fonts.rhythm} * ${V.buttons.paddingHorizontal})`,...y},z=[Ve.button,n==="small"?Ve.sizeSmall:Ve.sizeLarge,i?Ve.outline:"",d].filter(Boolean).join(" ");return _.jsx("button",{...f,className:z,disabled:o,onClick:m,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),type:l,style:$,children:g})};var mt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),kr=new Uint8Array(16);function Cr(){if(!mt)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mt(kr)}for(var ht=[],ke=0;ke<256;++ke)ht[ke]=(ke+256).toString(16).substr(1);function xr(e,r){var t=0,s=ht;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 gt(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||Cr)();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||xr(o)}const Te={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},zr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{checkboxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},_t={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},$r=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),Ce=({color:e,disabled:r=!1,error:t=!1,htmlFor:s,children:o,className:n,style:i,labelProps:l})=>{const d=T(),y=d.colors.error,f=t?y:e||d.colors.primary,m=$r({color:f,disabled:r,fontSize:".85em"}),g={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:m.color,fontSize:m.fontSize,opacity:m.opacity,cursor:m.cursor,...i},V=[_t.label,r?_t.disabled:"",n].filter(Boolean).join(" ");return _.jsx("label",{...l,className:V,htmlFor:s,style:g,children:o})},xe=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:i,id:l,onChange:d,label:y,labelStyle:f,className:m,style:g,divProps:V})=>{const k=T(),h=l||gt(),C=k.colors.error,E=n?C:e||k.colors.primary,F=zr({color:E,checkmarkColor:r,disabled:o,inverted:s}),$=G=>{o||d(G)},z={cursor:F.cursor,fontSize:k.fonts.size,opacity:F.opacity,...g},A={width:"1em"},M={fill:s&&t?F.checkboxColor:"transparent",strokeWidth:"25",stroke:F.checkboxColor},W={stroke:F.checkmarkColor,strokeWidth:"15",fill:"transparent"},se=[Te.container,m].filter(Boolean).join(" ");return _.jsxs("div",{...V,className:se,style:z,children:[_.jsx("input",{id:h,checked:t,disabled:o,onChange:G=>$({target:{checked:G.target.checked,name:i,type:"checkbox"}}),name:i,style:{display:"none"},type:"checkbox"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>$({target:{checked:!t,name:i,type:"checkbox"}}),style:A,className:Te.svg,children:[_.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:M}),t&&_.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:W})]}),y&&_.jsx(Ce,{htmlFor:h,className:Te.label,style:{paddingBottom:0,...f},color:F.checkboxColor,disabled:o,error:n,children:y})]})},Er=()=>{const e=T();return w.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.paddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.paddingSm),e.layout.padding&&r.style.setProperty("--layout-wrapper-padding",e.layout.padding))},[e]),null};var _e=e=>e.type==="checkbox",de=e=>e instanceof Date,K=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&pt(e)&&!de(e),vt=e=>j(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bt=(e,r)=>e.has(Ar(r)),Nr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},He=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function q(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(!(He&&(e instanceof Blob||s))&&(t||j(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Nr(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=q(e[o]));else return e;return r}var ze=e=>/^\w*$/.test(e),H=e=>e===void 0,Me=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>Me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=(ze(r)?[r]:Ie(r)).reduce((o,n)=>K(o)?o:o[n],e);return H(s)||s===e?H(e[r])?t:e[r]:s},X=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=ze(r)?[r]:Ie(r),n=o.length,i=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==i){const y=e[l];d=j(y)||Array.isArray(y)?y:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const $e={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"},St=w.createContext(null);St.displayName="HookFormContext";const je=()=>w.useContext(St);var Ft=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const i=n;return r._proxyFormState[i]!==ee.all&&(r._proxyFormState[i]=!s||ee.all),t&&(t[i]=!0),e[i]}});return o};const Ue=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Dr(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[i,l]=w.useState(t._formState),d=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ue(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:y=>{!s&&l({...t._formState,...y})}}),[o,s,n]),w.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>Ft(i,t,d.current,!1),[i,t])}var Y=e=>typeof e=="string",We=(e,r,t,s,o)=>Y(e)?(s&&r.watch.add(e),b(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),b(t,n))):(s&&(r.watchAll=!0),t),Ge=e=>K(e)||!pt(e);function te(e,r,t=new WeakSet){if(Ge(e)||Ge(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 i=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(de(i)&&de(l)||j(i)&&j(l)||Array.isArray(i)&&Array.isArray(l)?!te(i,l,t):i!==l)return!1}}return!0}function Lr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:i,compute:l}=e||{},d=w.useRef(o),y=w.useRef(l),f=w.useRef(void 0),m=w.useRef(t),g=w.useRef(s);y.current=l;const[V,k]=w.useState(()=>{const z=t._getWatch(s,d.current);return y.current?y.current(z):z}),h=w.useCallback(z=>{const A=We(s,t._names,z||t._formValues,!1,d.current);return y.current?y.current(A):A},[t._formValues,t._names,s]),C=w.useCallback(z=>{if(!n){const A=We(s,t._names,z||t._formValues,!1,d.current);if(y.current){const M=y.current(A);te(M,f.current)||(k(M),f.current=M)}else k(A)}},[t._formValues,t._names,n,s]);Ue(()=>((m.current!==t||!te(g.current,s))&&(m.current=t,g.current=s,C()),t._subscribe({name:s,formState:{values:!0},exact:i,callback:z=>{C(z.values)}})),[t,i,s,C]),w.useEffect(()=>t._removeUnmounted());const E=m.current!==t,F=g.current,$=w.useMemo(()=>{if(n)return null;const z=!E&&!te(F,s);return E||z?h():null},[n,E,s,F,h]);return $!==null?$:V}function Pr(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:i}=e,l=bt(o._names.array,t),d=w.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,i)),[o,t,i]),y=Lr({control:o,name:t,defaultValue:d,exact:!0}),f=Dr({control:o,name:t,exact:!0}),m=w.useRef(e),g=w.useRef(void 0),V=w.useRef(o.register(t,{...e.rules,value:y,...X(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const k=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(f.errors,t)},isDirty:{enumerable:!0,get:()=>!!b(f.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!b(f.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!b(f.validatingFields,t)},error:{enumerable:!0,get:()=>b(f.errors,t)}}),[f,t]),h=w.useCallback($=>V.current.onChange({target:{value:vt($),name:t},type:$e.CHANGE}),[t]),C=w.useCallback(()=>V.current.onBlur({target:{value:b(o._formValues,t),name:t},type:$e.BLUR}),[t,o._formValues]),E=w.useCallback($=>{const z=b(o._fields,t);z&&$&&(z._f.ref={focus:()=>$.focus&&$.focus(),select:()=>$.select&&$.select(),setCustomValidity:A=>$.setCustomValidity(A),reportValidity:()=>$.reportValidity()})},[o._fields,t]),F=w.useMemo(()=>({name:t,value:y,...X(s)||f.disabled?{disabled:f.disabled||s}:{},onChange:h,onBlur:C,ref:E}),[t,s,f.disabled,h,C,E,y]);return w.useEffect(()=>{const $=o._options.shouldUnregister||n,z=g.current;z&&z!==t&&!l&&o.unregister(z),o.register(t,{...m.current.rules,...X(m.current.disabled)?{disabled:m.current.disabled}:{}});const A=(M,W)=>{const se=b(o._fields,M);se&&se._f&&(se._f.mount=W)};if(A(t,!0),$){const M=q(b(o._options.defaultValues,t,m.current.defaultValue));L(o._defaultValues,t,M),H(b(o._formValues,t))&&L(o._formValues,t,M)}return!l&&o.register(t),g.current=t,()=>{(l?$&&!o._state.action:$)?o.unregister(t):A(t,!1)}},[t,o,l,n]),w.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),w.useMemo(()=>({field:F,formState:f,fieldState:k}),[F,f,k])}var qe=(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 wt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&j(o)&&n){const i=wt(o,n);j(i)&&(t[s]=i)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ze=e=>e.type==="file",re=e=>typeof e=="function",Ee=e=>{if(!He)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},kt=e=>e.type==="select-multiple",Qe=e=>e.type==="radio",Br=e=>Qe(e)||_e(e),Ke=e=>Ee(e)&&e.isConnected;function Or(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=H(e)?s++:e[r[s++]];return e}function Tr(e){for(const r in e)if(e.hasOwnProperty(r)&&!H(e[r]))return!1;return!0}function U(e,r){const t=Array.isArray(r)?r:ze(r)?[r]:Ie(r),s=t.length===1?e:Or(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Tr(s))&&U(e,t.slice(0,-1)),e}var Hr=e=>{for(const r in e)if(re(e[r]))return!0;return!1};function Ct(e){return Array.isArray(e)||j(e)&&!Hr(e)}function Je(e,r={}){for(const t in e)Ct(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Je(e[t],r[t])):H(e[t])||(r[t]=!0);return r}function fe(e,r,t){t||(t=Je(r));for(const s in e)Ct(e[s])?H(r)||Ge(t[s])?t[s]=Je(e[s],Array.isArray(e[s])?[]:{}):fe(e[s],K(r)?{}:r[s],t[s]):t[s]=!te(e[s],r[s]);return t}const xt={value:!1,isValid:!1},zt={value:!0,isValid:!0};var $t=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&&!H(e[0].attributes.value)?H(e[0].value)||e[0].value===""?zt:{value:e[0].value,isValid:!0}:zt:xt}return xt},Et=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>H(e)?e:r?e===""?NaN:e&&+e:t&&Y(e)?new Date(e):s?s(e):e;const At={isValid:!1,value:null};var Nt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,At):At;function Dt(e){const r=e.ref;return Ze(r)?r.files:Qe(r)?Nt(e.refs).value:kt(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?$t(e.refs).value:Et(H(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const i=b(r,n);i&&L(o,n,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ae=e=>e instanceof RegExp,ve=e=>H(e)?e:Ae(e)?e.source:j(e)?Ae(e.value)?e.value.source:e.value:e,Lt=e=>({isOnSubmit:!e||e===ee.onSubmit,isOnBlur:e===ee.onBlur,isOnChange:e===ee.onChange,isOnAll:e===ee.all,isOnTouch:e===ee.onTouched});const Pt="AsyncFunction";var Ir=e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===Pt||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Pt)),jr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Bt=(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=b(e,o);if(n){const{_f:i,...l}=n;if(i){if(i.refs&&i.refs[0]&&r(i.refs[0],o)&&!s)return!0;if(i.ref&&r(i.ref,i.name)&&!s)return!0;if(be(l,r))break}else if(j(l)&&be(l,r))break}}};function Ot(e,r,t){const s=b(e,t);if(s||ze(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),i=b(r,n),l=b(e,n);if(i&&!Array.isArray(i)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};o.pop()}return{name:t}}var Ur=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return Z(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(i=>r[i]===(!s||ee.all))},Wr=(e,r,t)=>!e||!r||e===r||pe(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Gr=(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,qr=(e,r)=>!Me(b(e,r)).length&&U(e,r),Zr=(e,r,t)=>{const s=pe(b(e,t));return L(s,"root",r[t]),L(e,t,s),e};function Tt(e,r,t="validate"){if(Y(e)||Array.isArray(e)&&e.every(Y)||X(e)&&!e)return{type:t,message:Y(e)?e:"",ref:r}}var ye=e=>j(e)&&!Ae(e)?e:{value:e,message:""},Ht=async(e,r,t,s,o,n)=>{const{ref:i,refs:l,required:d,maxLength:y,minLength:f,min:m,max:g,pattern:V,validate:k,name:h,valueAsNumber:C,mount:E}=e._f,F=b(t,h);if(!E||r.has(h))return{};const $=l?l[0]:i,z=D=>{o&&$.reportValidity&&($.setCustomValidity(X(D)?"":D||""),$.reportValidity())},A={},M=Qe(i),W=_e(i),se=M||W,G=(C||Ze(i))&&H(i.value)&&H(F)||Ee(i)&&i.value===""||F===""||Array.isArray(F)&&!F.length,oe=qe.bind(null,h,s,A),ie=(D,B,I,Q=le.maxLength,J=le.minLength)=>{const ae=D?B:I;A[h]={type:D?Q:J,message:ae,ref:i,...oe(D?Q:J,ae)}};if(n?!Array.isArray(F)||!F.length:d&&(!se&&(G||K(F))||X(F)&&!F||W&&!$t(l).isValid||M&&!Nt(l).isValid)){const{value:D,message:B}=Y(d)?{value:!!d,message:d}:ye(d);if(D&&(A[h]={type:le.required,message:B,ref:$,...oe(le.required,B)},!s))return z(B),A}if(!G&&(!K(m)||!K(g))){let D,B;const I=ye(g),Q=ye(m);if(!K(F)&&!isNaN(F)){const J=i.valueAsNumber||F&&+F;K(I.value)||(D=J>I.value),K(Q.value)||(B=J<Q.value)}else{const J=i.valueAsDate||new Date(F),ae=Pe=>new Date(new Date().toDateString()+" "+Pe),Fe=i.type=="time",he=i.type=="week";Y(I.value)&&F&&(D=Fe?ae(F)>ae(I.value):he?F>I.value:J>new Date(I.value)),Y(Q.value)&&F&&(B=Fe?ae(F)<ae(Q.value):he?F<Q.value:J<new Date(Q.value))}if((D||B)&&(ie(!!D,I.message,Q.message,le.max,le.min),!s))return z(A[h].message),A}if((y||f)&&!G&&(Y(F)||n&&Array.isArray(F))){const D=ye(y),B=ye(f),I=!K(D.value)&&F.length>+D.value,Q=!K(B.value)&&F.length<+B.value;if((I||Q)&&(ie(I,D.message,B.message),!s))return z(A[h].message),A}if(V&&!G&&Y(F)){const{value:D,message:B}=ye(V);if(Ae(D)&&!F.match(D)&&(A[h]={type:le.pattern,message:B,ref:i,...oe(le.pattern,B)},!s))return z(B),A}if(k){if(re(k)){const D=await k(F,t),B=Tt(D,$);if(B&&(A[h]={...B,...oe(le.validate,B.message)},!s))return z(B.message),A}else if(j(k)){let D={};for(const B in k){if(!Z(D)&&!s)break;const I=Tt(await k[B](F,t),$,B);I&&(D={...I,...oe(B,I.message)},z(I.message),s&&(A[h]=D))}if(!Z(D)&&(A[h]={ref:$,...D},!s))return A}}return z(!0),A};const Qr={mode:ee.onSubmit,reValidateMode:ee.onChange,shouldFocusError:!0};function Kr(e={}){let r={...Qr,...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=j(r.defaultValues)||j(r.values)?q(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:q(o),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,y=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const g={array:Vt(),state:Vt()},V=r.criteriaMode===ee.all,k=a=>c=>{clearTimeout(y),y=setTimeout(a,c)},h=async a=>{if(!r.disabled&&(f.isValid||m.isValid||a)){const c=r.resolver?Z((await W()).errors):await G(s,!0);c!==t.isValid&&g.state.next({isValid:c})}},C=(a,c)=>{!r.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((a||Array.from(l.mount)).forEach(u=>{u&&(c?L(t.validatingFields,u,c):U(t.validatingFields,u))}),g.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},E=(a,c=[],u,S,v=!0,p=!0)=>{if(S&&u&&!r.disabled){if(i.action=!0,p&&Array.isArray(b(s,a))){const x=u(b(s,a),S.argA,S.argB);v&&L(s,a,x)}if(p&&Array.isArray(b(t.errors,a))){const x=u(b(t.errors,a),S.argA,S.argB);v&&L(t.errors,a,x),qr(t.errors,a)}if((f.touchedFields||m.touchedFields)&&p&&Array.isArray(b(t.touchedFields,a))){const x=u(b(t.touchedFields,a),S.argA,S.argB);v&&L(t.touchedFields,a,x)}(f.dirtyFields||m.dirtyFields)&&(t.dirtyFields=fe(o,n)),g.state.next({name:a,isDirty:ie(a,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,a,c)},F=(a,c)=>{L(t.errors,a,c),g.state.next({errors:t.errors})},$=a=>{t.errors=a,g.state.next({errors:t.errors,isValid:!1})},z=(a,c,u,S)=>{const v=b(s,a);if(v){const p=b(n,a,H(u)?b(o,a):u);H(p)||S&&S.defaultChecked||c?L(n,a,c?p:Dt(v._f)):I(a,p),i.mount&&h()}},A=(a,c,u,S,v)=>{let p=!1,x=!1;const P={name:a};if(!r.disabled){if(!u||S){(f.isDirty||m.isDirty)&&(x=t.isDirty,t.isDirty=P.isDirty=ie(),p=x!==P.isDirty);const O=te(b(o,a),c);x=!!b(t.dirtyFields,a),O?U(t.dirtyFields,a):L(t.dirtyFields,a,!0),P.dirtyFields=t.dirtyFields,p=p||(f.dirtyFields||m.dirtyFields)&&x!==!O}if(u){const O=b(t.touchedFields,a);O||(L(t.touchedFields,a,u),P.touchedFields=t.touchedFields,p=p||(f.touchedFields||m.touchedFields)&&O!==u)}p&&v&&g.state.next(P)}return p?P:{}},M=(a,c,u,S)=>{const v=b(t.errors,a),p=(f.isValid||m.isValid)&&X(c)&&t.isValid!==c;if(r.delayError&&u?(d=k(()=>F(a,u)),d(r.delayError)):(clearTimeout(y),d=null,u?L(t.errors,a,u):U(t.errors,a)),(u?!te(v,u):v)||!Z(S)||p){const x={...S,...p&&X(c)?{isValid:c}:{},errors:t.errors,name:a};t={...t,...x},g.state.next(x)}},W=async a=>{C(a,!0);const c=await r.resolver(n,r.context,Mr(a||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return C(a),c},se=async a=>{const{errors:c}=await W(a);if(a)for(const u of a){const S=b(c,u);S?L(t.errors,u,S):U(t.errors,u)}else t.errors=c;return c},G=async(a,c,u={valid:!0})=>{for(const S in a){const v=a[S];if(v){const{_f:p,...x}=v;if(p){const P=l.array.has(p.name),O=v._f&&Ir(v._f);O&&f.validatingFields&&C([p.name],!0);const R=await Ht(v,l.disabled,n,V,r.shouldUseNativeValidation&&!c,P);if(O&&f.validatingFields&&C([p.name]),R[p.name]&&(u.valid=!1,c))break;!c&&(b(R,p.name)?P?Zr(t.errors,R,p.name):L(t.errors,p.name,R[p.name]):U(t.errors,p.name))}!Z(x)&&await G(x,c,u)}}return u.valid},oe=()=>{for(const a of l.unMount){const c=b(s,a);c&&(c._f.refs?c._f.refs.every(u=>!Ke(u)):!Ke(c._f.ref))&&it(a)}l.unMount=new Set},ie=(a,c)=>!r.disabled&&(a&&c&&L(n,a,c),!te(Pe(),o)),D=(a,c,u)=>We(a,l,{...i.mount?n:H(c)?o:Y(a)?{[a]:c}:c},u,c),B=a=>Me(b(i.mount?n:o,a,r.shouldUnregister?b(o,a,[]):[])),I=(a,c,u={})=>{const S=b(s,a);let v=c;if(S){const p=S._f;p&&(!p.disabled&&L(n,a,Et(c,p)),v=Ee(p.ref)&&K(c)?"":c,kt(p.ref)?[...p.ref.options].forEach(x=>x.selected=v.includes(x.value)):p.refs?_e(p.ref)?p.refs.forEach(x=>{(!x.defaultChecked||!x.disabled)&&(Array.isArray(v)?x.checked=!!v.find(P=>P===x.value):x.checked=v===x.value||!!v)}):p.refs.forEach(x=>x.checked=x.value===v):Ze(p.ref)?p.ref.value="":(p.ref.value=v,p.ref.type||g.state.next({name:a,values:q(n)})))}(u.shouldDirty||u.shouldTouch)&&A(a,v,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(a)},Q=(a,c,u)=>{for(const S in c){if(!c.hasOwnProperty(S))return;const v=c[S],p=a+"."+S,x=b(s,p);(l.array.has(a)||j(v)||x&&!x._f)&&!de(v)?Q(p,v,u):I(p,v,u)}},J=(a,c,u={})=>{const S=b(s,a),v=l.array.has(a),p=q(c);L(n,a,p),v?(g.array.next({name:a,values:q(n)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&u.shouldDirty&&g.state.next({name:a,dirtyFields:fe(o,n),isDirty:ie(a,p)})):S&&!S._f&&!K(p)?Q(a,p,u):I(a,p,u),Bt(a,l)&&g.state.next({...t,name:a}),g.state.next({name:i.mount?a:void 0,values:q(n)})},ae=async a=>{i.mount=!0;const c=a.target;let u=c.name,S=!0;const v=b(s,u),p=O=>{S=Number.isNaN(O)||de(O)&&isNaN(O.getTime())||te(O,b(n,u,O))},x=Lt(r.mode),P=Lt(r.reValidateMode);if(v){let O,R;const Be=c.type?Dt(v._f):vt(a),ue=a.type===$e.BLUR||a.type===$e.FOCUS_OUT,js=!jr(v._f)&&!r.resolver&&!b(t.errors,u)&&!v._f.deps||Gr(ue,b(t.touchedFields,u),t.isSubmitted,P,x),ct=Bt(u,l,ue);L(n,u,Be),ue?(!c||!c.readOnly)&&(v._f.onBlur&&v._f.onBlur(a),d&&d(0)):v._f.onChange&&v._f.onChange(a);const ut=A(u,Be,ue),Us=!Z(ut)||ct;if(!ue&&g.state.next({name:u,type:a.type,values:q(n)}),js)return(f.isValid||m.isValid)&&(r.mode==="onBlur"?ue&&h():ue||h()),Us&&g.state.next({name:u,...ct?{}:ut});if(!ue&&ct&&g.state.next({...t}),r.resolver){const{errors:br}=await W([u]);if(p(Be),S){const Ws=Ot(t.errors,s,u),Sr=Ot(br,s,Ws.name||u);O=Sr.error,u=Sr.name,R=Z(br)}}else C([u],!0),O=(await Ht(v,l.disabled,n,V,r.shouldUseNativeValidation))[u],C([u]),p(Be),S&&(O?R=!1:(f.isValid||m.isValid)&&(R=await G(s,!0)));S&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&he(v._f.deps),M(u,R,O,ut))}},Fe=(a,c)=>{if(b(t.errors,c)&&a.focus)return a.focus(),1},he=async(a,c={})=>{let u,S;const v=pe(a);if(r.resolver){const p=await se(H(a)?a:v);u=Z(p),S=a?!v.some(x=>b(p,x)):u}else a?(S=(await Promise.all(v.map(async p=>{const x=b(s,p);return await G(x&&x._f?{[p]:x}:x)}))).every(Boolean),!(!S&&!t.isValid)&&h()):S=u=await G(s);return g.state.next({...!Y(a)||(f.isValid||m.isValid)&&u!==t.isValid?{}:{name:a},...r.resolver||!a?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!S&&be(s,Fe,a?v:l.mount),S},Pe=(a,c)=>{let u={...i.mount?n:o};return c&&(u=wt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),H(a)?u:Y(a)?b(u,a):a.map(S=>b(u,S))},fr=(a,c)=>({invalid:!!b((c||t).errors,a),isDirty:!!b((c||t).dirtyFields,a),error:b((c||t).errors,a),isValidating:!!b(t.validatingFields,a),isTouched:!!b((c||t).touchedFields,a)}),Ps=a=>{a&&pe(a).forEach(c=>U(t.errors,c)),g.state.next({errors:a?t.errors:{}})},yr=(a,c,u)=>{const S=(b(s,a,{_f:{}})._f||{}).ref,v=b(t.errors,a)||{},{ref:p,message:x,type:P,...O}=v;L(t.errors,a,{...O,...c,ref:S}),g.state.next({name:a,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&S&&S.focus&&S.focus()},Bs=(a,c)=>re(a)?g.state.subscribe({next:u=>"values"in u&&a(D(void 0,c),u)}):D(a,c,!0),mr=a=>g.state.subscribe({next:c=>{Wr(a.name,c.name,a.exact)&&Ur(c,a.formState||f,Is,a.reRenderRoot)&&a.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Os=a=>(i.mount=!0,m={...m,...a.formState},mr({...a,formState:m})),it=(a,c={})=>{for(const u of a?pe(a):l.mount)l.mount.delete(u),l.array.delete(u),c.keepValue||(U(s,u),U(n,u)),!c.keepError&&U(t.errors,u),!c.keepDirty&&U(t.dirtyFields,u),!c.keepTouched&&U(t.touchedFields,u),!c.keepIsValidating&&U(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&U(o,u);g.state.next({values:q(n)}),g.state.next({...t,...c.keepDirty?{isDirty:ie()}:{}}),!c.keepIsValid&&h()},hr=({disabled:a,name:c})=>{(X(a)&&i.mount||a||l.disabled.has(c))&&(a?l.disabled.add(c):l.disabled.delete(c))},at=(a,c={})=>{let u=b(s,a);const S=X(c.disabled)||X(r.disabled);return L(s,a,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:a}},name:a,mount:!0,...c}}),l.mount.add(a),u?hr({disabled:X(c.disabled)?c.disabled:r.disabled,name:a}):z(a,!0,c.value),{...S?{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:a,onChange:ae,onBlur:ae,ref:v=>{if(v){at(a,c),u=b(s,a);const p=H(v.value)&&v.querySelectorAll&&v.querySelectorAll("input,select,textarea")[0]||v,x=Br(p),P=u._f.refs||[];if(x?P.find(O=>O===p):p===u._f.ref)return;L(s,a,{_f:{...u._f,...x?{refs:[...P.filter(Ke),p,...Array.isArray(b(o,a))?[{}]:[]],ref:{type:p.type,name:a}}:{ref:p}}}),z(a,!1,void 0,p)}else u=b(s,a,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(bt(l.array,a)&&i.action)&&l.unMount.add(a)}}},lt=()=>r.shouldFocusError&&be(s,Fe,l.mount),Ts=a=>{X(a)&&(g.state.next({disabled:a}),be(s,(c,u)=>{const S=b(s,u);S&&(c.disabled=S._f.disabled||a,Array.isArray(S._f.refs)&&S._f.refs.forEach(v=>{v.disabled=S._f.disabled||a}))},0,!1))},gr=(a,c)=>async u=>{let S;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let v=q(n);if(g.state.next({isSubmitting:!0}),r.resolver){const{errors:p,values:x}=await W();t.errors=p,v=q(x)}else await G(s);if(l.disabled.size)for(const p of l.disabled)U(v,p);if(U(t.errors,"root"),Z(t.errors)){g.state.next({errors:{}});try{await a(v,u)}catch(p){S=p}}else c&&await c({...t.errors},u),lt(),setTimeout(lt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!S,submitCount:t.submitCount+1,errors:t.errors}),S)throw S},Hs=(a,c={})=>{b(s,a)&&(H(c.defaultValue)?J(a,q(b(o,a))):(J(a,c.defaultValue),L(o,a,q(c.defaultValue))),c.keepTouched||U(t.touchedFields,a),c.keepDirty||(U(t.dirtyFields,a),t.isDirty=c.defaultValue?ie(a,q(b(o,a))):ie()),c.keepError||(U(t.errors,a),f.isValid&&h()),g.state.next({...t}))},_r=(a,c={})=>{const u=a?q(a):o,S=q(u),v=Z(a),p=v?o:S;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const x=new Set([...l.mount,...Object.keys(fe(o,n))]);for(const P of Array.from(x))b(t.dirtyFields,P)?L(p,P,b(n,P)):J(P,b(p,P))}else{if(He&&H(a))for(const x of l.mount){const P=b(s,x);if(P&&P._f){const O=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(Ee(O)){const R=O.closest("form");if(R){R.reset();break}}}}if(c.keepFieldsRef)for(const x of l.mount)J(x,b(p,x));else s={}}n=r.shouldUnregister?c.keepDefaultValues?q(o):{}:q(p),g.array.next({values:{...p}}),g.state.next({values:{...p}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(p),i.watch=!!r.shouldUnregister,g.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:v?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!te(a,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:v?{}:c.keepDirtyValues?c.keepDefaultValues&&n?fe(o,n):t.dirtyFields:c.keepDefaultValues&&a?fe(o,a):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},pr=(a,c)=>_r(re(a)?a(n):a,c),Ms=(a,c={})=>{const u=b(s,a),S=u&&u._f;if(S){const v=S.refs?S.refs[0]:S.ref;v.focus&&(v.focus(),c.shouldSelect&&re(v.select)&&v.select())}},Is=a=>{t={...t,...a}},vr={control:{register:at,unregister:it,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:mr,_runSchema:W,_focusError:lt,_getWatch:D,_getDirty:ie,_setValid:h,_setFieldArray:E,_setDisabledField:hr,_setErrors:$,_getFieldArray:B,_reset:_r,_resetDefaultValues:()=>re(r.defaultValues)&&r.defaultValues().then(a=>{pr(a,r.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Ts,_subjects:g,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return i},set _state(a){i=a},get _defaultValues(){return o},get _names(){return l},set _names(a){l=a},get _formState(){return t},get _options(){return r},set _options(a){r={...r,...a}}},subscribe:Os,trigger:he,register:at,handleSubmit:gr,watch:Bs,setValue:J,getValues:Pe,reset:pr,resetField:Hs,clearErrors:Ps,unregister:it,setError:yr,setFocus:Ms,getFieldState:fr};return{...vr,formControl:vr}}function Jr(e={}){const r=w.useRef(void 0),t=w.useRef(void 0),[s,o]=w.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:i,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ue(()=>{const i=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,i},[n]),w.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),w.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),w.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),w.useEffect(()=>{if(n._proxyFormState.isDirty){const i=n._getDirty();i!==s.isDirty&&n._subjects.state.next({isDirty:i})}},[n,s.isDirty]),w.useEffect(()=>{e.values&&!te(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(i=>({...i}))):n._resetDefaultValues()},[n,e.values]),w.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=Ft(s,n),r.current}const Mt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=b(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Xe=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Mt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Mt(o,t,e))}},It=(e,r)=>{r.shouldUseNativeValidation&&Xe(e,r);const t={};for(const s in e){const o=b(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Xr(r.names||Object.keys(e),s)){const i=Object.assign({},b(t,s));L(i,"root",n),L(t,s,i)}else L(t,s,n)}return t},Xr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function Ut(e,r,t){function s(l,d){var y;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(y=l._zod).traits??(y.traits=new Set),l._zod.traits.add(e),r(l,d);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function i(l){var d;const y=t!=null&&t.Parent?new n:this;s(y,l),(d=y._zod).deferred??(d.deferred=[]);for(const f of y._zod.deferred)f();return y}return Object.defineProperty(i,"init",{value:s}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var d,y;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(y=(d=l==null?void 0:l._zod)==null?void 0:d.traits)==null?void 0:y.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Yr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Wt(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Gt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ne(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,i,l,d,y;const s={...e,path:e.path??[]};if(!e.message){const f=Ne((i=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:i.call(n,e))??Ne((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ne((d=t.customError)==null?void 0:d.call(t,e))??Ne((y=t.localeError)==null?void 0:y.call(t,e))??"Invalid input";s.message=f}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const Zt=(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,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ts=Ut("$ZodError",Zt),Qt=Ut("$ZodError",Zt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise)throw new Yr;if(i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return i.value})(Qt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return i.value})(Qt);function Kt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function os(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(f){return f.errors.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function ns(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(f){return f.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function is(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(Kt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(i){return n.shouldUseNativeValidation&&Xe({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(i))return{values:{},errors:It(os(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Kt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(i){return n.shouldUseNativeValidation&&Xe({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return l instanceof ts})(i))return{values:{},errors:It(ns(i.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Jt=w.createContext(null);function Xt(){const e=w.useContext(Jt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function as({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:i,style:l,formProps:d}){const y=Jr({resolver:t?is(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),f=y.handleSubmit(e);return _.jsx(Jt.Provider,{value:y,children:_.jsx("form",{...d,className:i,style:l,onSubmit:f,children:typeof r=="function"?r(y):r})})}const ls=as,cs={formError:"FormError-module__formError___kaUBn"},Yt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=T(),i={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:l,style:i,role:"alert","aria-live":"polite",children:r})},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"},Rt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:i,labelProps:l,children:d,className:y,style:f,divProps:m})=>{const g=T(),V=[me.formGroup,r?me.error:"",e?me.disabled:"",y].filter(Boolean).join(" "),k={"--form-group-margin-bottom":`calc(${g.fonts.rhythm} * 0.35)`,...f},h=w.Children.map(d,C=>{if(w.isValidElement(C)){const E={};if(e&&C.props.disabled===void 0&&(E.disabled=!0),r&&C.props.error===void 0&&(E.error=!0),o&&C.props.id===void 0&&(E.id=o),Object.keys(E).length>0)return w.cloneElement(C,E)}return C});return _.jsxs("div",{...m,className:V,style:k,children:[n&&_.jsxs(Ce,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&_.jsxs("span",{className:me.required,"aria-label":"required",children:[" ","*"]})]}),_.jsx("div",{className:`${me.inputWrapper} ${s?me.indented:""}`,children:h}),r&&i&&_.jsx(Yt,{children:i})]})};function ce({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:i,style:l,indent:d,labelProps:y}){const{control:f}=Xt(),{field:m,fieldState:{error:g}}=Pr({name:e,control:f,rules:o});return _.jsx(Rt,{label:r,name:e,error:!!g,errorMessage:g==null?void 0:g.message,disabled:n,required:t,className:i,style:l,indent:d,labelProps:y,children:s({value:m.value,onChange:m.onChange,onBlur:m.onBlur,name:m.name,error:!!g,indent:d})})}const Ye={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},us=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,type:d="text",value:y="",onChange:f,onBlur:m,className:g,style:V,inputProps:k})=>{const h=T(),C=h.colors.error,E=r?C:t||h.colors.primary,F=us({color:E,disabled:e,fontSize:h.fonts.size,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--input-padding-small":`calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:h.border.width,borderRadius:h.border.radius,color:F.color,fontSize:F.fontSize,opacity:F.opacity,...V},z=[Ye.input,s==="small"?Ye.sizeSmall:Ye.sizeLarge,g].filter(Boolean).join(" ");return _.jsx("input",{...k,className:z,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,type:d,value:y,style:$})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:g})=>_.jsx(er,{...l,name:m,value:d||"",onChange:V=>y(V.target.value),inputProps:{onBlur:f},error:g})})}const Re={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},fs=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),tr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,rows:d=3,value:y="",onChange:f,onBlur:m,className:g,style:V,textareaProps:k})=>{const h=T(),C=h.colors.error,E=r?C:t||h.colors.primary,F=fs({color:E,disabled:e,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--textarea-padding-small":`calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:h.border.width,borderRadius:h.border.radius,color:F.color,fontSize:h.fonts.size,opacity:F.opacity,...V},z=[Re.textarea,s==="small"?Re.sizeSmall:Re.sizeLarge,g].filter(Boolean).join(" ");return _.jsx("textarea",{...k,className:z,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,rows:d,value:y,style:$})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:g})=>_.jsx(tr,{...l,name:m,value:d||"",onChange:V=>y(V.target.value),onBlur:f,error:g})})}const et={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},ms=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const i=`
2
+ (function(N,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],_):(N=typeof globalThis<"u"?globalThis:N||self,_(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,_,w){"use strict";const Ve={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverBackgroundColor:o,hoverTextColor:n,outline:i})=>{let l,d,y;i?(l="transparent",d=t,y=t,e&&(l=o||t,d=o||t,y=n||s)):(l=t,d=t,y=s,e&&(l=o||t,d=o||t,y=n||s));let f=1;return r?f=.3:e&&(f=o?1:.75),{backgroundColor:l,borderColor:d,color:y,opacity:f}};function dt(e,r){const t={...e};return we(e)&&we(r)&&Object.keys(r).forEach(s=>{const o=r[s],n=e[s];we(o)&&we(n)?t[s]=dt(n,o):o!==void 0&&(t[s]=o)}),t}function we(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ge(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const o=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(o)?768:o-1,unit:n}}const t=parseFloat(r[1]),s=r[2];return{maxWidth:t-1,unit:s}}const ft={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Oe={colors:ft,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",paddingHorizontal:.35,primary:{textColor:ft.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"}},yt=w.createContext(Oe),Vr=({theme:e,children:r})=>{const t=e?dt(Oe,e):Oe;return _.jsx(yt.Provider,{value:t,children:r})},T=()=>w.useContext(yt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:i=!1,type:l="button",className:d,style:y,buttonProps:f={},onClick:m,children:g})=>{const V=T(),[k,h]=w.useState(!1);let x;r?x=r:x=e?V.buttons.textColor:V.buttons.primary.textColor;const E=e||V.colors.primary,$={...Fr({isActive:k,disabled:o,buttonColor:E,textColor:x,hoverBackgroundColor:t,hoverTextColor:s,outline:i}),fontSize:V.fonts.size,borderWidth:V.border.width,borderRadius:V.border.radius,"--button-padding-small":`calc(${V.fonts.rhythm} * ${V.sizes.small.paddingVertical}) calc(${V.fonts.rhythm} * ${V.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${V.fonts.rhythm} * ${V.sizes.large.paddingVertical}) calc(${V.fonts.rhythm} * ${V.buttons.paddingHorizontal})`,...y},z=[Ve.button,n==="small"?Ve.sizeSmall:Ve.sizeLarge,i?Ve.outline:"",d].filter(Boolean).join(" ");return _.jsx("button",{...f,className:z,disabled:o,onClick:m,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),type:l,style:$,children:g})};var mt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),kr=new Uint8Array(16);function xr(){if(!mt)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mt(kr)}for(var ht=[],ke=0;ke<256;++ke)ht[ke]=(ke+256).toString(16).substr(1);function Cr(e,r){var t=0,s=ht;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 gt(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||xr)();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||Cr(o)}const Te={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},zr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{checkboxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},_t={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},$r=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),xe=({color:e,disabled:r=!1,error:t=!1,htmlFor:s,children:o,className:n,style:i,labelProps:l})=>{const d=T(),y=d.colors.error,f=t?y:e||d.colors.primary,m=$r({color:f,disabled:r,fontSize:".85em"}),g={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:m.color,fontSize:m.fontSize,opacity:m.opacity,cursor:m.cursor,...i},V=[_t.label,r?_t.disabled:"",n].filter(Boolean).join(" ");return _.jsx("label",{...l,className:V,htmlFor:s,style:g,children:o})},Ce=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:i,id:l,onChange:d,label:y,labelStyle:f,className:m,style:g,divProps:V})=>{const k=T(),h=l||gt(),x=k.colors.error,E=n?x:e||k.colors.primary,F=zr({color:E,checkmarkColor:r,disabled:o,inverted:s}),$=G=>{o||d(G)},z={cursor:F.cursor,fontSize:k.fonts.size,opacity:F.opacity,...g},A={width:"1em"},M={fill:s&&t?F.checkboxColor:"transparent",strokeWidth:"25",stroke:F.checkboxColor},W={stroke:F.checkmarkColor,strokeWidth:"15",fill:"transparent"},se=[Te.container,m].filter(Boolean).join(" ");return _.jsxs("div",{...V,className:se,style:z,children:[_.jsx("input",{id:h,checked:t,disabled:o,onChange:G=>$({target:{checked:G.target.checked,name:i,type:"checkbox"}}),name:i,style:{display:"none"},type:"checkbox"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>$({target:{checked:!t,name:i,type:"checkbox"}}),style:A,className:Te.svg,children:[_.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:M}),t&&_.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:W})]}),y&&_.jsx(xe,{htmlFor:h,className:Te.label,style:{paddingBottom:0,...f},color:F.checkboxColor,disabled:o,error:n,children:y})]})},Er=()=>{const e=T();return w.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.paddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.paddingSm),e.layout.padding&&r.style.setProperty("--layout-wrapper-padding",e.layout.padding))},[e]),null};var _e=e=>e.type==="checkbox",de=e=>e instanceof Date,K=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&pt(e)&&!de(e),vt=e=>j(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bt=(e,r)=>e.has(Ar(r)),Nr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},He=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function q(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(!(He&&(e instanceof Blob||s))&&(t||j(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Nr(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=q(e[o]));else return e;return r}var ze=e=>/^\w*$/.test(e),H=e=>e===void 0,Me=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>Me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=(ze(r)?[r]:Ie(r)).reduce((o,n)=>K(o)?o:o[n],e);return H(s)||s===e?H(e[r])?t:e[r]:s},X=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=ze(r)?[r]:Ie(r),n=o.length,i=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==i){const y=e[l];d=j(y)||Array.isArray(y)?y:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const $e={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"},St=w.createContext(null);St.displayName="HookFormContext";const je=()=>w.useContext(St);var Ft=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const i=n;return r._proxyFormState[i]!==ee.all&&(r._proxyFormState[i]=!s||ee.all),t&&(t[i]=!0),e[i]}});return o};const Ue=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Dr(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[i,l]=w.useState(t._formState),d=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ue(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:y=>{!s&&l({...t._formState,...y})}}),[o,s,n]),w.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>Ft(i,t,d.current,!1),[i,t])}var Y=e=>typeof e=="string",We=(e,r,t,s,o)=>Y(e)?(s&&r.watch.add(e),b(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),b(t,n))):(s&&(r.watchAll=!0),t),Ge=e=>K(e)||!pt(e);function te(e,r,t=new WeakSet){if(Ge(e)||Ge(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 i=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(de(i)&&de(l)||j(i)&&j(l)||Array.isArray(i)&&Array.isArray(l)?!te(i,l,t):i!==l)return!1}}return!0}function Lr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:i,compute:l}=e||{},d=w.useRef(o),y=w.useRef(l),f=w.useRef(void 0),m=w.useRef(t),g=w.useRef(s);y.current=l;const[V,k]=w.useState(()=>{const z=t._getWatch(s,d.current);return y.current?y.current(z):z}),h=w.useCallback(z=>{const A=We(s,t._names,z||t._formValues,!1,d.current);return y.current?y.current(A):A},[t._formValues,t._names,s]),x=w.useCallback(z=>{if(!n){const A=We(s,t._names,z||t._formValues,!1,d.current);if(y.current){const M=y.current(A);te(M,f.current)||(k(M),f.current=M)}else k(A)}},[t._formValues,t._names,n,s]);Ue(()=>((m.current!==t||!te(g.current,s))&&(m.current=t,g.current=s,x()),t._subscribe({name:s,formState:{values:!0},exact:i,callback:z=>{x(z.values)}})),[t,i,s,x]),w.useEffect(()=>t._removeUnmounted());const E=m.current!==t,F=g.current,$=w.useMemo(()=>{if(n)return null;const z=!E&&!te(F,s);return E||z?h():null},[n,E,s,F,h]);return $!==null?$:V}function Pr(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:i}=e,l=bt(o._names.array,t),d=w.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,i)),[o,t,i]),y=Lr({control:o,name:t,defaultValue:d,exact:!0}),f=Dr({control:o,name:t,exact:!0}),m=w.useRef(e),g=w.useRef(void 0),V=w.useRef(o.register(t,{...e.rules,value:y,...X(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const k=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(f.errors,t)},isDirty:{enumerable:!0,get:()=>!!b(f.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!b(f.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!b(f.validatingFields,t)},error:{enumerable:!0,get:()=>b(f.errors,t)}}),[f,t]),h=w.useCallback($=>V.current.onChange({target:{value:vt($),name:t},type:$e.CHANGE}),[t]),x=w.useCallback(()=>V.current.onBlur({target:{value:b(o._formValues,t),name:t},type:$e.BLUR}),[t,o._formValues]),E=w.useCallback($=>{const z=b(o._fields,t);z&&$&&(z._f.ref={focus:()=>$.focus&&$.focus(),select:()=>$.select&&$.select(),setCustomValidity:A=>$.setCustomValidity(A),reportValidity:()=>$.reportValidity()})},[o._fields,t]),F=w.useMemo(()=>({name:t,value:y,...X(s)||f.disabled?{disabled:f.disabled||s}:{},onChange:h,onBlur:x,ref:E}),[t,s,f.disabled,h,x,E,y]);return w.useEffect(()=>{const $=o._options.shouldUnregister||n,z=g.current;z&&z!==t&&!l&&o.unregister(z),o.register(t,{...m.current.rules,...X(m.current.disabled)?{disabled:m.current.disabled}:{}});const A=(M,W)=>{const se=b(o._fields,M);se&&se._f&&(se._f.mount=W)};if(A(t,!0),$){const M=q(b(o._options.defaultValues,t,m.current.defaultValue));L(o._defaultValues,t,M),H(b(o._formValues,t))&&L(o._formValues,t,M)}return!l&&o.register(t),g.current=t,()=>{(l?$&&!o._state.action:$)?o.unregister(t):A(t,!1)}},[t,o,l,n]),w.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),w.useMemo(()=>({field:F,formState:f,fieldState:k}),[F,f,k])}var qe=(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 wt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&j(o)&&n){const i=wt(o,n);j(i)&&(t[s]=i)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ze=e=>e.type==="file",re=e=>typeof e=="function",Ee=e=>{if(!He)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},kt=e=>e.type==="select-multiple",Qe=e=>e.type==="radio",Br=e=>Qe(e)||_e(e),Ke=e=>Ee(e)&&e.isConnected;function Or(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=H(e)?s++:e[r[s++]];return e}function Tr(e){for(const r in e)if(e.hasOwnProperty(r)&&!H(e[r]))return!1;return!0}function U(e,r){const t=Array.isArray(r)?r:ze(r)?[r]:Ie(r),s=t.length===1?e:Or(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Tr(s))&&U(e,t.slice(0,-1)),e}var Hr=e=>{for(const r in e)if(re(e[r]))return!0;return!1};function xt(e){return Array.isArray(e)||j(e)&&!Hr(e)}function Je(e,r={}){for(const t in e)xt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Je(e[t],r[t])):H(e[t])||(r[t]=!0);return r}function fe(e,r,t){t||(t=Je(r));for(const s in e)xt(e[s])?H(r)||Ge(t[s])?t[s]=Je(e[s],Array.isArray(e[s])?[]:{}):fe(e[s],K(r)?{}:r[s],t[s]):t[s]=!te(e[s],r[s]);return t}const Ct={value:!1,isValid:!1},zt={value:!0,isValid:!0};var $t=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&&!H(e[0].attributes.value)?H(e[0].value)||e[0].value===""?zt:{value:e[0].value,isValid:!0}:zt:Ct}return Ct},Et=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>H(e)?e:r?e===""?NaN:e&&+e:t&&Y(e)?new Date(e):s?s(e):e;const At={isValid:!1,value:null};var Nt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,At):At;function Dt(e){const r=e.ref;return Ze(r)?r.files:Qe(r)?Nt(e.refs).value:kt(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?$t(e.refs).value:Et(H(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const i=b(r,n);i&&L(o,n,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ae=e=>e instanceof RegExp,ve=e=>H(e)?e:Ae(e)?e.source:j(e)?Ae(e.value)?e.value.source:e.value:e,Lt=e=>({isOnSubmit:!e||e===ee.onSubmit,isOnBlur:e===ee.onBlur,isOnChange:e===ee.onChange,isOnAll:e===ee.all,isOnTouch:e===ee.onTouched});const Pt="AsyncFunction";var Ir=e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===Pt||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Pt)),jr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Bt=(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=b(e,o);if(n){const{_f:i,...l}=n;if(i){if(i.refs&&i.refs[0]&&r(i.refs[0],o)&&!s)return!0;if(i.ref&&r(i.ref,i.name)&&!s)return!0;if(be(l,r))break}else if(j(l)&&be(l,r))break}}};function Ot(e,r,t){const s=b(e,t);if(s||ze(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),i=b(r,n),l=b(e,n);if(i&&!Array.isArray(i)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};o.pop()}return{name:t}}var Ur=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return Z(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(i=>r[i]===(!s||ee.all))},Wr=(e,r,t)=>!e||!r||e===r||pe(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Gr=(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,qr=(e,r)=>!Me(b(e,r)).length&&U(e,r),Zr=(e,r,t)=>{const s=pe(b(e,t));return L(s,"root",r[t]),L(e,t,s),e};function Tt(e,r,t="validate"){if(Y(e)||Array.isArray(e)&&e.every(Y)||X(e)&&!e)return{type:t,message:Y(e)?e:"",ref:r}}var ye=e=>j(e)&&!Ae(e)?e:{value:e,message:""},Ht=async(e,r,t,s,o,n)=>{const{ref:i,refs:l,required:d,maxLength:y,minLength:f,min:m,max:g,pattern:V,validate:k,name:h,valueAsNumber:x,mount:E}=e._f,F=b(t,h);if(!E||r.has(h))return{};const $=l?l[0]:i,z=D=>{o&&$.reportValidity&&($.setCustomValidity(X(D)?"":D||""),$.reportValidity())},A={},M=Qe(i),W=_e(i),se=M||W,G=(x||Ze(i))&&H(i.value)&&H(F)||Ee(i)&&i.value===""||F===""||Array.isArray(F)&&!F.length,oe=qe.bind(null,h,s,A),ie=(D,B,I,Q=le.maxLength,J=le.minLength)=>{const ae=D?B:I;A[h]={type:D?Q:J,message:ae,ref:i,...oe(D?Q:J,ae)}};if(n?!Array.isArray(F)||!F.length:d&&(!se&&(G||K(F))||X(F)&&!F||W&&!$t(l).isValid||M&&!Nt(l).isValid)){const{value:D,message:B}=Y(d)?{value:!!d,message:d}:ye(d);if(D&&(A[h]={type:le.required,message:B,ref:$,...oe(le.required,B)},!s))return z(B),A}if(!G&&(!K(m)||!K(g))){let D,B;const I=ye(g),Q=ye(m);if(!K(F)&&!isNaN(F)){const J=i.valueAsNumber||F&&+F;K(I.value)||(D=J>I.value),K(Q.value)||(B=J<Q.value)}else{const J=i.valueAsDate||new Date(F),ae=Pe=>new Date(new Date().toDateString()+" "+Pe),Fe=i.type=="time",he=i.type=="week";Y(I.value)&&F&&(D=Fe?ae(F)>ae(I.value):he?F>I.value:J>new Date(I.value)),Y(Q.value)&&F&&(B=Fe?ae(F)<ae(Q.value):he?F<Q.value:J<new Date(Q.value))}if((D||B)&&(ie(!!D,I.message,Q.message,le.max,le.min),!s))return z(A[h].message),A}if((y||f)&&!G&&(Y(F)||n&&Array.isArray(F))){const D=ye(y),B=ye(f),I=!K(D.value)&&F.length>+D.value,Q=!K(B.value)&&F.length<+B.value;if((I||Q)&&(ie(I,D.message,B.message),!s))return z(A[h].message),A}if(V&&!G&&Y(F)){const{value:D,message:B}=ye(V);if(Ae(D)&&!F.match(D)&&(A[h]={type:le.pattern,message:B,ref:i,...oe(le.pattern,B)},!s))return z(B),A}if(k){if(re(k)){const D=await k(F,t),B=Tt(D,$);if(B&&(A[h]={...B,...oe(le.validate,B.message)},!s))return z(B.message),A}else if(j(k)){let D={};for(const B in k){if(!Z(D)&&!s)break;const I=Tt(await k[B](F,t),$,B);I&&(D={...I,...oe(B,I.message)},z(I.message),s&&(A[h]=D))}if(!Z(D)&&(A[h]={ref:$,...D},!s))return A}}return z(!0),A};const Qr={mode:ee.onSubmit,reValidateMode:ee.onChange,shouldFocusError:!0};function Kr(e={}){let r={...Qr,...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=j(r.defaultValues)||j(r.values)?q(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:q(o),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,y=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const g={array:Vt(),state:Vt()},V=r.criteriaMode===ee.all,k=a=>c=>{clearTimeout(y),y=setTimeout(a,c)},h=async a=>{if(!r.disabled&&(f.isValid||m.isValid||a)){const c=r.resolver?Z((await W()).errors):await G(s,!0);c!==t.isValid&&g.state.next({isValid:c})}},x=(a,c)=>{!r.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((a||Array.from(l.mount)).forEach(u=>{u&&(c?L(t.validatingFields,u,c):U(t.validatingFields,u))}),g.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},E=(a,c=[],u,S,v=!0,p=!0)=>{if(S&&u&&!r.disabled){if(i.action=!0,p&&Array.isArray(b(s,a))){const C=u(b(s,a),S.argA,S.argB);v&&L(s,a,C)}if(p&&Array.isArray(b(t.errors,a))){const C=u(b(t.errors,a),S.argA,S.argB);v&&L(t.errors,a,C),qr(t.errors,a)}if((f.touchedFields||m.touchedFields)&&p&&Array.isArray(b(t.touchedFields,a))){const C=u(b(t.touchedFields,a),S.argA,S.argB);v&&L(t.touchedFields,a,C)}(f.dirtyFields||m.dirtyFields)&&(t.dirtyFields=fe(o,n)),g.state.next({name:a,isDirty:ie(a,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,a,c)},F=(a,c)=>{L(t.errors,a,c),g.state.next({errors:t.errors})},$=a=>{t.errors=a,g.state.next({errors:t.errors,isValid:!1})},z=(a,c,u,S)=>{const v=b(s,a);if(v){const p=b(n,a,H(u)?b(o,a):u);H(p)||S&&S.defaultChecked||c?L(n,a,c?p:Dt(v._f)):I(a,p),i.mount&&h()}},A=(a,c,u,S,v)=>{let p=!1,C=!1;const P={name:a};if(!r.disabled){if(!u||S){(f.isDirty||m.isDirty)&&(C=t.isDirty,t.isDirty=P.isDirty=ie(),p=C!==P.isDirty);const O=te(b(o,a),c);C=!!b(t.dirtyFields,a),O?U(t.dirtyFields,a):L(t.dirtyFields,a,!0),P.dirtyFields=t.dirtyFields,p=p||(f.dirtyFields||m.dirtyFields)&&C!==!O}if(u){const O=b(t.touchedFields,a);O||(L(t.touchedFields,a,u),P.touchedFields=t.touchedFields,p=p||(f.touchedFields||m.touchedFields)&&O!==u)}p&&v&&g.state.next(P)}return p?P:{}},M=(a,c,u,S)=>{const v=b(t.errors,a),p=(f.isValid||m.isValid)&&X(c)&&t.isValid!==c;if(r.delayError&&u?(d=k(()=>F(a,u)),d(r.delayError)):(clearTimeout(y),d=null,u?L(t.errors,a,u):U(t.errors,a)),(u?!te(v,u):v)||!Z(S)||p){const C={...S,...p&&X(c)?{isValid:c}:{},errors:t.errors,name:a};t={...t,...C},g.state.next(C)}},W=async a=>{x(a,!0);const c=await r.resolver(n,r.context,Mr(a||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return x(a),c},se=async a=>{const{errors:c}=await W(a);if(a)for(const u of a){const S=b(c,u);S?L(t.errors,u,S):U(t.errors,u)}else t.errors=c;return c},G=async(a,c,u={valid:!0})=>{for(const S in a){const v=a[S];if(v){const{_f:p,...C}=v;if(p){const P=l.array.has(p.name),O=v._f&&Ir(v._f);O&&f.validatingFields&&x([p.name],!0);const R=await Ht(v,l.disabled,n,V,r.shouldUseNativeValidation&&!c,P);if(O&&f.validatingFields&&x([p.name]),R[p.name]&&(u.valid=!1,c))break;!c&&(b(R,p.name)?P?Zr(t.errors,R,p.name):L(t.errors,p.name,R[p.name]):U(t.errors,p.name))}!Z(C)&&await G(C,c,u)}}return u.valid},oe=()=>{for(const a of l.unMount){const c=b(s,a);c&&(c._f.refs?c._f.refs.every(u=>!Ke(u)):!Ke(c._f.ref))&&it(a)}l.unMount=new Set},ie=(a,c)=>!r.disabled&&(a&&c&&L(n,a,c),!te(Pe(),o)),D=(a,c,u)=>We(a,l,{...i.mount?n:H(c)?o:Y(a)?{[a]:c}:c},u,c),B=a=>Me(b(i.mount?n:o,a,r.shouldUnregister?b(o,a,[]):[])),I=(a,c,u={})=>{const S=b(s,a);let v=c;if(S){const p=S._f;p&&(!p.disabled&&L(n,a,Et(c,p)),v=Ee(p.ref)&&K(c)?"":c,kt(p.ref)?[...p.ref.options].forEach(C=>C.selected=v.includes(C.value)):p.refs?_e(p.ref)?p.refs.forEach(C=>{(!C.defaultChecked||!C.disabled)&&(Array.isArray(v)?C.checked=!!v.find(P=>P===C.value):C.checked=v===C.value||!!v)}):p.refs.forEach(C=>C.checked=C.value===v):Ze(p.ref)?p.ref.value="":(p.ref.value=v,p.ref.type||g.state.next({name:a,values:q(n)})))}(u.shouldDirty||u.shouldTouch)&&A(a,v,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(a)},Q=(a,c,u)=>{for(const S in c){if(!c.hasOwnProperty(S))return;const v=c[S],p=a+"."+S,C=b(s,p);(l.array.has(a)||j(v)||C&&!C._f)&&!de(v)?Q(p,v,u):I(p,v,u)}},J=(a,c,u={})=>{const S=b(s,a),v=l.array.has(a),p=q(c);L(n,a,p),v?(g.array.next({name:a,values:q(n)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&u.shouldDirty&&g.state.next({name:a,dirtyFields:fe(o,n),isDirty:ie(a,p)})):S&&!S._f&&!K(p)?Q(a,p,u):I(a,p,u),Bt(a,l)&&g.state.next({...t,name:a}),g.state.next({name:i.mount?a:void 0,values:q(n)})},ae=async a=>{i.mount=!0;const c=a.target;let u=c.name,S=!0;const v=b(s,u),p=O=>{S=Number.isNaN(O)||de(O)&&isNaN(O.getTime())||te(O,b(n,u,O))},C=Lt(r.mode),P=Lt(r.reValidateMode);if(v){let O,R;const Be=c.type?Dt(v._f):vt(a),ue=a.type===$e.BLUR||a.type===$e.FOCUS_OUT,js=!jr(v._f)&&!r.resolver&&!b(t.errors,u)&&!v._f.deps||Gr(ue,b(t.touchedFields,u),t.isSubmitted,P,C),ct=Bt(u,l,ue);L(n,u,Be),ue?(!c||!c.readOnly)&&(v._f.onBlur&&v._f.onBlur(a),d&&d(0)):v._f.onChange&&v._f.onChange(a);const ut=A(u,Be,ue),Us=!Z(ut)||ct;if(!ue&&g.state.next({name:u,type:a.type,values:q(n)}),js)return(f.isValid||m.isValid)&&(r.mode==="onBlur"?ue&&h():ue||h()),Us&&g.state.next({name:u,...ct?{}:ut});if(!ue&&ct&&g.state.next({...t}),r.resolver){const{errors:br}=await W([u]);if(p(Be),S){const Ws=Ot(t.errors,s,u),Sr=Ot(br,s,Ws.name||u);O=Sr.error,u=Sr.name,R=Z(br)}}else x([u],!0),O=(await Ht(v,l.disabled,n,V,r.shouldUseNativeValidation))[u],x([u]),p(Be),S&&(O?R=!1:(f.isValid||m.isValid)&&(R=await G(s,!0)));S&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&he(v._f.deps),M(u,R,O,ut))}},Fe=(a,c)=>{if(b(t.errors,c)&&a.focus)return a.focus(),1},he=async(a,c={})=>{let u,S;const v=pe(a);if(r.resolver){const p=await se(H(a)?a:v);u=Z(p),S=a?!v.some(C=>b(p,C)):u}else a?(S=(await Promise.all(v.map(async p=>{const C=b(s,p);return await G(C&&C._f?{[p]:C}:C)}))).every(Boolean),!(!S&&!t.isValid)&&h()):S=u=await G(s);return g.state.next({...!Y(a)||(f.isValid||m.isValid)&&u!==t.isValid?{}:{name:a},...r.resolver||!a?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!S&&be(s,Fe,a?v:l.mount),S},Pe=(a,c)=>{let u={...i.mount?n:o};return c&&(u=wt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),H(a)?u:Y(a)?b(u,a):a.map(S=>b(u,S))},fr=(a,c)=>({invalid:!!b((c||t).errors,a),isDirty:!!b((c||t).dirtyFields,a),error:b((c||t).errors,a),isValidating:!!b(t.validatingFields,a),isTouched:!!b((c||t).touchedFields,a)}),Ps=a=>{a&&pe(a).forEach(c=>U(t.errors,c)),g.state.next({errors:a?t.errors:{}})},yr=(a,c,u)=>{const S=(b(s,a,{_f:{}})._f||{}).ref,v=b(t.errors,a)||{},{ref:p,message:C,type:P,...O}=v;L(t.errors,a,{...O,...c,ref:S}),g.state.next({name:a,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&S&&S.focus&&S.focus()},Bs=(a,c)=>re(a)?g.state.subscribe({next:u=>"values"in u&&a(D(void 0,c),u)}):D(a,c,!0),mr=a=>g.state.subscribe({next:c=>{Wr(a.name,c.name,a.exact)&&Ur(c,a.formState||f,Is,a.reRenderRoot)&&a.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Os=a=>(i.mount=!0,m={...m,...a.formState},mr({...a,formState:m})),it=(a,c={})=>{for(const u of a?pe(a):l.mount)l.mount.delete(u),l.array.delete(u),c.keepValue||(U(s,u),U(n,u)),!c.keepError&&U(t.errors,u),!c.keepDirty&&U(t.dirtyFields,u),!c.keepTouched&&U(t.touchedFields,u),!c.keepIsValidating&&U(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&U(o,u);g.state.next({values:q(n)}),g.state.next({...t,...c.keepDirty?{isDirty:ie()}:{}}),!c.keepIsValid&&h()},hr=({disabled:a,name:c})=>{(X(a)&&i.mount||a||l.disabled.has(c))&&(a?l.disabled.add(c):l.disabled.delete(c))},at=(a,c={})=>{let u=b(s,a);const S=X(c.disabled)||X(r.disabled);return L(s,a,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:a}},name:a,mount:!0,...c}}),l.mount.add(a),u?hr({disabled:X(c.disabled)?c.disabled:r.disabled,name:a}):z(a,!0,c.value),{...S?{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:a,onChange:ae,onBlur:ae,ref:v=>{if(v){at(a,c),u=b(s,a);const p=H(v.value)&&v.querySelectorAll&&v.querySelectorAll("input,select,textarea")[0]||v,C=Br(p),P=u._f.refs||[];if(C?P.find(O=>O===p):p===u._f.ref)return;L(s,a,{_f:{...u._f,...C?{refs:[...P.filter(Ke),p,...Array.isArray(b(o,a))?[{}]:[]],ref:{type:p.type,name:a}}:{ref:p}}}),z(a,!1,void 0,p)}else u=b(s,a,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(bt(l.array,a)&&i.action)&&l.unMount.add(a)}}},lt=()=>r.shouldFocusError&&be(s,Fe,l.mount),Ts=a=>{X(a)&&(g.state.next({disabled:a}),be(s,(c,u)=>{const S=b(s,u);S&&(c.disabled=S._f.disabled||a,Array.isArray(S._f.refs)&&S._f.refs.forEach(v=>{v.disabled=S._f.disabled||a}))},0,!1))},gr=(a,c)=>async u=>{let S;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let v=q(n);if(g.state.next({isSubmitting:!0}),r.resolver){const{errors:p,values:C}=await W();t.errors=p,v=q(C)}else await G(s);if(l.disabled.size)for(const p of l.disabled)U(v,p);if(U(t.errors,"root"),Z(t.errors)){g.state.next({errors:{}});try{await a(v,u)}catch(p){S=p}}else c&&await c({...t.errors},u),lt(),setTimeout(lt);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!S,submitCount:t.submitCount+1,errors:t.errors}),S)throw S},Hs=(a,c={})=>{b(s,a)&&(H(c.defaultValue)?J(a,q(b(o,a))):(J(a,c.defaultValue),L(o,a,q(c.defaultValue))),c.keepTouched||U(t.touchedFields,a),c.keepDirty||(U(t.dirtyFields,a),t.isDirty=c.defaultValue?ie(a,q(b(o,a))):ie()),c.keepError||(U(t.errors,a),f.isValid&&h()),g.state.next({...t}))},_r=(a,c={})=>{const u=a?q(a):o,S=q(u),v=Z(a),p=v?o:S;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const C=new Set([...l.mount,...Object.keys(fe(o,n))]);for(const P of Array.from(C))b(t.dirtyFields,P)?L(p,P,b(n,P)):J(P,b(p,P))}else{if(He&&H(a))for(const C of l.mount){const P=b(s,C);if(P&&P._f){const O=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(Ee(O)){const R=O.closest("form");if(R){R.reset();break}}}}if(c.keepFieldsRef)for(const C of l.mount)J(C,b(p,C));else s={}}n=r.shouldUnregister?c.keepDefaultValues?q(o):{}:q(p),g.array.next({values:{...p}}),g.state.next({values:{...p}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(p),i.watch=!!r.shouldUnregister,g.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:v?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!te(a,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:v?{}:c.keepDirtyValues?c.keepDefaultValues&&n?fe(o,n):t.dirtyFields:c.keepDefaultValues&&a?fe(o,a):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},pr=(a,c)=>_r(re(a)?a(n):a,c),Ms=(a,c={})=>{const u=b(s,a),S=u&&u._f;if(S){const v=S.refs?S.refs[0]:S.ref;v.focus&&(v.focus(),c.shouldSelect&&re(v.select)&&v.select())}},Is=a=>{t={...t,...a}},vr={control:{register:at,unregister:it,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:mr,_runSchema:W,_focusError:lt,_getWatch:D,_getDirty:ie,_setValid:h,_setFieldArray:E,_setDisabledField:hr,_setErrors:$,_getFieldArray:B,_reset:_r,_resetDefaultValues:()=>re(r.defaultValues)&&r.defaultValues().then(a=>{pr(a,r.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Ts,_subjects:g,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return i},set _state(a){i=a},get _defaultValues(){return o},get _names(){return l},set _names(a){l=a},get _formState(){return t},get _options(){return r},set _options(a){r={...r,...a}}},subscribe:Os,trigger:he,register:at,handleSubmit:gr,watch:Bs,setValue:J,getValues:Pe,reset:pr,resetField:Hs,clearErrors:Ps,unregister:it,setError:yr,setFocus:Ms,getFieldState:fr};return{...vr,formControl:vr}}function Jr(e={}){const r=w.useRef(void 0),t=w.useRef(void 0),[s,o]=w.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:i,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ue(()=>{const i=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,i},[n]),w.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),w.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),w.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),w.useEffect(()=>{if(n._proxyFormState.isDirty){const i=n._getDirty();i!==s.isDirty&&n._subjects.state.next({isDirty:i})}},[n,s.isDirty]),w.useEffect(()=>{e.values&&!te(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(i=>({...i}))):n._resetDefaultValues()},[n,e.values]),w.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=Ft(s,n),r.current}const Mt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=b(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Xe=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Mt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Mt(o,t,e))}},It=(e,r)=>{r.shouldUseNativeValidation&&Xe(e,r);const t={};for(const s in e){const o=b(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Xr(r.names||Object.keys(e),s)){const i=Object.assign({},b(t,s));L(i,"root",n),L(t,s,i)}else L(t,s,n)}return t},Xr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function Ut(e,r,t){function s(l,d){var y;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(y=l._zod).traits??(y.traits=new Set),l._zod.traits.add(e),r(l,d);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function i(l){var d;const y=t!=null&&t.Parent?new n:this;s(y,l),(d=y._zod).deferred??(d.deferred=[]);for(const f of y._zod.deferred)f();return y}return Object.defineProperty(i,"init",{value:s}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var d,y;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(y=(d=l==null?void 0:l._zod)==null?void 0:d.traits)==null?void 0:y.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Yr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Wt(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Gt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ne(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,i,l,d,y;const s={...e,path:e.path??[]};if(!e.message){const f=Ne((i=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:i.call(n,e))??Ne((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ne((d=t.customError)==null?void 0:d.call(t,e))??Ne((y=t.localeError)==null?void 0:y.call(t,e))??"Invalid input";s.message=f}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const Zt=(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,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ts=Ut("$ZodError",Zt),Qt=Ut("$ZodError",Zt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise)throw new Yr;if(i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return i.value})(Qt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return i.value})(Qt);function Kt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function os(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(f){return f.errors.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function ns(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(f){return f.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function is(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(Kt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(i){return n.shouldUseNativeValidation&&Xe({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(i))return{values:{},errors:It(os(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Kt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(i){return n.shouldUseNativeValidation&&Xe({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return l instanceof ts})(i))return{values:{},errors:It(ns(i.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Jt=w.createContext(null);function Xt(){const e=w.useContext(Jt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function as({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:i,style:l,formProps:d}){const y=Jr({resolver:t?is(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),f=y.handleSubmit(e);return _.jsx(Jt.Provider,{value:y,children:_.jsx("form",{...d,className:i,style:l,onSubmit:f,children:typeof r=="function"?r(y):r})})}const ls=as,cs={formError:"FormError-module__formError___kaUBn"},Yt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=T(),i={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:l,style:i,role:"alert","aria-live":"polite",children:r})},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"},Rt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:i,labelProps:l,children:d,className:y,style:f,divProps:m})=>{const g=T(),V=[me.formGroup,r?me.error:"",e?me.disabled:"",y].filter(Boolean).join(" "),k={"--form-group-margin-bottom":`calc(${g.fonts.rhythm} * 0.35)`,...f},h=w.Children.map(d,x=>{if(w.isValidElement(x)){const E={};if(e&&x.props.disabled===void 0&&(E.disabled=!0),r&&x.props.error===void 0&&(E.error=!0),o&&x.props.id===void 0&&(E.id=o),Object.keys(E).length>0)return w.cloneElement(x,E)}return x});return _.jsxs("div",{...m,className:V,style:k,children:[n&&_.jsxs(xe,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&_.jsxs("span",{className:me.required,"aria-label":"required",children:[" ","*"]})]}),_.jsx("div",{className:`${me.inputWrapper} ${s?me.indented:""}`,children:h}),r&&i&&_.jsx(Yt,{children:i})]})};function ce({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:i,style:l,indent:d,labelProps:y}){const{control:f}=Xt(),{field:m,fieldState:{error:g}}=Pr({name:e,control:f,rules:o});return _.jsx(Rt,{label:r,name:e,error:!!g,errorMessage:g==null?void 0:g.message,disabled:n,required:t,className:i,style:l,indent:d,labelProps:y,children:s({value:m.value,onChange:m.onChange,onBlur:m.onBlur,name:m.name,error:!!g,indent:d})})}const Ye={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},us=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,type:d="text",value:y="",onChange:f,onBlur:m,className:g,style:V,inputProps:k})=>{const h=T(),x=h.colors.error,E=r?x:t||h.colors.primary,F=us({color:E,disabled:e,fontSize:h.fonts.size,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--input-padding-small":`calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:h.border.width,borderRadius:h.border.radius,color:F.color,fontSize:F.fontSize,opacity:F.opacity,...V},z=[Ye.input,s==="small"?Ye.sizeSmall:Ye.sizeLarge,g].filter(Boolean).join(" ");return _.jsx("input",{...k,className:z,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,type:d,value:y,style:$})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:g})=>_.jsx(er,{...l,name:m,value:d||"",onChange:V=>y(V.target.value),inputProps:{onBlur:f},error:g})})}const Re={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},fs=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),tr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,rows:d=3,value:y="",onChange:f,onBlur:m,className:g,style:V,textareaProps:k})=>{const h=T(),x=h.colors.error,E=r?x:t||h.colors.primary,F=fs({color:E,disabled:e,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--textarea-padding-small":`calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:h.border.width,borderRadius:h.border.radius,color:F.color,fontSize:h.fonts.size,opacity:F.opacity,...V},z=[Re.textarea,s==="small"?Re.sizeSmall:Re.sizeLarge,g].filter(Boolean).join(" ");return _.jsx("textarea",{...k,className:z,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,rows:d,value:y,style:$})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:g})=>_.jsx(tr,{...l,name:m,value:d||"",onChange:V=>y(V.target.value),onBlur:f,error:g})})}const et={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},ms=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const i=`
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(i)}")`})(e)}),rr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i="",value:l="",onChange:d,onBlur:y,children:f,className:m,style:g,selectProps:V})=>{const k=T(),h=k.colors.error,C=r?h:t||k.colors.primary,E=ms({color:C,disabled:e}),F={"--select-padding-small":`calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * 1.2) calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * 1.4) calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,backgroundImage:E.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:E.borderColor,borderWidth:k.border.width,borderRadius:k.border.radius,color:E.color,cursor:E.cursor,fontSize:k.fonts.size,opacity:E.opacity,...g},$=[et.select,s==="small"?et.sizeSmall:et.sizeLarge,m].filter(Boolean).join(" ");return _.jsxs("select",{...V,className:$,disabled:e,id:o,name:n,onChange:d,onBlur:y,value:l,style:F,children:[i!==""&&_.jsx("option",{disabled:!0,value:"",children:i}),f]})};function hs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:l,...d}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,onBlur:m,name:g,error:V})=>_.jsx(rr,{...d,name:g,value:y||"",onChange:k=>f(k.target.value),onBlur:m,error:V,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...i}){return _.jsx(ce,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:y,error:f})=>_.jsx(xe,{...i,name:y,checked:!!l,onChange:m=>d(m.target.checked),error:f})})}const tt={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},_s=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),rt=({color:e,checked:r=!1,disabled:t=!1,error:s=!1,name:o,id:n,onChange:i,label:l,labelStyle:d,className:y,style:f,divProps:m})=>{const g=T(),V=n||gt(),k=g.colors.error,h=s?k:e||g.colors.primary,C=_s({color:h,disabled:t}),E=W=>{t||i(W)},F={cursor:C.cursor,fontSize:g.fonts.size,opacity:C.opacity,...f},$={width:"1em"},z={fill:"transparent",strokeWidth:"12.5",stroke:C.radioColor},A={fill:C.radioColor},M=[tt.container,y].filter(Boolean).join(" ");return _.jsxs("div",{...m,className:M,style:F,children:[_.jsx("input",{id:V,checked:r,disabled:t,name:o,onChange:W=>E({target:{checked:W.target.checked,name:o,type:"radio"}}),style:{display:"none"},type:"radio"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>E({target:{checked:!r,name:o,type:"radio"}}),className:tt.svg,style:$,children:[_.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:z}),r&&_.jsx("circle",{cx:"50",cy:"50",r:"25",style:A})]}),l&&_.jsx(Ce,{htmlFor:V,className:tt.label,style:{paddingBottom:0,...d},color:C.radioColor,disabled:t,error:s,children:l})]})};function ps({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,value:l,...d}){return _.jsx(ce,{name:e,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,name:m,error:g})=>_.jsx(rt,{...d,name:m,checked:y===l,onChange:()=>f(l),error:g,label:r})})}function vs({name:e,label:r,required:t,options:s,disabled:o,className:n,style:i,indent:l=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:o,className:n,style:i,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:d,onChange:y,name:f,error:m})=>_.jsx(_.Fragment,{children:s.map(g=>_.jsx(rt,{name:f,checked:d===g.value,onChange:()=>y(g.value),label:g.label,disabled:o||g.disabled,error:m},g.value))})})}function bs({name:e,label:r,required:t,options:s,children:o,disabled:n,className:i,style:l,indent:d=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:n,className:i,style:l,indent:d,labelProps:{style:{marginBottom:".25em"}},children:({value:y,onChange:f,name:m,error:g})=>{const V=Array.isArray(y)?y:[],k=(h,C)=>{f(C?[...V,h]:V.filter(E=>E!==h))};return _.jsx(_.Fragment,{children:s?s.map(h=>_.jsx(xe,{name:`${m}[]`,checked:V.includes(h.value),onChange:C=>k(h.value,C.target.checked),label:h.label,disabled:n||h.disabled,error:g},h.value)):w.Children.map(o,h=>{if(w.isValidElement(h)&&h.type===xe){const C=h.props.value||h.props.name;return w.cloneElement(h,{name:`${m}[]`,checked:V.includes(C),onChange:E=>k(C,E.target.checked),error:g||h.props.error,disabled:n||h.props.disabled})}return h})})}})}const Se={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Ss=({compact:e,color:r,visible:t,border:s})=>{const o=T();return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius,color:r||"inherit",display:t?"flex":"none"}},sr=({color:e,visible:r,compact:t,hamburgerRef:s,open:o=!1,border:n,setOpen:i,className:l,style:d})=>{const y=Ss({compact:t,color:e,visible:r,border:n}),f=[Se.hamburger,o?Se.open:"",l].filter(Boolean).join(" ");return _.jsxs("button",{ref:s,className:f,onClick:()=>i(!o),style:{...y,...d},"aria-label":"Toggle menu","aria-expanded":o,children:[_.jsx("div",{className:Se.line}),_.jsx("div",{className:Se.line}),_.jsx("div",{className:Se.line})]})},or={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Fs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{"--header-max-width":r||m.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||m.layout.paddingSm:i||m.layout.padding,"--header-margin":l,"--header-gap":d,backgroundColor:y,color:f}},ne=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const i=window.matchMedia(e);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return w.useSyncExternalStore(t,s,o)},nr=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakpoint:f,fixed:m=!1,children:g,className:V,style:k,headerProps:h})=>{const C=T(),E=f||C.breakpoints.sm,{maxWidth:F,unit:$}=ge(E),z=ne(`(max-width: ${F}${$})`),A=Fs({isSmallScreen:z,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),M=[or.container,V].filter(Boolean).join(" "),W=m?{position:"fixed",top:0,left:0,right:0,zIndex:1e3}:{};return _.jsx("header",{...h,className:or.header,style:W,children:_.jsx("div",{className:M,style:{...A,...k},children:g})})},De={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:i})=>{const l=T();return w.useMemo(()=>{const{rhythm:d}=l.fonts;return{...e?{"--mobile-nav-background":t||l.colors.accent,"--mobile-nav-color":s||l.colors.primary,"--mobile-nav-active-background":o||l.colors.primary,"--mobile-nav-active-color":n||l.colors.accent,"--mobile-nav-button-hover-text-color":i||t||l.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,i,l.colors.accent,l.colors.primary,l.fonts,e,r])},ws=({mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o,breakpoints:n,children:i,className:l,style:d,navProps:y})=>{const[f,m]=w.useState(!1),g=w.useRef(null),V=w.useRef(null),h={...T().breakpoints,...n},{maxWidth:C,unit:E}=ge(h.md),{maxWidth:F,unit:$}=ge(h.sm),z=ne(`(max-width: ${C}${E})`),A=ne(`(max-width: ${F}${$})`),M=Vs({isMobile:z,isCompact:A,mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o});w.useEffect(()=>{const G=oe=>{!V.current||V.current.contains(oe.target)||g.current&&g.current.contains(oe.target)||m(!1)};return document.addEventListener("mousedown",G),()=>{document.removeEventListener("mousedown",G)}},[g,V,m]);const W=[De.nav,z?De.navMobile:De.navDesktop,z&&f?De.open:"",l].filter(Boolean).join(" "),se=G=>{if(!z)return;G.target.closest("a, button")&&m(!1)};return _.jsxs(_.Fragment,{children:[_.jsx(sr,{hamburgerRef:g,visible:z,compact:A,open:f,setOpen:m}),_.jsx("nav",{...y,ref:V,className:W,style:{...M,...d},onClickCapture:se,children:typeof i=="function"?i({setOpen:m}):i})]})},ir=({color:e,backgroundColor:r,fullScreen:t=!0,className:s,style:o,divProps:n})=>{const i=T(),l=e||i.colors.primary,d=r||i.colors.secondary,y=_.jsx("div",{...t?void 0:n,className:t?void 0:s,style:{fontSize:"2.5em",borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...t?{}:o,border:`0.1em solid ${l}`,borderTop:`0.1em solid ${d}`}}),f=_.jsxs(_.Fragment,{children:[y,_.jsx("style",{children:`
17
+ `.trim();return`url("data:image/svg+xml,${encodeURIComponent(i)}")`})(e)}),rr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i="",value:l="",onChange:d,onBlur:y,children:f,className:m,style:g,selectProps:V})=>{const k=T(),h=k.colors.error,x=r?h:t||k.colors.primary,E=ms({color:x,disabled:e}),F={"--select-padding-small":`calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * 1.2) calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * 1.4) calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,backgroundImage:E.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:E.borderColor,borderWidth:k.border.width,borderRadius:k.border.radius,color:E.color,cursor:E.cursor,fontSize:k.fonts.size,opacity:E.opacity,...g},$=[et.select,s==="small"?et.sizeSmall:et.sizeLarge,m].filter(Boolean).join(" ");return _.jsxs("select",{...V,className:$,disabled:e,id:o,name:n,onChange:d,onBlur:y,value:l,style:F,children:[i!==""&&_.jsx("option",{disabled:!0,value:"",children:i}),f]})};function hs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:l,...d}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,onBlur:m,name:g,error:V})=>_.jsx(rr,{...d,name:g,value:y||"",onChange:k=>f(k.target.value),onBlur:m,error:V,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...i}){return _.jsx(ce,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:y,error:f})=>_.jsx(Ce,{...i,name:y,checked:!!l,onChange:m=>d(m.target.checked),error:f})})}const tt={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},_s=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),rt=({color:e,checked:r=!1,disabled:t=!1,error:s=!1,name:o,id:n,onChange:i,label:l,labelStyle:d,className:y,style:f,divProps:m})=>{const g=T(),V=n||gt(),k=g.colors.error,h=s?k:e||g.colors.primary,x=_s({color:h,disabled:t}),E=W=>{t||i(W)},F={cursor:x.cursor,fontSize:g.fonts.size,opacity:x.opacity,...f},$={width:"1em"},z={fill:"transparent",strokeWidth:"12.5",stroke:x.radioColor},A={fill:x.radioColor},M=[tt.container,y].filter(Boolean).join(" ");return _.jsxs("div",{...m,className:M,style:F,children:[_.jsx("input",{id:V,checked:r,disabled:t,name:o,onChange:W=>E({target:{checked:W.target.checked,name:o,type:"radio"}}),style:{display:"none"},type:"radio"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>E({target:{checked:!r,name:o,type:"radio"}}),className:tt.svg,style:$,children:[_.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:z}),r&&_.jsx("circle",{cx:"50",cy:"50",r:"25",style:A})]}),l&&_.jsx(xe,{htmlFor:V,className:tt.label,style:{paddingBottom:0,...d},color:x.radioColor,disabled:t,error:s,children:l})]})};function ps({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,value:l,...d}){return _.jsx(ce,{name:e,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,name:m,error:g})=>_.jsx(rt,{...d,name:m,checked:y===l,onChange:()=>f(l),error:g,label:r})})}function vs({name:e,label:r,required:t,options:s,disabled:o,className:n,style:i,indent:l=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:o,className:n,style:i,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:d,onChange:y,name:f,error:m})=>_.jsx(_.Fragment,{children:s.map(g=>_.jsx(rt,{name:f,checked:d===g.value,onChange:()=>y(g.value),label:g.label,disabled:o||g.disabled,error:m},g.value))})})}function bs({name:e,label:r,required:t,options:s,children:o,disabled:n,className:i,style:l,indent:d=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:n,className:i,style:l,indent:d,labelProps:{style:{marginBottom:".25em"}},children:({value:y,onChange:f,name:m,error:g})=>{const V=Array.isArray(y)?y:[],k=(h,x)=>{f(x?[...V,h]:V.filter(E=>E!==h))};return _.jsx(_.Fragment,{children:s?s.map(h=>_.jsx(Ce,{name:`${m}[]`,checked:V.includes(h.value),onChange:x=>k(h.value,x.target.checked),label:h.label,disabled:n||h.disabled,error:g},h.value)):w.Children.map(o,h=>{if(w.isValidElement(h)&&h.type===Ce){const x=h.props.value||h.props.name;return w.cloneElement(h,{name:`${m}[]`,checked:V.includes(x),onChange:E=>k(x,E.target.checked),error:g||h.props.error,disabled:n||h.props.disabled})}return h})})}})}const Se={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Ss=({compact:e,color:r,visible:t,border:s})=>{const o=T();return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius,color:r||"inherit",display:t?"flex":"none"}},sr=({color:e,visible:r,compact:t,hamburgerRef:s,open:o=!1,border:n,setOpen:i,className:l,style:d})=>{const y=Ss({compact:t,color:e,visible:r,border:n}),f=o?{position:"fixed",right:t?"0.5em":"1em",top:"1em",zIndex:11}:{},m=[Se.hamburger,o?Se.open:"",l].filter(Boolean).join(" ");return _.jsxs("button",{ref:s,className:m,onClick:()=>i(!o),style:{...y,...f,...d},"aria-label":"Toggle menu","aria-expanded":o,children:[_.jsx("div",{className:Se.line}),_.jsx("div",{className:Se.line}),_.jsx("div",{className:Se.line})]})},or={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Fs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{"--header-max-width":r||m.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||m.layout.paddingSm:i||m.layout.padding,"--header-margin":l,"--header-gap":d,backgroundColor:y,color:f}},ne=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const i=window.matchMedia(e);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return w.useSyncExternalStore(t,s,o)},nr=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakpoint:f,fixed:m=!1,children:g,className:V,style:k,headerProps:h})=>{const x=T(),E=f||x.breakpoints.sm,{maxWidth:F,unit:$}=ge(E),z=ne(`(max-width: ${F}${$})`),A=Fs({isSmallScreen:z,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),M=[or.container,V].filter(Boolean).join(" "),W=m?{position:"fixed",top:0,left:0,right:0,zIndex:1e3}:{};return _.jsx("header",{...h,className:or.header,style:W,children:_.jsx("div",{className:M,style:{...A,...k},children:g})})},De={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:i})=>{const l=T();return w.useMemo(()=>{const{rhythm:d}=l.fonts;return{...e?{"--mobile-nav-background":t||l.colors.accent,"--mobile-nav-color":s||l.colors.primary,"--mobile-nav-active-background":o||l.colors.primary,"--mobile-nav-active-color":n||l.colors.accent,"--mobile-nav-button-hover-text-color":i||t||l.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,i,l.colors.accent,l.colors.primary,l.fonts,e,r])},ws=({mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o,breakpoints:n,children:i,className:l,style:d,navProps:y})=>{const[f,m]=w.useState(!1),g=w.useRef(null),V=w.useRef(null),h={...T().breakpoints,...n},{maxWidth:x,unit:E}=ge(h.md),{maxWidth:F,unit:$}=ge(h.sm),z=ne(`(max-width: ${x}${E})`),A=ne(`(max-width: ${F}${$})`),M=Vs({isMobile:z,isCompact:A,mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o});w.useEffect(()=>{const G=oe=>{!V.current||V.current.contains(oe.target)||g.current&&g.current.contains(oe.target)||m(!1)};return document.addEventListener("mousedown",G),()=>{document.removeEventListener("mousedown",G)}},[g,V,m]);const W=[De.nav,z?De.navMobile:De.navDesktop,z&&f?De.open:"",l].filter(Boolean).join(" "),se=G=>{if(!z)return;G.target.closest("a, button")&&m(!1)};return _.jsxs(_.Fragment,{children:[_.jsx(sr,{hamburgerRef:g,visible:z,compact:A,open:f,setOpen:m}),_.jsx("nav",{...y,ref:V,className:W,style:{...M,...d},onClickCapture:se,children:typeof i=="function"?i({setOpen:m}):i})]})},ir=({color:e,backgroundColor:r,fullScreen:t=!0,className:s,style:o,divProps:n})=>{const i=T(),l=e||i.colors.primary,d=r||i.colors.secondary,y=_.jsx("div",{...t?void 0:n,className:t?void 0:s,style:{fontSize:"2.5em",borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...t?{}:o,border:`0.1em solid ${l}`,borderTop:`0.1em solid ${d}`}}),f=_.jsxs(_.Fragment,{children:[y,_.jsx("style",{children:`
18
18
  @keyframes spin {
19
19
  0% { transform: rotate(0deg); }
20
20
  100% { transform: rotate(360deg); }
21
21
  }
22
- `})]});return t?_.jsx("div",{...n,className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:f}):f},ks=({children:e,loadingComponent:r})=>{const[t,s]=w.useState(!1);return w.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?_.jsx(_.Fragment,{children:e}):r||_.jsx(ir,{})},st={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},Cs=({direction:e="column",children:r,className:t,style:s,divProps:o})=>{const n=[st.stack,e==="row"?st.horizontal:st.vertical,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:n,style:s,children:r})},ar={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},ot=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,verticalRhythm:f=3,children:m,className:g,style:V,sectionProps:k})=>{const h=T(),C=ne(`(min-width: ${h.breakpoints.sm})`),E={backgroundColor:e,color:r||h.fonts.color,margin:d,...V},F=`calc(${h.fonts.rhythm} * ${f})`,$=C?i||h.layout.padding:l||h.layout.paddingSm,z={"--max-width":t||h.layout.maxWidth,"--min-width":s,"--width":o,"--height":n,"--section-padding":`${F} ${$}`,"--gap":y},A=[ar.section,g].filter(Boolean).join(" ");return _.jsx("section",{...k,className:A,style:E,children:_.jsx("div",{className:ar.innerDiv,style:z,children:m})})},lr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},xs=({isMd:e=!1,isLg:r=!1,theme:t})=>w.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",i="1.125rem";return r?(o=`calc(${s} * 4) 0`,n="3.5rem",i="1.5rem"):e&&(o=`calc(${s} * 3.5) 0`,n="3rem",i="1.25rem"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":i,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),zs=({color:e,breakpoints:r,children:t,className:s,style:o,...n})=>{const i=T(),l=[lr.hero,s].filter(Boolean).join(" "),d=(r==null?void 0:r.md)||i.breakpoints.md,y=(r==null?void 0:r.lg)||i.breakpoints.lg,f=ne(`(min-width: ${d})`),m=ne(`(min-width: ${y})`),g=xs({isMd:f,isLg:m,theme:i});return _.jsx(ot,{className:l,color:e||i.fonts.color,style:{...g,...o},...n,children:_.jsx("div",{className:lr.content,children:t})})},cr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},$s=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{maxWidth:r||m.layout.maxWidth,minWidth:t,width:s,height:o,padding:e?n||m.layout.paddingSm:i||m.layout.padding,margin:l,gap:d,backgroundColor:y,color:f||m.fonts.color}},ur=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakPoint:f,children:m,className:g,style:V,footerProps:k})=>{const h=T(),C=f||h.breakpoints.sm,{maxWidth:E,unit:F}=ge(C),$=ne(`(max-width: ${E}${F})`),z=$s({isSmallScreen:$,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),A=[cr.container,g].filter(Boolean).join(" ");return _.jsx("footer",{...k,className:cr.footer,children:_.jsx("div",{className:A,style:{...z,...V},children:m})})},Le={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},Es=({isMd:e=!1,theme:r})=>w.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]),As=({breakpoint:e,icon:r,title:t,children:s,className:o,style:n,divProps:i})=>{const l=T(),d=[Le.card,o].filter(Boolean).join(" "),y=e||l.breakpoints.md,f=ne(`(min-width: ${y})`),m=Es({isMd:f,theme:l});return _.jsxs("div",{...i,className:d,style:{...m,...n},children:[r&&_.jsx("div",{className:Le.icon,children:r}),_.jsx("h3",{className:Le.title,children:t}),_.jsx("div",{className:Le.content,children:s})]})},dr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},Ns=({columns:e,isMd:r=!1,isLg:t=!1})=>w.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]),Ds=({columns:e=3,breakpoints:r,gap:t,children:s,className:o,style:n,...i})=>{const l=T(),d=[dr.section,o].filter(Boolean).join(" "),y=(r==null?void 0:r.md)||l.breakpoints.md,f=(r==null?void 0:r.lg)||l.breakpoints.lg,m=ne(`(min-width: ${y})`),g=ne(`(min-width: ${f})`),V=Ns({columns:e,isMd:m,isLg:g}),k={"--section-padding-vertical":`calc(${l.fonts.rhythm} * 2)`},h={...V,gap:t,...n};return _.jsx(ot,{className:d,style:k,...i,children:_.jsx("div",{className:dr.grid,style:h,children:s})})},nt={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},Ls=({header:e,footer:r,children:t,className:s,style:o,headerProps:n,footerProps:i,divProps:l,mainProps:d})=>{const y=[nt.layoutContainer,s].filter(Boolean).join(" ");return _.jsxs("div",{...l,className:y,style:o,children:[_.jsxs("div",{className:nt.content,children:[e&&_.jsx(nr,{...n,children:e}),_.jsx("main",{...d,className:nt.main,children:t})]}),r&&_.jsx(ur,{...i,children:r})]})};N.Button=wr,N.CSSReset=Er,N.Checkbox=xe,N.FeatureCard=As,N.FeatureGridSection=Ds,N.Footer=ur,N.Form=ls,N.FormCheckbox=gs,N.FormCheckboxGroup=bs,N.FormError=Yt,N.FormField=ce,N.FormGroup=Rt,N.FormInput=ds,N.FormLabel=Ce,N.FormRadio=ps,N.FormRadioGroup=vs,N.FormSelect=hs,N.FormTextarea=ys,N.Hamburger=sr,N.Header=nr,N.Hero=zs,N.Input=er,N.LoadingSpinner=ir,N.PageLayout=Ls,N.Radio=rt,N.ResponsiveNav=ws,N.ResponsiveSection=ot,N.Select=rr,N.Stack=Cs,N.StyleLoader=ks,N.Textarea=tr,N.ThemeProvider=Vr,N.parseBreakpoint=ge,N.useFormContext=Xt,N.useTheme=T,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
22
+ `})]});return t?_.jsx("div",{...n,className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:f}):f},ks=({children:e,loadingComponent:r})=>{const[t,s]=w.useState(!1);return w.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?_.jsx(_.Fragment,{children:e}):r||_.jsx(ir,{})},st={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},xs=({direction:e="column",children:r,className:t,style:s,divProps:o})=>{const n=[st.stack,e==="row"?st.horizontal:st.vertical,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:n,style:s,children:r})},ar={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},ot=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,verticalRhythm:f=3,children:m,className:g,style:V,sectionProps:k})=>{const h=T(),x=ne(`(min-width: ${h.breakpoints.sm})`),E={backgroundColor:e,color:r||h.fonts.color,margin:d,...V},F=`calc(${h.fonts.rhythm} * ${f})`,$=x?i||h.layout.padding:l||h.layout.paddingSm,z={"--max-width":t||h.layout.maxWidth,"--min-width":s,"--width":o,"--height":n,"--section-padding":`${F} ${$}`,"--gap":y},A=[ar.section,g].filter(Boolean).join(" ");return _.jsx("section",{...k,className:A,style:E,children:_.jsx("div",{className:ar.innerDiv,style:z,children:m})})},lr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},Cs=({isMd:e=!1,isLg:r=!1,theme:t})=>w.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",i="1.125rem";return r?(o=`calc(${s} * 4) 0`,n="3.5rem",i="1.5rem"):e&&(o=`calc(${s} * 3.5) 0`,n="3rem",i="1.25rem"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":i,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),zs=({color:e,breakpoints:r,children:t,className:s,style:o,...n})=>{const i=T(),l=[lr.hero,s].filter(Boolean).join(" "),d=(r==null?void 0:r.md)||i.breakpoints.md,y=(r==null?void 0:r.lg)||i.breakpoints.lg,f=ne(`(min-width: ${d})`),m=ne(`(min-width: ${y})`),g=Cs({isMd:f,isLg:m,theme:i});return _.jsx(ot,{className:l,color:e||i.fonts.color,style:{...g,...o},...n,children:_.jsx("div",{className:lr.content,children:t})})},cr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},$s=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{maxWidth:r||m.layout.maxWidth,minWidth:t,width:s,height:o,padding:e?n||m.layout.paddingSm:i||m.layout.padding,margin:l,gap:d,backgroundColor:y,color:f||m.fonts.color}},ur=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakPoint:f,children:m,className:g,style:V,footerProps:k})=>{const h=T(),x=f||h.breakpoints.sm,{maxWidth:E,unit:F}=ge(x),$=ne(`(max-width: ${E}${F})`),z=$s({isSmallScreen:$,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),A=[cr.container,g].filter(Boolean).join(" ");return _.jsx("footer",{...k,className:cr.footer,children:_.jsx("div",{className:A,style:{...z,...V},children:m})})},Le={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},Es=({isMd:e=!1,theme:r})=>w.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]),As=({breakpoint:e,icon:r,title:t,children:s,className:o,style:n,divProps:i})=>{const l=T(),d=[Le.card,o].filter(Boolean).join(" "),y=e||l.breakpoints.md,f=ne(`(min-width: ${y})`),m=Es({isMd:f,theme:l});return _.jsxs("div",{...i,className:d,style:{...m,...n},children:[r&&_.jsx("div",{className:Le.icon,children:r}),_.jsx("h3",{className:Le.title,children:t}),_.jsx("div",{className:Le.content,children:s})]})},dr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},Ns=({columns:e,isMd:r=!1,isLg:t=!1})=>w.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]),Ds=({columns:e=3,breakpoints:r,gap:t,children:s,className:o,style:n,...i})=>{const l=T(),d=[dr.section,o].filter(Boolean).join(" "),y=(r==null?void 0:r.md)||l.breakpoints.md,f=(r==null?void 0:r.lg)||l.breakpoints.lg,m=ne(`(min-width: ${y})`),g=ne(`(min-width: ${f})`),V=Ns({columns:e,isMd:m,isLg:g}),k={"--section-padding-vertical":`calc(${l.fonts.rhythm} * 2)`},h={...V,gap:t,...n};return _.jsx(ot,{className:d,style:k,...i,children:_.jsx("div",{className:dr.grid,style:h,children:s})})},nt={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},Ls=({header:e,footer:r,children:t,className:s,style:o,headerProps:n,footerProps:i,divProps:l,mainProps:d})=>{const y=[nt.layoutContainer,s].filter(Boolean).join(" ");return _.jsxs("div",{...l,className:y,style:o,children:[_.jsxs("div",{className:nt.content,children:[e&&_.jsx(nr,{...n,children:e}),_.jsx("main",{...d,className:nt.main,children:t})]}),r&&_.jsx(ur,{...i,children:r})]})};N.Button=wr,N.CSSReset=Er,N.Checkbox=Ce,N.FeatureCard=As,N.FeatureGridSection=Ds,N.Footer=ur,N.Form=ls,N.FormCheckbox=gs,N.FormCheckboxGroup=bs,N.FormError=Yt,N.FormField=ce,N.FormGroup=Rt,N.FormInput=ds,N.FormLabel=xe,N.FormRadio=ps,N.FormRadioGroup=vs,N.FormSelect=hs,N.FormTextarea=ys,N.Hamburger=sr,N.Header=nr,N.Hero=zs,N.Input=er,N.LoadingSpinner=ir,N.PageLayout=Ls,N.Radio=rt,N.ResponsiveNav=ws,N.ResponsiveSection=ot,N.Select=rr,N.Stack=xs,N.StyleLoader=ks,N.Textarea=tr,N.ThemeProvider=Vr,N.parseBreakpoint=ge,N.useFormContext=Xt,N.useTheme=T,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digital-rabbit-cl",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "dependencies": {
5
5
  "@hookform/resolvers": "^5.2.2",
6
6
  "react-hook-form": "^7.66.0",