@mystaline/mysta-lib 1.0.0-alpha.10

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.
Files changed (43) hide show
  1. package/build-entry.d.ts +4 -0
  2. package/components/button/Button.d.ts +119 -0
  3. package/components/card/Card.d.ts +127 -0
  4. package/components/checkbox/Checkbox.d.ts +81 -0
  5. package/components/dialog/Dialog.d.ts +50 -0
  6. package/components/dialogform/DialogForm.d.ts +26 -0
  7. package/components/fieldwrapper/FieldWrapper.d.ts +53 -0
  8. package/components/form/Form.d.ts +98 -0
  9. package/components/icon/Icon.d.ts +52 -0
  10. package/components/index.d.ts +36 -0
  11. package/components/inputemail/InputEmail.d.ts +17 -0
  12. package/components/inputnumber/InputNumber.d.ts +18 -0
  13. package/components/inputpassword/InputPassword.d.ts +18 -0
  14. package/components/inputtext/InputText.d.ts +17 -0
  15. package/components/kanbanboard/KanbanBoard.d.ts +20 -0
  16. package/components/kanbancolumn/KanbanColumn.d.ts +32 -0
  17. package/components/popover/Popover.d.ts +29 -0
  18. package/components/private/BaseInput.d.ts +113 -0
  19. package/components/radiobutton/RadioButton.d.ts +65 -0
  20. package/components/separator/Separator.d.ts +16 -0
  21. package/components/slot/Slot.d.ts +23 -0
  22. package/components/toggleswitch/ToggleSwitch.d.ts +64 -0
  23. package/components/tooltip/Tooltip.d.ts +26 -0
  24. package/context/FormContext.d.ts +12 -0
  25. package/context/KanbanContext.d.ts +3 -0
  26. package/context/LibContext.d.ts +16 -0
  27. package/context/index.d.ts +3 -0
  28. package/hooks/index.d.ts +4 -0
  29. package/hooks/useComponentPreset.d.ts +5 -0
  30. package/hooks/useEffectiveControl.d.ts +2 -0
  31. package/hooks/useEffectiveRegister.d.ts +2 -0
  32. package/hooks/useValidator.d.ts +22 -0
  33. package/index.d.ts +2 -0
  34. package/main.d.ts +2 -0
  35. package/mysta-lib.es.js +9516 -0
  36. package/mysta-lib.system.js +80 -0
  37. package/package.json +15 -0
  38. package/style.css +1 -0
  39. package/types/index.d.ts +1 -0
  40. package/types/internalFields.type.d.ts +4 -0
  41. package/types/kanban.type.d.ts +18 -0
  42. package/utils/getSeverity.d.ts +9 -0
  43. package/utils/index.d.ts +4 -0
@@ -0,0 +1,80 @@
1
+ System.register(["react","react-dom"],function(Ce,hC){"use strict";var le,pi,Un,vi,b,bn,eu,_n,qo,vt,ar,Go,tu,Ko,Yo,nu,Xo,ru;return{setters:[Me=>{le=Me.default,pi=Me.createContext,Un=Me.useMemo,vi=Me.useContext,b=Me,bn=Me.useState,eu=Me.useLayoutEffect,_n=Me.useEffect,qo=Me.useRef,vt=Me.useCallback,ar=Me.forwardRef,Go=Me.useImperativeHandle,tu=Me.memo,Ko=Me.cloneElement,Yo=Me.isValidElement,nu=Me.createElement},Me=>{Xo=Me,ru=Me.default}],execute:function(){var Me=document.createElement("style");Me.textContent=`html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;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}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.bottom-2{bottom:.5rem}.right-2{right:.5rem}.col-span-2{grid-column:span 2 / span 2}.m-3{margin:.75rem}.m-auto{margin:auto}.flex{display:flex}.grid{display:grid}.h-max{height:-moz-max-content;height:max-content}.min-h-\\[200px\\]{min-height:200px}.\\!w-0{width:0px!important}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-\\[200px\\]{min-width:200px}.translate-x-8{--tw-translate-x: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.gap-3{gap:.75rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-2{row-gap:.5rem}.rounded{border-radius:.25rem}.border{border-width:1px}.p-3{padding:.75rem}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-transparent{--tw-ring-color: transparent}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@keyframes dialog-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes dialog-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes dialog-scaleIn{0%{transform:translate(-50%,-50%) scale(0)}to{transform:translate(-50%,-50%) scale(1)}}@keyframes dialog-scaleOut{0%{transform:translate(-50%,-50%) scale(1)}to{transform:translate(-50%,-50%) scale(0)}}.animate-dialog[data-state=open]{animation:dialog-fadeIn .15s ease-out,dialog-scaleIn .2s ease-out}.animate-dialog[data-state=closed]{animation:dialog-fadeOut .3s ease-in,dialog-scaleOut .2s ease-out}.hover\\:\\!bg-white:hover{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))!important}.hover\\:\\!text-white:hover{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\\:\\!w-full{width:100%!important}.group:hover .group-hover\\:translate-x-2\\.5{--tw-translate-x: .625rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:translate-y-1{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
2
+ /*$vite$:1*/`,document.head.appendChild(Me),Ce("useComponentPreset",Qt);const rh={primary:"text-white bg-primary-500 hover:bg-primary-600",secondary:"text-white bg-secondary-500 hover:bg-secondary-600",danger:"text-white bg-danger-500 hover:bg-danger-600",success:"text-white bg-success-500 hover:bg-success-600",warning:"text-white bg-warning-500 hover:bg-warning-600",info:"text-white bg-info-500 hover:bg-info-600"},ih={primary:"text-primary-500 ring-primary-500 hover:bg-primary-50",secondary:"text-secondary-500 ring-secondary-500 hover:bg-secondary-50",danger:"text-danger-500 ring-danger-500 hover:bg-danger-50",success:"text-success-500 ring-success-500 hover:bg-success-50",warning:"text-warning-500 ring-warning-500 hover:bg-warning-50",info:"text-info-500 ring-info-500 hover:bg-info-50"},oh={primary:"text-primary-500 ring-transparent hover:bg-primary-50",secondary:"text-secondary-500 ring-transparent hover:bg-secondary-50",danger:"text-danger-500 ring-transparent hover:bg-danger-50",success:"text-success-500 ring-transparent hover:bg-success-50",warning:"text-warning-500 ring-transparent hover:bg-warning-50",info:"text-info-500 ring-transparent hover:bg-info-50"},sh={primary:"!text-primary-500 hover:!text-white",secondary:"!text-secondary-500 hover:!text-white",danger:"!text-danger-500 hover:!text-white",success:"!text-success-500 hover:!text-white",warning:"!text-warning-500 hover:!text-white",info:"!text-info-500 hover:!text-white"},ah={primary:"!bg-primary-500 hover:!bg-white",secondary:"!bg-secondary-500 hover:!bg-white",danger:"!bg-danger-500 hover:!bg-white",success:"!bg-success-500 hover:!bg-white",warning:"!bg-warning-500 hover:!bg-white",info:"!bg-info-500 hover:!bg-white"},uh=Ce("getSeverity",(n="primary",i)=>{const{outlined:r,text:s,color:a,background:l}=i??{};return s?oh[n]:r?ih[n]:a?sh[n]:l?ah[n]:rh[n]});var Br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},iu={exports:{}},mi={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var lh=le,ch=Symbol.for("react.element"),fh=Symbol.for("react.fragment"),dh=Object.prototype.hasOwnProperty,hh=lh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gh={key:!0,ref:!0,__self:!0,__source:!0};function ou(n,i,r){var s,a={},l=null,c=null;r!==void 0&&(l=""+r),i.key!==void 0&&(l=""+i.key),i.ref!==void 0&&(c=i.ref);for(s in i)dh.call(i,s)&&!gh.hasOwnProperty(s)&&(a[s]=i[s]);if(n&&n.defaultProps)for(s in i=n.defaultProps,i)a[s]===void 0&&(a[s]=i[s]);return{$$typeof:ch,type:n,key:l,ref:c,props:a,_owner:hh.current}}mi.Fragment=fh,mi.jsx=ou,mi.jsxs=ou,iu.exports=mi;var S=iu.exports,Wr=n=>n.type==="checkbox",$n=n=>n instanceof Date,it=n=>n==null;const su=n=>typeof n=="object";var Be=n=>!it(n)&&!Array.isArray(n)&&su(n)&&!$n(n),au=n=>Be(n)&&n.target?Wr(n.target)?n.target.checked:n.target.value:n,ph=n=>n.substring(0,n.search(/\.\d+(\.|$)/))||n,uu=(n,i)=>n.has(ph(i)),vh=n=>{const i=n.constructor&&n.constructor.prototype;return Be(i)&&i.hasOwnProperty("isPrototypeOf")},Zo=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Xe(n){let i;const r=Array.isArray(n),s=typeof FileList<"u"?n instanceof FileList:!1;if(n instanceof Date)i=new Date(n);else if(n instanceof Set)i=new Set(n);else if(!(Zo&&(n instanceof Blob||s))&&(r||Be(n)))if(i=r?[]:{},!r&&!vh(n))i=n;else for(const a in n)n.hasOwnProperty(a)&&(i[a]=Xe(n[a]));else return n;return i}var yi=n=>Array.isArray(n)?n.filter(Boolean):[],We=n=>n===void 0,Y=(n,i,r)=>{if(!i||!Be(n))return r;const s=yi(i.split(/[,[\].]+?/)).reduce((a,l)=>it(a)?a:a[l],n);return We(s)||s===n?We(n[i])?r:n[i]:s},mt=n=>typeof n=="boolean",Jo=n=>/^\w*$/.test(n),lu=n=>yi(n.replace(/["|']|\]/g,"").split(/\.|\[/)),Re=(n,i,r)=>{let s=-1;const a=Jo(i)?[i]:lu(i),l=a.length,c=l-1;for(;++s<l;){const d=a[s];let p=r;if(s!==c){const m=n[d];p=Be(m)||Array.isArray(m)?m:isNaN(+a[s+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;n[d]=p,n=n[d]}};const wi={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Bt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},sn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},cu=le.createContext(null),xi=()=>le.useContext(cu),mh=n=>{const{children:i,...r}=n;return le.createElement(cu.Provider,{value:r},i)};var fu=(n,i,r,s=!0)=>{const a={defaultValues:i._defaultValues};for(const l in n)Object.defineProperty(a,l,{get:()=>{const c=l;return i._proxyFormState[c]!==Bt.all&&(i._proxyFormState[c]=!s||Bt.all),r&&(r[c]=!0),n[c]}});return a};function yh(n){const i=xi(),{control:r=i.control,disabled:s,name:a,exact:l}=n||{},[c,d]=le.useState(r._formState),p=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),m=le.useRef(a);return m.current=a,le.useEffect(()=>r._subscribe({name:m.current,formState:p.current,exact:l,callback:v=>{!s&&d({...r._formState,...v})}}),[r,s,l]),le.useEffect(()=>{p.current.isValid&&r._setValid(!0)},[r]),le.useMemo(()=>fu(c,r,p.current,!1),[c,r])}var Kt=n=>typeof n=="string",du=(n,i,r,s,a)=>Kt(n)?(s&&i.watch.add(n),Y(r,n,a)):Array.isArray(n)?n.map(l=>(s&&i.watch.add(l),Y(r,l))):(s&&(i.watchAll=!0),r);function wh(n){const i=xi(),{control:r=i.control,name:s,defaultValue:a,disabled:l,exact:c}=n||{},d=le.useRef(s),p=le.useRef(a);d.current=s,le.useEffect(()=>r._subscribe({name:d.current,formState:{values:!0},exact:c,callback:w=>!l&&v(du(d.current,r._names,w.values||r._formValues,!1,p.current))}),[r,l,c]);const[m,v]=le.useState(r._getWatch(s,a));return le.useEffect(()=>r._removeUnmounted()),m}function xh(n){const i=xi(),{name:r,disabled:s,control:a=i.control,shouldUnregister:l}=n,c=uu(a._names.array,r),d=wh({control:a,name:r,defaultValue:Y(a._formValues,r,Y(a._defaultValues,r,n.defaultValue)),exact:!0}),p=yh({control:a,name:r,exact:!0}),m=le.useRef(n),v=le.useRef(a.register(r,{...n.rules,value:d,...mt(n.disabled)?{disabled:n.disabled}:{}})),w=le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Y(p.errors,r)},isDirty:{enumerable:!0,get:()=>!!Y(p.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Y(p.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Y(p.validatingFields,r)},error:{enumerable:!0,get:()=>Y(p.errors,r)}}),[p,r]),x=le.useCallback(T=>v.current.onChange({target:{value:au(T),name:r},type:wi.CHANGE}),[r]),R=le.useCallback(()=>v.current.onBlur({target:{value:Y(a._formValues,r),name:r},type:wi.BLUR}),[r,a._formValues]),P=le.useCallback(T=>{const M=Y(a._fields,r);M&&T&&(M._f.ref={focus:()=>T.focus(),select:()=>T.select(),setCustomValidity:F=>T.setCustomValidity(F),reportValidity:()=>T.reportValidity()})},[a._fields,r]),E=le.useMemo(()=>({name:r,value:d,...mt(s)||p.disabled?{disabled:p.disabled||s}:{},onChange:x,onBlur:R,ref:P}),[r,s,p.disabled,x,R,P,d]);return le.useEffect(()=>{const T=a._options.shouldUnregister||l;a.register(r,{...m.current.rules,...mt(m.current.disabled)?{disabled:m.current.disabled}:{}});const M=(F,I)=>{const U=Y(a._fields,F);U&&U._f&&(U._f.mount=I)};if(M(r,!0),T){const F=Xe(Y(a._options.defaultValues,r));Re(a._defaultValues,r,F),We(Y(a._formValues,r))&&Re(a._formValues,r,F)}return!c&&a.register(r),()=>{(c?T&&!a._state.action:T)?a.unregister(r):M(r,!1)}},[r,a,c,l]),le.useEffect(()=>{a._setDisabledField({disabled:s,name:r})},[s,r,a]),le.useMemo(()=>({field:E,formState:p,fieldState:w}),[E,p,w])}var bh=(n,i,r,s,a)=>i?{...r[n],types:{...r[n]&&r[n].types?r[n].types:{},[s]:a||!0}}:{},Vr=n=>Array.isArray(n)?n:[n],hu=()=>{let n=[];return{get observers(){return n},next:a=>{for(const l of n)l.next&&l.next(a)},subscribe:a=>(n.push(a),{unsubscribe:()=>{n=n.filter(l=>l!==a)}}),unsubscribe:()=>{n=[]}}},Qo=n=>it(n)||!su(n);function Cn(n,i){if(Qo(n)||Qo(i))return n===i;if($n(n)&&$n(i))return n.getTime()===i.getTime();const r=Object.keys(n),s=Object.keys(i);if(r.length!==s.length)return!1;for(const a of r){const l=n[a];if(!s.includes(a))return!1;if(a!=="ref"){const c=i[a];if($n(l)&&$n(c)||Be(l)&&Be(c)||Array.isArray(l)&&Array.isArray(c)?!Cn(l,c):l!==c)return!1}}return!0}var ot=n=>Be(n)&&!Object.keys(n).length,es=n=>n.type==="file",Wt=n=>typeof n=="function",bi=n=>{if(!Zo)return!1;const i=n?n.ownerDocument:0;return n instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},gu=n=>n.type==="select-multiple",ts=n=>n.type==="radio",_h=n=>ts(n)||Wr(n),ns=n=>bi(n)&&n.isConnected;function Ch(n,i){const r=i.slice(0,-1).length;let s=0;for(;s<r;)n=We(n)?s++:n[i[s++]];return n}function Eh(n){for(const i in n)if(n.hasOwnProperty(i)&&!We(n[i]))return!1;return!0}function ze(n,i){const r=Array.isArray(i)?i:Jo(i)?[i]:lu(i),s=r.length===1?n:Ch(n,r),a=r.length-1,l=r[a];return s&&delete s[l],a!==0&&(Be(s)&&ot(s)||Array.isArray(s)&&Eh(s))&&ze(n,r.slice(0,-1)),n}var pu=n=>{for(const i in n)if(Wt(n[i]))return!0;return!1};function _i(n,i={}){const r=Array.isArray(n);if(Be(n)||r)for(const s in n)Array.isArray(n[s])||Be(n[s])&&!pu(n[s])?(i[s]=Array.isArray(n[s])?[]:{},_i(n[s],i[s])):it(n[s])||(i[s]=!0);return i}function vu(n,i,r){const s=Array.isArray(n);if(Be(n)||s)for(const a in n)Array.isArray(n[a])||Be(n[a])&&!pu(n[a])?We(i)||Qo(r[a])?r[a]=Array.isArray(n[a])?_i(n[a],[]):{..._i(n[a])}:vu(n[a],it(i)?{}:i[a],r[a]):r[a]=!Cn(n[a],i[a]);return r}var Ur=(n,i)=>vu(n,i,_i(i));const mu={value:!1,isValid:!1},yu={value:!0,isValid:!0};var wu=n=>{if(Array.isArray(n)){if(n.length>1){const i=n.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:i,isValid:!!i.length}}return n[0].checked&&!n[0].disabled?n[0].attributes&&!We(n[0].attributes.value)?We(n[0].value)||n[0].value===""?yu:{value:n[0].value,isValid:!0}:yu:mu}return mu},xu=(n,{valueAsNumber:i,valueAsDate:r,setValueAs:s})=>We(n)?n:i?n===""?NaN:n&&+n:r&&Kt(n)?new Date(n):s?s(n):n;const bu={isValid:!1,value:null};var _u=n=>Array.isArray(n)?n.reduce((i,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:i,bu):bu;function Cu(n){const i=n.ref;return es(i)?i.files:ts(i)?_u(n.refs).value:gu(i)?[...i.selectedOptions].map(({value:r})=>r):Wr(i)?wu(n.refs).value:xu(We(i.value)?n.ref.value:i.value,n)}var Ah=(n,i,r,s)=>{const a={};for(const l of n){const c=Y(i,l);c&&Re(a,l,c._f)}return{criteriaMode:r,names:[...n],fields:a,shouldUseNativeValidation:s}},Ci=n=>n instanceof RegExp,$r=n=>We(n)?n:Ci(n)?n.source:Be(n)?Ci(n.value)?n.value.source:n.value:n,Eu=n=>({isOnSubmit:!n||n===Bt.onSubmit,isOnBlur:n===Bt.onBlur,isOnChange:n===Bt.onChange,isOnAll:n===Bt.all,isOnTouch:n===Bt.onTouched});const Au="AsyncFunction";var Sh=n=>!!n&&!!n.validate&&!!(Wt(n.validate)&&n.validate.constructor.name===Au||Be(n.validate)&&Object.values(n.validate).find(i=>i.constructor.name===Au)),Rh=n=>n.mount&&(n.required||n.min||n.max||n.maxLength||n.minLength||n.pattern||n.validate),Su=(n,i,r)=>!r&&(i.watchAll||i.watch.has(n)||[...i.watch].some(s=>n.startsWith(s)&&/^\.\w+/.test(n.slice(s.length))));const jr=(n,i,r,s)=>{for(const a of r||Object.keys(n)){const l=Y(n,a);if(l){const{_f:c,...d}=l;if(c){if(c.refs&&c.refs[0]&&i(c.refs[0],a)&&!s)return!0;if(c.ref&&i(c.ref,c.name)&&!s)return!0;if(jr(d,i))break}else if(Be(d)&&jr(d,i))break}}};function Ru(n,i,r){const s=Y(n,r);if(s||Jo(r))return{error:s,name:r};const a=r.split(".");for(;a.length;){const l=a.join("."),c=Y(i,l),d=Y(n,l);if(c&&!Array.isArray(c)&&r!==l)return{name:r};if(d&&d.type)return{name:l,error:d};a.pop()}return{name:r}}var Oh=(n,i,r,s)=>{r(n);const{name:a,...l}=n;return ot(l)||Object.keys(l).length>=Object.keys(i).length||Object.keys(l).find(c=>i[c]===(!s||Bt.all))},Ph=(n,i,r)=>!n||!i||n===i||Vr(n).some(s=>s&&(r?s===i:s.startsWith(i)||i.startsWith(s))),Th=(n,i,r,s,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(i||n):(r?s.isOnBlur:a.isOnBlur)?!n:(r?s.isOnChange:a.isOnChange)?n:!0,Dh=(n,i)=>!yi(Y(n,i)).length&&ze(n,i),Ih=(n,i,r)=>{const s=Vr(Y(n,r));return Re(s,"root",i[r]),Re(n,r,s),n},Ei=n=>Kt(n);function Ou(n,i,r="validate"){if(Ei(n)||Array.isArray(n)&&n.every(Ei)||mt(n)&&!n)return{type:r,message:Ei(n)?n:"",ref:i}}var ur=n=>Be(n)&&!Ci(n)?n:{value:n,message:""},Pu=async(n,i,r,s,a,l)=>{const{ref:c,refs:d,required:p,maxLength:m,minLength:v,min:w,max:x,pattern:R,validate:P,name:E,valueAsNumber:T,mount:M}=n._f,F=Y(r,E);if(!M||i.has(E))return{};const I=d?d[0]:c,U=te=>{a&&I.reportValidity&&(I.setCustomValidity(mt(te)?"":te||""),I.reportValidity())},N={},z=ts(c),j=Wr(c),ee=z||j,se=(T||es(c))&&We(c.value)&&We(F)||bi(c)&&c.value===""||F===""||Array.isArray(F)&&!F.length,be=bh.bind(null,E,s,N),Ae=(te,Q,ae,xe=sn.maxLength,pe=sn.minLength)=>{const he=te?Q:ae;N[E]={type:te?xe:pe,message:he,ref:c,...be(te?xe:pe,he)}};if(l?!Array.isArray(F)||!F.length:p&&(!ee&&(se||it(F))||mt(F)&&!F||j&&!wu(d).isValid||z&&!_u(d).isValid)){const{value:te,message:Q}=Ei(p)?{value:!!p,message:p}:ur(p);if(te&&(N[E]={type:sn.required,message:Q,ref:I,...be(sn.required,Q)},!s))return U(Q),N}if(!se&&(!it(w)||!it(x))){let te,Q;const ae=ur(x),xe=ur(w);if(!it(F)&&!isNaN(F)){const pe=c.valueAsNumber||F&&+F;it(ae.value)||(te=pe>ae.value),it(xe.value)||(Q=pe<xe.value)}else{const pe=c.valueAsDate||new Date(F),he=Ne=>new Date(new Date().toDateString()+" "+Ne),ne=c.type=="time",Oe=c.type=="week";Kt(ae.value)&&F&&(te=ne?he(F)>he(ae.value):Oe?F>ae.value:pe>new Date(ae.value)),Kt(xe.value)&&F&&(Q=ne?he(F)<he(xe.value):Oe?F<xe.value:pe<new Date(xe.value))}if((te||Q)&&(Ae(!!te,ae.message,xe.message,sn.max,sn.min),!s))return U(N[E].message),N}if((m||v)&&!se&&(Kt(F)||l&&Array.isArray(F))){const te=ur(m),Q=ur(v),ae=!it(te.value)&&F.length>+te.value,xe=!it(Q.value)&&F.length<+Q.value;if((ae||xe)&&(Ae(ae,te.message,Q.message),!s))return U(N[E].message),N}if(R&&!se&&Kt(F)){const{value:te,message:Q}=ur(R);if(Ci(te)&&!F.match(te)&&(N[E]={type:sn.pattern,message:Q,ref:c,...be(sn.pattern,Q)},!s))return U(Q),N}if(P){if(Wt(P)){const te=await P(F,r),Q=Ou(te,I);if(Q&&(N[E]={...Q,...be(sn.validate,Q.message)},!s))return U(Q.message),N}else if(Be(P)){let te={};for(const Q in P){if(!ot(te)&&!s)break;const ae=Ou(await P[Q](F,r),I,Q);ae&&(te={...ae,...be(Q,ae.message)},U(ae.message),s&&(N[E]=te))}if(!ot(te)&&(N[E]={ref:I,...te},!s))return N}}return U(!0),N};const Lh={mode:Bt.onSubmit,reValidateMode:Bt.onChange,shouldFocusError:!0};function Fh(n={}){let i={...Lh,...n},r={submitCount:0,isDirty:!1,isLoading:Wt(i.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:i.errors||{},disabled:i.disabled||!1};const s={};let a=Be(i.defaultValues)||Be(i.values)?Xe(i.values||i.defaultValues)||{}:{},l=i.shouldUnregister?{}:Xe(a),c={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},p,m=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let w={...v};const x={array:hu(),state:hu()},R=Eu(i.mode),P=Eu(i.reValidateMode),E=i.criteriaMode===Bt.all,T=_=>D=>{clearTimeout(m),m=setTimeout(_,D)},M=async _=>{if(!i.disabled&&(v.isValid||w.isValid||_)){const D=i.resolver?ot((await se()).errors):await Ae(s,!0);D!==r.isValid&&x.state.next({isValid:D})}},F=(_,D)=>{!i.disabled&&(v.isValidating||v.validatingFields||w.isValidating||w.validatingFields)&&((_||Array.from(d.mount)).forEach(B=>{B&&(D?Re(r.validatingFields,B,D):ze(r.validatingFields,B))}),x.state.next({validatingFields:r.validatingFields,isValidating:!ot(r.validatingFields)}))},I=(_,D=[],B,K,q=!0,H=!0)=>{if(K&&B&&!i.disabled){if(c.action=!0,H&&Array.isArray(Y(s,_))){const X=B(Y(s,_),K.argA,K.argB);q&&Re(s,_,X)}if(H&&Array.isArray(Y(r.errors,_))){const X=B(Y(r.errors,_),K.argA,K.argB);q&&Re(r.errors,_,X),Dh(r.errors,_)}if((v.touchedFields||w.touchedFields)&&H&&Array.isArray(Y(r.touchedFields,_))){const X=B(Y(r.touchedFields,_),K.argA,K.argB);q&&Re(r.touchedFields,_,X)}(v.dirtyFields||w.dirtyFields)&&(r.dirtyFields=Ur(a,l)),x.state.next({name:_,isDirty:Q(_,D),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Re(l,_,D)},U=(_,D)=>{Re(r.errors,_,D),x.state.next({errors:r.errors})},N=_=>{r.errors=_,x.state.next({errors:r.errors,isValid:!1})},z=(_,D,B,K)=>{const q=Y(s,_);if(q){const H=Y(l,_,We(B)?Y(a,_):B);We(H)||K&&K.defaultChecked||D?Re(l,_,D?H:Cu(q._f)):pe(_,H),c.mount&&M()}},j=(_,D,B,K,q)=>{let H=!1,X=!1;const me={name:_};if(!i.disabled){if(!B||K){(v.isDirty||w.isDirty)&&(X=r.isDirty,r.isDirty=me.isDirty=Q(),H=X!==me.isDirty);const Ie=Cn(Y(a,_),D);X=!!Y(r.dirtyFields,_),Ie?ze(r.dirtyFields,_):Re(r.dirtyFields,_,!0),me.dirtyFields=r.dirtyFields,H=H||(v.dirtyFields||w.dirtyFields)&&X!==!Ie}if(B){const Ie=Y(r.touchedFields,_);Ie||(Re(r.touchedFields,_,B),me.touchedFields=r.touchedFields,H=H||(v.touchedFields||w.touchedFields)&&Ie!==B)}H&&q&&x.state.next(me)}return H?me:{}},ee=(_,D,B,K)=>{const q=Y(r.errors,_),H=(v.isValid||w.isValid)&&mt(D)&&r.isValid!==D;if(i.delayError&&B?(p=T(()=>U(_,B)),p(i.delayError)):(clearTimeout(m),p=null,B?Re(r.errors,_,B):ze(r.errors,_)),(B?!Cn(q,B):q)||!ot(K)||H){const X={...K,...H&&mt(D)?{isValid:D}:{},errors:r.errors,name:_};r={...r,...X},x.state.next(X)}},se=async _=>{F(_,!0);const D=await i.resolver(l,i.context,Ah(_||d.mount,s,i.criteriaMode,i.shouldUseNativeValidation));return F(_),D},be=async _=>{const{errors:D}=await se(_);if(_)for(const B of _){const K=Y(D,B);K?Re(r.errors,B,K):ze(r.errors,B)}else r.errors=D;return D},Ae=async(_,D,B={valid:!0})=>{for(const K in _){const q=_[K];if(q){const{_f:H,...X}=q;if(H){const me=d.array.has(H.name),Ie=q._f&&Sh(q._f);Ie&&v.validatingFields&&F([K],!0);const He=await Pu(q,d.disabled,l,E,i.shouldUseNativeValidation&&!D,me);if(Ie&&v.validatingFields&&F([K]),He[H.name]&&(B.valid=!1,D))break;!D&&(Y(He,H.name)?me?Ih(r.errors,He,H.name):Re(r.errors,H.name,He[H.name]):ze(r.errors,H.name))}!ot(X)&&await Ae(X,D,B)}}return B.valid},te=()=>{for(const _ of d.unMount){const D=Y(s,_);D&&(D._f.refs?D._f.refs.every(B=>!ns(B)):!ns(D._f.ref))&&st(_)}d.unMount=new Set},Q=(_,D)=>!i.disabled&&(_&&D&&Re(l,_,D),!Cn(Pn(),a)),ae=(_,D,B)=>du(_,d,{...c.mount?l:We(D)?a:Kt(_)?{[_]:D}:D},B,D),xe=_=>yi(Y(c.mount?l:a,_,i.shouldUnregister?Y(a,_,[]):[])),pe=(_,D,B={})=>{const K=Y(s,_);let q=D;if(K){const H=K._f;H&&(!H.disabled&&Re(l,_,xu(D,H)),q=bi(H.ref)&&it(D)?"":D,gu(H.ref)?[...H.ref.options].forEach(X=>X.selected=q.includes(X.value)):H.refs?Wr(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(q)?!!q.find(me=>me===X.value):q===X.value)):H.refs[0]&&(H.refs[0].checked=!!q):H.refs.forEach(X=>X.checked=X.value===q):es(H.ref)?H.ref.value="":(H.ref.value=q,H.ref.type||x.state.next({name:_,values:Xe(l)})))}(B.shouldDirty||B.shouldTouch)&&j(_,q,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&Ve(_)},he=(_,D,B)=>{for(const K in D){const q=D[K],H=`${_}.${K}`,X=Y(s,H);(d.array.has(_)||Be(q)||X&&!X._f)&&!$n(q)?he(H,q,B):pe(H,q,B)}},ne=(_,D,B={})=>{const K=Y(s,_),q=d.array.has(_),H=Xe(D);Re(l,_,H),q?(x.array.next({name:_,values:Xe(l)}),(v.isDirty||v.dirtyFields||w.isDirty||w.dirtyFields)&&B.shouldDirty&&x.state.next({name:_,dirtyFields:Ur(a,l),isDirty:Q(_,H)})):K&&!K._f&&!it(H)?he(_,H,B):pe(_,H,B),Su(_,d)&&x.state.next({...r}),x.state.next({name:c.mount?_:void 0,values:Xe(l)})},Oe=async _=>{c.mount=!0;const D=_.target;let B=D.name,K=!0;const q=Y(s,B),H=X=>{K=Number.isNaN(X)||$n(X)&&isNaN(X.getTime())||Cn(X,Y(l,B,X))};if(q){let X,me;const Ie=D.type?Cu(q._f):au(_),He=_.type===wi.BLUR||_.type===wi.FOCUS_OUT,Zr=!Rh(q._f)&&!i.resolver&&!Y(r.errors,B)&&!q._f.deps||Th(He,Y(r.touchedFields,B),r.isSubmitted,P,R),Xn=Su(B,d,He);Re(l,B,Ie),He?(q._f.onBlur&&q._f.onBlur(_),p&&p(0)):q._f.onChange&&q._f.onChange(_);const Zn=j(B,Ie,He),Jr=!ot(Zn)||Xn;if(!He&&x.state.next({name:B,type:_.type,values:Xe(l)}),Zr)return(v.isValid||w.isValid)&&(i.mode==="onBlur"?He&&M():He||M()),Jr&&x.state.next({name:B,...Xn?{}:Zn});if(!He&&Xn&&x.state.next({...r}),i.resolver){const{errors:Cr}=await se([B]);if(H(Ie),K){const Qr=Ru(r.errors,s,B),no=Ru(Cr,s,Qr.name||B);X=no.error,B=no.name,me=ot(Cr)}}else F([B],!0),X=(await Pu(q,d.disabled,l,E,i.shouldUseNativeValidation))[B],F([B]),H(Ie),K&&(X?me=!1:(v.isValid||w.isValid)&&(me=await Ae(s,!0)));K&&(q._f.deps&&Ve(q._f.deps),ee(B,me,X,Zn))}},Ne=(_,D)=>{if(Y(r.errors,D)&&_.focus)return _.focus(),1},Ve=async(_,D={})=>{let B,K;const q=Vr(_);if(i.resolver){const H=await be(We(_)?_:q);B=ot(H),K=_?!q.some(X=>Y(H,X)):B}else _?(K=(await Promise.all(q.map(async H=>{const X=Y(s,H);return await Ae(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!K&&!r.isValid)&&M()):K=B=await Ae(s);return x.state.next({...!Kt(_)||(v.isValid||w.isValid)&&B!==r.isValid?{}:{name:_},...i.resolver||!_?{isValid:B}:{},errors:r.errors}),D.shouldFocus&&!K&&jr(s,Ne,_?q:d.mount),K},Pn=_=>{const D={...c.mount?l:a};return We(_)?D:Kt(_)?Y(D,_):_.map(B=>Y(D,B))},Tn=(_,D)=>({invalid:!!Y((D||r).errors,_),isDirty:!!Y((D||r).dirtyFields,_),error:Y((D||r).errors,_),isValidating:!!Y(r.validatingFields,_),isTouched:!!Y((D||r).touchedFields,_)}),Kn=_=>{_&&Vr(_).forEach(D=>ze(r.errors,D)),x.state.next({errors:_?r.errors:{}})},bt=(_,D,B)=>{const K=(Y(s,_,{_f:{}})._f||{}).ref,q=Y(r.errors,_)||{},{ref:H,message:X,type:me,...Ie}=q;Re(r.errors,_,{...Ie,...D,ref:K}),x.state.next({name:_,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&K&&K.focus&&K.focus()},Ue=(_,D)=>Wt(_)?x.state.subscribe({next:B=>_(ae(void 0,D),B)}):ae(_,D,!0),Ot=_=>x.state.subscribe({next:D=>{Ph(_.name,D.name,_.exact)&&Oh(D,_.formState||v,Dn,_.reRenderRoot)&&_.callback({values:{...l},...r,...D})}}).unsubscribe,Pt=_=>(c.mount=!0,w={...w,..._.formState},Ot({..._,formState:w})),st=(_,D={})=>{for(const B of _?Vr(_):d.mount)d.mount.delete(B),d.array.delete(B),D.keepValue||(ze(s,B),ze(l,B)),!D.keepError&&ze(r.errors,B),!D.keepDirty&&ze(r.dirtyFields,B),!D.keepTouched&&ze(r.touchedFields,B),!D.keepIsValidating&&ze(r.validatingFields,B),!i.shouldUnregister&&!D.keepDefaultValue&&ze(a,B);x.state.next({values:Xe(l)}),x.state.next({...r,...D.keepDirty?{isDirty:Q()}:{}}),!D.keepIsValid&&M()},Yn=({disabled:_,name:D})=>{(mt(_)&&c.mount||_||d.disabled.has(D))&&(_?d.disabled.add(D):d.disabled.delete(D))},jt=(_,D={})=>{let B=Y(s,_);const K=mt(D.disabled)||mt(i.disabled);return Re(s,_,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:_}},name:_,mount:!0,...D}}),d.mount.add(_),B?Yn({disabled:mt(D.disabled)?D.disabled:i.disabled,name:_}):z(_,!0,D.value),{...K?{disabled:D.disabled||i.disabled}:{},...i.progressive?{required:!!D.required,min:$r(D.min),max:$r(D.max),minLength:$r(D.minLength),maxLength:$r(D.maxLength),pattern:$r(D.pattern)}:{},name:_,onChange:Oe,onBlur:Oe,ref:q=>{if(q){jt(_,D),B=Y(s,_);const H=We(q.value)&&q.querySelectorAll&&q.querySelectorAll("input,select,textarea")[0]||q,X=_h(H),me=B._f.refs||[];if(X?me.find(Ie=>Ie===H):H===B._f.ref)return;Re(s,_,{_f:{...B._f,...X?{refs:[...me.filter(ns),H,...Array.isArray(Y(a,_))?[{}]:[]],ref:{type:H.type,name:_}}:{ref:H}}}),z(_,!1,void 0,H)}else B=Y(s,_,{}),B._f&&(B._f.mount=!1),(i.shouldUnregister||D.shouldUnregister)&&!(uu(d.array,_)&&c.action)&&d.unMount.add(_)}}},en=()=>i.shouldFocusError&&jr(s,Ne,d.mount),tn=_=>{mt(_)&&(x.state.next({disabled:_}),jr(s,(D,B)=>{const K=Y(s,B);K&&(D.disabled=K._f.disabled||_,Array.isArray(K._f.refs)&&K._f.refs.forEach(q=>{q.disabled=K._f.disabled||_}))},0,!1))},Qe=(_,D)=>async B=>{let K;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let q=Xe(l);if(x.state.next({isSubmitting:!0}),i.resolver){const{errors:H,values:X}=await se();r.errors=H,q=X}else await Ae(s);if(d.disabled.size)for(const H of d.disabled)Re(q,H,void 0);if(ze(r.errors,"root"),ot(r.errors)){x.state.next({errors:{}});try{await _(q,B)}catch(H){K=H}}else D&&await D({...r.errors},B),en(),setTimeout(en);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ot(r.errors)&&!K,submitCount:r.submitCount+1,errors:r.errors}),K)throw K},fn=(_,D={})=>{Y(s,_)&&(We(D.defaultValue)?ne(_,Xe(Y(a,_))):(ne(_,D.defaultValue),Re(a,_,Xe(D.defaultValue))),D.keepTouched||ze(r.touchedFields,_),D.keepDirty||(ze(r.dirtyFields,_),r.isDirty=D.defaultValue?Q(_,Xe(Y(a,_))):Q()),D.keepError||(ze(r.errors,_),v.isValid&&M()),x.state.next({...r}))},xr=(_,D={})=>{const B=_?Xe(_):a,K=Xe(B),q=ot(_),H=q?a:K;if(D.keepDefaultValues||(a=B),!D.keepValues){if(D.keepDirtyValues){const X=new Set([...d.mount,...Object.keys(Ur(a,l))]);for(const me of Array.from(X))Y(r.dirtyFields,me)?Re(H,me,Y(l,me)):ne(me,Y(H,me))}else{if(Zo&&We(_))for(const X of d.mount){const me=Y(s,X);if(me&&me._f){const Ie=Array.isArray(me._f.refs)?me._f.refs[0]:me._f.ref;if(bi(Ie)){const He=Ie.closest("form");if(He){He.reset();break}}}}for(const X of d.mount)ne(X,Y(H,X))}l=Xe(H),x.array.next({values:{...H}}),x.state.next({values:{...H}})}d={mount:D.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!v.isValid||!!D.keepIsValid||!!D.keepDirtyValues,c.watch=!!i.shouldUnregister,x.state.next({submitCount:D.keepSubmitCount?r.submitCount:0,isDirty:q?!1:D.keepDirty?r.isDirty:!!(D.keepDefaultValues&&!Cn(_,a)),isSubmitted:D.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:q?{}:D.keepDirtyValues?D.keepDefaultValues&&l?Ur(a,l):r.dirtyFields:D.keepDefaultValues&&_?Ur(a,_):D.keepDirty?r.dirtyFields:{},touchedFields:D.keepTouched?r.touchedFields:{},errors:D.keepErrors?r.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ct=(_,D)=>xr(Wt(_)?_(l):_,D),br=(_,D={})=>{const B=Y(s,_),K=B&&B._f;if(K){const q=K.refs?K.refs[0]:K.ref;q.focus&&(q.focus(),D.shouldSelect&&Wt(q.select)&&q.select())}},Dn=_=>{r={...r,..._}},ft={control:{register:jt,unregister:st,getFieldState:Tn,handleSubmit:Qe,setError:bt,_subscribe:Ot,_runSchema:se,_getWatch:ae,_getDirty:Q,_setValid:M,_setFieldArray:I,_setDisabledField:Yn,_setErrors:N,_getFieldArray:xe,_reset:xr,_resetDefaultValues:()=>Wt(i.defaultValues)&&i.defaultValues().then(_=>{ct(_,i.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:te,_disableForm:tn,_subjects:x,_proxyFormState:v,get _fields(){return s},get _formValues(){return l},get _state(){return c},set _state(_){c=_},get _defaultValues(){return a},get _names(){return d},set _names(_){d=_},get _formState(){return r},get _options(){return i},set _options(_){i={...i,..._}}},subscribe:Pt,trigger:Ve,register:jt,handleSubmit:Qe,watch:Ue,setValue:ne,getValues:Pn,reset:ct,resetField:fn,clearErrors:Kn,unregister:st,setError:bt,setFocus:br,getFieldState:Tn};return{...ft,formControl:ft}}function Tu(n={}){const i=le.useRef(void 0),r=le.useRef(void 0),[s,a]=le.useState({isDirty:!1,isValidating:!1,isLoading:Wt(n.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1,defaultValues:Wt(n.defaultValues)?void 0:n.defaultValues});i.current||(i.current={...n.formControl?n.formControl:Fh(n),formState:s},n.formControl&&n.defaultValues&&!Wt(n.defaultValues)&&n.formControl.reset(n.defaultValues,n.resetOptions));const l=i.current.control;return l._options=n,le.useLayoutEffect(()=>l._subscribe({formState:l._proxyFormState,callback:()=>a({...l._formState}),reRenderRoot:!0}),[l]),le.useEffect(()=>l._disableForm(n.disabled),[l,n.disabled]),le.useEffect(()=>{if(l._proxyFormState.isDirty){const c=l._getDirty();c!==s.isDirty&&l._subjects.state.next({isDirty:c})}},[l,s.isDirty]),le.useEffect(()=>{n.values&&!Cn(n.values,r.current)?(l._reset(n.values,l._options.resetOptions),r.current=n.values,a(c=>({...c}))):l._resetDefaultValues()},[n.values,l]),le.useEffect(()=>{n.errors&&!ot(n.errors)&&l._setErrors(n.errors)},[n.errors,l]),le.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),le.useEffect(()=>{n.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[n.shouldUnregister,l]),i.current.formState=fu(s,l),i.current}const Du=pi(null),Mh=Ce("FormProvider",({children:n,defaultValues:i={}})=>{const r=Tu({defaultValues:i}),s=Un(()=>({methods:r}),[r]);return S.jsx(Du.Provider,{value:s,children:S.jsx(mh,{...r,children:n})})}),Iu=Ce("useForm",()=>{const n=vi(Du);if(!n)throw new Error("useForm must be used within a FormProvider");return n});function Lu(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function Fu(...n){return i=>{let r=!1;const s=n.map(a=>{const l=Lu(a,i);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let a=0;a<s.length;a++){const l=s[a];typeof l=="function"?l():Lu(n[a],null)}}}}function yt(...n){return b.useCallback(Fu(...n),n)}function rs(n){const i=Nh(n),r=b.forwardRef((s,a)=>{const{children:l,...c}=s,d=b.Children.toArray(l),p=d.find(Bh);if(p){const m=p.props.children,v=d.map(w=>w===p?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:w);return S.jsx(i,{...c,ref:a,children:b.isValidElement(m)?b.cloneElement(m,void 0,v):null})}return S.jsx(i,{...c,ref:a,children:l})});return r.displayName=`${n}.Slot`,r}function Nh(n){const i=b.forwardRef((r,s)=>{const{children:a,...l}=r;if(b.isValidElement(a)){const c=Vh(a),d=Wh(l,a.props);return a.type!==b.Fragment&&(d.ref=s?Fu(s,c):c),b.cloneElement(a,d)}return b.Children.count(a)>1?b.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var Mu=Symbol("radix.slottable");function kh(n){const i=({children:r})=>S.jsx(S.Fragment,{children:r});return i.displayName=`${n}.Slottable`,i.__radixId=Mu,i}function Bh(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Mu}function Wh(n,i){const r={...i};for(const s in i){const a=n[s],l=i[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...d)=>{l(...d),a(...d)}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...n,...r}}function Vh(n){var s,a;let i=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?n.ref:(i=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var Uh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=Uh.reduce((n,i)=>{const r=rs(`Primitive.${i}`),s=b.forwardRef((a,l)=>{const{asChild:c,...d}=a,p=c?r:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(p,{...d,ref:l})});return s.displayName=`Primitive.${i}`,{...n,[i]:s}},{});function $h(n,i){n&&Xo.flushSync(()=>n.dispatchEvent(i))}var jh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hh="VisuallyHidden",Nu=b.forwardRef((n,i)=>S.jsx(Ze.span,{...n,ref:i,style:{...jh,...n.style}}));Nu.displayName=Hh;var zh=Nu;function qh(n,i){const r=b.createContext(i),s=l=>{const{children:c,...d}=l,p=b.useMemo(()=>d,Object.values(d));return S.jsx(r.Provider,{value:p,children:c})};s.displayName=n+"Provider";function a(l){const c=b.useContext(r);if(c)return c;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${n}\``)}return[s,a]}function Ai(n,i=[]){let r=[];function s(l,c){const d=b.createContext(c),p=r.length;r=[...r,c];const m=w=>{var M;const{scope:x,children:R,...P}=w,E=((M=x==null?void 0:x[n])==null?void 0:M[p])||d,T=b.useMemo(()=>P,Object.values(P));return S.jsx(E.Provider,{value:T,children:R})};m.displayName=l+"Provider";function v(w,x){var E;const R=((E=x==null?void 0:x[n])==null?void 0:E[p])||d,P=b.useContext(R);if(P)return P;if(c!==void 0)return c;throw new Error(`\`${w}\` must be used within \`${l}\``)}return[m,v]}const a=()=>{const l=r.map(c=>b.createContext(c));return function(d){const p=(d==null?void 0:d[n])||l;return b.useMemo(()=>({[`__scope${n}`]:{...d,[n]:p}}),[d,p])}};return a.scopeName=n,[s,Gh(a,...i)]}function Gh(...n){const i=n[0];if(n.length===1)return i;const r=()=>{const s=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const c=s.reduce((d,{useScope:p,scopeName:m})=>{const w=p(l)[`__scope${m}`];return{...d,...w}},{});return b.useMemo(()=>({[`__scope${i.scopeName}`]:c}),[c])}};return r.scopeName=i.scopeName,r}function qe(n,i,{checkForDefaultPrevented:r=!0}={}){return function(a){if(n==null||n(a),r===!1||!a.defaultPrevented)return i==null?void 0:i(a)}}var En=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Kh=b[" useInsertionEffect ".trim().toString()]||En;function is({prop:n,defaultProp:i,onChange:r=()=>{},caller:s}){const[a,l,c]=Yh({defaultProp:i,onChange:r}),d=n!==void 0,p=d?n:a;{const v=b.useRef(n!==void 0);b.useEffect(()=>{const w=v.current;w!==d&&console.warn(`${s} is changing from ${w?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=d},[d,s])}const m=b.useCallback(v=>{var w;if(d){const x=Xh(v)?v(n):v;x!==n&&((w=c.current)==null||w.call(c,x))}else l(v)},[d,n,l,c]);return[p,m]}function Yh({defaultProp:n,onChange:i}){const[r,s]=b.useState(n),a=b.useRef(r),l=b.useRef(i);return Kh(()=>{l.current=i},[i]),b.useEffect(()=>{var c;a.current!==r&&((c=l.current)==null||c.call(l,r),a.current=r)},[r,a]),[r,s,l]}function Xh(n){return typeof n=="function"}function Zh(n,i){return b.useReducer((r,s)=>i[r][s]??r,n)}var jn=n=>{const{present:i,children:r}=n,s=Jh(i),a=typeof r=="function"?r({present:s.isPresent}):b.Children.only(r),l=yt(s.ref,Qh(a));return typeof r=="function"||s.isPresent?b.cloneElement(a,{ref:l}):null};jn.displayName="Presence";function Jh(n){const[i,r]=b.useState(),s=b.useRef(null),a=b.useRef(n),l=b.useRef("none"),c=n?"mounted":"unmounted",[d,p]=Zh(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const m=Si(s.current);l.current=d==="mounted"?m:"none"},[d]),En(()=>{const m=s.current,v=a.current;if(v!==n){const x=l.current,R=Si(m);n?p("MOUNT"):R==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(v&&x!==R?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,p]),En(()=>{if(i){let m;const v=i.ownerDocument.defaultView??window,w=R=>{const E=Si(s.current).includes(R.animationName);if(R.target===i&&E&&(p("ANIMATION_END"),!a.current)){const T=i.style.animationFillMode;i.style.animationFillMode="forwards",m=v.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=T)})}},x=R=>{R.target===i&&(l.current=Si(s.current))};return i.addEventListener("animationstart",x),i.addEventListener("animationcancel",w),i.addEventListener("animationend",w),()=>{v.clearTimeout(m),i.removeEventListener("animationstart",x),i.removeEventListener("animationcancel",w),i.removeEventListener("animationend",w)}}else p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:b.useCallback(m=>{s.current=m?getComputedStyle(m):null,r(m)},[])}}function Si(n){return(n==null?void 0:n.animationName)||"none"}function Qh(n){var s,a;let i=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?n.ref:(i=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var eg=b[" useId ".trim().toString()]||(()=>{}),tg=0;function Hr(n){const[i,r]=b.useState(eg());return En(()=>{r(s=>s??String(tg++))},[n]),n||(i?`radix-${i}`:"")}function lr(n){const i=b.useRef(n);return b.useEffect(()=>{i.current=n}),b.useMemo(()=>(...r)=>{var s;return(s=i.current)==null?void 0:s.call(i,...r)},[])}function ng(n,i=globalThis==null?void 0:globalThis.document){const r=lr(n);b.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return i.addEventListener("keydown",s,{capture:!0}),()=>i.removeEventListener("keydown",s,{capture:!0})},[r,i])}var rg="DismissableLayer",os="dismissableLayer.update",ig="dismissableLayer.pointerDownOutside",og="dismissableLayer.focusOutside",ku,Bu=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ri=b.forwardRef((n,i)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...p}=n,m=b.useContext(Bu),[v,w]=b.useState(null),x=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,R]=b.useState({}),P=yt(i,j=>w(j)),E=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),M=E.indexOf(T),F=v?E.indexOf(v):-1,I=m.layersWithOutsidePointerEventsDisabled.size>0,U=F>=M,N=ug(j=>{const ee=j.target,se=[...m.branches].some(be=>be.contains(ee));!U||se||(a==null||a(j),c==null||c(j),j.defaultPrevented||d==null||d())},x),z=lg(j=>{const ee=j.target;[...m.branches].some(be=>be.contains(ee))||(l==null||l(j),c==null||c(j),j.defaultPrevented||d==null||d())},x);return ng(j=>{F===m.layers.size-1&&(s==null||s(j),!j.defaultPrevented&&d&&(j.preventDefault(),d()))},x),b.useEffect(()=>{if(v)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ku=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),Wu(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=ku)}},[v,x,r,m]),b.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),Wu())},[v,m]),b.useEffect(()=>{const j=()=>R({});return document.addEventListener(os,j),()=>document.removeEventListener(os,j)},[]),S.jsx(Ze.div,{...p,ref:P,style:{pointerEvents:I?U?"auto":"none":void 0,...n.style},onFocusCapture:qe(n.onFocusCapture,z.onFocusCapture),onBlurCapture:qe(n.onBlurCapture,z.onBlurCapture),onPointerDownCapture:qe(n.onPointerDownCapture,N.onPointerDownCapture)})});Ri.displayName=rg;var sg="DismissableLayerBranch",ag=b.forwardRef((n,i)=>{const r=b.useContext(Bu),s=b.useRef(null),a=yt(i,s);return b.useEffect(()=>{const l=s.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),S.jsx(Ze.div,{...n,ref:a})});ag.displayName=sg;function ug(n,i=globalThis==null?void 0:globalThis.document){const r=lr(n),s=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let p=function(){Vu(ig,r,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(i.removeEventListener("click",a.current),a.current=p,i.addEventListener("click",a.current,{once:!0})):p()}else i.removeEventListener("click",a.current);s.current=!1},c=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),i.removeEventListener("pointerdown",l),i.removeEventListener("click",a.current)}},[i,r]),{onPointerDownCapture:()=>s.current=!0}}function lg(n,i=globalThis==null?void 0:globalThis.document){const r=lr(n),s=b.useRef(!1);return b.useEffect(()=>{const a=l=>{l.target&&!s.current&&Vu(og,r,{originalEvent:l},{discrete:!1})};return i.addEventListener("focusin",a),()=>i.removeEventListener("focusin",a)},[i,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Wu(){const n=new CustomEvent(os);document.dispatchEvent(n)}function Vu(n,i,r,{discrete:s}){const a=r.originalEvent.target,l=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});i&&a.addEventListener(n,i,{once:!0}),s?$h(a,l):a.dispatchEvent(l)}var ss="focusScope.autoFocusOnMount",as="focusScope.autoFocusOnUnmount",Uu={bubbles:!1,cancelable:!0},cg="FocusScope",us=b.forwardRef((n,i)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...c}=n,[d,p]=b.useState(null),m=lr(a),v=lr(l),w=b.useRef(null),x=yt(i,E=>p(E)),R=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(s){let E=function(I){if(R.paused||!d)return;const U=I.target;d.contains(U)?w.current=U:An(w.current,{select:!0})},T=function(I){if(R.paused||!d)return;const U=I.relatedTarget;U!==null&&(d.contains(U)||An(w.current,{select:!0}))},M=function(I){if(document.activeElement===document.body)for(const N of I)N.removedNodes.length>0&&An(d)};document.addEventListener("focusin",E),document.addEventListener("focusout",T);const F=new MutationObserver(M);return d&&F.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",T),F.disconnect()}}},[s,d,R.paused]),b.useEffect(()=>{if(d){Hu.add(R);const E=document.activeElement;if(!d.contains(E)){const M=new CustomEvent(ss,Uu);d.addEventListener(ss,m),d.dispatchEvent(M),M.defaultPrevented||(fg(vg($u(d)),{select:!0}),document.activeElement===E&&An(d))}return()=>{d.removeEventListener(ss,m),setTimeout(()=>{const M=new CustomEvent(as,Uu);d.addEventListener(as,v),d.dispatchEvent(M),M.defaultPrevented||An(E??document.body,{select:!0}),d.removeEventListener(as,v),Hu.remove(R)},0)}}},[d,m,v,R]);const P=b.useCallback(E=>{if(!r&&!s||R.paused)return;const T=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,M=document.activeElement;if(T&&M){const F=E.currentTarget,[I,U]=dg(F);I&&U?!E.shiftKey&&M===U?(E.preventDefault(),r&&An(I,{select:!0})):E.shiftKey&&M===I&&(E.preventDefault(),r&&An(U,{select:!0})):M===F&&E.preventDefault()}},[r,s,R.paused]);return S.jsx(Ze.div,{tabIndex:-1,...c,ref:x,onKeyDown:P})});us.displayName=cg;function fg(n,{select:i=!1}={}){const r=document.activeElement;for(const s of n)if(An(s,{select:i}),document.activeElement!==r)return}function dg(n){const i=$u(n),r=ju(i,n),s=ju(i.reverse(),n);return[r,s]}function $u(n){const i=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)i.push(r.currentNode);return i}function ju(n,i){for(const r of n)if(!hg(r,{upTo:i}))return r}function hg(n,{upTo:i}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(i!==void 0&&n===i)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function gg(n){return n instanceof HTMLInputElement&&"select"in n}function An(n,{select:i=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&gg(n)&&i&&n.select()}}var Hu=pg();function pg(){let n=[];return{add(i){const r=n[0];i!==r&&(r==null||r.pause()),n=zu(n,i),n.unshift(i)},remove(i){var r;n=zu(n,i),(r=n[0])==null||r.resume()}}}function zu(n,i){const r=[...n],s=r.indexOf(i);return s!==-1&&r.splice(s,1),r}function vg(n){return n.filter(i=>i.tagName!=="A")}var mg="Portal",ls=b.forwardRef((n,i)=>{var d;const{container:r,...s}=n,[a,l]=b.useState(!1);En(()=>l(!0),[]);const c=r||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?ru.createPortal(S.jsx(Ze.div,{...s,ref:i}),c):null});ls.displayName=mg;var cs=0;function qu(){b.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Gu()),document.body.insertAdjacentElement("beforeend",n[1]??Gu()),cs++,()=>{cs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),cs--}},[])}function Gu(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Yt=function(){return Yt=Object.assign||function(i){for(var r,s=1,a=arguments.length;s<a;s++){r=arguments[s];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(i[l]=r[l])}return i},Yt.apply(this,arguments)};function Ku(n,i){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.indexOf(s)<0&&(r[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(n);a<s.length;a++)i.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(n,s[a])&&(r[s[a]]=n[s[a]]);return r}function yg(n,i,r){if(r||arguments.length===2)for(var s=0,a=i.length,l;s<a;s++)(l||!(s in i))&&(l||(l=Array.prototype.slice.call(i,0,s)),l[s]=i[s]);return n.concat(l||Array.prototype.slice.call(i))}typeof SuppressedError=="function"&&SuppressedError;var Oi="right-scroll-bar-position",Pi="width-before-scroll-bar",wg="with-scroll-bars-hidden",xg="--removed-body-scroll-bar-size";function fs(n,i){return typeof n=="function"?n(i):n&&(n.current=i),n}function bg(n,i){var r=bn(function(){return{value:n,callback:i,facade:{get current(){return r.value},set current(s){var a=r.value;a!==s&&(r.value=s,r.callback(s,a))}}}})[0];return r.callback=i,r.facade}var _g=typeof window<"u"?b.useLayoutEffect:b.useEffect,Yu=new WeakMap;function Cg(n,i){var r=bg(null,function(s){return n.forEach(function(a){return fs(a,s)})});return _g(function(){var s=Yu.get(r);if(s){var a=new Set(s),l=new Set(n),c=r.current;a.forEach(function(d){l.has(d)||fs(d,null)}),l.forEach(function(d){a.has(d)||fs(d,c)})}Yu.set(r,n)},[n]),r}function Eg(n){return n}function Ag(n,i){i===void 0&&(i=Eg);var r=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(l){var c=i(l,s);return r.push(c),function(){r=r.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(s=!0;r.length;){var c=r;r=[],c.forEach(l)}r={push:function(d){return l(d)},filter:function(){return r}}},assignMedium:function(l){s=!0;var c=[];if(r.length){var d=r;r=[],d.forEach(l),c=r}var p=function(){var v=c;c=[],v.forEach(l)},m=function(){return Promise.resolve().then(p)};m(),r={push:function(v){c.push(v),m()},filter:function(v){return c=c.filter(v),r}}}};return a}function Sg(n){n===void 0&&(n={});var i=Ag(null);return i.options=Yt({async:!0,ssr:!1},n),i}var Xu=function(n){var i=n.sideCar,r=Ku(n,["sideCar"]);if(!i)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=i.read();if(!s)throw new Error("Sidecar medium not found");return b.createElement(s,Yt({},r))};Xu.isSideCarExport=!0;function Rg(n,i){return n.useMedium(i),Xu}var Zu=Sg(),ds=function(){},Ti=b.forwardRef(function(n,i){var r=b.useRef(null),s=b.useState({onScrollCapture:ds,onWheelCapture:ds,onTouchMoveCapture:ds}),a=s[0],l=s[1],c=n.forwardProps,d=n.children,p=n.className,m=n.removeScrollBar,v=n.enabled,w=n.shards,x=n.sideCar,R=n.noIsolation,P=n.inert,E=n.allowPinchZoom,T=n.as,M=T===void 0?"div":T,F=n.gapMode,I=Ku(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=x,N=Cg([r,i]),z=Yt(Yt({},I),a);return b.createElement(b.Fragment,null,v&&b.createElement(U,{sideCar:Zu,removeScrollBar:m,shards:w,noIsolation:R,inert:P,setCallbacks:l,allowPinchZoom:!!E,lockRef:r,gapMode:F}),c?b.cloneElement(b.Children.only(d),Yt(Yt({},z),{ref:N})):b.createElement(M,Yt({},z,{className:p,ref:N}),d))});Ti.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ti.classNames={fullWidth:Pi,zeroRight:Oi};var Og=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Pg(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var i=Og();return i&&n.setAttribute("nonce",i),n}function Tg(n,i){n.styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i))}function Dg(n){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(n)}var Ig=function(){var n=0,i=null;return{add:function(r){n==0&&(i=Pg())&&(Tg(i,r),Dg(i)),n++},remove:function(){n--,!n&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},Lg=function(){var n=Ig();return function(i,r){b.useEffect(function(){return n.add(i),function(){n.remove()}},[i&&r])}},Ju=function(){var n=Lg(),i=function(r){var s=r.styles,a=r.dynamic;return n(s,a),null};return i},Fg={left:0,top:0,right:0,gap:0},hs=function(n){return parseInt(n||"",10)||0},Mg=function(n){var i=window.getComputedStyle(document.body),r=i[n==="padding"?"paddingLeft":"marginLeft"],s=i[n==="padding"?"paddingTop":"marginTop"],a=i[n==="padding"?"paddingRight":"marginRight"];return[hs(r),hs(s),hs(a)]},Ng=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return Fg;var i=Mg(n),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,s-r+i[2]-i[0])}},kg=Ju(),cr="data-scroll-locked",Bg=function(n,i,r,s){var a=n.left,l=n.top,c=n.right,d=n.gap;return r===void 0&&(r="margin"),`
11
+ .`.concat(wg,` {
12
+ overflow: hidden `).concat(s,`;
13
+ padding-right: `).concat(d,"px ").concat(s,`;
14
+ }
15
+ body[`).concat(cr,`] {
16
+ overflow: hidden `).concat(s,`;
17
+ overscroll-behavior: contain;
18
+ `).concat([i&&"position: relative ".concat(s,";"),r==="margin"&&`
19
+ padding-left: `.concat(a,`px;
20
+ padding-top: `).concat(l,`px;
21
+ padding-right: `).concat(c,`px;
22
+ margin-left:0;
23
+ margin-top:0;
24
+ margin-right: `).concat(d,"px ").concat(s,`;
25
+ `),r==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
26
+ }
27
+
28
+ .`).concat(Oi,` {
29
+ right: `).concat(d,"px ").concat(s,`;
30
+ }
31
+
32
+ .`).concat(Pi,` {
33
+ margin-right: `).concat(d,"px ").concat(s,`;
34
+ }
35
+
36
+ .`).concat(Oi," .").concat(Oi,` {
37
+ right: 0 `).concat(s,`;
38
+ }
39
+
40
+ .`).concat(Pi," .").concat(Pi,` {
41
+ margin-right: 0 `).concat(s,`;
42
+ }
43
+
44
+ body[`).concat(cr,`] {
45
+ `).concat(xg,": ").concat(d,`px;
46
+ }
47
+ `)},Qu=function(){var n=parseInt(document.body.getAttribute(cr)||"0",10);return isFinite(n)?n:0},Wg=function(){b.useEffect(function(){return document.body.setAttribute(cr,(Qu()+1).toString()),function(){var n=Qu()-1;n<=0?document.body.removeAttribute(cr):document.body.setAttribute(cr,n.toString())}},[])},Vg=function(n){var i=n.noRelative,r=n.noImportant,s=n.gapMode,a=s===void 0?"margin":s;Wg();var l=b.useMemo(function(){return Ng(a)},[a]);return b.createElement(kg,{styles:Bg(l,!i,a,r?"":"!important")})},gs=!1;if(typeof window<"u")try{var Di=Object.defineProperty({},"passive",{get:function(){return gs=!0,!0}});window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{gs=!1}var fr=gs?{passive:!1}:!1,Ug=function(n){return n.tagName==="TEXTAREA"},el=function(n,i){if(!(n instanceof Element))return!1;var r=window.getComputedStyle(n);return r[i]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ug(n)&&r[i]==="visible")},$g=function(n){return el(n,"overflowY")},jg=function(n){return el(n,"overflowX")},tl=function(n,i){var r=i.ownerDocument,s=i;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=nl(n,s);if(a){var l=rl(n,s),c=l[1],d=l[2];if(c>d)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},Hg=function(n){var i=n.scrollTop,r=n.scrollHeight,s=n.clientHeight;return[i,r,s]},zg=function(n){var i=n.scrollLeft,r=n.scrollWidth,s=n.clientWidth;return[i,r,s]},nl=function(n,i){return n==="v"?$g(i):jg(i)},rl=function(n,i){return n==="v"?Hg(i):zg(i)},qg=function(n,i){return n==="h"&&i==="rtl"?-1:1},Gg=function(n,i,r,s,a){var l=qg(n,window.getComputedStyle(i).direction),c=l*s,d=r.target,p=i.contains(d),m=!1,v=c>0,w=0,x=0;do{var R=rl(n,d),P=R[0],E=R[1],T=R[2],M=E-T-l*P;(P||M)&&nl(n,d)&&(w+=M,x+=P),d instanceof ShadowRoot?d=d.host:d=d.parentNode}while(!p&&d!==document.body||p&&(i.contains(d)||i===d));return(v&&Math.abs(w)<1||!v&&Math.abs(x)<1)&&(m=!0),m},Ii=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},il=function(n){return[n.deltaX,n.deltaY]},ol=function(n){return n&&"current"in n?n.current:n},Kg=function(n,i){return n[0]===i[0]&&n[1]===i[1]},Yg=function(n){return`
48
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
49
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
50
+ `)},Xg=0,dr=[];function Zg(n){var i=b.useRef([]),r=b.useRef([0,0]),s=b.useRef(),a=b.useState(Xg++)[0],l=b.useState(Ju)[0],c=b.useRef(n);b.useEffect(function(){c.current=n},[n]),b.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(a));var E=yg([n.lockRef.current],(n.shards||[]).map(ol),!0).filter(Boolean);return E.forEach(function(T){return T.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),E.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(a))})}}},[n.inert,n.lockRef.current,n.shards]);var d=b.useCallback(function(E,T){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!c.current.allowPinchZoom;var M=Ii(E),F=r.current,I="deltaX"in E?E.deltaX:F[0]-M[0],U="deltaY"in E?E.deltaY:F[1]-M[1],N,z=E.target,j=Math.abs(I)>Math.abs(U)?"h":"v";if("touches"in E&&j==="h"&&z.type==="range")return!1;var ee=tl(j,z);if(!ee)return!0;if(ee?N=j:(N=j==="v"?"h":"v",ee=tl(j,z)),!ee)return!1;if(!s.current&&"changedTouches"in E&&(I||U)&&(s.current=N),!N)return!0;var se=s.current||N;return Gg(se,T,E,se==="h"?I:U)},[]),p=b.useCallback(function(E){var T=E;if(!(!dr.length||dr[dr.length-1]!==l)){var M="deltaY"in T?il(T):Ii(T),F=i.current.filter(function(N){return N.name===T.type&&(N.target===T.target||T.target===N.shadowParent)&&Kg(N.delta,M)})[0];if(F&&F.should){T.cancelable&&T.preventDefault();return}if(!F){var I=(c.current.shards||[]).map(ol).filter(Boolean).filter(function(N){return N.contains(T.target)}),U=I.length>0?d(T,I[0]):!c.current.noIsolation;U&&T.cancelable&&T.preventDefault()}}},[]),m=b.useCallback(function(E,T,M,F){var I={name:E,delta:T,target:M,should:F,shadowParent:Jg(M)};i.current.push(I),setTimeout(function(){i.current=i.current.filter(function(U){return U!==I})},1)},[]),v=b.useCallback(function(E){r.current=Ii(E),s.current=void 0},[]),w=b.useCallback(function(E){m(E.type,il(E),E.target,d(E,n.lockRef.current))},[]),x=b.useCallback(function(E){m(E.type,Ii(E),E.target,d(E,n.lockRef.current))},[]);b.useEffect(function(){return dr.push(l),n.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:x}),document.addEventListener("wheel",p,fr),document.addEventListener("touchmove",p,fr),document.addEventListener("touchstart",v,fr),function(){dr=dr.filter(function(E){return E!==l}),document.removeEventListener("wheel",p,fr),document.removeEventListener("touchmove",p,fr),document.removeEventListener("touchstart",v,fr)}},[]);var R=n.removeScrollBar,P=n.inert;return b.createElement(b.Fragment,null,P?b.createElement(l,{styles:Yg(a)}):null,R?b.createElement(Vg,{gapMode:n.gapMode}):null)}function Jg(n){for(var i=null;n!==null;)n instanceof ShadowRoot&&(i=n.host,n=n.host),n=n.parentNode;return i}const Qg=Rg(Zu,Zg);var ps=b.forwardRef(function(n,i){return b.createElement(Ti,Yt({},n,{ref:i,sideCar:Qg}))});ps.classNames=Ti.classNames;var ep=function(n){if(typeof document>"u")return null;var i=Array.isArray(n)?n[0]:n;return i.ownerDocument.body},hr=new WeakMap,Li=new WeakMap,Fi={},vs=0,sl=function(n){return n&&(n.host||sl(n.parentNode))},tp=function(n,i){return i.map(function(r){if(n.contains(r))return r;var s=sl(r);return s&&n.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",n,". Doing nothing"),null)}).filter(function(r){return!!r})},np=function(n,i,r,s){var a=tp(i,Array.isArray(n)?n:[n]);Fi[r]||(Fi[r]=new WeakMap);var l=Fi[r],c=[],d=new Set,p=new Set(a),m=function(w){!w||d.has(w)||(d.add(w),m(w.parentNode))};a.forEach(m);var v=function(w){!w||p.has(w)||Array.prototype.forEach.call(w.children,function(x){if(d.has(x))v(x);else try{var R=x.getAttribute(s),P=R!==null&&R!=="false",E=(hr.get(x)||0)+1,T=(l.get(x)||0)+1;hr.set(x,E),l.set(x,T),c.push(x),E===1&&P&&Li.set(x,!0),T===1&&x.setAttribute(r,"true"),P||x.setAttribute(s,"true")}catch(M){console.error("aria-hidden: cannot operate on ",x,M)}})};return v(i),d.clear(),vs++,function(){c.forEach(function(w){var x=hr.get(w)-1,R=l.get(w)-1;hr.set(w,x),l.set(w,R),x||(Li.has(w)||w.removeAttribute(s),Li.delete(w)),R||w.removeAttribute(r)}),vs--,vs||(hr=new WeakMap,hr=new WeakMap,Li=new WeakMap,Fi={})}},al=function(n,i,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),a=ep(n);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live]"))),np(s,a,r,"aria-hidden")):function(){return null}},Mi="Dialog",[ul,gC]=Ai(Mi),[rp,Vt]=ul(Mi),ll=n=>{const{__scopeDialog:i,children:r,open:s,defaultOpen:a,onOpenChange:l,modal:c=!0}=n,d=b.useRef(null),p=b.useRef(null),[m,v]=is({prop:s,defaultProp:a??!1,onChange:l,caller:Mi});return S.jsx(rp,{scope:i,triggerRef:d,contentRef:p,contentId:Hr(),titleId:Hr(),descriptionId:Hr(),open:m,onOpenChange:v,onOpenToggle:b.useCallback(()=>v(w=>!w),[v]),modal:c,children:r})};ll.displayName=Mi;var cl="DialogTrigger",ip=b.forwardRef((n,i)=>{const{__scopeDialog:r,...s}=n,a=Vt(cl,r),l=yt(i,a.triggerRef);return S.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ws(a.open),...s,ref:l,onClick:qe(n.onClick,a.onOpenToggle)})});ip.displayName=cl;var ms="DialogPortal",[op,fl]=ul(ms,{forceMount:void 0}),dl=n=>{const{__scopeDialog:i,forceMount:r,children:s,container:a}=n,l=Vt(ms,i);return S.jsx(op,{scope:i,forceMount:r,children:b.Children.map(s,c=>S.jsx(jn,{present:r||l.open,children:S.jsx(ls,{asChild:!0,container:a,children:c})}))})};dl.displayName=ms;var Ni="DialogOverlay",hl=b.forwardRef((n,i)=>{const r=fl(Ni,n.__scopeDialog),{forceMount:s=r.forceMount,...a}=n,l=Vt(Ni,n.__scopeDialog);return l.modal?S.jsx(jn,{present:s||l.open,children:S.jsx(ap,{...a,ref:i})}):null});hl.displayName=Ni;var sp=rs("DialogOverlay.RemoveScroll"),ap=b.forwardRef((n,i)=>{const{__scopeDialog:r,...s}=n,a=Vt(Ni,r);return S.jsx(ps,{as:sp,allowPinchZoom:!0,shards:[a.contentRef],children:S.jsx(Ze.div,{"data-state":ws(a.open),...s,ref:i,style:{pointerEvents:"auto",...s.style}})})}),Hn="DialogContent",gl=b.forwardRef((n,i)=>{const r=fl(Hn,n.__scopeDialog),{forceMount:s=r.forceMount,...a}=n,l=Vt(Hn,n.__scopeDialog);return S.jsx(jn,{present:s||l.open,children:l.modal?S.jsx(up,{...a,ref:i}):S.jsx(lp,{...a,ref:i})})});gl.displayName=Hn;var up=b.forwardRef((n,i)=>{const r=Vt(Hn,n.__scopeDialog),s=b.useRef(null),a=yt(i,r.contentRef,s);return b.useEffect(()=>{const l=s.current;if(l)return al(l)},[]),S.jsx(pl,{...n,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(n.onCloseAutoFocus,l=>{var c;l.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:qe(n.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:qe(n.onFocusOutside,l=>l.preventDefault())})}),lp=b.forwardRef((n,i)=>{const r=Vt(Hn,n.__scopeDialog),s=b.useRef(!1),a=b.useRef(!1);return S.jsx(pl,{...n,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var c,d;(c=n.onCloseAutoFocus)==null||c.call(n,l),l.defaultPrevented||(s.current||(d=r.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var p,m;(p=n.onInteractOutside)==null||p.call(n,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=l.target;((m=r.triggerRef.current)==null?void 0:m.contains(c))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),pl=b.forwardRef((n,i)=>{const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,...c}=n,d=Vt(Hn,r),p=b.useRef(null),m=yt(i,p);return qu(),S.jsxs(S.Fragment,{children:[S.jsx(us,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:S.jsx(Ri,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":ws(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(dp,{titleId:d.titleId}),S.jsx(gp,{contentRef:p,descriptionId:d.descriptionId})]})]})}),ys="DialogTitle",vl=b.forwardRef((n,i)=>{const{__scopeDialog:r,...s}=n,a=Vt(ys,r);return S.jsx(Ze.h2,{id:a.titleId,...s,ref:i})});vl.displayName=ys;var ml="DialogDescription",cp=b.forwardRef((n,i)=>{const{__scopeDialog:r,...s}=n,a=Vt(ml,r);return S.jsx(Ze.p,{id:a.descriptionId,...s,ref:i})});cp.displayName=ml;var yl="DialogClose",fp=b.forwardRef((n,i)=>{const{__scopeDialog:r,...s}=n,a=Vt(yl,r);return S.jsx(Ze.button,{type:"button",...s,ref:i,onClick:qe(n.onClick,()=>a.onOpenChange(!1))})});fp.displayName=yl;function ws(n){return n?"open":"closed"}var wl="DialogTitleWarning",[pC,xl]=qh(wl,{contentName:Hn,titleName:ys,docsSlug:"dialog"}),dp=({titleId:n})=>{const i=xl(wl),r=`\`${i.contentName}\` requires a \`${i.titleName}\` for the component to be accessible for screen reader users.
51
+
52
+ If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHidden component.
53
+
54
+ For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return b.useEffect(()=>{n&&(document.getElementById(n)||console.error(r))},[r,n]),null},hp="DialogDescriptionWarning",gp=({contentRef:n,descriptionId:i})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${xl(hp).contentName}}.`;return b.useEffect(()=>{var l;const a=(l=n.current)==null?void 0:l.getAttribute("aria-describedby");i&&a&&(document.getElementById(i)||console.warn(s))},[s,n,i]),null},pp=ll,vp=dl,mp=hl,yp=gl,wp=vl;function xp(n){const[i,r]=b.useState(void 0);return En(()=>{if(n){r({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let c,d;if("borderBoxSize"in l){const p=l.borderBoxSize,m=Array.isArray(p)?p[0]:p;c=m.inlineSize,d=m.blockSize}else c=n.offsetWidth,d=n.offsetHeight;r({width:c,height:d})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else r(void 0)},[n]),i}const bp=["top","right","bottom","left"],Sn=Math.min,wt=Math.max,ki=Math.round,Bi=Math.floor,Xt=n=>({x:n,y:n}),_p={left:"right",right:"left",bottom:"top",top:"bottom"},Cp={start:"end",end:"start"};function xs(n,i,r){return wt(n,Sn(i,r))}function an(n,i){return typeof n=="function"?n(i):n}function un(n){return n.split("-")[0]}function gr(n){return n.split("-")[1]}function bs(n){return n==="x"?"y":"x"}function _s(n){return n==="y"?"height":"width"}function Rn(n){return["top","bottom"].includes(un(n))?"y":"x"}function Cs(n){return bs(Rn(n))}function Ep(n,i,r){r===void 0&&(r=!1);const s=gr(n),a=Cs(n),l=_s(a);let c=a==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return i.reference[l]>i.floating[l]&&(c=Wi(c)),[c,Wi(c)]}function Ap(n){const i=Wi(n);return[Es(n),i,Es(i)]}function Es(n){return n.replace(/start|end/g,i=>Cp[i])}function Sp(n,i,r){const s=["left","right"],a=["right","left"],l=["top","bottom"],c=["bottom","top"];switch(n){case"top":case"bottom":return r?i?a:s:i?s:a;case"left":case"right":return i?l:c;default:return[]}}function Rp(n,i,r,s){const a=gr(n);let l=Sp(un(n),r==="start",s);return a&&(l=l.map(c=>c+"-"+a),i&&(l=l.concat(l.map(Es)))),l}function Wi(n){return n.replace(/left|right|bottom|top/g,i=>_p[i])}function Op(n){return{top:0,right:0,bottom:0,left:0,...n}}function bl(n){return typeof n!="number"?Op(n):{top:n,right:n,bottom:n,left:n}}function Vi(n){const{x:i,y:r,width:s,height:a}=n;return{width:s,height:a,top:r,left:i,right:i+s,bottom:r+a,x:i,y:r}}function _l(n,i,r){let{reference:s,floating:a}=n;const l=Rn(i),c=Cs(i),d=_s(c),p=un(i),m=l==="y",v=s.x+s.width/2-a.width/2,w=s.y+s.height/2-a.height/2,x=s[d]/2-a[d]/2;let R;switch(p){case"top":R={x:v,y:s.y-a.height};break;case"bottom":R={x:v,y:s.y+s.height};break;case"right":R={x:s.x+s.width,y:w};break;case"left":R={x:s.x-a.width,y:w};break;default:R={x:s.x,y:s.y}}switch(gr(i)){case"start":R[c]-=x*(r&&m?-1:1);break;case"end":R[c]+=x*(r&&m?-1:1);break}return R}const Pp=async(n,i,r)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:c}=r,d=l.filter(Boolean),p=await(c.isRTL==null?void 0:c.isRTL(i));let m=await c.getElementRects({reference:n,floating:i,strategy:a}),{x:v,y:w}=_l(m,s,p),x=s,R={},P=0;for(let E=0;E<d.length;E++){const{name:T,fn:M}=d[E],{x:F,y:I,data:U,reset:N}=await M({x:v,y:w,initialPlacement:s,placement:x,strategy:a,middlewareData:R,rects:m,platform:c,elements:{reference:n,floating:i}});v=F??v,w=I??w,R={...R,[T]:{...R[T],...U}},N&&P<=50&&(P++,typeof N=="object"&&(N.placement&&(x=N.placement),N.rects&&(m=N.rects===!0?await c.getElementRects({reference:n,floating:i,strategy:a}):N.rects),{x:v,y:w}=_l(m,x,p)),E=-1)}return{x:v,y:w,placement:x,strategy:a,middlewareData:R}};async function zr(n,i){var r;i===void 0&&(i={});const{x:s,y:a,platform:l,rects:c,elements:d,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:w="floating",altBoundary:x=!1,padding:R=0}=an(i,n),P=bl(R),T=d[x?w==="floating"?"reference":"floating":w],M=Vi(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(T)))==null||r?T:T.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:v,strategy:p})),F=w==="floating"?{x:s,y:a,width:c.floating.width,height:c.floating.height}:c.reference,I=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),U=await(l.isElement==null?void 0:l.isElement(I))?await(l.getScale==null?void 0:l.getScale(I))||{x:1,y:1}:{x:1,y:1},N=Vi(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:F,offsetParent:I,strategy:p}):F);return{top:(M.top-N.top+P.top)/U.y,bottom:(N.bottom-M.bottom+P.bottom)/U.y,left:(M.left-N.left+P.left)/U.x,right:(N.right-M.right+P.right)/U.x}}const Tp=n=>({name:"arrow",options:n,async fn(i){const{x:r,y:s,placement:a,rects:l,platform:c,elements:d,middlewareData:p}=i,{element:m,padding:v=0}=an(n,i)||{};if(m==null)return{};const w=bl(v),x={x:r,y:s},R=Cs(a),P=_s(R),E=await c.getDimensions(m),T=R==="y",M=T?"top":"left",F=T?"bottom":"right",I=T?"clientHeight":"clientWidth",U=l.reference[P]+l.reference[R]-x[R]-l.floating[P],N=x[R]-l.reference[R],z=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let j=z?z[I]:0;(!j||!await(c.isElement==null?void 0:c.isElement(z)))&&(j=d.floating[I]||l.floating[P]);const ee=U/2-N/2,se=j/2-E[P]/2-1,be=Sn(w[M],se),Ae=Sn(w[F],se),te=be,Q=j-E[P]-Ae,ae=j/2-E[P]/2+ee,xe=xs(te,ae,Q),pe=!p.arrow&&gr(a)!=null&&ae!==xe&&l.reference[P]/2-(ae<te?be:Ae)-E[P]/2<0,he=pe?ae<te?ae-te:ae-Q:0;return{[R]:x[R]+he,data:{[R]:xe,centerOffset:ae-xe-he,...pe&&{alignmentOffset:he}},reset:pe}}}),Dp=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var r,s;const{placement:a,middlewareData:l,rects:c,initialPlacement:d,platform:p,elements:m}=i,{mainAxis:v=!0,crossAxis:w=!0,fallbackPlacements:x,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:E=!0,...T}=an(n,i);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const M=un(a),F=Rn(d),I=un(d)===d,U=await(p.isRTL==null?void 0:p.isRTL(m.floating)),N=x||(I||!E?[Wi(d)]:Ap(d)),z=P!=="none";!x&&z&&N.push(...Rp(d,E,P,U));const j=[d,...N],ee=await zr(i,T),se=[];let be=((s=l.flip)==null?void 0:s.overflows)||[];if(v&&se.push(ee[M]),w){const ae=Ep(a,c,U);se.push(ee[ae[0]],ee[ae[1]])}if(be=[...be,{placement:a,overflows:se}],!se.every(ae=>ae<=0)){var Ae,te;const ae=(((Ae=l.flip)==null?void 0:Ae.index)||0)+1,xe=j[ae];if(xe)return{data:{index:ae,overflows:be},reset:{placement:xe}};let pe=(te=be.filter(he=>he.overflows[0]<=0).sort((he,ne)=>he.overflows[1]-ne.overflows[1])[0])==null?void 0:te.placement;if(!pe)switch(R){case"bestFit":{var Q;const he=(Q=be.filter(ne=>{if(z){const Oe=Rn(ne.placement);return Oe===F||Oe==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Oe=>Oe>0).reduce((Oe,Ne)=>Oe+Ne,0)]).sort((ne,Oe)=>ne[1]-Oe[1])[0])==null?void 0:Q[0];he&&(pe=he);break}case"initialPlacement":pe=d;break}if(a!==pe)return{reset:{placement:pe}}}return{}}}};function Cl(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function El(n){return bp.some(i=>n[i]>=0)}const Ip=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){const{rects:r}=i,{strategy:s="referenceHidden",...a}=an(n,i);switch(s){case"referenceHidden":{const l=await zr(i,{...a,elementContext:"reference"}),c=Cl(l,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:El(c)}}}case"escaped":{const l=await zr(i,{...a,altBoundary:!0}),c=Cl(l,r.floating);return{data:{escapedOffsets:c,escaped:El(c)}}}default:return{}}}}};async function Lp(n,i){const{placement:r,platform:s,elements:a}=n,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),c=un(r),d=gr(r),p=Rn(r)==="y",m=["left","top"].includes(c)?-1:1,v=l&&p?-1:1,w=an(i,n);let{mainAxis:x,crossAxis:R,alignmentAxis:P}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return d&&typeof P=="number"&&(R=d==="end"?P*-1:P),p?{x:R*v,y:x*m}:{x:x*m,y:R*v}}const Fp=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var r,s;const{x:a,y:l,placement:c,middlewareData:d}=i,p=await Lp(i,n);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+p.x,y:l+p.y,data:{...p,placement:c}}}}},Mp=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:r,y:s,placement:a}=i,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:T=>{let{x:M,y:F}=T;return{x:M,y:F}}},...p}=an(n,i),m={x:r,y:s},v=await zr(i,p),w=Rn(un(a)),x=bs(w);let R=m[x],P=m[w];if(l){const T=x==="y"?"top":"left",M=x==="y"?"bottom":"right",F=R+v[T],I=R-v[M];R=xs(F,R,I)}if(c){const T=w==="y"?"top":"left",M=w==="y"?"bottom":"right",F=P+v[T],I=P-v[M];P=xs(F,P,I)}const E=d.fn({...i,[x]:R,[w]:P});return{...E,data:{x:E.x-r,y:E.y-s,enabled:{[x]:l,[w]:c}}}}}},Np=function(n){return n===void 0&&(n={}),{options:n,fn(i){const{x:r,y:s,placement:a,rects:l,middlewareData:c}=i,{offset:d=0,mainAxis:p=!0,crossAxis:m=!0}=an(n,i),v={x:r,y:s},w=Rn(a),x=bs(w);let R=v[x],P=v[w];const E=an(d,i),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(p){const I=x==="y"?"height":"width",U=l.reference[x]-l.floating[I]+T.mainAxis,N=l.reference[x]+l.reference[I]-T.mainAxis;R<U?R=U:R>N&&(R=N)}if(m){var M,F;const I=x==="y"?"width":"height",U=["top","left"].includes(un(a)),N=l.reference[w]-l.floating[I]+(U&&((M=c.offset)==null?void 0:M[w])||0)+(U?0:T.crossAxis),z=l.reference[w]+l.reference[I]+(U?0:((F=c.offset)==null?void 0:F[w])||0)-(U?T.crossAxis:0);P<N?P=N:P>z&&(P=z)}return{[x]:R,[w]:P}}}},kp=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){var r,s;const{placement:a,rects:l,platform:c,elements:d}=i,{apply:p=()=>{},...m}=an(n,i),v=await zr(i,m),w=un(a),x=gr(a),R=Rn(a)==="y",{width:P,height:E}=l.floating;let T,M;w==="top"||w==="bottom"?(T=w,M=x===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(M=w,T=x==="end"?"top":"bottom");const F=E-v.top-v.bottom,I=P-v.left-v.right,U=Sn(E-v[T],F),N=Sn(P-v[M],I),z=!i.middlewareData.shift;let j=U,ee=N;if((r=i.middlewareData.shift)!=null&&r.enabled.x&&(ee=I),(s=i.middlewareData.shift)!=null&&s.enabled.y&&(j=F),z&&!x){const be=wt(v.left,0),Ae=wt(v.right,0),te=wt(v.top,0),Q=wt(v.bottom,0);R?ee=P-2*(be!==0||Ae!==0?be+Ae:wt(v.left,v.right)):j=E-2*(te!==0||Q!==0?te+Q:wt(v.top,v.bottom))}await p({...i,availableWidth:ee,availableHeight:j});const se=await c.getDimensions(d.floating);return P!==se.width||E!==se.height?{reset:{rects:!0}}:{}}}};function Ui(){return typeof window<"u"}function pr(n){return Al(n)?(n.nodeName||"").toLowerCase():"#document"}function xt(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function Zt(n){var i;return(i=(Al(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function Al(n){return Ui()?n instanceof Node||n instanceof xt(n).Node:!1}function Ut(n){return Ui()?n instanceof Element||n instanceof xt(n).Element:!1}function Jt(n){return Ui()?n instanceof HTMLElement||n instanceof xt(n).HTMLElement:!1}function Sl(n){return!Ui()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof xt(n).ShadowRoot}function qr(n){const{overflow:i,overflowX:r,overflowY:s,display:a}=$t(n);return/auto|scroll|overlay|hidden|clip/.test(i+s+r)&&!["inline","contents"].includes(a)}function Bp(n){return["table","td","th"].includes(pr(n))}function $i(n){return[":popover-open",":modal"].some(i=>{try{return n.matches(i)}catch{return!1}})}function As(n){const i=Ss(),r=Ut(n)?$t(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!i&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!i&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(r.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(r.contain||"").includes(s))}function Wp(n){let i=On(n);for(;Jt(i)&&!vr(i);){if(As(i))return i;if($i(i))return null;i=On(i)}return null}function Ss(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vr(n){return["html","body","#document"].includes(pr(n))}function $t(n){return xt(n).getComputedStyle(n)}function ji(n){return Ut(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function On(n){if(pr(n)==="html")return n;const i=n.assignedSlot||n.parentNode||Sl(n)&&n.host||Zt(n);return Sl(i)?i.host:i}function Rl(n){const i=On(n);return vr(i)?n.ownerDocument?n.ownerDocument.body:n.body:Jt(i)&&qr(i)?i:Rl(i)}function Gr(n,i,r){var s;i===void 0&&(i=[]),r===void 0&&(r=!0);const a=Rl(n),l=a===((s=n.ownerDocument)==null?void 0:s.body),c=xt(a);if(l){const d=Rs(c);return i.concat(c,c.visualViewport||[],qr(a)?a:[],d&&r?Gr(d):[])}return i.concat(a,Gr(a,[],r))}function Rs(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ol(n){const i=$t(n);let r=parseFloat(i.width)||0,s=parseFloat(i.height)||0;const a=Jt(n),l=a?n.offsetWidth:r,c=a?n.offsetHeight:s,d=ki(r)!==l||ki(s)!==c;return d&&(r=l,s=c),{width:r,height:s,$:d}}function Os(n){return Ut(n)?n:n.contextElement}function mr(n){const i=Os(n);if(!Jt(i))return Xt(1);const r=i.getBoundingClientRect(),{width:s,height:a,$:l}=Ol(i);let c=(l?ki(r.width):r.width)/s,d=(l?ki(r.height):r.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const Vp=Xt(0);function Pl(n){const i=xt(n);return!Ss()||!i.visualViewport?Vp:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Up(n,i,r){return i===void 0&&(i=!1),!r||i&&r!==xt(n)?!1:i}function zn(n,i,r,s){i===void 0&&(i=!1),r===void 0&&(r=!1);const a=n.getBoundingClientRect(),l=Os(n);let c=Xt(1);i&&(s?Ut(s)&&(c=mr(s)):c=mr(n));const d=Up(l,r,s)?Pl(l):Xt(0);let p=(a.left+d.x)/c.x,m=(a.top+d.y)/c.y,v=a.width/c.x,w=a.height/c.y;if(l){const x=xt(l),R=s&&Ut(s)?xt(s):s;let P=x,E=Rs(P);for(;E&&s&&R!==P;){const T=mr(E),M=E.getBoundingClientRect(),F=$t(E),I=M.left+(E.clientLeft+parseFloat(F.paddingLeft))*T.x,U=M.top+(E.clientTop+parseFloat(F.paddingTop))*T.y;p*=T.x,m*=T.y,v*=T.x,w*=T.y,p+=I,m+=U,P=xt(E),E=Rs(P)}}return Vi({width:v,height:w,x:p,y:m})}function Ps(n,i){const r=ji(n).scrollLeft;return i?i.left+r:zn(Zt(n)).left+r}function Tl(n,i,r){r===void 0&&(r=!1);const s=n.getBoundingClientRect(),a=s.left+i.scrollLeft-(r?0:Ps(n,s)),l=s.top+i.scrollTop;return{x:a,y:l}}function $p(n){let{elements:i,rect:r,offsetParent:s,strategy:a}=n;const l=a==="fixed",c=Zt(s),d=i?$i(i.floating):!1;if(s===c||d&&l)return r;let p={scrollLeft:0,scrollTop:0},m=Xt(1);const v=Xt(0),w=Jt(s);if((w||!w&&!l)&&((pr(s)!=="body"||qr(c))&&(p=ji(s)),Jt(s))){const R=zn(s);m=mr(s),v.x=R.x+s.clientLeft,v.y=R.y+s.clientTop}const x=c&&!w&&!l?Tl(c,p,!0):Xt(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-p.scrollLeft*m.x+v.x+x.x,y:r.y*m.y-p.scrollTop*m.y+v.y+x.y}}function jp(n){return Array.from(n.getClientRects())}function Hp(n){const i=Zt(n),r=ji(n),s=n.ownerDocument.body,a=wt(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),l=wt(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let c=-r.scrollLeft+Ps(n);const d=-r.scrollTop;return $t(s).direction==="rtl"&&(c+=wt(i.clientWidth,s.clientWidth)-a),{width:a,height:l,x:c,y:d}}function zp(n,i){const r=xt(n),s=Zt(n),a=r.visualViewport;let l=s.clientWidth,c=s.clientHeight,d=0,p=0;if(a){l=a.width,c=a.height;const m=Ss();(!m||m&&i==="fixed")&&(d=a.offsetLeft,p=a.offsetTop)}return{width:l,height:c,x:d,y:p}}function qp(n,i){const r=zn(n,!0,i==="fixed"),s=r.top+n.clientTop,a=r.left+n.clientLeft,l=Jt(n)?mr(n):Xt(1),c=n.clientWidth*l.x,d=n.clientHeight*l.y,p=a*l.x,m=s*l.y;return{width:c,height:d,x:p,y:m}}function Dl(n,i,r){let s;if(i==="viewport")s=zp(n,r);else if(i==="document")s=Hp(Zt(n));else if(Ut(i))s=qp(i,r);else{const a=Pl(n);s={x:i.x-a.x,y:i.y-a.y,width:i.width,height:i.height}}return Vi(s)}function Il(n,i){const r=On(n);return r===i||!Ut(r)||vr(r)?!1:$t(r).position==="fixed"||Il(r,i)}function Gp(n,i){const r=i.get(n);if(r)return r;let s=Gr(n,[],!1).filter(d=>Ut(d)&&pr(d)!=="body"),a=null;const l=$t(n).position==="fixed";let c=l?On(n):n;for(;Ut(c)&&!vr(c);){const d=$t(c),p=As(c);!p&&d.position==="fixed"&&(a=null),(l?!p&&!a:!p&&d.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||qr(c)&&!p&&Il(n,c))?s=s.filter(v=>v!==c):a=d,c=On(c)}return i.set(n,s),s}function Kp(n){let{element:i,boundary:r,rootBoundary:s,strategy:a}=n;const c=[...r==="clippingAncestors"?$i(i)?[]:Gp(i,this._c):[].concat(r),s],d=c[0],p=c.reduce((m,v)=>{const w=Dl(i,v,a);return m.top=wt(w.top,m.top),m.right=Sn(w.right,m.right),m.bottom=Sn(w.bottom,m.bottom),m.left=wt(w.left,m.left),m},Dl(i,d,a));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Yp(n){const{width:i,height:r}=Ol(n);return{width:i,height:r}}function Xp(n,i,r){const s=Jt(i),a=Zt(i),l=r==="fixed",c=zn(n,!0,l,i);let d={scrollLeft:0,scrollTop:0};const p=Xt(0);if(s||!s&&!l)if((pr(i)!=="body"||qr(a))&&(d=ji(i)),s){const x=zn(i,!0,l,i);p.x=x.x+i.clientLeft,p.y=x.y+i.clientTop}else a&&(p.x=Ps(a));const m=a&&!s&&!l?Tl(a,d):Xt(0),v=c.left+d.scrollLeft-p.x-m.x,w=c.top+d.scrollTop-p.y-m.y;return{x:v,y:w,width:c.width,height:c.height}}function Ts(n){return $t(n).position==="static"}function Ll(n,i){if(!Jt(n)||$t(n).position==="fixed")return null;if(i)return i(n);let r=n.offsetParent;return Zt(n)===r&&(r=r.ownerDocument.body),r}function Fl(n,i){const r=xt(n);if($i(n))return r;if(!Jt(n)){let a=On(n);for(;a&&!vr(a);){if(Ut(a)&&!Ts(a))return a;a=On(a)}return r}let s=Ll(n,i);for(;s&&Bp(s)&&Ts(s);)s=Ll(s,i);return s&&vr(s)&&Ts(s)&&!As(s)?r:s||Wp(n)||r}const Zp=async function(n){const i=this.getOffsetParent||Fl,r=this.getDimensions,s=await r(n.floating);return{reference:Xp(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Jp(n){return $t(n).direction==="rtl"}const Qp={convertOffsetParentRelativeRectToViewportRelativeRect:$p,getDocumentElement:Zt,getClippingRect:Kp,getOffsetParent:Fl,getElementRects:Zp,getClientRects:jp,getDimensions:Yp,getScale:mr,isElement:Ut,isRTL:Jp};function Ml(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function ev(n,i){let r=null,s;const a=Zt(n);function l(){var d;clearTimeout(s),(d=r)==null||d.disconnect(),r=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),l();const m=n.getBoundingClientRect(),{left:v,top:w,width:x,height:R}=m;if(d||i(),!x||!R)return;const P=Bi(w),E=Bi(a.clientWidth-(v+x)),T=Bi(a.clientHeight-(w+R)),M=Bi(v),I={rootMargin:-P+"px "+-E+"px "+-T+"px "+-M+"px",threshold:wt(0,Sn(1,p))||1};let U=!0;function N(z){const j=z[0].intersectionRatio;if(j!==p){if(!U)return c();j?c(!1,j):s=setTimeout(()=>{c(!1,1e-7)},1e3)}j===1&&!Ml(m,n.getBoundingClientRect())&&c(),U=!1}try{r=new IntersectionObserver(N,{...I,root:a.ownerDocument})}catch{r=new IntersectionObserver(N,I)}r.observe(n)}return c(!0),l}function tv(n,i,r,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=s,m=Os(n),v=a||l?[...m?Gr(m):[],...Gr(i)]:[];v.forEach(M=>{a&&M.addEventListener("scroll",r,{passive:!0}),l&&M.addEventListener("resize",r)});const w=m&&d?ev(m,r):null;let x=-1,R=null;c&&(R=new ResizeObserver(M=>{let[F]=M;F&&F.target===m&&R&&(R.unobserve(i),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var I;(I=R)==null||I.observe(i)})),r()}),m&&!p&&R.observe(m),R.observe(i));let P,E=p?zn(n):null;p&&T();function T(){const M=zn(n);E&&!Ml(E,M)&&r(),E=M,P=requestAnimationFrame(T)}return r(),()=>{var M;v.forEach(F=>{a&&F.removeEventListener("scroll",r),l&&F.removeEventListener("resize",r)}),w==null||w(),(M=R)==null||M.disconnect(),R=null,p&&cancelAnimationFrame(P)}}const nv=Fp,rv=Mp,iv=Dp,ov=kp,sv=Ip,Nl=Tp,av=Np,uv=(n,i,r)=>{const s=new Map,a={platform:Qp,...r},l={...a.platform,_c:s};return Pp(n,i,{...a,platform:l})};var Hi=typeof document<"u"?eu:_n;function zi(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let r,s,a;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==i.length)return!1;for(s=r;s--!==0;)if(!zi(n[s],i[s]))return!1;return!0}if(a=Object.keys(n),r=a.length,r!==Object.keys(i).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(i,a[s]))return!1;for(s=r;s--!==0;){const l=a[s];if(!(l==="_owner"&&n.$$typeof)&&!zi(n[l],i[l]))return!1}return!0}return n!==n&&i!==i}function kl(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Bl(n,i){const r=kl(n);return Math.round(i*r)/r}function Ds(n){const i=b.useRef(n);return Hi(()=>{i.current=n}),i}function lv(n){n===void 0&&(n={});const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:p,open:m}=n,[v,w]=b.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[x,R]=b.useState(s);zi(x,s)||R(s);const[P,E]=b.useState(null),[T,M]=b.useState(null),F=b.useCallback(ne=>{ne!==z.current&&(z.current=ne,E(ne))},[]),I=b.useCallback(ne=>{ne!==j.current&&(j.current=ne,M(ne))},[]),U=l||P,N=c||T,z=b.useRef(null),j=b.useRef(null),ee=b.useRef(v),se=p!=null,be=Ds(p),Ae=Ds(a),te=Ds(m),Q=b.useCallback(()=>{if(!z.current||!j.current)return;const ne={placement:i,strategy:r,middleware:x};Ae.current&&(ne.platform=Ae.current),uv(z.current,j.current,ne).then(Oe=>{const Ne={...Oe,isPositioned:te.current!==!1};ae.current&&!zi(ee.current,Ne)&&(ee.current=Ne,Xo.flushSync(()=>{w(Ne)}))})},[x,i,r,Ae,te]);Hi(()=>{m===!1&&ee.current.isPositioned&&(ee.current.isPositioned=!1,w(ne=>({...ne,isPositioned:!1})))},[m]);const ae=b.useRef(!1);Hi(()=>(ae.current=!0,()=>{ae.current=!1}),[]),Hi(()=>{if(U&&(z.current=U),N&&(j.current=N),U&&N){if(be.current)return be.current(U,N,Q);Q()}},[U,N,Q,be,se]);const xe=b.useMemo(()=>({reference:z,floating:j,setReference:F,setFloating:I}),[F,I]),pe=b.useMemo(()=>({reference:U,floating:N}),[U,N]),he=b.useMemo(()=>{const ne={position:r,left:0,top:0};if(!pe.floating)return ne;const Oe=Bl(pe.floating,v.x),Ne=Bl(pe.floating,v.y);return d?{...ne,transform:"translate("+Oe+"px, "+Ne+"px)",...kl(pe.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Oe,top:Ne}},[r,d,pe.floating,v.x,v.y]);return b.useMemo(()=>({...v,update:Q,refs:xe,elements:pe,floatingStyles:he}),[v,Q,xe,pe,he])}const cv=n=>{function i(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:n,fn(r){const{element:s,padding:a}=typeof n=="function"?n(r):n;return s&&i(s)?s.current!=null?Nl({element:s.current,padding:a}).fn(r):{}:s?Nl({element:s,padding:a}).fn(r):{}}}},fv=(n,i)=>({...nv(n),options:[n,i]}),dv=(n,i)=>({...rv(n),options:[n,i]}),hv=(n,i)=>({...av(n),options:[n,i]}),gv=(n,i)=>({...iv(n),options:[n,i]}),pv=(n,i)=>({...ov(n),options:[n,i]}),vv=(n,i)=>({...sv(n),options:[n,i]}),mv=(n,i)=>({...cv(n),options:[n,i]});var yv="Arrow",Wl=b.forwardRef((n,i)=>{const{children:r,width:s=10,height:a=5,...l}=n;return S.jsx(Ze.svg,{...l,ref:i,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?r:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wl.displayName=yv;var wv=Wl,Is="Popper",[Vl,qi]=Ai(Is),[xv,Ul]=Vl(Is),$l=n=>{const{__scopePopper:i,children:r}=n,[s,a]=b.useState(null);return S.jsx(xv,{scope:i,anchor:s,onAnchorChange:a,children:r})};$l.displayName=Is;var jl="PopperAnchor",Hl=b.forwardRef((n,i)=>{const{__scopePopper:r,virtualRef:s,...a}=n,l=Ul(jl,r),c=b.useRef(null),d=yt(i,c);return b.useEffect(()=>{l.onAnchorChange((s==null?void 0:s.current)||c.current)}),s?null:S.jsx(Ze.div,{...a,ref:d})});Hl.displayName=jl;var Ls="PopperContent",[bv,_v]=Vl(Ls),zl=b.forwardRef((n,i)=>{var Ot,Pt,st,Yn,jt,en;const{__scopePopper:r,side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:v=0,sticky:w="partial",hideWhenDetached:x=!1,updatePositionStrategy:R="optimized",onPlaced:P,...E}=n,T=Ul(Ls,r),[M,F]=b.useState(null),I=yt(i,tn=>F(tn)),[U,N]=b.useState(null),z=xp(U),j=(z==null?void 0:z.width)??0,ee=(z==null?void 0:z.height)??0,se=s+(l!=="center"?"-"+l:""),be=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},Ae=Array.isArray(m)?m:[m],te=Ae.length>0,Q={padding:be,boundary:Ae.filter(Ev),altBoundary:te},{refs:ae,floatingStyles:xe,placement:pe,isPositioned:he,middlewareData:ne}=lv({strategy:"fixed",placement:se,whileElementsMounted:(...tn)=>tv(...tn,{animationFrame:R==="always"}),elements:{reference:T.anchor},middleware:[fv({mainAxis:a+ee,alignmentAxis:c}),p&&dv({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?hv():void 0,...Q}),p&&gv({...Q}),pv({...Q,apply:({elements:tn,rects:Qe,availableWidth:fn,availableHeight:xr})=>{const{width:ct,height:br}=Qe.reference,Dn=tn.floating.style;Dn.setProperty("--radix-popper-available-width",`${fn}px`),Dn.setProperty("--radix-popper-available-height",`${xr}px`),Dn.setProperty("--radix-popper-anchor-width",`${ct}px`),Dn.setProperty("--radix-popper-anchor-height",`${br}px`)}}),U&&mv({element:U,padding:d}),Av({arrowWidth:j,arrowHeight:ee}),x&&vv({strategy:"referenceHidden",...Q})]}),[Oe,Ne]=Kl(pe),Ve=lr(P);En(()=>{he&&(Ve==null||Ve())},[he,Ve]);const Pn=(Ot=ne.arrow)==null?void 0:Ot.x,Tn=(Pt=ne.arrow)==null?void 0:Pt.y,Kn=((st=ne.arrow)==null?void 0:st.centerOffset)!==0,[bt,Ue]=b.useState();return En(()=>{M&&Ue(window.getComputedStyle(M).zIndex)},[M]),S.jsx("div",{ref:ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...xe,transform:he?xe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:bt,"--radix-popper-transform-origin":[(Yn=ne.transformOrigin)==null?void 0:Yn.x,(jt=ne.transformOrigin)==null?void 0:jt.y].join(" "),...((en=ne.hide)==null?void 0:en.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:S.jsx(bv,{scope:r,placedSide:Oe,onArrowChange:N,arrowX:Pn,arrowY:Tn,shouldHideArrow:Kn,children:S.jsx(Ze.div,{"data-side":Oe,"data-align":Ne,...E,ref:I,style:{...E.style,animation:he?void 0:"none"}})})})});zl.displayName=Ls;var ql="PopperArrow",Cv={top:"bottom",right:"left",bottom:"top",left:"right"},Gl=b.forwardRef(function(i,r){const{__scopePopper:s,...a}=i,l=_v(ql,s),c=Cv[l.placedSide];return S.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:S.jsx(wv,{...a,ref:r,style:{...a.style,display:"block"}})})});Gl.displayName=ql;function Ev(n){return n!==null}var Av=n=>({name:"transformOrigin",options:n,fn(i){var T,M,F;const{placement:r,rects:s,middlewareData:a}=i,c=((T=a.arrow)==null?void 0:T.centerOffset)!==0,d=c?0:n.arrowWidth,p=c?0:n.arrowHeight,[m,v]=Kl(r),w={start:"0%",center:"50%",end:"100%"}[v],x=(((M=a.arrow)==null?void 0:M.x)??0)+d/2,R=(((F=a.arrow)==null?void 0:F.y)??0)+p/2;let P="",E="";return m==="bottom"?(P=c?w:`${x}px`,E=`${-p}px`):m==="top"?(P=c?w:`${x}px`,E=`${s.floating.height+p}px`):m==="right"?(P=`${-p}px`,E=c?w:`${R}px`):m==="left"&&(P=`${s.floating.width+p}px`,E=c?w:`${R}px`),{data:{x:P,y:E}}}});function Kl(n){const[i,r="center"]=n.split("-");return[i,r]}var Yl=$l,Fs=Hl,Xl=zl,Zl=Gl,Gi="Popover",[Jl,vC]=Ai(Gi,[qi]),Kr=qi(),[Sv,qn]=Jl(Gi),Ql=n=>{const{__scopePopover:i,children:r,open:s,defaultOpen:a,onOpenChange:l,modal:c=!1}=n,d=Kr(i),p=b.useRef(null),[m,v]=b.useState(!1),[w,x]=is({prop:s,defaultProp:a??!1,onChange:l,caller:Gi});return S.jsx(Yl,{...d,children:S.jsx(Sv,{scope:i,contentId:Hr(),triggerRef:p,open:w,onOpenChange:x,onOpenToggle:b.useCallback(()=>x(R=>!R),[x]),hasCustomAnchor:m,onCustomAnchorAdd:b.useCallback(()=>v(!0),[]),onCustomAnchorRemove:b.useCallback(()=>v(!1),[]),modal:c,children:r})})};Ql.displayName=Gi;var ec="PopoverAnchor",Rv=b.forwardRef((n,i)=>{const{__scopePopover:r,...s}=n,a=qn(ec,r),l=Kr(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:d}=a;return b.useEffect(()=>(c(),()=>d()),[c,d]),S.jsx(Fs,{...l,...s,ref:i})});Rv.displayName=ec;var tc="PopoverTrigger",nc=b.forwardRef((n,i)=>{const{__scopePopover:r,...s}=n,a=qn(tc,r),l=Kr(r),c=yt(i,a.triggerRef),d=S.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":sc(a.open),...s,ref:c,onClick:qe(n.onClick,a.onOpenToggle)});return a.hasCustomAnchor?d:S.jsx(Fs,{asChild:!0,...l,children:d})});nc.displayName=tc;var Ov="PopoverPortal",[mC,Pv]=Jl(Ov,{forceMount:void 0}),yr="PopoverContent",rc=b.forwardRef((n,i)=>{const r=Pv(yr,n.__scopePopover),{forceMount:s=r.forceMount,...a}=n,l=qn(yr,n.__scopePopover);return S.jsx(jn,{present:s||l.open,children:l.modal?S.jsx(Dv,{...a,ref:i}):S.jsx(Iv,{...a,ref:i})})});rc.displayName=yr;var Tv=rs("PopoverContent.RemoveScroll"),Dv=b.forwardRef((n,i)=>{const r=qn(yr,n.__scopePopover),s=b.useRef(null),a=yt(i,s),l=b.useRef(!1);return b.useEffect(()=>{const c=s.current;if(c)return al(c)},[]),S.jsx(ps,{as:Tv,allowPinchZoom:!0,children:S.jsx(ic,{...n,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(n.onCloseAutoFocus,c=>{var d;c.preventDefault(),l.current||(d=r.triggerRef.current)==null||d.focus()}),onPointerDownOutside:qe(n.onPointerDownOutside,c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,m=d.button===2||p;l.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:qe(n.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),Iv=b.forwardRef((n,i)=>{const r=qn(yr,n.__scopePopover),s=b.useRef(!1),a=b.useRef(!1);return S.jsx(ic,{...n,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var c,d;(c=n.onCloseAutoFocus)==null||c.call(n,l),l.defaultPrevented||(s.current||(d=r.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var p,m;(p=n.onInteractOutside)==null||p.call(n,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=l.target;((m=r.triggerRef.current)==null?void 0:m.contains(c))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),ic=b.forwardRef((n,i)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,...w}=n,x=qn(yr,r),R=Kr(r);return qu(),S.jsx(us,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:S.jsx(Ri,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:v,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:m,onDismiss:()=>x.onOpenChange(!1),children:S.jsx(Xl,{"data-state":sc(x.open),role:"dialog",id:x.contentId,...R,...w,ref:i,style:{...w.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),oc="PopoverClose",Lv=b.forwardRef((n,i)=>{const{__scopePopover:r,...s}=n,a=qn(oc,r);return S.jsx(Ze.button,{type:"button",...s,ref:i,onClick:qe(n.onClick,()=>a.onOpenChange(!1))})});Lv.displayName=oc;var Fv="PopoverArrow",Mv=b.forwardRef((n,i)=>{const{__scopePopover:r,...s}=n,a=Kr(r);return S.jsx(Zl,{...a,...s,ref:i})});Mv.displayName=Fv;function sc(n){return n?"open":"closed"}var Nv=Ql,ac=nc,uc=rc,kv="Separator",lc="horizontal",Bv=["horizontal","vertical"],cc=b.forwardRef((n,i)=>{const{decorative:r,orientation:s=lc,...a}=n,l=Wv(s)?s:lc,d=r?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return S.jsx(Ze.div,{"data-orientation":l,...d,...a,ref:i})});cc.displayName=kv;function Wv(n){return Bv.includes(n)}var Vv=cc,[Ki,yC]=Ai("Tooltip",[qi]),Yi=qi(),fc="TooltipProvider",Uv=700,Ms="tooltip.open",[$v,Ns]=Ki(fc),dc=n=>{const{__scopeTooltip:i,delayDuration:r=Uv,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:l}=n,c=b.useRef(!0),d=b.useRef(!1),p=b.useRef(0);return b.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),S.jsx($v,{scope:i,isOpenDelayedRef:c,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:d,onPointerInTransitChange:b.useCallback(m=>{d.current=m},[]),disableHoverableContent:a,children:l})};dc.displayName=fc;var Yr="Tooltip",[jv,Xr]=Ki(Yr),hc=n=>{const{__scopeTooltip:i,children:r,open:s,defaultOpen:a,onOpenChange:l,disableHoverableContent:c,delayDuration:d}=n,p=Ns(Yr,n.__scopeTooltip),m=Yi(i),[v,w]=b.useState(null),x=Hr(),R=b.useRef(0),P=c??p.disableHoverableContent,E=d??p.delayDuration,T=b.useRef(!1),[M,F]=is({prop:s,defaultProp:a??!1,onChange:j=>{j?(p.onOpen(),document.dispatchEvent(new CustomEvent(Ms))):p.onClose(),l==null||l(j)},caller:Yr}),I=b.useMemo(()=>M?T.current?"delayed-open":"instant-open":"closed",[M]),U=b.useCallback(()=>{window.clearTimeout(R.current),R.current=0,T.current=!1,F(!0)},[F]),N=b.useCallback(()=>{window.clearTimeout(R.current),R.current=0,F(!1)},[F]),z=b.useCallback(()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>{T.current=!0,F(!0),R.current=0},E)},[E,F]);return b.useEffect(()=>()=>{R.current&&(window.clearTimeout(R.current),R.current=0)},[]),S.jsx(Yl,{...m,children:S.jsx(jv,{scope:i,contentId:x,open:M,stateAttribute:I,trigger:v,onTriggerChange:w,onTriggerEnter:b.useCallback(()=>{p.isOpenDelayedRef.current?z():U()},[p.isOpenDelayedRef,z,U]),onTriggerLeave:b.useCallback(()=>{P?N():(window.clearTimeout(R.current),R.current=0)},[N,P]),onOpen:U,onClose:N,disableHoverableContent:P,children:r})})};hc.displayName=Yr;var ks="TooltipTrigger",gc=b.forwardRef((n,i)=>{const{__scopeTooltip:r,...s}=n,a=Xr(ks,r),l=Ns(ks,r),c=Yi(r),d=b.useRef(null),p=yt(i,d,a.onTriggerChange),m=b.useRef(!1),v=b.useRef(!1),w=b.useCallback(()=>m.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",w),[w]),S.jsx(Fs,{asChild:!0,...c,children:S.jsx(Ze.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:p,onPointerMove:qe(n.onPointerMove,x=>{x.pointerType!=="touch"&&!v.current&&!l.isPointerInTransitRef.current&&(a.onTriggerEnter(),v.current=!0)}),onPointerLeave:qe(n.onPointerLeave,()=>{a.onTriggerLeave(),v.current=!1}),onPointerDown:qe(n.onPointerDown,()=>{a.open&&a.onClose(),m.current=!0,document.addEventListener("pointerup",w,{once:!0})}),onFocus:qe(n.onFocus,()=>{m.current||a.onOpen()}),onBlur:qe(n.onBlur,a.onClose),onClick:qe(n.onClick,a.onClose)})})});gc.displayName=ks;var Bs="TooltipPortal",[Hv,zv]=Ki(Bs,{forceMount:void 0}),pc=n=>{const{__scopeTooltip:i,forceMount:r,children:s,container:a}=n,l=Xr(Bs,i);return S.jsx(Hv,{scope:i,forceMount:r,children:S.jsx(jn,{present:r||l.open,children:S.jsx(ls,{asChild:!0,container:a,children:s})})})};pc.displayName=Bs;var wr="TooltipContent",vc=b.forwardRef((n,i)=>{const r=zv(wr,n.__scopeTooltip),{forceMount:s=r.forceMount,side:a="top",...l}=n,c=Xr(wr,n.__scopeTooltip);return S.jsx(jn,{present:s||c.open,children:c.disableHoverableContent?S.jsx(mc,{side:a,...l,ref:i}):S.jsx(qv,{side:a,...l,ref:i})})}),qv=b.forwardRef((n,i)=>{const r=Xr(wr,n.__scopeTooltip),s=Ns(wr,n.__scopeTooltip),a=b.useRef(null),l=yt(i,a),[c,d]=b.useState(null),{trigger:p,onClose:m}=r,v=a.current,{onPointerInTransitChange:w}=s,x=b.useCallback(()=>{d(null),w(!1)},[w]),R=b.useCallback((P,E)=>{const T=P.currentTarget,M={x:P.clientX,y:P.clientY},F=Zv(M,T.getBoundingClientRect()),I=Jv(M,F),U=Qv(E.getBoundingClientRect()),N=tm([...I,...U]);d(N),w(!0)},[w]);return b.useEffect(()=>()=>x(),[x]),b.useEffect(()=>{if(p&&v){const P=T=>R(T,v),E=T=>R(T,p);return p.addEventListener("pointerleave",P),v.addEventListener("pointerleave",E),()=>{p.removeEventListener("pointerleave",P),v.removeEventListener("pointerleave",E)}}},[p,v,R,x]),b.useEffect(()=>{if(c){const P=E=>{const T=E.target,M={x:E.clientX,y:E.clientY},F=(p==null?void 0:p.contains(T))||(v==null?void 0:v.contains(T)),I=!em(M,c);F?x():I&&(x(),m())};return document.addEventListener("pointermove",P),()=>document.removeEventListener("pointermove",P)}},[p,v,c,m,x]),S.jsx(mc,{...n,ref:l})}),[Gv,Kv]=Ki(Yr,{isInside:!1}),Yv=kh("TooltipContent"),mc=b.forwardRef((n,i)=>{const{__scopeTooltip:r,children:s,"aria-label":a,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=n,p=Xr(wr,r),m=Yi(r),{onClose:v}=p;return b.useEffect(()=>(document.addEventListener(Ms,v),()=>document.removeEventListener(Ms,v)),[v]),b.useEffect(()=>{if(p.trigger){const w=x=>{const R=x.target;R!=null&&R.contains(p.trigger)&&v()};return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[p.trigger,v]),S.jsx(Ri,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:w=>w.preventDefault(),onDismiss:v,children:S.jsxs(Xl,{"data-state":p.stateAttribute,...m,...d,ref:i,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[S.jsx(Yv,{children:s}),S.jsx(Gv,{scope:r,isInside:!0,children:S.jsx(zh,{id:p.contentId,role:"tooltip",children:a||s})})]})})});vc.displayName=wr;var yc="TooltipArrow",Xv=b.forwardRef((n,i)=>{const{__scopeTooltip:r,...s}=n,a=Yi(r);return Kv(yc,r).isInside?null:S.jsx(Zl,{...a,...s,ref:i})});Xv.displayName=yc;function Zv(n,i){const r=Math.abs(i.top-n.y),s=Math.abs(i.bottom-n.y),a=Math.abs(i.right-n.x),l=Math.abs(i.left-n.x);switch(Math.min(r,s,a,l)){case l:return"left";case a:return"right";case r:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function Jv(n,i,r=5){const s=[];switch(i){case"top":s.push({x:n.x-r,y:n.y+r},{x:n.x+r,y:n.y+r});break;case"bottom":s.push({x:n.x-r,y:n.y-r},{x:n.x+r,y:n.y-r});break;case"left":s.push({x:n.x+r,y:n.y-r},{x:n.x+r,y:n.y+r});break;case"right":s.push({x:n.x-r,y:n.y-r},{x:n.x-r,y:n.y+r});break}return s}function Qv(n){const{top:i,right:r,bottom:s,left:a}=n;return[{x:a,y:i},{x:r,y:i},{x:r,y:s},{x:a,y:s}]}function em(n,i){const{x:r,y:s}=n;let a=!1;for(let l=0,c=i.length-1;l<i.length;c=l++){const d=i[l],p=i[c],m=d.x,v=d.y,w=p.x,x=p.y;v>s!=x>s&&r<(w-m)*(s-v)/(x-v)+m&&(a=!a)}return a}function tm(n){const i=n.slice();return i.sort((r,s)=>r.x<s.x?-1:r.x>s.x?1:r.y<s.y?-1:r.y>s.y?1:0),nm(i)}function nm(n){if(n.length<=1)return n.slice();const i=[];for(let s=0;s<n.length;s++){const a=n[s];for(;i.length>=2;){const l=i[i.length-1],c=i[i.length-2];if((l.x-c.x)*(a.y-c.y)>=(l.y-c.y)*(a.x-c.x))i.pop();else break}i.push(a)}i.pop();const r=[];for(let s=n.length-1;s>=0;s--){const a=n[s];for(;r.length>=2;){const l=r[r.length-1],c=r[r.length-2];if((l.x-c.x)*(a.y-c.y)>=(l.y-c.y)*(a.x-c.x))r.pop();else break}r.push(a)}return r.pop(),i.length===1&&r.length===1&&i[0].x===r[0].x&&i[0].y===r[0].y?i:i.concat(r)}var rm=dc,im=hc,om=gc,sm=pc,am=vc;const wc=pi(null),wC=Ce("MystaLibProvider",({configOptions:n,children:i})=>{const r=Un(()=>({preset:n.preset,locale:n.locale}),[n.preset,n.locale]);return S.jsx(wc.Provider,{value:r,children:S.jsx(rm,{children:i})})}),um=Ce("useMystaLib",()=>{const n=vi(wc);if(!n)throw new Error("useMystaLib must be used within a MystaLibProvider");return n}),xc=pi(null),lm=Ce("KanbanProvider",({children:n,onUpdate:i})=>{const[r,s]=bn(null),[a,l]=bn([]),c=Un(()=>({dragItem:r,setDragItem:s,cardElements:a,setCardElements:l,onUpdate:i}),[r,s,a,l,i]);return S.jsx(xc.Provider,{value:c,children:n})}),cm=Ce("useKanban",()=>{const n=vi(xc);if(!n)throw new Error("useKanban must be used within a KanbanProvider");return n});function bc(n){var i,r,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(i=0;i<a;i++)n[i]&&(r=bc(n[i]))&&(s&&(s+=" "),s+=r)}else for(r in n)n[r]&&(s&&(s+=" "),s+=r);return s}function ln(){for(var n,i,r=0,s="",a=arguments.length;r<a;r++)(n=arguments[r])&&(i=bc(n))&&(s&&(s+=" "),s+=i);return s}function Qt(n,i){const{preset:r}=um(),s=r==null?void 0:r[n];if(!s)return{};const a={};for(const l in s){const c=s[l];if(typeof c=="function"){const d=c(i),{className:p,...m}=d??{};a[l]={"data-pc-section":l,className:ln(p),...m}}else a[l]=c}return a}const fm=Ce("useEffectiveControl",()=>{try{return Iu().methods.control}catch{}try{return Tu().control}catch{}}),dm=Ce("useEffectiveRegister",()=>{try{return xi()}catch{return null}}),hm=Ce("useRegisterValidator",(n,i)=>{const{register:r}=dm()??{},s={uppercase:c=>/[A-Z]/.test(c)?!0:"Password should contain an uppercase letter",lowercase:c=>/[a-z]/.test(c)?!0:"Password should contain a lowercase letter","special-character":c=>/[!@#$%^&*()_+{}[\]:;"'<>,.?/\\|`~-]/.test(c)?!0:"Password should contain a special character","alpha-numeric":c=>/[A-Za-z]/.test(c)&&/\d/.test(c)?!0:"Password should be alphanumeric"},a=c=>{var d;return!!(n[c]||(d=n.customMessage)!=null&&d[c])},l=Un(()=>{var d,p,m,v,w,x,R,P;return r?{...a("required")&&{required:((d=n.customMessage)==null?void 0:d.required)??"This field is required"},...a("minLength")&&{minLength:{value:n.minLength??0,message:((p=n.customMessage)==null?void 0:p.minLength)??`Min. ${n.minLength} characters`}},...a("maxLength")&&{maxLength:{value:n.maxLength??1/0,message:((m=n.customMessage)==null?void 0:m.maxLength)??`Max. ${n.maxLength} characters`}},...a("min")&&{min:{value:n.min??0,message:((v=n.customMessage)==null?void 0:v.min)??`Value should not lesser than ${n.min}`}},...a("max")&&{max:{value:n.max??1/0,message:((w=n.customMessage)==null?void 0:w.max)??`Value should not greater than ${n.max}`}},...n.type==="email"&&{pattern:{value:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,message:((x=n.customMessage)==null?void 0:x.pattern)??"Invalid email format"}},...n.type==="password"&&{validate:(R=n.passwordRequirements)==null?void 0:R.reduce((E,T)=>{const M=s[T];return M&&(E[T]=M),E},{})},...a("pattern")&&{pattern:{value:n.pattern??/.*/,message:((P=n.customMessage)==null?void 0:P.pattern)??"Invalid characters"}},...n.validate?{validate:n.validate}:{}}:void 0},[n,r]);if(l)return r(i,l)}),Ws=Ce("useControllerValidator",(n,i)=>{const r=fm();return xh({name:i,control:r,defaultValue:n.defaultValue,rules:n.rules})});var _c={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Cc=le.createContext&&le.createContext(_c),gm=["attr","size","title"];function pm(n,i){if(n==null)return{};var r=vm(n,i),s,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(a=0;a<l.length;a++)s=l[a],!(i.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(r[s]=n[s])}return r}function vm(n,i){if(n==null)return{};var r={};for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){if(i.indexOf(s)>=0)continue;r[s]=n[s]}return r}function Xi(){return Xi=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Xi.apply(this,arguments)}function Ec(n,i){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);i&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),r.push.apply(r,s)}return r}function Zi(n){for(var i=1;i<arguments.length;i++){var r=arguments[i]!=null?arguments[i]:{};i%2?Ec(Object(r),!0).forEach(function(s){mm(n,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Ec(Object(r)).forEach(function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(r,s))})}return n}function mm(n,i,r){return i=ym(i),i in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,n}function ym(n){var i=wm(n,"string");return typeof i=="symbol"?i:i+""}function wm(n,i){if(typeof n!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,i);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function Ac(n){return n&&n.map((i,r)=>le.createElement(i.tag,Zi({key:r},i.attr),Ac(i.child)))}function xm(n){return i=>le.createElement(bm,Xi({attr:Zi({},n.attr)},i),Ac(n.child))}function bm(n){var i=r=>{var{attr:s,size:a,title:l}=n,c=pm(n,gm),d=a||r.size||"1em",p;return r.className&&(p=r.className),n.className&&(p=(p?p+" ":"")+n.className),le.createElement("svg",Xi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,s,c,{className:p,style:Zi(Zi({color:n.color||r.color},r.style),n.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),l&&le.createElement("title",null,l),n.children)};return Cc!==void 0?le.createElement(Cc.Consumer,null,r=>i(r)):i(_c)}function _m(n){return xm({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 22c5.421 0 10-4.579 10-10h-2c0 4.337-3.663 8-8 8s-8-3.663-8-8c0-4.336 3.663-8 8-8V2C6.579 2 2 6.58 2 12c0 5.421 4.579 10 10 10z"},child:[]}]})(n)}const Cm=Ce("Tooltip",n=>{const{content:i,children:r,hide:s,className:a,position:l}=n,c=Qt("tooltip",{props:n})??{};return S.jsxs(im,{open:s?!1:void 0,delayDuration:0,children:[S.jsx(om,{className:a,asChild:!0,children:r}),S.jsx(sm,{children:S.jsx(am,{side:l,sideOffset:4,children:S.jsx("div",{...c.content,children:i})})})]})}),cn=Ce("Icon",({name:n,className:i,tooltip:r,tooltipPos:s,severity:a,...l})=>{const c=qo(null),d=a?uh(a,{color:!0}):"text-black hover:text-white";return S.jsx(Cm,{className:i,hide:!r,content:r,position:s??"right",children:S.jsx("i",{className:ln("icon",`ic-${n}`,d),ref:c,"aria-hidden":"true",...l})})}),Em=Ce("Button",({icon:n,label:i,severity:r="primary",onClick:s=()=>{},disabled:a=!1,height:l=26,loading:c=!1,outlined:d=!1,text:p=!1,width:m="max-content",type:v="button"})=>{const w=Qt("button",{context:{disabled:!!c||!!a},props:{height:l,width:m,label:i,outlined:d,text:p,severity:r}})??{},x=()=>{if(i)return S.jsx("span",{...w.label,children:i})},P=(()=>{var T;return!n&&!c?S.jsx("span",{...w.icon}):n&&!c?S.jsx(cn,{name:n}):S.jsx(_m,{className:ln((T=w.loadingIcon)==null?void 0:T.className)})})(),E=x();return S.jsxs("button",{...w.root,onClick:s,type:v,children:[P,E]})}),Gn=Ce("Slot",({children:n,slots:i,name:r})=>r&&(i!=null&&i[r])?S.jsx(S.Fragment,{children:i[r]}):S.jsx(S.Fragment,{children:n})),Am=Ce("Popover",n=>{const{children:i,closeOnBlur:r,content:s,triggerOnMouseOver:a=!1,alwaysRender:l,defaultVisibility:c=l,visible:d,onVisibleChange:p}=n,[m,v]=bn(!1);_n(()=>{d!==null&&v(d),c!==null&&v(c),l&&v(l)},[d,v,c,l]);const w=vt(x=>{v(x==="in"),p==null||p(x==="in")},[v]);return S.jsx(Nv,{defaultOpen:c,onOpenChange:v,open:m,children:a?S.jsx(ac,{asChild:!0,onMouseOver:()=>w("in"),onMouseOut:()=>w("out"),children:S.jsxs("div",{className:"group w-max h-max relative m-auto",children:[i,S.jsx(uc,{forceMount:l,tabIndex:void 0,className:"absolute bottom-2 right-2",align:"end",onMouseOver:()=>w("in"),onMouseOut:()=>w("out"),onFocusOutside:x=>{r||x.preventDefault()},children:s})]})}):S.jsxs(S.Fragment,{children:[S.jsx(ac,{asChild:!0,children:i}),S.jsx(uc,{forceMount:l,tabIndex:void 0,className:"absolute bottom-2 right-2",align:"end",onFocusOutside:x=>{r||x.preventDefault()},children:s})]})})}),Sm=n=>S.jsx(Vv,{...n});let Ji;const Rm=new Uint8Array(16);function Om(){if(!Ji&&(Ji=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ji))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ji(Rm)}const Je=[];for(let n=0;n<256;++n)Je.push((n+256).toString(16).slice(1));function Pm(n,i=0){return Je[n[i+0]]+Je[n[i+1]]+Je[n[i+2]]+Je[n[i+3]]+"-"+Je[n[i+4]]+Je[n[i+5]]+"-"+Je[n[i+6]]+Je[n[i+7]]+"-"+Je[n[i+8]]+Je[n[i+9]]+"-"+Je[n[i+10]]+Je[n[i+11]]+Je[n[i+12]]+Je[n[i+13]]+Je[n[i+14]]+Je[n[i+15]]}const Sc={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Vs(n,i,r){if(Sc.randomUUID&&!n)return Sc.randomUUID();n=n||{};const s=n.random||(n.rng||Om)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Pm(s)}const Tm=ar((n,i)=>{const{header:r,content:s,footer:a,slots:l,size:c="xs",clickable:d=!1,draggable:p=!1,className:m,severity:v,groupId:w,onDrop:x=()=>{},onDragStart:R=()=>{},id:P,mode:E,orientation:T="horizontal",decorative:M=!1,useSeparator:F=!0,...I}=n,U=qo(null),N=Qt("card",{props:{size:c,orientation:T,severity:v}})??{},z=se=>{!p||E!=="kanban"||R({originalEvent:se,draggedGroupId:w,draggedId:P})},j=se=>{!p||E!=="kanban"||x({originalEvent:se,destinationGroupId:w,destinationId:P})},ee=vt(()=>({tabIndex:d?0:void 0,role:d?"button":void 0,type:d?"button":void 0,onClick:d?I.onClick:void 0,onKeyDown:d?I.onKeyDown:void 0,onDragStart:z,onDrop:j,onDragOver:se=>se.preventDefault()}),[d,p,E,z,j,I]);return Go(i,()=>U.current,[]),S.jsxs("div",{...N.root,...I,...ee(),id:P,ref:U,className:ln(N.root.className,m),draggable:p,children:[S.jsx(Gn,{name:"header",slots:l,children:(r||(l==null?void 0:l.header))&&S.jsx("div",{...N.header,children:r})}),F&&S.jsx(Sm,{...N.separator,orientation:T,decorative:M}),S.jsx(Gn,{name:"content",slots:l,children:(s||(l==null?void 0:l.content))&&S.jsx("div",{...N.content,children:s})}),S.jsx(Gn,{name:"footer",slots:l,children:(a||(l==null?void 0:l.footer))&&S.jsx("div",{...N.footer,children:a})})]})}),Dm=Ce("Card",ar((n,i)=>{const{mode:r="container",clickable:s,draggable:a,className:l,id:c,...d}=n,p=()=>S.jsx("div",{className:"flex gap-1 items-center translate-x-8 translate-y-1 !w-0 group-hover:!w-full group-hover:translate-x-2.5 group-hover:translate-y-1 transition-all duration-300 ease-in-out",children:r==="kanban"&&d.menus.map(v=>{const w=Vs();return S.jsx(cn,{name:v.icon,severity:v.severity,className:ln("cursor-pointer hover:text-white",l),onClick:()=>console.log("clicked edit")},w)})}),m=()=>{const v=Vs(),w=a?"draggable-":"",x=r==="kanban"?"kanban-":"";return S.jsx(Tm,{...d,id:c??`${w}${x}${v}`,ref:i,clickable:s||r==="kanban",draggable:a,mode:r,header:"triggerOnMouseOver",content:"Cillum veniam aute elit consectetur officia deserunt sit laborum incididunt in anim ex. Magna nulla mollit ipsum labore incididunt mollit ad laborum velit ea amet pariatur. Ut culpa sunt eiusmod aliquip nulla ut quis est amet eiusmod cillum. Eu amet deserunt velit ad anim occaecat eiusmod."})};return S.jsx(S.Fragment,{children:r==="kanban"?S.jsx(Am,{content:p(),triggerOnMouseOver:!0,alwaysRender:!0,children:m()}):S.jsx(S.Fragment,{children:m()})})})),Qi=({children:n,className:i,context:r,fieldName:s,info:a,label:l,required:c,errors:d,hideRequiredMark:p=!1,onClick:m})=>{var P,E,T;const v=Qt("fieldwrapper",{context:r,className:i})??{},w=()=>l&&S.jsxs("label",{...v.labelContainer,htmlFor:s,children:[S.jsx("span",{...v.label,children:l}),c&&!p&&S.jsx("span",{...v.required,children:"*"}),a&&S.jsx(cn,{...v.info,name:"info",tooltip:a})]}),R=m?{onClick:m,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),m())},role:"button"}:{};return S.jsxs("div",{...v.root,...R,children:[!(r!=null&&r.containerless)&&w(),S.jsxs("div",{...v.field,className:ln([(P=v.field)==null?void 0:P.className,i]),children:[n,(r==null?void 0:r.containerless)&&w()]}),typeof((E=d[s])==null?void 0:E.message)=="string"&&S.jsx("small",{...v.errorMessage,children:(T=d[s])==null?void 0:T.message})]})};var eo={exports:{}};/**
55
+ * @license
56
+ * Lodash <https://lodash.com/>
57
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
58
+ * Released under MIT license <https://lodash.com/license>
59
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
60
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
61
+ */eo.exports,function(n,i){(function(){var r,s="4.17.21",a=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",m=500,v="__lodash_placeholder__",w=1,x=2,R=4,P=1,E=2,T=1,M=2,F=4,I=8,U=16,N=32,z=64,j=128,ee=256,se=512,be=30,Ae="...",te=800,Q=16,ae=1,xe=2,pe=3,he=1/0,ne=9007199254740991,Oe=17976931348623157e292,Ne=NaN,Ve=4294967295,Pn=Ve-1,Tn=Ve>>>1,Kn=[["ary",j],["bind",T],["bindKey",M],["curry",I],["curryRight",U],["flip",se],["partial",N],["partialRight",z],["rearg",ee]],bt="[object Arguments]",Ue="[object Array]",Ot="[object AsyncFunction]",Pt="[object Boolean]",st="[object Date]",Yn="[object DOMException]",jt="[object Error]",en="[object Function]",tn="[object GeneratorFunction]",Qe="[object Map]",fn="[object Number]",xr="[object Null]",ct="[object Object]",br="[object Promise]",Dn="[object Proxy]",_r="[object RegExp]",ft="[object Set]",_="[object String]",D="[object Symbol]",B="[object Undefined]",K="[object WeakMap]",q="[object WeakSet]",H="[object ArrayBuffer]",X="[object DataView]",me="[object Float32Array]",Ie="[object Float64Array]",He="[object Int8Array]",Zr="[object Int16Array]",Xn="[object Int32Array]",Zn="[object Uint8Array]",Jr="[object Uint8ClampedArray]",Cr="[object Uint16Array]",Qr="[object Uint32Array]",no=/\b__p \+= '';/g,Mm=/\b(__p \+=) '' \+/g,Nm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rc=/&(?:amp|lt|gt|quot|#39);/g,Oc=/[&<>"']/g,km=RegExp(Rc.source),Bm=RegExp(Oc.source),Wm=/<%-([\s\S]+?)%>/g,Vm=/<%([\s\S]+?)%>/g,Pc=/<%=([\s\S]+?)%>/g,Um=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$m=/^\w*$/,jm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$s=/[\\^$.*+?()[\]{}|]/g,Hm=RegExp($s.source),js=/^\s+/,zm=/\s/,qm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gm=/\{\n\/\* \[wrapped with (.+)\] \*/,Km=/,? & /,Ym=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xm=/[()=,{}\[\]\/\s]/,Zm=/\\(\\)?/g,Jm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Tc=/\w*$/,Qm=/^[-+]0x[0-9a-f]+$/i,ey=/^0b[01]+$/i,ty=/^\[object .+?Constructor\]$/,ny=/^0o[0-7]+$/i,ry=/^(?:0|[1-9]\d*)$/,iy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ro=/($^)/,oy=/['\n\r\u2028\u2029\\]/g,io="\\ud800-\\udfff",sy="\\u0300-\\u036f",ay="\\ufe20-\\ufe2f",uy="\\u20d0-\\u20ff",Dc=sy+ay+uy,Ic="\\u2700-\\u27bf",Lc="a-z\\xdf-\\xf6\\xf8-\\xff",ly="\\xac\\xb1\\xd7\\xf7",cy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fy="\\u2000-\\u206f",dy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fc="A-Z\\xc0-\\xd6\\xd8-\\xde",Mc="\\ufe0e\\ufe0f",Nc=ly+cy+fy+dy,Hs="['’]",hy="["+io+"]",kc="["+Nc+"]",oo="["+Dc+"]",Bc="\\d+",gy="["+Ic+"]",Wc="["+Lc+"]",Vc="[^"+io+Nc+Bc+Ic+Lc+Fc+"]",zs="\\ud83c[\\udffb-\\udfff]",py="(?:"+oo+"|"+zs+")",Uc="[^"+io+"]",qs="(?:\\ud83c[\\udde6-\\uddff]){2}",Gs="[\\ud800-\\udbff][\\udc00-\\udfff]",Er="["+Fc+"]",$c="\\u200d",jc="(?:"+Wc+"|"+Vc+")",vy="(?:"+Er+"|"+Vc+")",Hc="(?:"+Hs+"(?:d|ll|m|re|s|t|ve))?",zc="(?:"+Hs+"(?:D|LL|M|RE|S|T|VE))?",qc=py+"?",Gc="["+Mc+"]?",my="(?:"+$c+"(?:"+[Uc,qs,Gs].join("|")+")"+Gc+qc+")*",yy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kc=Gc+qc+my,xy="(?:"+[gy,qs,Gs].join("|")+")"+Kc,by="(?:"+[Uc+oo+"?",oo,qs,Gs,hy].join("|")+")",_y=RegExp(Hs,"g"),Cy=RegExp(oo,"g"),Ks=RegExp(zs+"(?="+zs+")|"+by+Kc,"g"),Ey=RegExp([Er+"?"+Wc+"+"+Hc+"(?="+[kc,Er,"$"].join("|")+")",vy+"+"+zc+"(?="+[kc,Er+jc,"$"].join("|")+")",Er+"?"+jc+"+"+Hc,Er+"+"+zc,wy,yy,Bc,xy].join("|"),"g"),Ay=RegExp("["+$c+io+Dc+Mc+"]"),Sy=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ry=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Oy=-1,De={};De[me]=De[Ie]=De[He]=De[Zr]=De[Xn]=De[Zn]=De[Jr]=De[Cr]=De[Qr]=!0,De[bt]=De[Ue]=De[H]=De[Pt]=De[X]=De[st]=De[jt]=De[en]=De[Qe]=De[fn]=De[ct]=De[_r]=De[ft]=De[_]=De[K]=!1;var Te={};Te[bt]=Te[Ue]=Te[H]=Te[X]=Te[Pt]=Te[st]=Te[me]=Te[Ie]=Te[He]=Te[Zr]=Te[Xn]=Te[Qe]=Te[fn]=Te[ct]=Te[_r]=Te[ft]=Te[_]=Te[D]=Te[Zn]=Te[Jr]=Te[Cr]=Te[Qr]=!0,Te[jt]=Te[en]=Te[K]=!1;var Py={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ty={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dy={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Iy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ly=parseFloat,Fy=parseInt,Yc=typeof Br=="object"&&Br&&Br.Object===Object&&Br,My=typeof self=="object"&&self&&self.Object===Object&&self,et=Yc||My||Function("return this")(),Ys=i&&!i.nodeType&&i,Jn=Ys&&!0&&n&&!n.nodeType&&n,Xc=Jn&&Jn.exports===Ys,Xs=Xc&&Yc.process,Tt=function(){try{var A=Jn&&Jn.require&&Jn.require("util").types;return A||Xs&&Xs.binding&&Xs.binding("util")}catch{}}(),Zc=Tt&&Tt.isArrayBuffer,Jc=Tt&&Tt.isDate,Qc=Tt&&Tt.isMap,ef=Tt&&Tt.isRegExp,tf=Tt&&Tt.isSet,nf=Tt&&Tt.isTypedArray;function _t(A,k,L){switch(L.length){case 0:return A.call(k);case 1:return A.call(k,L[0]);case 2:return A.call(k,L[0],L[1]);case 3:return A.call(k,L[0],L[1],L[2])}return A.apply(k,L)}function Ny(A,k,L,Z){for(var ue=-1,_e=A==null?0:A.length;++ue<_e;){var Ge=A[ue];k(Z,Ge,L(Ge),A)}return Z}function Dt(A,k){for(var L=-1,Z=A==null?0:A.length;++L<Z&&k(A[L],L,A)!==!1;);return A}function ky(A,k){for(var L=A==null?0:A.length;L--&&k(A[L],L,A)!==!1;);return A}function rf(A,k){for(var L=-1,Z=A==null?0:A.length;++L<Z;)if(!k(A[L],L,A))return!1;return!0}function In(A,k){for(var L=-1,Z=A==null?0:A.length,ue=0,_e=[];++L<Z;){var Ge=A[L];k(Ge,L,A)&&(_e[ue++]=Ge)}return _e}function so(A,k){var L=A==null?0:A.length;return!!L&&Ar(A,k,0)>-1}function Zs(A,k,L){for(var Z=-1,ue=A==null?0:A.length;++Z<ue;)if(L(k,A[Z]))return!0;return!1}function Le(A,k){for(var L=-1,Z=A==null?0:A.length,ue=Array(Z);++L<Z;)ue[L]=k(A[L],L,A);return ue}function Ln(A,k){for(var L=-1,Z=k.length,ue=A.length;++L<Z;)A[ue+L]=k[L];return A}function Js(A,k,L,Z){var ue=-1,_e=A==null?0:A.length;for(Z&&_e&&(L=A[++ue]);++ue<_e;)L=k(L,A[ue],ue,A);return L}function By(A,k,L,Z){var ue=A==null?0:A.length;for(Z&&ue&&(L=A[--ue]);ue--;)L=k(L,A[ue],ue,A);return L}function Qs(A,k){for(var L=-1,Z=A==null?0:A.length;++L<Z;)if(k(A[L],L,A))return!0;return!1}var Wy=ea("length");function Vy(A){return A.split("")}function Uy(A){return A.match(Ym)||[]}function of(A,k,L){var Z;return L(A,function(ue,_e,Ge){if(k(ue,_e,Ge))return Z=_e,!1}),Z}function ao(A,k,L,Z){for(var ue=A.length,_e=L+(Z?1:-1);Z?_e--:++_e<ue;)if(k(A[_e],_e,A))return _e;return-1}function Ar(A,k,L){return k===k?Qy(A,k,L):ao(A,sf,L)}function $y(A,k,L,Z){for(var ue=L-1,_e=A.length;++ue<_e;)if(Z(A[ue],k))return ue;return-1}function sf(A){return A!==A}function af(A,k){var L=A==null?0:A.length;return L?na(A,k)/L:Ne}function ea(A){return function(k){return k==null?r:k[A]}}function ta(A){return function(k){return A==null?r:A[k]}}function uf(A,k,L,Z,ue){return ue(A,function(_e,Ge,Pe){L=Z?(Z=!1,_e):k(L,_e,Ge,Pe)}),L}function jy(A,k){var L=A.length;for(A.sort(k);L--;)A[L]=A[L].value;return A}function na(A,k){for(var L,Z=-1,ue=A.length;++Z<ue;){var _e=k(A[Z]);_e!==r&&(L=L===r?_e:L+_e)}return L}function ra(A,k){for(var L=-1,Z=Array(A);++L<A;)Z[L]=k(L);return Z}function Hy(A,k){return Le(k,function(L){return[L,A[L]]})}function lf(A){return A&&A.slice(0,hf(A)+1).replace(js,"")}function Ct(A){return function(k){return A(k)}}function ia(A,k){return Le(k,function(L){return A[L]})}function ei(A,k){return A.has(k)}function cf(A,k){for(var L=-1,Z=A.length;++L<Z&&Ar(k,A[L],0)>-1;);return L}function ff(A,k){for(var L=A.length;L--&&Ar(k,A[L],0)>-1;);return L}function zy(A,k){for(var L=A.length,Z=0;L--;)A[L]===k&&++Z;return Z}var qy=ta(Py),Gy=ta(Ty);function Ky(A){return"\\"+Iy[A]}function Yy(A,k){return A==null?r:A[k]}function Sr(A){return Ay.test(A)}function Xy(A){return Sy.test(A)}function Zy(A){for(var k,L=[];!(k=A.next()).done;)L.push(k.value);return L}function oa(A){var k=-1,L=Array(A.size);return A.forEach(function(Z,ue){L[++k]=[ue,Z]}),L}function df(A,k){return function(L){return A(k(L))}}function Fn(A,k){for(var L=-1,Z=A.length,ue=0,_e=[];++L<Z;){var Ge=A[L];(Ge===k||Ge===v)&&(A[L]=v,_e[ue++]=L)}return _e}function uo(A){var k=-1,L=Array(A.size);return A.forEach(function(Z){L[++k]=Z}),L}function Jy(A){var k=-1,L=Array(A.size);return A.forEach(function(Z){L[++k]=[Z,Z]}),L}function Qy(A,k,L){for(var Z=L-1,ue=A.length;++Z<ue;)if(A[Z]===k)return Z;return-1}function ew(A,k,L){for(var Z=L+1;Z--;)if(A[Z]===k)return Z;return Z}function Rr(A){return Sr(A)?nw(A):Wy(A)}function Ht(A){return Sr(A)?rw(A):Vy(A)}function hf(A){for(var k=A.length;k--&&zm.test(A.charAt(k)););return k}var tw=ta(Dy);function nw(A){for(var k=Ks.lastIndex=0;Ks.test(A);)++k;return k}function rw(A){return A.match(Ks)||[]}function iw(A){return A.match(Ey)||[]}var ow=function A(k){k=k==null?et:Or.defaults(et.Object(),k,Or.pick(et,Ry));var L=k.Array,Z=k.Date,ue=k.Error,_e=k.Function,Ge=k.Math,Pe=k.Object,sa=k.RegExp,sw=k.String,It=k.TypeError,lo=L.prototype,aw=_e.prototype,Pr=Pe.prototype,co=k["__core-js_shared__"],fo=aw.toString,Se=Pr.hasOwnProperty,uw=0,gf=function(){var e=/[^.]+$/.exec(co&&co.keys&&co.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ho=Pr.toString,lw=fo.call(Pe),cw=et._,fw=sa("^"+fo.call(Se).replace($s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),go=Xc?k.Buffer:r,Mn=k.Symbol,po=k.Uint8Array,pf=go?go.allocUnsafe:r,vo=df(Pe.getPrototypeOf,Pe),vf=Pe.create,mf=Pr.propertyIsEnumerable,mo=lo.splice,yf=Mn?Mn.isConcatSpreadable:r,ti=Mn?Mn.iterator:r,Qn=Mn?Mn.toStringTag:r,yo=function(){try{var e=ir(Pe,"defineProperty");return e({},"",{}),e}catch{}}(),dw=k.clearTimeout!==et.clearTimeout&&k.clearTimeout,hw=Z&&Z.now!==et.Date.now&&Z.now,gw=k.setTimeout!==et.setTimeout&&k.setTimeout,wo=Ge.ceil,xo=Ge.floor,aa=Pe.getOwnPropertySymbols,pw=go?go.isBuffer:r,wf=k.isFinite,vw=lo.join,mw=df(Pe.keys,Pe),Ke=Ge.max,nt=Ge.min,yw=Z.now,ww=k.parseInt,xf=Ge.random,xw=lo.reverse,ua=ir(k,"DataView"),ni=ir(k,"Map"),la=ir(k,"Promise"),Tr=ir(k,"Set"),ri=ir(k,"WeakMap"),ii=ir(Pe,"create"),bo=ri&&new ri,Dr={},bw=or(ua),_w=or(ni),Cw=or(la),Ew=or(Tr),Aw=or(ri),_o=Mn?Mn.prototype:r,oi=_o?_o.valueOf:r,bf=_o?_o.toString:r;function h(e){if(ke(e)&&!ce(e)&&!(e instanceof ye)){if(e instanceof Lt)return e;if(Se.call(e,"__wrapped__"))return _d(e)}return new Lt(e)}var Ir=function(){function e(){}return function(t){if(!Fe(t))return{};if(vf)return vf(t);e.prototype=t;var o=new e;return e.prototype=r,o}}();function Co(){}function Lt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}h.templateSettings={escape:Wm,evaluate:Vm,interpolate:Pc,variable:"",imports:{_:h}},h.prototype=Co.prototype,h.prototype.constructor=h,Lt.prototype=Ir(Co.prototype),Lt.prototype.constructor=Lt;function ye(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ve,this.__views__=[]}function Sw(){var e=new ye(this.__wrapped__);return e.__actions__=dt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=dt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=dt(this.__views__),e}function Rw(){if(this.__filtered__){var e=new ye(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ow(){var e=this.__wrapped__.value(),t=this.__dir__,o=ce(e),u=t<0,f=o?e.length:0,g=V0(0,f,this.__views__),y=g.start,C=g.end,O=C-y,W=u?C:y-1,V=this.__iteratees__,$=V.length,G=0,J=nt(O,this.__takeCount__);if(!o||!u&&f==O&&J==O)return zf(e,this.__actions__);var ie=[];e:for(;O--&&G<J;){W+=t;for(var de=-1,oe=e[W];++de<$;){var ve=V[de],we=ve.iteratee,St=ve.type,lt=we(oe);if(St==xe)oe=lt;else if(!lt){if(St==ae)continue e;break e}}ie[G++]=oe}return ie}ye.prototype=Ir(Co.prototype),ye.prototype.constructor=ye;function er(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var u=e[t];this.set(u[0],u[1])}}function Pw(){this.__data__=ii?ii(null):{},this.size=0}function Tw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Dw(e){var t=this.__data__;if(ii){var o=t[e];return o===p?r:o}return Se.call(t,e)?t[e]:r}function Iw(e){var t=this.__data__;return ii?t[e]!==r:Se.call(t,e)}function Lw(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ii&&t===r?p:t,this}er.prototype.clear=Pw,er.prototype.delete=Tw,er.prototype.get=Dw,er.prototype.has=Iw,er.prototype.set=Lw;function dn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var u=e[t];this.set(u[0],u[1])}}function Fw(){this.__data__=[],this.size=0}function Mw(e){var t=this.__data__,o=Eo(t,e);if(o<0)return!1;var u=t.length-1;return o==u?t.pop():mo.call(t,o,1),--this.size,!0}function Nw(e){var t=this.__data__,o=Eo(t,e);return o<0?r:t[o][1]}function kw(e){return Eo(this.__data__,e)>-1}function Bw(e,t){var o=this.__data__,u=Eo(o,e);return u<0?(++this.size,o.push([e,t])):o[u][1]=t,this}dn.prototype.clear=Fw,dn.prototype.delete=Mw,dn.prototype.get=Nw,dn.prototype.has=kw,dn.prototype.set=Bw;function hn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var u=e[t];this.set(u[0],u[1])}}function Ww(){this.size=0,this.__data__={hash:new er,map:new(ni||dn),string:new er}}function Vw(e){var t=No(this,e).delete(e);return this.size-=t?1:0,t}function Uw(e){return No(this,e).get(e)}function $w(e){return No(this,e).has(e)}function jw(e,t){var o=No(this,e),u=o.size;return o.set(e,t),this.size+=o.size==u?0:1,this}hn.prototype.clear=Ww,hn.prototype.delete=Vw,hn.prototype.get=Uw,hn.prototype.has=$w,hn.prototype.set=jw;function tr(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new hn;++t<o;)this.add(e[t])}function Hw(e){return this.__data__.set(e,p),this}function zw(e){return this.__data__.has(e)}tr.prototype.add=tr.prototype.push=Hw,tr.prototype.has=zw;function zt(e){var t=this.__data__=new dn(e);this.size=t.size}function qw(){this.__data__=new dn,this.size=0}function Gw(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}function Kw(e){return this.__data__.get(e)}function Yw(e){return this.__data__.has(e)}function Xw(e,t){var o=this.__data__;if(o instanceof dn){var u=o.__data__;if(!ni||u.length<a-1)return u.push([e,t]),this.size=++o.size,this;o=this.__data__=new hn(u)}return o.set(e,t),this.size=o.size,this}zt.prototype.clear=qw,zt.prototype.delete=Gw,zt.prototype.get=Kw,zt.prototype.has=Yw,zt.prototype.set=Xw;function _f(e,t){var o=ce(e),u=!o&&sr(e),f=!o&&!u&&Vn(e),g=!o&&!u&&!f&&Nr(e),y=o||u||f||g,C=y?ra(e.length,sw):[],O=C.length;for(var W in e)(t||Se.call(e,W))&&!(y&&(W=="length"||f&&(W=="offset"||W=="parent")||g&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||mn(W,O)))&&C.push(W);return C}function Cf(e){var t=e.length;return t?e[xa(0,t-1)]:r}function Zw(e,t){return ko(dt(e),nr(t,0,e.length))}function Jw(e){return ko(dt(e))}function ca(e,t,o){(o!==r&&!qt(e[t],o)||o===r&&!(t in e))&&gn(e,t,o)}function si(e,t,o){var u=e[t];(!(Se.call(e,t)&&qt(u,o))||o===r&&!(t in e))&&gn(e,t,o)}function Eo(e,t){for(var o=e.length;o--;)if(qt(e[o][0],t))return o;return-1}function Qw(e,t,o,u){return Nn(e,function(f,g,y){t(u,f,o(f),y)}),u}function Ef(e,t){return e&&rn(t,Ye(t),e)}function e0(e,t){return e&&rn(t,gt(t),e)}function gn(e,t,o){t=="__proto__"&&yo?yo(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function fa(e,t){for(var o=-1,u=t.length,f=L(u),g=e==null;++o<u;)f[o]=g?r:za(e,t[o]);return f}function nr(e,t,o){return e===e&&(o!==r&&(e=e<=o?e:o),t!==r&&(e=e>=t?e:t)),e}function Ft(e,t,o,u,f,g){var y,C=t&w,O=t&x,W=t&R;if(o&&(y=f?o(e,u,f,g):o(e)),y!==r)return y;if(!Fe(e))return e;var V=ce(e);if(V){if(y=$0(e),!C)return dt(e,y)}else{var $=rt(e),G=$==en||$==tn;if(Vn(e))return Kf(e,C);if($==ct||$==bt||G&&!f){if(y=O||G?{}:hd(e),!C)return O?D0(e,e0(y,e)):T0(e,Ef(y,e))}else{if(!Te[$])return f?e:{};y=j0(e,$,C)}}g||(g=new zt);var J=g.get(e);if(J)return J;g.set(e,y),$d(e)?e.forEach(function(oe){y.add(Ft(oe,t,o,oe,e,g))}):Vd(e)&&e.forEach(function(oe,ve){y.set(ve,Ft(oe,t,o,ve,e,g))});var ie=W?O?Da:Ta:O?gt:Ye,de=V?r:ie(e);return Dt(de||e,function(oe,ve){de&&(ve=oe,oe=e[ve]),si(y,ve,Ft(oe,t,o,ve,e,g))}),y}function t0(e){var t=Ye(e);return function(o){return Af(o,e,t)}}function Af(e,t,o){var u=o.length;if(e==null)return!u;for(e=Pe(e);u--;){var f=o[u],g=t[f],y=e[f];if(y===r&&!(f in e)||!g(y))return!1}return!0}function Sf(e,t,o){if(typeof e!="function")throw new It(c);return hi(function(){e.apply(r,o)},t)}function ai(e,t,o,u){var f=-1,g=so,y=!0,C=e.length,O=[],W=t.length;if(!C)return O;o&&(t=Le(t,Ct(o))),u?(g=Zs,y=!1):t.length>=a&&(g=ei,y=!1,t=new tr(t));e:for(;++f<C;){var V=e[f],$=o==null?V:o(V);if(V=u||V!==0?V:0,y&&$===$){for(var G=W;G--;)if(t[G]===$)continue e;O.push(V)}else g(t,$,u)||O.push(V)}return O}var Nn=Qf(nn),Rf=Qf(ha,!0);function n0(e,t){var o=!0;return Nn(e,function(u,f,g){return o=!!t(u,f,g),o}),o}function Ao(e,t,o){for(var u=-1,f=e.length;++u<f;){var g=e[u],y=t(g);if(y!=null&&(C===r?y===y&&!At(y):o(y,C)))var C=y,O=g}return O}function r0(e,t,o,u){var f=e.length;for(o=fe(o),o<0&&(o=-o>f?0:f+o),u=u===r||u>f?f:fe(u),u<0&&(u+=f),u=o>u?0:Hd(u);o<u;)e[o++]=t;return e}function Of(e,t){var o=[];return Nn(e,function(u,f,g){t(u,f,g)&&o.push(u)}),o}function tt(e,t,o,u,f){var g=-1,y=e.length;for(o||(o=z0),f||(f=[]);++g<y;){var C=e[g];t>0&&o(C)?t>1?tt(C,t-1,o,u,f):Ln(f,C):u||(f[f.length]=C)}return f}var da=ed(),Pf=ed(!0);function nn(e,t){return e&&da(e,t,Ye)}function ha(e,t){return e&&Pf(e,t,Ye)}function So(e,t){return In(t,function(o){return yn(e[o])})}function rr(e,t){t=Bn(t,e);for(var o=0,u=t.length;e!=null&&o<u;)e=e[on(t[o++])];return o&&o==u?e:r}function Tf(e,t,o){var u=t(e);return ce(e)?u:Ln(u,o(e))}function at(e){return e==null?e===r?B:xr:Qn&&Qn in Pe(e)?W0(e):J0(e)}function ga(e,t){return e>t}function i0(e,t){return e!=null&&Se.call(e,t)}function o0(e,t){return e!=null&&t in Pe(e)}function s0(e,t,o){return e>=nt(t,o)&&e<Ke(t,o)}function pa(e,t,o){for(var u=o?Zs:so,f=e[0].length,g=e.length,y=g,C=L(g),O=1/0,W=[];y--;){var V=e[y];y&&t&&(V=Le(V,Ct(t))),O=nt(V.length,O),C[y]=!o&&(t||f>=120&&V.length>=120)?new tr(y&&V):r}V=e[0];var $=-1,G=C[0];e:for(;++$<f&&W.length<O;){var J=V[$],ie=t?t(J):J;if(J=o||J!==0?J:0,!(G?ei(G,ie):u(W,ie,o))){for(y=g;--y;){var de=C[y];if(!(de?ei(de,ie):u(e[y],ie,o)))continue e}G&&G.push(ie),W.push(J)}}return W}function a0(e,t,o,u){return nn(e,function(f,g,y){t(u,o(f),g,y)}),u}function ui(e,t,o){t=Bn(t,e),e=md(e,t);var u=e==null?e:e[on(Nt(t))];return u==null?r:_t(u,e,o)}function Df(e){return ke(e)&&at(e)==bt}function u0(e){return ke(e)&&at(e)==H}function l0(e){return ke(e)&&at(e)==st}function li(e,t,o,u,f){return e===t?!0:e==null||t==null||!ke(e)&&!ke(t)?e!==e&&t!==t:c0(e,t,o,u,li,f)}function c0(e,t,o,u,f,g){var y=ce(e),C=ce(t),O=y?Ue:rt(e),W=C?Ue:rt(t);O=O==bt?ct:O,W=W==bt?ct:W;var V=O==ct,$=W==ct,G=O==W;if(G&&Vn(e)){if(!Vn(t))return!1;y=!0,V=!1}if(G&&!V)return g||(g=new zt),y||Nr(e)?cd(e,t,o,u,f,g):k0(e,t,O,o,u,f,g);if(!(o&P)){var J=V&&Se.call(e,"__wrapped__"),ie=$&&Se.call(t,"__wrapped__");if(J||ie){var de=J?e.value():e,oe=ie?t.value():t;return g||(g=new zt),f(de,oe,o,u,g)}}return G?(g||(g=new zt),B0(e,t,o,u,f,g)):!1}function f0(e){return ke(e)&&rt(e)==Qe}function va(e,t,o,u){var f=o.length,g=f,y=!u;if(e==null)return!g;for(e=Pe(e);f--;){var C=o[f];if(y&&C[2]?C[1]!==e[C[0]]:!(C[0]in e))return!1}for(;++f<g;){C=o[f];var O=C[0],W=e[O],V=C[1];if(y&&C[2]){if(W===r&&!(O in e))return!1}else{var $=new zt;if(u)var G=u(W,V,O,e,t,$);if(!(G===r?li(V,W,P|E,u,$):G))return!1}}return!0}function If(e){if(!Fe(e)||G0(e))return!1;var t=yn(e)?fw:ty;return t.test(or(e))}function d0(e){return ke(e)&&at(e)==_r}function h0(e){return ke(e)&&rt(e)==ft}function g0(e){return ke(e)&&jo(e.length)&&!!De[at(e)]}function Lf(e){return typeof e=="function"?e:e==null?pt:typeof e=="object"?ce(e)?Nf(e[0],e[1]):Mf(e):th(e)}function ma(e){if(!di(e))return mw(e);var t=[];for(var o in Pe(e))Se.call(e,o)&&o!="constructor"&&t.push(o);return t}function p0(e){if(!Fe(e))return Z0(e);var t=di(e),o=[];for(var u in e)u=="constructor"&&(t||!Se.call(e,u))||o.push(u);return o}function ya(e,t){return e<t}function Ff(e,t){var o=-1,u=ht(e)?L(e.length):[];return Nn(e,function(f,g,y){u[++o]=t(f,g,y)}),u}function Mf(e){var t=La(e);return t.length==1&&t[0][2]?pd(t[0][0],t[0][1]):function(o){return o===e||va(o,e,t)}}function Nf(e,t){return Ma(e)&&gd(t)?pd(on(e),t):function(o){var u=za(o,e);return u===r&&u===t?qa(o,e):li(t,u,P|E)}}function Ro(e,t,o,u,f){e!==t&&da(t,function(g,y){if(f||(f=new zt),Fe(g))v0(e,t,y,o,Ro,u,f);else{var C=u?u(ka(e,y),g,y+"",e,t,f):r;C===r&&(C=g),ca(e,y,C)}},gt)}function v0(e,t,o,u,f,g,y){var C=ka(e,o),O=ka(t,o),W=y.get(O);if(W){ca(e,o,W);return}var V=g?g(C,O,o+"",e,t,y):r,$=V===r;if($){var G=ce(O),J=!G&&Vn(O),ie=!G&&!J&&Nr(O);V=O,G||J||ie?ce(C)?V=C:$e(C)?V=dt(C):J?($=!1,V=Kf(O,!0)):ie?($=!1,V=Yf(O,!0)):V=[]:gi(O)||sr(O)?(V=C,sr(C)?V=zd(C):(!Fe(C)||yn(C))&&(V=hd(O))):$=!1}$&&(y.set(O,V),f(V,O,u,g,y),y.delete(O)),ca(e,o,V)}function kf(e,t){var o=e.length;if(o)return t+=t<0?o:0,mn(t,o)?e[t]:r}function Bf(e,t,o){t.length?t=Le(t,function(g){return ce(g)?function(y){return rr(y,g.length===1?g[0]:g)}:g}):t=[pt];var u=-1;t=Le(t,Ct(re()));var f=Ff(e,function(g,y,C){var O=Le(t,function(W){return W(g)});return{criteria:O,index:++u,value:g}});return jy(f,function(g,y){return P0(g,y,o)})}function m0(e,t){return Wf(e,t,function(o,u){return qa(e,u)})}function Wf(e,t,o){for(var u=-1,f=t.length,g={};++u<f;){var y=t[u],C=rr(e,y);o(C,y)&&ci(g,Bn(y,e),C)}return g}function y0(e){return function(t){return rr(t,e)}}function wa(e,t,o,u){var f=u?$y:Ar,g=-1,y=t.length,C=e;for(e===t&&(t=dt(t)),o&&(C=Le(e,Ct(o)));++g<y;)for(var O=0,W=t[g],V=o?o(W):W;(O=f(C,V,O,u))>-1;)C!==e&&mo.call(C,O,1),mo.call(e,O,1);return e}function Vf(e,t){for(var o=e?t.length:0,u=o-1;o--;){var f=t[o];if(o==u||f!==g){var g=f;mn(f)?mo.call(e,f,1):Ca(e,f)}}return e}function xa(e,t){return e+xo(xf()*(t-e+1))}function w0(e,t,o,u){for(var f=-1,g=Ke(wo((t-e)/(o||1)),0),y=L(g);g--;)y[u?g:++f]=e,e+=o;return y}function ba(e,t){var o="";if(!e||t<1||t>ne)return o;do t%2&&(o+=e),t=xo(t/2),t&&(e+=e);while(t);return o}function ge(e,t){return Ba(vd(e,t,pt),e+"")}function x0(e){return Cf(kr(e))}function b0(e,t){var o=kr(e);return ko(o,nr(t,0,o.length))}function ci(e,t,o,u){if(!Fe(e))return e;t=Bn(t,e);for(var f=-1,g=t.length,y=g-1,C=e;C!=null&&++f<g;){var O=on(t[f]),W=o;if(O==="__proto__"||O==="constructor"||O==="prototype")return e;if(f!=y){var V=C[O];W=u?u(V,O,C):r,W===r&&(W=Fe(V)?V:mn(t[f+1])?[]:{})}si(C,O,W),C=C[O]}return e}var Uf=bo?function(e,t){return bo.set(e,t),e}:pt,_0=yo?function(e,t){return yo(e,"toString",{configurable:!0,enumerable:!1,value:Ka(t),writable:!0})}:pt;function C0(e){return ko(kr(e))}function Mt(e,t,o){var u=-1,f=e.length;t<0&&(t=-t>f?0:f+t),o=o>f?f:o,o<0&&(o+=f),f=t>o?0:o-t>>>0,t>>>=0;for(var g=L(f);++u<f;)g[u]=e[u+t];return g}function E0(e,t){var o;return Nn(e,function(u,f,g){return o=t(u,f,g),!o}),!!o}function Oo(e,t,o){var u=0,f=e==null?u:e.length;if(typeof t=="number"&&t===t&&f<=Tn){for(;u<f;){var g=u+f>>>1,y=e[g];y!==null&&!At(y)&&(o?y<=t:y<t)?u=g+1:f=g}return f}return _a(e,t,pt,o)}function _a(e,t,o,u){var f=0,g=e==null?0:e.length;if(g===0)return 0;t=o(t);for(var y=t!==t,C=t===null,O=At(t),W=t===r;f<g;){var V=xo((f+g)/2),$=o(e[V]),G=$!==r,J=$===null,ie=$===$,de=At($);if(y)var oe=u||ie;else W?oe=ie&&(u||G):C?oe=ie&&G&&(u||!J):O?oe=ie&&G&&!J&&(u||!de):J||de?oe=!1:oe=u?$<=t:$<t;oe?f=V+1:g=V}return nt(g,Pn)}function $f(e,t){for(var o=-1,u=e.length,f=0,g=[];++o<u;){var y=e[o],C=t?t(y):y;if(!o||!qt(C,O)){var O=C;g[f++]=y===0?0:y}}return g}function jf(e){return typeof e=="number"?e:At(e)?Ne:+e}function Et(e){if(typeof e=="string")return e;if(ce(e))return Le(e,Et)+"";if(At(e))return bf?bf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kn(e,t,o){var u=-1,f=so,g=e.length,y=!0,C=[],O=C;if(o)y=!1,f=Zs;else if(g>=a){var W=t?null:M0(e);if(W)return uo(W);y=!1,f=ei,O=new tr}else O=t?[]:C;e:for(;++u<g;){var V=e[u],$=t?t(V):V;if(V=o||V!==0?V:0,y&&$===$){for(var G=O.length;G--;)if(O[G]===$)continue e;t&&O.push($),C.push(V)}else f(O,$,o)||(O!==C&&O.push($),C.push(V))}return C}function Ca(e,t){return t=Bn(t,e),e=md(e,t),e==null||delete e[on(Nt(t))]}function Hf(e,t,o,u){return ci(e,t,o(rr(e,t)),u)}function Po(e,t,o,u){for(var f=e.length,g=u?f:-1;(u?g--:++g<f)&&t(e[g],g,e););return o?Mt(e,u?0:g,u?g+1:f):Mt(e,u?g+1:0,u?f:g)}function zf(e,t){var o=e;return o instanceof ye&&(o=o.value()),Js(t,function(u,f){return f.func.apply(f.thisArg,Ln([u],f.args))},o)}function Ea(e,t,o){var u=e.length;if(u<2)return u?kn(e[0]):[];for(var f=-1,g=L(u);++f<u;)for(var y=e[f],C=-1;++C<u;)C!=f&&(g[f]=ai(g[f]||y,e[C],t,o));return kn(tt(g,1),t,o)}function qf(e,t,o){for(var u=-1,f=e.length,g=t.length,y={};++u<f;){var C=u<g?t[u]:r;o(y,e[u],C)}return y}function Aa(e){return $e(e)?e:[]}function Sa(e){return typeof e=="function"?e:pt}function Bn(e,t){return ce(e)?e:Ma(e,t)?[e]:bd(Ee(e))}var A0=ge;function Wn(e,t,o){var u=e.length;return o=o===r?u:o,!t&&o>=u?e:Mt(e,t,o)}var Gf=dw||function(e){return et.clearTimeout(e)};function Kf(e,t){if(t)return e.slice();var o=e.length,u=pf?pf(o):new e.constructor(o);return e.copy(u),u}function Ra(e){var t=new e.constructor(e.byteLength);return new po(t).set(new po(e)),t}function S0(e,t){var o=t?Ra(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function R0(e){var t=new e.constructor(e.source,Tc.exec(e));return t.lastIndex=e.lastIndex,t}function O0(e){return oi?Pe(oi.call(e)):{}}function Yf(e,t){var o=t?Ra(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Xf(e,t){if(e!==t){var o=e!==r,u=e===null,f=e===e,g=At(e),y=t!==r,C=t===null,O=t===t,W=At(t);if(!C&&!W&&!g&&e>t||g&&y&&O&&!C&&!W||u&&y&&O||!o&&O||!f)return 1;if(!u&&!g&&!W&&e<t||W&&o&&f&&!u&&!g||C&&o&&f||!y&&f||!O)return-1}return 0}function P0(e,t,o){for(var u=-1,f=e.criteria,g=t.criteria,y=f.length,C=o.length;++u<y;){var O=Xf(f[u],g[u]);if(O){if(u>=C)return O;var W=o[u];return O*(W=="desc"?-1:1)}}return e.index-t.index}function Zf(e,t,o,u){for(var f=-1,g=e.length,y=o.length,C=-1,O=t.length,W=Ke(g-y,0),V=L(O+W),$=!u;++C<O;)V[C]=t[C];for(;++f<y;)($||f<g)&&(V[o[f]]=e[f]);for(;W--;)V[C++]=e[f++];return V}function Jf(e,t,o,u){for(var f=-1,g=e.length,y=-1,C=o.length,O=-1,W=t.length,V=Ke(g-C,0),$=L(V+W),G=!u;++f<V;)$[f]=e[f];for(var J=f;++O<W;)$[J+O]=t[O];for(;++y<C;)(G||f<g)&&($[J+o[y]]=e[f++]);return $}function dt(e,t){var o=-1,u=e.length;for(t||(t=L(u));++o<u;)t[o]=e[o];return t}function rn(e,t,o,u){var f=!o;o||(o={});for(var g=-1,y=t.length;++g<y;){var C=t[g],O=u?u(o[C],e[C],C,o,e):r;O===r&&(O=e[C]),f?gn(o,C,O):si(o,C,O)}return o}function T0(e,t){return rn(e,Fa(e),t)}function D0(e,t){return rn(e,fd(e),t)}function To(e,t){return function(o,u){var f=ce(o)?Ny:Qw,g=t?t():{};return f(o,e,re(u,2),g)}}function Lr(e){return ge(function(t,o){var u=-1,f=o.length,g=f>1?o[f-1]:r,y=f>2?o[2]:r;for(g=e.length>3&&typeof g=="function"?(f--,g):r,y&&ut(o[0],o[1],y)&&(g=f<3?r:g,f=1),t=Pe(t);++u<f;){var C=o[u];C&&e(t,C,u,g)}return t})}function Qf(e,t){return function(o,u){if(o==null)return o;if(!ht(o))return e(o,u);for(var f=o.length,g=t?f:-1,y=Pe(o);(t?g--:++g<f)&&u(y[g],g,y)!==!1;);return o}}function ed(e){return function(t,o,u){for(var f=-1,g=Pe(t),y=u(t),C=y.length;C--;){var O=y[e?C:++f];if(o(g[O],O,g)===!1)break}return t}}function I0(e,t,o){var u=t&T,f=fi(e);function g(){var y=this&&this!==et&&this instanceof g?f:e;return y.apply(u?o:this,arguments)}return g}function td(e){return function(t){t=Ee(t);var o=Sr(t)?Ht(t):r,u=o?o[0]:t.charAt(0),f=o?Wn(o,1).join(""):t.slice(1);return u[e]()+f}}function Fr(e){return function(t){return Js(Qd(Jd(t).replace(_y,"")),e,"")}}function fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var o=Ir(e.prototype),u=e.apply(o,t);return Fe(u)?u:o}}function L0(e,t,o){var u=fi(e);function f(){for(var g=arguments.length,y=L(g),C=g,O=Mr(f);C--;)y[C]=arguments[C];var W=g<3&&y[0]!==O&&y[g-1]!==O?[]:Fn(y,O);if(g-=W.length,g<o)return sd(e,t,Do,f.placeholder,r,y,W,r,r,o-g);var V=this&&this!==et&&this instanceof f?u:e;return _t(V,this,y)}return f}function nd(e){return function(t,o,u){var f=Pe(t);if(!ht(t)){var g=re(o,3);t=Ye(t),o=function(C){return g(f[C],C,f)}}var y=e(t,o,u);return y>-1?f[g?t[y]:y]:r}}function rd(e){return vn(function(t){var o=t.length,u=o,f=Lt.prototype.thru;for(e&&t.reverse();u--;){var g=t[u];if(typeof g!="function")throw new It(c);if(f&&!y&&Mo(g)=="wrapper")var y=new Lt([],!0)}for(u=y?u:o;++u<o;){g=t[u];var C=Mo(g),O=C=="wrapper"?Ia(g):r;O&&Na(O[0])&&O[1]==(j|I|N|ee)&&!O[4].length&&O[9]==1?y=y[Mo(O[0])].apply(y,O[3]):y=g.length==1&&Na(g)?y[C]():y.thru(g)}return function(){var W=arguments,V=W[0];if(y&&W.length==1&&ce(V))return y.plant(V).value();for(var $=0,G=o?t[$].apply(this,W):V;++$<o;)G=t[$].call(this,G);return G}})}function Do(e,t,o,u,f,g,y,C,O,W){var V=t&j,$=t&T,G=t&M,J=t&(I|U),ie=t&se,de=G?r:fi(e);function oe(){for(var ve=arguments.length,we=L(ve),St=ve;St--;)we[St]=arguments[St];if(J)var lt=Mr(oe),Rt=zy(we,lt);if(u&&(we=Zf(we,u,f,J)),g&&(we=Jf(we,g,y,J)),ve-=Rt,J&&ve<W){var je=Fn(we,lt);return sd(e,t,Do,oe.placeholder,o,we,je,C,O,W-ve)}var Gt=$?o:this,xn=G?Gt[e]:e;return ve=we.length,C?we=Q0(we,C):ie&&ve>1&&we.reverse(),V&&O<ve&&(we.length=O),this&&this!==et&&this instanceof oe&&(xn=de||fi(xn)),xn.apply(Gt,we)}return oe}function id(e,t){return function(o,u){return a0(o,e,t(u),{})}}function Io(e,t){return function(o,u){var f;if(o===r&&u===r)return t;if(o!==r&&(f=o),u!==r){if(f===r)return u;typeof o=="string"||typeof u=="string"?(o=Et(o),u=Et(u)):(o=jf(o),u=jf(u)),f=e(o,u)}return f}}function Oa(e){return vn(function(t){return t=Le(t,Ct(re())),ge(function(o){var u=this;return e(t,function(f){return _t(f,u,o)})})})}function Lo(e,t){t=t===r?" ":Et(t);var o=t.length;if(o<2)return o?ba(t,e):t;var u=ba(t,wo(e/Rr(t)));return Sr(t)?Wn(Ht(u),0,e).join(""):u.slice(0,e)}function F0(e,t,o,u){var f=t&T,g=fi(e);function y(){for(var C=-1,O=arguments.length,W=-1,V=u.length,$=L(V+O),G=this&&this!==et&&this instanceof y?g:e;++W<V;)$[W]=u[W];for(;O--;)$[W++]=arguments[++C];return _t(G,f?o:this,$)}return y}function od(e){return function(t,o,u){return u&&typeof u!="number"&&ut(t,o,u)&&(o=u=r),t=wn(t),o===r?(o=t,t=0):o=wn(o),u=u===r?t<o?1:-1:wn(u),w0(t,o,u,e)}}function Fo(e){return function(t,o){return typeof t=="string"&&typeof o=="string"||(t=kt(t),o=kt(o)),e(t,o)}}function sd(e,t,o,u,f,g,y,C,O,W){var V=t&I,$=V?y:r,G=V?r:y,J=V?g:r,ie=V?r:g;t|=V?N:z,t&=~(V?z:N),t&F||(t&=-4);var de=[e,t,f,J,$,ie,G,C,O,W],oe=o.apply(r,de);return Na(e)&&yd(oe,de),oe.placeholder=u,wd(oe,e,t)}function Pa(e){var t=Ge[e];return function(o,u){if(o=kt(o),u=u==null?0:nt(fe(u),292),u&&wf(o)){var f=(Ee(o)+"e").split("e"),g=t(f[0]+"e"+(+f[1]+u));return f=(Ee(g)+"e").split("e"),+(f[0]+"e"+(+f[1]-u))}return t(o)}}var M0=Tr&&1/uo(new Tr([,-0]))[1]==he?function(e){return new Tr(e)}:Za;function ad(e){return function(t){var o=rt(t);return o==Qe?oa(t):o==ft?Jy(t):Hy(t,e(t))}}function pn(e,t,o,u,f,g,y,C){var O=t&M;if(!O&&typeof e!="function")throw new It(c);var W=u?u.length:0;if(W||(t&=-97,u=f=r),y=y===r?y:Ke(fe(y),0),C=C===r?C:fe(C),W-=f?f.length:0,t&z){var V=u,$=f;u=f=r}var G=O?r:Ia(e),J=[e,t,o,u,f,V,$,g,y,C];if(G&&X0(J,G),e=J[0],t=J[1],o=J[2],u=J[3],f=J[4],C=J[9]=J[9]===r?O?0:e.length:Ke(J[9]-W,0),!C&&t&(I|U)&&(t&=-25),!t||t==T)var ie=I0(e,t,o);else t==I||t==U?ie=L0(e,t,C):(t==N||t==(T|N))&&!f.length?ie=F0(e,t,o,u):ie=Do.apply(r,J);var de=G?Uf:yd;return wd(de(ie,J),e,t)}function ud(e,t,o,u){return e===r||qt(e,Pr[o])&&!Se.call(u,o)?t:e}function ld(e,t,o,u,f,g){return Fe(e)&&Fe(t)&&(g.set(t,e),Ro(e,t,r,ld,g),g.delete(t)),e}function N0(e){return gi(e)?r:e}function cd(e,t,o,u,f,g){var y=o&P,C=e.length,O=t.length;if(C!=O&&!(y&&O>C))return!1;var W=g.get(e),V=g.get(t);if(W&&V)return W==t&&V==e;var $=-1,G=!0,J=o&E?new tr:r;for(g.set(e,t),g.set(t,e);++$<C;){var ie=e[$],de=t[$];if(u)var oe=y?u(de,ie,$,t,e,g):u(ie,de,$,e,t,g);if(oe!==r){if(oe)continue;G=!1;break}if(J){if(!Qs(t,function(ve,we){if(!ei(J,we)&&(ie===ve||f(ie,ve,o,u,g)))return J.push(we)})){G=!1;break}}else if(!(ie===de||f(ie,de,o,u,g))){G=!1;break}}return g.delete(e),g.delete(t),G}function k0(e,t,o,u,f,g,y){switch(o){case X:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case H:return!(e.byteLength!=t.byteLength||!g(new po(e),new po(t)));case Pt:case st:case fn:return qt(+e,+t);case jt:return e.name==t.name&&e.message==t.message;case _r:case _:return e==t+"";case Qe:var C=oa;case ft:var O=u&P;if(C||(C=uo),e.size!=t.size&&!O)return!1;var W=y.get(e);if(W)return W==t;u|=E,y.set(e,t);var V=cd(C(e),C(t),u,f,g,y);return y.delete(e),V;case D:if(oi)return oi.call(e)==oi.call(t)}return!1}function B0(e,t,o,u,f,g){var y=o&P,C=Ta(e),O=C.length,W=Ta(t),V=W.length;if(O!=V&&!y)return!1;for(var $=O;$--;){var G=C[$];if(!(y?G in t:Se.call(t,G)))return!1}var J=g.get(e),ie=g.get(t);if(J&&ie)return J==t&&ie==e;var de=!0;g.set(e,t),g.set(t,e);for(var oe=y;++$<O;){G=C[$];var ve=e[G],we=t[G];if(u)var St=y?u(we,ve,G,t,e,g):u(ve,we,G,e,t,g);if(!(St===r?ve===we||f(ve,we,o,u,g):St)){de=!1;break}oe||(oe=G=="constructor")}if(de&&!oe){var lt=e.constructor,Rt=t.constructor;lt!=Rt&&"constructor"in e&&"constructor"in t&&!(typeof lt=="function"&&lt instanceof lt&&typeof Rt=="function"&&Rt instanceof Rt)&&(de=!1)}return g.delete(e),g.delete(t),de}function vn(e){return Ba(vd(e,r,Ad),e+"")}function Ta(e){return Tf(e,Ye,Fa)}function Da(e){return Tf(e,gt,fd)}var Ia=bo?function(e){return bo.get(e)}:Za;function Mo(e){for(var t=e.name+"",o=Dr[t],u=Se.call(Dr,t)?o.length:0;u--;){var f=o[u],g=f.func;if(g==null||g==e)return f.name}return t}function Mr(e){var t=Se.call(h,"placeholder")?h:e;return t.placeholder}function re(){var e=h.iteratee||Ya;return e=e===Ya?Lf:e,arguments.length?e(arguments[0],arguments[1]):e}function No(e,t){var o=e.__data__;return q0(t)?o[typeof t=="string"?"string":"hash"]:o.map}function La(e){for(var t=Ye(e),o=t.length;o--;){var u=t[o],f=e[u];t[o]=[u,f,gd(f)]}return t}function ir(e,t){var o=Yy(e,t);return If(o)?o:r}function W0(e){var t=Se.call(e,Qn),o=e[Qn];try{e[Qn]=r;var u=!0}catch{}var f=ho.call(e);return u&&(t?e[Qn]=o:delete e[Qn]),f}var Fa=aa?function(e){return e==null?[]:(e=Pe(e),In(aa(e),function(t){return mf.call(e,t)}))}:Ja,fd=aa?function(e){for(var t=[];e;)Ln(t,Fa(e)),e=vo(e);return t}:Ja,rt=at;(ua&&rt(new ua(new ArrayBuffer(1)))!=X||ni&&rt(new ni)!=Qe||la&&rt(la.resolve())!=br||Tr&&rt(new Tr)!=ft||ri&&rt(new ri)!=K)&&(rt=function(e){var t=at(e),o=t==ct?e.constructor:r,u=o?or(o):"";if(u)switch(u){case bw:return X;case _w:return Qe;case Cw:return br;case Ew:return ft;case Aw:return K}return t});function V0(e,t,o){for(var u=-1,f=o.length;++u<f;){var g=o[u],y=g.size;switch(g.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=nt(t,e+y);break;case"takeRight":e=Ke(e,t-y);break}}return{start:e,end:t}}function U0(e){var t=e.match(Gm);return t?t[1].split(Km):[]}function dd(e,t,o){t=Bn(t,e);for(var u=-1,f=t.length,g=!1;++u<f;){var y=on(t[u]);if(!(g=e!=null&&o(e,y)))break;e=e[y]}return g||++u!=f?g:(f=e==null?0:e.length,!!f&&jo(f)&&mn(y,f)&&(ce(e)||sr(e)))}function $0(e){var t=e.length,o=new e.constructor(t);return t&&typeof e[0]=="string"&&Se.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function hd(e){return typeof e.constructor=="function"&&!di(e)?Ir(vo(e)):{}}function j0(e,t,o){var u=e.constructor;switch(t){case H:return Ra(e);case Pt:case st:return new u(+e);case X:return S0(e,o);case me:case Ie:case He:case Zr:case Xn:case Zn:case Jr:case Cr:case Qr:return Yf(e,o);case Qe:return new u;case fn:case _:return new u(e);case _r:return R0(e);case ft:return new u;case D:return O0(e)}}function H0(e,t){var o=t.length;if(!o)return e;var u=o-1;return t[u]=(o>1?"& ":"")+t[u],t=t.join(o>2?", ":" "),e.replace(qm,`{
62
+ /* [wrapped with `+t+`] */
63
+ `)}function z0(e){return ce(e)||sr(e)||!!(yf&&e&&e[yf])}function mn(e,t){var o=typeof e;return t=t??ne,!!t&&(o=="number"||o!="symbol"&&ry.test(e))&&e>-1&&e%1==0&&e<t}function ut(e,t,o){if(!Fe(o))return!1;var u=typeof t;return(u=="number"?ht(o)&&mn(t,o.length):u=="string"&&t in o)?qt(o[t],e):!1}function Ma(e,t){if(ce(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||At(e)?!0:$m.test(e)||!Um.test(e)||t!=null&&e in Pe(t)}function q0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Na(e){var t=Mo(e),o=h[t];if(typeof o!="function"||!(t in ye.prototype))return!1;if(e===o)return!0;var u=Ia(o);return!!u&&e===u[0]}function G0(e){return!!gf&&gf in e}var K0=co?yn:Qa;function di(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||Pr;return e===o}function gd(e){return e===e&&!Fe(e)}function pd(e,t){return function(o){return o==null?!1:o[e]===t&&(t!==r||e in Pe(o))}}function Y0(e){var t=Uo(e,function(u){return o.size===m&&o.clear(),u}),o=t.cache;return t}function X0(e,t){var o=e[1],u=t[1],f=o|u,g=f<(T|M|j),y=u==j&&o==I||u==j&&o==ee&&e[7].length<=t[8]||u==(j|ee)&&t[7].length<=t[8]&&o==I;if(!(g||y))return e;u&T&&(e[2]=t[2],f|=o&T?0:F);var C=t[3];if(C){var O=e[3];e[3]=O?Zf(O,C,t[4]):C,e[4]=O?Fn(e[3],v):t[4]}return C=t[5],C&&(O=e[5],e[5]=O?Jf(O,C,t[6]):C,e[6]=O?Fn(e[5],v):t[6]),C=t[7],C&&(e[7]=C),u&j&&(e[8]=e[8]==null?t[8]:nt(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function Z0(e){var t=[];if(e!=null)for(var o in Pe(e))t.push(o);return t}function J0(e){return ho.call(e)}function vd(e,t,o){return t=Ke(t===r?e.length-1:t,0),function(){for(var u=arguments,f=-1,g=Ke(u.length-t,0),y=L(g);++f<g;)y[f]=u[t+f];f=-1;for(var C=L(t+1);++f<t;)C[f]=u[f];return C[t]=o(y),_t(e,this,C)}}function md(e,t){return t.length<2?e:rr(e,Mt(t,0,-1))}function Q0(e,t){for(var o=e.length,u=nt(t.length,o),f=dt(e);u--;){var g=t[u];e[u]=mn(g,o)?f[g]:r}return e}function ka(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var yd=xd(Uf),hi=gw||function(e,t){return et.setTimeout(e,t)},Ba=xd(_0);function wd(e,t,o){var u=t+"";return Ba(e,H0(u,ex(U0(u),o)))}function xd(e){var t=0,o=0;return function(){var u=yw(),f=Q-(u-o);if(o=u,f>0){if(++t>=te)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ko(e,t){var o=-1,u=e.length,f=u-1;for(t=t===r?u:t;++o<t;){var g=xa(o,f),y=e[g];e[g]=e[o],e[o]=y}return e.length=t,e}var bd=Y0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(jm,function(o,u,f,g){t.push(f?g.replace(Zm,"$1"):u||o)}),t});function on(e){if(typeof e=="string"||At(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function or(e){if(e!=null){try{return fo.call(e)}catch{}try{return e+""}catch{}}return""}function ex(e,t){return Dt(Kn,function(o){var u="_."+o[0];t&o[1]&&!so(e,u)&&e.push(u)}),e.sort()}function _d(e){if(e instanceof ye)return e.clone();var t=new Lt(e.__wrapped__,e.__chain__);return t.__actions__=dt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function tx(e,t,o){(o?ut(e,t,o):t===r)?t=1:t=Ke(fe(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var f=0,g=0,y=L(wo(u/t));f<u;)y[g++]=Mt(e,f,f+=t);return y}function nx(e){for(var t=-1,o=e==null?0:e.length,u=0,f=[];++t<o;){var g=e[t];g&&(f[u++]=g)}return f}function rx(){var e=arguments.length;if(!e)return[];for(var t=L(e-1),o=arguments[0],u=e;u--;)t[u-1]=arguments[u];return Ln(ce(o)?dt(o):[o],tt(t,1))}var ix=ge(function(e,t){return $e(e)?ai(e,tt(t,1,$e,!0)):[]}),ox=ge(function(e,t){var o=Nt(t);return $e(o)&&(o=r),$e(e)?ai(e,tt(t,1,$e,!0),re(o,2)):[]}),sx=ge(function(e,t){var o=Nt(t);return $e(o)&&(o=r),$e(e)?ai(e,tt(t,1,$e,!0),r,o):[]});function ax(e,t,o){var u=e==null?0:e.length;return u?(t=o||t===r?1:fe(t),Mt(e,t<0?0:t,u)):[]}function ux(e,t,o){var u=e==null?0:e.length;return u?(t=o||t===r?1:fe(t),t=u-t,Mt(e,0,t<0?0:t)):[]}function lx(e,t){return e&&e.length?Po(e,re(t,3),!0,!0):[]}function cx(e,t){return e&&e.length?Po(e,re(t,3),!0):[]}function fx(e,t,o,u){var f=e==null?0:e.length;return f?(o&&typeof o!="number"&&ut(e,t,o)&&(o=0,u=f),r0(e,t,o,u)):[]}function Cd(e,t,o){var u=e==null?0:e.length;if(!u)return-1;var f=o==null?0:fe(o);return f<0&&(f=Ke(u+f,0)),ao(e,re(t,3),f)}function Ed(e,t,o){var u=e==null?0:e.length;if(!u)return-1;var f=u-1;return o!==r&&(f=fe(o),f=o<0?Ke(u+f,0):nt(f,u-1)),ao(e,re(t,3),f,!0)}function Ad(e){var t=e==null?0:e.length;return t?tt(e,1):[]}function dx(e){var t=e==null?0:e.length;return t?tt(e,he):[]}function hx(e,t){var o=e==null?0:e.length;return o?(t=t===r?1:fe(t),tt(e,t)):[]}function gx(e){for(var t=-1,o=e==null?0:e.length,u={};++t<o;){var f=e[t];u[f[0]]=f[1]}return u}function Sd(e){return e&&e.length?e[0]:r}function px(e,t,o){var u=e==null?0:e.length;if(!u)return-1;var f=o==null?0:fe(o);return f<0&&(f=Ke(u+f,0)),Ar(e,t,f)}function vx(e){var t=e==null?0:e.length;return t?Mt(e,0,-1):[]}var mx=ge(function(e){var t=Le(e,Aa);return t.length&&t[0]===e[0]?pa(t):[]}),yx=ge(function(e){var t=Nt(e),o=Le(e,Aa);return t===Nt(o)?t=r:o.pop(),o.length&&o[0]===e[0]?pa(o,re(t,2)):[]}),wx=ge(function(e){var t=Nt(e),o=Le(e,Aa);return t=typeof t=="function"?t:r,t&&o.pop(),o.length&&o[0]===e[0]?pa(o,r,t):[]});function xx(e,t){return e==null?"":vw.call(e,t)}function Nt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function bx(e,t,o){var u=e==null?0:e.length;if(!u)return-1;var f=u;return o!==r&&(f=fe(o),f=f<0?Ke(u+f,0):nt(f,u-1)),t===t?ew(e,t,f):ao(e,sf,f,!0)}function _x(e,t){return e&&e.length?kf(e,fe(t)):r}var Cx=ge(Rd);function Rd(e,t){return e&&e.length&&t&&t.length?wa(e,t):e}function Ex(e,t,o){return e&&e.length&&t&&t.length?wa(e,t,re(o,2)):e}function Ax(e,t,o){return e&&e.length&&t&&t.length?wa(e,t,r,o):e}var Sx=vn(function(e,t){var o=e==null?0:e.length,u=fa(e,t);return Vf(e,Le(t,function(f){return mn(f,o)?+f:f}).sort(Xf)),u});function Rx(e,t){var o=[];if(!(e&&e.length))return o;var u=-1,f=[],g=e.length;for(t=re(t,3);++u<g;){var y=e[u];t(y,u,e)&&(o.push(y),f.push(u))}return Vf(e,f),o}function Wa(e){return e==null?e:xw.call(e)}function Ox(e,t,o){var u=e==null?0:e.length;return u?(o&&typeof o!="number"&&ut(e,t,o)?(t=0,o=u):(t=t==null?0:fe(t),o=o===r?u:fe(o)),Mt(e,t,o)):[]}function Px(e,t){return Oo(e,t)}function Tx(e,t,o){return _a(e,t,re(o,2))}function Dx(e,t){var o=e==null?0:e.length;if(o){var u=Oo(e,t);if(u<o&&qt(e[u],t))return u}return-1}function Ix(e,t){return Oo(e,t,!0)}function Lx(e,t,o){return _a(e,t,re(o,2),!0)}function Fx(e,t){var o=e==null?0:e.length;if(o){var u=Oo(e,t,!0)-1;if(qt(e[u],t))return u}return-1}function Mx(e){return e&&e.length?$f(e):[]}function Nx(e,t){return e&&e.length?$f(e,re(t,2)):[]}function kx(e){var t=e==null?0:e.length;return t?Mt(e,1,t):[]}function Bx(e,t,o){return e&&e.length?(t=o||t===r?1:fe(t),Mt(e,0,t<0?0:t)):[]}function Wx(e,t,o){var u=e==null?0:e.length;return u?(t=o||t===r?1:fe(t),t=u-t,Mt(e,t<0?0:t,u)):[]}function Vx(e,t){return e&&e.length?Po(e,re(t,3),!1,!0):[]}function Ux(e,t){return e&&e.length?Po(e,re(t,3)):[]}var $x=ge(function(e){return kn(tt(e,1,$e,!0))}),jx=ge(function(e){var t=Nt(e);return $e(t)&&(t=r),kn(tt(e,1,$e,!0),re(t,2))}),Hx=ge(function(e){var t=Nt(e);return t=typeof t=="function"?t:r,kn(tt(e,1,$e,!0),r,t)});function zx(e){return e&&e.length?kn(e):[]}function qx(e,t){return e&&e.length?kn(e,re(t,2)):[]}function Gx(e,t){return t=typeof t=="function"?t:r,e&&e.length?kn(e,r,t):[]}function Va(e){if(!(e&&e.length))return[];var t=0;return e=In(e,function(o){if($e(o))return t=Ke(o.length,t),!0}),ra(t,function(o){return Le(e,ea(o))})}function Od(e,t){if(!(e&&e.length))return[];var o=Va(e);return t==null?o:Le(o,function(u){return _t(t,r,u)})}var Kx=ge(function(e,t){return $e(e)?ai(e,t):[]}),Yx=ge(function(e){return Ea(In(e,$e))}),Xx=ge(function(e){var t=Nt(e);return $e(t)&&(t=r),Ea(In(e,$e),re(t,2))}),Zx=ge(function(e){var t=Nt(e);return t=typeof t=="function"?t:r,Ea(In(e,$e),r,t)}),Jx=ge(Va);function Qx(e,t){return qf(e||[],t||[],si)}function eb(e,t){return qf(e||[],t||[],ci)}var tb=ge(function(e){var t=e.length,o=t>1?e[t-1]:r;return o=typeof o=="function"?(e.pop(),o):r,Od(e,o)});function Pd(e){var t=h(e);return t.__chain__=!0,t}function nb(e,t){return t(e),e}function Bo(e,t){return t(e)}var rb=vn(function(e){var t=e.length,o=t?e[0]:0,u=this.__wrapped__,f=function(g){return fa(g,e)};return t>1||this.__actions__.length||!(u instanceof ye)||!mn(o)?this.thru(f):(u=u.slice(o,+o+(t?1:0)),u.__actions__.push({func:Bo,args:[f],thisArg:r}),new Lt(u,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function ib(){return Pd(this)}function ob(){return new Lt(this.value(),this.__chain__)}function sb(){this.__values__===r&&(this.__values__=jd(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function ab(){return this}function ub(e){for(var t,o=this;o instanceof Co;){var u=_d(o);u.__index__=0,u.__values__=r,t?f.__wrapped__=u:t=u;var f=u;o=o.__wrapped__}return f.__wrapped__=e,t}function lb(){var e=this.__wrapped__;if(e instanceof ye){var t=e;return this.__actions__.length&&(t=new ye(this)),t=t.reverse(),t.__actions__.push({func:Bo,args:[Wa],thisArg:r}),new Lt(t,this.__chain__)}return this.thru(Wa)}function cb(){return zf(this.__wrapped__,this.__actions__)}var fb=To(function(e,t,o){Se.call(e,o)?++e[o]:gn(e,o,1)});function db(e,t,o){var u=ce(e)?rf:n0;return o&&ut(e,t,o)&&(t=r),u(e,re(t,3))}function hb(e,t){var o=ce(e)?In:Of;return o(e,re(t,3))}var gb=nd(Cd),pb=nd(Ed);function vb(e,t){return tt(Wo(e,t),1)}function mb(e,t){return tt(Wo(e,t),he)}function yb(e,t,o){return o=o===r?1:fe(o),tt(Wo(e,t),o)}function Td(e,t){var o=ce(e)?Dt:Nn;return o(e,re(t,3))}function Dd(e,t){var o=ce(e)?ky:Rf;return o(e,re(t,3))}var wb=To(function(e,t,o){Se.call(e,o)?e[o].push(t):gn(e,o,[t])});function xb(e,t,o,u){e=ht(e)?e:kr(e),o=o&&!u?fe(o):0;var f=e.length;return o<0&&(o=Ke(f+o,0)),Ho(e)?o<=f&&e.indexOf(t,o)>-1:!!f&&Ar(e,t,o)>-1}var bb=ge(function(e,t,o){var u=-1,f=typeof t=="function",g=ht(e)?L(e.length):[];return Nn(e,function(y){g[++u]=f?_t(t,y,o):ui(y,t,o)}),g}),_b=To(function(e,t,o){gn(e,o,t)});function Wo(e,t){var o=ce(e)?Le:Ff;return o(e,re(t,3))}function Cb(e,t,o,u){return e==null?[]:(ce(t)||(t=t==null?[]:[t]),o=u?r:o,ce(o)||(o=o==null?[]:[o]),Bf(e,t,o))}var Eb=To(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]});function Ab(e,t,o){var u=ce(e)?Js:uf,f=arguments.length<3;return u(e,re(t,4),o,f,Nn)}function Sb(e,t,o){var u=ce(e)?By:uf,f=arguments.length<3;return u(e,re(t,4),o,f,Rf)}function Rb(e,t){var o=ce(e)?In:Of;return o(e,$o(re(t,3)))}function Ob(e){var t=ce(e)?Cf:x0;return t(e)}function Pb(e,t,o){(o?ut(e,t,o):t===r)?t=1:t=fe(t);var u=ce(e)?Zw:b0;return u(e,t)}function Tb(e){var t=ce(e)?Jw:C0;return t(e)}function Db(e){if(e==null)return 0;if(ht(e))return Ho(e)?Rr(e):e.length;var t=rt(e);return t==Qe||t==ft?e.size:ma(e).length}function Ib(e,t,o){var u=ce(e)?Qs:E0;return o&&ut(e,t,o)&&(t=r),u(e,re(t,3))}var Lb=ge(function(e,t){if(e==null)return[];var o=t.length;return o>1&&ut(e,t[0],t[1])?t=[]:o>2&&ut(t[0],t[1],t[2])&&(t=[t[0]]),Bf(e,tt(t,1),[])}),Vo=hw||function(){return et.Date.now()};function Fb(e,t){if(typeof t!="function")throw new It(c);return e=fe(e),function(){if(--e<1)return t.apply(this,arguments)}}function Id(e,t,o){return t=o?r:t,t=e&&t==null?e.length:t,pn(e,j,r,r,r,r,t)}function Ld(e,t){var o;if(typeof t!="function")throw new It(c);return e=fe(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=r),o}}var Ua=ge(function(e,t,o){var u=T;if(o.length){var f=Fn(o,Mr(Ua));u|=N}return pn(e,u,t,o,f)}),Fd=ge(function(e,t,o){var u=T|M;if(o.length){var f=Fn(o,Mr(Fd));u|=N}return pn(t,u,e,o,f)});function Md(e,t,o){t=o?r:t;var u=pn(e,I,r,r,r,r,r,t);return u.placeholder=Md.placeholder,u}function Nd(e,t,o){t=o?r:t;var u=pn(e,U,r,r,r,r,r,t);return u.placeholder=Nd.placeholder,u}function kd(e,t,o){var u,f,g,y,C,O,W=0,V=!1,$=!1,G=!0;if(typeof e!="function")throw new It(c);t=kt(t)||0,Fe(o)&&(V=!!o.leading,$="maxWait"in o,g=$?Ke(kt(o.maxWait)||0,t):g,G="trailing"in o?!!o.trailing:G);function J(je){var Gt=u,xn=f;return u=f=r,W=je,y=e.apply(xn,Gt),y}function ie(je){return W=je,C=hi(ve,t),V?J(je):y}function de(je){var Gt=je-O,xn=je-W,nh=t-Gt;return $?nt(nh,g-xn):nh}function oe(je){var Gt=je-O,xn=je-W;return O===r||Gt>=t||Gt<0||$&&xn>=g}function ve(){var je=Vo();if(oe(je))return we(je);C=hi(ve,de(je))}function we(je){return C=r,G&&u?J(je):(u=f=r,y)}function St(){C!==r&&Gf(C),W=0,u=O=f=C=r}function lt(){return C===r?y:we(Vo())}function Rt(){var je=Vo(),Gt=oe(je);if(u=arguments,f=this,O=je,Gt){if(C===r)return ie(O);if($)return Gf(C),C=hi(ve,t),J(O)}return C===r&&(C=hi(ve,t)),y}return Rt.cancel=St,Rt.flush=lt,Rt}var Mb=ge(function(e,t){return Sf(e,1,t)}),Nb=ge(function(e,t,o){return Sf(e,kt(t)||0,o)});function kb(e){return pn(e,se)}function Uo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new It(c);var o=function(){var u=arguments,f=t?t.apply(this,u):u[0],g=o.cache;if(g.has(f))return g.get(f);var y=e.apply(this,u);return o.cache=g.set(f,y)||g,y};return o.cache=new(Uo.Cache||hn),o}Uo.Cache=hn;function $o(e){if(typeof e!="function")throw new It(c);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Bb(e){return Ld(2,e)}var Wb=A0(function(e,t){t=t.length==1&&ce(t[0])?Le(t[0],Ct(re())):Le(tt(t,1),Ct(re()));var o=t.length;return ge(function(u){for(var f=-1,g=nt(u.length,o);++f<g;)u[f]=t[f].call(this,u[f]);return _t(e,this,u)})}),$a=ge(function(e,t){var o=Fn(t,Mr($a));return pn(e,N,r,t,o)}),Bd=ge(function(e,t){var o=Fn(t,Mr(Bd));return pn(e,z,r,t,o)}),Vb=vn(function(e,t){return pn(e,ee,r,r,r,t)});function Ub(e,t){if(typeof e!="function")throw new It(c);return t=t===r?t:fe(t),ge(e,t)}function $b(e,t){if(typeof e!="function")throw new It(c);return t=t==null?0:Ke(fe(t),0),ge(function(o){var u=o[t],f=Wn(o,0,t);return u&&Ln(f,u),_t(e,this,f)})}function jb(e,t,o){var u=!0,f=!0;if(typeof e!="function")throw new It(c);return Fe(o)&&(u="leading"in o?!!o.leading:u,f="trailing"in o?!!o.trailing:f),kd(e,t,{leading:u,maxWait:t,trailing:f})}function Hb(e){return Id(e,1)}function zb(e,t){return $a(Sa(t),e)}function qb(){if(!arguments.length)return[];var e=arguments[0];return ce(e)?e:[e]}function Gb(e){return Ft(e,R)}function Kb(e,t){return t=typeof t=="function"?t:r,Ft(e,R,t)}function Yb(e){return Ft(e,w|R)}function Xb(e,t){return t=typeof t=="function"?t:r,Ft(e,w|R,t)}function Zb(e,t){return t==null||Af(e,t,Ye(t))}function qt(e,t){return e===t||e!==e&&t!==t}var Jb=Fo(ga),Qb=Fo(function(e,t){return e>=t}),sr=Df(function(){return arguments}())?Df:function(e){return ke(e)&&Se.call(e,"callee")&&!mf.call(e,"callee")},ce=L.isArray,e_=Zc?Ct(Zc):u0;function ht(e){return e!=null&&jo(e.length)&&!yn(e)}function $e(e){return ke(e)&&ht(e)}function t_(e){return e===!0||e===!1||ke(e)&&at(e)==Pt}var Vn=pw||Qa,n_=Jc?Ct(Jc):l0;function r_(e){return ke(e)&&e.nodeType===1&&!gi(e)}function i_(e){if(e==null)return!0;if(ht(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||Vn(e)||Nr(e)||sr(e)))return!e.length;var t=rt(e);if(t==Qe||t==ft)return!e.size;if(di(e))return!ma(e).length;for(var o in e)if(Se.call(e,o))return!1;return!0}function o_(e,t){return li(e,t)}function s_(e,t,o){o=typeof o=="function"?o:r;var u=o?o(e,t):r;return u===r?li(e,t,r,o):!!u}function ja(e){if(!ke(e))return!1;var t=at(e);return t==jt||t==Yn||typeof e.message=="string"&&typeof e.name=="string"&&!gi(e)}function a_(e){return typeof e=="number"&&wf(e)}function yn(e){if(!Fe(e))return!1;var t=at(e);return t==en||t==tn||t==Ot||t==Dn}function Wd(e){return typeof e=="number"&&e==fe(e)}function jo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ne}function Fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ke(e){return e!=null&&typeof e=="object"}var Vd=Qc?Ct(Qc):f0;function u_(e,t){return e===t||va(e,t,La(t))}function l_(e,t,o){return o=typeof o=="function"?o:r,va(e,t,La(t),o)}function c_(e){return Ud(e)&&e!=+e}function f_(e){if(K0(e))throw new ue(l);return If(e)}function d_(e){return e===null}function h_(e){return e==null}function Ud(e){return typeof e=="number"||ke(e)&&at(e)==fn}function gi(e){if(!ke(e)||at(e)!=ct)return!1;var t=vo(e);if(t===null)return!0;var o=Se.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&fo.call(o)==lw}var Ha=ef?Ct(ef):d0;function g_(e){return Wd(e)&&e>=-9007199254740991&&e<=ne}var $d=tf?Ct(tf):h0;function Ho(e){return typeof e=="string"||!ce(e)&&ke(e)&&at(e)==_}function At(e){return typeof e=="symbol"||ke(e)&&at(e)==D}var Nr=nf?Ct(nf):g0;function p_(e){return e===r}function v_(e){return ke(e)&&rt(e)==K}function m_(e){return ke(e)&&at(e)==q}var y_=Fo(ya),w_=Fo(function(e,t){return e<=t});function jd(e){if(!e)return[];if(ht(e))return Ho(e)?Ht(e):dt(e);if(ti&&e[ti])return Zy(e[ti]());var t=rt(e),o=t==Qe?oa:t==ft?uo:kr;return o(e)}function wn(e){if(!e)return e===0?e:0;if(e=kt(e),e===he||e===-1/0){var t=e<0?-1:1;return t*Oe}return e===e?e:0}function fe(e){var t=wn(e),o=t%1;return t===t?o?t-o:t:0}function Hd(e){return e?nr(fe(e),0,Ve):0}function kt(e){if(typeof e=="number")return e;if(At(e))return Ne;if(Fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lf(e);var o=ey.test(e);return o||ny.test(e)?Fy(e.slice(2),o?2:8):Qm.test(e)?Ne:+e}function zd(e){return rn(e,gt(e))}function x_(e){return e?nr(fe(e),-9007199254740991,ne):e===0?e:0}function Ee(e){return e==null?"":Et(e)}var b_=Lr(function(e,t){if(di(t)||ht(t)){rn(t,Ye(t),e);return}for(var o in t)Se.call(t,o)&&si(e,o,t[o])}),qd=Lr(function(e,t){rn(t,gt(t),e)}),zo=Lr(function(e,t,o,u){rn(t,gt(t),e,u)}),__=Lr(function(e,t,o,u){rn(t,Ye(t),e,u)}),C_=vn(fa);function E_(e,t){var o=Ir(e);return t==null?o:Ef(o,t)}var A_=ge(function(e,t){e=Pe(e);var o=-1,u=t.length,f=u>2?t[2]:r;for(f&&ut(t[0],t[1],f)&&(u=1);++o<u;)for(var g=t[o],y=gt(g),C=-1,O=y.length;++C<O;){var W=y[C],V=e[W];(V===r||qt(V,Pr[W])&&!Se.call(e,W))&&(e[W]=g[W])}return e}),S_=ge(function(e){return e.push(r,ld),_t(Gd,r,e)});function R_(e,t){return of(e,re(t,3),nn)}function O_(e,t){return of(e,re(t,3),ha)}function P_(e,t){return e==null?e:da(e,re(t,3),gt)}function T_(e,t){return e==null?e:Pf(e,re(t,3),gt)}function D_(e,t){return e&&nn(e,re(t,3))}function I_(e,t){return e&&ha(e,re(t,3))}function L_(e){return e==null?[]:So(e,Ye(e))}function F_(e){return e==null?[]:So(e,gt(e))}function za(e,t,o){var u=e==null?r:rr(e,t);return u===r?o:u}function M_(e,t){return e!=null&&dd(e,t,i0)}function qa(e,t){return e!=null&&dd(e,t,o0)}var N_=id(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=ho.call(t)),e[t]=o},Ka(pt)),k_=id(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=ho.call(t)),Se.call(e,t)?e[t].push(o):e[t]=[o]},re),B_=ge(ui);function Ye(e){return ht(e)?_f(e):ma(e)}function gt(e){return ht(e)?_f(e,!0):p0(e)}function W_(e,t){var o={};return t=re(t,3),nn(e,function(u,f,g){gn(o,t(u,f,g),u)}),o}function V_(e,t){var o={};return t=re(t,3),nn(e,function(u,f,g){gn(o,f,t(u,f,g))}),o}var U_=Lr(function(e,t,o){Ro(e,t,o)}),Gd=Lr(function(e,t,o,u){Ro(e,t,o,u)}),$_=vn(function(e,t){var o={};if(e==null)return o;var u=!1;t=Le(t,function(g){return g=Bn(g,e),u||(u=g.length>1),g}),rn(e,Da(e),o),u&&(o=Ft(o,w|x|R,N0));for(var f=t.length;f--;)Ca(o,t[f]);return o});function j_(e,t){return Kd(e,$o(re(t)))}var H_=vn(function(e,t){return e==null?{}:m0(e,t)});function Kd(e,t){if(e==null)return{};var o=Le(Da(e),function(u){return[u]});return t=re(t),Wf(e,o,function(u,f){return t(u,f[0])})}function z_(e,t,o){t=Bn(t,e);var u=-1,f=t.length;for(f||(f=1,e=r);++u<f;){var g=e==null?r:e[on(t[u])];g===r&&(u=f,g=o),e=yn(g)?g.call(e):g}return e}function q_(e,t,o){return e==null?e:ci(e,t,o)}function G_(e,t,o,u){return u=typeof u=="function"?u:r,e==null?e:ci(e,t,o,u)}var Yd=ad(Ye),Xd=ad(gt);function K_(e,t,o){var u=ce(e),f=u||Vn(e)||Nr(e);if(t=re(t,4),o==null){var g=e&&e.constructor;f?o=u?new g:[]:Fe(e)?o=yn(g)?Ir(vo(e)):{}:o={}}return(f?Dt:nn)(e,function(y,C,O){return t(o,y,C,O)}),o}function Y_(e,t){return e==null?!0:Ca(e,t)}function X_(e,t,o){return e==null?e:Hf(e,t,Sa(o))}function Z_(e,t,o,u){return u=typeof u=="function"?u:r,e==null?e:Hf(e,t,Sa(o),u)}function kr(e){return e==null?[]:ia(e,Ye(e))}function J_(e){return e==null?[]:ia(e,gt(e))}function Q_(e,t,o){return o===r&&(o=t,t=r),o!==r&&(o=kt(o),o=o===o?o:0),t!==r&&(t=kt(t),t=t===t?t:0),nr(kt(e),t,o)}function e1(e,t,o){return t=wn(t),o===r?(o=t,t=0):o=wn(o),e=kt(e),s0(e,t,o)}function t1(e,t,o){if(o&&typeof o!="boolean"&&ut(e,t,o)&&(t=o=r),o===r&&(typeof t=="boolean"?(o=t,t=r):typeof e=="boolean"&&(o=e,e=r)),e===r&&t===r?(e=0,t=1):(e=wn(e),t===r?(t=e,e=0):t=wn(t)),e>t){var u=e;e=t,t=u}if(o||e%1||t%1){var f=xf();return nt(e+f*(t-e+Ly("1e-"+((f+"").length-1))),t)}return xa(e,t)}var n1=Fr(function(e,t,o){return t=t.toLowerCase(),e+(o?Zd(t):t)});function Zd(e){return Ga(Ee(e).toLowerCase())}function Jd(e){return e=Ee(e),e&&e.replace(iy,qy).replace(Cy,"")}function r1(e,t,o){e=Ee(e),t=Et(t);var u=e.length;o=o===r?u:nr(fe(o),0,u);var f=o;return o-=t.length,o>=0&&e.slice(o,f)==t}function i1(e){return e=Ee(e),e&&Bm.test(e)?e.replace(Oc,Gy):e}function o1(e){return e=Ee(e),e&&Hm.test(e)?e.replace($s,"\\$&"):e}var s1=Fr(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),a1=Fr(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),u1=td("toLowerCase");function l1(e,t,o){e=Ee(e),t=fe(t);var u=t?Rr(e):0;if(!t||u>=t)return e;var f=(t-u)/2;return Lo(xo(f),o)+e+Lo(wo(f),o)}function c1(e,t,o){e=Ee(e),t=fe(t);var u=t?Rr(e):0;return t&&u<t?e+Lo(t-u,o):e}function f1(e,t,o){e=Ee(e),t=fe(t);var u=t?Rr(e):0;return t&&u<t?Lo(t-u,o)+e:e}function d1(e,t,o){return o||t==null?t=0:t&&(t=+t),ww(Ee(e).replace(js,""),t||0)}function h1(e,t,o){return(o?ut(e,t,o):t===r)?t=1:t=fe(t),ba(Ee(e),t)}function g1(){var e=arguments,t=Ee(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var p1=Fr(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()});function v1(e,t,o){return o&&typeof o!="number"&&ut(e,t,o)&&(t=o=r),o=o===r?Ve:o>>>0,o?(e=Ee(e),e&&(typeof t=="string"||t!=null&&!Ha(t))&&(t=Et(t),!t&&Sr(e))?Wn(Ht(e),0,o):e.split(t,o)):[]}var m1=Fr(function(e,t,o){return e+(o?" ":"")+Ga(t)});function y1(e,t,o){return e=Ee(e),o=o==null?0:nr(fe(o),0,e.length),t=Et(t),e.slice(o,o+t.length)==t}function w1(e,t,o){var u=h.templateSettings;o&&ut(e,t,o)&&(t=r),e=Ee(e),t=zo({},t,u,ud);var f=zo({},t.imports,u.imports,ud),g=Ye(f),y=ia(f,g),C,O,W=0,V=t.interpolate||ro,$="__p += '",G=sa((t.escape||ro).source+"|"+V.source+"|"+(V===Pc?Jm:ro).source+"|"+(t.evaluate||ro).source+"|$","g"),J="//# sourceURL="+(Se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Oy+"]")+`
64
+ `;e.replace(G,function(oe,ve,we,St,lt,Rt){return we||(we=St),$+=e.slice(W,Rt).replace(oy,Ky),ve&&(C=!0,$+=`' +
65
+ __e(`+ve+`) +
66
+ '`),lt&&(O=!0,$+=`';
67
+ `+lt+`;
68
+ __p += '`),we&&($+=`' +
69
+ ((__t = (`+we+`)) == null ? '' : __t) +
70
+ '`),W=Rt+oe.length,oe}),$+=`';
71
+ `;var ie=Se.call(t,"variable")&&t.variable;if(!ie)$=`with (obj) {
72
+ `+$+`
73
+ }
74
+ `;else if(Xm.test(ie))throw new ue(d);$=(O?$.replace(no,""):$).replace(Mm,"$1").replace(Nm,"$1;"),$="function("+(ie||"obj")+`) {
75
+ `+(ie?"":`obj || (obj = {});
76
+ `)+"var __t, __p = ''"+(C?", __e = _.escape":"")+(O?`, __j = Array.prototype.join;
77
+ function print() { __p += __j.call(arguments, '') }
78
+ `:`;
79
+ `)+$+`return __p
80
+ }`;var de=eh(function(){return _e(g,J+"return "+$).apply(r,y)});if(de.source=$,ja(de))throw de;return de}function x1(e){return Ee(e).toLowerCase()}function b1(e){return Ee(e).toUpperCase()}function _1(e,t,o){if(e=Ee(e),e&&(o||t===r))return lf(e);if(!e||!(t=Et(t)))return e;var u=Ht(e),f=Ht(t),g=cf(u,f),y=ff(u,f)+1;return Wn(u,g,y).join("")}function C1(e,t,o){if(e=Ee(e),e&&(o||t===r))return e.slice(0,hf(e)+1);if(!e||!(t=Et(t)))return e;var u=Ht(e),f=ff(u,Ht(t))+1;return Wn(u,0,f).join("")}function E1(e,t,o){if(e=Ee(e),e&&(o||t===r))return e.replace(js,"");if(!e||!(t=Et(t)))return e;var u=Ht(e),f=cf(u,Ht(t));return Wn(u,f).join("")}function A1(e,t){var o=be,u=Ae;if(Fe(t)){var f="separator"in t?t.separator:f;o="length"in t?fe(t.length):o,u="omission"in t?Et(t.omission):u}e=Ee(e);var g=e.length;if(Sr(e)){var y=Ht(e);g=y.length}if(o>=g)return e;var C=o-Rr(u);if(C<1)return u;var O=y?Wn(y,0,C).join(""):e.slice(0,C);if(f===r)return O+u;if(y&&(C+=O.length-C),Ha(f)){if(e.slice(C).search(f)){var W,V=O;for(f.global||(f=sa(f.source,Ee(Tc.exec(f))+"g")),f.lastIndex=0;W=f.exec(V);)var $=W.index;O=O.slice(0,$===r?C:$)}}else if(e.indexOf(Et(f),C)!=C){var G=O.lastIndexOf(f);G>-1&&(O=O.slice(0,G))}return O+u}function S1(e){return e=Ee(e),e&&km.test(e)?e.replace(Rc,tw):e}var R1=Fr(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Ga=td("toUpperCase");function Qd(e,t,o){return e=Ee(e),t=o?r:t,t===r?Xy(e)?iw(e):Uy(e):e.match(t)||[]}var eh=ge(function(e,t){try{return _t(e,r,t)}catch(o){return ja(o)?o:new ue(o)}}),O1=vn(function(e,t){return Dt(t,function(o){o=on(o),gn(e,o,Ua(e[o],e))}),e});function P1(e){var t=e==null?0:e.length,o=re();return e=t?Le(e,function(u){if(typeof u[1]!="function")throw new It(c);return[o(u[0]),u[1]]}):[],ge(function(u){for(var f=-1;++f<t;){var g=e[f];if(_t(g[0],this,u))return _t(g[1],this,u)}})}function T1(e){return t0(Ft(e,w))}function Ka(e){return function(){return e}}function D1(e,t){return e==null||e!==e?t:e}var I1=rd(),L1=rd(!0);function pt(e){return e}function Ya(e){return Lf(typeof e=="function"?e:Ft(e,w))}function F1(e){return Mf(Ft(e,w))}function M1(e,t){return Nf(e,Ft(t,w))}var N1=ge(function(e,t){return function(o){return ui(o,e,t)}}),k1=ge(function(e,t){return function(o){return ui(e,o,t)}});function Xa(e,t,o){var u=Ye(t),f=So(t,u);o==null&&!(Fe(t)&&(f.length||!u.length))&&(o=t,t=e,e=this,f=So(t,Ye(t)));var g=!(Fe(o)&&"chain"in o)||!!o.chain,y=yn(e);return Dt(f,function(C){var O=t[C];e[C]=O,y&&(e.prototype[C]=function(){var W=this.__chain__;if(g||W){var V=e(this.__wrapped__),$=V.__actions__=dt(this.__actions__);return $.push({func:O,args:arguments,thisArg:e}),V.__chain__=W,V}return O.apply(e,Ln([this.value()],arguments))})}),e}function B1(){return et._===this&&(et._=cw),this}function Za(){}function W1(e){return e=fe(e),ge(function(t){return kf(t,e)})}var V1=Oa(Le),U1=Oa(rf),$1=Oa(Qs);function th(e){return Ma(e)?ea(on(e)):y0(e)}function j1(e){return function(t){return e==null?r:rr(e,t)}}var H1=od(),z1=od(!0);function Ja(){return[]}function Qa(){return!1}function q1(){return{}}function G1(){return""}function K1(){return!0}function Y1(e,t){if(e=fe(e),e<1||e>ne)return[];var o=Ve,u=nt(e,Ve);t=re(t),e-=Ve;for(var f=ra(u,t);++o<e;)t(o);return f}function X1(e){return ce(e)?Le(e,on):At(e)?[e]:dt(bd(Ee(e)))}function Z1(e){var t=++uw;return Ee(e)+t}var J1=Io(function(e,t){return e+t},0),Q1=Pa("ceil"),eC=Io(function(e,t){return e/t},1),tC=Pa("floor");function nC(e){return e&&e.length?Ao(e,pt,ga):r}function rC(e,t){return e&&e.length?Ao(e,re(t,2),ga):r}function iC(e){return af(e,pt)}function oC(e,t){return af(e,re(t,2))}function sC(e){return e&&e.length?Ao(e,pt,ya):r}function aC(e,t){return e&&e.length?Ao(e,re(t,2),ya):r}var uC=Io(function(e,t){return e*t},1),lC=Pa("round"),cC=Io(function(e,t){return e-t},0);function fC(e){return e&&e.length?na(e,pt):0}function dC(e,t){return e&&e.length?na(e,re(t,2)):0}return h.after=Fb,h.ary=Id,h.assign=b_,h.assignIn=qd,h.assignInWith=zo,h.assignWith=__,h.at=C_,h.before=Ld,h.bind=Ua,h.bindAll=O1,h.bindKey=Fd,h.castArray=qb,h.chain=Pd,h.chunk=tx,h.compact=nx,h.concat=rx,h.cond=P1,h.conforms=T1,h.constant=Ka,h.countBy=fb,h.create=E_,h.curry=Md,h.curryRight=Nd,h.debounce=kd,h.defaults=A_,h.defaultsDeep=S_,h.defer=Mb,h.delay=Nb,h.difference=ix,h.differenceBy=ox,h.differenceWith=sx,h.drop=ax,h.dropRight=ux,h.dropRightWhile=lx,h.dropWhile=cx,h.fill=fx,h.filter=hb,h.flatMap=vb,h.flatMapDeep=mb,h.flatMapDepth=yb,h.flatten=Ad,h.flattenDeep=dx,h.flattenDepth=hx,h.flip=kb,h.flow=I1,h.flowRight=L1,h.fromPairs=gx,h.functions=L_,h.functionsIn=F_,h.groupBy=wb,h.initial=vx,h.intersection=mx,h.intersectionBy=yx,h.intersectionWith=wx,h.invert=N_,h.invertBy=k_,h.invokeMap=bb,h.iteratee=Ya,h.keyBy=_b,h.keys=Ye,h.keysIn=gt,h.map=Wo,h.mapKeys=W_,h.mapValues=V_,h.matches=F1,h.matchesProperty=M1,h.memoize=Uo,h.merge=U_,h.mergeWith=Gd,h.method=N1,h.methodOf=k1,h.mixin=Xa,h.negate=$o,h.nthArg=W1,h.omit=$_,h.omitBy=j_,h.once=Bb,h.orderBy=Cb,h.over=V1,h.overArgs=Wb,h.overEvery=U1,h.overSome=$1,h.partial=$a,h.partialRight=Bd,h.partition=Eb,h.pick=H_,h.pickBy=Kd,h.property=th,h.propertyOf=j1,h.pull=Cx,h.pullAll=Rd,h.pullAllBy=Ex,h.pullAllWith=Ax,h.pullAt=Sx,h.range=H1,h.rangeRight=z1,h.rearg=Vb,h.reject=Rb,h.remove=Rx,h.rest=Ub,h.reverse=Wa,h.sampleSize=Pb,h.set=q_,h.setWith=G_,h.shuffle=Tb,h.slice=Ox,h.sortBy=Lb,h.sortedUniq=Mx,h.sortedUniqBy=Nx,h.split=v1,h.spread=$b,h.tail=kx,h.take=Bx,h.takeRight=Wx,h.takeRightWhile=Vx,h.takeWhile=Ux,h.tap=nb,h.throttle=jb,h.thru=Bo,h.toArray=jd,h.toPairs=Yd,h.toPairsIn=Xd,h.toPath=X1,h.toPlainObject=zd,h.transform=K_,h.unary=Hb,h.union=$x,h.unionBy=jx,h.unionWith=Hx,h.uniq=zx,h.uniqBy=qx,h.uniqWith=Gx,h.unset=Y_,h.unzip=Va,h.unzipWith=Od,h.update=X_,h.updateWith=Z_,h.values=kr,h.valuesIn=J_,h.without=Kx,h.words=Qd,h.wrap=zb,h.xor=Yx,h.xorBy=Xx,h.xorWith=Zx,h.zip=Jx,h.zipObject=Qx,h.zipObjectDeep=eb,h.zipWith=tb,h.entries=Yd,h.entriesIn=Xd,h.extend=qd,h.extendWith=zo,Xa(h,h),h.add=J1,h.attempt=eh,h.camelCase=n1,h.capitalize=Zd,h.ceil=Q1,h.clamp=Q_,h.clone=Gb,h.cloneDeep=Yb,h.cloneDeepWith=Xb,h.cloneWith=Kb,h.conformsTo=Zb,h.deburr=Jd,h.defaultTo=D1,h.divide=eC,h.endsWith=r1,h.eq=qt,h.escape=i1,h.escapeRegExp=o1,h.every=db,h.find=gb,h.findIndex=Cd,h.findKey=R_,h.findLast=pb,h.findLastIndex=Ed,h.findLastKey=O_,h.floor=tC,h.forEach=Td,h.forEachRight=Dd,h.forIn=P_,h.forInRight=T_,h.forOwn=D_,h.forOwnRight=I_,h.get=za,h.gt=Jb,h.gte=Qb,h.has=M_,h.hasIn=qa,h.head=Sd,h.identity=pt,h.includes=xb,h.indexOf=px,h.inRange=e1,h.invoke=B_,h.isArguments=sr,h.isArray=ce,h.isArrayBuffer=e_,h.isArrayLike=ht,h.isArrayLikeObject=$e,h.isBoolean=t_,h.isBuffer=Vn,h.isDate=n_,h.isElement=r_,h.isEmpty=i_,h.isEqual=o_,h.isEqualWith=s_,h.isError=ja,h.isFinite=a_,h.isFunction=yn,h.isInteger=Wd,h.isLength=jo,h.isMap=Vd,h.isMatch=u_,h.isMatchWith=l_,h.isNaN=c_,h.isNative=f_,h.isNil=h_,h.isNull=d_,h.isNumber=Ud,h.isObject=Fe,h.isObjectLike=ke,h.isPlainObject=gi,h.isRegExp=Ha,h.isSafeInteger=g_,h.isSet=$d,h.isString=Ho,h.isSymbol=At,h.isTypedArray=Nr,h.isUndefined=p_,h.isWeakMap=v_,h.isWeakSet=m_,h.join=xx,h.kebabCase=s1,h.last=Nt,h.lastIndexOf=bx,h.lowerCase=a1,h.lowerFirst=u1,h.lt=y_,h.lte=w_,h.max=nC,h.maxBy=rC,h.mean=iC,h.meanBy=oC,h.min=sC,h.minBy=aC,h.stubArray=Ja,h.stubFalse=Qa,h.stubObject=q1,h.stubString=G1,h.stubTrue=K1,h.multiply=uC,h.nth=_x,h.noConflict=B1,h.noop=Za,h.now=Vo,h.pad=l1,h.padEnd=c1,h.padStart=f1,h.parseInt=d1,h.random=t1,h.reduce=Ab,h.reduceRight=Sb,h.repeat=h1,h.replace=g1,h.result=z_,h.round=lC,h.runInContext=A,h.sample=Ob,h.size=Db,h.snakeCase=p1,h.some=Ib,h.sortedIndex=Px,h.sortedIndexBy=Tx,h.sortedIndexOf=Dx,h.sortedLastIndex=Ix,h.sortedLastIndexBy=Lx,h.sortedLastIndexOf=Fx,h.startCase=m1,h.startsWith=y1,h.subtract=cC,h.sum=fC,h.sumBy=dC,h.template=w1,h.times=Y1,h.toFinite=wn,h.toInteger=fe,h.toLength=Hd,h.toLower=x1,h.toNumber=kt,h.toSafeInteger=x_,h.toString=Ee,h.toUpper=b1,h.trim=_1,h.trimEnd=C1,h.trimStart=E1,h.truncate=A1,h.unescape=S1,h.uniqueId=Z1,h.upperCase=R1,h.upperFirst=Ga,h.each=Td,h.eachRight=Dd,h.first=Sd,Xa(h,function(){var e={};return nn(h,function(t,o){Se.call(h.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),h.VERSION=s,Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){h[e].placeholder=h}),Dt(["drop","take"],function(e,t){ye.prototype[e]=function(o){o=o===r?1:Ke(fe(o),0);var u=this.__filtered__&&!t?new ye(this):this.clone();return u.__filtered__?u.__takeCount__=nt(o,u.__takeCount__):u.__views__.push({size:nt(o,Ve),type:e+(u.__dir__<0?"Right":"")}),u},ye.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),Dt(["filter","map","takeWhile"],function(e,t){var o=t+1,u=o==ae||o==pe;ye.prototype[e]=function(f){var g=this.clone();return g.__iteratees__.push({iteratee:re(f,3),type:o}),g.__filtered__=g.__filtered__||u,g}}),Dt(["head","last"],function(e,t){var o="take"+(t?"Right":"");ye.prototype[e]=function(){return this[o](1).value()[0]}}),Dt(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");ye.prototype[e]=function(){return this.__filtered__?new ye(this):this[o](1)}}),ye.prototype.compact=function(){return this.filter(pt)},ye.prototype.find=function(e){return this.filter(e).head()},ye.prototype.findLast=function(e){return this.reverse().find(e)},ye.prototype.invokeMap=ge(function(e,t){return typeof e=="function"?new ye(this):this.map(function(o){return ui(o,e,t)})}),ye.prototype.reject=function(e){return this.filter($o(re(e)))},ye.prototype.slice=function(e,t){e=fe(e);var o=this;return o.__filtered__&&(e>0||t<0)?new ye(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==r&&(t=fe(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},ye.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ye.prototype.toArray=function(){return this.take(Ve)},nn(ye.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),f=h[u?"take"+(t=="last"?"Right":""):t],g=u||/^find/.test(t);f&&(h.prototype[t]=function(){var y=this.__wrapped__,C=u?[1]:arguments,O=y instanceof ye,W=C[0],V=O||ce(y),$=function(ve){var we=f.apply(h,Ln([ve],C));return u&&G?we[0]:we};V&&o&&typeof W=="function"&&W.length!=1&&(O=V=!1);var G=this.__chain__,J=!!this.__actions__.length,ie=g&&!G,de=O&&!J;if(!g&&V){y=de?y:new ye(this);var oe=e.apply(y,C);return oe.__actions__.push({func:Bo,args:[$],thisArg:r}),new Lt(oe,G)}return ie&&de?e.apply(this,C):(oe=this.thru($),ie?u?oe.value()[0]:oe.value():oe)})}),Dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=lo[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);h.prototype[e]=function(){var f=arguments;if(u&&!this.__chain__){var g=this.value();return t.apply(ce(g)?g:[],f)}return this[o](function(y){return t.apply(ce(y)?y:[],f)})}}),nn(ye.prototype,function(e,t){var o=h[t];if(o){var u=o.name+"";Se.call(Dr,u)||(Dr[u]=[]),Dr[u].push({name:t,func:o})}}),Dr[Do(r,M).name]=[{name:"wrapper",func:r}],ye.prototype.clone=Sw,ye.prototype.reverse=Rw,ye.prototype.value=Ow,h.prototype.at=rb,h.prototype.chain=ib,h.prototype.commit=ob,h.prototype.next=sb,h.prototype.plant=ub,h.prototype.reverse=lb,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=cb,h.prototype.first=h.prototype.head,ti&&(h.prototype[ti]=ab),h},Or=ow();Jn?((Jn.exports=Or)._=Or,Ys._=Or):et._=Or}).call(Br)}(eo,eo.exports);var Us=eo.exports;const bC=Ce("Checkbox",n=>{const{onChange:i=()=>{},label:r,disabled:s,mode:a="binary",optionValue:l,info:c,fieldName:d=r??"checkbox",hideRequiredMark:p=!1,role:m="checkbox",value:v,required:w,customValidation:x}=n,R=!!l&&a==="value",{field:{value:P,onChange:E,ref:T},fieldState:{error:M}}=Ws({defaultValue:R?[]:a==="tristate"?null:!1,rules:{validate:j=>w&&(R&&(!Array.isArray(j)||j.length===0)||a==="binary"&&j!==!0||a==="tristate"&&j===null)?"This field is required":(x==null?void 0:x(j))??!0}},d),F=R?Array.isArray(P)&&P.some(j=>Us.isEqual(j,l)):P,I=Qt(m,{props:{label:r},context:{checked:F,partialChecked:P===!1&&a==="tristate",tristate:a==="tristate",disabled:s}})??{};_n(()=>{v!==void 0&&E(v)},[v]);const U=vt(()=>{let j=P;R?Array.isArray(P)?Array.isArray(P)&&P.some(ee=>Us.isEqual(ee,l))?j=P.filter(ee=>!Us.isEqual(ee,l)):P&&(j=[...P,l]):j=[l]:a==="tristate"?P===null?j=!0:P===!0?j=!1:P===!1&&(j=null):a==="binary"&&(j=!P),E(j),i(j)},[E,i,P,a,R,l]),N=()=>S.jsx("div",{...I.iconContainer,children:S.jsx(cn,{name:"circle-fill",...I.icon})}),z=()=>F===!0?S.jsx(cn,{...I.icon,name:"check-4"}):F===!1&&a==="tristate"?S.jsx(cn,{...I.icon,name:"minus-4"}):null;return S.jsxs(Qi,{fieldName:d,required:w,label:r,info:c,hideRequiredMark:p,onClick:U,className:"flex items-center gap-1",errors:M?{[d]:M}:{},context:{invalid:!!M,disabled:s,containerless:m==="checkbox",borderless:!0},children:[S.jsx("div",{...I.box,children:m==="checkbox"?z():N()}),S.jsx("input",{ref:T,...I.input,checked:F!==null,name:d,disabled:s,type:"checkbox",onChange:()=>{}})]})}),Im=Ce("Dialog",tu(n=>{const{children:i,defaultVisibility:r=!1,visible:s=!1,onVisibleChange:a,header:l,size:c="sm",modal:d=!0,closeOnBlur:p=!0,closeOnEscape:m=!0,useCloseIcon:v=!0,containerClass:w,headerClass:x,contentClass:R,slots:P}=n,E=Qt("dialog",{props:{size:c},context:{open:s}})??{};return S.jsx(pp,{defaultOpen:r,modal:d,open:s,onOpenChange:a,children:S.jsxs(vp,{children:[S.jsx(mp,{...E.overlay}),S.jsxs(yp,{className:ln(E.container.className,w),onEscapeKeyDown:T=>{m||T.preventDefault()},onPointerDownOutside:T=>{p||T.preventDefault()},children:[S.jsx(wp,{asChild:!0,children:S.jsx("div",{className:ln(E.header.className,x),children:S.jsxs(Gn,{name:"header",slots:P,children:[S.jsx("span",{children:l}),v&&S.jsx("div",{...E.iconContainer,children:S.jsx(cn,{name:"x",className:"cursor-pointer",onClick:()=>a(!1)})})]})})}),S.jsx(Gn,{name:"content",slots:P,children:S.jsx("div",{className:ln(E.content.className,R),children:i})}),S.jsx(Gn,{name:"footer",slots:P})]})]})})})),CC=Ce("DialogForm",ar((n,i)=>{const{children:r,defaultVisibility:s=!1,visible:a=!1,onVisibleChange:l,header:c,size:d="lg",modal:p=!0,closeOnBlur:m=!0,closeOnEscape:v=!0,closeOnSubmit:w=!0,useCloseIcon:x=!0,containerClass:R,headerClass:P,contentClass:E,slots:T,defaultValues:M,onError:F,onSubmit:I,resetOnSubmit:U,buttonsConfig:N}=n,z={visible:a,onVisibleChange:l,defaultVisibility:s,header:c,size:d,modal:p,closeOnBlur:m,closeOnEscape:v,useCloseIcon:x,containerClass:R,contentClass:E,headerClass:P,slots:{content:T.content,footer:T.footer,header:T.header}},j={defaultValues:M,onError:F,onSubmit:I,resetOnSubmit:U,buttonsConfig:N,slots:{footer:T.formFooter}},ee=se=>{I(se),w&&l(!1)};return S.jsx(Im,{...z,children:S.jsx(Fm,{...j,ref:i,onSubmit:ee,children:r})})})),Lm=ar(({children:n,resetOnSubmit:i,onSubmit:r,onError:s,buttonsConfig:a,slots:l},c)=>{const{methods:d}=Iu(),{handleSubmit:p,reset:m,resetField:v,getValues:w,setValue:x,setError:R,clearErrors:P,watch:E,formState:{errors:T,isDirty:M,dirtyFields:F}}=d,I=N=>{r(N),i&&m()},U=()=>Array.isArray(n)?n.map((N,z)=>Yo(N)?Ko(N,{key:N.key??z,methods:d}):N):Yo(n)?Ko(n,{methods:d}):n;return Go(c,()=>({resetField:v,reset:m,getValues:w,setValue:x,setError:R,clearErrors:P,errors:T,watch:E,isDirty:M,dirtyFields:F}),[v,m,w]),S.jsx("form",{onSubmit:p(I,s),children:S.jsxs("div",{className:"grid grid-cols-2 gap-x-2 gap-y-2",children:[U(),S.jsx(Gn,{name:"footer",slots:l,children:S.jsx("div",{className:"col-span-2 gap-1 flex justify-end w-full",children:a.map(({type:N,label:z,severity:j,style:ee})=>S.jsx(Em,{onClick:()=>N==="reset"?m():void 0,label:z,severity:j,outlined:ee==="outlined",text:ee==="text",type:N==="submit"?"submit":"button"},N))})})]})})}),Fm=Ce("Form",ar(({children:n,defaultValues:i,resetOnSubmit:r=!0,onSubmit:s,onError:a,buttonsConfig:l=[],slots:c},d)=>{const p=()=>{const m={back:{type:"back",label:"Cancel",severity:"secondary",style:"text"},reset:{type:"reset",label:"Clear",severity:"primary",style:"text"},"submit-raw":{type:"submit-raw",label:"Save",severity:"success",style:"outlined"},submit:{type:"submit",label:"Submit",severity:"success",style:"fill"}};return l.map(({type:v,label:w,severity:x,style:R})=>{const{label:P,severity:E,style:T}=m[v];return{type:v,label:w??P,severity:x??E,style:R??T}})};return S.jsx(Mh,{defaultValues:i,children:S.jsx(Lm,{ref:d,resetOnSubmit:r,onSubmit:s,onError:a,slots:c,buttonsConfig:p(),children:n})})})),SC=Ce("KanbanBoard",({children:n,className:i,onUpdate:r=()=>{}})=>S.jsx(lm,{onUpdate:r,children:S.jsx("div",{className:i,children:n})})),RC=Ce("KanbanColumn",n=>{const{id:i,data:r=[],groupId:s,onDrop:a=()=>{},onDragStart:l=()=>{},...c}=n,{dragItem:d,setDragItem:p,cardElements:m,setCardElements:v,onUpdate:w}=cm(),x=Un(()=>r.map(I=>({...I,id:`draggable-kanban-${I.id??Vs()}`,groupId:s})),[]),R=Un(()=>new Set(x.map(I=>I.id)),[]);_n(()=>{r.length>0&&v(I=>[...I.filter(N=>!R.has(N.id)),...x])},[x]);const P=I=>{const{draggedGroupId:U,draggedId:N}=I;l(I),p({id:N,groupId:U})},E=vt(I=>{if(I.originalEvent.stopPropagation(),a(I),!d||d.id===I.destinationId)return;const U=m.findIndex(z=>z.id===I.destinationId),N=m.findIndex(z=>z.id===d.id);v(z=>{if(U===-1||N===-1)return z;const j=[...z],[ee]=j.splice(N,1);return j.splice(U,0,{...ee,groupId:s}),w({groupId:s,id:d.id,index:j.filter(se=>se.groupId===s).findIndex(se=>se.id===d.id)}),j})},[d,m]),T=vt(I=>{if(I.preventDefault(),a({originalEvent:I,destinationGroupId:s,destinationId:d.id}),!d||d.groupId===s)return;const U=m.find(N=>N.id===d.id);v(N=>[...N.filter(z=>z.id!==U.id),{...U,groupId:s}]),w({groupId:s,id:d.id,index:m.filter(N=>N.groupId===s).length})},[d,m,s]),M=vt(()=>({tabIndex:0,role:"button",type:"button",onClick:c.onClick,onKeyDown:c.onKeyDown,onDragOver:I=>I.preventDefault(),onDrop:T}),[c,T]),F=vt(()=>m.filter(I=>I.groupId===s).map(I=>nu(Dm,{...I,key:I.id,id:I.id,groupId:s,mode:"kanban",draggable:!0,clickable:!0,onDragStart:P,onDrop:E})),[m,P,E,s]);return S.jsx("div",{...c,id:s,className:"flex flex-col h-max gap-3 m-3 p-3 border border-secondary-800 min-h-[200px] min-w-[200px]",...M(),children:F()})}),to=n=>{const{onChange:i=()=>{},onInput:r=()=>{},onBlur:s=()=>{},onKeydown:a=()=>{},placeholder:l,label:c,disabled:d,info:p,fieldName:m=c??"baseinput",type:v="text",hideRequiredMark:w=!1,value:x,methods:R,required:P,customMessage:E,min:T,max:M,minLength:F,maxLength:I,pattern:U,passwordRequirements:N,customValidation:z,preventInputOnError:j}=n,[ee,se]=bn({}),[be,Ae]=bn({}),[te,Q]=bn(!1),ae={getValues:()=>ee,setValue:(Ue,Ot)=>{se({[Ue]:Ot})},formState:{errors:be},trigger:Ue=>(z==null?void 0:z(ee[Ue]))===!0},{setValue:xe,getValues:pe,trigger:he,formState:{errors:ne={}}}=R??ae,Oe=Qt("baseinput",{props:{label:c,type:v}})??{},{ref:Ne,...Ve}=hm({type:v,required:P,max:M,min:T,maxLength:I,minLength:F,pattern:U,validate:z,customMessage:E,passwordRequirements:N},m)??{ref:void 0},Pn=l??(c?`Input ${c.toLowerCase()}`:"");_n(()=>{x!==null&&xe(m,x)},[x]);const Tn=vt(async Ue=>{var st;const Ot=pe()[m];xe(m,Ue.target.value);const Pt=await he(m);if(j&&((st=ne[m])==null?void 0:st.type)!=="required")if(Pt)R||Ae({[m]:x});else{xe(m,Ot);return}i(Ue.target.value)},[pe,xe,he,j,i]),Kn=vt(async Ue=>{await he(m),s(Ue.target.value)},[he,s]),bt=vt(Ue=>{v==="number"&&["e","E","+","-"].includes(Ue.key)&&Ue.preventDefault(),a(Ue.key)},[v]);return S.jsxs(Qi,{required:P,fieldName:m,info:p,label:c,errors:ne,hideRequiredMark:w,context:{invalid:!!ne[m],disabled:d},children:[S.jsx("input",{ref:Ne,...Ve,...Oe.input,autoComplete:"off",onBlur:Kn,onChange:Tn,onInput:r,onKeyDown:bt,name:m,placeholder:Pn,disabled:d,type:te&&v==="password"?"text":v}),v==="password"&&S.jsx(cn,{...Oe.eyetoggle,name:te?"eye-off":"eye-on",onClick:()=>Q(!te)})]})},OC=Ce("InputEmail",n=>S.jsx(to,{...n,type:"email"})),PC=Ce("InputNumber",n=>S.jsx(to,{...n,type:"number"})),TC=Ce("InputPassword",n=>S.jsx(to,{...n,type:"password"})),DC=Ce("InputText",n=>S.jsx(to,{...n,type:"text"})),IC=Ce("RadioButton",n=>{const{onChange:i=()=>{},label:r,disabled:s,optionValue:a,info:l,fieldName:c=r??"radio",hideRequiredMark:d=!1,value:p,required:m,customValidation:v}=n,{field:{value:w,onChange:x,ref:R},fieldState:{error:P}}=Ws({rules:{validate:F=>m&&F===null?"This field is required":(v==null?void 0:v(F))??!0}},c),E=w===a,T=Qt("radiobutton",{props:{label:r},context:{checked:E,disabled:s}})??{};_n(()=>{p!==null&&x(p)},[p]);const M=vt(()=>{const F=a;x(F),i(F)},[x,i,w,a]);return S.jsxs(Qi,{fieldName:c,required:m,label:r,info:l,hideRequiredMark:d,onClick:M,className:"flex items-center gap-1",errors:P?{[c]:P}:{},context:{invalid:!!P,disabled:s,containerless:!0},children:[S.jsx("div",{...T.box}),E&&S.jsx("div",{...T.innerBox}),S.jsx("input",{ref:R,...T.input,checked:E,onChange:()=>{},name:c,disabled:s,type:"radio"})]})}),LC=Ce("ToggleSwitch",n=>{const{onChange:i=()=>{},label:r,disabled:s,mode:a="binary",info:l,fieldName:c=r??"checkbox",hideRequiredMark:d=!1,value:p,required:m,customValidation:v}=n,{field:{value:w,onChange:x,ref:R},fieldState:{error:P}}=Ws({defaultValue:a==="tristate"?null:!1,rules:{validate:I=>m&&(a==="binary"&&I!==!0||a==="tristate"&&I===null)?"This field is required":(v==null?void 0:v(I))??!0}},c),E=w,T=Qt("toggleswitch",{props:{label:r},context:{checked:E,partialChecked:w===!1&&a==="tristate",tristate:a==="tristate",disabled:s}})??{};_n(()=>{p!==void 0&&x(p)},[p]);const M=vt(()=>{let I=w;a==="tristate"?w===null?I=!0:w===!0?I=!1:w===!1&&(I=null):a==="binary"&&(I=!w),x(I),i(I)},[x,i,w,a]),F=()=>S.jsx("div",{...T.iconContainer,children:S.jsx(cn,{name:"circle-fill",...T.icon})});return S.jsxs(Qi,{fieldName:c,required:m,label:r,info:l,hideRequiredMark:d,onClick:M,className:"flex items-center gap-1",errors:P?{[c]:P}:{},context:{invalid:!!P,disabled:s,borderless:!0},children:[S.jsx("div",{...T.box,children:F()}),S.jsx("input",{ref:R,...T.input,checked:E!==null,name:c,disabled:s,type:"checkbox",onChange:()=>{}})]})})}}});