@arudovwen/form-builder-react 1.0.0 → 1.0.1
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.
- package/dist/form-builder-react.css +1 -0
- package/dist/form-builder.es.js +11935 -0
- package/dist/form-builder.umd.js +57 -0
- package/package.json +1 -1
- package/dist/assets/index-Davr6XoL.js +0 -67
- package/dist/assets/index-Dvru643z.css +0 -1
- package/dist/index.html +0 -20
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
(function(St,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],h):(St=typeof globalThis<"u"?globalThis:St||self,h(St.FormBuilder={},St.React,St.ReactDOM))})(this,function(St,h,mt){"use strict";function rs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=rs(h),dr=rs(mt);function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pr={exports:{}},Fn={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var is;function zu(){if(is)return Fn;is=1;var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(l,a,u){var c,f={},m=null,d=null;u!==void 0&&(m=""+u),a.key!==void 0&&(m=""+a.key),a.ref!==void 0&&(d=a.ref);for(c in a)r.call(a,c)&&!o.hasOwnProperty(c)&&(f[c]=a[c]);if(l&&l.defaultProps)for(c in a=l.defaultProps,a)f[c]===void 0&&(f[c]=a[c]);return{$$typeof:t,type:l,key:m,ref:d,props:f,_owner:i.current}}return Fn.Fragment=n,Fn.jsx=s,Fn.jsxs=s,Fn}var kn={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var os;function Wu(){return os||(os=1,process.env.NODE_ENV!=="production"&&function(){var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p=Symbol.iterator,v="@@iterator";function b(E){if(E===null||typeof E!="object")return null;var P=p&&E[p]||E[v];return typeof P=="function"?P:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(E){{for(var P=arguments.length,U=new Array(P>1?P-1:0),J=1;J<P;J++)U[J-1]=arguments[J];x("error",E,U)}}function x(E,P,U){{var J=g.ReactDebugCurrentFrame,se=J.getStackAddendum();se!==""&&(P+="%s",U=U.concat([se]));var ue=U.map(function(re){return String(re)});ue.unshift("Warning: "+P),Function.prototype.apply.call(console[E],console,ue)}}var _=!1,$=!1,S=!1,C=!1,A=!1,L;L=Symbol.for("react.module.reference");function j(E){return!!(typeof E=="string"||typeof E=="function"||E===r||E===o||A||E===i||E===u||E===c||C||E===d||_||$||S||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===f||E.$$typeof===s||E.$$typeof===l||E.$$typeof===a||E.$$typeof===L||E.getModuleId!==void 0))}function D(E,P,U){var J=E.displayName;if(J)return J;var se=P.displayName||P.name||"";return se!==""?U+"("+se+")":U}function I(E){return E.displayName||"Context"}function V(E){if(E==null)return null;if(typeof E.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case l:var P=E;return I(P)+".Consumer";case s:var U=E;return I(U._context)+".Provider";case a:return D(E,E.render,"ForwardRef");case f:var J=E.displayName||null;return J!==null?J:V(E.type)||"Memo";case m:{var se=E,ue=se._payload,re=se._init;try{return V(re(ue))}catch{return null}}}return null}var H=Object.assign,Y=0,X,G,z,Q,ee,Fe,Ae;function q(){}q.__reactDisabledLog=!0;function ge(){{if(Y===0){X=console.log,G=console.info,z=console.warn,Q=console.error,ee=console.group,Fe=console.groupCollapsed,Ae=console.groupEnd;var E={configurable:!0,enumerable:!0,value:q,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}Y++}}function be(){{if(Y--,Y===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},E,{value:X}),info:H({},E,{value:G}),warn:H({},E,{value:z}),error:H({},E,{value:Q}),group:H({},E,{value:ee}),groupCollapsed:H({},E,{value:Fe}),groupEnd:H({},E,{value:Ae})})}Y<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=g.ReactCurrentDispatcher,ke;function xe(E,P,U){{if(ke===void 0)try{throw Error()}catch(se){var J=se.stack.trim().match(/\n( *(at )?)/);ke=J&&J[1]||""}return`
|
|
18
|
+
`+ke+E}}var De=!1,dt;{var we=typeof WeakMap=="function"?WeakMap:Map;dt=new we}function ne(E,P){if(!E||De)return"";{var U=dt.get(E);if(U!==void 0)return U}var J;De=!0;var se=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ue;ue=oe.current,oe.current=null,ge();try{if(P){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(Je){J=Je}Reflect.construct(E,[],re)}else{try{re.call()}catch(Je){J=Je}E.call(re.prototype)}}else{try{throw Error()}catch(Je){J=Je}E()}}catch(Je){if(Je&&J&&typeof Je.stack=="string"){for(var te=Je.stack.split(`
|
|
19
|
+
`),Ke=J.stack.split(`
|
|
20
|
+
`),Ee=te.length-1,Se=Ke.length-1;Ee>=1&&Se>=0&&te[Ee]!==Ke[Se];)Se--;for(;Ee>=1&&Se>=0;Ee--,Se--)if(te[Ee]!==Ke[Se]){if(Ee!==1||Se!==1)do if(Ee--,Se--,Se<0||te[Ee]!==Ke[Se]){var at=`
|
|
21
|
+
`+te[Ee].replace(" at new "," at ");return E.displayName&&at.includes("<anonymous>")&&(at=at.replace("<anonymous>",E.displayName)),typeof E=="function"&&dt.set(E,at),at}while(Ee>=1&&Se>=0);break}}}finally{De=!1,oe.current=ue,be(),Error.prepareStackTrace=se}var Cn=E?E.displayName||E.name:"",hn=Cn?xe(Cn):"";return typeof E=="function"&&dt.set(E,hn),hn}function de(E,P,U){return ne(E,!1)}function $e(E){var P=E.prototype;return!!(P&&P.isReactComponent)}function jt(E,P,U){if(E==null)return"";if(typeof E=="function")return ne(E,$e(E));if(typeof E=="string")return xe(E);switch(E){case u:return xe("Suspense");case c:return xe("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case a:return de(E.render);case f:return jt(E.type,P,U);case m:{var J=E,se=J._payload,ue=J._init;try{return jt(ue(se),P,U)}catch{}}}return""}var Nt=Object.prototype.hasOwnProperty,cn={},T=g.ReactDebugCurrentFrame;function F(E){if(E){var P=E._owner,U=jt(E.type,E._source,P?P.type:null);T.setExtraStackFrame(U)}else T.setExtraStackFrame(null)}function O(E,P,U,J,se){{var ue=Function.call.bind(Nt);for(var re in E)if(ue(E,re)){var te=void 0;try{if(typeof E[re]!="function"){var Ke=Error((J||"React class")+": "+U+" type `"+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}te=E[re](P,re,J,U,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ee){te=Ee}te&&!(te instanceof Error)&&(F(se),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",J||"React class",U,re,typeof te),F(null)),te instanceof Error&&!(te.message in cn)&&(cn[te.message]=!0,F(se),y("Failed %s type: %s",U,te.message),F(null))}}}var R=Array.isArray;function M(E){return R(E)}function N(E){{var P=typeof Symbol=="function"&&Symbol.toStringTag,U=P&&E[Symbol.toStringTag]||E.constructor.name||"Object";return U}}function W(E){try{return K(E),!1}catch{return!0}}function K(E){return""+E}function he(E){if(W(E))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",N(E)),K(E)}var fe=g.ReactCurrentOwner,pt={key:!0,ref:!0,__self:!0,__source:!0},_n,zt,It;It={};function ur(E){if(Nt.call(E,"ref")){var P=Object.getOwnPropertyDescriptor(E,"ref").get;if(P&&P.isReactWarning)return!1}return E.ref!==void 0}function fn(E){if(Nt.call(E,"key")){var P=Object.getOwnPropertyDescriptor(E,"key").get;if(P&&P.isReactWarning)return!1}return E.key!==void 0}function cr(E,P){if(typeof E.ref=="string"&&fe.current&&P&&fe.current.stateNode!==P){var U=V(fe.current.type);It[U]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',V(fe.current.type),E.ref),It[U]=!0)}}function me(E,P){{var U=function(){_n||(_n=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",P))};U.isReactWarning=!0,Object.defineProperty(E,"key",{get:U,configurable:!0})}}function Re(E,P){{var U=function(){zt||(zt=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",P))};U.isReactWarning=!0,Object.defineProperty(E,"ref",{get:U,configurable:!0})}}var Ne=function(E,P,U,J,se,ue,re){var te={$$typeof:t,type:E,key:P,ref:U,props:re,_owner:ue};return te._store={},Object.defineProperty(te._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(te,"_self",{configurable:!1,enumerable:!1,writable:!1,value:J}),Object.defineProperty(te,"_source",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.freeze&&(Object.freeze(te.props),Object.freeze(te)),te};function Be(E,P,U,J,se){{var ue,re={},te=null,Ke=null;U!==void 0&&(he(U),te=""+U),fn(P)&&(he(P.key),te=""+P.key),ur(P)&&(Ke=P.ref,cr(P,se));for(ue in P)Nt.call(P,ue)&&!pt.hasOwnProperty(ue)&&(re[ue]=P[ue]);if(E&&E.defaultProps){var Ee=E.defaultProps;for(ue in Ee)re[ue]===void 0&&(re[ue]=Ee[ue])}if(te||Ke){var Se=typeof E=="function"?E.displayName||E.name||"Unknown":E;te&&me(re,Se),Ke&&Re(re,Se)}return Ne(E,te,Ke,se,J,fe.current,re)}}var Ie=g.ReactCurrentOwner,We=g.ReactDebugCurrentFrame;function ht(E){if(E){var P=E._owner,U=jt(E.type,E._source,P?P.type:null);We.setExtraStackFrame(U)}else We.setExtraStackFrame(null)}var fr;fr=!1;function dn(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function pn(){{if(Ie.current){var E=V(Ie.current.type);if(E)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+E+"`."}return""}}function ts(E){return""}var Vu={};function Lv(E){{var P=pn();if(!P){var U=typeof E=="string"?E:E.displayName||E.name;U&&(P=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+U+">.")}return P}}function Ru(E,P){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var U=Lv(P);if(Vu[U])return;Vu[U]=!0;var J="";E&&E._owner&&E._owner!==Ie.current&&(J=" It was passed a child from "+V(E._owner.type)+"."),ht(E),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',U,J),ht(null)}}function Bu(E,P){{if(typeof E!="object")return;if(M(E))for(var U=0;U<E.length;U++){var J=E[U];dn(J)&&Ru(J,P)}else if(dn(E))E._store&&(E._store.validated=!0);else if(E){var se=b(E);if(typeof se=="function"&&se!==E.entries)for(var ue=se.call(E),re;!(re=ue.next()).done;)dn(re.value)&&Ru(re.value,P)}}}function Pv(E){{var P=E.type;if(P==null||typeof P=="string")return;var U;if(typeof P=="function")U=P.propTypes;else if(typeof P=="object"&&(P.$$typeof===a||P.$$typeof===f))U=P.propTypes;else return;if(U){var J=V(P);O(U,E.props,"prop",J,E)}else if(P.PropTypes!==void 0&&!fr){fr=!0;var se=V(P);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",se||"Unknown")}typeof P.getDefaultProps=="function"&&!P.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jv(E){{for(var P=Object.keys(E.props),U=0;U<P.length;U++){var J=P[U];if(J!=="children"&&J!=="key"){ht(E),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",J),ht(null);break}}E.ref!==null&&(ht(E),y("Invalid attribute `ref` supplied to `React.Fragment`."),ht(null))}}var Uu={};function Hu(E,P,U,J,se,ue){{var re=j(E);if(!re){var te="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(te+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ke=ts();Ke?te+=Ke:te+=pn();var Ee;E===null?Ee="null":M(E)?Ee="array":E!==void 0&&E.$$typeof===t?(Ee="<"+(V(E.type)||"Unknown")+" />",te=" Did you accidentally export a JSX literal instead of a component?"):Ee=typeof E,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ee,te)}var Se=Be(E,P,U,se,ue);if(Se==null)return Se;if(re){var at=P.children;if(at!==void 0)if(J)if(M(at)){for(var Cn=0;Cn<at.length;Cn++)Bu(at[Cn],E);Object.freeze&&Object.freeze(at)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Bu(at,E)}if(Nt.call(P,"key")){var hn=V(E),Je=Object.keys(P).filter(function(Bv){return Bv!=="key"}),ns=Je.length>0?"{key: someKey, "+Je.join(": ..., ")+": ...}":"{key: someKey}";if(!Uu[hn+ns]){var Rv=Je.length>0?"{"+Je.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,ns,hn,Rv,hn),Uu[hn+ns]=!0}}return E===r?jv(Se):Pv(Se),Se}}function Nv(E,P,U){return Hu(E,P,U,!0)}function Iv(E,P,U){return Hu(E,P,U,!1)}var Mv=Iv,Vv=Nv;kn.Fragment=r,kn.jsx=Mv,kn.jsxs=Vv}()),kn}var ss;function Ku(){return ss||(ss=1,process.env.NODE_ENV==="production"?pr.exports=zu():pr.exports=Wu()),pr.exports}var w=Ku();function as(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=as(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=as(e))&&(r&&(r+=" "),r+=t);return r}function Yu(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Yu(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
31
|
+
`);var $n=e=>typeof e=="number"&&!isNaN(e),Wt=e=>typeof e=="string",_t=e=>typeof e=="function",Gu=e=>Wt(e)||$n(e),ci=e=>Wt(e)||_t(e)?e:null,Xu=(e,t)=>e===!1||$n(e)&&e>0?e:t,fi=e=>h.isValidElement(e)||Wt(e)||_t(e)||$n(e);function Ju(e,t,n=300){let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function Qu({enter:e,exit:t,appendPosition:n=!1,collapse:r=!0,collapseDuration:i=300}){return function({children:o,position:s,preventExitTransition:l,done:a,nodeRef:u,isIn:c,playToast:f}){let m=n?`${e}--${s}`:e,d=n?`${t}--${s}`:t,p=h.useRef(0);return h.useLayoutEffect(()=>{let v=u.current,b=m.split(" "),g=y=>{y.target===u.current&&(f(),v.removeEventListener("animationend",g),v.removeEventListener("animationcancel",g),p.current===0&&y.type!=="animationcancel"&&v.classList.remove(...b))};v.classList.add(...b),v.addEventListener("animationend",g),v.addEventListener("animationcancel",g)},[]),h.useEffect(()=>{let v=u.current,b=()=>{v.removeEventListener("animationend",b),r?Ju(v,a,i):a()};c||(l?b():(p.current=1,v.className+=` ${d}`,v.addEventListener("animationend",b)))},[c]),h.createElement(h.Fragment,null,o)}}function ls(e,t){return{content:us(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function us(e,t,n=!1){return h.isValidElement(e)&&!Wt(e.type)?h.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):_t(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function Zu({closeToast:e,theme:t,ariaLabel:n="close"}){return h.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:r=>{r.stopPropagation(),e(!0)},"aria-label":n},h.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},h.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function ec({delay:e,isRunning:t,closeToast:n,type:r="default",hide:i,className:o,controlledProgress:s,progress:l,rtl:a,isIn:u,theme:c}){let f=i||s&&l===0,m={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};s&&(m.transform=`scaleX(${l})`);let d=rt("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":a}),p=_t(o)?o({rtl:a,type:r,defaultClassName:d}):rt(d,o),v={[s&&l>=1?"onTransitionEnd":"onAnimationEnd"]:s&&l<1?null:()=>{u&&n()}};return h.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},h.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${r}`}),h.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:p,style:m,...v}))}var tc=1,cs=()=>`${tc++}`;function nc(e,t,n){let r=1,i=0,o=[],s=[],l=t,a=new Map,u=new Set,c=y=>(u.add(y),()=>u.delete(y)),f=()=>{s=Array.from(a.values()),u.forEach(y=>y())},m=({containerId:y,toastId:x,updateId:_})=>{let $=y?y!==e:e!==1,S=a.has(x)&&_==null;return $||S},d=(y,x)=>{a.forEach(_=>{var $;(x==null||x===_.props.toastId)&&(($=_.toggle)==null||$.call(_,y))})},p=y=>{var x,_;(_=(x=y.props)==null?void 0:x.onClose)==null||_.call(x,y.removalReason),y.isActive=!1},v=y=>{if(y==null)a.forEach(p);else{let x=a.get(y);x&&p(x)}f()},b=()=>{i-=o.length,o=[]},g=y=>{var x,_;let{toastId:$,updateId:S}=y.props,C=S==null;y.staleId&&a.delete(y.staleId),y.isActive=!0,a.set($,y),f(),n(ls(y,C?"added":"updated")),C&&((_=(x=y.props).onOpen)==null||_.call(x))};return{id:e,props:l,observe:c,toggle:d,removeToast:v,toasts:a,clearQueue:b,buildToast:(y,x)=>{if(m(x))return;let{toastId:_,updateId:$,data:S,staleId:C,delay:A}=x,L=$==null;L&&i++;let j={...l,style:l.toastStyle,key:r++,...Object.fromEntries(Object.entries(x).filter(([I,V])=>V!=null)),toastId:_,updateId:$,data:S,isIn:!1,className:ci(x.className||l.toastClassName),progressClassName:ci(x.progressClassName||l.progressClassName),autoClose:x.isLoading?!1:Xu(x.autoClose,l.autoClose),closeToast(I){a.get(_).removalReason=I,v(_)},deleteToast(){let I=a.get(_);if(I!=null){if(n(ls(I,"removed")),a.delete(_),i--,i<0&&(i=0),o.length>0){g(o.shift());return}f()}}};j.closeButton=l.closeButton,x.closeButton===!1||fi(x.closeButton)?j.closeButton=x.closeButton:x.closeButton===!0&&(j.closeButton=fi(l.closeButton)?l.closeButton:!0);let D={content:y,props:j,staleId:C};l.limit&&l.limit>0&&i>l.limit&&L?o.push(D):$n(A)?setTimeout(()=>{g(D)},A):g(D)},setProps(y){l=y},setToggle:(y,x)=>{let _=a.get(y);_&&(_.toggle=x)},isToastActive:y=>{var x;return(x=a.get(y))==null?void 0:x.isActive},getSnapshot:()=>s}}var Ue=new Map,On=[],di=new Set,rc=e=>di.forEach(t=>t(e)),fs=()=>Ue.size>0;function ic(){On.forEach(e=>ps(e.content,e.options)),On=[]}var oc=(e,{containerId:t})=>{var n;return(n=Ue.get(t||1))==null?void 0:n.toasts.get(e)};function ds(e,t){var n;if(t)return!!((n=Ue.get(t))!=null&&n.isToastActive(e));let r=!1;return Ue.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function sc(e){if(!fs()){On=On.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Gu(e))Ue.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ue.get(e.containerId);t?t.removeToast(e.id):Ue.forEach(n=>{n.removeToast(e.id)})}}var ac=(e={})=>{Ue.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function ps(e,t){fi(e)&&(fs()||On.push({content:e,options:t}),Ue.forEach(n=>{n.buildToast(e,t)}))}function lc(e){var t;(t=Ue.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function hs(e,t){Ue.forEach(n=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===n.id)&&n.toggle(e,t==null?void 0:t.id)})}function uc(e){let t=e.containerId||1;return{subscribe(n){let r=nc(t,e,rc);Ue.set(t,r);let i=r.observe(n);return ic(),()=>{i(),Ue.delete(t)}},setProps(n){var r;(r=Ue.get(t))==null||r.setProps(n)},getSnapshot(){var n;return(n=Ue.get(t))==null?void 0:n.getSnapshot()}}}function cc(e){return di.add(e),()=>{di.delete(e)}}function fc(e){return e&&(Wt(e.toastId)||$n(e.toastId))?e.toastId:cs()}function An(e,t){return ps(e,t),t.toastId}function hr(e,t){return{...t,type:t&&t.type||e,toastId:fc(t)}}function mr(e){return(t,n)=>An(t,hr(e,n))}function ae(e,t){return An(e,hr("default",t))}ae.loading=(e,t)=>An(e,hr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function dc(e,{pending:t,error:n,success:r},i){let o;t&&(o=Wt(t)?ae.loading(t,i):ae.loading(t.render,{...i,...t}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,c,f)=>{if(c==null){ae.dismiss(o);return}let m={type:u,...s,...i,data:f},d=Wt(c)?{render:c}:c;return o?ae.update(o,{...m,...d}):ae(d.render,{...m,...d}),f},a=_t(e)?e():e;return a.then(u=>l("success",r,u)).catch(u=>l("error",n,u)),a}ae.promise=dc,ae.success=mr("success"),ae.info=mr("info"),ae.error=mr("error"),ae.warning=mr("warning"),ae.warn=ae.warning,ae.dark=(e,t)=>An(e,hr("default",{theme:"dark",...t}));function pc(e){sc(e)}ae.dismiss=pc,ae.clearWaitingQueue=ac,ae.isActive=ds,ae.update=(e,t={})=>{let n=oc(e,t);if(n){let{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:cs()};o.toastId!==e&&(o.staleId=e);let s=o.render||i;delete o.render,An(s,o)}},ae.done=e=>{ae.update(e,{progress:1})},ae.onChange=cc,ae.play=e=>hs(!0,e),ae.pause=e=>hs(!1,e);function hc(e){var t;let{subscribe:n,getSnapshot:r,setProps:i}=h.useRef(uc(e)).current;i(e);let o=(t=h.useSyncExternalStore(n,r,r))==null?void 0:t.slice();function s(l){if(!o)return[];let a=new Map;return e.newestOnTop&&o.reverse(),o.forEach(u=>{let{position:c}=u.props;a.has(c)||a.set(c,[]),a.get(c).push(u)}),Array.from(a,u=>l(u[0],u[1]))}return{getToastToRender:s,isToastActive:ds,count:o==null?void 0:o.length}}function mc(e){let[t,n]=h.useState(!1),[r,i]=h.useState(!1),o=h.useRef(null),s=h.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:a,closeToast:u,onClick:c,closeOnClick:f}=e;lc({id:e.toastId,containerId:e.containerId,fn:n}),h.useEffect(()=>{if(e.pauseOnFocusLoss)return m(),()=>{d()}},[e.pauseOnFocusLoss]);function m(){document.hasFocus()||g(),window.addEventListener("focus",b),window.addEventListener("blur",g)}function d(){window.removeEventListener("focus",b),window.removeEventListener("blur",g)}function p(C){if(e.draggable===!0||e.draggable===C.pointerType){y();let A=o.current;s.canCloseOnClick=!0,s.canDrag=!0,A.style.transition="none",e.draggableDirection==="x"?(s.start=C.clientX,s.removalDistance=A.offsetWidth*(e.draggablePercent/100)):(s.start=C.clientY,s.removalDistance=A.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function v(C){let{top:A,bottom:L,left:j,right:D}=o.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=j&&C.clientX<=D&&C.clientY>=A&&C.clientY<=L?g():b()}function b(){n(!0)}function g(){n(!1)}function y(){s.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",$)}function x(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",$)}function _(C){let A=o.current;if(s.canDrag&&A){s.didMove=!0,t&&g(),e.draggableDirection==="x"?s.delta=C.clientX-s.start:s.delta=C.clientY-s.start,s.start!==C.clientX&&(s.canCloseOnClick=!1);let L=e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;A.style.transform=`translate3d(${L},0)`,A.style.opacity=`${1-Math.abs(s.delta/s.removalDistance)}`}}function $(){x();let C=o.current;if(s.canDrag&&s.didMove&&C){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){i(!0),e.closeToast(!0),e.collapseAll();return}C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}let S={onPointerDown:p,onPointerUp:v};return l&&a&&(S.onMouseEnter=g,e.stacked||(S.onMouseLeave=b)),f&&(S.onClick=C=>{c&&c(C),s.canCloseOnClick&&u(!0)}),{playToast:b,pauseToast:g,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:S}}var gc=typeof window<"u"?h.useLayoutEffect:h.useEffect,gr=({theme:e,type:t,isLoading:n,...r})=>h.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r});function yc(e){return h.createElement(gr,{...e},h.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function vc(e){return h.createElement(gr,{...e},h.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function bc(e){return h.createElement(gr,{...e},h.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function xc(e){return h.createElement(gr,{...e},h.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function wc(){return h.createElement("div",{className:"Toastify__spinner"})}var pi={info:vc,warning:yc,success:bc,error:xc,spinner:wc},Ec=e=>e in pi;function Tc({theme:e,type:t,isLoading:n,icon:r}){let i=null,o={theme:e,type:t};return r===!1||(_t(r)?i=r({...o,isLoading:n}):h.isValidElement(r)?i=h.cloneElement(r,o):n?i=pi.spinner():Ec(t)&&(i=pi[t](o))),i}var Sc=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:o}=mc(e),{closeButton:s,children:l,autoClose:a,onClick:u,type:c,hideProgressBar:f,closeToast:m,transition:d,position:p,className:v,style:b,progressClassName:g,updateId:y,role:x,progress:_,rtl:$,toastId:S,deleteToast:C,isIn:A,isLoading:L,closeOnClick:j,theme:D,ariaLabel:I}=e,V=rt("Toastify__toast",`Toastify__toast-theme--${D}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":$},{"Toastify__toast--close-on-click":j}),H=_t(v)?v({rtl:$,position:p,type:c,defaultClassName:V}):rt(V,v),Y=Tc(e),X=!!_||!a,G={closeToast:m,type:c,theme:D},z=null;return s===!1||(_t(s)?z=s(G):h.isValidElement(s)?z=h.cloneElement(s,G):z=Zu(G)),h.createElement(d,{isIn:A,done:C,position:p,preventExitTransition:n,nodeRef:r,playToast:o},h.createElement("div",{id:S,tabIndex:0,onClick:u,"data-in":A,className:H,...i,style:b,ref:r,...A&&{role:x,"aria-label":I}},Y!=null&&h.createElement("div",{className:rt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!L})},Y),us(l,e,!t),z,!e.customProgressBar&&h.createElement(ec,{...y&&!X?{key:`p-${y}`}:{},rtl:$,theme:D,delay:a,isRunning:t,isIn:A,closeToast:m,hide:f,type:c,className:g,controlledProgress:X,progress:_||0})))},_c=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),Cc=Qu(_c("bounce",!0)),Fc={position:"top-right",transition:Cc,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function kc(e){let t={...Fc,...e},n=e.stacked,[r,i]=h.useState(!0),o=h.useRef(null),{getToastToRender:s,isToastActive:l,count:a}=hc(t),{className:u,style:c,rtl:f,containerId:m,hotKeys:d}=t;function p(b){let g=rt("Toastify__toast-container",`Toastify__toast-container--${b}`,{"Toastify__toast-container--rtl":f});return _t(u)?u({position:b,rtl:f,defaultClassName:g}):rt(g,ci(u))}function v(){n&&(i(!0),ae.play())}return gc(()=>{var b;if(n){let g=o.current.querySelectorAll('[data-in="true"]'),y=12,x=(b=t.position)==null?void 0:b.includes("top"),_=0,$=0;Array.from(g).reverse().forEach((S,C)=>{let A=S;A.classList.add("Toastify__toast--stacked"),C>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=x?"top":"bot");let L=_*(r?.2:1)+(r?0:y*C);A.style.setProperty("--y",`${x?L:L*-1}px`),A.style.setProperty("--g",`${y}`),A.style.setProperty("--s",`${1-(r?$:0)}`),_+=A.offsetHeight,$+=.025})}},[r,a,n]),h.useEffect(()=>{function b(g){var y;let x=o.current;d(g)&&((y=x.querySelector('[tabIndex="0"]'))==null||y.focus(),i(!1),ae.pause()),g.key==="Escape"&&(document.activeElement===x||x!=null&&x.contains(document.activeElement))&&(i(!0),ae.play())}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[d]),h.createElement("section",{ref:o,className:"Toastify",id:m,onMouseEnter:()=>{n&&(i(!1),ae.pause())},onMouseLeave:v,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},s((b,g)=>{let y=g.length?{...c}:{...c,pointerEvents:"none"};return h.createElement("div",{tabIndex:-1,className:p(b),"data-stacked":n,style:y,key:`c-${b}`},g.map(({content:x,props:_})=>h.createElement(Sc,{..._,stacked:n,collapseAll:v,isIn:l(_.toastId,_.containerId),key:`t-${_.key}`},x)))}))}var Dn={},ms;function $c(){if(ms)return Dn;ms=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.parse=s,Dn.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function s(m,d){const p=new o,v=m.length;if(v<2)return p;const b=(d==null?void 0:d.decode)||c;let g=0;do{const y=m.indexOf("=",g);if(y===-1)break;const x=m.indexOf(";",g),_=x===-1?v:x;if(y>_){g=m.lastIndexOf(";",y-1)+1;continue}const $=l(m,g,y),S=a(m,y,$),C=m.slice($,S);if(p[C]===void 0){let A=l(m,y+1,_),L=a(m,_,A);const j=b(m.slice(A,L));p[C]=j}g=_+1}while(g<v);return p}function l(m,d,p){do{const v=m.charCodeAt(d);if(v!==32&&v!==9)return d}while(++d<p);return p}function a(m,d,p){for(;d>p;){const v=m.charCodeAt(--d);if(v!==32&&v!==9)return d+1}return p}function u(m,d,p){const v=(p==null?void 0:p.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const b=v(d);if(!t.test(b))throw new TypeError(`argument val is invalid: ${d}`);let g=m+"="+b;if(!p)return g;if(p.maxAge!==void 0){if(!Number.isInteger(p.maxAge))throw new TypeError(`option maxAge is invalid: ${p.maxAge}`);g+="; Max-Age="+p.maxAge}if(p.domain){if(!n.test(p.domain))throw new TypeError(`option domain is invalid: ${p.domain}`);g+="; Domain="+p.domain}if(p.path){if(!r.test(p.path))throw new TypeError(`option path is invalid: ${p.path}`);g+="; Path="+p.path}if(p.expires){if(!f(p.expires)||!Number.isFinite(p.expires.valueOf()))throw new TypeError(`option expires is invalid: ${p.expires}`);g+="; Expires="+p.expires.toUTCString()}if(p.httpOnly&&(g+="; HttpOnly"),p.secure&&(g+="; Secure"),p.partitioned&&(g+="; Partitioned"),p.priority)switch(typeof p.priority=="string"?p.priority.toLowerCase():void 0){case"low":g+="; Priority=Low";break;case"medium":g+="; Priority=Medium";break;case"high":g+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${p.priority}`)}if(p.sameSite)switch(typeof p.sameSite=="string"?p.sameSite.toLowerCase():p.sameSite){case!0:case"strict":g+="; SameSite=Strict";break;case"lax":g+="; SameSite=Lax";break;case"none":g+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${p.sameSite}`)}return g}function c(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function f(m){return i.call(m)==="[object Date]"}return Dn}$c();/**
|
|
32
|
+
* react-router v7.1.1
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Remix Software Inc.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
38
|
+
*
|
|
39
|
+
* @license MIT
|
|
40
|
+
*/function Le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function mi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function gs(e,t,n="/"){return Oc(e,t,n,!1)}function Oc(e,t,n,r){let i=typeof t=="string"?mi(t):t,o=Kt(i.pathname||"/",n);if(o==null)return null;let s=ys(e);Ac(s);let l=null;for(let a=0;l==null&&a<s.length;++a){let u=Uc(o);l=Rc(s[a],u,r)}return l}function ys(e,t=[],n=[],r=""){let i=(o,s,l)=>{let a={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};a.relativePath.startsWith("/")&&(Le(a.relativePath.startsWith(r),`Absolute route path "${a.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(r.length));let u=Ft([r,a.relativePath]),c=n.concat(a);o.children&&o.children.length>0&&(Le(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ys(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Mc(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let a of vs(o.path))i(o,s,a)}),t}function vs(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=vs(r.join("/")),l=[];return l.push(...s.map(a=>a===""?o:[o,a].join("/"))),i&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function Ac(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Vc(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Dc=/^:[\w-]+$/,Lc=3,Pc=2,jc=1,Nc=10,Ic=-2,bs=e=>e==="*";function Mc(e,t){let n=e.split("/"),r=n.length;return n.some(bs)&&(r+=Ic),t&&(r+=Pc),n.filter(i=>!bs(i)).reduce((i,o)=>i+(Dc.test(o)?Lc:o===""?jc:Nc),r)}function Vc(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Rc(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",s=[];for(let l=0;l<r.length;++l){let a=r[l],u=l===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",f=yr({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},c),m=a.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=yr({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},c)),!f)return null;Object.assign(i,f.params),s.push({params:i,pathname:Ft([o,f.pathname]),pathnameBase:Wc(Ft([o,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(o=Ft([o,f.pathnameBase]))}return s}function yr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Bc(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:f},m)=>{if(c==="*"){let p=l[m]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const d=l[m];return f&&!d?u[c]=void 0:u[c]=(d||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Bc(e,t=!1,n=!0){Ct(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Uc(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ct(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Kt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Hc(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?mi(e):e;return{pathname:n?n.startsWith("/")?n:qc(n,t):t,search:Kc(r),hash:Yc(i)}}function qc(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function gi(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zc(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function xs(e){let t=zc(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ws(e,t,n,r=!1){let i;typeof e=="string"?i=mi(e):(i={...e},Le(!i.pathname||!i.pathname.includes("?"),gi("?","pathname","search",i)),Le(!i.pathname||!i.pathname.includes("#"),gi("#","pathname","hash",i)),Le(!i.search||!i.search.includes("#"),gi("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}l=f>=0?t[f]:"/"}let a=Hc(i,l),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}var Ft=e=>e.join("/").replace(/\/\/+/g,"/"),Wc=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kc=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Yc=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Gc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Es=["POST","PUT","PATCH","DELETE"];new Set(Es);var Xc=["GET",...Es];new Set(Xc);var mn=k.createContext(null);mn.displayName="DataRouter";var vr=k.createContext(null);vr.displayName="DataRouterState";var Ts=k.createContext({isTransitioning:!1});Ts.displayName="ViewTransition";var Jc=k.createContext(new Map);Jc.displayName="Fetchers";var Qc=k.createContext(null);Qc.displayName="Await";var kt=k.createContext(null);kt.displayName="Navigation";var yi=k.createContext(null);yi.displayName="Location";var $t=k.createContext({outlet:null,matches:[],isDataRoute:!1});$t.displayName="Route";var vi=k.createContext(null);vi.displayName="RouteError";function Zc(e,{relative:t}={}){Le(br(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=k.useContext(kt),{hash:i,pathname:o,search:s}=Ln(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:Ft([n,o])),r.createHref({pathname:l,search:s,hash:i})}function br(){return k.useContext(yi)!=null}function Yt(){return Le(br(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(yi).location}var Ss="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _s(e){k.useContext(kt).static||k.useLayoutEffect(e)}function ef(){let{isDataRoute:e}=k.useContext($t);return e?hf():tf()}function tf(){Le(br(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(mn),{basename:t,navigator:n}=k.useContext(kt),{matches:r}=k.useContext($t),{pathname:i}=Yt(),o=JSON.stringify(xs(r)),s=k.useRef(!1);return _s(()=>{s.current=!0}),k.useCallback((a,u={})=>{if(Ct(s.current,Ss),!s.current)return;if(typeof a=="number"){n.go(a);return}let c=ws(a,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ft([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,o,i,e])}k.createContext(null);function Ln(e,{relative:t}={}){let{matches:n}=k.useContext($t),{pathname:r}=Yt(),i=JSON.stringify(xs(n));return k.useMemo(()=>ws(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function nf(e,t,n,r){Le(br(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=k.useContext(kt),{matches:o}=k.useContext($t),s=o[o.length-1],l=s?s.params:{},a=s?s.pathname:"/",u=s?s.pathnameBase:"/",c=s&&s.route;{let g=c&&c.path||"";Fs(a,!c||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
41
|
+
|
|
42
|
+
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let f=Yt(),m;m=f;let d=m.pathname||"/",p=d;if(u!=="/"){let g=u.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=gs(e,{pathname:p});return Ct(c||v!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),Ct(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),lf(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:Ft([u,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:Ft([u,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r)}function rf(){let e=pf(),t=Gc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,s)}var of=k.createElement(rf,null),sf=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?k.createElement($t.Provider,{value:this.props.routeContext},k.createElement(vi.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function af({routeContext:e,match:t,children:n}){let r=k.useContext(mn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement($t.Provider,{value:e},n)}function lf(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let a=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);Le(a>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,a+1))}let s=!1,l=-1;if(n)for(let a=0;a<i.length;a++){let u=i[a];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=a),u.route.id){let{loaderData:c,errors:f}=n,m=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||m){s=!0,l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((a,u,c)=>{let f,m=!1,d=null,p=null;n&&(f=o&&u.route.id?o[u.route.id]:void 0,d=u.route.errorElement||of,s&&(l<0&&c===0?(Fs("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,p=null):l===c&&(m=!0,p=u.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,c+1)),b=()=>{let g;return f?g=d:m?g=p:u.route.Component?g=k.createElement(u.route.Component,null):u.route.element?g=u.route.element:g=a,k.createElement(af,{match:u,routeContext:{outlet:a,matches:v,isDataRoute:n!=null},children:g})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?k.createElement(sf,{location:n.location,revalidation:n.revalidation,component:d,error:f,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}function bi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uf(e){let t=k.useContext(mn);return Le(t,bi(e)),t}function cf(e){let t=k.useContext(vr);return Le(t,bi(e)),t}function ff(e){let t=k.useContext($t);return Le(t,bi(e)),t}function xi(e){let t=ff(e),n=t.matches[t.matches.length-1];return Le(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function df(){return xi("useRouteId")}function pf(){var r;let e=k.useContext(vi),t=cf("useRouteError"),n=xi("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function hf(){let{router:e}=uf("useNavigate"),t=xi("useNavigate"),n=k.useRef(!1);return _s(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{Ct(n.current,Ss),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var Cs={};function Fs(e,t,n){!t&&!Cs[e]&&(Cs[e]=!0,Ct(!1,n))}k.memo(mf);function mf({routes:e,future:t,state:n}){return nf(e,void 0,n,t)}var xr="get",wr="application/x-www-form-urlencoded";function Er(e){return e!=null&&typeof e.tagName=="string"}function gf(e){return Er(e)&&e.tagName.toLowerCase()==="button"}function yf(e){return Er(e)&&e.tagName.toLowerCase()==="form"}function vf(e){return Er(e)&&e.tagName.toLowerCase()==="input"}function bf(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xf(e,t){return e.button===0&&(!t||t==="_self")&&!bf(e)}var Tr=null;function wf(){if(Tr===null)try{new FormData(document.createElement("form"),0),Tr=!1}catch{Tr=!0}return Tr}var Ef=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wi(e){return e!=null&&!Ef.has(e)?(Ct(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wr}"`),null):e}function Tf(e,t){let n,r,i,o,s;if(yf(e)){let l=e.getAttribute("action");r=l?Kt(l,t):null,n=e.getAttribute("method")||xr,i=wi(e.getAttribute("enctype"))||wr,o=new FormData(e)}else if(gf(e)||vf(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||l.getAttribute("action");if(r=a?Kt(a,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||xr,i=wi(e.getAttribute("formenctype"))||wi(l.getAttribute("enctype"))||wr,o=new FormData(l,e),!wf()){let{name:u,type:c,value:f}=e;if(c==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,f)}}else{if(Er(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=xr,r=null,i=wr,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:s}}function Ei(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Sf(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _f(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Cf(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let s=await Sf(o,n);return s.links?s.links():[]}return[]}));return Of(r.flat(1).filter(_f).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ks(e,t,n,r,i,o){let s=(a,u)=>n[u]?a.route.id!==n[u].route.id:!0,l=(a,u)=>{var c;return n[u].pathname!==a.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==a.params["*"]};return o==="assets"?t.filter((a,u)=>s(a,u)||l(a,u)):o==="data"?t.filter((a,u)=>{var f;let c=r.routes[a.route.id];if(!c||!c.hasLoader)return!1;if(s(a,u)||l(a,u))return!0;if(a.route.shouldRevalidate){let m=a.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function Ff(e,t){return kf(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function kf(e){return[...new Set(e)]}function $f(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Of(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify($f(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function Af(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function Df(){let e=k.useContext(mn);return Ei(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Lf(){let e=k.useContext(vr);return Ei(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ti=k.createContext(void 0);Ti.displayName="FrameworkContext";function $s(){let e=k.useContext(Ti);return Ei(e,"You must render this element inside a <HydratedRouter> element"),e}function Pf(e,t){let n=k.useContext(Ti),[r,i]=k.useState(!1),[o,s]=k.useState(!1),{onFocus:l,onBlur:a,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,m=k.useRef(null);k.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=g=>{g.forEach(y=>{s(y.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return m.current&&b.observe(m.current),()=>{b.disconnect()}}},[e]),k.useEffect(()=>{if(r){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[r]);let d=()=>{i(!0)},p=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,m,{}]:[o,m,{onFocus:Pn(l,d),onBlur:Pn(a,p),onMouseEnter:Pn(u,d),onMouseLeave:Pn(c,p),onTouchStart:Pn(f,d)}]:[!1,m,{}]}function Pn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function jf({page:e,...t}){let{router:n}=Df(),r=k.useMemo(()=>gs(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?k.createElement(If,{page:e,matches:r,...t}):null}function Nf(e){let{manifest:t,routeModules:n}=$s(),[r,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return Cf(e,t,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,t,n]),r}function If({page:e,matches:t,...n}){let r=Yt(),{manifest:i,routeModules:o}=$s(),{loaderData:s,matches:l}=Lf(),a=k.useMemo(()=>ks(e,t,l,i,r,"data"),[e,t,l,i,r]),u=k.useMemo(()=>ks(e,t,l,i,r,"assets"),[e,t,l,i,r]),c=k.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=new Set,p=!1;if(t.forEach(b=>{var y;let g=i.routes[b.route.id];!g||!g.hasLoader||(!a.some(x=>x.route.id===b.route.id)&&b.route.id in s&&((y=o[b.route.id])!=null&&y.shouldRevalidate)||g.hasClientLoader?p=!0:d.add(b.route.id))}),d.size===0)return[];let v=Af(e);return p&&d.size>0&&v.searchParams.set("_routes",t.filter(b=>d.has(b.route.id)).map(b=>b.route.id).join(",")),[v.pathname+v.search]},[s,r,i,a,t,e,o]),f=k.useMemo(()=>Ff(u,i),[u,i]),m=Nf(u);return k.createElement(k.Fragment,null,c.map(d=>k.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})),f.map(d=>k.createElement("link",{key:d,rel:"modulepreload",href:d,...n})),m.map(({key:d,link:p})=>k.createElement("link",{key:d,...p})))}function Mf(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Os&&(window.__reactRouterVersion="7.1.1")}catch{}var As=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Si=k.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:s,state:l,target:a,to:u,preventScrollReset:c,viewTransition:f,...m},d){let{basename:p}=k.useContext(kt),v=typeof u=="string"&&As.test(u),b,g=!1;if(typeof u=="string"&&v&&(b=u,Os))try{let L=new URL(window.location.href),j=u.startsWith("//")?new URL(L.protocol+u):new URL(u),D=Kt(j.pathname,p);j.origin===L.origin&&D!=null?u=D+j.search+j.hash:g=!0}catch{Ct(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=Zc(u,{relative:i}),[x,_,$]=Pf(r,m),S=Uf(u,{replace:s,state:l,target:a,preventScrollReset:c,relative:i,viewTransition:f});function C(L){t&&t(L),L.defaultPrevented||S(L)}let A=k.createElement("a",{...m,...$,href:b||y,onClick:g||o?t:C,ref:Mf(d,_),target:a,"data-discover":!v&&n==="render"?"true":void 0});return x&&!v?k.createElement(k.Fragment,null,A,k.createElement(jf,{page:y})):A});Si.displayName="Link";var Vf=k.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:s,viewTransition:l,children:a,...u},c){let f=Ln(s,{relative:u.relative}),m=Yt(),d=k.useContext(vr),{navigator:p,basename:v}=k.useContext(kt),b=d!=null&&Kf(f)&&l===!0,g=p.encodeLocation?p.encodeLocation(f).pathname:f.pathname,y=m.pathname,x=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;n||(y=y.toLowerCase(),x=x?x.toLowerCase():null,g=g.toLowerCase()),x&&v&&(x=Kt(x,v)||x);const _=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let $=y===g||!i&&y.startsWith(g)&&y.charAt(_)==="/",S=x!=null&&(x===g||!i&&x.startsWith(g)&&x.charAt(g.length)==="/"),C={isActive:$,isPending:S,isTransitioning:b},A=$?t:void 0,L;typeof r=="function"?L=r(C):L=[r,$?"active":null,S?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let j=typeof o=="function"?o(C):o;return k.createElement(Si,{...u,"aria-current":A,className:L,ref:c,style:j,to:s,viewTransition:l},typeof a=="function"?a(C):a)});Vf.displayName="NavLink";var Rf=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=xr,action:l,onSubmit:a,relative:u,preventScrollReset:c,viewTransition:f,...m},d)=>{let p=zf(),v=Wf(l,{relative:u}),b=s.toLowerCase()==="get"?"get":"post",g=typeof l=="string"&&As.test(l),y=x=>{if(a&&a(x),x.defaultPrevented)return;x.preventDefault();let _=x.nativeEvent.submitter,$=(_==null?void 0:_.getAttribute("formmethod"))||s;p(_||x.currentTarget,{fetcherKey:t,method:$,navigate:n,replace:i,state:o,relative:u,preventScrollReset:c,viewTransition:f})};return k.createElement("form",{ref:d,method:b,action:v,onSubmit:r?a:y,...m,"data-discover":!g&&e==="render"?"true":void 0})});Rf.displayName="Form";function Bf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ds(e){let t=k.useContext(mn);return Le(t,Bf(e)),t}function Uf(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:s}={}){let l=ef(),a=Yt(),u=Ln(e,{relative:o});return k.useCallback(c=>{if(xf(c,t)){c.preventDefault();let f=n!==void 0?n:hi(a)===hi(u);l(e,{replace:f,state:r,preventScrollReset:i,relative:o,viewTransition:s})}},[a,l,u,n,r,t,e,i,o,s])}var Hf=0,qf=()=>`__${String(++Hf)}__`;function zf(){let{router:e}=Ds("useSubmit"),{basename:t}=k.useContext(kt),n=df();return k.useCallback(async(r,i={})=>{let{action:o,method:s,encType:l,formData:a,body:u}=Tf(r,t);if(i.navigate===!1){let c=i.fetcherKey||qf();await e.fetch(c,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:a,body:u,formMethod:i.method||s,formEncType:i.encType||l,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:a,body:u,formMethod:i.method||s,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function Wf(e,{relative:t}={}){let{basename:n}=k.useContext(kt),r=k.useContext($t);Le(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Ln(e||".",{relative:t})},s=Yt();if(e==null){o.search=s.search;let l=new URLSearchParams(o.search),a=l.getAll("index");if(a.some(c=>c==="")){l.delete("index"),a.filter(f=>f).forEach(f=>l.append("index",f));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ft([n,o.pathname])),hi(o)}function Kf(e,t={}){let n=k.useContext(Ts);Le(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ds("useViewTransitionState"),i=Ln(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Kt(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Kt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return yr(i.pathname,s)!=null||yr(i.pathname,o)!=null}new TextEncoder;const Ls=Object.freeze({left:0,top:0,width:16,height:16}),Sr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_i=Object.freeze({...Ls,...Sr}),Ci=Object.freeze({..._i,body:"",hidden:!1});function Yf(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Ps(e,t){const n=Yf(e,t);for(const r in Ci)r in Sr?r in e&&!(r in n)&&(n[r]=Sr[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Gf(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const l=r[s]&&r[s].parent,a=l&&o(l);a&&(i[s]=[l].concat(a))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function Xf(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function s(l){o=Ps(r[l]||i[l],o)}return s(t),n.forEach(s),Ps(e,o)}function js(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Gf(e);for(const i in r){const o=r[i];o&&(t(i,Xf(e,i,o)),n.push(i))}return n}const Jf={provider:"",aliases:{},not_found:{},...Ls};function Fi(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ns(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Fi(e,Jf))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!Fi(o,Ci))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i||typeof s!="string"||!n[s]&&!r[s]||!Fi(o,Ci))return null}return t}const Is=/^[a-z0-9]+(-[a-z0-9]+)*$/,_r=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),a=i.pop(),u={provider:i.length>0?i[0]:r,prefix:a,name:l};return t&&!Cr(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const l={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!Cr(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:o};return t&&!Cr(l,n)?null:l}return null},Cr=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Ms=Object.create(null);function Qf(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Gt(e,t){const n=Ms[e]||(Ms[e]=Object.create(null));return n[t]||(n[t]=Qf(e,t))}function ki(e,t){return Ns(t)?js(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Zf(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let jn=!1;function Vs(e){return typeof e=="boolean"&&(jn=e),jn}function Rs(e){const t=typeof e=="string"?_r(e,!0,jn):e;if(t){const n=Gt(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function ed(e,t){const n=_r(e,!0,jn);if(!n)return!1;const r=Gt(n.provider,n.prefix);return t?Zf(r,n.name,t):(r.missing.add(n.name),!0)}function td(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),jn&&!t&&!e.prefix){let i=!1;return Ns(e)&&(e.prefix="",js(e,(o,s)=>{ed(o,s)&&(i=!0)})),i}const n=e.prefix;if(!Cr({provider:t,prefix:n,name:"a"}))return!1;const r=Gt(t,n);return!!ki(r,e)}const Bs=Object.freeze({width:null,height:null}),Us=Object.freeze({...Bs,...Sr}),nd=/(-?[0-9.]*[0-9]+[0-9.]*)/g,rd=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Hs(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(nd);if(r===null||!r.length)return e;const i=[];let o=r.shift(),s=rd.test(o);for(;;){if(s){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function id(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("</"+t);if(i===-1||o===-1)break;const s=e.indexOf(">",o);if(s===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:n,content:e}}function od(e,t){return e?"<defs>"+e+"</defs>"+t:t}function sd(e,t,n){const r=id(e);return od(r.defs,t+r.content+n)}const ad=e=>e==="unset"||e==="undefined"||e==="none";function ld(e,t){const n={..._i,...e},r={...Us,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],g=v.hFlip,y=v.vFlip;let x=v.rotate;g?y?x+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):y&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let _;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:_=i.height/2+i.top,b.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:_=i.width/2+i.left,b.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}x%2===1&&(i.left!==i.top&&(_=i.left,i.left=i.top,i.top=_),i.width!==i.height&&(_=i.width,i.width=i.height,i.height=_)),b.length&&(o=sd(o,'<g transform="'+b.join(" ")+'">',"</g>"))});const s=r.width,l=r.height,a=i.width,u=i.height;let c,f;s===null?(f=l===null?"1em":l==="auto"?u:l,c=Hs(f,a/u)):(c=s==="auto"?a:s,f=l===null?Hs(c,u/a):l==="auto"?u:l);const m={},d=(v,b)=>{ad(b)||(m[v]=b.toString())};d("width",c),d("height",f);const p=[i.left,i.top,a,u];return m.viewBox=p.join(" "),{attributes:m,viewBox:p,body:o}}const ud=/\sid="(\S+)"/g,cd="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let fd=0;function dd(e,t=cd){const n=[];let r;for(;r=ud.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof t=="function"?t(o):t+(fd++).toString(),l=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const $i=Object.create(null);function pd(e,t){$i[e]=t}function Oi(e){return $i[e]||$i[""]}function Ai(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Di=Object.create(null),Nn=["https://api.simplesvg.com","https://api.unisvg.com"],Fr=[];for(;Nn.length>0;)Nn.length===1||Math.random()>.5?Fr.push(Nn.shift()):Fr.push(Nn.pop());Di[""]=Ai({resources:["https://api.iconify.design"].concat(Fr)});function hd(e,t){const n=Ai(t);return n===null?!1:(Di[e]=n,!0)}function Li(e){return Di[e]}let qs=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function md(e,t){const n=Li(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function gd(e){return e===404}const yd=(e,t,n)=>{const r=[],i=md(e,t),o="icons";let s={type:o,provider:e,prefix:t,icons:[]},l=0;return n.forEach((a,u)=>{l+=a.length+1,l>=i&&u>0&&(r.push(s),s={type:o,provider:e,prefix:t,icons:[]},l=a.length),s.icons.push(a)}),r.push(s),r};function vd(e){if(typeof e=="string"){const t=Li(e);if(t)return t.path}return"/"}const bd={prepare:yd,send:(e,t,n)=>{if(!qs){n("abort",424);return}let r=vd(t.provider);switch(t.type){case"icons":{const o=t.prefix,l=t.icons.join(","),a=new URLSearchParams({icons:l});r+=o+".json?"+a.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;qs(e+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(gd(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})}};function xd(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,l=i.name,a=n[o]||(n[o]=Object.create(null)),u=a[s]||(a[s]=Gt(o,s));let c;l in u.icons?c=t.loaded:s===""||u.missing.has(l)?c=t.missing:c=t.pending;const f={provider:o,prefix:s,name:l};c.push(f)}),t}function zs(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function wd(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const s=o.icons,l=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==i)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==l&&(n||zs([e],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let Ed=0;function Td(e,t,n){const r=Ed++,i=zs.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function Sd(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?_r(i,t,n):i;o&&r.push(o)}),r}var _d={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Cd(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const C=Math.floor(Math.random()*S.length);s.push(S[C]),S=S.slice(0,C).concat(S.slice(C+1))}s=s.concat(S)}else s=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let a="pending",u=0,c,f=null,m=[],d=[];typeof r=="function"&&d.push(r);function p(){f&&(clearTimeout(f),f=null)}function v(){a==="pending"&&(a="aborted"),p(),m.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),m=[]}function b(S,C){C&&(d=[]),typeof S=="function"&&d.push(S)}function g(){return{startTime:l,payload:t,status:a,queriesSent:u,queriesPending:m.length,subscribe:b,abort:v}}function y(){a="failed",d.forEach(S=>{S(void 0,c)})}function x(){m.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),m=[]}function _(S,C,A){const L=C!=="success";switch(m=m.filter(j=>j!==S),a){case"pending":break;case"failed":if(L||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=A,y();return}if(L){c=A,m.length||(s.length?$():y());return}if(p(),x(),!e.random){const j=e.resources.indexOf(S.resource);j!==-1&&j!==e.index&&(e.index=j)}a="completed",d.forEach(j=>{j(A)})}function $(){if(a!=="pending")return;p();const S=s.shift();if(S===void 0){if(m.length){f=setTimeout(()=>{p(),a==="pending"&&(x(),y())},e.timeout);return}y();return}const C={status:"pending",resource:S,callback:(A,L)=>{_(C,A,L)}};m.push(C),u++,f=setTimeout($,e.rotate),n(S,t,C.callback)}return setTimeout($),g}function Ws(e){const t={..._d,...e};let n=[];function r(){n=n.filter(l=>l().status==="pending")}function i(l,a,u){const c=Cd(t,l,a,(f,m)=>{r(),u&&u(f,m)});return n.push(c),c}function o(l){return n.find(a=>l(a))||null}return{query:i,find:o,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:r}}function Ks(){}const Pi=Object.create(null);function Fd(e){if(!Pi[e]){const t=Li(e);if(!t)return;const n=Ws(t),r={config:t,redundancy:n};Pi[e]=r}return Pi[e]}function kd(e,t,n){let r,i;if(typeof e=="string"){const o=Oi(e);if(!o)return n(void 0,424),Ks;i=o.send;const s=Fd(e);s&&(r=s.redundancy)}else{const o=Ai(e);if(o){r=Ws(o);const s=e.resources?e.resources[0]:"",l=Oi(s);l&&(i=l.send)}}return!r||!i?(n(void 0,424),Ks):r.query(t,i,n)().abort}const Ys="iconify2",In="iconify",Gs=In+"-count",Xs=In+"-version",Js=36e5,$d=168,Od=50;function ji(e,t){try{return e.getItem(t)}catch{}}function Ni(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Qs(e,t){try{e.removeItem(t)}catch{}}function Ii(e,t){return Ni(e,Gs,t.toString())}function Mi(e){return parseInt(ji(e,Gs))||0}const kr={local:!0,session:!0},Zs={local:new Set,session:new Set};let Vi=!1;function Ad(e){Vi=e}let $r=typeof window>"u"?{}:window;function ea(e){const t=e+"Storage";try{if($r&&$r[t]&&typeof $r[t].length=="number")return $r[t]}catch{}kr[e]=!1}function ta(e,t){const n=ea(e);if(!n)return;const r=ji(n,Xs);if(r!==Ys){if(r){const l=Mi(n);for(let a=0;a<l;a++)Qs(n,In+a.toString())}Ni(n,Xs,Ys),Ii(n,0);return}const i=Math.floor(Date.now()/Js)-$d,o=l=>{const a=In+l.toString(),u=ji(n,a);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,l))return!0}catch{}Qs(n,a)}};let s=Mi(n);for(let l=s-1;l>=0;l--)o(l)||(l===s-1?(s--,Ii(n,s)):Zs[e].add(l))}function na(){if(!Vi){Ad(!0);for(const e in kr)ta(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=Gt(r,i);if(!ki(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function Dd(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in kr)ta(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function Ld(e,t){Vi||na();function n(r){let i;if(!kr[r]||!(i=ea(r)))return;const o=Zs[r];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=Mi(i),s>=Od||!Ii(i,s+1))return;const l={cached:Math.floor(Date.now()/Js),provider:e.provider,data:t};return Ni(i,In+s.toString(),JSON.stringify(l))}t.lastModified&&!Dd(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function ra(){}function Pd(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,wd(e)}))}function jd(e){const t=[],n=[];return e.forEach(r=>{(r.match(Is)?t:n).push(r)}),{valid:t,invalid:n}}function Mn(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(s=>{o&&o.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!ki(e,n).length){i();return}r&&Ld(e,n)}catch(o){console.error(o)}i(),Pd(e)}function ia(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function Nd(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){ia(e.loadIcons(i,r,n),c=>{Mn(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);ia(f,m=>{const d=m?{prefix:r,icons:{[c]:m}}:null;Mn(e,[c],d,!1)})});return}const{valid:s,invalid:l}=jd(i);if(l.length&&Mn(e,l,null,!1),!s.length)return;const a=r.match(Is)?Oi(n):null;if(!a){Mn(e,s,null,!1);return}a.prepare(n,r,s).forEach(c=>{kd(n,c,f=>{Mn(e,c.icons,f,!0)})})}))}const Id=(e,t)=>{const n=Sd(e,!0,Vs()),r=xd(n);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,ra)}),()=>{a=!1}}const i=Object.create(null),o=[];let s,l;return r.pending.forEach(a=>{const{provider:u,prefix:c}=a;if(c===l&&u===s)return;s=u,l=c,o.push(Gt(u,c));const f=i[u]||(i[u]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:c,name:f}=a,m=Gt(u,c),d=m.pendingIcons||(m.pendingIcons=new Set);d.has(f)||(d.add(f),i[u][c].push(f))}),o.forEach(a=>{const u=i[a.provider][a.prefix];u.length&&Nd(a,u)}),t?Td(t,r,o):ra};function Md(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in Bs?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const Vd=/[\s,]+/;function Rd(e,t){t.split(Vd).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Bd(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function Ud(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Hd(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function qd(e){return"data:image/svg+xml,"+Hd(e)}function zd(e){return'url("'+qd(e)+'")'}let Vn;function Wd(){try{Vn=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Vn=null}}function Kd(e){return Vn===void 0&&Wd(),Vn?Vn.createHTML(e):e}const oa={...Us,inline:!1},Yd={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Gd={display:"inline-block"},Ri={backgroundColor:"currentColor"},sa={backgroundColor:"transparent"},aa={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},la={WebkitMask:Ri,mask:Ri,background:sa};for(const e in la){const t=la[e];for(const n in aa)t[e+n]=aa[n]}const Xd={...oa,inline:!0};function ua(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Jd=(e,t,n)=>{const r=t.inline?Xd:oa,i=Md(r,t),o=t.mode||"svg",s={},l=t.style||{},a={...o==="svg"?Yd:{}};if(n){const b=_r(n,!1,!0);if(b){const g=["iconify"],y=["provider","prefix"];for(const x of y)b[x]&&g.push("iconify--"+b[x]);a.className=g.join(" ")}}for(let b in t){const g=t[b];if(g!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":a.ref=g;break;case"className":a[b]=(a[b]?a[b]+" ":"")+g;break;case"inline":case"hFlip":case"vFlip":i[b]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&Rd(i,g);break;case"color":s.color=g;break;case"rotate":typeof g=="string"?i[b]=Bd(g):typeof g=="number"&&(i[b]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete a["aria-hidden"];break;default:r[b]===void 0&&(a[b]=g)}}const u=ld(e,i),c=u.attributes;if(i.inline&&(s.verticalAlign="-0.125em"),o==="svg"){a.style={...s,...l},Object.assign(a,c);let b=0,g=t.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Kd(dd(u.body,g?()=>g+"ID"+b++:"iconifyReact"))},h.createElement("svg",a)}const{body:f,width:m,height:d}=e,p=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=Ud(f,{...c,width:m+"",height:d+""});return a.style={...s,"--svg":zd(v),width:ua(c.width),height:ua(c.height),...Gd,...p?Ri:sa,...l},h.createElement("span",a)};if(Vs(!0),pd("",bd),typeof document<"u"&&typeof window<"u"){na();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!td(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;hd(n,i)||console.error(r)}catch{console.error(r)}}}}function ca(e){const[t,n]=h.useState(!!e.ssr),[r,i]=h.useState({});function o(d){if(d){const p=e.icon;if(typeof p=="object")return{name:"",data:p};const v=Rs(p);if(v)return{name:p,data:v}}return{name:""}}const[s,l]=h.useState(o(!!e.ssr));function a(){const d=r.callback;d&&(d(),i({}))}function u(d){if(JSON.stringify(s)!==JSON.stringify(d))return a(),l(d),!0}function c(){var d;const p=e.icon;if(typeof p=="object"){u({name:"",data:p});return}const v=Rs(p);if(u({name:p,data:v}))if(v===void 0){const b=Id([p],c);i({callback:b})}else v&&((d=e.onLoad)===null||d===void 0||d.call(e,p))}h.useEffect(()=>(n(!0),a),[]),h.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:m}=s;return m?Jd({..._i,...m},e,f):e.children?e.children:h.createElement("span",{})}const Qd=h.forwardRef((e,t)=>ca({...e,_ref:t}));h.forwardRef((e,t)=>ca({inline:!0,...e,_ref:t}));function He({icon:e,iconClass:t}){return w.jsx(w.Fragment,{children:w.jsx(Qd,{icon:e,className:t})})}const Rn=({text:e="",isDisabled:t=!1,isLoading:n=!1,btnClass:r="bg-primary-500 text-white",icon:i="",iconPosition:o="left",iconClass:s="text-[20px]",loadingClass:l="",link:a="",div:u=!1,type:c="button",onClick:f})=>{const m=`
|
|
43
|
+
btn inline-flex justify-center
|
|
44
|
+
${n?" pointer-events-none":""}
|
|
45
|
+
${t?" opacity-40 cursor-not-allowed":""}
|
|
46
|
+
${r}
|
|
47
|
+
`,d=()=>n?w.jsxs(w.Fragment,{children:[w.jsxs("svg",{className:`animate-spin -ml-1 mr-3 h-5 w-5 ${l}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[w.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),w.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):w.jsxs("span",{className:"flex items-center",children:[i&&o==="left"&&w.jsx("span",{className:`mr-2 ${s}`,children:w.jsx(He,{icon:i})}),e&&w.jsx("span",{children:e}),i&&o==="right"&&w.jsx("span",{className:`ml-2 ${s}`,children:w.jsx(He,{icon:i})})]});return u?w.jsx("div",{className:m,children:d()}):a?w.jsx(Si,{to:a,className:m,children:d()}):w.jsx("button",{disabled:t,type:c,className:m,"data-testid":"btn",onClick:f,children:d()})},Pe=[];for(let e=0;e<256;++e)Pe.push((e+256).toString(16).slice(1));function Zd(e,t=0){return(Pe[e[t+0]]+Pe[e[t+1]]+Pe[e[t+2]]+Pe[e[t+3]]+"-"+Pe[e[t+4]]+Pe[e[t+5]]+"-"+Pe[e[t+6]]+Pe[e[t+7]]+"-"+Pe[e[t+8]]+Pe[e[t+9]]+"-"+Pe[e[t+10]]+Pe[e[t+11]]+Pe[e[t+12]]+Pe[e[t+13]]+Pe[e[t+14]]+Pe[e[t+15]]).toLowerCase()}let Bi;const ep=new Uint8Array(16);function tp(){if(!Bi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bi=crypto.getRandomValues.bind(crypto)}return Bi(ep)}const fa={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Or(e,t,n){if(fa.randomUUID&&!t&&!e)return fa.randomUUID();e=e||{};const r=e.random||(e.rng||tp)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Zd(r)}const Ot=h.createContext(void 0),da={title:"Section title",description:"",id:Or(),questionData:[]},np=({children:e})=>{const[t,n]=h.useState({}),[r,i]=h.useState([da]),[o,s]=h.useState(!1),l=()=>{},a=()=>{i([...r,{...da,id:Or()}])},u=b=>{i(r.filter(g=>g.id!==b))},c=(b,g)=>{i(y=>y.map(x=>x.id===g?{...x,questionData:x.questionData.filter(_=>_.id!==b)}:x))},f=(b,g)=>{i(y=>y.map(x=>x.id===g?{...x,questionData:b}:x))},m=(b,g)=>{i(y=>y.map(x=>x.id===g?{...x,questionData:[...x.questionData,b]}:x))},d=(b,g)=>{i(y=>y.map(x=>x.id===g?{...x,questionData:x.questionData.map(_=>_.id===b.id?{..._,...b}:_)}:x))},p=(b,g)=>{i(y=>y.map(x=>x.id===g?{...x,...b}:x))},v=h.useMemo(()=>({formData:r,setFormData:i,handleDragStop:l,removeElement:c,elementData:t,setElementData:n,updateElementPosition:f,addElement:m,updateElement:d,addSection:a,removeSection:u,updateSection:p,isDragging:o,setIsDragging:s}),[r,l,c,t,f,m,d,a,u,p,o]);return w.jsx(Ot.Provider,{value:v,children:e})};function rp(){const{formData:e}=h.useContext(Ot);function t(){console.log("🚀 ~ BottomBar ~ formData:",e),localStorage.setItem("formData",JSON.stringify(e)),ae.success("Saved successfully")}return w.jsx("div",{className:"px-[30px] py-8 flex justify-end items-center",children:w.jsx(Rn,{onClick:()=>t(),text:"Save Form",btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})})}function pa({element:e,validationData:t}){const{register:n=()=>({})}=t||{};return w.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...n(e.id)})}function Ar({element:e,validationData:t}){console.log("element",e);const{register:n=()=>({})}=t||{};return w.jsx("div",{children:w.jsx("input",{placeholder:(e==null?void 0:e.placeholder)||"",type:(e==null?void 0:e.inputType)||"text",className:"input-control",...n(e==null?void 0:e.id)})})}function ha({element:e,validationData:t}){return w.jsx("div",{children:"MultiSelectInput"})}function ma({element:e,validationData:t}){const{register:n=()=>({})}=t||{};return w.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...n(e.id)})}var le=function(){return le=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},le.apply(this,arguments)};function ip(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Qe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var gt=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},op={k:1e3,m:1e6,b:1e9},sp=function(e,t){t===void 0&&(t=".");var n=new RegExp("(\\d+(".concat(gt(t),"\\d*)?)([kmb])$"),"i"),r=e.match(n);if(r){var i=r[1],o=r[3],s=op[o.toLowerCase()];return Number(i.replace(t,"."))*s}},ap=function(e,t){t===void 0&&(t=",");var n=new RegExp(gt(t),"g");return e.replace(n,"")},lp=function(e,t){var n=gt(t.join("")),r=new RegExp("[^\\d".concat(n,"]"),"gi");return e.replace(r,"")},Ui=function(e){var t=e.value,n=e.groupSeparator,r=n===void 0?",":n,i=e.decimalSeparator,o=i===void 0?".":i,s=e.allowDecimals,l=s===void 0?!0:s,a=e.decimalsLimit,u=a===void 0?2:a,c=e.allowNegativeValue,f=c===void 0?!0:c,m=e.disableAbbreviations,d=m===void 0?!1:m,p=e.prefix,v=p===void 0?"":p,b=e.transformRawValue,g=b===void 0?function(ee){return ee}:b,y=g(t);if(y==="-")return y;var x=d?[]:["k","m","b"],_=new RegExp("((^|\\D)-\\d)|(-".concat(gt(v),")")),$=_.test(y),S=RegExp("(\\d+)-?".concat(gt(v))).exec(t)||[],C=S[0],A=S[1],L=v?C?y.replace(C,"").concat(A):y.replace(v,""):y,j=ap(L,r),D=lp(j,Qe([r,o],x,!0)),I=D;if(!d){if(x.some(function(ee){return ee===D.toLowerCase().replace(o,"")}))return"";var V=sp(D,o);V&&(I=String(V))}var H=$&&f?"-":"";if(o&&I.includes(o)){var Y=D.split(o),X=Y[0],G=Y[1],z=u&&G?G.slice(0,u):G,Q=l?"".concat(o).concat(z):"";return"".concat(H).concat(X).concat(Q)}return"".concat(H).concat(I)},up=function(e,t,n){if(n!==void 0&&e.length>1){if(n===0)return e.replace(t,"");if(e.includes(t)){var r=e.split(t),i=r[0],o=r[1];if(o.length===n)return e;if(o.length>n)return"".concat(i).concat(t).concat(o.slice(0,n))}var s=e.length>n?new RegExp("(\\d+)(\\d{".concat(n,"})")):new RegExp("(\\d)(\\d+)"),l=e.match(s);if(l){var i=l[1],o=l[2];return"".concat(i).concat(t).concat(o)}}return e},ga=function(e,t){var n=t.groupSeparator,r=n===void 0?",":n,i=t.decimalSeparator,o=i===void 0?".":i,s=new RegExp("\\d([^".concat(gt(r)).concat(gt(o),"0-9]+)")),l=e.match(s);return l?l[1]:void 0},Bn=function(e){var t=e.value,n=e.decimalSeparator,r=e.intlConfig,i=e.decimalScale,o=e.prefix,s=o===void 0?"":o,l=e.suffix,a=l===void 0?"":l;if(t===""||t===void 0)return"";if(t==="-")return"-";var u=new RegExp("^\\d?-".concat(s?"".concat(gt(s),"?"):"","\\d")).test(t),c=n!=="."?cp(t,n,u):t;n&&n!=="-"&&c.startsWith(n)&&(c="0"+c);var f={minimumFractionDigits:i||0,maximumFractionDigits:20},m=r?new Intl.NumberFormat(r.locale,r.currency?le(le({},f),{style:"currency",currency:r.currency}):f):new Intl.NumberFormat(void 0,f),d=m.formatToParts(Number(c)),p=fp(d,e),v=ga(p,le({},e)),b=t.slice(-1)===n?n:"",g=c.match(RegExp("\\d+\\.(\\d+)"))||[],y=g[1];return i===void 0&&y&&n&&(p.includes(n)?p=p.replace(RegExp("(\\d+)(".concat(gt(n),")(\\d+)"),"g"),"$1$2".concat(y)):v&&!a?p=p.replace(v,"".concat(n).concat(y).concat(v)):p="".concat(p).concat(n).concat(y)),a&&b?"".concat(p).concat(b).concat(a):v&&b?p.replace(v,"".concat(b).concat(v)):v&&a?p.replace(v,"".concat(b).concat(a)):[p,b,a].join("")},cp=function(e,t,n){var r=e;return t&&t!=="."&&(r=r.replace(RegExp(gt(t),"g"),"."),n&&t==="-"&&(r="-".concat(r.slice(1)))),r},fp=function(e,t){var n=t.prefix,r=t.groupSeparator,i=t.decimalSeparator,o=t.decimalScale,s=t.disableGroupSeparators,l=s===void 0?!1:s;return e.reduce(function(a,u,c){var f=u.type,m=u.value;return c===0&&n?f==="minusSign"?[m,n]:f==="currency"?Qe(Qe([],a,!0),[n],!1):[n,m]:f==="currency"?n?a:Qe(Qe([],a,!0),[m],!1):f==="group"?l?a:Qe(Qe([],a,!0),[r!==void 0?r:m],!1):f==="decimal"?o!==void 0&&o===0?a:Qe(Qe([],a,!0),[i!==void 0?i:m],!1):f==="fraction"?Qe(Qe([],a,!0),[o!==void 0?m.slice(0,o):m],!1):Qe(Qe([],a,!0),[m],!1)},[""]).join("")},dp={currencySymbol:"",groupSeparator:"",decimalSeparator:"",prefix:"",suffix:""},pp=function(e){var t=e||{},n=t.locale,r=t.currency,i=n?new Intl.NumberFormat(n,r?{currency:r,style:"currency"}:void 0):new Intl.NumberFormat;return i.formatToParts(1000.1).reduce(function(o,s,l){return s.type==="currency"?l===0?le(le({},o),{currencySymbol:s.value,prefix:s.value}):le(le({},o),{currencySymbol:s.value,suffix:s.value}):s.type==="group"?le(le({},o),{groupSeparator:s.value}):s.type==="decimal"?le(le({},o),{decimalSeparator:s.value}):o},dp)},ya=function(e){return RegExp(/\d/,"gi").test(e)},hp=function(e,t,n){if(t===void 0&&(t="."),n===void 0||e===""||e===void 0)return e;if(!e.match(/\d/g))return"";var r=e.split(t),i=r[0],o=r[1];if(n===0)return i;var s=o||"";if(s.length<n)for(;s.length<n;)s+="0";else s=s.slice(0,n);return"".concat(i).concat(t).concat(s)},mp=function(e){var t=e.selectionStart,n=e.value,r=e.lastKeyStroke,i=e.stateValue,o=e.groupSeparator,s=t,l=n;if(i&&s){var a=n.split("");return r==="Backspace"&&i[s]===o&&(a.splice(s-1,1),s-=1),r==="Delete"&&i[s]===o&&(a.splice(s,1),s+=1),l=a.join(""),{modifiedValue:l,cursorPosition:s}}return{modifiedValue:l,cursorPosition:t}},va=h.forwardRef(function(e,t){var n=e.allowDecimals,r=n===void 0?!0:n,i=e.allowNegativeValue,o=i===void 0?!0:i,s=e.id,l=e.name,a=e.className,u=e.customInput,c=e.decimalsLimit,f=e.defaultValue,m=e.disabled,d=m===void 0?!1:m,p=e.maxLength,v=e.value,b=e.onValueChange,g=e.fixedDecimalLength,y=e.placeholder,x=e.decimalScale,_=e.prefix,$=e.suffix,S=e.intlConfig,C=e.step,A=e.min,L=e.max,j=e.disableGroupSeparators,D=j===void 0?!1:j,I=e.disableAbbreviations,V=I===void 0?!1:I,H=e.decimalSeparator,Y=e.groupSeparator,X=e.onChange,G=e.onFocus,z=e.onBlur,Q=e.onKeyDown,ee=e.onKeyUp,Fe=e.transformRawValue,Ae=e.formatValueOnBlur,q=Ae===void 0?!0:Ae,ge=ip(e,["allowDecimals","allowNegativeValue","id","name","className","customInput","decimalsLimit","defaultValue","disabled","maxLength","value","onValueChange","fixedDecimalLength","placeholder","decimalScale","prefix","suffix","intlConfig","step","min","max","disableGroupSeparators","disableAbbreviations","decimalSeparator","groupSeparator","onChange","onFocus","onBlur","onKeyDown","onKeyUp","transformRawValue","formatValueOnBlur"]);if(H&&ya(H))throw new Error("decimalSeparator cannot be a number");if(Y&&ya(Y))throw new Error("groupSeparator cannot be a number");var be=h.useMemo(function(){return pp(S)},[S]),oe=H||be.decimalSeparator||"",ke=Y||be.groupSeparator||"";if(oe&&ke&&oe===ke&&D===!1)throw new Error("decimalSeparator cannot be the same as groupSeparator");var xe={decimalSeparator:oe,groupSeparator:ke,disableGroupSeparators:D,intlConfig:S,prefix:_||be.prefix,suffix:$},De={decimalSeparator:oe,groupSeparator:ke,allowDecimals:r,decimalsLimit:c||g||2,allowNegativeValue:o,disableAbbreviations:V,prefix:_||be.prefix,transformRawValue:Fe},dt=h.useState(function(){return f!=null?Bn(le(le({},xe),{decimalScale:x,value:String(f)})):v!=null?Bn(le(le({},xe),{decimalScale:x,value:String(v)})):""}),we=dt[0],ne=dt[1],de=h.useState(!1),$e=de[0],jt=de[1],Nt=h.useState(0),cn=Nt[0],T=Nt[1],F=h.useState(0),O=F[0],R=F[1],M=h.useState(null),N=M[0],W=M[1],K=h.useRef(null);h.useImperativeHandle(t,function(){return K.current});var he=function(me,Re){jt(!0);var Ne=mp({selectionStart:Re,value:me,lastKeyStroke:N,stateValue:we,groupSeparator:ke}),Be=Ne.modifiedValue,Ie=Ne.cursorPosition,We=Ui(le({value:Be},De));if(!(p&&We.replace(/-/g,"").length>p)){if(We===""||We==="-"||We===oe){b&&b(void 0,l,{float:null,formatted:"",value:""}),ne(We),T(1);return}var ht=oe?We.replace(oe,"."):We,fr=parseFloat(ht),dn=Bn(le({value:We},xe));if(Ie!=null){var pn=Ie+(dn.length-me.length);pn=pn<=0?_?_.length:0:pn,T(pn),R(O+1)}if(ne(dn),b){var ts={float:fr,formatted:dn,value:We};b(We,l,ts)}}},fe=function(me){var Re=me.target,Ne=Re.value,Be=Re.selectionStart;he(Ne,Be),X&&X(me)},pt=function(me){return G&&G(me),we?we.length:0},_n=function(me){var Re=me.target.value,Ne=Ui(le({value:Re},De));if(Ne==="-"||Ne===oe||!Ne){ne(""),z&&z(me);return}var Be=up(Ne,oe,g),Ie=hp(Be,oe,x!==void 0?x:g),We=parseFloat(Ie.replace(oe,".")),ht=Bn(le(le({},xe),{value:Ie}));b&&q&&b(Ie,l,{float:We,formatted:ht,value:Ie}),ne(ht),z&&z(me)},zt=function(me){var Re=me.key;if(W(Re),C&&(Re==="ArrowUp"||Re==="ArrowDown")){me.preventDefault(),T(we.length);var Ne=parseFloat(v!=null?String(v).replace(oe,"."):Ui(le({value:we},De)))||0,Be=Re==="ArrowUp"?Ne+C:Ne-C;if(A!==void 0&&Be<Number(A)||L!==void 0&&Be>Number(L))return;var Ie=String(C).includes(".")?Number(String(C).split(".")[1].length):void 0;he(String(Ie?Be.toFixed(Ie):Be).replace(".",oe))}Q&&Q(me)},It=function(me){var Re=me.key,Ne=me.currentTarget.selectionStart;if(Re!=="ArrowUp"&&Re!=="ArrowDown"&&we!=="-"){var Be=ga(we,{groupSeparator:ke,decimalSeparator:oe});if(Be&&Ne&&Ne>we.length-Be.length&&K.current){var Ie=we.length-Be.length;K.current.setSelectionRange(Ie,Ie)}}ee&&ee(me)};h.useEffect(function(){v==null&&f==null&&ne("")},[f,v]),h.useEffect(function(){$e&&we!=="-"&&K.current&&document.activeElement===K.current&&K.current.setSelectionRange(cn,cn)},[we,cn,K,$e,O]);var ur=function(){return v!=null&&we!=="-"&&(!oe||we!==oe)?Bn(le(le({},xe),{decimalScale:$e?void 0:x,value:String(v)})):we},fn=le({type:"text",inputMode:"decimal",id:s,name:l,className:a,onChange:fe,onBlur:_n,onFocus:pt,onKeyDown:zt,onKeyUp:It,placeholder:y,disabled:d,value:ur(),ref:K},ge);if(u){var cr=u;return h.createElement(cr,le({},fn))}return h.createElement("input",le({},fn))});va.displayName="CurrencyInput";const ye=({label:e,name:t,register:n,errors:r,className:i,type:o="text",placeholder:s="",isFloating:l})=>{var u,c,f,m;const a=n?{...n(t)}:{};return o==="amount"?w.jsxs("div",{className:"space-y-1.5 relative",children:[w.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${l?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),w.jsx(va,{...a,placeholder:s,className:`input-control ${r!=null&&r[t]?"border-red-300":"border-[#D0D5DD]"}`,decimalsLimit:2}),(r==null?void 0:r[t])&&w.jsx("p",{className:"mt-1 text-sm text-red-600",children:(u=r[t])==null?void 0:u.message})]}):["checkbox","radio"].includes(o)?w.jsxs("div",{children:[w.jsxs("label",{className:"flex items-center space-x-2",children:[w.jsx("input",{...a,type:o,className:"h-4 w-4 rounded border-gray-300"}),w.jsx("span",{className:"text-sm font-medium text-[#344054] font-onest",children:e})]}),(r==null?void 0:r[t])&&w.jsx("p",{className:"ml-2 text-sm text-red-600",children:(c=r[t])==null?void 0:c.message})]}):o==="textarea"?w.jsxs("div",{className:"space-y-1.5 relative",children:[w.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${l?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ":"relative"}`,children:e}),w.jsx("textarea",{...a,className:`input-control ${r!=null&&r[t]?"border-red-300":"border-[#D0D5DD]"} ${i}`,placeholder:s}),(r==null?void 0:r[t])&&w.jsx("p",{className:"mt-1 text-sm text-red-600",children:(f=r[t])==null?void 0:f.message})]}):w.jsxs("div",{className:"space-y-1.5 relative",children:[w.jsx("label",{className:`block text-sm font-medium text-[#344054] font-onest ${l?"z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3":"relative"}`,children:e}),w.jsx("input",{...a,type:o,className:`input-control ${r!=null&&r[t]?"border-red-300":"border-[#D0D5DD]"} ${i}`,placeholder:l?"":s}),(r==null?void 0:r[t])&&w.jsx("p",{className:"mt-1 text-sm text-red-600",children:(m=r[t])==null?void 0:m.message})]})};function ba({element:e,validationData:t}){return w.jsx(ye,{placeholder:e.placeholder,type:e.inputType,label:"",name:"",className:"file:bg-gray-600 file:text-white file:rounded-[6px] file:py-[6px] file:border-gray-100 !py-1 file:px-[10px] !px-1"})}const gp=({element:e})=>{const t=h.useMemo(()=>Array.from({length:e.grid},(n,r)=>r),[e.grid]);return w.jsx("div",{className:"grid p-3",style:{gridTemplateColumns:`repeat(${e.grid}, 1fr)`,gap:"8px"},children:t.map(n=>w.jsx("div",{className:"border rounded p-4 min-h-[80px] transition-colors hover:border-gray-400",children:n},n))})},xa=h.memo(gp);function wa({element:e,validationData:t}){const{register:n=()=>({})}=t||{};return w.jsx("input",{placeholder:e.placeholder,type:e.inputType,className:"input-control",...n(e.id)})}function Ea({element:e,validationData:t}){const{register:n=()=>({})}=t||{};return w.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(r=>w.jsx("div",{children:w.jsx(ye,{placeholder:e.placeholder,type:e.inputType,label:r==null?void 0:r.label,name:"",...n(e.id)})},r.id))})}function Ta({element:e,state:t}){return w.jsx("div",{children:"SectionInput"})}function Sa({element:e,validationData:t}){return w.jsx("div",{className:"flex flex-wrap gap-y-4 gap-x-6",children:e==null?void 0:e.options.map(n=>w.jsx("div",{children:w.jsx(ye,{placeholder:e.placeholder,type:e.inputType,label:n==null?void 0:n.label,name:""})},n.id))})}const _a=typeof document<"u"?h.useLayoutEffect:()=>{};function yp(e){const t=h.useRef(null);return _a(()=>{t.current=e},[e]),h.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Un=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Xt=e=>e&&"window"in e&&e.window===e?e:Un(e).defaultView||window;function vp(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function bp(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ca(e){let t=null;return()=>(t==null&&(t=e()),t)}const xp=Ca(function(){return bp(/^Mac/i)}),wp=Ca(function(){return vp(/Android/i)});function Ep(e){return e.mozInputSource===0&&e.isTrusted?!0:wp()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class Tp{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Fa(e){let t=h.useRef({isFocused:!1,observer:null});_a(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=yp(r=>{e==null||e(r)});return h.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,o=s=>{t.current.isFocused=!1,i.disabled&&n(new Tp("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let l=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Sp(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=h.useCallback(a=>{if(a.target===a.currentTarget)return r&&r(a),i&&i(!1),!0},[r,i]),s=Fa(o),l=h.useCallback(a=>{const u=Un(a.target);a.target===a.currentTarget&&u.activeElement===a.target&&(n&&n(a),i&&i(!0),s(a))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?l:void 0,onBlur:!t&&(r||i)?o:void 0}}}let Hn=null,Hi=new Set,qn=new Map,Jt=!1,qi=!1;const _p={Tab:!0,Escape:!0};function zi(e,t){for(let n of Hi)n(e,t)}function Cp(e){return!(e.metaKey||!xp()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Dr(e){Jt=!0,Cp(e)&&(Hn="keyboard",zi("keyboard",e))}function it(e){Hn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Jt=!0,zi("pointer",e))}function ka(e){Ep(e)&&(Jt=!0,Hn="virtual")}function $a(e){e.target===window||e.target===document||(!Jt&&!qi&&(Hn="virtual",zi("virtual",e)),Jt=!1,qi=!1)}function Oa(){Jt=!1,qi=!0}function Wi(e){if(typeof window>"u"||qn.get(Xt(e)))return;const t=Xt(e),n=Un(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Jt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Dr,!0),n.addEventListener("keyup",Dr,!0),n.addEventListener("click",ka,!0),t.addEventListener("focus",$a,!0),t.addEventListener("blur",Oa,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",it,!0),n.addEventListener("pointermove",it,!0),n.addEventListener("pointerup",it,!0)):(n.addEventListener("mousedown",it,!0),n.addEventListener("mousemove",it,!0),n.addEventListener("mouseup",it,!0)),t.addEventListener("beforeunload",()=>{Aa(e)},{once:!0}),qn.set(t,{focus:r})}const Aa=(e,t)=>{const n=Xt(e),r=Un(e);t&&r.removeEventListener("DOMContentLoaded",t),qn.has(n)&&(n.HTMLElement.prototype.focus=qn.get(n).focus,r.removeEventListener("keydown",Dr,!0),r.removeEventListener("keyup",Dr,!0),r.removeEventListener("click",ka,!0),n.removeEventListener("focus",$a,!0),n.removeEventListener("blur",Oa,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",it,!0),r.removeEventListener("pointermove",it,!0),r.removeEventListener("pointerup",it,!0)):(r.removeEventListener("mousedown",it,!0),r.removeEventListener("mousemove",it,!0),r.removeEventListener("mouseup",it,!0)),qn.delete(n))};function Fp(e){const t=Un(e);let n;return t.readyState!=="loading"?Wi(e):(n=()=>{Wi(e)},t.addEventListener("DOMContentLoaded",n)),()=>Aa(e,n)}typeof document<"u"&&Fp();function Da(){return Hn!=="pointer"}const kp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function $p(e,t,n){var r;const i=typeof window<"u"?Xt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?Xt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Xt(n==null?void 0:n.target).HTMLElement:HTMLElement,l=typeof window<"u"?Xt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!kp.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof l&&!_p[n.key])}function Op(e,t,n){Wi(),h.useEffect(()=>{let r=(i,o)=>{$p(!!(n!=null&&n.isTextInput),i,o)&&e(Da())};return Hi.add(r),()=>{Hi.delete(r)}},t)}function Ap(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=h.useRef({isFocusWithin:!1}),s=h.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),l=Fa(s),a=h.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,l(u))},[r,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:a,onBlur:s}}}let Lr=!1,Ki=0;function Yi(){Lr=!0,setTimeout(()=>{Lr=!1},50)}function La(e){e.pointerType==="touch"&&Yi()}function Dp(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",La):document.addEventListener("touchend",Yi),Ki++,()=>{Ki--,!(Ki>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",La):document.removeEventListener("touchend",Yi))}}function Lp(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,s]=h.useState(!1),l=h.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;h.useEffect(Dp,[]);let{hoverProps:a,triggerHoverEnd:u}=h.useMemo(()=>{let c=(d,p)=>{if(l.pointerType=p,i||p==="touch"||l.isHovered||!d.currentTarget.contains(d.target))return;l.isHovered=!0;let v=d.currentTarget;l.target=v,t&&t({type:"hoverstart",target:v,pointerType:p}),n&&n(!0),s(!0)},f=(d,p)=>{if(l.pointerType="",l.target=null,p==="touch"||!l.isHovered)return;l.isHovered=!1;let v=d.currentTarget;r&&r({type:"hoverend",target:v,pointerType:p}),n&&n(!1),s(!1)},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=d=>{Lr&&d.pointerType==="mouse"||c(d,d.pointerType)},m.onPointerLeave=d=>{!i&&d.currentTarget.contains(d.target)&&f(d,d.pointerType)}):(m.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=d=>{!l.ignoreEmulatedMouseEvents&&!Lr&&c(d,"mouse"),l.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=d=>{!i&&d.currentTarget.contains(d.target)&&f(d,"mouse")}),{hoverProps:m,triggerHoverEnd:f}},[t,n,r,i,l]);return h.useEffect(()=>{i&&u({currentTarget:l.target},l.pointerType)},[i]),{hoverProps:a,isHovered:o}}function Pp(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=h.useRef({isFocused:!1,isFocusVisible:t||Da()}),[o,s]=h.useState(!1),[l,a]=h.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=h.useCallback(()=>a(i.current.isFocused&&i.current.isFocusVisible),[]),c=h.useCallback(d=>{i.current.isFocused=d,s(d),u()},[u]);Op(d=>{i.current.isFocusVisible=d,u()},[],{isTextInput:n});let{focusProps:f}=Sp({isDisabled:r,onFocusChange:c}),{focusWithinProps:m}=Ap({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:l,focusProps:r?m:f}}var jp=Object.defineProperty,Np=(e,t,n)=>t in e?jp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gi=(e,t,n)=>(Np(e,typeof t!="symbol"?t+"":t,n),n);let Ip=class{constructor(){Gi(this,"current",this.detect()),Gi(this,"handoffState","pending"),Gi(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Qt=new Ip;function zn(e){return Qt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Pa(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function At(){let e=[],t={addEventListener(n,r,i,o){return n.addEventListener(r,i,o),t.add(()=>n.removeEventListener(r,i,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Pa(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=At();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function Zt(){let[e]=h.useState(At);return h.useEffect(()=>()=>e.dispose(),[e]),e}let pe=(e,t)=>{Qt.isServer?h.useEffect(e,t):h.useLayoutEffect(e,t)};function en(e){let t=h.useRef(e);return pe(()=>{t.current=e},[e]),t}let Z=function(e){let t=en(e);return h.useCallback((...n)=>t.current(...n),[t])};function Mp(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Vp(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Rp({disabled:e=!1}={}){let t=h.useRef(null),[n,r]=h.useState(!1),i=Zt(),o=Z(()=>{t.current=null,r(!1),i.dispose()}),s=Z(l=>{if(i.dispose(),t.current===null){t.current=l.currentTarget,r(!0);{let a=zn(l.currentTarget);i.addEventListener(a,"pointerup",o,!1),i.addEventListener(a,"pointermove",u=>{if(t.current){let c=Mp(u);r(Vp(c,t.current.getBoundingClientRect()))}},!1),i.addEventListener(a,"pointercancel",o,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}let Bp=h.createContext(void 0);function Xi(){return h.useContext(Bp)}function Ji(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function lt(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,lt),r}var Pr=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pr||{}),Mt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Mt||{});function Ze(){let e=Hp();return h.useCallback(t=>Up({mergeRefs:e,...t}),[e])}function Up({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:l}){l=l??qp;let a=ja(t,e);if(o)return jr(a,n,r,s,l);let u=i??0;if(u&2){let{static:c=!1,...f}=a;if(c)return jr(f,n,r,s,l)}if(u&1){let{unmount:c=!0,...f}=a;return lt(c?0:1,{0(){return null},1(){return jr({...f,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return jr(a,n,r,s,l)}function jr(e,t={},n,r,i){let{as:o=n,children:s,refName:l="ref",...a}=Qi(e,["unmount","static"]),u=e.ref!==void 0?{[l]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let f={};if(t){let m=!1,d=[];for(let[p,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&d.push(p.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(m){f["data-headlessui-state"]=d.join(" ");for(let p of d)f[`data-${p}`]=""}}if(o===h.Fragment&&(Object.keys(Vt(a)).length>0||Object.keys(Vt(f)).length>0))if(!h.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Vt(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Vt(a)).concat(Object.keys(Vt(f))).map(m=>` - ${m}`).join(`
|
|
48
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(`
|
|
49
|
+
`)].join(`
|
|
50
|
+
`))}else{let m=c.props,d=m==null?void 0:m.className,p=typeof d=="function"?(...g)=>Ji(d(...g),a.className):Ji(d,a.className),v=p?{className:p}:{},b=ja(c.props,Vt(Qi(a,["ref"])));for(let g in f)g in b&&delete f[g];return h.cloneElement(c,Object.assign({},b,f,u,{ref:i(zp(c),u.ref)},v))}return h.createElement(o,Object.assign({},Qi(a,["ref"]),o!==h.Fragment&&u,o!==h.Fragment&&f),c)}function Hp(){let e=h.useRef([]),t=h.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function qp(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ja(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var o;return(o=i==null?void 0:i.preventDefault)==null?void 0:o.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...o){let s=n[r];for(let l of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...o)}}});return t}function Na(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];for(let r in n)Object.assign(t,{[r](...i){let o=n[r];for(let s of o)s==null||s(...i)}});return t}function Ye(e){var t;return Object.assign(h.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Vt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Qi(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function zp(e){return h.version.split(".")[0]>="19"?e.props.ref:e.ref}function Wp(e,t,n){let[r,i]=h.useState(n),o=e!==void 0,s=h.useRef(o),l=h.useRef(!1),a=h.useRef(!1);return o&&!s.current&&!l.current?(l.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&s.current&&!a.current&&(a.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,Z(u=>(o||i(u),t==null?void 0:t(u)))]}function Kp(e){let[t]=h.useState(e);return t}function Ia(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))Va(n,Ma(t,r),i);return n}function Ma(e,t){return e?e+"["+t+"]":t}function Va(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())Va(e,Ma(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Ia(n,t,e)}function Yp(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let i of r.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(n=r.requestSubmit)==null||n.call(r)}}let Gp="span";var Zi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Zi||{});function Xp(e,t){var n;let{features:r=1,...i}=e,o={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Ze()({ourProps:o,theirProps:i,slot:{},defaultTag:Gp,name:"Hidden"})}let Ra=Ye(Xp),Jp=h.createContext(null);function Qp({children:e}){let t=h.useContext(Jp);if(!t)return h.createElement(h.Fragment,null,e);let{target:n}=t;return n?mt.createPortal(h.createElement(h.Fragment,null,e),n):null}function Zp({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,s]=h.useState(null),l=Zt();return h.useEffect(()=>{if(r&&o)return l.addEventListener(o,"reset",r)},[o,t,r]),h.createElement(Qp,null,h.createElement(eh,{setForm:s,formId:t}),Ia(e).map(([a,u])=>h.createElement(Ra,{features:Zi.Hidden,...Vt({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:u,...i})})))}function eh({setForm:e,formId:t}){return h.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:h.createElement(Ra,{features:Zi.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let th=h.createContext(void 0);function Ba(){return h.useContext(th)}function nh(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&rh(n)?!1:r}function rh(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ua=Symbol();function ih(e,t=!0){return Object.assign(e,{[Ua]:t})}function ot(...e){let t=h.useRef(e);h.useEffect(()=>{t.current=e},[e]);let n=Z(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ua]))?void 0:n}let eo=h.createContext(null);eo.displayName="DescriptionContext";function Ha(){let e=h.useContext(eo);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ha),t}return e}function oh(){var e,t;return(t=(e=h.useContext(eo))==null?void 0:e.value)!=null?t:void 0}let sh="p";function ah(e,t){let n=h.useId(),r=Xi(),{id:i=`headlessui-description-${n}`,...o}=e,s=Ha(),l=ot(t);pe(()=>s.register(i),[i,s.register]);let a=r||!1,u=h.useMemo(()=>({...s.slot,disabled:a}),[s.slot,a]),c={ref:l,...s.props,id:i};return Ze()({ourProps:c,theirProps:o,slot:u,defaultTag:sh,name:s.name||"Description"})}let lh=Ye(ah);Object.assign(lh,{});var Oe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Oe||{});let Nr=h.createContext(null);Nr.displayName="LabelContext";function qa(){let e=h.useContext(Nr);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,qa),t}return e}function za(e){var t,n,r;let i=(n=(t=h.useContext(Nr))==null?void 0:t.value)!=null?n:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function uh({inherit:e=!1}={}){let t=za(),[n,r]=h.useState([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,h.useMemo(()=>function(o){let s=Z(a=>(r(u=>[...u,a]),()=>r(u=>{let c=u.slice(),f=c.indexOf(a);return f!==-1&&c.splice(f,1),c}))),l=h.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props,value:o.value}),[s,o.slot,o.name,o.props,o.value]);return h.createElement(Nr.Provider,{value:l},o.children)},[r])]}let ch="label";function fh(e,t){var n;let r=h.useId(),i=qa(),o=Ba(),s=Xi(),{id:l=`headlessui-label-${r}`,htmlFor:a=o??((n=i.props)==null?void 0:n.htmlFor),passive:u=!1,...c}=e,f=ot(t);pe(()=>i.register(l),[l,i.register]);let m=Z(b=>{let g=b.currentTarget;if(g instanceof HTMLLabelElement&&b.preventDefault(),i.props&&"onClick"in i.props&&typeof i.props.onClick=="function"&&i.props.onClick(b),g instanceof HTMLLabelElement){let y=document.getElementById(g.htmlFor);if(y){let x=y.getAttribute("disabled");if(x==="true"||x==="")return;let _=y.getAttribute("aria-disabled");if(_==="true"||_==="")return;(y instanceof HTMLInputElement&&(y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),d=s||!1,p=h.useMemo(()=>({...i.slot,disabled:d}),[i.slot,d]),v={ref:f,...i.props,id:l,htmlFor:a,onClick:m};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in c&&delete c.onClick),Ze()({ourProps:v,theirProps:c,slot:p,defaultTag:a?ch:"div",name:i.name||"Label"})}let dh=Ye(fh),ph=Object.assign(dh,{});function hh(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function mh(e=hh){return h.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return(t==null?void 0:t[r])===(n==null?void 0:n[r])}return e(t,n)},[e])}function gh(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function yh(e,t=!1){let[n,r]=h.useReducer(()=>({}),{}),i=h.useMemo(()=>gh(e),[e,n]);return pe(()=>{if(!e)return;let o=new ResizeObserver(r);return o.observe(e),()=>{o.disconnect()}},[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}let vh=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Wa(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...o){let s=t[i].call(n,...o);s&&(n=s,r.forEach(l=>l()))}}}function Ka(e){return h.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let bh=new vh(()=>Wa(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function to(e,t){let n=bh.get(t),r=h.useId(),i=Ka(n);if(pe(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let o=i.indexOf(r),s=i.length;return o===-1&&(o=s,s+=1),o===s-1}let no=new Map,Wn=new Map;function Ya(e){var t;let n=(t=Wn.get(e))!=null?t:0;return Wn.set(e,n+1),n!==0?()=>Ga(e):(no.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Ga(e))}function Ga(e){var t;let n=(t=Wn.get(e))!=null?t:1;if(n===1?Wn.delete(e):Wn.set(e,n-1),n!==1)return;let r=no.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,no.delete(e))}function xh(e,{allowed:t,disallowed:n}={}){let r=to(e,"inert-others");pe(()=>{var i,o;if(!r)return;let s=At();for(let a of(i=n==null?void 0:n())!=null?i:[])a&&s.add(Ya(a));let l=(o=t==null?void 0:t())!=null?o:[];for(let a of l){if(!a)continue;let u=zn(a);if(!u)continue;let c=a.parentElement;for(;c&&c!==u.body;){for(let f of c.children)l.some(m=>f.contains(m))||s.add(Ya(f));c=c.parentElement}}return s.dispose},[r,t,n])}function wh(e,t,n){let r=en(i=>{let o=i.getBoundingClientRect();o.x===0&&o.y===0&&o.width===0&&o.height===0&&n()});h.useEffect(()=>{if(!e)return;let i=t===null?null:t instanceof HTMLElement?t:t.current;if(!i)return;let o=At();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),o.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),o.add(()=>s.disconnect())}return()=>o.dispose()},[t,r,e])}let ro=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Eh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var io=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(io||{}),Th=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Th||{}),Sh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Sh||{});function Xa(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ro)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function _h(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Eh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var oo=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(oo||{});function Ja(e,t=0){var n;return e===((n=zn(e))==null?void 0:n.body)?!1:lt(t,{0(){return e.matches(ro)},1(){let r=e;for(;r!==null;){if(r.matches(ro))return!0;r=r.parentElement}return!1}})}var Ch=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Ch||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Fh=["textarea","input"].join(",");function kh(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Fh))!=null?n:!1}function Qa(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function $h(e,t){return Oh(Xa(),t,{relativeTo:e})}function Oh(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?Qa(e):e:t&64?_h(e):Xa(e);i.length>0&&s.length>1&&(s=s.filter(d=>!i.some(p=>p!=null&&"current"in p?(p==null?void 0:p.current)===d:p===d))),r=r??o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=s.length,m;do{if(c>=f||c+f<=0)return 0;let d=a+c;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}m=s[d],m==null||m.focus(u),c+=l}while(m!==o.activeElement);return t&6&&kh(m)&&m.select(),2}function Za(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ah(){return/Android/gi.test(window.navigator.userAgent)}function Dh(){return Za()||Ah()}function Kn(e,t,n,r){let i=en(n);h.useEffect(()=>{if(!e)return;function o(s){i.current(s)}return document.addEventListener(t,o,r),()=>document.removeEventListener(t,o,r)},[e,t,r])}function Lh(e,t,n,r){let i=en(n);h.useEffect(()=>{if(!e)return;function o(s){i.current(s)}return window.addEventListener(t,o,r),()=>window.removeEventListener(t,o,r)},[e,t,r])}const el=30;function Ph(e,t,n){let r=to(e,"outside-click"),i=en(n),o=h.useCallback(function(a,u){if(a.defaultPrevented)return;let c=u(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function m(d){return typeof d=="function"?m(d()):Array.isArray(d)||d instanceof Set?d:[d]}(t);for(let m of f)if(m!==null&&(m.contains(c)||a.composed&&a.composedPath().includes(m)))return;return!Ja(c,oo.Loose)&&c.tabIndex!==-1&&a.preventDefault(),i.current(a,c)},[i,t]),s=h.useRef(null);Kn(r,"pointerdown",a=>{var u,c;s.current=((c=(u=a.composedPath)==null?void 0:u.call(a))==null?void 0:c[0])||a.target},!0),Kn(r,"mousedown",a=>{var u,c;s.current=((c=(u=a.composedPath)==null?void 0:u.call(a))==null?void 0:c[0])||a.target},!0),Kn(r,"click",a=>{Dh()||s.current&&(o(a,()=>s.current),s.current=null)},!0);let l=h.useRef({x:0,y:0});Kn(r,"touchstart",a=>{l.current.x=a.touches[0].clientX,l.current.y=a.touches[0].clientY},!0),Kn(r,"touchend",a=>{let u={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(u.x-l.current.x)>=el||Math.abs(u.y-l.current.y)>=el))return o(a,()=>a.target instanceof HTMLElement?a.target:null)},!0),Lh(r,"blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function so(...e){return h.useMemo(()=>zn(...e),[...e])}function jh(e,t){return h.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Nh(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function Ih(){return Za()?{before({doc:e,d:t,meta:n}){function r(i){return n.containers.flatMap(o=>o()).some(o=>o.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=At();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let o=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let a=l.target.closest("a");if(!a)return;let{hash:u}=new URL(a.href),c=e.querySelector(u);c&&!r(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(r(l.target)){let a=l.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(r(l.target)){let a=l.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let a=(l=window.scrollY)!=null?l:window.pageYOffset;o!==a&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Mh(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Vh(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let tn=Wa(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:At(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Vh(n)},i=[Ih(),Nh(),Mh()];i.forEach(({before:o})=>o==null?void 0:o(r)),i.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});tn.subscribe(()=>{let e=tn.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&tn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&tn.dispatch("TEARDOWN",n)}});function Rh(e,t,n=()=>({containers:[]})){let r=Ka(tn),i=t?r.get(t):void 0,o=i?i.count>0:!1;return pe(()=>{if(!(!t||!e))return tn.dispatch("PUSH",t,n),()=>tn.dispatch("POP",t,n)},[e,t]),o}function Bh(e,t,n=()=>[document.body]){let r=to(e,"scroll-lock");Rh(r,t,i=>{var o;return{containers:[...(o=i.containers)!=null?o:[],n]}})}function tl(e){return[e.screenX,e.screenY]}function Uh(){let e=h.useRef([-1,-1]);return{wasMoved(t){let n=tl(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=tl(t)}}}function Hh(e=0){let[t,n]=h.useState(e),r=h.useCallback(a=>n(a),[t]),i=h.useCallback(a=>n(u=>u|a),[t]),o=h.useCallback(a=>(t&a)===a,[t]),s=h.useCallback(a=>n(u=>u&~a),[n]),l=h.useCallback(a=>n(u=>u^a),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:o,removeFlag:s,toggleFlag:l}}var nl,rl;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((nl=process==null?void 0:process.env)==null?void 0:nl.NODE_ENV)==="test"&&typeof((rl=Element==null?void 0:Element.prototype)==null?void 0:rl.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
51
|
+
`)),[]});var qh=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(qh||{});function il(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function ol(e,t,n,r){let[i,o]=h.useState(n),{hasFlag:s,addFlag:l,removeFlag:a}=Hh(e&&i?3:0),u=h.useRef(!1),c=h.useRef(!1),f=Zt();return pe(()=>{var m;if(e){if(n&&o(!0),!t){n&&l(3);return}return(m=r==null?void 0:r.start)==null||m.call(r,n),zh(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(l(3),a(4)):(l(4),a(2)))},run(){c.current?n?(a(3),l(4)):(a(4),l(3)):n?a(1):l(1)},done(){var d;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,a(7),n||o(!1),(d=r==null?void 0:r.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function zh(e,{prepare:t,run:n,done:r,inFlight:i}){let o=At();return Kh(e,{prepare:t,inFlight:i}),o.nextFrame(()=>{n(),o.requestAnimationFrame(()=>{o.add(Wh(e,r))})}),o.dispose}function Wh(e,t){var n,r;let i=At();if(!e)return i.dispose;let o=!1;i.add(()=>{o=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(l=>l.finished)).then(()=>{o||t()}),i.dispose)}function Kh(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function Ir(){return typeof window<"u"}function gn(e){return sl(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yt(e){var t;return(t=(sl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sl(e){return Ir()?e instanceof Node||e instanceof et(e).Node:!1}function Me(e){return Ir()?e instanceof Element||e instanceof et(e).Element:!1}function vt(e){return Ir()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function al(e){return!Ir()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function Yn(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Yh(e){return["table","td","th"].includes(gn(e))}function Mr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ao(e){const t=lo(),n=Me(e)?ut(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Gh(e){let t=Rt(e);for(;vt(t)&&!yn(t);){if(ao(t))return t;if(Mr(t))return null;t=Rt(t)}return null}function lo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yn(e){return["html","body","#document"].includes(gn(e))}function ut(e){return et(e).getComputedStyle(e)}function Vr(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rt(e){if(gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||al(e)&&e.host||yt(e);return al(t)?t.host:t}function ll(e){const t=Rt(e);return yn(t)?e.ownerDocument?e.ownerDocument.body:e.body:vt(t)&&Yn(t)?t:ll(t)}function Gn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ll(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=et(i);if(o){const l=uo(s);return t.concat(s,s.visualViewport||[],Yn(i)?i:[],l&&n?Gn(l):[])}return t.concat(i,Gn(i,[],n))}function uo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xh(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const nn=Math.min,Ve=Math.max,Xn=Math.round,Rr=Math.floor,bt=e=>({x:e,y:e}),Jh={left:"right",right:"left",bottom:"top",top:"bottom"},Qh={start:"end",end:"start"};function ul(e,t,n){return Ve(e,nn(t,n))}function vn(e,t){return typeof e=="function"?e(t):e}function Bt(e){return e.split("-")[0]}function Jn(e){return e.split("-")[1]}function cl(e){return e==="x"?"y":"x"}function fl(e){return e==="y"?"height":"width"}function rn(e){return["top","bottom"].includes(Bt(e))?"y":"x"}function dl(e){return cl(rn(e))}function Zh(e,t,n){n===void 0&&(n=!1);const r=Jn(e),i=dl(e),o=fl(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Br(s)),[s,Br(s)]}function em(e){const t=Br(e);return[co(e),t,co(t)]}function co(e){return e.replace(/start|end/g,t=>Qh[t])}function tm(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function nm(e,t,n,r){const i=Jn(e);let o=tm(Bt(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(co)))),o}function Br(e){return e.replace(/left|right|bottom|top/g,t=>Jh[t])}function rm(e){return{top:0,right:0,bottom:0,left:0,...e}}function im(e){return typeof e!="number"?rm(e):{top:e,right:e,bottom:e,left:e}}function Ur(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pl(e,t,n){let{reference:r,floating:i}=e;const o=rn(t),s=dl(t),l=fl(s),a=Bt(t),u=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let d;switch(a){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Jn(t)){case"start":d[s]-=m*(n&&u?-1:1);break;case"end":d[s]+=m*(n&&u?-1:1);break}return d}const om=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,l=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=pl(u,r,a),m=r,d={},p=0;for(let v=0;v<l.length;v++){const{name:b,fn:g}=l[v],{x:y,y:x,data:_,reset:$}=await g({x:c,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:d,rects:u,platform:s,elements:{reference:e,floating:t}});c=y??c,f=x??f,d={...d,[b]:{...d[b],..._}},$&&p<=50&&(p++,typeof $=="object"&&($.placement&&(m=$.placement),$.rects&&(u=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:c,y:f}=pl(u,m,a)),v=-1)}return{x:c,y:f,placement:m,strategy:i,middlewareData:d}};async function Hr(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:m=!1,padding:d=0}=vn(t,e),p=im(d),b=l[m?f==="floating"?"reference":"floating":f],g=Ur(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:a})),y=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),_=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},$=Ur(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:x,strategy:a}):y);return{top:(g.top-$.top+p.top)/_.y,bottom:($.bottom-g.bottom+p.bottom)/_.y,left:(g.left-$.left+p.left)/_.x,right:($.right-g.right+p.right)/_.x}}const sm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...b}=vn(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Bt(i),y=rn(l),x=Bt(l)===l,_=await(a.isRTL==null?void 0:a.isRTL(u.floating)),$=m||(x||!v?[Br(l)]:em(l)),S=p!=="none";!m&&S&&$.push(...nm(l,v,p,_));const C=[l,...$],A=await Hr(t,b),L=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&L.push(A[g]),f){const H=Zh(i,s,_);L.push(A[H[0]],A[H[1]])}if(j=[...j,{placement:i,overflows:L}],!L.every(H=>H<=0)){var D,I;const H=(((D=o.flip)==null?void 0:D.index)||0)+1,Y=C[H];if(Y)return{data:{index:H,overflows:j},reset:{placement:Y}};let X=(I=j.filter(G=>G.overflows[0]<=0).sort((G,z)=>G.overflows[1]-z.overflows[1])[0])==null?void 0:I.placement;if(!X)switch(d){case"bestFit":{var V;const G=(V=j.filter(z=>{if(S){const Q=rn(z.placement);return Q===y||Q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Q=>Q>0).reduce((Q,ee)=>Q+ee,0)]).sort((z,Q)=>z[1]-Q[1])[0])==null?void 0:V[0];G&&(X=G);break}case"initialPlacement":X=l;break}if(i!==X)return{reset:{placement:X}}}return{}}}};async function am(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Bt(n),l=Jn(n),a=rn(n)==="y",u=["left","top"].includes(s)?-1:1,c=o&&a?-1:1,f=vn(t,e);let{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),a?{x:d*c,y:m*u}:{x:m*u,y:d*c}}const lm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:l}=t,a=await am(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:s}}}}},um=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...a}=vn(e,t),u={x:n,y:r},c=await Hr(t,a),f=rn(Bt(i)),m=cl(f);let d=u[m],p=u[f];if(o){const b=m==="y"?"top":"left",g=m==="y"?"bottom":"right",y=d+c[b],x=d-c[g];d=ul(y,d,x)}if(s){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[b],x=p-c[g];p=ul(y,p,x)}const v=l.fn({...t,[m]:d,[f]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:o,[f]:s}}}}}},cm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:l}=t,{apply:a=()=>{},...u}=vn(e,t),c=await Hr(t,u),f=Bt(i),m=Jn(i),d=rn(i)==="y",{width:p,height:v}=o.floating;let b,g;f==="top"||f==="bottom"?(b=f,g=m===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(g=f,b=m==="end"?"top":"bottom");const y=v-c.top-c.bottom,x=p-c.left-c.right,_=nn(v-c[b],y),$=nn(p-c[g],x),S=!t.middlewareData.shift;let C=_,A=$;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),S&&!m){const j=Ve(c.left,0),D=Ve(c.right,0),I=Ve(c.top,0),V=Ve(c.bottom,0);d?A=p-2*(j!==0||D!==0?j+D:Ve(c.left,c.right)):C=v-2*(I!==0||V!==0?I+V:Ve(c.top,c.bottom))}await a({...t,availableWidth:A,availableHeight:C});const L=await s.getDimensions(l.floating);return p!==L.width||v!==L.height?{reset:{rects:!0}}:{}}}};function hl(e){const t=ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=vt(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,l=Xn(n)!==o||Xn(r)!==s;return l&&(n=o,r=s),{width:n,height:r,$:l}}function fo(e){return Me(e)?e:e.contextElement}function bn(e){const t=fo(e);if(!vt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=hl(t);let s=(o?Xn(n.width):n.width)/r,l=(o?Xn(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const fm=bt(0);function ml(e){const t=et(e);return!lo()||!t.visualViewport?fm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function on(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=fo(e);let s=bt(1);t&&(r?Me(r)&&(s=bn(r)):s=bn(e));const l=dm(o,n,r)?ml(o):bt(0);let a=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,c=i.width/s.x,f=i.height/s.y;if(o){const m=et(o),d=r&&Me(r)?et(r):r;let p=m,v=uo(p);for(;v&&r&&d!==p;){const b=bn(v),g=v.getBoundingClientRect(),y=ut(v),x=g.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,_=g.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,u*=b.y,c*=b.x,f*=b.y,a+=x,u+=_,p=et(v),v=uo(p)}}return Ur({width:c,height:f,x:a,y:u})}function po(e,t){const n=Vr(e).scrollLeft;return t?t.left+n:on(yt(e)).left+n}function gl(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:po(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function pm(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=yt(r),l=t?Mr(t.floating):!1;if(r===s||l&&o)return n;let a={scrollLeft:0,scrollTop:0},u=bt(1);const c=bt(0),f=vt(r);if((f||!f&&!o)&&((gn(r)!=="body"||Yn(s))&&(a=Vr(r)),vt(r))){const d=on(r);u=bn(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const m=s&&!f&&!o?gl(s,a,!0):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+m.x,y:n.y*u.y-a.scrollTop*u.y+c.y+m.y}}function hm(e){return Array.from(e.getClientRects())}function mm(e){const t=yt(e),n=Vr(e),r=e.ownerDocument.body,i=Ve(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ve(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+po(e);const l=-n.scrollTop;return ut(r).direction==="rtl"&&(s+=Ve(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function gm(e,t){const n=et(e),r=yt(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;const u=lo();(!u||u&&t==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l,y:a}}function ym(e,t){const n=on(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=vt(e)?bn(e):bt(1),s=e.clientWidth*o.x,l=e.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:s,height:l,x:a,y:u}}function yl(e,t,n){let r;if(t==="viewport")r=gm(e,n);else if(t==="document")r=mm(yt(e));else if(Me(t))r=ym(t,n);else{const i=ml(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ur(r)}function vl(e,t){const n=Rt(e);return n===t||!Me(n)||yn(n)?!1:ut(n).position==="fixed"||vl(n,t)}function vm(e,t){const n=t.get(e);if(n)return n;let r=Gn(e,[],!1).filter(l=>Me(l)&&gn(l)!=="body"),i=null;const o=ut(e).position==="fixed";let s=o?Rt(e):e;for(;Me(s)&&!yn(s);){const l=ut(s),a=ao(s);!a&&l.position==="fixed"&&(i=null),(o?!a&&!i:!a&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Yn(s)&&!a&&vl(e,s))?r=r.filter(c=>c!==s):i=l,s=Rt(s)}return t.set(e,r),r}function bm(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Mr(t)?[]:vm(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{const f=yl(t,c,i);return u.top=Ve(f.top,u.top),u.right=nn(f.right,u.right),u.bottom=nn(f.bottom,u.bottom),u.left=Ve(f.left,u.left),u},yl(t,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function xm(e){const{width:t,height:n}=hl(e);return{width:t,height:n}}function wm(e,t,n){const r=vt(t),i=yt(t),o=n==="fixed",s=on(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const a=bt(0);if(r||!r&&!o)if((gn(t)!=="body"||Yn(i))&&(l=Vr(t)),r){const m=on(t,!0,o,t);a.x=m.x+t.clientLeft,a.y=m.y+t.clientTop}else i&&(a.x=po(i));const u=i&&!r&&!o?gl(i,l):bt(0),c=s.left+l.scrollLeft-a.x-u.x,f=s.top+l.scrollTop-a.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function ho(e){return ut(e).position==="static"}function bl(e,t){if(!vt(e)||ut(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return yt(e)===n&&(n=n.ownerDocument.body),n}function xl(e,t){const n=et(e);if(Mr(e))return n;if(!vt(e)){let i=Rt(e);for(;i&&!yn(i);){if(Me(i)&&!ho(i))return i;i=Rt(i)}return n}let r=bl(e,t);for(;r&&Yh(r)&&ho(r);)r=bl(r,t);return r&&yn(r)&&ho(r)&&!ao(r)?n:r||Gh(e)||n}const Em=async function(e){const t=this.getOffsetParent||xl,n=this.getDimensions,r=await n(e.floating);return{reference:wm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tm(e){return ut(e).direction==="rtl"}const Sm={convertOffsetParentRelativeRectToViewportRelativeRect:pm,getDocumentElement:yt,getClippingRect:bm,getOffsetParent:xl,getElementRects:Em,getClientRects:hm,getDimensions:xm,getScale:bn,isElement:Me,isRTL:Tm};function _m(e,t){let n=null,r;const i=yt(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),o();const{left:u,top:c,width:f,height:m}=e.getBoundingClientRect();if(l||t(),!f||!m)return;const d=Rr(c),p=Rr(i.clientWidth-(u+f)),v=Rr(i.clientHeight-(c+m)),b=Rr(u),y={rootMargin:-d+"px "+-p+"px "+-v+"px "+-b+"px",threshold:Ve(0,nn(1,a))||1};let x=!0;function _($){const S=$[0].intersectionRatio;if(S!==a){if(!x)return s();S?s(!1,S):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(_,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return s(!0),o}function Cm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=fo(e),c=i||o?[...u?Gn(u):[],...Gn(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=u&&l?_m(u,n):null;let m=-1,d=null;s&&(d=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),u&&!a&&d.observe(u),d.observe(t));let p,v=a?on(e):null;a&&b();function b(){const g=on(e);v&&(g.x!==v.x||g.y!==v.y||g.width!==v.width||g.height!==v.height)&&n(),v=g,p=requestAnimationFrame(b)}return n(),()=>{var g;c.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,a&&cancelAnimationFrame(p)}}const mo=Hr,Fm=lm,km=um,$m=sm,Om=cm,Am=(e,t,n)=>{const r=new Map,i={platform:Sm,...n},o={...i.platform,_c:r};return om(e,t,{...i,platform:o})};var qr=typeof document<"u"?h.useLayoutEffect:h.useEffect;function zr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!zr(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function wl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function El(e,t){const n=wl(e);return Math.round(t*n)/n}function go(e){const t=k.useRef(e);return qr(()=>{t.current=e}),t}function Dm(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:l=!0,whileElementsMounted:a,open:u}=e,[c,f]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,d]=k.useState(r);zr(m,r)||d(r);const[p,v]=k.useState(null),[b,g]=k.useState(null),y=k.useCallback(z=>{z!==S.current&&(S.current=z,v(z))},[]),x=k.useCallback(z=>{z!==C.current&&(C.current=z,g(z))},[]),_=o||p,$=s||b,S=k.useRef(null),C=k.useRef(null),A=k.useRef(c),L=a!=null,j=go(a),D=go(i),I=go(u),V=k.useCallback(()=>{if(!S.current||!C.current)return;const z={placement:t,strategy:n,middleware:m};D.current&&(z.platform=D.current),Am(S.current,C.current,z).then(Q=>{const ee={...Q,isPositioned:I.current!==!1};H.current&&!zr(A.current,ee)&&(A.current=ee,dr.flushSync(()=>{f(ee)}))})},[m,t,n,D,I]);qr(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);const H=k.useRef(!1);qr(()=>(H.current=!0,()=>{H.current=!1}),[]),qr(()=>{if(_&&(S.current=_),$&&(C.current=$),_&&$){if(j.current)return j.current(_,$,V);V()}},[_,$,V,j,L]);const Y=k.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:x}),[y,x]),X=k.useMemo(()=>({reference:_,floating:$}),[_,$]),G=k.useMemo(()=>{const z={position:n,left:0,top:0};if(!X.floating)return z;const Q=El(X.floating,c.x),ee=El(X.floating,c.y);return l?{...z,transform:"translate("+Q+"px, "+ee+"px)",...wl(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:ee}},[n,l,X.floating,c.x,c.y]);return k.useMemo(()=>({...c,update:V,refs:Y,elements:X,floatingStyles:G}),[c,V,Y,X,G])}const Tl=(e,t)=>({...Fm(e),options:[e,t]}),Lm=(e,t)=>({...km(e),options:[e,t]}),Pm=(e,t)=>({...$m(e),options:[e,t]}),jm=(e,t)=>({...Om(e),options:[e,t]}),Sl={...k},Nm=Sl.useInsertionEffect||(e=>e());function _l(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Nm(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var yo=typeof document<"u"?h.useLayoutEffect:h.useEffect;let Cl=!1,Im=0;const Fl=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Im++;function Mm(){const[e,t]=k.useState(()=>Cl?Fl():void 0);return yo(()=>{e==null&&t(Fl())},[]),k.useEffect(()=>{Cl=!0},[]),e}const Vm=Sl.useId||Mm;let Qn;process.env.NODE_ENV!=="production"&&(Qn=new Set);function Rm(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=Qn)!=null&&e.has(i))){var o;(o=Qn)==null||o.add(i),console.warn(i)}}function Bm(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=Qn)!=null&&e.has(i))){var o;(o=Qn)==null||o.add(i),console.error(i)}}function Um(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const Hm=k.createContext(null),qm=k.createContext(null),zm=()=>{var e;return((e=k.useContext(Hm))==null?void 0:e.id)||null},Wm=()=>k.useContext(qm),Km="data-floating-ui-focusable";function Ym(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Vm(),o=k.useRef({}),[s]=k.useState(()=>Um()),l=zm()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Me(d)&&Bm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,u]=k.useState(r.reference),c=_l((d,p,v)=>{o.current.openEvent=d?p:void 0,s.emit("openchange",{open:d,event:p,reason:v,nested:l}),n==null||n(d,p,v)}),f=k.useMemo(()=>({setPositionReference:u}),[]),m=k.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return k.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:m,events:s,floatingId:i,refs:f}),[t,c,m,s,i,f])}function Gm(e){e===void 0&&(e={});const{nodeId:t}=e,n=Ym({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=k.useState(null),[l,a]=k.useState(null),c=(i==null?void 0:i.domReference)||o,f=k.useRef(null),m=Wm();yo(()=>{c&&(f.current=c)},[c]);const d=Dm({...e,elements:{...i,...l&&{reference:l}}}),p=k.useCallback(x=>{const _=Me(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;a(_),d.refs.setReference(_)},[d.refs]),v=k.useCallback(x=>{(Me(x)||x===null)&&(f.current=x,s(x)),(Me(d.refs.reference.current)||d.refs.reference.current===null||x!==null&&!Me(x))&&d.refs.setReference(x)},[d.refs]),b=k.useMemo(()=>({...d.refs,setReference:v,setPositionReference:p,domReference:f}),[d.refs,v,p]),g=k.useMemo(()=>({...d.elements,domReference:c}),[d.elements,c]),y=k.useMemo(()=>({...d,...r,refs:b,elements:g,nodeId:t}),[d,b,g,t,r]);return yo(()=>{r.dataRef.current.floatingContext=y;const x=m==null?void 0:m.nodesRef.current.find(_=>_.id===t);x&&(x.context=y)}),k.useMemo(()=>({...d,context:y,refs:b,elements:g}),[d,b,g,y])}const kl="active",$l="selected";function vo(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[kl]:s,[$l]:l,...a}=e;o=a}return{...n==="floating"&&{tabIndex:-1,[Km]:""},...o,...t.map(s=>{const l=s?s[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(a=>{let[u,c]=a;if(!(i&&[kl,$l].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var f;(f=r.get(u))==null||f.push(c),s[u]=function(){for(var m,d=arguments.length,p=new Array(d),v=0;v<d;v++)p[v]=arguments[v];return(m=r.get(u))==null?void 0:m.map(b=>b(...p)).find(b=>b!==void 0)}}}else s[u]=c}),s),{})}}function Xm(e){e===void 0&&(e=[]);const t=e.map(l=>l==null?void 0:l.reference),n=e.map(l=>l==null?void 0:l.floating),r=e.map(l=>l==null?void 0:l.item),i=k.useCallback(l=>vo(l,e,"reference"),t),o=k.useCallback(l=>vo(l,e,"floating"),n),s=k.useCallback(l=>vo(l,e,"item"),r);return k.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s}),[i,o,s])}function Ol(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Jm=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:a=0,scrollRef:u,...c}=vn(e,t),{rects:f,elements:{floating:m}}=t,d=n.current[s],p=(u==null?void 0:u.current)||m,v=m.clientTop||p.clientTop,b=m.clientTop!==0,g=p.clientTop!==0,y=m===p;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Rm('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const x={...t,...await Tl(-d.offsetTop-m.clientTop-f.reference.height/2-d.offsetHeight/2-o).fn(t)},_=await mo(Ol(x,p.scrollHeight+v+m.clientTop),c),$=await mo(x,{...c,elementContext:"reference"}),S=Ve(0,_.top),C=x.y+S,j=(p.scrollHeight>p.clientHeight?D=>D:Xn)(Ve(0,p.scrollHeight+(b&&y||g?v*2:0)-S-Ve(0,_.bottom)));if(p.style.maxHeight=j+"px",p.scrollTop=S,i){const D=p.offsetHeight<d.offsetHeight*nn(l,n.current.length)-1||$.top>=-a||$.bottom>=-a;dr.flushSync(()=>i(D))}return r&&(r.current=await mo(Ol({...x,y:C},p.offsetHeight+v+m.clientTop),c)),{y:C}}});function Qm(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:s,onChange:l}=t,a=_l(l),u=k.useRef(!1),c=k.useRef(null),f=k.useRef(null);k.useEffect(()=>{if(!i)return;function d(v){if(v.ctrlKey||!p||o.current==null)return;const b=v.deltaY,g=o.current.top>=-.5,y=o.current.bottom>=-.5,x=p.scrollHeight-p.clientHeight,_=b<0?-1:1,$=b<0?"max":"min";p.scrollHeight<=p.clientHeight||(!g&&b>0||!y&&b<0?(v.preventDefault(),dr.flushSync(()=>{a(S=>S+Math[$](b,x*_))})):/firefox/i.test(Xh())&&(p.scrollTop+=b))}const p=(s==null?void 0:s.current)||r.floating;if(n&&p)return p.addEventListener("wheel",d),requestAnimationFrame(()=>{c.current=p.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{c.current=null,f.current=null,p.removeEventListener("wheel",d)}},[i,n,r.floating,o,s,a]);const m=k.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const d=(s==null?void 0:s.current)||r.floating;if(!(!o.current||!d||!u.current)){if(c.current!==null){const p=d.scrollTop-c.current;(o.current.bottom<-.5&&p<-1||o.current.top<-.5&&p>1)&&dr.flushSync(()=>a(v=>v+p))}requestAnimationFrame(()=>{c.current=d.scrollTop})}}}),[r.floating,a,o,s]);return k.useMemo(()=>i?{floating:m}:{},[i,m])}let xn=h.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});xn.displayName="FloatingContext";let bo=h.createContext(null);bo.displayName="PlacementContext";function Zm(e){return h.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function eg(){return h.useContext(xn).setReference}function tg(){return h.useContext(xn).getReferenceProps}function ng(){let{getFloatingProps:e,slot:t}=h.useContext(xn);return h.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function rg(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=h.useContext(bo),n=h.useMemo(()=>e,[JSON.stringify(e,(i,o)=>{var s;return(s=o==null?void 0:o.outerHTML)!=null?s:o})]);pe(()=>{t==null||t(n??null)},[t,n]);let r=h.useContext(xn);return h.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Al=4;function ig({children:e,enabled:t=!0}){let[n,r]=h.useState(null),[i,o]=h.useState(0),s=h.useRef(null),[l,a]=h.useState(null);og(l);let u=t&&n!==null&&l!==null,{to:c="bottom",gap:f=0,offset:m=0,padding:d=0,inner:p}=sg(n,l),[v,b="center"]=c.split(" ");pe(()=>{u&&o(0)},[u]);let{refs:g,floatingStyles:y,context:x}=Gm({open:u,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Tl({mainAxis:v==="selection"?0:f,crossAxis:m}),Lm({padding:d}),v!=="selection"&&Pm({padding:d}),v==="selection"&&p?Jm({...p,padding:d,overflowRef:s,offset:i,minItemsVisible:Al,referenceOverflowThreshold:d,onFallbackChange(D){var I,V;if(!D)return;let H=x.elements.floating;if(!H)return;let Y=parseFloat(getComputedStyle(H).scrollPaddingBottom)||0,X=Math.min(Al,H.childElementCount),G=0,z=0;for(let Q of(V=(I=x.elements.floating)==null?void 0:I.childNodes)!=null?V:[])if(Q instanceof HTMLElement){let ee=Q.offsetTop,Fe=ee+Q.clientHeight+Y,Ae=H.scrollTop,q=Ae+H.clientHeight;if(ee>=Ae&&Fe<=q)X--;else{z=Math.max(0,Math.min(Fe,q)-Math.max(ee,Ae)),G=Q.clientHeight;break}}X>=1&&o(Q=>{let ee=G*X-z+Y;return Q>=ee?Q:ee})}}):null,jm({padding:d,apply({availableWidth:D,availableHeight:I,elements:V}){Object.assign(V.floating.style,{overflow:"auto",maxWidth:`${D}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${I}px)`})}})].filter(Boolean),whileElementsMounted:Cm}),[_=v,$=b]=x.placement.split("-");v==="selection"&&(_="selection");let S=h.useMemo(()=>({anchor:[_,$].filter(Boolean).join(" ")}),[_,$]),C=Qm(x,{overflowRef:s,onChange:o}),{getReferenceProps:A,getFloatingProps:L}=Xm([C]),j=Z(D=>{a(D),g.setFloating(D)});return k.createElement(bo.Provider,{value:r},k.createElement(xn.Provider,{value:{setFloating:j,setReference:g.setReference,styles:y,getReferenceProps:A,getFloatingProps:L,slot:S}},e))}function og(e){pe(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let i=parseInt(n);isNaN(i)||r!==i&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function sg(e,t){var n,r,i;let o=xo((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),s=xo((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),l=xo((i=e==null?void 0:e.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:l}}function xo(e,t,n=void 0){let r=Zt(),i=Z((a,u)=>{if(a==null)return[n,null];if(typeof a=="number")return[a,null];if(typeof a=="string"){if(!u)return[n,null];let c=Ll(a,u);return[c,f=>{let m=Dl(a);{let d=m.map(p=>window.getComputedStyle(u).getPropertyValue(p));r.requestAnimationFrame(function p(){r.nextFrame(p);let v=!1;for(let[g,y]of m.entries()){let x=window.getComputedStyle(u).getPropertyValue(y);if(d[g]!==x){d[g]=x,v=!0;break}}if(!v)return;let b=Ll(a,u);c!==b&&(f(b),c=b)})}return r.dispose}]}return[n,null]}),o=h.useMemo(()=>i(e,t)[0],[e,t]),[s=o,l]=h.useState();return pe(()=>{let[a,u]=i(e,t);if(l(a),!!u)return u(l)},[e,t]),s}function Dl(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),i=t[1].slice(n+1).trim();return i?[r,...Dl(i)]:[r]}return[]}function Ll(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function ag(e,t){let[n,r]=h.useState(t);return!e&&n!==t&&r(t),e?n:t}let wo=h.createContext(null);wo.displayName="OpenClosedContext";var ct=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ct||{});function Eo(){return h.useContext(wo)}function Pl({value:e,children:t}){return h.createElement(wo.Provider,{value:e},t)}function lg(e){throw new Error("Unexpected object: "+e)}var _e=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(_e||{});function To(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 1:{i===-1&&(i=n.length);for(let o=i-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=i+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return r}case 5:return null;default:lg(e)}}function ug(e){let t=Z(e),n=h.useRef(!1);h.useEffect(()=>(n.current=!1,()=>{n.current=!0,Pa(()=>{n.current&&t()})}),[t])}function cg(){let e=typeof document>"u";return"useSyncExternalStore"in k?(t=>t.useSyncExternalStore)(k)(()=>()=>{},()=>!1,()=>!e):!1}function So(){let e=cg(),[t,n]=k.useState(Qt.isHandoffComplete);return t&&Qt.isHandoffComplete===!1&&n(!1),k.useEffect(()=>{t!==!0&&n(!0)},[t]),k.useEffect(()=>Qt.handoff(),[]),e?!1:t}let fg=h.createContext(!1);function dg(){return h.useContext(fg)}function pg(e){let t=dg(),n=h.useContext(Nl),r=so(e),[i,o]=h.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Qt.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let a=r.createElement("div");return a.setAttribute("id","headlessui-portal-root"),r.body.appendChild(a)});return h.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),h.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),i}let jl=h.Fragment,hg=Ye(function(e,t){let n=e,r=h.useRef(null),i=ot(ih(f=>{r.current=f}),t),o=so(r),s=pg(r),[l]=h.useState(()=>{var f;return Qt.isServer?null:(f=o==null?void 0:o.createElement("div"))!=null?f:null}),a=h.useContext(vg),u=So();pe(()=>{!s||!l||s.contains(l)||(l.setAttribute("data-headlessui-portal",""),s.appendChild(l))},[s,l]),pe(()=>{if(l&&a)return a.register(l)},[a,l]),ug(()=>{var f;!s||!l||(l instanceof Node&&s.contains(l)&&s.removeChild(l),s.childNodes.length<=0&&((f=s.parentElement)==null||f.removeChild(s)))});let c=Ze();return u?!s||!l?null:mt.createPortal(c({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:jl,name:"Portal"}),l):null});function mg(e,t){let n=ot(t),{enabled:r=!0,...i}=e,o=Ze();return r?h.createElement(hg,{...i,ref:n}):o({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:jl,name:"Portal"})}let gg=h.Fragment,Nl=h.createContext(null);function yg(e,t){let{target:n,...r}=e,i={ref:ot(t)},o=Ze();return h.createElement(Nl.Provider,{value:n},o({ourProps:i,theirProps:r,defaultTag:gg,name:"Popover.Group"}))}let vg=h.createContext(null),bg=Ye(mg),xg=Ye(yg),wg=Object.assign(bg,{Group:xg});function Eg(){let e=h.useRef(!1);return pe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Il(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Vl)!==h.Fragment||h.Children.count(e.children)===1}let Wr=h.createContext(null);Wr.displayName="TransitionContext";var Tg=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Tg||{});function Sg(){let e=h.useContext(Wr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function _g(){let e=h.useContext(Kr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Kr=h.createContext(null);Kr.displayName="NestingContext";function Yr(e){return"children"in e?Yr(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ml(e,t){let n=en(e),r=h.useRef([]),i=Eg(),o=Zt(),s=Z((d,p=Mt.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===d);v!==-1&&(lt(p,{[Mt.Unmount](){r.current.splice(v,1)},[Mt.Hidden](){r.current[v].state="hidden"}}),o.microTask(()=>{var b;!Yr(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),l=Z(d=>{let p=r.current.find(({el:v})=>v===d);return p?p.state!=="visible"&&(p.state="visible"):r.current.push({el:d,state:"visible"}),()=>s(d,Mt.Unmount)}),a=h.useRef([]),u=h.useRef(Promise.resolve()),c=h.useRef({enter:[],leave:[]}),f=Z((d,p,v)=>{a.current.splice(0),t&&(t.chains.current[p]=t.chains.current[p].filter(([b])=>b!==d)),t==null||t.chains.current[p].push([d,new Promise(b=>{a.current.push(b)})]),t==null||t.chains.current[p].push([d,new Promise(b=>{Promise.all(c.current[p].map(([g,y])=>y)).then(()=>b())})]),p==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(p)):v(p)}),m=Z((d,p,v)=>{Promise.all(c.current[p].splice(0).map(([b,g])=>g)).then(()=>{var b;(b=a.current.shift())==null||b()}).then(()=>v(p))});return h.useMemo(()=>({children:r,register:l,unregister:s,onStart:f,onStop:m,wait:u,chains:c}),[l,s,r,f,m,c,u])}let Vl=h.Fragment,Rl=Pr.RenderStrategy;function Cg(e,t){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:s,beforeLeave:l,afterLeave:a,enter:u,enterFrom:c,enterTo:f,entered:m,leave:d,leaveFrom:p,leaveTo:v,...b}=e,[g,y]=h.useState(null),x=h.useRef(null),_=Il(e),$=ot(..._?[x,t,y]:t===null?[]:[t]),S=(n=b.unmount)==null||n?Mt.Unmount:Mt.Hidden,{show:C,appear:A,initial:L}=Sg(),[j,D]=h.useState(C?"visible":"hidden"),I=_g(),{register:V,unregister:H}=I;pe(()=>V(x),[V,x]),pe(()=>{if(S===Mt.Hidden&&x.current){if(C&&j!=="visible"){D("visible");return}return lt(j,{hidden:()=>H(x),visible:()=>V(x)})}},[j,x,V,H,C,S]);let Y=So();pe(()=>{if(_&&Y&&j==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,j,Y,_]);let X=L&&!A,G=A&&C&&L,z=h.useRef(!1),Q=Ml(()=>{z.current||(D("hidden"),H(x))},I),ee=Z(ke=>{z.current=!0;let xe=ke?"enter":"leave";Q.onStart(x,xe,De=>{De==="enter"?o==null||o():De==="leave"&&(l==null||l())})}),Fe=Z(ke=>{let xe=ke?"enter":"leave";z.current=!1,Q.onStop(x,xe,De=>{De==="enter"?s==null||s():De==="leave"&&(a==null||a())}),xe==="leave"&&!Yr(Q)&&(D("hidden"),H(x))});h.useEffect(()=>{_&&i||(ee(C),Fe(C))},[C,_,i]);let Ae=!(!i||!_||!Y||X),[,q]=ol(Ae,g,C,{start:ee,end:Fe}),ge=Vt({ref:$,className:((r=Ji(b.className,G&&u,G&&c,q.enter&&u,q.enter&&q.closed&&c,q.enter&&!q.closed&&f,q.leave&&d,q.leave&&!q.closed&&p,q.leave&&q.closed&&v,!q.transition&&C&&m))==null?void 0:r.trim())||void 0,...il(q)}),be=0;j==="visible"&&(be|=ct.Open),j==="hidden"&&(be|=ct.Closed),q.enter&&(be|=ct.Opening),q.leave&&(be|=ct.Closing);let oe=Ze();return h.createElement(Kr.Provider,{value:Q},h.createElement(Pl,{value:be},oe({ourProps:ge,theirProps:b,defaultTag:Vl,features:Rl,visible:j==="visible",name:"Transition.Child"})))}function Fg(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,s=h.useRef(null),l=Il(e),a=ot(...l?[s,t]:t===null?[]:[t]);So();let u=Eo();if(n===void 0&&u!==null&&(n=(u&ct.Open)===ct.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=h.useState(n?"visible":"hidden"),m=Ml(()=>{n||f("hidden")}),[d,p]=h.useState(!0),v=h.useRef([n]);pe(()=>{d!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),p(!1))},[v,n]);let b=h.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);pe(()=>{n?f("visible"):!Yr(m)&&s.current!==null&&f("hidden")},[n,m]);let g={unmount:i},y=Z(()=>{var $;d&&p(!1),($=e.beforeEnter)==null||$.call(e)}),x=Z(()=>{var $;d&&p(!1),($=e.beforeLeave)==null||$.call(e)}),_=Ze();return h.createElement(Kr.Provider,{value:m},h.createElement(Wr.Provider,{value:b},_({ourProps:{...g,as:h.Fragment,children:h.createElement(Bl,{ref:a,...g,...o,beforeEnter:y,beforeLeave:x})},theirProps:{},defaultTag:h.Fragment,features:Rl,visible:c==="visible",name:"Transition"})))}function kg(e,t){let n=h.useContext(Wr)!==null,r=Eo()!==null;return h.createElement(h.Fragment,null,!n&&r?h.createElement(_o,{ref:t,...e}):h.createElement(Bl,{ref:t,...e}))}let _o=Ye(Fg),Bl=Ye(Cg),$g=Ye(kg),Og=Object.assign(_o,{Child:$g,Root:_o});function Ag(e,t){let n=h.useRef({left:0,top:0});if(pe(()=>{if(!t)return;let i=t.getBoundingClientRect();i&&(n.current=i)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let Ul=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Hl(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let l of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),o=!0;let s=o?(n=i.innerText)!=null?n:"":r;return Ul.test(s)&&(s=s.replace(Ul,"")),s}function Dg(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let o=document.getElementById(i);if(o){let s=o.getAttribute("aria-label");return typeof s=="string"?s.trim():Hl(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Hl(e).trim()}function Lg(e){let t=h.useRef(""),n=h.useRef("");return Z(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=Dg(r).trim().toLowerCase();return t.current=i,n.current=o,o})}var Pg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Pg||{}),jg=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(jg||{}),Ng=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ng||{}),Ig=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(Ig||{});function Co(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Qa(t(e.options.slice()),o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let Mg={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(i=>n(i.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,i,o,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let l={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===_e.Nothing)return{...l,activeOptionIndex:null};if(t.focus===_e.Specific)return{...l,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===_e.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,m=To(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(m!==null){let d=e.options[m].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===d.current||((i=d.current)==null?void 0:i.previousElementSibling)===null)return{...l,activeOptionIndex:m}}}}else if(t.focus===_e.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,m=To(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(m!==null){let d=e.options[m].dataRef.current.domRef;if(((o=f.current)==null?void 0:o.nextElementSibling)===d.current||((s=d.current)==null?void 0:s.nextElementSibling)===null)return{...l,activeOptionIndex:m}}}}let a=Co(e),u=To(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...l,...a,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(s=>{var l;return!s.dataRef.current.disabled&&((l=s.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),o=i?e.options.indexOf(i):-1;return o===-1||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Co(e,i=>[...i,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Co(e,r=>{let i=r.findIndex(o=>o.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Fo=h.createContext(null);Fo.displayName="ListboxActionsContext";function Gr(e){let t=h.useContext(Fo);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Gr),n}return t}let Xr=h.createContext(null);Xr.displayName="ListboxDataContext";function Zn(e){let t=h.useContext(Xr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Zn),n}return t}function Vg(e,t){return lt(t.type,Mg,e,t)}let Rg=h.Fragment;function Bg(e,t){var n;let r=Xi(),{value:i,defaultValue:o,form:s,name:l,onChange:a,by:u,invalid:c=!1,disabled:f=r||!1,horizontal:m=!1,multiple:d=!1,__demoMode:p=!1,...v}=e;const b=m?"horizontal":"vertical";let g=ot(t),y=Kp(o),[x=d?[]:void 0,_]=Wp(i,a,y),[$,S]=h.useReducer(Vg,{dataRef:h.createRef(),listboxState:p?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:p}),C=h.useRef({static:!1,hold:!1}),A=h.useRef(new Map),L=mh(u),j=h.useCallback(ne=>lt(D.mode,{1:()=>x.some(de=>L(de,ne)),0:()=>L(x,ne)}),[x]),D=h.useMemo(()=>({...$,value:x,disabled:f,invalid:c,mode:d?1:0,orientation:b,compare:L,isSelected:j,optionsPropsRef:C,listRef:A}),[x,f,c,d,$,A]);pe(()=>{$.dataRef.current=D},[D]);let I=D.listboxState===0;Ph(I,[D.buttonElement,D.optionsElement],(ne,de)=>{var $e;S({type:1}),Ja(de,oo.Loose)||(ne.preventDefault(),($e=D.buttonElement)==null||$e.focus())});let V=h.useMemo(()=>({open:D.listboxState===0,disabled:f,invalid:c,value:x}),[D,f,x,c]),H=Z(ne=>{let de=D.options.find($e=>$e.id===ne);de&&Fe(de.dataRef.current.value)}),Y=Z(()=>{if(D.activeOptionIndex!==null){let{dataRef:ne,id:de}=D.options[D.activeOptionIndex];Fe(ne.current.value),S({type:2,focus:_e.Specific,id:de})}}),X=Z(()=>S({type:0})),G=Z(()=>S({type:1})),z=Zt(),Q=Z((ne,de,$e)=>{z.dispose(),z.microTask(()=>ne===_e.Specific?S({type:2,focus:_e.Specific,id:de,trigger:$e}):S({type:2,focus:ne,trigger:$e}))}),ee=Z((ne,de)=>(S({type:5,id:ne,dataRef:de}),()=>S({type:6,id:ne}))),Fe=Z(ne=>lt(D.mode,{0(){return _==null?void 0:_(ne)},1(){let de=D.value.slice(),$e=de.findIndex(jt=>L(jt,ne));return $e===-1?de.push(ne):de.splice($e,1),_==null?void 0:_(de)}})),Ae=Z(ne=>S({type:3,value:ne})),q=Z(()=>S({type:4})),ge=Z(ne=>{S({type:7,element:ne})}),be=Z(ne=>{S({type:8,element:ne})}),oe=h.useMemo(()=>({onChange:Fe,registerOption:ee,goToOption:Q,closeListbox:G,openListbox:X,selectActiveOption:Y,selectOption:H,search:Ae,clearSearch:q,setButtonElement:ge,setOptionsElement:be}),[]),[ke,xe]=uh({inherit:!0}),De={ref:g},dt=h.useCallback(()=>{if(y!==void 0)return _==null?void 0:_(y)},[_,y]),we=Ze();return h.createElement(xe,{value:ke,props:{htmlFor:(n=D.buttonElement)==null?void 0:n.id},slot:{open:D.listboxState===0,disabled:f}},h.createElement(ig,null,h.createElement(Fo.Provider,{value:oe},h.createElement(Xr.Provider,{value:D},h.createElement(Pl,{value:lt(D.listboxState,{0:ct.Open,1:ct.Closed})},l!=null&&x!=null&&h.createElement(Zp,{disabled:f,data:{[l]:x},form:s,onReset:dt}),we({ourProps:De,theirProps:v,slot:V,defaultTag:Rg,name:"Listbox"}))))))}let Ug="button";function Hg(e,t){var n;let r=Zn("Listbox.Button"),i=Gr("Listbox.Button"),o=h.useId(),s=Ba(),{id:l=s||`headlessui-listbox-button-${o}`,disabled:a=r.disabled||!1,autoFocus:u=!1,...c}=e,f=ot(t,eg(),i.setButtonElement),m=tg(),d=Z(D=>{switch(D.key){case Oe.Enter:Yp(D.currentTarget);break;case Oe.Space:case Oe.ArrowDown:D.preventDefault(),mt.flushSync(()=>i.openListbox()),r.value||i.goToOption(_e.First);break;case Oe.ArrowUp:D.preventDefault(),mt.flushSync(()=>i.openListbox()),r.value||i.goToOption(_e.Last);break}}),p=Z(D=>{switch(D.key){case Oe.Space:D.preventDefault();break}}),v=Z(D=>{var I;if(nh(D.currentTarget))return D.preventDefault();r.listboxState===0?(mt.flushSync(()=>i.closeListbox()),(I=r.buttonElement)==null||I.focus({preventScroll:!0})):(D.preventDefault(),i.openListbox())}),b=Z(D=>D.preventDefault()),g=za([l]),y=oh(),{isFocusVisible:x,focusProps:_}=Pp({autoFocus:u}),{isHovered:$,hoverProps:S}=Lp({isDisabled:a}),{pressed:C,pressProps:A}=Rp({disabled:a}),L=h.useMemo(()=>({open:r.listboxState===0,active:C||r.listboxState===0,disabled:a,invalid:r.invalid,value:r.value,hover:$,focus:x,autofocus:u}),[r.listboxState,r.value,a,$,x,C,r.invalid,u]),j=Na(m(),{ref:f,id:l,type:jh(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":(n=r.optionsElement)==null?void 0:n.id,"aria-expanded":r.listboxState===0,"aria-labelledby":g,"aria-describedby":y,disabled:a||void 0,autoFocus:u,onKeyDown:d,onKeyUp:p,onKeyPress:b,onClick:v},_,S,A);return Ze()({ourProps:j,theirProps:c,slot:L,defaultTag:Ug,name:"Listbox.Button"})}let ql=h.createContext(!1),qg="div",zg=Pr.RenderStrategy|Pr.Static;function Wg(e,t){var n,r;let i=h.useId(),{id:o=`headlessui-listbox-options-${i}`,anchor:s,portal:l=!1,modal:a=!0,transition:u=!1,...c}=e,f=Zm(s),[m,d]=h.useState(null);f&&(l=!0);let p=Zn("Listbox.Options"),v=Gr("Listbox.Options"),b=so(p.optionsElement),g=Eo(),[y,x]=ol(u,m,g!==null?(g&ct.Open)===ct.Open:p.listboxState===0);wh(y,p.buttonElement,v.closeListbox);let _=p.__demoMode?!1:a&&p.listboxState===0;Bh(_,b);let $=p.__demoMode?!1:a&&p.listboxState===0;xh($,{allowed:h.useCallback(()=>[p.buttonElement,p.optionsElement],[p.buttonElement,p.optionsElement])});let S=p.listboxState!==0,C=Ag(S,p.buttonElement)?!1:y,A=y&&p.listboxState===1,L=ag(A,p.value),j=Z(q=>p.compare(L,q)),D=h.useMemo(()=>{var q;if(f==null||!((q=f==null?void 0:f.to)!=null&&q.includes("selection")))return null;let ge=p.options.findIndex(be=>j(be.dataRef.current.value));return ge===-1&&(ge=0),ge},[f,p.options]),I=(()=>{if(f==null)return;if(D===null)return{...f,inner:void 0};let q=Array.from(p.listRef.current.values());return{...f,inner:{listRef:{current:q},index:D}}})(),[V,H]=rg(I),Y=ng(),X=ot(t,f?V:null,v.setOptionsElement,d),G=Zt();h.useEffect(()=>{var q;let ge=p.optionsElement;ge&&p.listboxState===0&&ge!==((q=zn(ge))==null?void 0:q.activeElement)&&(ge==null||ge.focus({preventScroll:!0}))},[p.listboxState,p.optionsElement]);let z=Z(q=>{var ge,be;switch(G.dispose(),q.key){case Oe.Space:if(p.searchQuery!=="")return q.preventDefault(),q.stopPropagation(),v.search(q.key);case Oe.Enter:if(q.preventDefault(),q.stopPropagation(),p.activeOptionIndex!==null){let{dataRef:oe}=p.options[p.activeOptionIndex];v.onChange(oe.current.value)}p.mode===0&&(mt.flushSync(()=>v.closeListbox()),(ge=p.buttonElement)==null||ge.focus({preventScroll:!0}));break;case lt(p.orientation,{vertical:Oe.ArrowDown,horizontal:Oe.ArrowRight}):return q.preventDefault(),q.stopPropagation(),v.goToOption(_e.Next);case lt(p.orientation,{vertical:Oe.ArrowUp,horizontal:Oe.ArrowLeft}):return q.preventDefault(),q.stopPropagation(),v.goToOption(_e.Previous);case Oe.Home:case Oe.PageUp:return q.preventDefault(),q.stopPropagation(),v.goToOption(_e.First);case Oe.End:case Oe.PageDown:return q.preventDefault(),q.stopPropagation(),v.goToOption(_e.Last);case Oe.Escape:q.preventDefault(),q.stopPropagation(),mt.flushSync(()=>v.closeListbox()),(be=p.buttonElement)==null||be.focus({preventScroll:!0});return;case Oe.Tab:q.preventDefault(),q.stopPropagation(),mt.flushSync(()=>v.closeListbox()),$h(p.buttonElement,q.shiftKey?io.Previous:io.Next);break;default:q.key.length===1&&(v.search(q.key),G.setTimeout(()=>v.clearSearch(),350));break}}),Q=(n=p.buttonElement)==null?void 0:n.id,ee=h.useMemo(()=>({open:p.listboxState===0}),[p.listboxState]),Fe=Na(f?Y():{},{id:o,ref:X,"aria-activedescendant":p.activeOptionIndex===null||(r=p.options[p.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":p.mode===1?!0:void 0,"aria-labelledby":Q,"aria-orientation":p.orientation,onKeyDown:z,role:"listbox",tabIndex:p.listboxState===0?0:void 0,style:{...c.style,...H,"--button-width":yh(p.buttonElement,!0).width},...il(x)}),Ae=Ze();return h.createElement(wg,{enabled:l?e.static||y:!1},h.createElement(Xr.Provider,{value:p.mode===1?p:{...p,isSelected:j}},Ae({ourProps:Fe,theirProps:c,slot:ee,defaultTag:qg,features:zg,visible:C,name:"Listbox.Options"})))}let Kg="div";function Yg(e,t){let n=h.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...s}=e,l=h.useContext(ql)===!0,a=Zn("Listbox.Option"),u=Gr("Listbox.Option"),c=a.activeOptionIndex!==null?a.options[a.activeOptionIndex].id===r:!1,f=a.isSelected(o),m=h.useRef(null),d=Lg(m),p=en({disabled:i,value:o,domRef:m,get textValue(){return d()}}),v=ot(t,m,L=>{L?a.listRef.current.set(r,L):a.listRef.current.delete(r)});pe(()=>{if(!a.__demoMode&&a.listboxState===0&&c&&a.activationTrigger!==0)return At().requestAnimationFrame(()=>{var L,j;(j=(L=m.current)==null?void 0:L.scrollIntoView)==null||j.call(L,{block:"nearest"})})},[m,c,a.__demoMode,a.listboxState,a.activationTrigger,a.activeOptionIndex]),pe(()=>{if(!l)return u.registerOption(r,p)},[p,r,l]);let b=Z(L=>{var j;if(i)return L.preventDefault();u.onChange(o),a.mode===0&&(mt.flushSync(()=>u.closeListbox()),(j=a.buttonElement)==null||j.focus({preventScroll:!0}))}),g=Z(()=>{if(i)return u.goToOption(_e.Nothing);u.goToOption(_e.Specific,r)}),y=Uh(),x=Z(L=>{y.update(L),!i&&(c||u.goToOption(_e.Specific,r,0))}),_=Z(L=>{y.wasMoved(L)&&(i||c||u.goToOption(_e.Specific,r,0))}),$=Z(L=>{y.wasMoved(L)&&(i||c&&u.goToOption(_e.Nothing))}),S=h.useMemo(()=>({active:c,focus:c,selected:f,disabled:i,selectedOption:f&&l}),[c,f,i,l]),C=l?{}:{id:r,ref:v,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:b,onFocus:g,onPointerEnter:x,onMouseEnter:x,onPointerMove:_,onMouseMove:_,onPointerLeave:$,onMouseLeave:$},A=Ze();return!f&&l?null:A({ourProps:C,theirProps:s,slot:S,defaultTag:Kg,name:"Listbox.Option"})}let Gg=h.Fragment;function Xg(e,t){let{options:n,placeholder:r,...i}=e,o={ref:ot(t)},s=Zn("ListboxSelectedOption"),l=h.useMemo(()=>({}),[]),a=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=Ze();return h.createElement(ql.Provider,{value:!0},u({ourProps:o,theirProps:{...i,children:h.createElement(h.Fragment,null,r&&a?r:n)},slot:l,defaultTag:Gg,name:"ListboxSelectedOption"}))}let Jg=Ye(Bg),Qg=Ye(Hg),Zg=ph,ey=Ye(Wg),ty=Ye(Yg),ny=Ye(Xg),Jr=Object.assign(Jg,{Button:Qg,Label:Zg,Options:ey,Option:ty,SelectedOption:ny});const ry=({className:e="",options:t,placeholder:n="Select",errors:r,register:i,setValue:o,name:s,label:l,value:a,trigger:u,isMultiple:c,isFloatingLabel:f,subText:m,labelClass:d="text-[10px]",loading:p})=>{const[v,b]=h.useState(c?[]:null),g=rt("input-control",e);return h.useEffect(()=>{v&&o&&i&&(o(s,v==null?void 0:v.value),i(s),u(s))},[s,i,v,o]),h.useEffect(()=>{const y=t==null?void 0:t.find(x=>typeof x.value=="string"&&typeof a=="string"?x.value.toLowerCase()===a.toLowerCase():typeof x.value=="object"&&typeof a=="object"?x.value.id===(a==null?void 0:a.id):x.value===a);b(y||null)},[a,t]),w.jsxs("div",{className:"relative",children:[!f&&l&&w.jsx("label",{className:"block text-sm text-[#686878] darks:!text-white/70 mb-2",children:l}),f&&w.jsx("label",{className:`z-[40] absolute block text-[#667085] bg-white py-[2px] px-1 -top-[10px] left-3 ${d}`,children:l}),w.jsx(Jr,{value:v,onChange:b,multiple:c,children:w.jsxs("div",{className:"relative",children:[w.jsxs(Jr.Button,{className:g,children:[p?w.jsx("span",{className:" block opacity-60 text-sm text-left",children:"Fetching data ..."}):w.jsx("span",{className:"block truncate text-sm text-left",children:(v==null?void 0:v.label)||w.jsx("span",{className:"opacity-60",children:n})}),w.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:w.jsx(He,{icon:"lucide:chevron-down"})})]}),w.jsx(Og,{as:h.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:w.jsx(Jr.Options,{className:"z-[77] absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white darks:bg-gray-800 text-gray-900 darks:text-white/80 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:t==null?void 0:t.map((y,x)=>w.jsx(Jr.Option,{className:({active:_})=>`relative cursor-default select-none py-2 pl-4 pr-4 text-sm ${_?"bg-gray-100 darks:bg-gray-700 text-gray-900 darks:text-white/80":"text-gray-900 darks:text-white/70 "}`,value:y,children:({selected:_})=>w.jsx("div",{className:`block truncate text-sm ${_?"font-medium":"font-normal"}`,children:y.label})},x))})})]})}),!r&&m&&w.jsx("p",{className:"text-[10px] text-[#98A2B3] leading-normal mt-[6px]",children:m}),r&&w.jsx("span",{className:"text-sm text-red-500",children:r.message})]})};function zl({element:e}){return w.jsx("div",{children:w.jsx(ry,{options:(e==null?void 0:e.options)??[],name:""})})}function Wl({element:e,validationData:t}){const{register:n=()=>({})}=t||{};return w.jsx("textarea",{placeholder:e.placeholder,rows:4,className:"input-control resize-none",...n(e.id)})}var er=e=>e.type==="checkbox",sn=e=>e instanceof Date,qe=e=>e==null;const Kl=e=>typeof e=="object";var ve=e=>!qe(e)&&!Array.isArray(e)&&Kl(e)&&!sn(e),iy=e=>ve(e)&&e.target?er(e.target)?e.target.checked:e.target.value:e,oy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,sy=(e,t)=>e.has(oy(t)),ay=e=>{const t=e.constructor&&e.constructor.prototype;return ve(t)&&t.hasOwnProperty("isPrototypeOf")},ko=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ko&&(e instanceof Blob||r))&&(n||ve(e)))if(t=n?[]:{},!n&&!ay(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=je(e[i]));else return e;return t}var tr=e=>Array.isArray(e)?e.filter(Boolean):[],ce=e=>e===void 0,B=(e,t,n)=>{if(!t||!ve(e))return n;const r=tr(t.split(/[,[\].]+?/)).reduce((i,o)=>qe(i)?i:i[o],e);return ce(r)||r===e?ce(e[t])?n:e[t]:r},xt=e=>typeof e=="boolean",$o=e=>/^\w*$/.test(e),Yl=e=>tr(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ie=(e,t,n)=>{let r=-1;const i=$o(t)?[t]:Yl(t),o=i.length,s=o-1;for(;++r<o;){const l=i[r];let a=n;if(r!==s){const u=e[l];a=ve(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=a,e=e[l]}return e};const Gl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},st={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Xl=h.createContext(null),ly=()=>h.useContext(Xl),uy=e=>{const{children:t,...n}=e;return h.createElement(Xl.Provider,{value:n},t)};var cy=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==st.all&&(t._proxyFormState[s]=!r||st.all),e[s]}});return i},ze=e=>ve(e)&&!Object.keys(e).length,fy=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return ze(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===st.all)},tt=e=>Array.isArray(e)?e:[e];function Jl(e){const t=h.useRef(e);t.current=e,h.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var wt=e=>typeof e=="string",dy=(e,t,n,r,i)=>wt(e)?(r&&t.watch.add(e),B(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),B(n,o))):(r&&(t.watchAll=!0),n),Ql=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Ut=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},Oo=(e,t,n={})=>n.shouldFocus||ce(n.shouldFocus)?n.focusName||`${e}.${ce(n.focusIndex)?t:n.focusIndex}.`:"",nr=e=>({isOnSubmit:!e||e===st.onSubmit,isOnBlur:e===st.onBlur,isOnChange:e===st.onChange,isOnAll:e===st.all,isOnTouch:e===st.onTouched}),Ao=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const wn=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=B(e,i);if(o){const{_f:s,...l}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(wn(l,t))break}else if(ve(l)&&wn(l,t))break}}};var Zl=(e,t,n)=>{const r=tt(B(e,n));return ie(r,"root",t[n]),ie(e,n,r),e},Do=e=>e.type==="file",Et=e=>typeof e=="function",Qr=e=>{if(!ko)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zr=e=>wt(e),Lo=e=>e.type==="radio",ei=e=>e instanceof RegExp;const eu={value:!1,isValid:!1},tu={value:!0,isValid:!0};var nu=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ce(e[0].attributes.value)?ce(e[0].value)||e[0].value===""?tu:{value:e[0].value,isValid:!0}:tu:eu}return eu};const ru={isValid:!1,value:null};var iu=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ru):ru;function ou(e,t,n="validate"){if(Zr(e)||Array.isArray(e)&&e.every(Zr)||xt(e)&&!e)return{type:n,message:Zr(e)?e:"",ref:t}}var En=e=>ve(e)&&!ei(e)?e:{value:e,message:""},Po=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:l,maxLength:a,minLength:u,min:c,max:f,pattern:m,validate:d,name:p,valueAsNumber:v,mount:b,disabled:g}=e._f,y=B(t,p);if(!b||g)return{};const x=s?s[0]:o,_=I=>{r&&x.reportValidity&&(x.setCustomValidity(xt(I)?"":I||""),x.reportValidity())},$={},S=Lo(o),C=er(o),A=S||C,L=(v||Do(o))&&ce(o.value)&&ce(y)||Qr(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,j=Ql.bind(null,p,n,$),D=(I,V,H,Y=Dt.maxLength,X=Dt.minLength)=>{const G=I?V:H;$[p]={type:I?Y:X,message:G,ref:o,...j(I?Y:X,G)}};if(i?!Array.isArray(y)||!y.length:l&&(!A&&(L||qe(y))||xt(y)&&!y||C&&!nu(s).isValid||S&&!iu(s).isValid)){const{value:I,message:V}=Zr(l)?{value:!!l,message:l}:En(l);if(I&&($[p]={type:Dt.required,message:V,ref:x,...j(Dt.required,V)},!n))return _(V),$}if(!L&&(!qe(c)||!qe(f))){let I,V;const H=En(f),Y=En(c);if(!qe(y)&&!isNaN(y)){const X=o.valueAsNumber||y&&+y;qe(H.value)||(I=X>H.value),qe(Y.value)||(V=X<Y.value)}else{const X=o.valueAsDate||new Date(y),G=ee=>new Date(new Date().toDateString()+" "+ee),z=o.type=="time",Q=o.type=="week";wt(H.value)&&y&&(I=z?G(y)>G(H.value):Q?y>H.value:X>new Date(H.value)),wt(Y.value)&&y&&(V=z?G(y)<G(Y.value):Q?y<Y.value:X<new Date(Y.value))}if((I||V)&&(D(!!I,H.message,Y.message,Dt.max,Dt.min),!n))return _($[p].message),$}if((a||u)&&!L&&(wt(y)||i&&Array.isArray(y))){const I=En(a),V=En(u),H=!qe(I.value)&&y.length>+I.value,Y=!qe(V.value)&&y.length<+V.value;if((H||Y)&&(D(H,I.message,V.message),!n))return _($[p].message),$}if(m&&!L&&wt(y)){const{value:I,message:V}=En(m);if(ei(I)&&!y.match(I)&&($[p]={type:Dt.pattern,message:V,ref:o,...j(Dt.pattern,V)},!n))return _(V),$}if(d){if(Et(d)){const I=await d(y,t),V=ou(I,x);if(V&&($[p]={...V,...j(Dt.validate,V.message)},!n))return _(V.message),$}else if(ve(d)){let I={};for(const V in d){if(!ze(I)&&!n)break;const H=ou(await d[V](y,t),x,V);H&&(I={...H,...j(V,H.message)},_(H.message),n&&($[p]=I))}if(!ze(I)&&($[p]={ref:x,...I},!n))return $}}return _(!0),$},jo=(e,t)=>[...e,...tt(t)],No=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Io(e,t,n){return[...e.slice(0,t),...tt(n),...e.slice(t)]}var Mo=(e,t,n)=>Array.isArray(e)?(ce(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Vo=(e,t)=>[...tt(t),...tt(e)];function py(e,t){let n=0;const r=[...e];for(const i of t)r.splice(i-n,1),n++;return tr(r).length?r:[]}var Ro=(e,t)=>ce(t)?[]:py(e,tt(t).sort((n,r)=>n-r)),Bo=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function hy(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ce(e)?r++:e[t[r++]];return e}function my(e){for(const t in e)if(e.hasOwnProperty(t)&&!ce(e[t]))return!1;return!0}function Te(e,t){const n=Array.isArray(t)?t:$o(t)?[t]:Yl(t),r=n.length===1?e:hy(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(ve(r)&&ze(r)||Array.isArray(r)&&my(r))&&Te(e,n.slice(0,-1)),e}var su=(e,t,n)=>(e[t]=n,e);function gy(e){const t=ly(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o,rules:s}=e,[l,a]=h.useState(n._getFieldArray(r)),u=h.useRef(n._getFieldArray(r).map(Ut)),c=h.useRef(l),f=h.useRef(r),m=h.useRef(!1);f.current=r,c.current=l,n._names.array.add(r),s&&n.register(r,s),Jl({next:({values:S,name:C})=>{if(C===f.current||!C){const A=B(S,f.current);Array.isArray(A)&&(a(A),u.current=A.map(Ut))}},subject:n._subjects.array});const d=h.useCallback(S=>{m.current=!0,n._updateFieldArray(r,S)},[n,r]),p=(S,C)=>{const A=tt(je(S)),L=jo(n._getFieldArray(r),A);n._names.focus=Oo(r,L.length-1,C),u.current=jo(u.current,A.map(Ut)),d(L),a(L),n._updateFieldArray(r,L,jo,{argA:No(S)})},v=(S,C)=>{const A=tt(je(S)),L=Vo(n._getFieldArray(r),A);n._names.focus=Oo(r,0,C),u.current=Vo(u.current,A.map(Ut)),d(L),a(L),n._updateFieldArray(r,L,Vo,{argA:No(S)})},b=S=>{const C=Ro(n._getFieldArray(r),S);u.current=Ro(u.current,S),d(C),a(C),!Array.isArray(B(n._fields,r))&&ie(n._fields,r,void 0),n._updateFieldArray(r,C,Ro,{argA:S})},g=(S,C,A)=>{const L=tt(je(C)),j=Io(n._getFieldArray(r),S,L);n._names.focus=Oo(r,S,A),u.current=Io(u.current,S,L.map(Ut)),d(j),a(j),n._updateFieldArray(r,j,Io,{argA:S,argB:No(C)})},y=(S,C)=>{const A=n._getFieldArray(r);Bo(A,S,C),Bo(u.current,S,C),d(A),a(A),n._updateFieldArray(r,A,Bo,{argA:S,argB:C},!1)},x=(S,C)=>{const A=n._getFieldArray(r);Mo(A,S,C),Mo(u.current,S,C),d(A),a(A),n._updateFieldArray(r,A,Mo,{argA:S,argB:C},!1)},_=(S,C)=>{const A=je(C),L=su(n._getFieldArray(r),S,A);u.current=[...L].map((j,D)=>!j||D===S?Ut():u.current[D]),d(L),a([...L]),n._updateFieldArray(r,L,su,{argA:S,argB:A},!0,!1)},$=S=>{const C=tt(je(S));u.current=C.map(Ut),d([...C]),a([...C]),n._updateFieldArray(r,[...C],A=>A,{},!0,!1)};return h.useEffect(()=>{if(n._state.action=!1,Ao(r,n._names)&&n._subjects.state.next({...n._formState}),m.current&&(!nr(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const C=B(S.errors,r),A=B(n._formState.errors,r);(A?!C&&A.type||C&&(A.type!==C.type||A.message!==C.message):C&&C.type)&&(C?ie(n._formState.errors,r,C):Te(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=B(n._fields,r);S&&S._f&&!(nr(n._options.reValidateMode).isOnSubmit&&nr(n._options.mode).isOnSubmit)&&Po(S,n._formValues,n._options.criteriaMode===st.all,n._options.shouldUseNativeValidation,!0).then(C=>!ze(C)&&n._subjects.state.next({errors:Zl(n._formState.errors,C,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&wn(n._fields,(S,C)=>{if(n._names.focus&&C.startsWith(n._names.focus)&&S.focus)return S.focus(),1}),n._names.focus="",n._updateValid(),m.current=!1},[l,r,n]),h.useEffect(()=>(!B(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)}),[r,n,i,o]),{swap:h.useCallback(y,[d,r,n]),move:h.useCallback(x,[d,r,n]),prepend:h.useCallback(v,[d,r,n]),append:h.useCallback(p,[d,r,n]),remove:h.useCallback(b,[d,r,n]),insert:h.useCallback(g,[d,r,n]),update:h.useCallback(_,[d,r,n]),replace:h.useCallback($,[d,r,n]),fields:h.useMemo(()=>l.map((S,C)=>({...S,[i]:u.current[C]||Ut()})),[l,i])}}var Uo=()=>{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},Ho=e=>qe(e)||!Kl(e);function Ht(e,t){if(Ho(e)||Ho(t))return e===t;if(sn(e)&&sn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(sn(o)&&sn(s)||ve(o)&&ve(s)||Array.isArray(o)&&Array.isArray(s)?!Ht(o,s):o!==s)return!1}}return!0}var au=e=>e.type==="select-multiple",yy=e=>Lo(e)||er(e),qo=e=>Qr(e)&&e.isConnected,lu=e=>{for(const t in e)if(Et(e[t]))return!0;return!1};function ti(e,t={}){const n=Array.isArray(e);if(ve(e)||n)for(const r in e)Array.isArray(e[r])||ve(e[r])&&!lu(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ti(e[r],t[r])):qe(e[r])||(t[r]=!0);return t}function uu(e,t,n){const r=Array.isArray(e);if(ve(e)||r)for(const i in e)Array.isArray(e[i])||ve(e[i])&&!lu(e[i])?ce(t)||Ho(n[i])?n[i]=Array.isArray(e[i])?ti(e[i],[]):{...ti(e[i])}:uu(e[i],qe(t)?{}:t[i],n[i]):n[i]=!Ht(e[i],t[i]);return n}var rr=(e,t)=>uu(e,t,ti(t)),cu=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ce(e)?e:t?e===""?NaN:e&&+e:n&&wt(e)?new Date(e):r?r(e):e;function zo(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Do(t)?t.files:Lo(t)?iu(e.refs).value:au(t)?[...t.selectedOptions].map(({value:n})=>n):er(t)?nu(e.refs).value:cu(ce(t.value)?e.ref.value:t.value,e)}var vy=(e,t,n,r)=>{const i={};for(const o of e){const s=B(t,o);s&&ie(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},ir=e=>ce(e)?e:ei(e)?e.source:ve(e)?ei(e.value)?e.value.source:e.value:e;const fu="AsyncFunction";var by=e=>!!e&&!!e.validate&&!!(Et(e.validate)&&e.validate.constructor.name===fu||ve(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===fu)),xy=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function du(e,t,n){const r=B(e,n);if(r||$o(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=B(t,o),l=B(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(l&&l.type)return{name:o,error:l};i.pop()}return{name:n}}var wy=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Ey=(e,t)=>!tr(B(e,t)).length&&Te(e,t);const Ty={mode:st.onSubmit,reValidateMode:st.onChange,shouldFocusError:!0};function Sy(e={}){let t={...Ty,...e},n={submitCount:0,isDirty:!1,isLoading:Et(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=ve(t.defaultValues)||ve(t.values)?je(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:je(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},a,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Uo(),array:Uo(),state:Uo()},m=nr(t.mode),d=nr(t.reValidateMode),p=t.criteriaMode===st.all,v=T=>F=>{clearTimeout(u),u=setTimeout(T,F)},b=async T=>{if(!t.disabled&&(c.isValid||T)){const F=t.resolver?ze((await A()).errors):await j(r,!0);F!==n.isValid&&f.state.next({isValid:F})}},g=(T,F)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((T||Array.from(l.mount)).forEach(O=>{O&&(F?ie(n.validatingFields,O,F):Te(n.validatingFields,O))}),f.state.next({validatingFields:n.validatingFields,isValidating:!ze(n.validatingFields)}))},y=(T,F=[],O,R,M=!0,N=!0)=>{if(R&&O&&!t.disabled){if(s.action=!0,N&&Array.isArray(B(r,T))){const W=O(B(r,T),R.argA,R.argB);M&&ie(r,T,W)}if(N&&Array.isArray(B(n.errors,T))){const W=O(B(n.errors,T),R.argA,R.argB);M&&ie(n.errors,T,W),Ey(n.errors,T)}if(c.touchedFields&&N&&Array.isArray(B(n.touchedFields,T))){const W=O(B(n.touchedFields,T),R.argA,R.argB);M&&ie(n.touchedFields,T,W)}c.dirtyFields&&(n.dirtyFields=rr(i,o)),f.state.next({name:T,isDirty:I(T,F),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ie(o,T,F)},x=(T,F)=>{ie(n.errors,T,F),f.state.next({errors:n.errors})},_=T=>{n.errors=T,f.state.next({errors:n.errors,isValid:!1})},$=(T,F,O,R)=>{const M=B(r,T);if(M){const N=B(o,T,ce(O)?B(i,T):O);ce(N)||R&&R.defaultChecked||F?ie(o,T,F?N:zo(M._f)):Y(T,N),s.mount&&b()}},S=(T,F,O,R,M)=>{let N=!1,W=!1;const K={name:T};if(!t.disabled){const he=!!(B(r,T)&&B(r,T)._f&&B(r,T)._f.disabled);if(!O||R){c.isDirty&&(W=n.isDirty,n.isDirty=K.isDirty=I(),N=W!==K.isDirty);const fe=he||Ht(B(i,T),F);W=!!(!he&&B(n.dirtyFields,T)),fe||he?Te(n.dirtyFields,T):ie(n.dirtyFields,T,!0),K.dirtyFields=n.dirtyFields,N=N||c.dirtyFields&&W!==!fe}if(O){const fe=B(n.touchedFields,T);fe||(ie(n.touchedFields,T,O),K.touchedFields=n.touchedFields,N=N||c.touchedFields&&fe!==O)}N&&M&&f.state.next(K)}return N?K:{}},C=(T,F,O,R)=>{const M=B(n.errors,T),N=c.isValid&&xt(F)&&n.isValid!==F;if(t.delayError&&O?(a=v(()=>x(T,O)),a(t.delayError)):(clearTimeout(u),a=null,O?ie(n.errors,T,O):Te(n.errors,T)),(O?!Ht(M,O):M)||!ze(R)||N){const W={...R,...N&&xt(F)?{isValid:F}:{},errors:n.errors,name:T};n={...n,...W},f.state.next(W)}},A=async T=>{g(T,!0);const F=await t.resolver(o,t.context,vy(T||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(T),F},L=async T=>{const{errors:F}=await A(T);if(T)for(const O of T){const R=B(F,O);R?ie(n.errors,O,R):Te(n.errors,O)}else n.errors=F;return F},j=async(T,F,O={valid:!0})=>{for(const R in T){const M=T[R];if(M){const{_f:N,...W}=M;if(N){const K=l.array.has(N.name),he=M._f&&by(M._f);he&&c.validatingFields&&g([R],!0);const fe=await Po(M,o,p,t.shouldUseNativeValidation&&!F,K);if(he&&c.validatingFields&&g([R]),fe[N.name]&&(O.valid=!1,F))break;!F&&(B(fe,N.name)?K?Zl(n.errors,fe,N.name):ie(n.errors,N.name,fe[N.name]):Te(n.errors,N.name))}!ze(W)&&await j(W,F,O)}}return O.valid},D=()=>{for(const T of l.unMount){const F=B(r,T);F&&(F._f.refs?F._f.refs.every(O=>!qo(O)):!qo(F._f.ref))&&oe(T)}l.unMount=new Set},I=(T,F)=>!t.disabled&&(T&&F&&ie(o,T,F),!Ht(Fe(),i)),V=(T,F,O)=>dy(T,l,{...s.mount?o:ce(F)?i:wt(T)?{[T]:F}:F},O,F),H=T=>tr(B(s.mount?o:i,T,t.shouldUnregister?B(i,T,[]):[])),Y=(T,F,O={})=>{const R=B(r,T);let M=F;if(R){const N=R._f;N&&(!N.disabled&&ie(o,T,cu(F,N)),M=Qr(N.ref)&&qe(F)?"":F,au(N.ref)?[...N.ref.options].forEach(W=>W.selected=M.includes(W.value)):N.refs?er(N.ref)?N.refs.length>1?N.refs.forEach(W=>(!W.defaultChecked||!W.disabled)&&(W.checked=Array.isArray(M)?!!M.find(K=>K===W.value):M===W.value)):N.refs[0]&&(N.refs[0].checked=!!M):N.refs.forEach(W=>W.checked=W.value===M):Do(N.ref)?N.ref.value="":(N.ref.value=M,N.ref.type||f.values.next({name:T,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&S(T,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&ee(T)},X=(T,F,O)=>{for(const R in F){const M=F[R],N=`${T}.${R}`,W=B(r,N);(l.array.has(T)||ve(M)||W&&!W._f)&&!sn(M)?X(N,M,O):Y(N,M,O)}},G=(T,F,O={})=>{const R=B(r,T),M=l.array.has(T),N=je(F);ie(o,T,N),M?(f.array.next({name:T,values:{...o}}),(c.isDirty||c.dirtyFields)&&O.shouldDirty&&f.state.next({name:T,dirtyFields:rr(i,o),isDirty:I(T,N)})):R&&!R._f&&!qe(N)?X(T,N,O):Y(T,N,O),Ao(T,l)&&f.state.next({...n}),f.values.next({name:s.mount?T:void 0,values:{...o}})},z=async T=>{s.mount=!0;const F=T.target;let O=F.name,R=!0;const M=B(r,O),N=()=>F.type?zo(M._f):iy(T),W=K=>{R=Number.isNaN(K)||sn(K)&&isNaN(K.getTime())||Ht(K,B(o,O,K))};if(M){let K,he;const fe=N(),pt=T.type===Gl.BLUR||T.type===Gl.FOCUS_OUT,_n=!xy(M._f)&&!t.resolver&&!B(n.errors,O)&&!M._f.deps||wy(pt,B(n.touchedFields,O),n.isSubmitted,d,m),zt=Ao(O,l,pt);ie(o,O,fe),pt?(M._f.onBlur&&M._f.onBlur(T),a&&a(0)):M._f.onChange&&M._f.onChange(T);const It=S(O,fe,pt,!1),ur=!ze(It)||zt;if(!pt&&f.values.next({name:O,type:T.type,values:{...o}}),_n)return c.isValid&&(t.mode==="onBlur"?pt&&b():b()),ur&&f.state.next({name:O,...zt?{}:It});if(!pt&&zt&&f.state.next({...n}),t.resolver){const{errors:fn}=await A([O]);if(W(fe),R){const cr=du(n.errors,r,O),me=du(fn,r,cr.name||O);K=me.error,O=me.name,he=ze(fn)}}else g([O],!0),K=(await Po(M,o,p,t.shouldUseNativeValidation))[O],g([O]),W(fe),R&&(K?he=!1:c.isValid&&(he=await j(r,!0)));R&&(M._f.deps&&ee(M._f.deps),C(O,he,K,It))}},Q=(T,F)=>{if(B(n.errors,F)&&T.focus)return T.focus(),1},ee=async(T,F={})=>{let O,R;const M=tt(T);if(t.resolver){const N=await L(ce(T)?T:M);O=ze(N),R=T?!M.some(W=>B(N,W)):O}else T?(R=(await Promise.all(M.map(async N=>{const W=B(r,N);return await j(W&&W._f?{[N]:W}:W)}))).every(Boolean),!(!R&&!n.isValid)&&b()):R=O=await j(r);return f.state.next({...!wt(T)||c.isValid&&O!==n.isValid?{}:{name:T},...t.resolver||!T?{isValid:O}:{},errors:n.errors}),F.shouldFocus&&!R&&wn(r,Q,T?M:l.mount),R},Fe=T=>{const F={...s.mount?o:i};return ce(T)?F:wt(T)?B(F,T):T.map(O=>B(F,O))},Ae=(T,F)=>({invalid:!!B((F||n).errors,T),isDirty:!!B((F||n).dirtyFields,T),error:B((F||n).errors,T),isValidating:!!B(n.validatingFields,T),isTouched:!!B((F||n).touchedFields,T)}),q=T=>{T&&tt(T).forEach(F=>Te(n.errors,F)),f.state.next({errors:T?n.errors:{}})},ge=(T,F,O)=>{const R=(B(r,T,{_f:{}})._f||{}).ref,M=B(n.errors,T)||{},{ref:N,message:W,type:K,...he}=M;ie(n.errors,T,{...he,...F,ref:R}),f.state.next({name:T,errors:n.errors,isValid:!1}),O&&O.shouldFocus&&R&&R.focus&&R.focus()},be=(T,F)=>Et(T)?f.values.subscribe({next:O=>T(V(void 0,F),O)}):V(T,F,!0),oe=(T,F={})=>{for(const O of T?tt(T):l.mount)l.mount.delete(O),l.array.delete(O),F.keepValue||(Te(r,O),Te(o,O)),!F.keepError&&Te(n.errors,O),!F.keepDirty&&Te(n.dirtyFields,O),!F.keepTouched&&Te(n.touchedFields,O),!F.keepIsValidating&&Te(n.validatingFields,O),!t.shouldUnregister&&!F.keepDefaultValue&&Te(i,O);f.values.next({values:{...o}}),f.state.next({...n,...F.keepDirty?{isDirty:I()}:{}}),!F.keepIsValid&&b()},ke=({disabled:T,name:F,field:O,fields:R,value:M})=>{if(xt(T)&&s.mount||T){const N=T?void 0:ce(M)?zo(O?O._f:B(R,F)._f):M;(T||!T&&!ce(N))&&ie(o,F,N),S(F,N,!1,!1,!0)}},xe=(T,F={})=>{let O=B(r,T);const R=xt(F.disabled)||xt(t.disabled);return ie(r,T,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:T}},name:T,mount:!0,...F}}),l.mount.add(T),O?ke({field:O,disabled:xt(F.disabled)?F.disabled:t.disabled,name:T,value:F.value}):$(T,!0,F.value),{...R?{disabled:F.disabled||t.disabled}:{},...t.progressive?{required:!!F.required,min:ir(F.min),max:ir(F.max),minLength:ir(F.minLength),maxLength:ir(F.maxLength),pattern:ir(F.pattern)}:{},name:T,onChange:z,onBlur:z,ref:M=>{if(M){xe(T,F),O=B(r,T);const N=ce(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,W=yy(N),K=O._f.refs||[];if(W?K.find(he=>he===N):N===O._f.ref)return;ie(r,T,{_f:{...O._f,...W?{refs:[...K.filter(qo),N,...Array.isArray(B(i,T))?[{}]:[]],ref:{type:N.type,name:T}}:{ref:N}}}),$(T,!1,void 0,N)}else O=B(r,T,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||F.shouldUnregister)&&!(sy(l.array,T)&&s.action)&&l.unMount.add(T)}}},De=()=>t.shouldFocusError&&wn(r,Q,l.mount),dt=T=>{xt(T)&&(f.state.next({disabled:T}),wn(r,(F,O)=>{const R=B(r,O);R&&(F.disabled=R._f.disabled||T,Array.isArray(R._f.refs)&&R._f.refs.forEach(M=>{M.disabled=R._f.disabled||T}))},0,!1))},we=(T,F)=>async O=>{let R;if(O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist()),t.disabled){F&&await F({...n.errors},O);return}let M=je(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:N,values:W}=await A();n.errors=N,M=W}else await j(r);if(Te(n.errors,"root"),ze(n.errors)){f.state.next({errors:{}});try{await T(M,O)}catch(N){R=N}}else F&&await F({...n.errors},O),De(),setTimeout(De);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ze(n.errors)&&!R,submitCount:n.submitCount+1,errors:n.errors}),R)throw R},ne=(T,F={})=>{B(r,T)&&(ce(F.defaultValue)?G(T,je(B(i,T))):(G(T,F.defaultValue),ie(i,T,je(F.defaultValue))),F.keepTouched||Te(n.touchedFields,T),F.keepDirty||(Te(n.dirtyFields,T),n.isDirty=F.defaultValue?I(T,je(B(i,T))):I()),F.keepError||(Te(n.errors,T),c.isValid&&b()),f.state.next({...n}))},de=(T,F={})=>{const O=T?je(T):i,R=je(O),M=ze(T),N=M?i:R;if(F.keepDefaultValues||(i=O),!F.keepValues){if(F.keepDirtyValues){const W=new Set([...l.mount,...Object.keys(rr(i,o))]);for(const K of Array.from(W))B(n.dirtyFields,K)?ie(N,K,B(o,K)):G(K,B(N,K))}else{if(ko&&ce(T))for(const W of l.mount){const K=B(r,W);if(K&&K._f){const he=Array.isArray(K._f.refs)?K._f.refs[0]:K._f.ref;if(Qr(he)){const fe=he.closest("form");if(fe){fe.reset();break}}}}r={}}o=t.shouldUnregister?F.keepDefaultValues?je(i):{}:je(N),f.array.next({values:{...N}}),f.values.next({values:{...N}})}l={mount:F.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!F.keepIsValid||!!F.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:F.keepSubmitCount?n.submitCount:0,isDirty:M?!1:F.keepDirty?n.isDirty:!!(F.keepDefaultValues&&!Ht(T,i)),isSubmitted:F.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:M?{}:F.keepDirtyValues?F.keepDefaultValues&&o?rr(i,o):n.dirtyFields:F.keepDefaultValues&&T?rr(i,T):F.keepDirty?n.dirtyFields:{},touchedFields:F.keepTouched?n.touchedFields:{},errors:F.keepErrors?n.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},$e=(T,F)=>de(Et(T)?T(o):T,F);return{control:{register:xe,unregister:oe,getFieldState:Ae,handleSubmit:we,setError:ge,_executeSchema:A,_getWatch:V,_getDirty:I,_updateValid:b,_removeUnmounted:D,_updateFieldArray:y,_updateDisabledField:ke,_getFieldArray:H,_reset:de,_resetDefaultValues:()=>Et(t.defaultValues)&&t.defaultValues().then(T=>{$e(T,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:T=>{n={...n,...T}},_disableForm:dt,_subjects:f,_proxyFormState:c,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(T){s=T},get _defaultValues(){return i},get _names(){return l},set _names(T){l=T},get _formState(){return n},set _formState(T){n=T},get _options(){return t},set _options(T){t={...t,...T}}},trigger:ee,register:xe,handleSubmit:we,watch:be,setValue:G,getValues:Fe,reset:$e,resetField:ne,clearErrors:q,unregister:oe,setError:ge,setFocus:(T,F={})=>{const O=B(r,T),R=O&&O._f;if(R){const M=R.refs?R.refs[0]:R.ref;M.focus&&(M.focus(),F.shouldSelect&&Et(M.select)&&M.select())}},getFieldState:Ae}}function Wo(e={}){const t=h.useRef(),n=h.useRef(),[r,i]=h.useState({isDirty:!1,isValidating:!1,isLoading:Et(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Et(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Sy(e),formState:r});const o=t.current.control;return o._options=e,Jl({subject:o._subjects.state,next:s=>{fy(s,o._proxyFormState,o._updateFormState)&&i({...o._formState})}}),h.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),h.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),h.useEffect(()=>{e.values&&!Ht(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[e.values,o]),h.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),h.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),h.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),h.useMemo(()=>({...t.current,formState:cy(r,o)}),[r,o])}const pu=(e,t,n)=>{if(e&&"reportValidity"in e){const r=B(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},hu=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?pu(r.ref,n,e):r.refs&&r.refs.forEach(i=>pu(i,n,e))}},_y=(e,t)=>{t.shouldUseNativeValidation&&hu(e,t);const n={};for(const r in e){const i=B(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Cy(t.names||Object.keys(e),r)){const s=Object.assign({},B(n,r));ie(s,"root",o),ie(n,r,s)}else ie(n,r,o)}return n},Cy=(e,t)=>e.some(n=>n.startsWith(t+"."));function Ko(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,l){try{var a=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[n.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:i}))).then(function(u){return o.shouldUseNativeValidation&&hu({},o),{values:n.raw?r:u,errors:{}}}))}catch(u){return l(u)}return a&&a.then?a.then(void 0,l):a}(0,function(s){if(!s.inner)throw s;return{values:{},errors:_y((l=s,a=!o.shouldUseNativeValidation&&o.criteriaMode==="all",(l.inner||[]).reduce(function(u,c){if(u[c.path]||(u[c.path]={message:c.message,type:c.type}),a){var f=u[c.path].types,m=f&&f[c.type];u[c.path]=Ql(c.path,a,u,c.type,m?[].concat(m,c.message):c.message)}return u},{})),o)};var l,a}))}catch(s){return Promise.reject(s)}}}var Yo,mu;function Fy(){if(mu)return Yo;mu=1;function e(g){this._maxSize=g,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(g){return this._values[g]},e.prototype.set=function(g,y){return this._size>=this._maxSize&&this.clear(),g in this._values||this._size++,this._values[g]=y};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,l=new e(s),a=new e(s),u=new e(s);Yo={Cache:e,split:f,normalizePath:c,setter:function(g){var y=c(g);return a.get(g)||a.set(g,function(_,$){for(var S=0,C=y.length,A=_;S<C-1;){var L=y[S];if(L==="__proto__"||L==="constructor"||L==="prototype")return _;A=A[y[S++]]}A[y[S]]=$})},getter:function(g,y){var x=c(g);return u.get(g)||u.set(g,function($){for(var S=0,C=x.length;S<C;)if($!=null||!y)$=$[x[S++]];else return;return $})},join:function(g){return g.reduce(function(y,x){return y+(d(x)||n.test(x)?"["+x+"]":(y?".":"")+x)},"")},forEach:function(g,y,x){m(Array.isArray(g)?g:f(g),y,x)}};function c(g){return l.get(g)||l.set(g,f(g).map(function(y){return y.replace(o,"$2")}))}function f(g){return g.match(t)||[""]}function m(g,y,x){var _=g.length,$,S,C,A;for(S=0;S<_;S++)$=g[S],$&&(b($)&&($='"'+$+'"'),A=d($),C=!A&&/^\d+$/.test($),y.call(x,$,A,C,S,g))}function d(g){return typeof g=="string"&&g&&["'",'"'].indexOf(g.charAt(0))!==-1}function p(g){return g.match(r)&&!g.match(n)}function v(g){return i.test(g)}function b(g){return!d(g)&&(p(g)||v(g))}return Yo}var an=Fy(),Go,gu;function ky(){if(gu)return Go;gu=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \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\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],n=c=>c[0].toUpperCase()+c.slice(1),r=(c,f)=>t(c).join(f).toLowerCase(),i=c=>t(c).reduce((f,m)=>`${f}${f?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Go={words:t,upperFirst:n,camelCase:i,pascalCase:c=>n(i(c)),snakeCase:c=>r(c,"_"),kebabCase:c=>r(c,"-"),sentenceCase:c=>n(r(c," ")),titleCase:c=>t(c).map(n).join(" ")},Go}var Xo=ky(),ni={exports:{}},yu;function $y(){if(yu)return ni.exports;yu=1,ni.exports=function(i){return e(t(i),i)},ni.exports.array=e;function e(i,o){var s=i.length,l=new Array(s),a={},u=s,c=n(o),f=r(i);for(o.forEach(function(d){if(!f.has(d[0])||!f.has(d[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)a[u]||m(i[u],u,new Set);return l;function m(d,p,v){if(v.has(d)){var b;try{b=", node was:"+JSON.stringify(d)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!f.has(d))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(d));if(!a[p]){a[p]=!0;var g=c.get(d)||new Set;if(g=Array.from(g),p=g.length){v.add(d);do{var y=g[--p];m(y,f.get(y),v)}while(p);v.delete(d)}l[--s]=d}}}function t(i){for(var o=new Set,s=0,l=i.length;s<l;s++){var a=i[s];o.add(a[0]),o.add(a[1])}return Array.from(o)}function n(i){for(var o=new Map,s=0,l=i.length;s<l;s++){var a=i[s];o.has(a[0])||o.set(a[0],new Set),o.has(a[1])||o.set(a[1],new Set),o.get(a[0]).add(a[1])}return o}function r(i){for(var o=new Map,s=0,l=i.length;s<l;s++)o.set(i[s],s);return o}return ni.exports}var Oy=$y();const Ay=qu(Oy),Dy=Object.prototype.toString,Ly=Error.prototype.toString,Py=RegExp.prototype.toString,jy=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ny=/^Symbol\((.*)\)(.*)$/;function Iy(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function vu(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Iy(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return jy.call(e).replace(Ny,"Symbol($1)");const r=Dy.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Ly.call(e)+"]":r==="RegExp"?Py.call(e):null}function Lt(e,t){let n=vu(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let o=vu(this[r],t);return o!==null?o:i},2)}function bu(e){return e==null?[]:[].concat(e)}let xu,wu,Eu,My=/\$\{\s*(\w+)\s*\}/g;xu=Symbol.toStringTag;class Tu{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[xu]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],bu(t).forEach(o=>{if(Ge.isError(o)){this.errors.push(...o.errors);const s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}wu=Symbol.hasInstance,Eu=Symbol.toStringTag;class Ge extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(My,(i,o)=>Lt(n[o])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,o){const s=new Tu(t,n,r,i);if(o)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Eu]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ge)}static[wu](t){return Tu[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Tt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Lt(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Lt(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Lt(n,!0)}\``+i}},Xe={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},qt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Jo={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Qo={isValue:"${path} field must be ${value}"},ri={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},ii={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:Tt,string:Xe,number:qt,date:Jo,object:ri,array:ii,boolean:Qo,tuple:{notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Lt(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Lt(n,!0)}\``}return Ge.formatError(Tt.notType,e)}}});const oi=e=>e&&e.__isYupSchema__;class si{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:o}=n,s=typeof r=="function"?r:(...l)=>l.every(a=>a===r);return new si(t,(l,a)=>{var u;let c=s(...l)?i:o;return(u=c==null?void 0:c(a))!=null?u:a})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(o=>o.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!oi(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const ai={context:"$",value:"."};class ln{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ai.context,this.isValue=this.key[0]===ai.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?ai.context:this.isValue?ai.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&an.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}ln.prototype.__isYupRef=!0;const ft=e=>e==null;function Tn(e){function t({value:n,path:r="",options:i,originalValue:o,schema:s},l,a){const{name:u,test:c,params:f,message:m,skipAbsent:d}=e;let{parent:p,context:v,abortEarly:b=s.spec.abortEarly,disableStackTrace:g=s.spec.disableStackTrace}=i;function y(D){return ln.isRef(D)?D.getValue(n,p,v):D}function x(D={}){const I=Object.assign({value:n,originalValue:o,label:s.spec.label,path:D.path||r,spec:s.spec,disableStackTrace:D.disableStackTrace||g},f,D.params);for(const H of Object.keys(I))I[H]=y(I[H]);const V=new Ge(Ge.formatError(D.message||m,I),n,I.path,D.type||u,I.disableStackTrace);return V.params=I,V}const _=b?l:a;let $={path:r,parent:p,type:u,from:i.from,createError:x,resolve:y,options:i,originalValue:o,schema:s};const S=D=>{Ge.isError(D)?_(D):D?a(null):_(x())},C=D=>{Ge.isError(D)?_(D):l(D)};if(d&&ft(n))return S(!0);let L;try{var j;if(L=c.call($,n,$),typeof((j=L)==null?void 0:j.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${$.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(L).then(S,C)}}catch(D){C(D);return}S(L)}return t.OPTIONS=e,t}function Vy(e,t,n,r=n){let i,o,s;return t?(an.forEach(t,(l,a,u)=>{let c=a?l.slice(1,l.length-1):l;e=e.resolve({context:r,parent:i,value:n});let f=e.type==="tuple",m=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[m],e=f?e.spec.types[m]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}o=c,s=a?"["+l+"]":"."+l}),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}class li extends Set{describe(){const t=[];for(const n of this.values())t.push(ln.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new li(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Sn(e,t=new Map){if(oi(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Sn(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Sn(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Sn(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Sn(i,t)}else throw Error(`Unable to clone ${e}`);return n}class nt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new li,this._blacklist=new li,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Tt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Sn(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(o=>{t.tests.forEach(s=>{o.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,o)=>o.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,o;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",o=r._cast(t,n);if(n.assert!==!1&&!r.isType(o)){if(i&&ft(o))return o;let s=Lt(t),l=Lt(o);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
52
|
+
|
|
53
|
+
attempted value: ${s}
|
|
54
|
+
`+(l!==s?`result of cast: ${l}`:""))}return o}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,o)=>o.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:o,originalValue:s=t,strict:l=this.spec.strict}=n,a=t;l||(a=this._cast(a,Object.assign({assert:!1},n)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:o,value:a,originalValue:s,options:n,tests:u},r,c=>{if(c.length)return i(c,a);this.runTests({path:o,value:a,originalValue:s,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:o,value:s,originalValue:l,path:a,options:u}=t,c=v=>{i||(i=!0,n(v,s))},f=v=>{i||(i=!0,r(v,s))},m=o.length,d=[];if(!m)return f([]);let p={value:s,originalValue:l,path:a,options:u,schema:this};for(let v=0;v<o.length;v++){const b=o[v];b(p,c,function(y){y&&(Array.isArray(y)?d.push(...y):d.push(y)),--m<=0&&f(d)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:o,options:s}){const l=t??n;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const a=typeof l=="number";let u=r[l];const c=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:o[l],key:void 0,[a?"index":"key"]:l,path:a||l.includes(".")?`${i||""}[${a?l:`"${l}"`}]`:(i?`${i}.`:"")+t});return(f,m,d)=>this.resolve(c)._validate(u,c,m,d)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((s,l)=>i._validate(t,n,(a,u)=>{Ge.isError(a)&&(a.value=u),l(a)},(a,u)=>{a.length?l(new Ge(a,u,void 0,void 0,o)):s(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),o,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(l,a)=>{throw Ge.isError(l)&&(l.value=a),l},(l,a)=>{if(l.length)throw new Ge(l,t,void 0,void 0,s);o=a}),o}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Ge.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Ge.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Sn(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Tn({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Tn({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Tt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Tt.notNull){return this.nullability(!1,t)}required(t=Tt.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Tt.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Tn(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(o||s.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=bu(t).map(o=>new ln(o));return i.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(typeof n=="function"?new si(i,n):si.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Tn({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Tt.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Tn({message:n,name:"oneOf",skipAbsent:!0,test(i){let o=this.schema._whitelist,s=o.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:s}})}}),r}notOneOf(t,n=Tt.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Tn({message:n,name:"notOneOf",test(i){let o=this.schema._blacklist,s=o.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(o).join(", "),resolved:s}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:o,nullable:s}=n.spec;return{meta:i,label:r,optional:o,nullable:s,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(a=>({name:a.OPTIONS.name,params:a.OPTIONS.params})).filter((a,u,c)=>c.findIndex(f=>f.name===a.name)===u)}}}nt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])nt.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:o,schema:s}=Vy(this,t,n,r.context);return s[e](i&&i[o],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])nt.prototype[e]=nt.prototype.oneOf;for(const e of["not","nope"])nt.prototype[e]=nt.prototype.notOneOf;function or(){return new Su}class Su extends nt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Qo.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return ft(n)||n===!0}})}isFalse(t=Qo.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return ft(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}or.prototype=Su.prototype;const Ry=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function By(e){const t=Zo(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Zo(e){var t,n;const r=Ry.exec(e);return r?{year:Pt(r[1]),month:Pt(r[2],1)-1,day:Pt(r[3],1),hour:Pt(r[4]),minute:Pt(r[5]),second:Pt(r[6]),millisecond:r[7]?Pt(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Pt(r[10]),minuteOffset:Pt(r[11])}:null}function Pt(e,t=0){return Number(e)||t}let Uy=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Hy=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,qy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,zy="^\\d{4}-\\d{2}-\\d{2}",Wy="\\d{2}:\\d{2}:\\d{2}",Ky="(([+-]\\d{2}(:?\\d{2})?)|Z)",Yy=new RegExp(`${zy}T${Wy}(\\.\\d+)?${Ky}$`),Gy=e=>ft(e)||e===e.trim(),Xy={}.toString();function Ce(){return new _u}class _u extends nt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Xy?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Tt.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Xe.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Xe.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Xe.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:o}=n:i=n),this.test({name:o||"matches",message:i||Xe.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&r||s.search(t)!==-1})}email(t=Xe.email){return this.matches(Uy,{name:"email",message:t,excludeEmptyString:!0})}url(t=Xe.url){return this.matches(Hy,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Xe.uuid){return this.matches(qy,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(Yy,{name:"datetime",message:n||Xe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Xe.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:o=>{if(!o||r)return!0;const s=Zo(o);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||Xe.datetime_precision,params:{precision:i},skipAbsent:!0,test:o=>{if(!o||i==null)return!0;const s=Zo(o);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Xe.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Gy})}lowercase(t=Xe.lowercase){return this.transform(n=>ft(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ft(n)||n===n.toLowerCase()})}uppercase(t=Xe.uppercase){return this.transform(n=>ft(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ft(n)||n===n.toUpperCase()})}}Ce.prototype=_u.prototype;let Jy=e=>e!=+e;function sr(){return new Cu}class Cu extends nt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Jy(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return r.isType(i)||i===null?i:parseFloat(i)})})}min(t,n=qt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=qt.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=qt.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=qt.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=qt.positive){return this.moreThan(0,t)}negative(t=qt.negative){return this.lessThan(0,t)}integer(t=qt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>ft(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(i=>ft(i)?i:Math[t](i))}}sr.prototype=Cu.prototype;let Fu=new Date(""),Qy=e=>Object.prototype.toString.call(e)==="[object Date]";function es(){return new ar}class ar extends nt{constructor(){super({type:"date",check(t){return Qy(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=By(t),isNaN(t)?ar.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(ln.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=Jo.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=Jo.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}ar.INVALID_DATE=Fu,es.prototype=ar.prototype,es.INVALID_DATE=Fu;function Zy(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([s,l])=>`${s}-${l}`));function o(s,l){let a=an.split(s)[0];r.add(a),i.has(`${l}-${a}`)||n.push([l,a])}for(const s of Object.keys(e)){let l=e[s];r.add(s),ln.isRef(l)&&l.isSibling?o(l.path,s):oi(l)&&"deps"in l&&l.deps.forEach(a=>o(a,s))}return Ay.array(Array.from(r),n).reverse()}function ku(e,t){let n=1/0;return e.some((r,i)=>{var o;if((o=t.path)!=null&&o.includes(r))return n=i,!0}),n}function $u(e){return(t,n)=>ku(e,t)-ku(e,n)}const Ou=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function ui(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ui(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ui(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ui)}):"optional"in e?e.optional():e}const ev=(e,t)=>{const n=[...an.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=an.getter(an.join(n),!0)(e);return!!(i&&r in i)};let Au=e=>Object.prototype.toString.call(e)==="[object Object]";function Du(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const tv=$u([]);function lr(e){return new Lu(e)}class Lu extends nt{constructor(t){super({type:"object",check(n){return Au(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=tv,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let o=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),a={},u=Object.assign({},n,{parent:a,__validating:n.__validating||!1}),c=!1;for(const f of l){let m=o[f],d=f in i;if(m){let p,v=i[f];u.path=(n.path?`${n.path}.`:"")+f,m=m.resolve({value:v,context:n.context,parent:a});let b=m instanceof nt?m.spec:void 0,g=b==null?void 0:b.strict;if(b!=null&&b.strip){c=c||f in i;continue}p=!n.__validating||!g?m.cast(i[f],u):i[f],p!==void 0&&(a[f]=p)}else d&&!s&&(a[f]=i[f]);(d!==f in a||a[f]!==i[f])&&(c=!0)}return c?a:i}_validate(t,n={},r,i){let{from:o=[],originalValue:s=t,recursive:l=this.spec.recursive}=n;n.from=[{schema:this,value:s},...o],n.__validating=!0,n.originalValue=s,super._validate(t,n,r,(a,u)=>{if(!l||!Au(u)){i(a,u);return}s=s||u;let c=[];for(let f of this._nodes){let m=this.fields[f];!m||ln.isRef(m)||c.push(m.asNestedTest({options:n,key:f,parent:u,parentPath:n.path,originalParent:s}))}this.runTests({tests:c,value:u,originalValue:s,options:n},r,f=>{i(f.sort(this._sortErrors).concat(a),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,o]of Object.entries(this.fields)){const s=r[i];r[i]=s===void 0?o:s}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const o=this.fields[r];let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=o&&"getDefault"in o?o.getDefault(s):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Zy(t,n),r._sortErrors=$u(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return ui(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=an.getter(t,!0);return this.transform(o=>{if(!o)return o;let s=o;return ev(o,t)&&(s=Object.assign({},o),r||delete s[t],s[n]=i(o)),s})}json(){return this.transform(Ou)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||ri.exact,test(n){if(n==null)return!0;const r=Du(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=ri.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const o=Du(this.schema,i);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=ri.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(Xo.camelCase)}snakeCase(){return this.transformKeys(Xo.snakeCase)}constantCase(){return this.transformKeys(t=>Xo.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[o,s]of Object.entries(n.fields)){var i;let l=t;(i=l)!=null&&i.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[o]})),r.fields[o]=s.describe(l)}return r}}lr.prototype=Lu.prototype;function Pu(e){return new ju(e)}class ju extends nt{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let i=!1;const o=r.map((s,l)=>{const a=this.innerType.cast(s,Object.assign({},n,{path:`${n.path||""}[${l}]`}));return a!==s&&(i=!0),a});return i?o:r}_validate(t,n={},r,i){var o;let s=this.innerType,l=(o=n.recursive)!=null?o:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(a,u)=>{var c;if(!l||!s||!this._typeCheck(u)){i(a,u);return}let f=new Array(u.length);for(let d=0;d<u.length;d++){var m;f[d]=s.asNestedTest({options:n,index:d,parent:u,parentPath:n.path,originalParent:(m=n.originalValue)!=null?m:t})}this.runTests({value:u,tests:f,originalValue:(c=n.originalValue)!=null?c:t,options:n},r,d=>i(d.concat(a),u))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Ou)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!oi(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Lt(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=ii.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||ii.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||ii.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,i,o)=>!t(r,i,o):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[0]})),r.innerType=n.innerType.describe(o)}return r}}Pu.prototype=ju.prototype;const nv=({tabs:e,className:t="",count:n={},setActiveTab:r,activeTab:i,btnClass:o=""})=>{const s=rt("flex gap-x-3 mb-8 w-full no-scrollbar overflow-x-auto border-b border-[#EAECF0] darks:border-gray-500",t);return w.jsx("div",{className:s,children:e.map(l=>{const a=i===l.key,u=n[l.key]||0,c=rt("capitalize text-xs whitespace-nowrap no-scrollbar md:text-sm font-semibold pb-[14px] border-b-2 px-6 flex items-center justify-center gap-x-1 flex-1 text-center",o),f=rt({"border-gray-400 darks:border-white !text-primary darks:!text-white":a,"border-transparent text-[#667085] darks:!text-white/60":!a}),m=u>0&&w.jsx("span",{className:"text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80",children:u});return w.jsxs("button",{onClick:()=>r(l.key),className:rt(c,f),"aria-selected":a,role:"tab",type:"button",children:[l.title,m]},l.key)})})},rv=[{type:"textField",label:"Short Text",icon:"fluent:text-16-filled",inputLabel:"Short Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"longText",label:"Long Text",icon:"dashicons:text",inputLabel:"Long Text Label",required:!1,inputType:"text",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"selectField",label:"Select List",icon:"tabler:select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"multiSelect",label:"MultiSelect",icon:"fluent-mdl2:multi-select",inputLabel:"Select Text Label",required:!1,inputType:"select",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"numberField",label:"Number",icon:"octicon:number-16",inputLabel:"Number Label",required:!1,inputType:"number",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"amountField",label:"Amount",icon:"carbon:currency",inputLabel:"Enter amount",required:!1,inputType:"amount",maxAmount:null,minAmount:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minAmountMessage:"",maxAmountMessage:"",value:null},{type:"date",label:"Date",icon:"bx:calendar",inputLabel:"Date Text Label",required:!1,inputType:"date",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"password",label:"Password",icon:"ic:round-password",inputLabel:"Password Text Label",required:!1,inputType:"password",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"checkbox",label:"Checkbox",icon:"mingcute:checkbox-line",inputLabel:"Checkbox Text Label",required:!1,inputType:"checkbox",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"radio",label:"Radio select",icon:"ri:checkbox-circle-line",inputLabel:"Radio Text Label",required:!1,inputType:"radio",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null,options:[]},{type:"email",label:"Email",icon:"mdi:email-outline",inputLabel:"Email Text Label",required:!1,inputType:"email",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"file",label:"File Attachment",icon:"ion:attach-sharp",inputLabel:"File Text Label",required:!1,inputType:"file",maxLength:null,minLength:null,placeholder:"Type here",description:"",isReadOnly:!1,isDisabled:!1,isRequired:!1,requiredMessage:"Field is required",minLengthMessage:"",maxLengthMessage:"",value:null},{type:"grid",label:"Grid",icon:"cuida:grid-outline",inputLabel:"Grid Text Label",inputType:"grid",placeholder:"Type here",description:"",grid:2,gridData:[]}],iv=["text","number"],ov=["text","number","amount","date","password"],sv=["amount"],av=["grid","section"],lv=["radio","select","checkbox","multiselect"],uv=lr().shape({inputLabel:Ce().required("Label is required"),placeholder:Ce().nullable(),description:Ce().nullable(),isReadOnly:or(),isDisabled:or(),isRequired:or(),requiredMessage:Ce().nullable(),minLengthMessage:Ce().nullable(),maxLengthMessage:Ce().nullable(),maxLength:sr().nullable(),minLength:sr().nullable(),inputType:Ce().nullable(),maxAmountMessage:Ce().nullable(),maxAmount:Ce().nullable(),options:Pu().of(lr().shape({label:Ce().nullable(),value:Ce().when("label",{is:e=>e&&e.length>0,then:e=>e.required("Value is required when label is present"),otherwise:e=>e.nullable()})})).nullable()}),cv=[{title:"Basics",key:"basic"},{title:"Validations",key:"validation"}],fv=({isOpen:e,onClose:t,element:n})=>{const{updateElement:r}=h.useContext(Ot),[i,o]=h.useState("basic"),{register:s,handleSubmit:l,control:a,formState:{errors:u,isSubmitting:c,isValid:f},reset:m}=Wo({resolver:Ko(uv),defaultValues:{...n,options:n.options||[]}}),{fields:d,append:p,remove:v}=gy({control:a,name:"options"});h.useEffect(()=>{e||m()},[e,m]);const b=y=>{r(y,n.sectionId),t()},g=()=>w.jsxs("div",{className:"flex flex-col gap-y-1 justify-start",children:[d.map((y,x)=>w.jsxs("div",{className:"flex gap-x-4 items-center ",children:[w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Label",name:`options.${x}.label`,register:s,errors:u,element:n,placeholder:"Label",isFloating:!0})}),w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Value",name:`options.${x}.value`,register:s,errors:u,element:n,placeholder:"Value",isFloating:!0})})," ",w.jsx("button",{type:"button",className:"outline-none hover:opacity-80",onClick:()=>v(x),children:w.jsx(He,{icon:"iconamoon:sign-times-fill"})})]},y.id)),w.jsxs("div",{children:[" ",w.jsxs("button",{type:"button",className:"mt-2 text-gray-500 font-medium text-sm flex gap-x-1 items-center",onClick:()=>p({label:"",value:"",id:Or()}),children:[w.jsx(He,{icon:"qlementine-icons:plus-16"})," Add Option"]})]})]});return w.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:w.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[w.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[w.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:n.label}),w.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:w.jsx(He,{icon:"tabler:x"})})]}),w.jsx("div",{className:"w-full",children:w.jsx(nv,{tabs:cv,setActiveTab:o,activeTab:i,className:"justify-start !text-left",btnClass:"!uppercase !text-left"})}),w.jsxs("form",{onSubmit:l(b),className:"w-full",children:[i==="basic"&&w.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[w.jsx(ye,{label:"Label",name:"inputLabel",register:s,errors:u,element:n}),ov.includes(n.inputType)&&w.jsx(ye,{label:"Placeholder",name:"placeholder",register:s,errors:u,element:n}),w.jsx(ye,{label:"Short Description",name:"description",register:s,errors:u,element:n}),lv.includes(n.inputType)&&g()]}),!av.includes(n.type.toLowerCase())&&i==="validation"&&w.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[w.jsxs("div",{className:"flex gap-x-6 items-center",children:[w.jsx("div",{className:"w-[150px]",children:w.jsx(ye,{label:"Required",name:"isRequired",register:s,errors:u,element:n,type:"checkbox"})})," ",w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Error message text",name:"requiredMessage",register:s,errors:u,element:n})})]}),iv.includes(n.inputType)&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"flex gap-x-6 items-center",children:[w.jsx("div",{className:"w-[150px]",children:w.jsx(ye,{label:"Min Length",name:"minLength",register:s,errors:u,element:n,type:"number"})})," ",w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Error message text",name:"minLengthMessage",register:s,errors:u,element:n})})]}),w.jsxs("div",{className:"flex gap-x-6 items-center",children:[w.jsx("div",{className:"w-[150px]",children:w.jsx(ye,{label:"Max Length",name:"maxLength",register:s,errors:u,element:n,type:"number"})})," ",w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Error message text",name:"maxLengthMessage",register:s,errors:u,element:n})})]})]}),sv.includes(n.inputType)&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"flex gap-x-6 items-center",children:[w.jsx("div",{className:"w-[150px]",children:w.jsx(ye,{label:"Min Amount",name:"minAmount",register:s,errors:u,element:n,type:"amount"})})," ",w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Error message text",name:"minAmountMessage",register:s,errors:u,element:n})})]}),w.jsxs("div",{className:"flex gap-x-6 items-center",children:[w.jsx("div",{className:"w-[150px]",children:w.jsx(ye,{label:"Max Amount",name:"maxAmount",register:s,errors:u,element:n,type:"amount"})})," ",w.jsx("div",{className:"flex-1",children:w.jsx(ye,{label:"Error message text",name:"maxAmountMessage",register:s,errors:u,element:n})})]})]})]}),w.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[w.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),w.jsx("button",{type:"submit",disabled:!f||c,className:`flex-1 px-4 py-2.5 ${!f||c?"bg-[#F2F4F7]":"bg-[#C6593C]"} ${!f||c?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:c?"Saving...":"Save"})]})]})]})})},Nu=h.memo(({state:e,element:t,children:n})=>{const[r,i]=h.useState(!1),{removeElement:o}=h.useContext(Ot),s=h.useCallback(()=>{o(t.id,t.sectionId)},[t.id,o]);return w.jsxs("div",{children:[r&&w.jsx(fv,{isOpen:r,onClose:()=>i(!1),element:t}),w.jsxs("div",{className:"flex justify-between items-center mb-2",children:[w.jsx("label",{className:"text-sm font-medium",children:t.inputLabel}),e==="edit"&&w.jsxs("span",{className:"flex gap-x-3 items-center",children:[w.jsx("button",{type:"button",className:"outline-none hover:opacity-80",onClick:()=>i(!0),children:w.jsx(He,{icon:"circum:edit"})}),w.jsx("button",{type:"button",className:"outline-none hover:opacity-80",onClick:s,children:w.jsx(He,{icon:"iconamoon:sign-times-fill"})})]})]}),n]})});Nu.displayName="ElementContainer";function Iu({element:e,validationData:t}){const{register:n=()=>({})}=t||{};return w.jsx(ye,{placeholder:e.placeholder,type:e.inputType,label:"",name:e.id,register:n})}const dv={textField:Ar,longText:Wl,selectField:zl,multiSelect:ha,numberField:Ar,amountField:Iu,date:pa,password:wa,checkbox:Sa,radio:Ea,email:ma,file:ba,grid:xa,section:Ta},Mu="edit",pv=e=>{const t=dv[e.type];return t?w.jsx(Nu,{element:e,state:Mu,children:w.jsx(t,{element:e,state:Mu})}):null};function hv({elementData:e,sectionId:t}){const{formData:n,updateElementPosition:r,isDragging:i}=h.useContext(Ot),[o,s]=h.useState(null),l=h.useCallback((f,m)=>{f.dataTransfer.setData("properties",m),s(m)},[]),a=h.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.dataTransfer.dropEffect="move"},[]),u=h.useCallback(f=>{var d;f.preventDefault(),f.stopPropagation();const m=(d=n.find(p=>p.id===t))==null?void 0:d.questionData;try{const p=f.dataTransfer.getData("properties"),v=f.currentTarget;if(!v.id||p===v.id)return;const b=m.findIndex(y=>y.id===p),g=m.findIndex(y=>y.id===v.id);if(b===-1||g===-1)return;if(m.length){const y=[...m];[y[b],y[g]]=[y[g],y[b]],r(y,t),s(null)}}catch{s(null)}},[n,r]),c=h.useCallback(f=>w.jsx("div",{id:f.id,className:`cursor-move border p-4 w-full transition-colors rounded-lg ${o===f.id?"bg-gray-100":""} ${o&&o!==f.id?"border-dashed border-blue-300":""}`,draggable:!0,onDrop:u,onDragOver:a,onDragStart:m=>l(m,f.id),children:pv(f)},f.id),[o,u,a,l]);return e!=null&&e.length?w.jsxs("div",{className:"w-full h-full flex flex-col gap-y-4 relative",children:[e==null?void 0:e.map(c),i&&w.jsx("div",{className:"bg-gray-50 rounded p-6 h-[60px] border-2 border-dashed flex items-center justify-center text-gray-400 opacity-70",children:w.jsx(He,{icon:"octicon:plus-16"})})]}):w.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-500 min-h-[250px] p-10",children:"No input to display"})}const mv=lr({title:Ce(),description:Ce()}).required(),gv=({isOpen:e,onClose:t,section:n})=>{const{updateSection:r}=h.useContext(Ot),{register:i,handleSubmit:o,formState:{errors:s,isSubmitting:l,isValid:a},reset:u}=Wo({resolver:Ko(mv),defaultValues:n});if(h.useEffect(()=>{e||u()},[e,u]),!e)return null;const c=f=>{r(f,n.id),t()};return w.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none",children:w.jsxs("div",{className:"min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center",children:[w.jsxs("div",{className:"w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6",children:[w.jsx("h2",{className:"text-lg font-semibold text-[#475467] font-onest",children:"Update Section Information"}),w.jsx("button",{onClick:t,className:"absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",children:w.jsx(He,{icon:"tabler:x"})})]}),w.jsxs("form",{onSubmit:o(c),className:"w-full",children:[w.jsxs("div",{className:"w-full px-6 flex flex-col gap-5 z-10",children:[w.jsx(ye,{label:"Title",name:"title",register:i,errors:s}),w.jsx(ye,{label:"Description",name:"description",register:i,errors:s})]}),w.jsxs("div",{className:"w-full px-6 pt-8 pb-6 flex gap-3 mt-4",children:[w.jsx("button",{type:"button",onClick:t,className:"flex-1 px-4 py-2.5 bg-white border border-[#D0D5DD] rounded-lg shadow-xs font-semibold text-[#344054] font-onest",children:"Cancel"}),w.jsx("button",{type:"submit",disabled:!a||l,className:`flex-1 px-4 py-2.5 ${!a||l?"bg-[#F2F4F7]":"bg-[#C6593C]"} ${!a||l?"text-[#98A2B3]":"text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50`,children:l?"Saving...":"Save"})]})]})]})})},yv=()=>{const[e,t]=h.useState(!1),n=h.useRef(null),[r,i]=h.useState([0]),{removeSection:o,addElement:s,formData:l,setIsDragging:a}=h.useContext(Ot),u=h.useCallback(d=>{d.preventDefault(),d.dataTransfer.dropEffect="move"},[]),c=h.useCallback(d=>{try{d.preventDefault(),a(!1);const p=d==null?void 0:d.currentTarget,v=d.dataTransfer.getData("properties");if(v){const b=JSON.parse(v),g={id:Or(),sectionId:p.id,...b};s(g,p.id)}}catch{a(!1)}},[]);function f(d){r.includes(d)?i(p=>p.filter(v=>v!==d)):i(p=>[...p,d])}function m(d){n.current=d,t(!0)}return w.jsxs("div",{className:"flex gap-x-4 mx-auto h-full relative px-6 pb-5 flex-col no-scrollbar overflow-y-auto max-h-[86vh]",children:[e&&w.jsx(gv,{isOpen:e,onClose:()=>t(!1),section:n.current}),w.jsx("div",{className:" relative w-full flex flex-col gap-y-6 flex-1 py-5",children:l.map((d,p)=>w.jsxs("div",{className:"group",children:[w.jsxs("div",{className:`border rounded-lg py-4 px-6 transition-colors duration-200 ${r.includes(p)?"min-h-[300px]":""}`,children:[w.jsxs("div",{className:"flex justify-between items-center",children:[w.jsx("h2",{children:d.title}),w.jsxs("div",{className:"flex gap-x-4 items-center",children:[w.jsx("button",{type:"button",className:"p-1 border rounded-lg",onClick:()=>m(d),children:w.jsx(He,{icon:"fluent:edit-28-regular"})}),l.length>1&&w.jsx("button",{type:"button",className:"p-1 border rounded-lg",onClick:()=>o(d.id),children:w.jsx(He,{icon:"lets-icons:trash-duotone-line"})}),w.jsx("button",{type:"button",className:"p-1 rounded-lg",onClick:()=>f(p),children:w.jsx(He,{icon:r.includes(p)?"gravity-ui:minus":"octicon:plus-16"})})]})]}),r.includes(p)&&w.jsxs("div",{className:"mt-4 transition-all duration-200 h-full",id:d.id,onDrop:c,onDragOver:u,children:[w.jsx("hr",{}),w.jsx("div",{className:" gap-y-6 mt-4 h-full",children:w.jsx(hv,{elementData:d.questionData,sectionId:d.id})})]})]}),w.jsx("hr",{className:"mt-6 group-last:hidden"})]},d.id))})]})};function vv(){return w.jsx("div",{className:"bg-white p-4 border border-[#E4E7EC] rounded-lg h-full overflow-y-auto",children:w.jsx(yv,{})})}const bv=()=>{const{setIsDragging:e}=h.useContext(Ot),t=h.useCallback((n,r)=>{n.dataTransfer.setData("properties",JSON.stringify(r)),n.dataTransfer.effectAllowed="move",e(!0)},[]);return w.jsx("div",{className:"w-full",children:w.jsx("div",{className:"pt-4 px-5 max-h-[70vh] overflow-y-auto",children:w.jsx("div",{children:w.jsx("ul",{className:"grid gap-y-[8px] mt-3",children:rv.map(n=>w.jsxs("li",{onDragStart:r=>t(r,n),style:{borderColor:n.color,color:n.color},className:`cursor-move text-[#475467] flex justify-between items-center \r
|
|
55
|
+
border border-[#98A2B3] rounded-lg py-3 px-[14px] shadow-custom\r
|
|
56
|
+
hover:shadow-lg transition-all duration-200\r
|
|
57
|
+
active:opacity-50`,draggable:!0,children:[w.jsxs("span",{className:"flex gap-x-2 items-center",children:[w.jsx("span",{style:{color:n.color},children:w.jsx(He,{icon:n.icon,iconClass:"w-5 h-5"})}),w.jsx("span",{className:"text-sm font-medium leading-[0]",children:n.label})]}),w.jsx("span",{className:"text-gray-400",children:w.jsx(He,{icon:"akar-icons:drag-horizontal"})})]},n.type))})})})})},xv=h.memo(bv);function wv(){const{addSection:e}=h.useContext(Ot),[t,n]=h.useState(!1);return w.jsxs("div",{className:"px-[30px] py-[10px] flex justify-between items-center",children:[w.jsx("div",{className:"flex gap-x-4 items-center"}),w.jsxs("div",{className:"py-4 flex justify-end gap-x-6",children:[w.jsx(Rn,{onClick:()=>e(),text:"Add section",btnClass:"text-gray-700 border-[#98A2B3] !font-medium"}),w.jsx(Rn,{onClick:()=>n(!0),text:"Preview",btnClass:"text-gray-700 border-[#98A2B3] !font-medium"})]})]})}function Ev(){return w.jsx(np,{children:w.jsxs("div",{className:"w-full h-screen bg-[#E4E7EC] flex flex-col",children:[w.jsx(kc,{}),w.jsx("div",{className:"border-b bg-white border-[#E4E7EC]",children:w.jsx(wv,{})}),w.jsxs("div",{className:"flex flex-1 ",children:[w.jsx("div",{className:"w-[270px] h-full border-l border-[#E4E7EC] bg-white",children:w.jsx(xv,{})}),w.jsx("div",{className:"flex-1 h-full max-h-full p-4 z-[1]",children:w.jsx(vv,{})})]}),w.jsx("div",{className:"border-b bg-white border-t border-[#E4E7EC]",children:w.jsx(rp,{})})]})})}const Tv=()=>w.jsx(Ev,{}),Sv={textField:Ar,longText:Wl,selectField:zl,multiSelect:ha,numberField:Ar,amountField:Iu,date:pa,password:wa,checkbox:Sa,radio:Ea,email:ma,file:ba,grid:xa,section:Ta},_v=(e,t)=>{const n=Sv[e.type];return n?w.jsxs("div",{children:[w.jsx("label",{className:"block text-sm font-medium mb-[5px]",children:e.inputLabel}),w.jsx(n,{element:e,state:"edit",validationData:t})]}):null},un={required:"This field is required",email:"Invalid email format",minLength:e=>`Minimum length is ${e}`,maxLength:e=>`Maximum length is ${e}`,minAmount:e=>`Minimum amount is ${e}`,maxAmount:e=>`Maximum amount is ${e}`},Cv=e=>({textField:Ce().nullable(),longText:Ce().nullable(),numberField:sr().nullable().transform(n=>isNaN(n)?null:n),amountField:sr().nullable().transform(n=>isNaN(n)?null:n),selectField:Ce().nullable(),checkbox:or(),email:Ce().nullable().email(un.email),date:es().nullable()})[e]||Ce().nullable(),Fv=(e,t,n)=>t?e.type==="boolean"?e.oneOf([!0],n||un.required):e.required(n||un.required):e,kv=(e,{minLength:t,maxLength:n,minLengthMessage:r,maxLengthMessage:i})=>{let o=e;return t&&(o=o.min(t,r||un.minLength(t))),n&&(o=o.max(n,i||un.maxLength(n))),o},$v=(e,{minAmount:t,maxAmount:n,minAmountMessage:r,maxAmountMessage:i})=>{let o=e;return t&&(o=o.min(parseFloat(String(t)),r||un.minAmount(t))),n&&(o=o.max(parseFloat(String(n)),i||un.maxAmount(n))),o};function Ov(e){const t={};return e.forEach(({questionData:n})=>{n.forEach(r=>{const{id:i,type:o,isRequired:s,requiredMessage:l}=r;let a=Cv(o);a=Fv(a,s,l),o==="textField"||o==="longText"||o==="email"?a=kv(a,r):(o==="numberField"||o==="amountField")&&(a=$v(a,r)),t[i]=a})}),lr().shape(t)}const Av=({form_data:e})=>{const t=Ov(e),n=Wo({resolver:Ko(t),mode:"onSubmit",defaultValues:{}}),{register:r,setValue:i,watch:o,handleSubmit:s,reset:l,formState:{errors:a}}=n;console.log("🚀 ~ FormRenderer ~ errors:",a);const u=f=>{console.log("Form Data Submitted:",f)},c=()=>{l()};return w.jsx(uy,{...n,children:w.jsxs("form",{onSubmit:s(u),className:"container mx-auto p-10",children:[w.jsx("div",{className:"relative w-full flex flex-col gap-y-12 py-5",children:e==null?void 0:e.map(f=>{var m;return w.jsxs("div",{children:[w.jsxs("div",{className:"mb-4",children:[w.jsx("h2",{className:"text-lg font-semibold mb-[6px]",children:f.title}),(f==null?void 0:f.description)&&w.jsx("p",{className:"text-sm",children:f==null?void 0:f.description})]}),w.jsx("div",{className:"grid gap-y-6",children:(m=f==null?void 0:f.questionData)==null?void 0:m.map(d=>{var p;return w.jsx("div",{children:w.jsxs("div",{children:[_v(d,{register:r,setValue:i,watch:o,errors:a}),w.jsx("div",{className:"text-xs text-red-600 mt-1",children:(p=a==null?void 0:a[d.id])==null?void 0:p.message})]})},d.id)})})]},f.id)})}),w.jsxs("div",{className:"py-8 flex justify-end items-center gap-4",children:[w.jsx(Rn,{type:"button",text:"Reset Form",btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg",onClick:c}),w.jsx(Rn,{type:"submit",text:"Save Form",btnClass:"text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg"})]})]})})};function Dv(){let e;try{const t=localStorage.getItem("formData");e=t?JSON.parse(t):null}catch(t){console.error("Error parsing formData from localStorage:",t),e=null}return e?w.jsx("div",{children:w.jsx(Av,{form_data:e})}):w.jsx("div",{children:w.jsx("p",{children:"Error: No form data available. Please ensure the form data is saved correctly."})})}St.FormBuilder=Tv,St.FormViewer=Dv,Object.defineProperty(St,Symbol.toStringTag,{value:"Module"})});
|