@petnow/ui 1.6.5 → 1.6.6
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/index.es.js +4315 -4091
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -15
- package/dist/index.umd.js.map +1 -1
- package/package.json +11 -11
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(De,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],c):(De=typeof globalThis<"u"?globalThis:De||self,c(De["@petnow/ui"]={},De.React,De.ReactDOM))})(this,function(De,c,Ee){"use strict";var yy=Object.defineProperty;var wy=(De,c,Ee)=>c in De?yy(De,c,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):De[c]=Ee;var z=(De,c,Ee)=>wy(De,typeof c!="symbol"?c+"":c,Ee);function za(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(r,t,e.get?e:{enumerable:!0,get:()=>n[t]})}}return r.default=n,Object.freeze(r)}const T=za(c),rn=za(Ee);var go={exports:{}},_n={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Qa;function Pu(){if(Qa)return _n;Qa=1;var n=c,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),e=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,d){var u,p={},h=null,f=null;d!==void 0&&(h=""+d),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(f=l.ref);for(u in l)e.call(l,u)&&!a.hasOwnProperty(u)&&(p[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)p[u]===void 0&&(p[u]=l[u]);return{$$typeof:r,type:s,key:h,ref:f,props:p,_owner:o.current}}return _n.Fragment=t,_n.jsx=i,_n.jsxs=i,_n}var On={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,29 +14,29 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+se+y}}var He=!1,Wt;{var
|
|
19
|
-
`),Be=
|
|
17
|
+
*/var Ua;function Mu(){return Ua||(Ua=1,process.env.NODE_ENV!=="production"&&function(){var n=c,r=Symbol.for("react.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator,v="@@iterator";function g(y){if(y===null||typeof y!="object")return null;var L=m&&y[m]||y[v];return typeof L=="function"?L:null}var b=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(y){{for(var L=arguments.length,V=new Array(L>1?L-1:0),X=1;X<L;X++)V[X-1]=arguments[X];x("error",y,V)}}function x(y,L,V){{var X=b.ReactDebugCurrentFrame,ce=X.getStackAddendum();ce!==""&&(L+="%s",V=V.concat([ce]));var ge=V.map(function(oe){return String(oe)});ge.unshift("Warning: "+L),Function.prototype.apply.call(console[y],console,ge)}}var E=!1,P=!1,M=!1,_=!1,S=!1,I;I=Symbol.for("react.module.reference");function Y(y){return!!(typeof y=="string"||typeof y=="function"||y===e||y===a||S||y===o||y===d||y===u||_||y===f||E||P||M||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===p||y.$$typeof===i||y.$$typeof===s||y.$$typeof===l||y.$$typeof===I||y.getModuleId!==void 0))}function k(y,L,V){var X=y.displayName;if(X)return X;var ce=L.displayName||L.name||"";return ce!==""?V+"("+ce+")":V}function D(y){return y.displayName||"Context"}function O(y){if(y==null)return null;if(typeof y.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case e:return"Fragment";case t:return"Portal";case a:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case s:var L=y;return D(L)+".Consumer";case i:var V=y;return D(V._context)+".Provider";case l:return k(y,y.render,"ForwardRef");case p:var X=y.displayName||null;return X!==null?X:O(y.type)||"Memo";case h:{var ce=y,ge=ce._payload,oe=ce._init;try{return O(oe(ge))}catch{return null}}}return null}var C=Object.assign,A=0,$,F,R,H,K,U,G;function W(){}W.__reactDisabledLog=!0;function xe(){{if(A===0){$=console.log,F=console.info,R=console.warn,H=console.error,K=console.group,U=console.groupCollapsed,G=console.groupEnd;var y={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}A++}}function ue(){{if(A--,A===0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},y,{value:$}),info:C({},y,{value:F}),warn:C({},y,{value:R}),error:C({},y,{value:H}),group:C({},y,{value:K}),groupCollapsed:C({},y,{value:U}),groupEnd:C({},y,{value:G})})}A<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Se=b.ReactCurrentDispatcher,se;function me(y,L,V){{if(se===void 0)try{throw Error()}catch(ce){var X=ce.stack.trim().match(/\n( *(at )?)/);se=X&&X[1]||""}return`
|
|
18
|
+
`+se+y}}var He=!1,Wt;{var he=typeof WeakMap=="function"?WeakMap:Map;Wt=new he}function Oe(y,L){if(!y||He)return"";{var V=Wt.get(y);if(V!==void 0)return V}var X;He=!0;var ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ge;ge=Se.current,Se.current=null,xe();try{if(L){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Ve){X=Ve}Reflect.construct(y,[],oe)}else{try{oe.call()}catch(Ve){X=Ve}y.call(oe.prototype)}}else{try{throw Error()}catch(Ve){X=Ve}y()}}catch(Ve){if(Ve&&X&&typeof Ve.stack=="string"){for(var te=Ve.stack.split(`
|
|
19
|
+
`),Be=X.stack.split(`
|
|
20
20
|
`),Te=te.length-1,Fe=Be.length-1;Te>=1&&Fe>=0&&te[Te]!==Be[Fe];)Fe--;for(;Te>=1&&Fe>=0;Te--,Fe--)if(te[Te]!==Be[Fe]){if(Te!==1||Fe!==1)do if(Te--,Fe--,Fe<0||te[Te]!==Be[Fe]){var Xe=`
|
|
21
|
-
`+te[Te].replace(" at new "," at ");return y.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",y.displayName)),typeof y=="function"&&Wt.set(y,Xe),Xe}while(Te>=1&&Fe>=0);break}}}finally{He=!1,Se.current=ge,ue(),Error.prepareStackTrace=ce}var
|
|
21
|
+
`+te[Te].replace(" at new "," at ");return y.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",y.displayName)),typeof y=="function"&&Wt.set(y,Xe),Xe}while(Te>=1&&Fe>=0);break}}}finally{He=!1,Se.current=ge,ue(),Error.prepareStackTrace=ce}var Sn=y?y.displayName||y.name:"",nn=Sn?me(Sn):"";return typeof y=="function"&&Wt.set(y,nn),nn}function q(y,L,V){return Oe(y,!1)}function ve(y){var L=y.prototype;return!!(L&&L.isReactComponent)}function Re(y,L,V){if(y==null)return"";if(typeof y=="function")return Oe(y,ve(y));if(typeof y=="string")return me(y);switch(y){case d:return me("Suspense");case u:return me("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case l:return q(y.render);case p:return Re(y.type,L,V);case h:{var X=y,ce=X._payload,ge=X._init;try{return Re(ge(ce),L,V)}catch{}}}return""}var mt=Object.prototype.hasOwnProperty,ur={},gu=b.ReactDebugCurrentFrame;function vo(y){if(y){var L=y._owner,V=Re(y.type,y._source,L?L.type:null);gu.setExtraStackFrame(V)}else gu.setExtraStackFrame(null)}function Xb(y,L,V,X,ce){{var ge=Function.call.bind(mt);for(var oe in y)if(ge(y,oe)){var te=void 0;try{if(typeof y[oe]!="function"){var Be=Error((X||"React class")+": "+V+" type `"+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[oe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Be.name="Invariant Violation",Be}te=y[oe](L,oe,X,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Te){te=Te}te&&!(te instanceof Error)&&(vo(ce),w("%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).",X||"React class",V,oe,typeof te),vo(null)),te instanceof Error&&!(te.message in ur)&&(ur[te.message]=!0,vo(ce),w("Failed %s type: %s",V,te.message),vo(null))}}}var Jb=Array.isArray;function ja(y){return Jb(y)}function Zb(y){{var L=typeof Symbol=="function"&&Symbol.toStringTag,V=L&&y[Symbol.toStringTag]||y.constructor.name||"Object";return V}}function ey(y){try{return bu(y),!1}catch{return!0}}function bu(y){return""+y}function yu(y){if(ey(y))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Zb(y)),bu(y)}var cr=b.ReactCurrentOwner,ty={key:!0,ref:!0,__self:!0,__source:!0},wu,xu,Wa;Wa={};function ny(y){if(mt.call(y,"ref")){var L=Object.getOwnPropertyDescriptor(y,"ref").get;if(L&&L.isReactWarning)return!1}return y.ref!==void 0}function ry(y){if(mt.call(y,"key")){var L=Object.getOwnPropertyDescriptor(y,"key").get;if(L&&L.isReactWarning)return!1}return y.key!==void 0}function oy(y,L){if(typeof y.ref=="string"&&cr.current&&L&&cr.current.stateNode!==L){var V=O(cr.current.type);Wa[V]||(w('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',O(cr.current.type),y.ref),Wa[V]=!0)}}function ay(y,L){{var V=function(){wu||(wu=!0,w("%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)",L))};V.isReactWarning=!0,Object.defineProperty(y,"key",{get:V,configurable:!0})}}function iy(y,L){{var V=function(){xu||(xu=!0,w("%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)",L))};V.isReactWarning=!0,Object.defineProperty(y,"ref",{get:V,configurable:!0})}}var sy=function(y,L,V,X,ce,ge,oe){var te={$$typeof:r,type:y,key:L,ref:V,props:oe,_owner:ge};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:X}),Object.defineProperty(te,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.freeze&&(Object.freeze(te.props),Object.freeze(te)),te};function ly(y,L,V,X,ce){{var ge,oe={},te=null,Be=null;V!==void 0&&(yu(V),te=""+V),ry(L)&&(yu(L.key),te=""+L.key),ny(L)&&(Be=L.ref,oy(L,ce));for(ge in L)mt.call(L,ge)&&!ty.hasOwnProperty(ge)&&(oe[ge]=L[ge]);if(y&&y.defaultProps){var Te=y.defaultProps;for(ge in Te)oe[ge]===void 0&&(oe[ge]=Te[ge])}if(te||Be){var Fe=typeof y=="function"?y.displayName||y.name||"Unknown":y;te&&ay(oe,Fe),Be&&iy(oe,Fe)}return sy(y,te,Be,ce,X,cr.current,oe)}}var Ha=b.ReactCurrentOwner,Du=b.ReactDebugCurrentFrame;function kn(y){if(y){var L=y._owner,V=Re(y.type,y._source,L?L.type:null);Du.setExtraStackFrame(V)}else Du.setExtraStackFrame(null)}var Ra;Ra=!1;function Ba(y){return typeof y=="object"&&y!==null&&y.$$typeof===r}function Eu(){{if(Ha.current){var y=O(Ha.current.type);if(y)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+y+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+y+"`."}return""}}function uy(y){return""}var Cu={};function cy(y){{var L=Eu();if(!L){var V=typeof y=="string"?y:y.displayName||y.name;V&&(L=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+V+">.")}return L}}function ku(y,L){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var V=cy(L);if(Cu[V])return;Cu[V]=!0;var X="";y&&y._owner&&y._owner!==Ha.current&&(X=" It was passed a child from "+O(y._owner.type)+"."),kn(y),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,X),kn(null)}}function Su(y,L){{if(typeof y!="object")return;if(ja(y))for(var V=0;V<y.length;V++){var X=y[V];Ba(X)&&ku(X,L)}else if(Ba(y))y._store&&(y._store.validated=!0);else if(y){var ce=g(y);if(typeof ce=="function"&&ce!==y.entries)for(var ge=ce.call(y),oe;!(oe=ge.next()).done;)Ba(oe.value)&&ku(oe.value,L)}}}function dy(y){{var L=y.type;if(L==null||typeof L=="string")return;var V;if(typeof L=="function")V=L.propTypes;else if(typeof L=="object"&&(L.$$typeof===l||L.$$typeof===p))V=L.propTypes;else return;if(V){var X=O(L);Xb(V,y.props,"prop",X,y)}else if(L.PropTypes!==void 0&&!Ra){Ra=!0;var ce=O(L);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ce||"Unknown")}typeof L.getDefaultProps=="function"&&!L.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fy(y){{for(var L=Object.keys(y.props),V=0;V<L.length;V++){var X=L[V];if(X!=="children"&&X!=="key"){kn(y),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",X),kn(null);break}}y.ref!==null&&(kn(y),w("Invalid attribute `ref` supplied to `React.Fragment`."),kn(null))}}var _u={};function Ou(y,L,V,X,ce,ge){{var oe=Y(y);if(!oe){var te="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).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 Be=uy();Be?te+=Be:te+=Eu();var Te;y===null?Te="null":ja(y)?Te="array":y!==void 0&&y.$$typeof===r?(Te="<"+(O(y.type)||"Unknown")+" />",te=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof y,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,te)}var Fe=ly(y,L,V,ce,ge);if(Fe==null)return Fe;if(oe){var Xe=L.children;if(Xe!==void 0)if(X)if(ja(Xe)){for(var Sn=0;Sn<Xe.length;Sn++)Su(Xe[Sn],y);Object.freeze&&Object.freeze(Xe)}else w("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 Su(Xe,y)}if(mt.call(L,"key")){var nn=O(y),Ve=Object.keys(L).filter(function(by){return by!=="key"}),Va=Ve.length>0?"{key: someKey, "+Ve.join(": ..., ")+": ...}":"{key: someKey}";if(!_u[nn+Va]){var gy=Ve.length>0?"{"+Ve.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Ha,rn,ry,rn),yu[rn+Ha]=!0}}return y===t?Jb(Fe):Xb(Fe),Fe}}function Zb(y,F,R){return wu(y,F,R,!0)}function ey(y,F,R){return wu(y,F,R,!1)}var ty=ey,ny=Zb;On.Fragment=t,On.jsx=ty,On.jsxs=ny}()),On}process.env.NODE_ENV==="production"?co.exports=xu():co.exports=Du();var T=co.exports;function za(n){var r,e,t="";if(typeof n=="string"||typeof n=="number")t+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(r=0;r<o;r++)n[r]&&(e=za(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Le(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=za(n))&&(t&&(t+=" "),t+=r);return t}const fo="-",Eu=n=>{const r=ku(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(fo);return s[0]===""&&s.length!==1&&s.shift(),Qa(s,r)||Cu(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},Qa=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?Qa(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(fo);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ua=/^\[(.+)\]$/,Cu=n=>{if(Ua.test(n)){const r=Ua.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},ku=n=>{const{theme:r,prefix:e}=n,t={nextPart:new Map,validators:[]};return _u(Object.entries(n.classGroups),e).forEach(([a,i])=>{po(i,t,a,r)}),t},po=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:Ka(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(Su(o)){po(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{po(i,Ka(r,a),e,t)})})},Ka=(n,r)=>{let e=n;return r.split(fo).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},Su=n=>n.isThemeGetter,_u=(n,r)=>r?n.map(([e,t])=>{const o=t.map(a=>typeof a=="string"?r+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[r+i,s])):a);return[e,o]}):n,Ou=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,e=new Map,t=new Map;const o=(a,i)=>{e.set(a,i),r++,r>n&&(r=0,t=e,e=new Map)};return{get(a){let i=e.get(a);if(i!==void 0)return i;if((i=t.get(a))!==void 0)return o(a,i),i},set(a,i){e.has(a)?e.set(a,i):o(a,i)}}},qa="!",Pu=n=>{const{separator:r,experimentalParseClassName:e}=n,t=r.length===1,o=r[0],a=r.length,i=s=>{const l=[];let u=0,c=0,f;for(let g=0;g<s.length;g++){let b=s[g];if(u===0){if(b===o&&(t||s.slice(g,g+a)===r)){l.push(s.slice(c,g)),c=g+a;continue}if(b==="/"){f=g;continue}}b==="["?u++:b==="]"&&u--}const m=l.length===0?s:s.substring(c),p=m.startsWith(qa),h=p?m.substring(1):m,v=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:v}};return e?s=>e({className:s,parseClassName:i}):i},Mu=n=>{if(n.length<=1)return n;const r=[];let e=[];return n.forEach(t=>{t[0]==="["?(r.push(...e.sort(),t),e=[]):e.push(t)}),r.push(...e.sort()),r},Tu=n=>({cache:Ou(n.cacheSize),parseClassName:Pu(n),...Eu(n)}),Nu=/\s+/,Iu=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o}=r,a=[],i=n.trim().split(Nu);let s="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:c,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:p}=e(u);let h=!!p,v=t(h?m.substring(0,p):m);if(!v){if(!h){s=u+(s.length>0?" "+s:s);continue}if(v=t(m),!v){s=u+(s.length>0?" "+s:s);continue}h=!1}const g=Mu(c).join(":"),b=f?g+qa:g,w=b+v;if(a.includes(w))continue;a.push(w);const x=o(v,h);for(let k=0;k<x.length;++k){const P=x[k];a.push(b+P)}s=u+(s.length>0?" "+s:s)}return s};function Fu(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=Ga(r))&&(t&&(t+=" "),t+=e);return t}const Ga=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=Ga(n[t]))&&(e&&(e+=" "),e+=r);return e};function Lu(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,f)=>f(c),n());return e=Tu(u),t=e.cache.get,o=e.cache.set,a=s,s(l)}function s(l){const u=t(l);if(u)return u;const c=Iu(l,e);return o(l,c),c}return function(){return a(Fu.apply(null,arguments))}}const be=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},Xa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Au=/^\d+\/\d+$/,$u=new Set(["px","full","screen"]),Yu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ju=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ru=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=n=>on(n)||$u.has(n)||Au.test(n),Ct=n=>an(n,"length",Gu),on=n=>!!n&&!Number.isNaN(Number(n)),ho=n=>an(n,"number",on),Pn=n=>!!n&&Number.isInteger(Number(n)),Bu=n=>n.endsWith("%")&&on(n.slice(0,-1)),J=n=>Xa.test(n),kt=n=>Yu.test(n),Vu=new Set(["length","size","percentage"]),zu=n=>an(n,Vu,Ja),Qu=n=>an(n,"position",Ja),Uu=new Set(["image","url"]),Ku=n=>an(n,Uu,Ju),qu=n=>an(n,"",Xu),Mn=()=>!0,an=(n,r,e)=>{const t=Xa.exec(n);return t?t[1]?typeof r=="string"?t[1]===r:r.has(t[1]):e(t[2]):!1},Gu=n=>ju.test(n)&&!Wu.test(n),Ja=()=>!1,Xu=n=>Hu.test(n),Ju=n=>Ru.test(n),Zu=Lu(()=>{const n=be("colors"),r=be("spacing"),e=be("blur"),t=be("brightness"),o=be("borderColor"),a=be("borderRadius"),i=be("borderSpacing"),s=be("borderWidth"),l=be("contrast"),u=be("grayscale"),c=be("hueRotate"),f=be("invert"),m=be("gap"),p=be("gradientColorStops"),h=be("gradientColorStopPositions"),v=be("inset"),g=be("margin"),b=be("opacity"),w=be("padding"),x=be("saturate"),k=be("scale"),P=be("sepia"),M=be("skew"),S=be("space"),O=be("translate"),I=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",J,r],C=()=>[J,r],_=()=>["",ht,Ct],D=()=>["auto",on,J],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],A=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",J],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[on,J];return{cacheSize:500,separator:":",theme:{colors:[Mn],spacing:[ht,Ct],blur:["none","",kt,J],brightness:q(),borderColor:[n],borderRadius:["none","","full",kt,J],borderSpacing:C(),borderWidth:_(),contrast:q(),grayscale:j(),hueRotate:q(),invert:j(),gap:C(),gradientColorStops:[n],gradientColorStopPositions:[Bu,Ct],inset:E(),margin:E(),opacity:q(),padding:C(),saturate:q(),scale:q(),sepia:j(),skew:q(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[kt]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...N(),J]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pn,J]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Pn,J]}],"grid-cols":[{"grid-cols":[Mn]}],"col-start-end":[{col:["auto",{span:["full",Pn,J]},J]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Mn]}],"row-start-end":[{row:["auto",{span:[Pn,J]},J]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,r]}],"min-w":[{"min-w":[J,r,"min","max","fit"]}],"max-w":[{"max-w":[J,r,"none","full","min","max","fit","prose",{screen:[kt]},kt]}],h:[{h:[J,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,r,"auto","min","max","fit"]}],"font-size":[{text:["base",kt,Ct]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ho]}],"font-family":[{font:[Mn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",on,ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,Ct]}],"underline-offset":[{"underline-offset":["auto",ht,J]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...N(),Qu]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ku]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...A(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:A()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...A()]}],"outline-offset":[{"outline-offset":[ht,J]}],"outline-w":[{outline:[ht,Ct]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ht,Ct]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",kt,qu]}],"shadow-color":[{shadow:[Mn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[e]}],brightness:[{brightness:[t]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kt,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[e]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Pn,J]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[ht,Ct,ho]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ur(...n){return Zu(Le(n))}const Za=({className:n,text:r,onClick:e,disabled:t})=>T.jsx("button",{disabled:t,onClick:e,className:ur("w-full rounded-xl bg-petnowOrange py-5 text-2xl font-bold text-white transition-colors duration-200 disabled:bg-lightGray sm:hover:bg-[#DF592C] sm:disabled:hover:bg-lightGray",n),children:r});var ei={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ti=d.createContext&&d.createContext(ei),ec=["attr","size","title"];function tc(n,r){if(n==null)return{};var e=nc(n,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function nc(n,r){if(n==null)return{};var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){if(r.indexOf(t)>=0)continue;e[t]=n[t]}return e}function cr(){return cr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},cr.apply(this,arguments)}function ni(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function dr(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?ni(Object(e),!0).forEach(function(t){rc(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ni(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function rc(n,r,e){return r=oc(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function oc(n){var r=ac(n,"string");return typeof r=="symbol"?r:r+""}function ac(n,r){if(typeof n!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function ri(n){return n&&n.map((r,e)=>d.createElement(r.tag,dr({key:e},r.attr),ri(r.child)))}function Tn(n){return r=>d.createElement(ic,cr({attr:dr({},n.attr)},r),ri(n.child))}function ic(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=tc(n,ec),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",cr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:dr(dr({color:n.color||e.color},e.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&d.createElement("title",null,a),n.children)};return ti!==void 0?d.createElement(ti.Consumer,null,e=>r(e)):r(ei)}function sc(n){return Tn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(n)}function oi(n){return Tn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}const ai=typeof document<"u"?d.useLayoutEffect:()=>{};function lc(n){const r=d.useRef(null);return ai(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const Nn=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},Ht=n=>n&&"window"in n&&n.window===n?n:Nn(n).defaultView||window;function uc(n){var r;return typeof window>"u"||window.navigator==null?!1:((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands.some(e=>n.test(e.brand)))||n.test(window.navigator.userAgent)}function cc(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function ii(n){let r=null;return()=>(r==null&&(r=n()),r)}const dc=ii(function(){return cc(/^Mac/i)}),fc=ii(function(){return uc(/Android/i)});function pc(n){return n.mozInputSource===0&&n.isTrusted?!0:fc()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}class hc{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(r,e){this.nativeEvent=e,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.bubbles=e.bubbles,this.cancelable=e.cancelable,this.defaultPrevented=e.defaultPrevented,this.eventPhase=e.eventPhase,this.isTrusted=e.isTrusted,this.timeStamp=e.timeStamp,this.type=r}}function si(n){let r=d.useRef({isFocused:!1,observer:null});ai(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=lc(t=>{n==null||n(t)});return d.useCallback(t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){r.current.isFocused=!0;let o=t.target,a=i=>{r.current.isFocused=!1,o.disabled&&e(new hc("blur",i)),r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&o.disabled){var i;(i=r.current.observer)===null||i===void 0||i.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),r.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[e])}function mc(n){let{isDisabled:r,onFocus:e,onBlur:t,onFocusChange:o}=n;const a=d.useCallback(l=>{if(l.target===l.currentTarget)return t&&t(l),o&&o(!1),!0},[t,o]),i=si(a),s=d.useCallback(l=>{const u=Nn(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(e&&e(l),o&&o(!0),i(l))},[o,e,i]);return{focusProps:{onFocus:!r&&(e||o||t)?s:void 0,onBlur:!r&&(t||o)?a:void 0}}}let In=null,mo=new Set,Fn=new Map,Rt=!1,vo=!1;const vc={Tab:!0,Escape:!0};function go(n,r){for(let e of mo)e(n,r)}function gc(n){return!(n.metaKey||!dc()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function fr(n){Rt=!0,gc(n)&&(In="keyboard",go("keyboard",n))}function Ke(n){In="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(Rt=!0,go("pointer",n))}function li(n){pc(n)&&(Rt=!0,In="virtual")}function ui(n){n.target===window||n.target===document||(!Rt&&!vo&&(In="virtual",go("virtual",n)),Rt=!1,vo=!1)}function ci(){Rt=!1,vo=!0}function bo(n){if(typeof window>"u"||Fn.get(Ht(n)))return;const r=Ht(n),e=Nn(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){Rt=!0,t.apply(this,arguments)},e.addEventListener("keydown",fr,!0),e.addEventListener("keyup",fr,!0),e.addEventListener("click",li,!0),r.addEventListener("focus",ui,!0),r.addEventListener("blur",ci,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",Ke,!0),e.addEventListener("pointermove",Ke,!0),e.addEventListener("pointerup",Ke,!0)):(e.addEventListener("mousedown",Ke,!0),e.addEventListener("mousemove",Ke,!0),e.addEventListener("mouseup",Ke,!0)),r.addEventListener("beforeunload",()=>{di(n)},{once:!0}),Fn.set(r,{focus:t})}const di=(n,r)=>{const e=Ht(n),t=Nn(n);r&&t.removeEventListener("DOMContentLoaded",r),Fn.has(e)&&(e.HTMLElement.prototype.focus=Fn.get(e).focus,t.removeEventListener("keydown",fr,!0),t.removeEventListener("keyup",fr,!0),t.removeEventListener("click",li,!0),e.removeEventListener("focus",ui,!0),e.removeEventListener("blur",ci,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",Ke,!0),t.removeEventListener("pointermove",Ke,!0),t.removeEventListener("pointerup",Ke,!0)):(t.removeEventListener("mousedown",Ke,!0),t.removeEventListener("mousemove",Ke,!0),t.removeEventListener("mouseup",Ke,!0)),Fn.delete(e))};function bc(n){const r=Nn(n);let e;return r.readyState!=="loading"?bo(n):(e=()=>{bo(n)},r.addEventListener("DOMContentLoaded",e)),()=>di(n,e)}typeof document<"u"&&bc();function fi(){return In!=="pointer"}const yc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wc(n,r,e){var t;const o=typeof window<"u"?Ht(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Ht(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Ht(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?Ht(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||(e==null?void 0:e.target)instanceof o&&!yc.has(e==null||(t=e.target)===null||t===void 0?void 0:t.type)||(e==null?void 0:e.target)instanceof a||(e==null?void 0:e.target)instanceof i&&(e==null?void 0:e.target.isContentEditable),!(n&&r==="keyboard"&&e instanceof s&&!vc[e.key])}function xc(n,r,e){bo(),d.useEffect(()=>{let t=(o,a)=>{wc(!!(e!=null&&e.isTextInput),o,a)&&n(fi())};return mo.add(t),()=>{mo.delete(t)}},r)}function Dc(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),i=d.useCallback(u=>{a.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(a.current.isFocusWithin=!1,e&&e(u),o&&o(!1))},[e,o,a]),s=si(i),l=d.useCallback(u=>{!a.current.isFocusWithin&&document.activeElement===u.target&&(t&&t(u),o&&o(!0),a.current.isFocusWithin=!0,s(u))},[t,o,s]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:i}}}let pr=!1,yo=0;function wo(){pr=!0,setTimeout(()=>{pr=!1},50)}function pi(n){n.pointerType==="touch"&&wo()}function Ec(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",pi):document.addEventListener("touchend",wo),yo++,()=>{yo--,!(yo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",pi):document.removeEventListener("touchend",wo))}}function xo(n){let{onHoverStart:r,onHoverChange:e,onHoverEnd:t,isDisabled:o}=n,[a,i]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(Ec,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(p,h)=>{if(s.pointerType=h,o||h==="touch"||s.isHovered||!p.currentTarget.contains(p.target))return;s.isHovered=!0;let v=p.currentTarget;s.target=v,r&&r({type:"hoverstart",target:v,pointerType:h}),e&&e(!0),i(!0)},f=(p,h)=>{if(s.pointerType="",s.target=null,h==="touch"||!s.isHovered)return;s.isHovered=!1;let v=p.currentTarget;t&&t({type:"hoverend",target:v,pointerType:h}),e&&e(!1),i(!1)},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=p=>{pr&&p.pointerType==="mouse"||c(p,p.pointerType)},m.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=p=>{!s.ignoreEmulatedMouseEvents&&!pr&&c(p,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:m,triggerHoverEnd:f}},[r,e,t,o,s]);return d.useEffect(()=>{o&&u({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:l,isHovered:a}}function Do(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||fi()}),[a,i]=d.useState(!1),[s,l]=d.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=d.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=d.useCallback(p=>{o.current.isFocused=p,i(p),u()},[u]);xc(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=mc({isDisabled:t,onFocusChange:c}),{focusWithinProps:m}=Dc({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?m:f}}var Cc=Object.defineProperty,kc=(n,r,e)=>r in n?Cc(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Eo=(n,r,e)=>(kc(n,typeof r!="symbol"?r+"":r,e),e);let Sc=class{constructor(){Eo(this,"current",this.detect()),Eo(this,"handoffState","pending"),Eo(this,"currentId",0)}set(r){this.current!==r&&(this.handoffState="pending",this.currentId=0,this.current=r)}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"}},Bt=new Sc;function Vt(n){return Bt.isServer?null:n instanceof Node?n.ownerDocument:n!=null&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}function hr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function Je(){let n=[],r={addEventListener(e,t,o,a){return e.addEventListener(t,o,a),r.add(()=>e.removeEventListener(t,o,a))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return hr(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,o){let a=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:o}),this.add(()=>{Object.assign(e.style,{[t]:a})})},group(e){let t=Je();return e(t),this.add(()=>t.dispose())},add(e){return n.includes(e)||n.push(e),()=>{let t=n.indexOf(e);if(t>=0)for(let o of n.splice(t,1))o()}},dispose(){for(let e of n.splice(0))e()}};return r}function mt(){let[n]=d.useState(Je);return d.useEffect(()=>()=>n.dispose(),[n]),n}let ne=(n,r)=>{Bt.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function vt(n){let r=d.useRef(n);return ne(()=>{r.current=n},[n]),r}let L=function(n){let r=vt(n);return d.useCallback((...e)=>r.current(...e),[r])};function _c(n){let r=n.width/2,e=n.height/2;return{top:n.clientY-e,right:n.clientX+r,bottom:n.clientY+e,left:n.clientX-r}}function Oc(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function hi({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=mt(),a=L(()=>{r.current=null,t(!1),o.dispose()}),i=L(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=Vt(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=_c(u);t(Oc(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Pc=d.createContext(void 0);function mr(){return d.useContext(Pc)}function Co(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Ne(n,r,...e){if(n in r){let o=r[n];return typeof o=="function"?o(...e):o}let t=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ne),t}var St=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(St||{}),_t=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(_t||{});function Ce({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Mc;let l=mi(r,n);if(a)return vr(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return vr(f,e,t,i,s)}if(u&1){let{unmount:c=!0,...f}=l;return Ne(c?0:1,{0(){return null},1(){return vr({...f,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return vr(l,e,t,i,s)}function vr(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=ko(n,["unmount","static"]),u=n.ref!==void 0?{[s]:n.ref}:{},c=typeof i=="function"?i(r):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(r)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(r){let m=!1,p=[];for(let[h,v]of Object.entries(r))typeof v=="boolean"&&(m=!0),v===!0&&p.push(h.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(m){f["data-headlessui-state"]=p.join(" ");for(let h of p)f[`data-${h}`]=""}}if(a===d.Fragment&&(Object.keys(Ot(l)).length>0||Object.keys(Ot(f)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Ot(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${t} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ot(l)).concat(Object.keys(Ot(f))).map(m=>` - ${m}`).join(`
|
|
31
|
-
`),"","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(
|
|
30
|
+
<%s key={someKey} {...props} />`,Va,nn,gy,nn),_u[nn+Va]=!0}}return y===e?fy(Fe):dy(Fe),Fe}}function py(y,L,V){return Ou(y,L,V,!0)}function my(y,L,V){return Ou(y,L,V,!1)}var hy=my,vy=py;On.Fragment=e,On.jsx=hy,On.jsxs=vy}()),On}process.env.NODE_ENV==="production"?go.exports=Pu():go.exports=Mu();var N=go.exports;function Ka(n){var r,t,e="";if(typeof n=="string"||typeof n=="number")e+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(r=0;r<o;r++)n[r]&&(t=Ka(n[r]))&&(e&&(e+=" "),e+=t)}else for(t in n)n[t]&&(e&&(e+=" "),e+=t);return e}function Le(){for(var n,r,t=0,e="",o=arguments.length;t<o;t++)(n=arguments[t])&&(r=Ka(n))&&(e&&(e+=" "),e+=r);return e}const bo="-",Tu=n=>{const r=Iu(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:e}=n;return{getClassGroupId:i=>{const s=i.split(bo);return s[0]===""&&s.length!==1&&s.shift(),qa(s,r)||Nu(i)},getConflictingClassGroupIds:(i,s)=>{const l=t[i]||[];return s&&e[i]?[...l,...e[i]]:l}}},qa=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const t=n[0],e=r.nextPart.get(t),o=e?qa(n.slice(1),e):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(bo);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ga=/^\[(.+)\]$/,Nu=n=>{if(Ga.test(n)){const r=Ga.exec(n)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Iu=n=>{const{theme:r,prefix:t}=n,e={nextPart:new Map,validators:[]};return Lu(Object.entries(n.classGroups),t).forEach(([a,i])=>{yo(i,e,a,r)}),e},yo=(n,r,t,e)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:Xa(r,o);a.classGroupId=t;return}if(typeof o=="function"){if(Fu(o)){yo(o(e),r,t,e);return}r.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([a,i])=>{yo(i,Xa(r,a),t,e)})})},Xa=(n,r)=>{let t=n;return r.split(bo).forEach(e=>{t.nextPart.has(e)||t.nextPart.set(e,{nextPart:new Map,validators:[]}),t=t.nextPart.get(e)}),t},Fu=n=>n.isThemeGetter,Lu=(n,r)=>r?n.map(([t,e])=>{const o=e.map(a=>typeof a=="string"?r+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[r+i,s])):a);return[t,o]}):n,$u=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,e=new Map;const o=(a,i)=>{t.set(a,i),r++,r>n&&(r=0,e=t,t=new Map)};return{get(a){let i=t.get(a);if(i!==void 0)return i;if((i=e.get(a))!==void 0)return o(a,i),i},set(a,i){t.has(a)?t.set(a,i):o(a,i)}}},Ja="!",Au=n=>{const{separator:r,experimentalParseClassName:t}=n,e=r.length===1,o=r[0],a=r.length,i=s=>{const l=[];let d=0,u=0,p;for(let g=0;g<s.length;g++){let b=s[g];if(d===0){if(b===o&&(e||s.slice(g,g+a)===r)){l.push(s.slice(u,g)),u=g+a;continue}if(b==="/"){p=g;continue}}b==="["?d++:b==="]"&&d--}const h=l.length===0?s:s.substring(u),f=h.startsWith(Ja),m=f?h.substring(1):h,v=p&&p>u?p-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:v}};return t?s=>t({className:s,parseClassName:i}):i},Yu=n=>{if(n.length<=1)return n;const r=[];let t=[];return n.forEach(e=>{e[0]==="["?(r.push(...t.sort(),e),t=[]):t.push(e)}),r.push(...t.sort()),r},ju=n=>({cache:$u(n.cacheSize),parseClassName:Au(n),...Tu(n)}),Wu=/\s+/,Hu=(n,r)=>{const{parseClassName:t,getClassGroupId:e,getConflictingClassGroupIds:o}=r,a=[],i=n.trim().split(Wu);let s="";for(let l=i.length-1;l>=0;l-=1){const d=i[l],{modifiers:u,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:f}=t(d);let m=!!f,v=e(m?h.substring(0,f):h);if(!v){if(!m){s=d+(s.length>0?" "+s:s);continue}if(v=e(h),!v){s=d+(s.length>0?" "+s:s);continue}m=!1}const g=Yu(u).join(":"),b=p?g+Ja:g,w=b+v;if(a.includes(w))continue;a.push(w);const x=o(v,m);for(let E=0;E<x.length;++E){const P=x[E];a.push(b+P)}s=d+(s.length>0?" "+s:s)}return s};function Ru(){let n=0,r,t,e="";for(;n<arguments.length;)(r=arguments[n++])&&(t=Za(r))&&(e&&(e+=" "),e+=t);return e}const Za=n=>{if(typeof n=="string")return n;let r,t="";for(let e=0;e<n.length;e++)n[e]&&(r=Za(n[e]))&&(t&&(t+=" "),t+=r);return t};function Bu(n,...r){let t,e,o,a=i;function i(l){const d=r.reduce((u,p)=>p(u),n());return t=ju(d),e=t.cache.get,o=t.cache.set,a=s,s(l)}function s(l){const d=e(l);if(d)return d;const u=Hu(l,t);return o(l,u),u}return function(){return a(Ru.apply(null,arguments))}}const be=n=>{const r=t=>t[n]||[];return r.isThemeGetter=!0,r},ei=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vu=/^\d+\/\d+$/,zu=new Set(["px","full","screen"]),Qu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ku=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=n=>on(n)||zu.has(n)||Vu.test(n),kt=n=>an(n,"length",oc),on=n=>!!n&&!Number.isNaN(Number(n)),wo=n=>an(n,"number",on),Pn=n=>!!n&&Number.isInteger(Number(n)),Xu=n=>n.endsWith("%")&&on(n.slice(0,-1)),J=n=>ei.test(n),St=n=>Qu.test(n),Ju=new Set(["length","size","percentage"]),Zu=n=>an(n,Ju,ti),ec=n=>an(n,"position",ti),tc=new Set(["image","url"]),nc=n=>an(n,tc,ic),rc=n=>an(n,"",ac),Mn=()=>!0,an=(n,r,t)=>{const e=ei.exec(n);return e?e[1]?typeof r=="string"?e[1]===r:r.has(e[1]):t(e[2]):!1},oc=n=>Uu.test(n)&&!Ku.test(n),ti=()=>!1,ac=n=>qu.test(n),ic=n=>Gu.test(n),sc=Bu(()=>{const n=be("colors"),r=be("spacing"),t=be("blur"),e=be("brightness"),o=be("borderColor"),a=be("borderRadius"),i=be("borderSpacing"),s=be("borderWidth"),l=be("contrast"),d=be("grayscale"),u=be("hueRotate"),p=be("invert"),h=be("gap"),f=be("gradientColorStops"),m=be("gradientColorStopPositions"),v=be("inset"),g=be("margin"),b=be("opacity"),w=be("padding"),x=be("saturate"),E=be("scale"),P=be("sepia"),M=be("skew"),_=be("space"),S=be("translate"),I=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",J,r],D=()=>[J,r],O=()=>["",ht,kt],C=()=>["auto",on,J],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",J],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[on,J];return{cacheSize:500,separator:":",theme:{colors:[Mn],spacing:[ht,kt],blur:["none","",St,J],brightness:U(),borderColor:[n],borderRadius:["none","","full",St,J],borderSpacing:D(),borderWidth:O(),contrast:U(),grayscale:H(),hueRotate:U(),invert:H(),gap:D(),gradientColorStops:[n],gradientColorStopPositions:[Xu,kt],inset:k(),margin:k(),opacity:U(),padding:D(),saturate:U(),scale:U(),sepia:H(),skew:U(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[St]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),J]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pn,J]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Pn,J]}],"grid-cols":[{"grid-cols":[Mn]}],"col-start-end":[{col:["auto",{span:["full",Pn,J]},J]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[Mn]}],"row-start-end":[{row:["auto",{span:[Pn,J]},J]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,r]}],"min-w":[{"min-w":[J,r,"min","max","fit"]}],"max-w":[{"max-w":[J,r,"none","full","min","max","fit","prose",{screen:[St]},St]}],h:[{h:[J,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,r,"auto","min","max","fit"]}],"font-size":[{text:["base",St,kt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wo]}],"font-family":[{font:[Mn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",on,wo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,kt]}],"underline-offset":[{"underline-offset":["auto",ht,J]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),ec]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nc]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[ht,J]}],"outline-w":[{outline:[ht,kt]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ht,kt]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",St,rc]}],"shadow-color":[{shadow:[Mn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[e]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",St,J]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[p]}],saturate:[{saturate:[x]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[e]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Pn,J]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[ht,kt,wo]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function dr(...n){return sc(Le(n))}const ni=({className:n,text:r,onClick:t,disabled:e})=>N.jsx("button",{disabled:e,onClick:t,className:dr("w-full rounded-xl bg-petnowOrange py-5 text-2xl font-bold text-white transition-colors duration-200 disabled:bg-lightGray sm:hover:bg-[#DF592C] sm:disabled:hover:bg-lightGray",n),children:r});var ri={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},oi=c.createContext&&c.createContext(ri),lc=["attr","size","title"];function uc(n,r){if(n==null)return{};var t=cc(n,r),e,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)e=a[o],!(r.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(n,e)&&(t[e]=n[e])}return t}function cc(n,r){if(n==null)return{};var t={};for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)){if(r.indexOf(e)>=0)continue;t[e]=n[e]}return t}function fr(){return fr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},fr.apply(this,arguments)}function ai(n,r){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);r&&(e=e.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,e)}return t}function pr(n){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ai(Object(t),!0).forEach(function(e){dc(n,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ai(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))})}return n}function dc(n,r,t){return r=fc(r),r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function fc(n){var r=pc(n,"string");return typeof r=="symbol"?r:r+""}function pc(n,r){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,r||"default");if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function ii(n){return n&&n.map((r,t)=>c.createElement(r.tag,pr({key:t},r.attr),ii(r.child)))}function Tn(n){return r=>c.createElement(mc,fr({attr:pr({},n.attr)},r),ii(n.child))}function mc(n){var r=t=>{var{attr:e,size:o,title:a}=n,i=uc(n,lc),s=o||t.size||"1em",l;return t.className&&(l=t.className),n.className&&(l=(l?l+" ":"")+n.className),c.createElement("svg",fr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,e,i,{className:l,style:pr(pr({color:n.color||t.color},t.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&c.createElement("title",null,a),n.children)};return oi!==void 0?c.createElement(oi.Consumer,null,t=>r(t)):r(ri)}function hc(n){return Tn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(n)}function si(n){return Tn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}const li=typeof document<"u"?c.useLayoutEffect:()=>{};function vc(n){const r=c.useRef(null);return li(()=>{r.current=n},[n]),c.useCallback((...t)=>{const e=r.current;return e==null?void 0:e(...t)},[])}const Nn=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},Ht=n=>n&&"window"in n&&n.window===n?n:Nn(n).defaultView||window;function gc(n){var r;return typeof window>"u"||window.navigator==null?!1:((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands.some(t=>n.test(t.brand)))||n.test(window.navigator.userAgent)}function bc(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function ui(n){let r=null;return()=>(r==null&&(r=n()),r)}const yc=ui(function(){return bc(/^Mac/i)}),wc=ui(function(){return gc(/Android/i)});function xc(n){return n.mozInputSource===0&&n.isTrusted?!0:wc()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}class Dc{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(r,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=r}}function ci(n){let r=c.useRef({isFocused:!1,observer:null});li(()=>{const e=r.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=vc(e=>{n==null||n(e)});return c.useCallback(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){r.current.isFocused=!0;let o=e.target,a=i=>{r.current.isFocused=!1,o.disabled&&t(new Dc("blur",i)),r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&o.disabled){var i;(i=r.current.observer)===null||i===void 0||i.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),r.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}function Ec(n){let{isDisabled:r,onFocus:t,onBlur:e,onFocusChange:o}=n;const a=c.useCallback(l=>{if(l.target===l.currentTarget)return e&&e(l),o&&o(!1),!0},[e,o]),i=ci(a),s=c.useCallback(l=>{const d=Nn(l.target);l.target===l.currentTarget&&d.activeElement===l.target&&(t&&t(l),o&&o(!0),i(l))},[o,t,i]);return{focusProps:{onFocus:!r&&(t||o||e)?s:void 0,onBlur:!r&&(e||o)?a:void 0}}}let In=null,xo=new Set,Fn=new Map,Rt=!1,Do=!1;const Cc={Tab:!0,Escape:!0};function Eo(n,r){for(let t of xo)t(n,r)}function kc(n){return!(n.metaKey||!yc()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function mr(n){Rt=!0,kc(n)&&(In="keyboard",Eo("keyboard",n))}function Ke(n){In="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(Rt=!0,Eo("pointer",n))}function di(n){xc(n)&&(Rt=!0,In="virtual")}function fi(n){n.target===window||n.target===document||(!Rt&&!Do&&(In="virtual",Eo("virtual",n)),Rt=!1,Do=!1)}function pi(){Rt=!1,Do=!0}function Co(n){if(typeof window>"u"||Fn.get(Ht(n)))return;const r=Ht(n),t=Nn(n);let e=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){Rt=!0,e.apply(this,arguments)},t.addEventListener("keydown",mr,!0),t.addEventListener("keyup",mr,!0),t.addEventListener("click",di,!0),r.addEventListener("focus",fi,!0),r.addEventListener("blur",pi,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",Ke,!0),t.addEventListener("pointermove",Ke,!0),t.addEventListener("pointerup",Ke,!0)):(t.addEventListener("mousedown",Ke,!0),t.addEventListener("mousemove",Ke,!0),t.addEventListener("mouseup",Ke,!0)),r.addEventListener("beforeunload",()=>{mi(n)},{once:!0}),Fn.set(r,{focus:e})}const mi=(n,r)=>{const t=Ht(n),e=Nn(n);r&&e.removeEventListener("DOMContentLoaded",r),Fn.has(t)&&(t.HTMLElement.prototype.focus=Fn.get(t).focus,e.removeEventListener("keydown",mr,!0),e.removeEventListener("keyup",mr,!0),e.removeEventListener("click",di,!0),t.removeEventListener("focus",fi,!0),t.removeEventListener("blur",pi,!1),typeof PointerEvent<"u"?(e.removeEventListener("pointerdown",Ke,!0),e.removeEventListener("pointermove",Ke,!0),e.removeEventListener("pointerup",Ke,!0)):(e.removeEventListener("mousedown",Ke,!0),e.removeEventListener("mousemove",Ke,!0),e.removeEventListener("mouseup",Ke,!0)),Fn.delete(t))};function Sc(n){const r=Nn(n);let t;return r.readyState!=="loading"?Co(n):(t=()=>{Co(n)},r.addEventListener("DOMContentLoaded",t)),()=>mi(n,t)}typeof document<"u"&&Sc();function hi(){return In!=="pointer"}const _c=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Oc(n,r,t){var e;const o=typeof window<"u"?Ht(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Ht(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Ht(t==null?void 0:t.target).HTMLElement:HTMLElement,s=typeof window<"u"?Ht(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return n=n||(t==null?void 0:t.target)instanceof o&&!_c.has(t==null||(e=t.target)===null||e===void 0?void 0:e.type)||(t==null?void 0:t.target)instanceof a||(t==null?void 0:t.target)instanceof i&&(t==null?void 0:t.target.isContentEditable),!(n&&r==="keyboard"&&t instanceof s&&!Cc[t.key])}function Pc(n,r,t){Co(),c.useEffect(()=>{let e=(o,a)=>{Oc(!!(t!=null&&t.isTextInput),o,a)&&n(hi())};return xo.add(e),()=>{xo.delete(e)}},r)}function Mc(n){let{isDisabled:r,onBlurWithin:t,onFocusWithin:e,onFocusWithinChange:o}=n,a=c.useRef({isFocusWithin:!1}),i=c.useCallback(d=>{a.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(a.current.isFocusWithin=!1,t&&t(d),o&&o(!1))},[t,o,a]),s=ci(i),l=c.useCallback(d=>{!a.current.isFocusWithin&&document.activeElement===d.target&&(e&&e(d),o&&o(!0),a.current.isFocusWithin=!0,s(d))},[e,o,s]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:i}}}let hr=!1,ko=0;function So(){hr=!0,setTimeout(()=>{hr=!1},50)}function vi(n){n.pointerType==="touch"&&So()}function Tc(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",vi):document.addEventListener("touchend",So),ko++,()=>{ko--,!(ko>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",vi):document.removeEventListener("touchend",So))}}function _o(n){let{onHoverStart:r,onHoverChange:t,onHoverEnd:e,isDisabled:o}=n,[a,i]=c.useState(!1),s=c.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;c.useEffect(Tc,[]);let{hoverProps:l,triggerHoverEnd:d}=c.useMemo(()=>{let u=(f,m)=>{if(s.pointerType=m,o||m==="touch"||s.isHovered||!f.currentTarget.contains(f.target))return;s.isHovered=!0;let v=f.currentTarget;s.target=v,r&&r({type:"hoverstart",target:v,pointerType:m}),t&&t(!0),i(!0)},p=(f,m)=>{if(s.pointerType="",s.target=null,m==="touch"||!s.isHovered)return;s.isHovered=!1;let v=f.currentTarget;e&&e({type:"hoverend",target:v,pointerType:m}),t&&t(!1),i(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=f=>{hr&&f.pointerType==="mouse"||u(f,f.pointerType)},h.onPointerLeave=f=>{!o&&f.currentTarget.contains(f.target)&&p(f,f.pointerType)}):(h.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=f=>{!s.ignoreEmulatedMouseEvents&&!hr&&u(f,"mouse"),s.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=f=>{!o&&f.currentTarget.contains(f.target)&&p(f,"mouse")}),{hoverProps:h,triggerHoverEnd:p}},[r,t,e,o,s]);return c.useEffect(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:l,isHovered:a}}function Oo(n={}){let{autoFocus:r=!1,isTextInput:t,within:e}=n,o=c.useRef({isFocused:!1,isFocusVisible:r||hi()}),[a,i]=c.useState(!1),[s,l]=c.useState(()=>o.current.isFocused&&o.current.isFocusVisible),d=c.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=c.useCallback(f=>{o.current.isFocused=f,i(f),d()},[d]);Pc(f=>{o.current.isFocusVisible=f,d()},[],{isTextInput:t});let{focusProps:p}=Ec({isDisabled:e,onFocusChange:u}),{focusWithinProps:h}=Mc({isDisabled:!e,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:e?h:p}}var Nc=Object.defineProperty,Ic=(n,r,t)=>r in n?Nc(n,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[r]=t,Po=(n,r,t)=>(Ic(n,typeof r!="symbol"?r+"":r,t),t);let Fc=class{constructor(){Po(this,"current",this.detect()),Po(this,"handoffState","pending"),Po(this,"currentId",0)}set(r){this.current!==r&&(this.handoffState="pending",this.currentId=0,this.current=r)}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"}},Bt=new Fc;function Vt(n){return Bt.isServer?null:n instanceof Node?n.ownerDocument:n!=null&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}function vr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function Je(){let n=[],r={addEventListener(t,e,o,a){return t.addEventListener(e,o,a),r.add(()=>t.removeEventListener(e,o,a))},requestAnimationFrame(...t){let e=requestAnimationFrame(...t);return r.add(()=>cancelAnimationFrame(e))},nextFrame(...t){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...t))},setTimeout(...t){let e=setTimeout(...t);return r.add(()=>clearTimeout(e))},microTask(...t){let e={current:!0};return vr(()=>{e.current&&t[0]()}),r.add(()=>{e.current=!1})},style(t,e,o){let a=t.style.getPropertyValue(e);return Object.assign(t.style,{[e]:o}),this.add(()=>{Object.assign(t.style,{[e]:a})})},group(t){let e=Je();return t(e),this.add(()=>e.dispose())},add(t){return n.includes(t)||n.push(t),()=>{let e=n.indexOf(t);if(e>=0)for(let o of n.splice(e,1))o()}},dispose(){for(let t of n.splice(0))t()}};return r}function vt(){let[n]=c.useState(Je);return c.useEffect(()=>()=>n.dispose(),[n]),n}let ne=(n,r)=>{Bt.isServer?c.useEffect(n,r):c.useLayoutEffect(n,r)};function gt(n){let r=c.useRef(n);return ne(()=>{r.current=n},[n]),r}let j=function(n){let r=gt(n);return c.useCallback((...t)=>r.current(...t),[r])};function Lc(n){let r=n.width/2,t=n.height/2;return{top:n.clientY-t,right:n.clientX+r,bottom:n.clientY+t,left:n.clientX-r}}function $c(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function gi({disabled:n=!1}={}){let r=c.useRef(null),[t,e]=c.useState(!1),o=vt(),a=j(()=>{r.current=null,e(!1),o.dispose()}),i=j(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,e(!0);{let l=Vt(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",d=>{if(r.current){let u=Lc(d);e($c(u,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:t,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Ac=c.createContext(void 0);function gr(){return c.useContext(Ac)}function Mo(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Ne(n,r,...t){if(n in r){let o=r[n];return typeof o=="function"?o(...t):o}let e=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ne),e}var _t=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(_t||{}),Ot=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(Ot||{});function Ce({ourProps:n,theirProps:r,slot:t,defaultTag:e,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Yc;let l=yi(r,n);if(a)return br(l,t,e,i,s);let d=o??0;if(d&2){let{static:u=!1,...p}=l;if(u)return br(p,t,e,i,s)}if(d&1){let{unmount:u=!0,...p}=l;return Ne(u?0:1,{0(){return null},1(){return br({...p,hidden:!0,style:{display:"none"}},t,e,i,s)}})}return br(l,t,e,i,s)}function br(n,r={},t,e,o){let{as:a=t,children:i,refName:s="ref",...l}=To(n,["unmount","static"]),d=n.ref!==void 0?{[s]:n.ref}:{},u=typeof i=="function"?i(r):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(r)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let p={};if(r){let h=!1,f=[];for(let[m,v]of Object.entries(r))typeof v=="boolean"&&(h=!0),v===!0&&f.push(m.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(h){p["data-headlessui-state"]=f.join(" ");for(let m of f)p[`data-${m}`]=""}}if(a===c.Fragment&&(Object.keys(Pt(l)).length>0||Object.keys(Pt(p)).length>0))if(!c.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(Pt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${e} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Pt(l)).concat(Object.keys(Pt(p))).map(h=>` - ${h}`).join(`
|
|
31
|
+
`),"","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(h=>` - ${h}`).join(`
|
|
32
32
|
`)].join(`
|
|
33
|
-
`))}else{let
|
|
33
|
+
`))}else{let h=u.props,f=h==null?void 0:h.className,m=typeof f=="function"?(...b)=>Mo(f(...b),l.className):Mo(f,l.className),v=m?{className:m}:{},g=yi(u.props,Pt(To(l,["ref"])));for(let b in p)b in g&&delete p[b];return c.cloneElement(u,Object.assign({},g,p,d,{ref:o(u.ref,d.ref)},v))}return c.createElement(a,Object.assign({},To(l,["ref"]),a!==c.Fragment&&d,a!==c.Fragment&&p),u)}function bi(){let n=c.useRef([]),r=c.useCallback(t=>{for(let e of n.current)e!=null&&(typeof e=="function"?e(t):e.current=t)},[]);return(...t)=>{if(!t.every(e=>e==null))return n.current=t,r}}function Yc(...n){return n.every(r=>r==null)?void 0:r=>{for(let t of n)t!=null&&(typeof t=="function"?t(r):t.current=r)}}function yi(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},t={};for(let e of n)for(let o in e)o.startsWith("on")&&typeof e[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(e[o])):r[o]=e[o];if(r.disabled||r["aria-disabled"])for(let e in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(t[e]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let e in t)Object.assign(r,{[e](o,...a){let i=t[e];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...a)}}});return r}function Ln(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},t={};for(let e of n)for(let o in e)o.startsWith("on")&&typeof e[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(e[o])):r[o]=e[o];for(let e in t)Object.assign(r,{[e](...o){let a=t[e];for(let i of a)i==null||i(...o)}});return r}function ye(n){var r;return Object.assign(c.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function Pt(n){let r=Object.assign({},n);for(let t in r)r[t]===void 0&&delete r[t];return r}function To(n,r=[]){let t=Object.assign({},n);for(let e of r)e in t&&delete t[e];return t}function wi(n,r,t){let[e,o]=c.useState(t),a=n!==void 0,i=c.useRef(a),s=c.useRef(!1),l=c.useRef(!1);return a&&!i.current&&!s.current?(s.current=!0,i.current=a,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.")):!a&&i.current&&!l.current&&(l.current=!0,i.current=a,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.")),[a?n:e,j(d=>(a||o(d),r==null?void 0:r(d)))]}function xi(n){let[r]=c.useState(n);return r}function Di(n={},r=null,t=[]){for(let[e,o]of Object.entries(n))Ci(t,Ei(r,e),o);return t}function Ei(n,r){return n?n+"["+r+"]":r}function Ci(n,r,t){if(Array.isArray(t))for(let[e,o]of t.entries())Ci(n,Ei(r,e.toString()),o);else t instanceof Date?n.push([r,t.toISOString()]):typeof t=="boolean"?n.push([r,t?"1":"0"]):typeof t=="string"?n.push([r,t]):typeof t=="number"?n.push([r,`${t}`]):t==null?n.push([r,""]):Di(t,r,n)}function jc(n){var r,t;let e=(r=n==null?void 0:n.form)!=null?r:n.closest("form");if(e){for(let o of e.elements)if(o!==n&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=e.requestSubmit)==null||t.call(e)}}let Wc="span";var sn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(sn||{});function Hc(n,r){var t;let{features:e=1,...o}=n,a={ref:r,"aria-hidden":(e&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(e&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",...(e&4)===4&&(e&2)!==2&&{display:"none"}}};return Ce({ourProps:a,theirProps:o,slot:{},defaultTag:Wc,name:"Hidden"})}let $n=ye(Hc),Rc=c.createContext(null);function Bc({children:n}){let r=c.useContext(Rc);if(!r)return c.createElement(c.Fragment,null,n);let{target:t}=r;return t?Ee.createPortal(c.createElement(c.Fragment,null,n),t):null}function ki({data:n,form:r,disabled:t,onReset:e,overrides:o}){let[a,i]=c.useState(null),s=vt();return c.useEffect(()=>{if(e&&a)return s.addEventListener(a,"reset",e)},[a,r,e]),c.createElement(Bc,null,c.createElement(Vc,{setForm:i,formId:r}),Di(n).map(([l,d])=>c.createElement($n,{features:sn.Hidden,...Pt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:t,name:l,value:d,...o})})))}function Vc({setForm:n,formId:r}){return c.useEffect(()=>{if(r){let t=document.getElementById(r);t&&n(t)}},[n,r]),r?null:c.createElement($n,{features:sn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let e=t.closest("form");e&&n(e)}})}let zc=c.createContext(void 0);function No(){return c.useContext(zc)}function Si(n){let r=n.parentElement,t=null;for(;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(t=r),r=r.parentElement;let e=(r==null?void 0:r.getAttribute("disabled"))==="";return e&&Qc(t)?!1:e}function Qc(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(r instanceof HTMLLegendElement)return!1;r=r.previousElementSibling}return!0}let _i=Symbol();function Uc(n,r=!0){return Object.assign(n,{[_i]:r})}function Ie(...n){let r=c.useRef(n);c.useEffect(()=>{r.current=n},[n]);let t=j(e=>{for(let o of r.current)o!=null&&(typeof o=="function"?o(e):o.current=e)});return n.every(e=>e==null||(e==null?void 0:e[_i]))?void 0:t}let yr=c.createContext(null);yr.displayName="DescriptionContext";function Oi(){let n=c.useContext(yr);if(n===null){let r=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Oi),r}return n}function Pi(){var n,r;return(r=(n=c.useContext(yr))==null?void 0:n.value)!=null?r:void 0}function Kc(){let[n,r]=c.useState([]);return[n.length>0?n.join(" "):void 0,c.useMemo(()=>function(t){let e=j(a=>(r(i=>[...i,a]),()=>r(i=>{let s=i.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),o=c.useMemo(()=>({register:e,slot:t.slot,name:t.name,props:t.props,value:t.value}),[e,t.slot,t.name,t.props,t.value]);return c.createElement(yr.Provider,{value:o},t.children)},[r])]}let qc="p";function Gc(n,r){let t=c.useId(),e=gr(),{id:o=`headlessui-description-${t}`,...a}=n,i=Oi(),s=Ie(r);ne(()=>i.register(o),[o,i.register]);let l=e||!1,d=c.useMemo(()=>({...i.slot,disabled:l}),[i.slot,l]),u={ref:s,...i.props,id:o};return Ce({ourProps:u,theirProps:a,slot:d,defaultTag:qc,name:i.name||"Description"})}let Xc=ye(Gc),Mi=Object.assign(Xc,{});var ae=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(ae||{});let wr=c.createContext(null);wr.displayName="LabelContext";function Ti(){let n=c.useContext(wr);if(n===null){let r=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Ti),r}return n}function An(n){var r,t,e;let o=(t=(r=c.useContext(wr))==null?void 0:r.value)!=null?t:void 0;return((e=n==null?void 0:n.length)!=null?e:0)>0?[o,...n].filter(Boolean).join(" "):o}function Ni({inherit:n=!1}={}){let r=An(),[t,e]=c.useState([]),o=n?[r,...t].filter(Boolean):t;return[o.length>0?o.join(" "):void 0,c.useMemo(()=>function(a){let i=j(l=>(e(d=>[...d,l]),()=>e(d=>{let u=d.slice(),p=u.indexOf(l);return p!==-1&&u.splice(p,1),u}))),s=c.useMemo(()=>({register:i,slot:a.slot,name:a.name,props:a.props,value:a.value}),[i,a.slot,a.name,a.props,a.value]);return c.createElement(wr.Provider,{value:s},a.children)},[e])]}let Jc="label";function Zc(n,r){var t;let e=c.useId(),o=Ti(),a=No(),i=gr(),{id:s=`headlessui-label-${e}`,htmlFor:l=a??((t=o.props)==null?void 0:t.htmlFor),passive:d=!1,...u}=n,p=Ie(r);ne(()=>o.register(s),[s,o.register]);let h=j(g=>{let b=g.currentTarget;if(b instanceof HTMLLabelElement&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),b instanceof HTMLLabelElement){let w=document.getElementById(b.htmlFor);if(w){let x=w.getAttribute("disabled");if(x==="true"||x==="")return;let E=w.getAttribute("aria-disabled");if(E==="true"||E==="")return;(w instanceof HTMLInputElement&&(w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),f=i||!1,m=c.useMemo(()=>({...o.slot,disabled:f}),[o.slot,f]),v={ref:p,...o.props,id:s,htmlFor:l,onClick:h};return d&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in u&&delete u.onClick),Ce({ourProps:v,theirProps:u,slot:m,defaultTag:l?Jc:"div",name:o.name||"Label"})}let ed=ye(Zc),xr=Object.assign(ed,{}),td=c.createContext(()=>{});function nd({value:n,children:r}){return c.createElement(td.Provider,{value:n},r)}function Yn(n,r,t){let e=t.initialDeps??[],o;return()=>{var a,i,s,l;let d;t.key&&((a=t.debug)!=null&&a.call(t))&&(d=Date.now());const u=n();if(!(u.length!==e.length||u.some((f,m)=>e[m]!==f)))return o;e=u;let h;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(h=Date.now()),o=r(...u),t.key&&((s=t.debug)!=null&&s.call(t))){const f=Math.round((Date.now()-d)*100)/100,m=Math.round((Date.now()-h)*100)/100,v=m/16,g=(b,w)=>{for(b=String(b);b.length<w;)b=" "+b;return b};console.info(`%c⏱ ${g(m,5)} /${g(f,5)} ms`,`
|
|
34
34
|
font-size: .6rem;
|
|
35
35
|
font-weight: bold;
|
|
36
|
-
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(l=e==null?void 0:e.onChange)==null||l.call(e,o),o}}function _o(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const qc=(n,r)=>Math.abs(n-r)<1,Gc=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},Xc=n=>n,Jc=n=>{const r=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let o=r;o<=e;o++)t.push(o);return t},Zc=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const o=i=>{const{width:s,height:l}=i;r({width:Math.round(s),height:Math.round(l)})};if(o(e.getBoundingClientRect()),!t.ResizeObserver)return()=>{};const a=new t.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const l=s.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(e.getBoundingClientRect())});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},Pi={passive:!0},ed=typeof window>"u"?!0:"onscrollend"in window,td=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=ed?()=>{}:Gc(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=u=>()=>{o=e[n.options.horizontal?"scrollLeft":"scrollTop"],a(),r(o,u)},s=i(!0),l=i(!1);return l(),e.addEventListener("scroll",s,Pi),e.addEventListener("scrollend",l,Pi),()=>{e.removeEventListener("scroll",s),e.removeEventListener("scrollend",l)}},nd=(n,r,e)=>{if(r!=null&&r.borderBoxSize){const t=r.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},rd=(n,{adjustments:r=0,behavior:e},t)=>{var o,a;const i=n+r;(a=(o=t.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[t.options.horizontal?"left":"top"]:i,behavior:e})};class od{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var o;return(o=t())==null?void 0:o.disconnect()},observe:o=>{var a;return(a=t())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=t())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,o])=>{typeof o>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Xc,rangeExtractor:Jc,onChange:()=>{},measureElement:nd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...e}},this.notify=(e,t)=>{var o,a;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(e||i!==(l==null?void 0:l.startIndex)||s!==(l==null?void 0:l.endIndex))&&((a=(o=this.options).onChange)==null||a.call(o,this,t))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.notify(!1,!1);return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=a,this.notify(i!==a,a)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const o=new Map,a=new Map;for(let i=t-1;i>=0;i--){const s=e[i];if(o.has(s.lane))continue;const l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.end<l.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=Yn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,o,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=Yn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i},s)=>{var l;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,u);for(let f=u;f<e;f++){let m=(l=this.measurementsCache[f])==null?void 0:l.measureElement;m||(m=k=>{const P=a(f),M=this.elementsCache.get(P);if(!k){M&&(this.observer.unobserve(M),this.elementsCache.delete(P));return}M!==k&&(M&&this.observer.unobserve(M),this.observer.observe(k),this.elementsCache.set(P,k)),k.isConnected&&this.resizeItem(f,this.options.measureElement(k,void 0,this))});const p=a(f),h=this.options.lanes===1?c[f-1]:this.getFurthestMeasurement(c,f),v=h?h.end+this.options.gap:t+o,g=s.get(p),b=typeof g=="number"?g:this.options.estimateSize(f),w=v+b,x=h?h.lane:f%this.options.lanes;c[f]={index:f,start:v,size:b,end:w,key:p,lane:x,measureElement:m}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Yn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,t,o)=>this.range=e.length>0&&t>0?ad({measurements:e,outerSize:t,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Yn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(e,t,o,a)=>t===null?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:o,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,o=e.getAttribute(t);return o?parseInt(o,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const o=this.indexFromElement(e),a=this.getMeasurements()[o];if(!a||!e.isConnected){this.elementsCache.forEach((s,l)=>{s===e&&(this.observer.unobserve(e),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(a.key);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(a.key,e)),this.resizeItem(o,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const o=this.getMeasurements()[e];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=t-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,t)),this.notify(!0,!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems=Yn(()=>[this.getIndexes(),this.getMeasurements()],(e,t)=>{const o=[];for(let a=0,i=e.length;a<i;a++){const s=e[a],l=t[s];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return _o(t[Mi(0,t.length-1,o=>_o(t[o]).start,e)])},this.getOffsetForAlignment=(e,t)=>{const o=this.getSize(),a=this.getScrollOffset();t==="auto"&&(e<=a?t="start":e>=a+o?t="end":t="start"),t==="start"?e=e:t==="end"?e=e-o:t==="center"&&(e=e-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(l,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const o=this.getMeasurements()[e];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(t==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)t="end";else if(o.start<=i+this.options.scrollPaddingStart)t="start";else return[i,t];const s=t==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:o})},this.scrollToIndex=(e,{align:t="auto",behavior:o}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(e,t);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[u]=_o(this.getOffsetForIndex(e,s));qc(u,this.getScrollOffset())||this.scrollToIndex(e,{align:s,behavior:o})}else this.scrollToIndex(e,{align:s,behavior:o})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let o;return t.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((e=t[t.length-1])==null?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map(a=>a.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:t,behavior:o})=>{this.options.scrollToFn(e,{behavior:o,adjustments:t},this)},this.measure=()=>{var e,t;this.itemSizeCache=new Map,(t=(e=this.options).onChange)==null||t.call(e,this,!1)},this.setOptions(r)}}const Mi=(n,r,e,t)=>{for(;n<=r;){const o=(n+r)/2|0,a=e(o);if(a<t)n=o+1;else if(a>t)r=o-1;else return o}return n>0?n-1:0};function ad({measurements:n,outerSize:r,scrollOffset:e}){const t=n.length-1,a=Mi(0,t,s=>n[s].start,e);let i=a;for(;i<t&&n[i].end<e+r;)i++;return{startIndex:a,endIndex:i}}const id=typeof document<"u"?B.useLayoutEffect:B.useEffect;function sd(n){const r=B.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?xe.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=B.useState(()=>new od(e));return t.setOptions(e),B.useEffect(()=>t._didMount(),[]),id(()=>t._willUpdate()),t}function ld(n){return sd({observeElementRect:Zc,observeElementOffset:td,scrollToFn:rd,...n})}function ud(n,r){return n!==null&&r!==null&&typeof n=="object"&&typeof r=="object"&&"id"in n&&"id"in r?n.id===r.id:n===r}function Ti(n=ud){return d.useCallback((r,e)=>{if(typeof n=="string"){let t=n;return(r==null?void 0:r[t])===(e==null?void 0:e[t])}return n(r,e)},[n])}function cd(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function Oo(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>cd(n),[n,e]);return ne(()=>{if(!n)return;let a=new ResizeObserver(t);return a.observe(n),()=>{a.disconnect()}},[n]),r?{width:`${o.width}px`,height:`${o.height}px`}:o}let dd=class extends Map{constructor(r){super(),this.factory=r}get(r){let e=super.get(r);return e===void 0&&(e=this.factory(r),this.set(r,e)),e}};function Ni(n,r){let e=n(),t=new Set;return{getSnapshot(){return e},subscribe(o){return t.add(o),()=>t.delete(o)},dispatch(o,...a){let i=r[o].call(e,...a);i&&(e=i,t.forEach(s=>s()))}}}function Ii(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}let fd=new dd(()=>Ni(()=>[],{ADD(n){return this.includes(n)?this:[...this,n]},REMOVE(n){let r=this.indexOf(n);if(r===-1)return this;let e=this.slice();return e.splice(r,1),e}}));function ln(n,r){let e=fd.get(r),t=d.useId(),o=Ii(e);if(ne(()=>{if(n)return e.dispatch("ADD",t),()=>e.dispatch("REMOVE",t)},[e,n]),!n)return!1;let a=o.indexOf(t),i=o.length;return a===-1&&(a=i,i+=1),a===i-1}let Po=new Map,jn=new Map;function Fi(n){var r;let e=(r=jn.get(n))!=null?r:0;return jn.set(n,e+1),e!==0?()=>Li(n):(Po.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Li(n))}function Li(n){var r;let e=(r=jn.get(n))!=null?r:1;if(e===1?jn.delete(n):jn.set(n,e-1),e!==1)return;let t=Po.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,Po.delete(n))}function Mo(n,{allowed:r,disallowed:e}={}){let t=ln(n,"inert-others");ne(()=>{var o,a;if(!t)return;let i=Je();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(Fi(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=Vt(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)s.some(m=>f.contains(m))||i.add(Fi(f));c=c.parentElement}}return i.dispose},[t,r,e])}function To(n,r,e){let t=vt(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&e()});d.useEffect(()=>{if(!n)return;let o=r===null?null:r instanceof HTMLElement?r:r.current;if(!o)return;let a=Je();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,t,n])}let wr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),pd=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Ze=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Ze||{}),No=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(No||{}),hd=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(hd||{});function Ai(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(wr)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function md(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(pd)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var Io=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Io||{});function $i(n,r=0){var e;return n===((e=Vt(n))==null?void 0:e.body)?!1:Ne(r,{0(){return n.matches(wr)},1(){let t=n;for(;t!==null;){if(t.matches(wr))return!0;t=t.parentElement}return!1}})}var vd=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(vd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function gt(n){n==null||n.focus({preventScroll:!0})}let gd=["textarea","input"].join(",");function bd(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,gd))!=null?e:!1}function Fo(n,r=e=>e){return n.slice().sort((e,t)=>{let o=r(e),a=r(t);if(o===null||a===null)return 0;let i=o.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function yd(n,r){return un(Ai(),r,{relativeTo:n})}function un(n,r,{sorted:e=!0,relativeTo:t=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,i=Array.isArray(n)?e?Fo(n):n:r&64?md(n):Ai(n);o.length>0&&i.length>1&&(i=i.filter(p=>!o.some(h=>h!=null&&"current"in h?(h==null?void 0:h.current)===p:h===p))),t=t??a.activeElement;let s=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,i.indexOf(t))-1;if(r&4)return Math.max(0,i.indexOf(t))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=r&32?{preventScroll:!0}:{},c=0,f=i.length,m;do{if(c>=f||c+f<=0)return 0;let p=l+c;if(r&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}m=i[p],m==null||m.focus(u),c+=s}while(m!==a.activeElement);return r&6&&bd(m)&&m.select(),2}function Yi(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function wd(){return/Android/gi.test(window.navigator.userAgent)}function ji(){return Yi()||wd()}function Wn(n,r,e,t){let o=vt(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return document.addEventListener(r,a,t),()=>document.removeEventListener(r,a,t)},[n,r,t])}function Wi(n,r,e,t){let o=vt(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return window.addEventListener(r,a,t),()=>window.removeEventListener(r,a,t)},[n,r,t])}const Hi=30;function Lo(n,r,e){let t=ln(n,"outside-click"),o=vt(e),a=d.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function m(p){return typeof p=="function"?m(p()):Array.isArray(p)||p instanceof Set?p:[p]}(r);for(let m of f)if(m!==null&&(m.contains(c)||l.composed&&l.composedPath().includes(m)))return;return!$i(c,Io.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,r]),i=d.useRef(null);Wn(t,"pointerdown",l=>{var u,c;i.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),Wn(t,"mousedown",l=>{var u,c;i.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),Wn(t,"click",l=>{ji()||i.current&&(a(l,()=>i.current),i.current=null)},!0);let s=d.useRef({x:0,y:0});Wn(t,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),Wn(t,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-s.current.x)>=Hi||Math.abs(u.y-s.current.y)>=Hi))return a(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),Wi(t,"blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Pt(...n){return d.useMemo(()=>Vt(...n),[...n])}function Ao(n,r,e,t){let o=vt(e);d.useEffect(()=>{n=n??window;function a(i){o.current(i)}return n.addEventListener(r,a,t),()=>n.removeEventListener(r,a,t)},[n,r,t])}function Ri(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Ao(n,"blur",e=>{let t=e.target;t instanceof HTMLInputElement&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),L(()=>{if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==r.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:e,selectionEnd:t}=r.current;e!==null&&t!==null&&n.setSelectionRange(e,t)}r.current={value:"",selectionStart:null,selectionEnd:null}}})}function Bi(n,r){return d.useMemo(()=>{var e;if(n.type)return n.type;let t=(e=n.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[n.type,n.as,r])}function xd(){let n;return{before({doc:r}){var e;let t=r.documentElement,o=(e=r.defaultView)!=null?e:window;n=Math.max(0,o.innerWidth-t.clientWidth)},after({doc:r,d:e}){let t=r.documentElement,o=Math.max(0,t.clientWidth-t.offsetWidth),a=Math.max(0,n-o);e.style(t,"paddingRight",`${a}px`)}}}function Dd(){return Yi()?{before({doc:n,d:r,meta:e}){function t(o){return e.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=Je();s.style(n.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(n,"click",s=>{if(s.target instanceof HTMLElement)try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);c&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(s.target instanceof HTMLElement)if(t(s.target)){let l=s.target;for(;l.parentElement&&t(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(s.target instanceof HTMLElement){if(s.target.tagName==="INPUT")return;if(t(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function Ed(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function Cd(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let zt=Ni(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:Je(),meta:new Set};return t.count++,t.meta.add(r),this.set(n,t),this},POP(n,r){let e=this.get(n);return e&&(e.count--,e.meta.delete(r)),this},SCROLL_PREVENT({doc:n,d:r,meta:e}){let t={doc:n,d:r,meta:Cd(e)},o=[Dd(),xd(),Ed()];o.forEach(({before:a})=>a==null?void 0:a(t)),o.forEach(({after:a})=>a==null?void 0:a(t))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});zt.subscribe(()=>{let n=zt.getSnapshot(),r=new Map;for(let[e]of n)r.set(e,e.documentElement.style.overflow);for(let e of n.values()){let t=r.get(e.doc)==="hidden",o=e.count!==0;(o&&!t||!o&&t)&&zt.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&zt.dispatch("TEARDOWN",e)}});function kd(n,r,e=()=>({containers:[]})){let t=Ii(zt),o=r?t.get(r):void 0,a=o?o.count>0:!1;return ne(()=>{if(!(!r||!n))return zt.dispatch("PUSH",r,e),()=>zt.dispatch("POP",r,e)},[n,r]),a}function $o(n,r,e=()=>[document.body]){let t=ln(n,"scroll-lock");kd(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function Vi(n){return[n.screenX,n.screenY]}function zi(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=Vi(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=Vi(r)}}}function Sd(n=0){let[r,e]=d.useState(n),t=d.useCallback(l=>e(l),[r]),o=d.useCallback(l=>e(u=>u|l),[r]),a=d.useCallback(l=>(r&l)===l,[r]),i=d.useCallback(l=>e(u=>u&~l),[e]),s=d.useCallback(l=>e(u=>u^l),[e]);return{flags:r,setFlag:t,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var Qi;typeof process<"u"&&typeof globalThis<"u"&&((Qi=process==null?void 0:process.env)==null?void 0:Qi.NODE_ENV)==="test"&&typeof Element.prototype.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(`
|
|
37
|
-
`)),[]});var _d=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(_d||{});function Yo(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function jo(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=Sd(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),f=mt();return ne(()=>{var m;if(n){if(e&&a(!0),!r){e&&s(3);return}return(m=t==null?void 0:t.start)==null||m.call(t,e),Od(r,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(e?(s(3),l(4)):(s(4),l(2)))},run(){c.current?e?(l(3),s(4)):(l(4),s(3)):e?l(1):s(1)},done(){var p;c.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(u.current=!1,l(7),e||a(!1),(p=t==null?void 0:t.end)==null||p.call(t,e))}})}},[n,e,r,f]),n?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[e,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Od(n,{prepare:r,run:e,done:t,inFlight:o}){let a=Je();return Md(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(Pd(n,t))})}),a.dispose}function Pd(n,r){var e,t;let o=Je();if(!n)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(t=(e=n.getAnimations)==null?void 0:e.call(n).filter(s=>s instanceof CSSTransition))!=null?t:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function Md(n,{inFlight:r,prepare:e}){if(r!=null&&r.current){e();return}let t=n.style.transition;n.style.transition="none",e(),n.offsetHeight,n.style.transition=t}function Td(n,{container:r,accept:e,walk:t}){let o=d.useRef(e),a=d.useRef(t);d.useEffect(()=>{o.current=e,a.current=t},[e,t]),ne(()=>{if(!r||!n)return;let i=Vt(r);if(!i)return;let s=o.current,l=a.current,u=Object.assign(f=>s(f),{acceptNode:s}),c=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[r,n,o,a])}function Hn(n,r){let e=d.useRef([]),t=L(n);d.useEffect(()=>{let o=[...e.current];for(let[a,i]of r.entries())if(e.current[a]!==i){let s=t(r,o);return e.current=r,s}},[t,...r])}function cn(n){return Ui(n)?(n.nodeName||"").toLowerCase():"#document"}function ze(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function bt(n){var r;return(r=(Ui(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Ui(n){return n instanceof Node||n instanceof ze(n).Node}function Ye(n){return n instanceof Element||n instanceof ze(n).Element}function tt(n){return n instanceof HTMLElement||n instanceof ze(n).HTMLElement}function Ki(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof ze(n).ShadowRoot}function Rn(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=qe(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!["inline","contents"].includes(o)}function Nd(n){return["table","td","th"].includes(cn(n))}function xr(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function Wo(n){const r=Ho(),e=Ye(n)?qe(n):n;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!r&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!r&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(t=>(e.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(e.contain||"").includes(t))}function Id(n){let r=Mt(n);for(;tt(r)&&!dn(r);){if(Wo(r))return r;if(xr(r))return null;r=Mt(r)}return null}function Ho(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dn(n){return["html","body","#document"].includes(cn(n))}function qe(n){return ze(n).getComputedStyle(n)}function Dr(n){return Ye(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Mt(n){if(cn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||Ki(n)&&n.host||bt(n);return Ki(r)?r.host:r}function qi(n){const r=Mt(n);return dn(r)?n.ownerDocument?n.ownerDocument.body:n.body:tt(r)&&Rn(r)?r:qi(r)}function Bn(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=qi(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=ze(o);return a?r.concat(i,i.visualViewport||[],Rn(o)?o:[],i.frameElement&&e?Bn(i.frameElement):[]):r.concat(o,Bn(o,[],e))}function Fd(){const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(r=>{let{brand:e,version:t}=r;return e+"/"+t}).join(" "):navigator.userAgent}const nt=Math.min,Qe=Math.max,Er=Math.round,Cr=Math.floor,Tt=n=>({x:n,y:n}),Ld={left:"right",right:"left",bottom:"top",top:"bottom"},Ad={start:"end",end:"start"};function Ro(n,r,e){return Qe(n,nt(r,e))}function Qt(n,r){return typeof n=="function"?n(r):n}function Nt(n){return n.split("-")[0]}function fn(n){return n.split("-")[1]}function Gi(n){return n==="x"?"y":"x"}function Bo(n){return n==="y"?"height":"width"}function Ut(n){return["top","bottom"].includes(Nt(n))?"y":"x"}function Vo(n){return Gi(Ut(n))}function $d(n,r,e){e===void 0&&(e=!1);const t=fn(n),o=Vo(n),a=Bo(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=kr(i)),[i,kr(i)]}function Yd(n){const r=kr(n);return[zo(n),r,zo(r)]}function zo(n){return n.replace(/start|end/g,r=>Ad[r])}function jd(n,r,e){const t=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(n){case"top":case"bottom":return e?r?o:t:r?t:o;case"left":case"right":return r?a:i;default:return[]}}function Wd(n,r,e,t){const o=fn(n);let a=jd(Nt(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(zo)))),a}function kr(n){return n.replace(/left|right|bottom|top/g,r=>Ld[r])}function Hd(n){return{top:0,right:0,bottom:0,left:0,...n}}function Xi(n){return typeof n!="number"?Hd(n):{top:n,right:n,bottom:n,left:n}}function Sr(n){const{x:r,y:e,width:t,height:o}=n;return{width:t,height:o,top:e,left:r,right:r+t,bottom:e+o,x:r,y:e}}function Ji(n,r,e){let{reference:t,floating:o}=n;const a=Ut(r),i=Vo(r),s=Bo(i),l=Nt(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,m=t[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:t.y-o.height};break;case"bottom":p={x:c,y:t.y+t.height};break;case"right":p={x:t.x+t.width,y:f};break;case"left":p={x:t.x-o.width,y:f};break;default:p={x:t.x,y:t.y}}switch(fn(r)){case"start":p[i]-=m*(e&&u?-1:1);break;case"end":p[i]+=m*(e&&u?-1:1);break}return p}const Rd=async(n,r,e)=>{const{placement:t="bottom",strategy:o="absolute",middleware:a=[],platform:i}=e,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:n,floating:r,strategy:o}),{x:c,y:f}=Ji(u,t,l),m=t,p={},h=0;for(let v=0;v<s.length;v++){const{name:g,fn:b}=s[v],{x:w,y:x,data:k,reset:P}=await b({x:c,y:f,initialPlacement:t,placement:m,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:n,floating:r}});c=w??c,f=x??f,p={...p,[g]:{...p[g],...k}},P&&h<=50&&(h++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(u=P.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):P.rects),{x:c,y:f}=Ji(u,m,l)),v=-1)}return{x:c,y:f,placement:m,strategy:o,middlewareData:p}};async function _r(n,r){var e;r===void 0&&(r={});const{x:t,y:o,platform:a,rects:i,elements:s,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Qt(r,n),h=Xi(p),g=s[m?f==="floating"?"reference":"floating":f],b=Sr(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(g)))==null||e?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},P=Sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:l}):w);return{top:(b.top-P.top+h.top)/k.y,bottom:(P.bottom-b.bottom+h.bottom)/k.y,left:(b.left-P.left+h.left)/k.x,right:(P.right-b.right+h.right)/k.x}}const Bd=n=>({name:"arrow",options:n,async fn(r){const{x:e,y:t,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:u,padding:c=0}=Qt(n,r)||{};if(u==null)return{};const f=Xi(c),m={x:e,y:t},p=Vo(o),h=Bo(p),v=await i.getDimensions(u),g=p==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",k=a.reference[h]+a.reference[p]-m[p]-a.floating[h],P=m[p]-a.reference[p],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=M?M[x]:0;(!S||!await(i.isElement==null?void 0:i.isElement(M)))&&(S=s.floating[x]||a.floating[h]);const O=k/2-P/2,I=S/2-v[h]/2-1,W=nt(f[b],I),E=nt(f[w],I),C=W,_=S-v[h]-E,D=S/2-v[h]/2+O,N=Ro(C,D,_),A=!l.arrow&&fn(o)!=null&&D!==N&&a.reference[h]/2-(D<C?W:E)-v[h]/2<0,$=A?D<C?D-C:D-_:0;return{[p]:m[p]+$,data:{[p]:N,centerOffset:D-N-$,...A&&{alignmentOffset:$}},reset:A}}}),Vd=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var e,t;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=r,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...g}=Qt(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const b=Nt(o),w=Ut(s),x=Nt(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),P=m||(x||!v?[kr(s)]:Yd(s)),M=h!=="none";!m&&M&&P.push(...Wd(s,v,h,k));const S=[s,...P],O=await _r(r,g),I=[];let W=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&I.push(O[b]),f){const D=$d(o,i,k);I.push(O[D[0]],O[D[1]])}if(W=[...W,{placement:o,overflows:I}],!I.every(D=>D<=0)){var E,C;const D=(((E=a.flip)==null?void 0:E.index)||0)+1,N=S[D];if(N)return{data:{index:D,overflows:W},reset:{placement:N}};let A=(C=W.filter($=>$.overflows[0]<=0).sort(($,U)=>$.overflows[1]-U.overflows[1])[0])==null?void 0:C.placement;if(!A)switch(p){case"bestFit":{var _;const $=(_=W.filter(U=>{if(M){const j=Ut(U.placement);return j===w||j==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(j=>j>0).reduce((j,X)=>j+X,0)]).sort((U,j)=>U[1]-j[1])[0])==null?void 0:_[0];$&&(A=$);break}case"initialPlacement":A=s;break}if(o!==A)return{reset:{placement:A}}}return{}}}};async function zd(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=Nt(e),s=fn(e),l=Ut(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,f=Qt(r,n);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*c,y:m*u}:{x:m*u,y:p*c}}const Qd=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var e,t;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await zd(r,n);return i===((e=s.offset)==null?void 0:e.placement)&&(t=s.arrow)!=null&&t.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Ud=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:e,y:t,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...l}=Qt(n,r),u={x:e,y:t},c=await _r(r,l),f=Ut(Nt(o)),m=Gi(f);let p=u[m],h=u[f];if(a){const g=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=p+c[g],x=p-c[b];p=Ro(w,p,x)}if(i){const g=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+c[g],x=h-c[b];h=Ro(w,h,x)}const v=s.fn({...r,[m]:p,[f]:h});return{...v,data:{x:v.x-e,y:v.y-t}}}}},Kd=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){const{placement:e,rects:t,platform:o,elements:a}=r,{apply:i=()=>{},...s}=Qt(n,r),l=await _r(r,s),u=Nt(e),c=fn(e),f=Ut(e)==="y",{width:m,height:p}=t.floating;let h,v;u==="top"||u==="bottom"?(h=u,v=c===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,h=c==="end"?"top":"bottom");const g=p-l.top-l.bottom,b=m-l.left-l.right,w=nt(p-l[h],g),x=nt(m-l[v],b),k=!r.middlewareData.shift;let P=w,M=x;if(f?M=c||k?nt(x,b):b:P=c||k?nt(w,g):g,k&&!c){const O=Qe(l.left,0),I=Qe(l.right,0),W=Qe(l.top,0),E=Qe(l.bottom,0);f?M=m-2*(O!==0||I!==0?O+I:Qe(l.left,l.right)):P=p-2*(W!==0||E!==0?W+E:Qe(l.top,l.bottom))}await i({...r,availableWidth:M,availableHeight:P});const S=await o.getDimensions(a.floating);return m!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function Zi(n){const r=qe(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=tt(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=Er(e)!==a||Er(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function Qo(n){return Ye(n)?n:n.contextElement}function pn(n){const r=Qo(n);if(!tt(r))return Tt(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Zi(r);let i=(a?Er(e.width):e.width)/t,s=(a?Er(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const qd=Tt(0);function es(n){const r=ze(n);return!Ho()||!r.visualViewport?qd:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Gd(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==ze(n)?!1:r}function Kt(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=Qo(n);let i=Tt(1);r&&(t?Ye(t)&&(i=pn(t)):i=pn(n));const s=Gd(a,e,t)?es(a):Tt(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,f=o.height/i.y;if(a){const m=ze(a),p=t&&Ye(t)?ze(t):t;let h=m,v=h.frameElement;for(;v&&t&&p!==h;){const g=pn(v),b=v.getBoundingClientRect(),w=qe(v),x=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,k=b.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=x,u+=k,h=ze(v),v=h.frameElement}}return Sr({width:c,height:f,x:l,y:u})}function Xd(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=bt(t),s=r?xr(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Tt(1);const c=Tt(0),f=tt(t);if((f||!f&&!a)&&((cn(t)!=="body"||Rn(i))&&(l=Dr(t)),tt(t))){const m=Kt(t);u=pn(t),c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x,y:e.y*u.y-l.scrollTop*u.y+c.y}}function Jd(n){return Array.from(n.getClientRects())}function ts(n){return Kt(bt(n)).left+Dr(n).scrollLeft}function Zd(n){const r=bt(n),e=Dr(n),t=n.ownerDocument.body,o=Qe(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Qe(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+ts(n);const s=-e.scrollTop;return qe(t).direction==="rtl"&&(i+=Qe(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function ef(n,r){const e=ze(n),t=bt(n),o=e.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=Ho();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function tf(n,r){const e=Kt(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=tt(n)?pn(n):Tt(1),i=n.clientWidth*a.x,s=n.clientHeight*a.y,l=o*a.x,u=t*a.y;return{width:i,height:s,x:l,y:u}}function ns(n,r,e){let t;if(r==="viewport")t=ef(n,e);else if(r==="document")t=Zd(bt(n));else if(Ye(r))t=tf(r,e);else{const o=es(n);t={...r,x:r.x-o.x,y:r.y-o.y}}return Sr(t)}function rs(n,r){const e=Mt(n);return e===r||!Ye(e)||dn(e)?!1:qe(e).position==="fixed"||rs(e,r)}function nf(n,r){const e=r.get(n);if(e)return e;let t=Bn(n,[],!1).filter(s=>Ye(s)&&cn(s)!=="body"),o=null;const a=qe(n).position==="fixed";let i=a?Mt(n):n;for(;Ye(i)&&!dn(i);){const s=qe(i),l=Wo(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Rn(i)&&!l&&rs(n,i))?t=t.filter(c=>c!==i):o=s,i=Mt(i)}return r.set(n,t),t}function rf(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?xr(r)?[]:nf(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=ns(r,c,o);return u.top=Qe(f.top,u.top),u.right=nt(f.right,u.right),u.bottom=nt(f.bottom,u.bottom),u.left=Qe(f.left,u.left),u},ns(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function of(n){const{width:r,height:e}=Zi(n);return{width:r,height:e}}function af(n,r,e){const t=tt(r),o=bt(r),a=e==="fixed",i=Kt(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Tt(0);if(t||!t&&!a)if((cn(r)!=="body"||Rn(o))&&(s=Dr(r)),t){const f=Kt(r,!0,a,r);l.x=f.x+r.clientLeft,l.y=f.y+r.clientTop}else o&&(l.x=ts(o));const u=i.left+s.scrollLeft-l.x,c=i.top+s.scrollTop-l.y;return{x:u,y:c,width:i.width,height:i.height}}function Uo(n){return qe(n).position==="static"}function os(n,r){return!tt(n)||qe(n).position==="fixed"?null:r?r(n):n.offsetParent}function as(n,r){const e=ze(n);if(xr(n))return e;if(!tt(n)){let o=Mt(n);for(;o&&!dn(o);){if(Ye(o)&&!Uo(o))return o;o=Mt(o)}return e}let t=os(n,r);for(;t&&Nd(t)&&Uo(t);)t=os(t,r);return t&&dn(t)&&Uo(t)&&!Wo(t)?e:t||Id(n)||e}const sf=async function(n){const r=this.getOffsetParent||as,e=this.getDimensions,t=await e(n.floating);return{reference:af(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function lf(n){return qe(n).direction==="rtl"}const uf={convertOffsetParentRelativeRectToViewportRelativeRect:Xd,getDocumentElement:bt,getClippingRect:rf,getOffsetParent:as,getElementRects:sf,getClientRects:Jd,getDimensions:of,getScale:pn,isElement:Ye,isRTL:lf};function cf(n,r){let e=null,t;const o=bt(n);function a(){var s;clearTimeout(t),(s=e)==null||s.disconnect(),e=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:u,top:c,width:f,height:m}=n.getBoundingClientRect();if(s||r(),!f||!m)return;const p=Cr(c),h=Cr(o.clientWidth-(u+f)),v=Cr(o.clientHeight-(c+m)),g=Cr(u),w={rootMargin:-p+"px "+-h+"px "+-v+"px "+-g+"px",threshold:Qe(0,nt(1,l))||1};let x=!0;function k(P){const M=P[0].intersectionRatio;if(M!==l){if(!x)return i();M?i(!1,M):t=setTimeout(()=>{i(!1,1e-7)},1e3)}x=!1}try{e=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(k,w)}e.observe(n)}return i(!0),a}function is(n,r,e,t){t===void 0&&(t={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,u=Qo(n),c=o||a?[...u?Bn(u):[],...Bn(r)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",e,{passive:!0}),a&&b.addEventListener("resize",e)});const f=u&&s?cf(u,e):null;let m=-1,p=null;i&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(r)})),e()}),u&&!l&&p.observe(u),p.observe(r));let h,v=l?Kt(n):null;l&&g();function g(){const b=Kt(n);v&&(b.x!==v.x||b.y!==v.y||b.width!==v.width||b.height!==v.height)&&e(),v=b,h=requestAnimationFrame(g)}return e(),()=>{var b;c.forEach(w=>{o&&w.removeEventListener("scroll",e),a&&w.removeEventListener("resize",e)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const Ko=_r,df=Qd,ff=Ud,pf=Vd,hf=Kd,ss=Bd,mf=(n,r,e)=>{const t=new Map,o={platform:uf,...e},a={...o.platform,_c:t};return Rd(n,r,{...o,platform:a})};var Or=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Pr(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let e,t,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(e=n.length,e!==r.length)return!1;for(t=e;t--!==0;)if(!Pr(n[t],r[t]))return!1;return!0}if(o=Object.keys(n),e=o.length,e!==Object.keys(r).length)return!1;for(t=e;t--!==0;)if(!{}.hasOwnProperty.call(r,o[t]))return!1;for(t=e;t--!==0;){const a=o[t];if(!(a==="_owner"&&n.$$typeof)&&!Pr(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function ls(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function us(n,r){const e=ls(n);return Math.round(r*e)/e}function cs(n){const r=B.useRef(n);return Or(()=>{r.current=n}),r}function vf(n){n===void 0&&(n={});const{placement:r="bottom",strategy:e="absolute",middleware:t=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=n,[c,f]=B.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=B.useState(t);Pr(m,t)||p(t);const[h,v]=B.useState(null),[g,b]=B.useState(null),w=B.useCallback($=>{$!==M.current&&(M.current=$,v($))},[]),x=B.useCallback($=>{$!==S.current&&(S.current=$,b($))},[]),k=a||h,P=i||g,M=B.useRef(null),S=B.useRef(null),O=B.useRef(c),I=l!=null,W=cs(l),E=cs(o),C=B.useCallback(()=>{if(!M.current||!S.current)return;const $={placement:r,strategy:e,middleware:m};E.current&&($.platform=E.current),mf(M.current,S.current,$).then(U=>{const j={...U,isPositioned:!0};_.current&&!Pr(O.current,j)&&(O.current=j,Sn.flushSync(()=>{f(j)}))})},[m,r,e,E]);Or(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[u]);const _=B.useRef(!1);Or(()=>(_.current=!0,()=>{_.current=!1}),[]),Or(()=>{if(k&&(M.current=k),P&&(S.current=P),k&&P){if(W.current)return W.current(k,P,C);C()}},[k,P,C,W,I]);const D=B.useMemo(()=>({reference:M,floating:S,setReference:w,setFloating:x}),[w,x]),N=B.useMemo(()=>({reference:k,floating:P}),[k,P]),A=B.useMemo(()=>{const $={position:e,left:0,top:0};if(!N.floating)return $;const U=us(N.floating,c.x),j=us(N.floating,c.y);return s?{...$,transform:"translate("+U+"px, "+j+"px)",...ls(N.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:U,top:j}},[e,s,N.floating,c.x,c.y]);return B.useMemo(()=>({...c,update:C,refs:D,elements:N,floatingStyles:A}),[c,C,D,N,A])}const gf=n=>{function r(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:n,fn(e){const{element:t,padding:o}=typeof n=="function"?n(e):n;return t&&r(t)?t.current!=null?ss({element:t.current,padding:o}).fn(e):{}:t?ss({element:t,padding:o}).fn(e):{}}}},qo=(n,r)=>({...df(n),options:[n,r]}),bf=(n,r)=>({...ff(n),options:[n,r]}),ds=(n,r)=>({...pf(n),options:[n,r]}),yf=(n,r)=>({...hf(n),options:[n,r]}),wf=(n,r)=>({...gf(n),options:[n,r]}),fs={...B},xf=fs.useInsertionEffect||(n=>n());function ps(n){const r=B.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return xf(()=>{r.current=n}),B.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}var Mr=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Go(){return Go=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},Go.apply(this,arguments)}let hs=!1,Df=0;const ms=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Df++;function Ef(){const[n,r]=B.useState(()=>hs?ms():void 0);return Mr(()=>{n==null&&r(ms())},[]),B.useEffect(()=>{hs=!0},[]),n}const vs=fs.useId||Ef;let Vn;process.env.NODE_ENV!=="production"&&(Vn=new Set);function gs(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Vn)!=null&&n.has(o))){var a;(a=Vn)==null||a.add(o),console.warn(o)}}function Cf(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Vn)!=null&&n.has(o))){var a;(a=Vn)==null||a.add(o),console.error(o)}}const kf=B.forwardRef(function(r,e){const{context:{placement:t,elements:{floating:o},middlewareData:{arrow:a}},width:i=14,height:s=7,tipRadius:l=0,strokeWidth:u=0,staticOffset:c,stroke:f,d:m,style:{transform:p,...h}={},...v}=r;process.env.NODE_ENV!=="production"&&(e||gs("The `ref` prop is required for `FloatingArrow`."));const g=vs(),[b,w]=B.useState(!1);if(Mr(()=>{if(!o)return;qe(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const x=u*2,k=x/2,P=i/2*(l/-8+1),M=s/2*l/4,[S,O]=t.split("-"),I=!!m,W=S==="top"||S==="bottom",E=c&&O==="end"?"bottom":"top";let C=c&&O==="end"?"right":"left";c&&b&&(C=O==="end"?"left":"right");const _=(a==null?void 0:a.x)!=null?c||a.x:"",D=(a==null?void 0:a.y)!=null?c||a.y:"",N=m||"M0,0"+(" H"+i)+(" L"+(i-P)+","+(s-M))+(" Q"+i/2+","+s+" "+P+","+(s-M))+" Z",A={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[S];return B.createElement("svg",Go({},v,{"aria-hidden":!0,ref:e,width:I?i:i+x,height:i,viewBox:"0 0 "+i+" "+(s>i?s:i),style:{position:"absolute",pointerEvents:"none",[C]:_,[E]:D,[S]:W||I?"100%":"calc(100% - "+x/2+"px)",transform:""+A+(p??""),...h}}),x>0&&B.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:x+(m?0:1),d:N}),B.createElement("path",{stroke:x&&!m?v.fill:"none",d:N}),B.createElement("clipPath",{id:g},B.createElement("rect",{x:-k,y:k*(I?-1:1),width:i+x,height:i})))});function Sf(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.set(r,[...n.get(r)||[],e])},off(r,e){var t;n.set(r,((t=n.get(r))==null?void 0:t.filter(o=>o!==e))||[])}}}const _f=B.createContext(null),Of=B.createContext(null),Pf=()=>{var n;return((n=B.useContext(_f))==null?void 0:n.id)||null},Mf=()=>B.useContext(Of);function Tf(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=vs(),a=B.useRef({}),[i]=B.useState(()=>Sf()),s=Pf()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Ye(p)&&Cf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=B.useState(t.reference),c=ps((p,h,v)=>{a.current.openEvent=p?h:void 0,i.emit("openchange",{open:p,event:h,reason:v,nested:s}),e==null||e(p,h,v)}),f=B.useMemo(()=>({setPositionReference:u}),[]),m=B.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return B.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:m,events:i,floatingId:o,refs:f}),[r,c,m,i,o,f])}function bs(n){n===void 0&&(n={});const{nodeId:r}=n,e=Tf({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=B.useState(null),[s,l]=B.useState(null),c=(o==null?void 0:o.reference)||a,f=B.useRef(null),m=Mf();Mr(()=>{c&&(f.current=c)},[c]);const p=vf({...n,elements:{...o,...s&&{reference:s}}}),h=B.useCallback(x=>{const k=Ye(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(k),p.refs.setReference(k)},[p.refs]),v=B.useCallback(x=>{(Ye(x)||x===null)&&(f.current=x,i(x)),(Ye(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!Ye(x))&&p.refs.setReference(x)},[p.refs]),g=B.useMemo(()=>({...p.refs,setReference:v,setPositionReference:h,domReference:f}),[p.refs,v,h]),b=B.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),w=B.useMemo(()=>({...p,...t,refs:g,elements:b,nodeId:r}),[p,g,b,r,t]);return Mr(()=>{t.dataRef.current.floatingContext=w;const x=m==null?void 0:m.nodesRef.current.find(k=>k.id===r);x&&(x.context=w)}),B.useMemo(()=>({...p,context:w,refs:g,elements:b}),[p,g,b,w])}const ys="active",ws="selected";function Xo(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[ys]:i,[ws]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1},...a,...r.map(i=>{const s=i?i[e]:null;return typeof s=="function"?n?s(n):null:s}).concat(n).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[u,c]=l;if(!(o&&[ys,ws].includes(u)))if(u.indexOf("on")===0){if(t.has(u)||t.set(u,[]),typeof c=="function"){var f;(f=t.get(u))==null||f.push(c),i[u]=function(){for(var m,p=arguments.length,h=new Array(p),v=0;v<p;v++)h[v]=arguments[v];return(m=t.get(u))==null?void 0:m.map(g=>g(...h)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function Nf(n){n===void 0&&(n=[]);const r=n.map(s=>s==null?void 0:s.reference),e=n.map(s=>s==null?void 0:s.floating),t=n.map(s=>s==null?void 0:s.item),o=B.useCallback(s=>Xo(s,n,"reference"),r),a=B.useCallback(s=>Xo(s,n,"floating"),e),i=B.useCallback(s=>Xo(s,n,"item"),t);return B.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function xs(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const If=n=>({name:"inner",options:n,async fn(r){const{listRef:e,overflowRef:t,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Qt(n,r),{rects:f,elements:{floating:m}}=r,p=e.current[i];if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||gs('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const h={...r,...await qo(-p.offsetTop-m.clientTop-f.reference.height/2-p.offsetHeight/2-a).fn(r)},v=(u==null?void 0:u.current)||m,g=await Ko(xs(h,v.scrollHeight),c),b=await Ko(h,{...c,elementContext:"reference"}),w=Math.max(0,g.top),x=h.y+w,k=Math.max(0,v.scrollHeight-w-Math.max(0,g.bottom));return v.style.maxHeight=k+"px",v.scrollTop=w,o&&(v.offsetHeight<p.offsetHeight*Math.min(s,e.current.length-1)-1||b.top>=-l||b.bottom>=-l?Sn.flushSync(()=>o(!0)):Sn.flushSync(()=>o(!1))),t&&(t.current=await Ko(xs({...h,y:x},v.offsetHeight),c)),{y:x}}});function Ff(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=ps(s),u=B.useRef(!1),c=B.useRef(null),f=B.useRef(null);B.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!h||a.current==null)return;const g=v.deltaY,b=a.current.top>=-.5,w=a.current.bottom>=-.5,x=h.scrollHeight-h.clientHeight,k=g<0?-1:1,P=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!b&&g>0||!w&&g<0?(v.preventDefault(),Sn.flushSync(()=>{l(M=>M+Math[P](g,x*k))})):/firefox/i.test(Fd())&&(h.scrollTop+=g))}const h=(i==null?void 0:i.current)||t.floating;if(e&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=h.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{c.current=null,f.current=null,h.removeEventListener("wheel",p)}},[o,e,t.floating,a,i,l]);const m=B.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!p||!u.current)){if(c.current!==null){const h=p.scrollTop-c.current;(a.current.bottom<-.5&&h<-1||a.current.top<-.5&&h>1)&&Sn.flushSync(()=>l(v=>v+h))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[t.floating,l,a,i]);return B.useMemo(()=>o?{floating:m}:{},[o,m])}let hn=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});hn.displayName="FloatingContext";let Jo=d.createContext(null);Jo.displayName="PlacementContext";function Ds(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function Es(){return d.useContext(hn).setReference}function Lf(){return d.useContext(hn).getReferenceProps}function Cs(){let{getFloatingProps:n,slot:r}=d.useContext(hn);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function ks(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(Jo),e=d.useMemo(()=>n,[JSON.stringify(n,typeof HTMLElement<"u"?(o,a)=>a instanceof HTMLElement?a.outerHTML:a:void 0)]);ne(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(hn);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let Ss=4;function _s({children:n,enabled:r=!0}){let[e,t]=d.useState(null),[o,a]=d.useState(0),i=d.useRef(null),[s,l]=d.useState(null);Af(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:f=0,offset:m=0,padding:p=0,inner:h}=$f(e,s),[v,g="center"]=c.split(" ");ne(()=>{u&&a(0)},[u]);let{refs:b,floatingStyles:w,context:x}=bs({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[qo({mainAxis:v==="selection"?0:f,crossAxis:m}),bf({padding:p}),v!=="selection"&&ds({padding:p}),v==="selection"&&h?If({...h,padding:p,overflowRef:i,offset:o,minItemsVisible:Ss,referenceOverflowThreshold:p,onFallbackChange(E){var C,_;if(!E)return;let D=x.elements.floating;if(!D)return;let N=parseFloat(getComputedStyle(D).scrollPaddingBottom)||0,A=Math.min(Ss,D.childElementCount),$=0,U=0;for(let j of(_=(C=x.elements.floating)==null?void 0:C.childNodes)!=null?_:[])if(j instanceof HTMLElement){let X=j.offsetTop,q=X+j.clientHeight+N,K=D.scrollTop,Y=K+D.clientHeight;if(X>=K&&q<=Y)A--;else{U=Math.max(0,Math.min(q,Y)-Math.max(X,K)),$=j.clientHeight;break}}A>=1&&a(j=>{let X=$*A-U+N;return j>=X?j:X})}}):null,yf({padding:p,apply({availableWidth:E,availableHeight:C,elements:_}){Object.assign(_.floating.style,{overflow:"auto",maxWidth:`${E}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${C}px)`})}})].filter(Boolean),whileElementsMounted:is}),[k=v,P=g]=x.placement.split("-");v==="selection"&&(k="selection");let M=d.useMemo(()=>({anchor:[k,P].filter(Boolean).join(" ")}),[k,P]),S=Ff(x,{overflowRef:i,onChange:a}),{getReferenceProps:O,getFloatingProps:I}=Nf([S]),W=L(E=>{l(E),b.setFloating(E)});return B.createElement(Jo.Provider,{value:t},B.createElement(hn.Provider,{value:{setFloating:W,setReference:b.setReference,styles:w,getReferenceProps:O,getFloatingProps:I,slot:M}},n))}function Af(n){ne(()=>{if(!n)return;let r=new MutationObserver(()=>{let e=window.getComputedStyle(n).maxHeight,t=parseFloat(e);if(isNaN(t))return;let o=parseInt(e);isNaN(o)||t!==o&&(n.style.maxHeight=`${Math.ceil(t)}px`)});return r.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[n])}function $f(n,r){var e,t,o;let a=Zo((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Zo((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Zo((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Zo(n,r,e=void 0){let t=mt(),o=L((l,u)=>{if(l==null)return[e,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[e,null];let c=Ps(l,u);return[c,f=>{let m=Os(l);{let p=m.map(h=>window.getComputedStyle(u).getPropertyValue(h));t.requestAnimationFrame(function h(){t.nextFrame(h);let v=!1;for(let[b,w]of m.entries()){let x=window.getComputedStyle(u).getPropertyValue(w);if(p[b]!==x){p[b]=x,v=!0;break}}if(!v)return;let g=Ps(l,u);c!==g&&(f(g),c=g)})}return t.dispose}]}return[e,null]}),a=d.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=d.useState();return ne(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function Os(n){let r=/var\((.*)\)/.exec(n);if(r){let e=r[1].indexOf(",");if(e===-1)return[r[1]];let t=r[1].slice(0,e).trim(),o=r[1].slice(e+1).trim();return o?[t,...Os(o)]:[t]}return[]}function Ps(n,r){let e=document.createElement("div");r.appendChild(e),e.style.setProperty("margin-top","0px","important"),e.style.setProperty("margin-top",n,"important");let t=parseFloat(window.getComputedStyle(e).marginTop)||0;return r.removeChild(e),t}function Yf({children:n,freeze:r}){let e=Tr(r,n);return d.createElement(d.Fragment,null,e)}function Tr(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let Nr=d.createContext(null);Nr.displayName="OpenClosedContext";var Ae=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Ae||{});function mn(){return d.useContext(Nr)}function ea({value:n,children:r}){return d.createElement(Nr.Provider,{value:n},r)}function jf({children:n}){return d.createElement(Nr.Provider,{value:null},n)}function Wf(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let rt=[];Wf(()=>{function n(r){if(!(r.target instanceof HTMLElement)||r.target===document.body||rt[0]===r.target)return;let e=r.target;e=e.closest(wr),rt.unshift(e??r.target),rt=rt.filter(t=>t!=null&&t.isConnected),rt.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Hf(n){throw new Error("Unexpected object: "+n)}var ee=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(ee||{});function zn(n,r){let e=r.resolveItems();if(e.length<=0)return null;let t=r.resolveActiveIndex(),o=t??-1;switch(n.focus){case 0:{for(let a=0;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 1:{o===-1&&(o=e.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 2:{for(let a=o+1;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 3:{for(let a=e.length-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 4:{for(let a=0;a<e.length;++a)if(r.resolveId(e[a],a,e)===n.id)return a;return t}case 5:return null;default:Hf(n)}}var ta=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(ta||{});function Ms(n){let r=L(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,hr(()=>{e.current&&r()})}),[r])}function Rf(){let n=typeof document>"u";return"useSyncExternalStore"in B?(r=>r.useSyncExternalStore)(B)(()=>()=>{},()=>!1,()=>!n):!1}function Qn(){let n=Rf(),[r,e]=B.useState(Bt.isHandoffComplete);return r&&Bt.isHandoffComplete===!1&&e(!1),B.useEffect(()=>{r!==!0&&e(!0)},[r]),B.useEffect(()=>Bt.handoff(),[]),n?!1:r}let Ts=d.createContext(!1);function Bf(){return d.useContext(Ts)}function Ns(n){return d.createElement(Ts.Provider,{value:n.force},n.children)}function Vf(n){let r=Bf(),e=d.useContext(Fs),t=Pt(n),[o,a]=d.useState(()=>{var i;if(!r&&e!==null)return(i=e.current)!=null?i:null;if(Bt.isServer)return null;let s=t==null?void 0:t.getElementById("headlessui-portal-root");if(s)return s;if(t===null)return null;let l=t.createElement("div");return l.setAttribute("id","headlessui-portal-root"),t.body.appendChild(l)});return d.useEffect(()=>{o!==null&&(t!=null&&t.body.contains(o)||t==null||t.body.appendChild(o))},[o,t]),d.useEffect(()=>{r||e!==null&&a(e.current)},[e,a,r]),o}let Is=d.Fragment,zf=ye(function(n,r){let e=n,t=d.useRef(null),o=Ie(jc(c=>{t.current=c}),r),a=Pt(t),i=Vf(t),[s]=d.useState(()=>{var c;return Bt.isServer?null:(c=a==null?void 0:a.createElement("div"))!=null?c:null}),l=d.useContext(na),u=Qn();return ne(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),ne(()=>{if(s&&l)return l.register(s)},[l,s]),Ms(()=>{var c;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((c=i.parentElement)==null||c.removeChild(i)))}),u?!i||!s?null:xe.createPortal(Ce({ourProps:{ref:o},theirProps:e,slot:{},defaultTag:Is,name:"Portal"}),s):null});function Qf(n,r){let e=Ie(r),{enabled:t=!0,...o}=n;return t?d.createElement(zf,{...o,ref:e}):Ce({ourProps:{ref:e},theirProps:o,slot:{},defaultTag:Is,name:"Portal"})}let Uf=d.Fragment,Fs=d.createContext(null);function Kf(n,r){let{target:e,...t}=n,o={ref:Ie(r)};return d.createElement(Fs.Provider,{value:e},Ce({ourProps:o,theirProps:t,defaultTag:Uf,name:"Popover.Group"}))}let na=d.createContext(null);function qf(){let n=d.useContext(na),r=d.useRef([]),e=L(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=L(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),n&&n.unregister(a)}),o=d.useMemo(()=>({register:e,unregister:t,portals:r}),[e,t,r]);return[r,d.useMemo(()=>function({children:a}){return d.createElement(na.Provider,{value:o},a)},[o])]}let Gf=ye(Qf),Ls=ye(Kf),ra=Object.assign(Gf,{Group:Ls});var Xf=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Xf||{}),Jf=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(Jf||{}),Zf=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(Zf||{}),ep=(n=>(n[n.OpenCombobox=0]="OpenCombobox",n[n.CloseCombobox=1]="CloseCombobox",n[n.GoToOption=2]="GoToOption",n[n.SetTyping=3]="SetTyping",n[n.RegisterOption=4]="RegisterOption",n[n.UnregisterOption=5]="UnregisterOption",n[n.SetActivationTrigger=6]="SetActivationTrigger",n[n.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",n[n.SetInputElement=8]="SetInputElement",n[n.SetButtonElement=9]="SetButtonElement",n[n.SetOptionsElement=10]="SetOptionsElement",n))(ep||{});function oa(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=r(n.options.slice()),o=t.length>0&&t[0].dataRef.current.order!==null?t.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Fo(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let tp={1(n){var r;return(r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1?n:{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(n){var r,e;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===0)return n;if((e=n.dataRef.current)!=null&&e.value){let t=n.dataRef.current.calculateIndex(n.dataRef.current.value);if(t!==-1)return{...n,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...n,comboboxState:0,__demoMode:!1}},3(n,r){return n.isTyping===r.isTyping?n:{...n,isTyping:r.isTyping}},2(n,r){var e,t,o,a;if((e=n.dataRef.current)!=null&&e.disabled||n.optionsElement&&!((t=n.dataRef.current)!=null&&t.optionsPropsRef.current.static)&&n.comboboxState===1)return n;if(n.virtual){let{options:u,disabled:c}=n.virtual,f=r.focus===ee.Specific?r.idx:zn(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var p,h;return(h=(p=n.activeOptionIndex)!=null?p:u.findIndex(v=>!c(v)))!=null?h:null},resolveDisabled:c,resolveId(){throw new Error("Function not implemented.")}}),m=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===f&&n.activationTrigger===m?n:{...n,activeOptionIndex:f,activationTrigger:m,isTyping:!1,__demoMode:!1}}let i=oa(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===ee.Specific?r.idx:zn(r,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled}),l=(a=r.trigger)!=null?a:2;return n.activeOptionIndex===s&&n.activationTrigger===l?n:{...n,...i,isTyping:!1,activeOptionIndex:s,activationTrigger:l,__demoMode:!1}},4:(n,r)=>{var e,t,o;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:[...n.options,r.payload]};let a=r.payload,i=oa(n,l=>(l.push(a),l));n.activeOptionIndex===null&&(t=n.dataRef.current)!=null&&t.isSelected(r.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(a));let s={...n,...i,activationTrigger:2};return(o=n.dataRef.current)!=null&&o.__demoMode&&n.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},5:(n,r)=>{var e;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:n.options.filter(o=>o.id!==r.id)};let t=oa(n,o=>{let a=o.findIndex(i=>i.id===r.id);return a!==-1&&o.splice(a,1),o});return{...n,...t,activationTrigger:2}},6:(n,r)=>n.activationTrigger===r.trigger?n:{...n,activationTrigger:r.trigger},7:(n,r)=>{var e,t;if(n.virtual===null)return{...n,virtual:{options:r.options,disabled:(e=r.disabled)!=null?e:()=>!1}};if(n.virtual.options===r.options&&n.virtual.disabled===r.disabled)return n;let o=n.activeOptionIndex;if(n.activeOptionIndex!==null){let a=r.options.indexOf(n.virtual.options[n.activeOptionIndex]);a!==-1?o=a:o=null}return{...n,activeOptionIndex:o,virtual:{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}}},8:(n,r)=>n.inputElement===r.element?n:{...n,inputElement:r.element},9:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},10:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},aa=d.createContext(null);aa.displayName="ComboboxActionsContext";function Un(n){let r=d.useContext(aa);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Un),e}return r}let As=d.createContext(null);function np(n){let r=vn("VirtualProvider"),{options:e}=r.virtual,[t,o]=d.useMemo(()=>{let u=r.optionsElement;if(!u)return[0,0];let c=window.getComputedStyle(u);return[parseFloat(c.paddingBlockStart||c.paddingTop),parseFloat(c.paddingBlockEnd||c.paddingBottom)]},[r.optionsElement]),a=ld({enabled:e.length!==0,scrollPaddingStart:t,scrollPaddingEnd:o,count:e.length,estimateSize(){return 40},getScrollElement(){return r.optionsElement},overscan:12}),[i,s]=d.useState(0);ne(()=>{s(u=>u+1)},[e]);let l=a.getVirtualItems();return l.length===0?null:d.createElement(As.Provider,{value:a},d.createElement("div",{style:{position:"relative",width:"100%",height:`${a.getTotalSize()}px`},ref:u=>{if(u){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&e.length>r.activeOptionIndex&&a.scrollToIndex(r.activeOptionIndex)}}},l.map(u=>{var c;return d.createElement(d.Fragment,{key:u.key},d.cloneElement((c=n.children)==null?void 0:c.call(n,{...n.slot,option:e[u.index]}),{key:`${i}-${u.key}`,"data-index":u.index,"aria-setsize":e.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let Kn=d.createContext(null);Kn.displayName="ComboboxDataContext";function vn(n){let r=d.useContext(Kn);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,vn),e}return r}function rp(n,r){return Ne(r.type,tp,n,r)}let op=d.Fragment;function ap(n,r){var e,t;let o=mr(),{value:a,defaultValue:i,onChange:s,form:l,name:u,by:c,disabled:f=o||!1,onClose:m,__demoMode:p=!1,multiple:h=!1,immediate:v=!1,virtual:g=null,nullable:b,...w}=n,x=gi(i),[k=h?[]:void 0,P]=vi(a,s,x),[M,S]=d.useReducer(rp,{dataRef:d.createRef(),comboboxState:p?0:1,isTyping:!1,options:[],virtual:g?{options:g.options,disabled:(e=g.disabled)!=null?e:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:p}),O=d.useRef(!1),I=d.useRef({static:!1,hold:!1}),W=Ti(c),E=L(Q=>g?c===null?g.options.indexOf(Q):g.options.findIndex(ve=>W(ve,Q)):M.options.findIndex(ve=>W(ve.dataRef.current.value,Q))),C=d.useCallback(Q=>Ne(D.mode,{1:()=>k.some(ve=>W(ve,Q)),0:()=>W(k,Q)}),[k]),_=L(Q=>M.activeOptionIndex===E(Q)),D=d.useMemo(()=>({...M,immediate:v,optionsPropsRef:I,value:k,defaultValue:x,disabled:f,mode:h?1:0,virtual:g?M.virtual:null,get activeOptionIndex(){if(O.current&&M.activeOptionIndex===null&&(g?g.options.length>0:M.options.length>0)){if(g){let ve=g.options.findIndex(Re=>{var pt,sr;return!((sr=(pt=g.disabled)==null?void 0:pt.call(g,Re))!=null&&sr)});if(ve!==-1)return ve}let Q=M.options.findIndex(ve=>!ve.dataRef.current.disabled);if(Q!==-1)return Q}return M.activeOptionIndex},calculateIndex:E,compare:W,isSelected:C,isActive:_}),[k,x,f,h,p,M,g]);ne(()=>{var Q;g&&S({type:7,options:g.options,disabled:(Q=g.disabled)!=null?Q:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),ne(()=>{M.dataRef.current=D},[D]);let N=D.comboboxState===0;Lo(N,[D.buttonElement,D.inputElement,D.optionsElement],()=>he.closeCombobox());let A=d.useMemo(()=>{var Q,ve,Re;return{open:D.comboboxState===0,disabled:f,activeIndex:D.activeOptionIndex,activeOption:D.activeOptionIndex===null?null:D.virtual?D.virtual.options[(Q=D.activeOptionIndex)!=null?Q:0]:(Re=(ve=D.options[D.activeOptionIndex])==null?void 0:ve.dataRef.current.value)!=null?Re:null,value:k}},[D,f,k]),$=L(()=>{if(D.activeOptionIndex!==null){if(he.setIsTyping(!1),D.virtual)Y(D.virtual.options[D.activeOptionIndex]);else{let{dataRef:Q}=D.options[D.activeOptionIndex];Y(Q.current.value)}he.goToOption(ee.Specific,D.activeOptionIndex)}}),U=L(()=>{S({type:0}),O.current=!0}),j=L(()=>{S({type:1}),O.current=!1,m==null||m()}),X=L(Q=>{S({type:3,isTyping:Q})}),q=L((Q,ve,Re)=>(O.current=!1,Q===ee.Specific?S({type:2,focus:ee.Specific,idx:ve,trigger:Re}):S({type:2,focus:Q,trigger:Re}))),K=L((Q,ve)=>(S({type:4,payload:{id:Q,dataRef:ve}}),()=>{D.isActive(ve.current.value)&&(O.current=!0),S({type:5,id:Q})})),Y=L(Q=>Ne(D.mode,{0(){return P==null?void 0:P(Q)},1(){let ve=D.value.slice(),Re=ve.findIndex(pt=>W(pt,Q));return Re===-1?ve.push(Q):ve.splice(Re,1),P==null?void 0:P(ve)}})),De=L(Q=>{S({type:6,trigger:Q})}),ue=L(Q=>{S({type:8,element:Q})}),Se=L(Q=>{S({type:9,element:Q})}),se=L(Q=>{S({type:10,element:Q})}),he=d.useMemo(()=>({onChange:Y,registerOption:K,goToOption:q,setIsTyping:X,closeCombobox:j,openCombobox:U,setActivationTrigger:De,selectActiveOption:$,setInputElement:ue,setButtonElement:Se,setOptionsElement:se}),[]),[He,Wt]=Oi(),me=r===null?{}:{ref:r},Oe=d.useCallback(()=>{if(x!==void 0)return P==null?void 0:P(x)},[P,x]);return d.createElement(Wt,{value:He,props:{htmlFor:(t=D.inputElement)==null?void 0:t.id},slot:{open:D.comboboxState===0,disabled:f}},d.createElement(_s,null,d.createElement(aa.Provider,{value:he},d.createElement(Kn.Provider,{value:D},d.createElement(ea,{value:Ne(D.comboboxState,{0:Ae.Open,1:Ae.Closed})},u!=null&&d.createElement(xi,{disabled:f,data:k!=null?{[u]:k}:{},form:l,onReset:Oe}),Ce({ourProps:me,theirProps:w,slot:A,defaultTag:op,name:"Combobox"}))))))}let ip="input";function sp(n,r){var e,t,o,a,i;let s=vn("Combobox.Input"),l=Un("Combobox.Input"),u=d.useId(),c=So(),{id:f=c||`headlessui-combobox-input-${u}`,onChange:m,displayValue:p,disabled:h=s.disabled||!1,autoFocus:v=!1,type:g="text",...b}=n,w=d.useRef(null),x=Ie(w,r,Es(),l.setInputElement),k=Pt(s.inputElement),P=mt(),M=L(()=>{l.onChange(null),s.optionsElement&&(s.optionsElement.scrollTop=0),l.goToOption(ee.Nothing)}),S=d.useMemo(()=>{var Y;return typeof p=="function"&&s.value!==void 0?(Y=p(s.value))!=null?Y:"":typeof s.value=="string"?s.value:""},[s.value,p]);Hn(([Y,De],[ue,Se])=>{if(s.isTyping)return;let se=w.current;se&&((Se===0&&De===1||Y!==ue)&&(se.value=Y),requestAnimationFrame(()=>{if(s.isTyping||!se||(k==null?void 0:k.activeElement)!==se)return;let{selectionStart:he,selectionEnd:He}=se;Math.abs((He??0)-(he??0))===0&&he===0&&se.setSelectionRange(se.value.length,se.value.length)}))},[S,s.comboboxState,k,s.isTyping]),Hn(([Y],[De])=>{if(Y===0&&De===1){if(s.isTyping)return;let ue=w.current;if(!ue)return;let Se=ue.value,{selectionStart:se,selectionEnd:he,selectionDirection:He}=ue;ue.value="",ue.value=Se,He!==null?ue.setSelectionRange(se,he,He):ue.setSelectionRange(se,he)}},[s.comboboxState]);let O=d.useRef(!1),I=L(()=>{O.current=!0}),W=L(()=>{P.nextFrame(()=>{O.current=!1})}),E=L(Y=>{switch(l.setIsTyping(!0),Y.key){case ae.Enter:if(s.comboboxState!==0||O.current)return;if(Y.preventDefault(),Y.stopPropagation(),s.activeOptionIndex===null){l.closeCombobox();return}l.selectActiveOption(),s.mode===0&&l.closeCombobox();break;case ae.ArrowDown:return Y.preventDefault(),Y.stopPropagation(),Ne(s.comboboxState,{0:()=>l.goToOption(ee.Next),1:()=>l.openCombobox()});case ae.ArrowUp:return Y.preventDefault(),Y.stopPropagation(),Ne(s.comboboxState,{0:()=>l.goToOption(ee.Previous),1:()=>{xe.flushSync(()=>l.openCombobox()),s.value||l.goToOption(ee.Last)}});case ae.Home:if(Y.shiftKey)break;return Y.preventDefault(),Y.stopPropagation(),l.goToOption(ee.First);case ae.PageUp:return Y.preventDefault(),Y.stopPropagation(),l.goToOption(ee.First);case ae.End:if(Y.shiftKey)break;return Y.preventDefault(),Y.stopPropagation(),l.goToOption(ee.Last);case ae.PageDown:return Y.preventDefault(),Y.stopPropagation(),l.goToOption(ee.Last);case ae.Escape:return s.comboboxState!==0?void 0:(Y.preventDefault(),s.optionsElement&&!s.optionsPropsRef.current.static&&Y.stopPropagation(),s.mode===0&&s.value===null&&M(),l.closeCombobox());case ae.Tab:if(s.comboboxState!==0)return;s.mode===0&&s.activationTrigger!==1&&l.selectActiveOption(),l.closeCombobox();break}}),C=L(Y=>{m==null||m(Y),s.mode===0&&Y.target.value===""&&M(),l.openCombobox()}),_=L(Y=>{var De,ue,Se;let se=(De=Y.relatedTarget)!=null?De:rt.find(he=>he!==Y.currentTarget);if(!((ue=s.optionsElement)!=null&&ue.contains(se))&&!((Se=s.buttonElement)!=null&&Se.contains(se))&&s.comboboxState===0)return Y.preventDefault(),s.mode===0&&s.value===null&&M(),l.closeCombobox()}),D=L(Y=>{var De,ue,Se;let se=(De=Y.relatedTarget)!=null?De:rt.find(he=>he!==Y.currentTarget);(ue=s.buttonElement)!=null&&ue.contains(se)||(Se=s.optionsElement)!=null&&Se.contains(se)||s.disabled||s.immediate&&s.comboboxState!==0&&P.microTask(()=>{xe.flushSync(()=>l.openCombobox()),l.setActivationTrigger(1)})}),N=$n(),A=ki(),{isFocused:$,focusProps:U}=Do({autoFocus:v}),{isHovered:j,hoverProps:X}=xo({isDisabled:h}),q=d.useMemo(()=>({open:s.comboboxState===0,disabled:h,hover:j,focus:$,autofocus:v}),[s,j,$,v,h]),K=Ln({ref:x,id:f,role:"combobox",type:g,"aria-controls":(e=s.optionsElement)==null?void 0:e.id,"aria-expanded":s.comboboxState===0,"aria-activedescendant":s.activeOptionIndex===null?void 0:s.virtual?(t=s.options.find(Y=>!Y.dataRef.current.disabled&&s.compare(Y.dataRef.current.value,s.virtual.options[s.activeOptionIndex])))==null?void 0:t.id:(o=s.options[s.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":N,"aria-describedby":A,"aria-autocomplete":"list",defaultValue:(i=(a=n.defaultValue)!=null?a:s.defaultValue!==void 0?p==null?void 0:p(s.defaultValue):null)!=null?i:s.defaultValue,disabled:h||void 0,autoFocus:v,onCompositionStart:I,onCompositionEnd:W,onKeyDown:E,onChange:C,onFocus:D,onBlur:_},U,X);return Ce({ourProps:K,theirProps:b,slot:q,defaultTag:ip,name:"Combobox.Input"})}let lp="button";function up(n,r){var e;let t=vn("Combobox.Button"),o=Un("Combobox.Button"),a=Ie(r,o.setButtonElement),i=d.useId(),{id:s=`headlessui-combobox-button-${i}`,disabled:l=t.disabled||!1,autoFocus:u=!1,...c}=n,f=Ri(t.inputElement),m=L(S=>{switch(S.key){case ae.Space:case ae.Enter:S.preventDefault(),S.stopPropagation(),t.comboboxState===1&&xe.flushSync(()=>o.openCombobox()),f();return;case ae.ArrowDown:S.preventDefault(),S.stopPropagation(),t.comboboxState===1&&(xe.flushSync(()=>o.openCombobox()),t.value||o.goToOption(ee.First)),f();return;case ae.ArrowUp:S.preventDefault(),S.stopPropagation(),t.comboboxState===1&&(xe.flushSync(()=>o.openCombobox()),t.value||o.goToOption(ee.Last)),f();return;case ae.Escape:if(t.comboboxState!==0)return;S.preventDefault(),t.optionsElement&&!t.optionsPropsRef.current.static&&S.stopPropagation(),xe.flushSync(()=>o.closeCombobox()),f();return;default:return}}),p=L(S=>{S.preventDefault(),!Di(S.currentTarget)&&(S.button===ta.Left&&(t.comboboxState===0?o.closeCombobox():o.openCombobox()),f())}),h=$n([s]),{isFocusVisible:v,focusProps:g}=Do({autoFocus:u}),{isHovered:b,hoverProps:w}=xo({isDisabled:l}),{pressed:x,pressProps:k}=hi({disabled:l}),P=d.useMemo(()=>({open:t.comboboxState===0,active:x||t.comboboxState===0,disabled:l,value:t.value,hover:b,focus:v}),[t,b,v,x,l]),M=Ln({ref:a,id:s,type:Bi(n,t.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(e=t.optionsElement)==null?void 0:e.id,"aria-expanded":t.comboboxState===0,"aria-labelledby":h,disabled:l||void 0,autoFocus:u,onMouseDown:p,onKeyDown:m},g,w,k);return Ce({ourProps:M,theirProps:c,slot:P,defaultTag:lp,name:"Combobox.Button"})}let cp="div",dp=St.RenderStrategy|St.Static;function fp(n,r){var e,t,o;let a=d.useId(),{id:i=`headlessui-combobox-options-${a}`,hold:s=!1,anchor:l,portal:u=!1,modal:c=!0,transition:f=!1,...m}=n,p=vn("Combobox.Options"),h=Un("Combobox.Options"),v=Ds(l);v&&(u=!0);let[g,b]=ks(v),[w,x]=d.useState(null),k=Cs(),P=Ie(r,v?g:null,h.setOptionsElement,x),M=Pt(p.optionsElement),S=mn(),[O,I]=jo(f,w,S!==null?(S&Ae.Open)===Ae.Open:p.comboboxState===0);To(O,p.inputElement,h.closeCombobox);let W=p.__demoMode?!1:c&&p.comboboxState===0;$o(W,M);let E=p.__demoMode?!1:c&&p.comboboxState===0;Mo(E,{allowed:d.useCallback(()=>[p.inputElement,p.buttonElement,p.optionsElement],[p.inputElement,p.buttonElement,p.optionsElement])}),ne(()=>{var q;p.optionsPropsRef.current.static=(q=n.static)!=null?q:!1},[p.optionsPropsRef,n.static]),ne(()=>{p.optionsPropsRef.current.hold=s},[p.optionsPropsRef,s]),Td(p.comboboxState===0,{container:p.optionsElement,accept(q){return q.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:q.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(q){q.setAttribute("role","none")}});let C=$n([(e=p.buttonElement)==null?void 0:e.id]),_=d.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p.comboboxState]),D=L(()=>{h.setActivationTrigger(0)}),N=L(q=>{q.preventDefault(),h.setActivationTrigger(0)}),A=Ln(v?k():{},{"aria-labelledby":C,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:i,ref:P,style:{...m.style,...b,"--input-width":Oo(p.inputElement,!0).width,"--button-width":Oo(p.buttonElement,!0).width},onWheel:p.activationTrigger===0?void 0:D,onMouseDown:N,...Yo(I)}),$=O&&p.comboboxState===1,U=Tr($,(t=p.virtual)==null?void 0:t.options),j=Tr($,p.value),X=L(q=>p.compare(j,q));if(p.virtual){if(U===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(m,{children:d.createElement(Kn.Provider,{value:U!==p.virtual.options?{...p,virtual:{...p.virtual,options:U}}:p},d.createElement(np,{slot:_},m.children))})}return d.createElement(ra,{enabled:u?n.static||O:!1},d.createElement(Kn.Provider,{value:p.mode===1?p:{...p,isSelected:X}},Ce({ourProps:A,theirProps:{...m,children:d.createElement(Yf,{freeze:$},typeof m.children=="function"?(o=m.children)==null?void 0:o.call(m,_):m.children)},slot:_,defaultTag:cp,features:dp,visible:O,name:"Combobox.Options"})))}let pp="div";function hp(n,r){var e,t,o,a;let i=vn("Combobox.Option"),s=Un("Combobox.Option"),l=d.useId(),{id:u=`headlessui-combobox-option-${l}`,value:c,disabled:f=(o=(t=(e=i.virtual)==null?void 0:e.disabled)==null?void 0:t.call(e,c))!=null?o:!1,order:m=null,...p}=n,h=Ri(i.inputElement),v=i.virtual?i.activeOptionIndex===i.calculateIndex(c):i.activeOptionIndex===null?!1:((a=i.options[i.activeOptionIndex])==null?void 0:a.id)===u,g=i.isSelected(c),b=d.useRef(null),w=vt({disabled:f,value:c,domRef:b,order:m}),x=d.useContext(As),k=Ie(r,b,x?x.measureElement:null),P=L(()=>{s.setIsTyping(!1),s.onChange(c)});ne(()=>s.registerOption(u,w),[w,u]);let M=d.useRef(!(i.virtual||i.__demoMode));ne(()=>{if(!i.virtual&&!i.__demoMode)return Je().requestAnimationFrame(()=>{M.current=!0})},[i.virtual,i.__demoMode]),ne(()=>{if(M.current&&i.comboboxState===0&&v&&i.activationTrigger!==0)return Je().requestAnimationFrame(()=>{var D,N;(N=(D=b.current)==null?void 0:D.scrollIntoView)==null||N.call(D,{block:"nearest"})})},[b,v,i.comboboxState,i.activationTrigger,i.activeOptionIndex]);let S=L(D=>{D.preventDefault(),D.button===ta.Left&&(f||(P(),ji()||requestAnimationFrame(()=>h()),i.mode===0&&s.closeCombobox()))}),O=L(()=>{if(f)return s.goToOption(ee.Nothing);let D=i.calculateIndex(c);s.goToOption(ee.Specific,D)}),I=zi(),W=L(D=>I.update(D)),E=L(D=>{if(!I.wasMoved(D)||f||v)return;let N=i.calculateIndex(c);s.goToOption(ee.Specific,N,0)}),C=L(D=>{I.wasMoved(D)&&(f||v&&(i.optionsPropsRef.current.hold||s.goToOption(ee.Nothing)))}),_=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:f}),[v,g,f]);return Ce({ourProps:{id:u,ref:k,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:S,onFocus:O,onPointerEnter:W,onMouseEnter:W,onPointerMove:E,onMouseMove:E,onPointerLeave:C,onMouseLeave:C},theirProps:p,slot:_,defaultTag:pp,name:"Combobox.Option"})}let mp=ye(ap),vp=ye(up),$s=ye(sp),gp=yr,Ys=ye(fp),js=ye(hp),bp=Object.assign(mp,{Input:$s,Button:vp,Label:gp,Options:Ys,Option:js});function yp(n,r=typeof document<"u"?document.defaultView:null,e){let t=ln(n,"escape");Ao(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===ae.Escape&&e(o))})}function wp(){var n;let[r]=d.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[e,t]=d.useState((n=r==null?void 0:r.matches)!=null?n:!1);return ne(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function xp({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=Pt(e),o=L(()=>{var a,i;let s=[];for(let l of n)l!==null&&(l instanceof HTMLElement?s.push(l):"current"in l&&l.current instanceof HTMLElement&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t==null?void 0:t.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(e&&(l.contains(e)||l.contains((i=e==null?void 0:e.getRootNode())==null?void 0:i.host))||s.some(u=>l.contains(u))||s.push(l));return s});return{resolveContainers:o,contains:L(a=>o().some(i=>i.contains(a)))}}let Ws=d.createContext(null);function Hs({children:n,node:r}){let[e,t]=d.useState(null),o=Rs(r??e);return d.createElement(Ws.Provider,{value:o},n,o===null&&d.createElement(An,{features:sn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=Vt(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(a)){t(l);break}}}}))}function Rs(n=null){var r;return(r=d.useContext(Ws))!=null?r:n}function ia(){let n=d.useRef(!1);return ne(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var qn=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(qn||{});function Dp(){let n=d.useRef(0);return Wi(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function Bs(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)e.current instanceof HTMLElement&&r.add(e.current);return r}let Ep="div";var qt=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(qt||{});function Cp(n,r){let e=d.useRef(null),t=Ie(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Qn()||(s=0);let u=Pt(e);Op(s,{ownerDocument:u});let c=Pp(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});Mp(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let f=Dp(),m=L(b=>{let w=e.current;w&&(x=>x())(()=>{Ne(f.current,{[qn.Forwards]:()=>{un(w,Ze.First,{skipElements:[b.relatedTarget,a]})},[qn.Backwards]:()=>{un(w,Ze.Last,{skipElements:[b.relatedTarget,a]})}})})}),p=ln(!!(s&2),"focus-trap#tab-lock"),h=mt(),v=d.useRef(!1),g={ref:t,onKeyDown(b){b.key=="Tab"&&(v.current=!0,h.requestAnimationFrame(()=>{v.current=!1}))},onBlur(b){if(!(s&4))return;let w=Bs(i);e.current instanceof HTMLElement&&w.add(e.current);let x=b.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(Vs(w,x)||(v.current?un(e.current,Ne(f.current,{[qn.Forwards]:()=>Ze.Next,[qn.Backwards]:()=>Ze.Previous})|Ze.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&>(b.target)))}};return d.createElement(d.Fragment,null,p&&d.createElement(An,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:sn.Focusable}),Ce({ourProps:g,theirProps:l,defaultTag:Ep,name:"FocusTrap"}),p&&d.createElement(An,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:sn.Focusable}))}let kp=ye(Cp),Sp=Object.assign(kp,{features:qt});function _p(n=!0){let r=d.useRef(rt.slice());return Hn(([e],[t])=>{t===!0&&e===!1&&hr(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=rt.slice())},[n,rt,r]),L(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function Op(n,{ownerDocument:r}){let e=!!(n&8),t=_p(e);Hn(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&>(t())},[e]),Ms(()=>{e&>(t())})}function Pp(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=ln(!!(n&1),"focus-trap#initial-focus"),s=ia();return Hn(()=>{if(n===0)return;if(!i){o!=null&&o.current&>(o.current);return}let l=e.current;l&&hr(()=>{if(!s.current)return;let u=r==null?void 0:r.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===u){a.current=u;return}}else if(l.contains(u)){a.current=u;return}if(t!=null&&t.current)gt(t.current);else{if(n&16){if(un(l,Ze.First|Ze.AutoFocus)!==No.Error)return}else if(un(l,Ze.First)!==No.Error)return;if(o!=null&&o.current&&(gt(o.current),(r==null?void 0:r.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=r==null?void 0:r.activeElement})},[o,i,n]),a}function Mp(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=ia(),i=!!(n&4);Ao(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=Bs(t);e.current instanceof HTMLElement&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;c&&c instanceof HTMLElement?Vs(l,c)?(o.current=c,gt(c)):(s.preventDefault(),s.stopPropagation(),gt(u)):gt(o.current)},!0)}function Vs(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function zs(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Us)!==d.Fragment||d.Children.count(n.children)===1}let Ir=d.createContext(null);Ir.displayName="TransitionContext";var Tp=(n=>(n.Visible="visible",n.Hidden="hidden",n))(Tp||{});function Np(){let n=d.useContext(Ir);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function Ip(){let n=d.useContext(Fr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Fr=d.createContext(null);Fr.displayName="NestingContext";function Lr(n){return"children"in n?Lr(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Qs(n,r){let e=vt(n),t=d.useRef([]),o=ia(),a=mt(),i=L((p,h=_t.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===p);v!==-1&&(Ne(h,{[_t.Unmount](){t.current.splice(v,1)},[_t.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Lr(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=L(p=>{let h=t.current.find(({el:v})=>v===p);return h?h.state!=="visible"&&(h.state="visible"):t.current.push({el:p,state:"visible"}),()=>i(p,_t.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),f=L((p,h,v)=>{l.current.splice(0),r&&(r.chains.current[h]=r.chains.current[h].filter(([g])=>g!==p)),r==null||r.chains.current[h].push([p,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[h].push([p,new Promise(g=>{Promise.all(c.current[h].map(([b,w])=>w)).then(()=>g())})]),h==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(h)):v(h)}),m=L((p,h,v)=>{Promise.all(c.current[h].splice(0).map(([g,b])=>b)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(h))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:f,onStop:m,wait:u,chains:c}),[s,i,t,f,m,c,u])}let Us=d.Fragment,Ks=St.RenderStrategy;function Fp(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:m,leave:p,leaveFrom:h,leaveTo:v,...g}=n,[b,w]=d.useState(null),x=d.useRef(null),k=zs(n),P=Ie(...k?[x,r,w]:r===null?[]:[r]),M=(e=g.unmount)==null||e?_t.Unmount:_t.Hidden,{show:S,appear:O,initial:I}=Np(),[W,E]=d.useState(S?"visible":"hidden"),C=Ip(),{register:_,unregister:D}=C;ne(()=>_(x),[_,x]),ne(()=>{if(M===_t.Hidden&&x.current){if(S&&W!=="visible"){E("visible");return}return Ne(W,{hidden:()=>D(x),visible:()=>_(x)})}},[W,x,_,D,S,M]);let N=Qn();ne(()=>{if(k&&N&&W==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,W,N,k]);let A=I&&!O,$=O&&S&&I,U=d.useRef(!1),j=Qs(()=>{U.current||(E("hidden"),D(x))},C),X=L(Se=>{U.current=!0;let se=Se?"enter":"leave";j.onStart(x,se,he=>{he==="enter"?a==null||a():he==="leave"&&(s==null||s())})}),q=L(Se=>{let se=Se?"enter":"leave";U.current=!1,j.onStop(x,se,he=>{he==="enter"?i==null||i():he==="leave"&&(l==null||l())}),se==="leave"&&!Lr(j)&&(E("hidden"),D(x))});d.useEffect(()=>{k&&o||(X(S),q(S))},[S,k,o]);let K=!(!o||!k||!N||A),[,Y]=jo(K,b,S,{start:X,end:q}),De=Ot({ref:P,className:((t=Co(g.className,$&&u,$&&c,Y.enter&&u,Y.enter&&Y.closed&&c,Y.enter&&!Y.closed&&f,Y.leave&&p,Y.leave&&!Y.closed&&h,Y.leave&&Y.closed&&v,!Y.transition&&S&&m))==null?void 0:t.trim())||void 0,...Yo(Y)}),ue=0;return W==="visible"&&(ue|=Ae.Open),W==="hidden"&&(ue|=Ae.Closed),Y.enter&&(ue|=Ae.Opening),Y.leave&&(ue|=Ae.Closing),d.createElement(Fr.Provider,{value:j},d.createElement(ea,{value:ue},Ce({ourProps:De,theirProps:g,defaultTag:Us,features:Ks,visible:W==="visible",name:"Transition.Child"})))}function Lp(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=zs(n),l=Ie(...s?[i,r]:r===null?[]:[r]);Qn();let u=mn();if(e===void 0&&u!==null&&(e=(u&Ae.Open)===Ae.Open),e===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=d.useState(e?"visible":"hidden"),m=Qs(()=>{e||f("hidden")}),[p,h]=d.useState(!0),v=d.useRef([e]);ne(()=>{p!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),h(!1))},[v,e]);let g=d.useMemo(()=>({show:e,appear:t,initial:p}),[e,t,p]);ne(()=>{e?f("visible"):!Lr(m)&&i.current!==null&&f("hidden")},[e,m]);let b={unmount:o},w=L(()=>{var k;p&&h(!1),(k=n.beforeEnter)==null||k.call(n)}),x=L(()=>{var k;p&&h(!1),(k=n.beforeLeave)==null||k.call(n)});return d.createElement(Fr.Provider,{value:m},d.createElement(Ir.Provider,{value:g},Ce({ourProps:{...b,as:d.Fragment,children:d.createElement(qs,{ref:l,...b,...a,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:d.Fragment,features:Ks,visible:c==="visible",name:"Transition"})))}function Ap(n,r){let e=d.useContext(Ir)!==null,t=mn()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement(sa,{ref:r,...n}):d.createElement(qs,{ref:r,...n}))}let sa=ye(Lp),qs=ye(Fp),la=ye(Ap),Gs=Object.assign(sa,{Child:la,Root:sa});var $p=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))($p||{}),Yp=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(Yp||{});let jp={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},ua=d.createContext(null);ua.displayName="DialogContext";function Ar(n){let r=d.useContext(ua);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ar),e}return r}function Wp(n,r){return Ne(r.type,jp,n,r)}let Xs=ye(function(n,r){let e=d.useId(),{id:t=`headlessui-dialog-${e}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:u=!1,unmount:c=!1,...f}=n,m=d.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(m.current||(m.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=mn();o===void 0&&p!==null&&(o=(p&Ae.Open)===Ae.Open);let h=d.useRef(null),v=Ie(h,r),g=Pt(h),b=o?0:1,[w,x]=d.useReducer(Wp,{titleId:null,descriptionId:null,panelRef:d.createRef()}),k=L(()=>a(!1)),P=L(X=>x({type:0,id:X})),M=Qn()?b===0:!1,[S,O]=qf(),I={get current(){var X;return(X=w.panelRef.current)!=null?X:h.current}},W=Rs(),{resolveContainers:E}=xp({mainTreeNode:W,portals:S,defaultContainers:[I]}),C=p!==null?(p&Ae.Closing)===Ae.Closing:!1;Mo(u||C?!1:M,{allowed:L(()=>{var X,q;return[(q=(X=h.current)==null?void 0:X.closest("[data-headlessui-portal]"))!=null?q:null]}),disallowed:L(()=>{var X;return[(X=W==null?void 0:W.closest("body > *:not(#headlessui-portal-root)"))!=null?X:null]})}),Lo(M,E,X=>{X.preventDefault(),k()}),yp(M,g==null?void 0:g.defaultView,X=>{X.preventDefault(),X.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),$o(u||C?!1:M,g,E),To(M,h,k);let[_,D]=Wc(),N=d.useMemo(()=>[{dialogState:b,close:k,setTitleId:P,unmount:c},w],[b,w,k,P,c]),A=d.useMemo(()=>({open:b===0}),[b]),$={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:b===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":_,unmount:c},U=!wp(),j=qt.None;return M&&!u&&(j|=qt.RestoreFocus,j|=qt.TabLock,l&&(j|=qt.AutoFocus),U&&(j|=qt.InitialFocus)),d.createElement(jf,null,d.createElement(Ns,{force:!0},d.createElement(ra,null,d.createElement(ua.Provider,{value:N},d.createElement(Ls,{target:h},d.createElement(Ns,{force:!1},d.createElement(D,{slot:A},d.createElement(O,null,d.createElement(Sp,{initialFocus:i,initialFocusFallback:h,containers:E,features:j},d.createElement(Kc,{value:k},Ce({ourProps:$,theirProps:f,slot:A,defaultTag:Hp,features:Rp,visible:b===0,name:"Dialog"})))))))))))}),Hp="div",Rp=St.RenderStrategy|St.Static;function Bp(n,r){let{transition:e=!1,open:t,...o}=n,a=mn(),i=n.hasOwnProperty("open")||a!==null,s=n.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(t!==void 0||e)&&!o.static?d.createElement(Hs,null,d.createElement(Gs,{show:t,transition:e,unmount:o.unmount},d.createElement(Xs,{ref:r,...o}))):d.createElement(Hs,null,d.createElement(Xs,{ref:r,open:t,...o}))}let Vp="div";function zp(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Ar("Dialog.Panel"),u=Ie(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),f=L(p=>{p.stopPropagation()}),m={ref:u,id:t,onClick:f};return d.createElement(o?la:d.Fragment,{...o?{unmount:s}:{}},Ce({ourProps:m,theirProps:a,slot:c,defaultTag:Vp,name:"Dialog.Panel"}))}let Qp="div";function Up(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Ar("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0};return d.createElement(e?la:d.Fragment,{...e?{unmount:a}:{}},Ce({ourProps:s,theirProps:t,slot:i,defaultTag:Qp,name:"Dialog.Backdrop"}))}let Kp="h2";function qp(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Ar("Dialog.Title"),s=Ie(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]);return Ce({ourProps:{ref:s,id:t},theirProps:o,slot:l,defaultTag:Kp,name:"Dialog.Title"})}let Gp=ye(Bp),Js=ye(zp);ye(Up);let Zs=ye(qp),Gn=Object.assign(Gp,{Panel:Js,Title:Zs,Description:Si});function Xp(n,r){let e=d.useRef({left:0,top:0});if(ne(()=>{if(!r)return;let o=r.getBoundingClientRect();o&&(e.current=o)},[n,r]),r==null||!n||r===document.activeElement)return!1;let t=r.getBoundingClientRect();return t.top!==e.current.top||t.left!==e.current.left}let el=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function tl(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!(o instanceof HTMLElement))return t;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(e=o.innerText)!=null?e:"":t;return el.test(i)&&(i=i.replace(el,"")),i}function Jp(n){let r=n.getAttribute("aria-label");if(typeof r=="string")return r.trim();let e=n.getAttribute("aria-labelledby");if(e){let t=e.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():tl(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return tl(n).trim()}function Zp(n){let r=d.useRef(""),e=d.useRef("");return L(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=Jp(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var eh=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(eh||{}),th=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(th||{}),nh=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(nh||{}),rh=(n=>(n[n.OpenListbox=0]="OpenListbox",n[n.CloseListbox=1]="CloseListbox",n[n.GoToOption=2]="GoToOption",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterOption=5]="RegisterOption",n[n.UnregisterOption=6]="UnregisterOption",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetOptionsElement=8]="SetOptionsElement",n))(rh||{});function ca(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=Fo(r(n.options.slice()),a=>a.dataRef.current.domRef.current),o=e?t.indexOf(e):null;return o===-1&&(o=null),{options:t,activeOptionIndex:o}}let oh={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(n){if(n.dataRef.current.disabled||n.listboxState===0)return n;let r=n.activeOptionIndex,{isSelected:e}=n.dataRef.current,t=n.options.findIndex(o=>e(o.dataRef.current.value));return t!==-1&&(r=t),{...n,listboxState:0,activeOptionIndex:r,__demoMode:!1}},2(n,r){var e,t,o,a,i;if(n.dataRef.current.disabled||n.listboxState===1)return n;let s={...n,searchQuery:"",activationTrigger:(e=r.trigger)!=null?e:1,__demoMode:!1};if(r.focus===ee.Nothing)return{...s,activeOptionIndex:null};if(r.focus===ee.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===ee.Previous){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,m=zn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(m!==null){let p=n.options[m].dataRef.current.domRef;if(((t=f.current)==null?void 0:t.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:m}}}}else if(r.focus===ee.Next){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,m=zn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(m!==null){let p=n.options[m].dataRef.current.domRef;if(((a=f.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:m}}}}let l=ca(n),u=zn(r,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...s,...l,activeOptionIndex:u}},3:(n,r)=>{if(n.dataRef.current.disabled||n.listboxState===1)return n;let e=n.searchQuery!==""?0:1,t=n.searchQuery+r.value.toLowerCase(),o=(n.activeOptionIndex!==null?n.options.slice(n.activeOptionIndex+e).concat(n.options.slice(0,n.activeOptionIndex+e)):n.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(t))}),a=o?n.options.indexOf(o):-1;return a===-1||a===n.activeOptionIndex?{...n,searchQuery:t}:{...n,searchQuery:t,activeOptionIndex:a,activationTrigger:1}},4(n){return n.dataRef.current.disabled||n.listboxState===1||n.searchQuery===""?n:{...n,searchQuery:""}},5:(n,r)=>{let e={id:r.id,dataRef:r.dataRef},t=ca(n,o=>[...o,e]);return n.activeOptionIndex===null&&n.dataRef.current.isSelected(r.dataRef.current.value)&&(t.activeOptionIndex=t.options.indexOf(e)),{...n,...t}},6:(n,r)=>{let e=ca(n,t=>{let o=t.findIndex(a=>a.id===r.id);return o!==-1&&t.splice(o,1),t});return{...n,...e,activationTrigger:1}},7:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},8:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},da=d.createContext(null);da.displayName="ListboxActionsContext";function $r(n){let r=d.useContext(da);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,$r),e}return r}let Yr=d.createContext(null);Yr.displayName="ListboxDataContext";function Xn(n){let r=d.useContext(Yr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Xn),e}return r}function ah(n,r){return Ne(r.type,oh,n,r)}let ih=d.Fragment;function sh(n,r){var e;let t=mr(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:u,invalid:c=!1,disabled:f=t||!1,horizontal:m=!1,multiple:p=!1,__demoMode:h=!1,...v}=n;const g=m?"horizontal":"vertical";let b=Ie(r),w=gi(a),[x=p?[]:void 0,k]=vi(o,l,w),[P,M]=d.useReducer(ah,{dataRef:d.createRef(),listboxState:h?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:h}),S=d.useRef({static:!1,hold:!1}),O=d.useRef(new Map),I=Ti(u),W=d.useCallback(me=>Ne(E.mode,{1:()=>x.some(Oe=>I(Oe,me)),0:()=>I(x,me)}),[x]),E=d.useMemo(()=>({...P,value:x,disabled:f,invalid:c,mode:p?1:0,orientation:g,compare:I,isSelected:W,optionsPropsRef:S,listRef:O}),[x,f,c,p,P,O]);ne(()=>{P.dataRef.current=E},[E]);let C=E.listboxState===0;Lo(C,[E.buttonElement,E.optionsElement],(me,Oe)=>{var Q;M({type:1}),$i(Oe,Io.Loose)||(me.preventDefault(),(Q=E.buttonElement)==null||Q.focus())});let _=d.useMemo(()=>({open:E.listboxState===0,disabled:f,invalid:c,value:x}),[E,f,x,c]),D=L(me=>{let Oe=E.options.find(Q=>Q.id===me);Oe&&q(Oe.dataRef.current.value)}),N=L(()=>{if(E.activeOptionIndex!==null){let{dataRef:me,id:Oe}=E.options[E.activeOptionIndex];q(me.current.value),M({type:2,focus:ee.Specific,id:Oe})}}),A=L(()=>M({type:0})),$=L(()=>M({type:1})),U=mt(),j=L((me,Oe,Q)=>{U.dispose(),U.microTask(()=>me===ee.Specific?M({type:2,focus:ee.Specific,id:Oe,trigger:Q}):M({type:2,focus:me,trigger:Q}))}),X=L((me,Oe)=>(M({type:5,id:me,dataRef:Oe}),()=>M({type:6,id:me}))),q=L(me=>Ne(E.mode,{0(){return k==null?void 0:k(me)},1(){let Oe=E.value.slice(),Q=Oe.findIndex(ve=>I(ve,me));return Q===-1?Oe.push(me):Oe.splice(Q,1),k==null?void 0:k(Oe)}})),K=L(me=>M({type:3,value:me})),Y=L(()=>M({type:4})),De=L(me=>{M({type:7,element:me})}),ue=L(me=>{M({type:8,element:me})}),Se=d.useMemo(()=>({onChange:q,registerOption:X,goToOption:j,closeListbox:$,openListbox:A,selectActiveOption:N,selectOption:D,search:K,clearSearch:Y,setButtonElement:De,setOptionsElement:ue}),[]),[se,he]=Oi({inherit:!0}),He={ref:b},Wt=d.useCallback(()=>{if(w!==void 0)return k==null?void 0:k(w)},[k,w]);return d.createElement(he,{value:se,props:{htmlFor:(e=E.buttonElement)==null?void 0:e.id},slot:{open:E.listboxState===0,disabled:f}},d.createElement(_s,null,d.createElement(da.Provider,{value:Se},d.createElement(Yr.Provider,{value:E},d.createElement(ea,{value:Ne(E.listboxState,{0:Ae.Open,1:Ae.Closed})},s!=null&&x!=null&&d.createElement(xi,{disabled:f,data:{[s]:x},form:i,onReset:Wt}),Ce({ourProps:He,theirProps:v,slot:_,defaultTag:ih,name:"Listbox"}))))))}let lh="button";function uh(n,r){var e;let t=Xn("Listbox.Button"),o=$r("Listbox.Button"),a=d.useId(),i=So(),{id:s=i||`headlessui-listbox-button-${a}`,disabled:l=t.disabled||!1,autoFocus:u=!1,...c}=n,f=Ie(r,Es(),o.setButtonElement),m=Lf(),p=L(E=>{switch(E.key){case ae.Enter:Tc(E.currentTarget);break;case ae.Space:case ae.ArrowDown:E.preventDefault(),xe.flushSync(()=>o.openListbox()),t.value||o.goToOption(ee.First);break;case ae.ArrowUp:E.preventDefault(),xe.flushSync(()=>o.openListbox()),t.value||o.goToOption(ee.Last);break}}),h=L(E=>{switch(E.key){case ae.Space:E.preventDefault();break}}),v=L(E=>{var C;if(Di(E.currentTarget))return E.preventDefault();t.listboxState===0?(xe.flushSync(()=>o.closeListbox()),(C=t.buttonElement)==null||C.focus({preventScroll:!0})):(E.preventDefault(),o.openListbox())}),g=L(E=>E.preventDefault()),b=$n([s]),w=ki(),{isFocusVisible:x,focusProps:k}=Do({autoFocus:u}),{isHovered:P,hoverProps:M}=xo({isDisabled:l}),{pressed:S,pressProps:O}=hi({disabled:l}),I=d.useMemo(()=>({open:t.listboxState===0,active:S||t.listboxState===0,disabled:l,invalid:t.invalid,value:t.value,hover:P,focus:x,autofocus:u}),[t.listboxState,t.value,l,P,x,S,t.invalid,u]),W=Ln(m(),{ref:f,id:s,type:Bi(n,t.buttonElement),"aria-haspopup":"listbox","aria-controls":(e=t.optionsElement)==null?void 0:e.id,"aria-expanded":t.listboxState===0,"aria-labelledby":b,"aria-describedby":w,disabled:l||void 0,autoFocus:u,onKeyDown:p,onKeyUp:h,onKeyPress:g,onClick:v},k,M,O);return Ce({ourProps:W,theirProps:c,slot:I,defaultTag:lh,name:"Listbox.Button"})}let nl=d.createContext(!1),ch="div",dh=St.RenderStrategy|St.Static;function fh(n,r){var e,t;let o=d.useId(),{id:a=`headlessui-listbox-options-${o}`,anchor:i,portal:s=!1,modal:l=!0,transition:u=!1,...c}=n,f=Ds(i),[m,p]=d.useState(null);f&&(s=!0);let h=Xn("Listbox.Options"),v=$r("Listbox.Options"),g=Pt(h.optionsElement),b=mn(),[w,x]=jo(u,m,b!==null?(b&Ae.Open)===Ae.Open:h.listboxState===0);To(w,h.buttonElement,v.closeListbox);let k=h.__demoMode?!1:l&&h.listboxState===0;$o(k,g);let P=h.__demoMode?!1:l&&h.listboxState===0;Mo(P,{allowed:d.useCallback(()=>[h.buttonElement,h.optionsElement],[h.buttonElement,h.optionsElement])});let M=h.listboxState!==0,S=Xp(M,h.buttonElement)?!1:w,O=w&&h.listboxState===1,I=Tr(O,h.value),W=L(K=>h.compare(I,K)),E=d.useMemo(()=>{var K;if(f==null||!((K=f==null?void 0:f.to)!=null&&K.includes("selection")))return null;let Y=h.options.findIndex(De=>W(De.dataRef.current.value));return Y===-1&&(Y=0),Y},[f,h.options]),C=(()=>{if(f==null)return;if(E===null)return{...f,inner:void 0};let K=Array.from(h.listRef.current.values());return{...f,inner:{listRef:{current:K},index:E}}})(),[_,D]=ks(C),N=Cs(),A=Ie(r,f?_:null,v.setOptionsElement,p),$=mt();d.useEffect(()=>{var K;let Y=h.optionsElement;Y&&h.listboxState===0&&Y!==((K=Vt(Y))==null?void 0:K.activeElement)&&(Y==null||Y.focus({preventScroll:!0}))},[h.listboxState,h.optionsElement]);let U=L(K=>{var Y,De;switch($.dispose(),K.key){case ae.Space:if(h.searchQuery!=="")return K.preventDefault(),K.stopPropagation(),v.search(K.key);case ae.Enter:if(K.preventDefault(),K.stopPropagation(),h.activeOptionIndex!==null){let{dataRef:ue}=h.options[h.activeOptionIndex];v.onChange(ue.current.value)}h.mode===0&&(xe.flushSync(()=>v.closeListbox()),(Y=h.buttonElement)==null||Y.focus({preventScroll:!0}));break;case Ne(h.orientation,{vertical:ae.ArrowDown,horizontal:ae.ArrowRight}):return K.preventDefault(),K.stopPropagation(),v.goToOption(ee.Next);case Ne(h.orientation,{vertical:ae.ArrowUp,horizontal:ae.ArrowLeft}):return K.preventDefault(),K.stopPropagation(),v.goToOption(ee.Previous);case ae.Home:case ae.PageUp:return K.preventDefault(),K.stopPropagation(),v.goToOption(ee.First);case ae.End:case ae.PageDown:return K.preventDefault(),K.stopPropagation(),v.goToOption(ee.Last);case ae.Escape:K.preventDefault(),K.stopPropagation(),xe.flushSync(()=>v.closeListbox()),(De=h.buttonElement)==null||De.focus({preventScroll:!0});return;case ae.Tab:K.preventDefault(),K.stopPropagation(),xe.flushSync(()=>v.closeListbox()),yd(h.buttonElement,K.shiftKey?Ze.Previous:Ze.Next);break;default:K.key.length===1&&(v.search(K.key),$.setTimeout(()=>v.clearSearch(),350));break}}),j=(e=h.buttonElement)==null?void 0:e.id,X=d.useMemo(()=>({open:h.listboxState===0}),[h.listboxState]),q=Ln(f?N():{},{id:a,ref:A,"aria-activedescendant":h.activeOptionIndex===null||(t=h.options[h.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":h.mode===1?!0:void 0,"aria-labelledby":j,"aria-orientation":h.orientation,onKeyDown:U,role:"listbox",tabIndex:h.listboxState===0?0:void 0,style:{...c.style,...D,"--button-width":Oo(h.buttonElement,!0).width},...Yo(x)});return d.createElement(ra,{enabled:s?n.static||w:!1},d.createElement(Yr.Provider,{value:h.mode===1?h:{...h,isSelected:W}},Ce({ourProps:q,theirProps:c,slot:X,defaultTag:ch,features:dh,visible:S,name:"Listbox.Options"})))}let ph="div";function hh(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(nl)===!0,l=Xn("Listbox.Option"),u=$r("Listbox.Option"),c=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===t:!1,f=l.isSelected(a),m=d.useRef(null),p=Zp(m),h=vt({disabled:o,value:a,domRef:m,get textValue(){return p()}}),v=Ie(r,m,O=>{O?l.listRef.current.set(t,O):l.listRef.current.delete(t)});ne(()=>{if(!l.__demoMode&&l.listboxState===0&&c&&l.activationTrigger!==0)return Je().requestAnimationFrame(()=>{var O,I;(I=(O=m.current)==null?void 0:O.scrollIntoView)==null||I.call(O,{block:"nearest"})})},[m,c,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),ne(()=>{if(!s)return u.registerOption(t,h)},[h,t,s]);let g=L(O=>{var I;if(o)return O.preventDefault();u.onChange(a),l.mode===0&&(xe.flushSync(()=>u.closeListbox()),(I=l.buttonElement)==null||I.focus({preventScroll:!0}))}),b=L(()=>{if(o)return u.goToOption(ee.Nothing);u.goToOption(ee.Specific,t)}),w=zi(),x=L(O=>{w.update(O),!o&&(c||u.goToOption(ee.Specific,t,0))}),k=L(O=>{w.wasMoved(O)&&(o||c||u.goToOption(ee.Specific,t,0))}),P=L(O=>{w.wasMoved(O)&&(o||c&&u.goToOption(ee.Nothing))}),M=d.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&s}),[c,f,o,s]);return!f&&s?null:Ce({ourProps:s?{}:{id:t,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:g,onFocus:b,onPointerEnter:x,onMouseEnter:x,onPointerMove:k,onMouseMove:k,onPointerLeave:P,onMouseLeave:P},theirProps:i,slot:M,defaultTag:ph,name:"Listbox.Option"})}let mh=d.Fragment;function vh(n,r){let{options:e,placeholder:t,...o}=n,a={ref:Ie(r)},i=Xn("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===1&&Array.isArray(i.value)&&i.value.length===0;return d.createElement(nl.Provider,{value:!0},Ce({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:mh,name:"ListboxSelectedOption"}))}let gh=ye(sh),rl=ye(uh),bh=yr,ol=ye(fh),al=ye(hh),yh=ye(vh),wh=Object.assign(gh,{Button:rl,Label:bh,Options:ol,Option:al,SelectedOption:yh});const xh=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return T.jsxs(T.Fragment,{children:[T.jsx(Dh,{isOpen:o,setIsOpen:a,termImageUrl:t}),T.jsxs("div",{className:"inline-flex items-center",children:[T.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[T.jsx("input",{type:"checkbox",className:"before:content[''] border-blue-gray-200 before:bg-blue-gray-500 peer relative size-6 cursor-pointer appearance-none rounded-xl border bg-[#C5C8CD] transition-all before:absolute before:left-2/4 before:top-2/4 before:block before:h-12 before:w-12 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity checked:border-petnowOrange checked:bg-petnowOrange checked:before:bg-petnowOrange",id:r,checked:n,onChange:i=>{e(i.target.checked)}}),T.jsx("span",{className:"pointer-events-none absolute left-2/4 top-2/4 -translate-x-2/4 -translate-y-2/4 text-[#8B919A] transition peer-checked:text-white",children:T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:T.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),r&&T.jsxs("div",{className:"flex items-center",children:[T.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),T.jsx(sc,{onClick:()=>{a(!0)},className:"ml-2 mt-[2.5px] cursor-pointer text-deepGray",size:24})]})]})]})},Dh=({isOpen:n,setIsOpen:r,termImageUrl:e})=>T.jsxs(Gn,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[T.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),T.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:T.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:T.jsxs(Gn.Panel,{className:"mx-auto flex max-w-sm flex-col items-center gap-8 rounded bg-white",children:[T.jsx("div",{className:"flex h-[36px] w-full flex-row-reverse items-center bg-[#F0F1F2]",children:T.jsx(oi,{size:20,className:"mr-2",onClick:()=>r(!1)})}),T.jsx("img",{src:e,alt:"약관동의 이미지"}),T.jsx(Za,{text:"닫기",className:"mb-4 w-[90%] text-base focus:outline-none",onClick:()=>r(!1)})]})})})]});var il={},sl={},jr={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.postcodeScriptUrl=void 0;var r="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";n.postcodeScriptUrl="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";var e=function(){var o=null;return function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:r;return o||(o=new Promise(function(i,s){var l=document.createElement("script");l.src=a,l.onload=function(){var u,c;return(u=window)!==null&&u!==void 0&&(c=u.daum)!==null&&c!==void 0&&c.Postcode?i(window.daum.Postcode):void s(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."))},l.onerror=function(u){return s(u)},l.id="daum_postcode_script",document.body.appendChild(l)}),o)}}(),t=e;n.default=t})(jr),function(n){function r(E){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},r(E)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=i(d),t=i(jr),o=["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"];function a(E){if(typeof WeakMap!="function")return null;var C=new WeakMap,_=new WeakMap;return(a=function(D){return D?_:C})(E)}function i(E,C){if(E&&E.__esModule)return E;if(E===null||r(E)!=="object"&&typeof E!="function")return{default:E};var _=a(C);if(_&&_.has(E))return _.get(E);var D={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in E)if(A!="default"&&Object.prototype.hasOwnProperty.call(E,A)){var $=N?Object.getOwnPropertyDescriptor(E,A):null;$&&($.get||$.set)?Object.defineProperty(D,A,$):D[A]=E[A]}return D.default=E,_&&_.set(E,D),D}function s(E,C){var _=Object.keys(E);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(E);C&&(D=D.filter(function(N){return Object.getOwnPropertyDescriptor(E,N).enumerable})),_.push.apply(_,D)}return _}function l(E){for(var C,_=1;_<arguments.length;_++)C=arguments[_]==null?{}:arguments[_],_%2?s(Object(C),!0).forEach(function(D){P(E,D,C[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(C)):s(Object(C)).forEach(function(D){Object.defineProperty(E,D,Object.getOwnPropertyDescriptor(C,D))});return E}function u(E,C){if(E==null)return{};var _,D,N=c(E,C);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(E);for(D=0;D<A.length;D++)_=A[D],0<=C.indexOf(_)||Object.prototype.propertyIsEnumerable.call(E,_)&&(N[_]=E[_])}return N}function c(E,C){if(E==null)return{};var _,D,N={},A=Object.keys(E);for(D=0;D<A.length;D++)_=A[D],0<=C.indexOf(_)||(N[_]=E[_]);return N}function f(E,C){if(!(E instanceof C))throw new TypeError("Cannot call a class as a function")}function m(E,C){for(var _,D=0;D<C.length;D++)_=C[D],_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(E,_.key,_)}function p(E,C,_){return C&&m(E.prototype,C),E}function h(E,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(C&&C.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),C&&v(E,C)}function v(E,C){return v=Object.setPrototypeOf||function(_,D){return _.__proto__=D,_},v(E,C)}function g(E){var C=x();return function(){var _,D=k(E);if(C){var N=k(this).constructor;_=Reflect.construct(D,arguments,N)}else _=D.apply(this,arguments);return b(this,_)}}function b(E,C){return C&&(r(C)==="object"||typeof C=="function")?C:w(E)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function x(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(E){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},k(E)}function P(E,C,_){return C in E?Object.defineProperty(E,C,{value:_,enumerable:!0,configurable:!0,writable:!0}):E[C]=_,E}var M=e.default.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),S={width:"100%",height:400},O={scriptUrl:t.postcodeScriptUrl,errorMessage:M,autoClose:!0},I=function(E){function C(){var D;f(this,C);for(var N=arguments.length,A=Array(N),$=0;$<N;$++)A[$]=arguments[$];return D=_.call.apply(_,[this].concat(A)),P(w(D),"mounted",!1),P(w(D),"wrap",(0,e.createRef)()),P(w(D),"state",{hasError:!1}),P(w(D),"initiate",function(U){if(D.wrap.current){var j=D.props;j.scriptUrl,j.className,j.style;var X=j.defaultQuery,q=j.autoClose;j.errorMessage;var K=j.onComplete,Y=j.onClose,De=j.onResize,ue=j.onSearch,Se=u(j,o),se=new U(l(l({},Se),{},{oncomplete:function(He){K&&K(He),q&&D.wrap.current&&D.wrap.current.remove()},onsearch:ue,onresize:De,onclose:Y,width:"100%",height:"100%"}));se.embed(D.wrap.current,{q:X,autoClose:q})}}),P(w(D),"onError",function(U){console.error(U),D.setState({hasError:!0})}),D}h(C,E);var _=g(C);return p(C,[{key:"componentDidMount",value:function(){var N=this.initiate,A=this.onError,$=this.props.scriptUrl;$&&(this.mounted||((0,t.default)($).then(N).catch(A),this.mounted=!0))}},{key:"render",value:function(){var N=this.props,A=N.className,$=N.style,U=N.errorMessage,j=this.state.hasError;return e.default.createElement("div",{ref:this.wrap,className:A,style:l(l({},S),$)},j&&U)}}]),C}(e.Component);P(I,"defaultProps",O);var W=I;n.default=W}(sl);var ll={};(function(n){function r(h){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},r(h)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=d,t=i(jr),o=["defaultQuery","left","top","popupKey","popupTitle","autoClose","onComplete","onResize","onClose","onSearch","onError"];function a(h){if(typeof WeakMap!="function")return null;var v=new WeakMap,g=new WeakMap;return(a=function(b){return b?g:v})(h)}function i(h,v){if(h&&h.__esModule)return h;if(h===null||r(h)!=="object"&&typeof h!="function")return{default:h};var g=a(v);if(g&&g.has(h))return g.get(h);var b={},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in h)if(x!="default"&&Object.prototype.hasOwnProperty.call(h,x)){var k=w?Object.getOwnPropertyDescriptor(h,x):null;k&&(k.get||k.set)?Object.defineProperty(b,x,k):b[x]=h[x]}return b.default=h,g&&g.set(h,b),b}function s(h,v){var g=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);v&&(b=b.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),g.push.apply(g,b)}return g}function l(h){for(var v,g=1;g<arguments.length;g++)v=arguments[g]==null?{}:arguments[g],g%2?s(Object(v),!0).forEach(function(b){u(h,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(v)):s(Object(v)).forEach(function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(v,b))});return h}function u(h,v,g){return v in h?Object.defineProperty(h,v,{value:g,enumerable:!0,configurable:!0,writable:!0}):h[v]=g,h}function c(h,v){if(h==null)return{};var g,b,w=f(h,v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(h);for(b=0;b<x.length;b++)g=x[b],0<=v.indexOf(g)||Object.prototype.propertyIsEnumerable.call(h,g)&&(w[g]=h[g])}return w}function f(h,v){if(h==null)return{};var g,b,w={},x=Object.keys(h);for(b=0;b<x.length;b++)g=x[b],0<=v.indexOf(g)||(w[g]=h[g]);return w}function m(){var h=0<arguments.length&&arguments[0]!==void 0?arguments[0]:t.postcodeScriptUrl;(0,e.useEffect)(function(){(0,t.default)(h)},[h]);var v=(0,e.useCallback)(function(g){var b=l({},g),w=b.defaultQuery,x=b.left,k=b.top,P=b.popupKey,M=b.popupTitle,S=b.autoClose,O=b.onComplete,I=b.onResize,W=b.onClose,E=b.onSearch,C=b.onError,_=c(b,o);return(0,t.default)(h).then(function(D){var N=new D(l(l({},_),{},{oncomplete:O,onsearch:E,onresize:I,onclose:W}));N.open({q:w,left:x,top:k,popupTitle:M,popupKey:P,autoClose:S})}).catch(C)},[h]);return v}var p=m;n.default=p})(ll),function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"DaumPostcodeEmbed",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"useDaumPostcodePopup",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"loadPostcode",{enumerable:!0,get:function(){return t.default}}),n.default=void 0;var r=o(sl),e=o(ll),t=o(jr);function o(i){return i&&i.__esModule?i:{default:i}}var a=r.default;n.default=a}(il);const Eh=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.useState(!1),l=f=>{let m=f.address,p="";f.addressType==="R"&&(f.bname!==""&&(p+=f.bname),f.buildingName!==""&&(p+=p!==""?`, ${f.buildingName}`:f.buildingName),m+=p!==""?` (${p})`:""),e(m),o&&o(f.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:T.jsx("p",{className:"text-[#C5C8CD]",children:"주소를 입력해주세요."});return T.jsxs(T.Fragment,{children:[T.jsx(Ch,{isOpen:i,setIsOpen:s,handleComplete:l}),T.jsxs("div",{className:"text-deepGray",children:[T.jsx("label",{htmlFor:n,className:"text-sm font-bold text-lightBlack",children:n}),T.jsxs("div",{className:"relative flex flex-col",children:[T.jsx("div",{className:`mt-4 h-[60px] w-full overflow-hidden whitespace-nowrap rounded-xl bg-[#F8F8F9] p-4 text-base placeholder:text-[#C5C8CD] focus:outline-none ${a&&"opacity-50"}`,onClick:u,children:c()}),T.jsx("input",{disabled:!r.front||a,value:r.back,type:"text",name:n,id:n,placeholder:"상세 주소를 입력해주세요.",className:"mt-4 h-[60px] w-full rounded-xl bg-[#F8F8F9] p-4 text-base placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",autoComplete:"off",onChange:f=>t(f.target.value)})]})]})]})},Ch=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return T.jsxs(Gn,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:[T.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":"true"}),T.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:T.jsx(Gn.Panel,{children:T.jsxs("div",{children:[T.jsx("div",{className:"flex h-[36px] w-[90vw] flex-row-reverse items-center bg-[#F0F1F2]",children:T.jsx(oi,{size:20,className:"mr-2",onClick:()=>e(!1)})}),T.jsx(il.DaumPostcodeEmbed,{onComplete:t,style:{width:"90vw",height:"65vh",minHeight:"450px",borderRadius:"100px"}})]})})})]})},kh=n=>{const{isOpen:r,setIsOpen:e}=n;return T.jsx(Gs,{show:r,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:T.jsxs(Gn,{onClose:()=>e(!1),className:"relative z-50 focus:outline-none",children:[T.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),T.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:T.jsxs(Js,{className:"flex w-[260px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]",children:[T.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.title&&T.jsx(Zs,{className:"whitespace-pre-wrap text-[18px] font-bold leading-[26px] text-[#2C2F34]",children:n.title}),n.image&&T.jsx("img",{src:n.image.url,alt:n.image.alt}),n.description&&n.description!==""&&T.jsx(Si,{className:"break-all text-[16px] leading-[24px] text-[#585E67]",children:n.description})]}),T.jsxs("div",{className:"flex flex-col gap-[4px]",children:[T.jsx("button",{className:"w-full rounded-[12px] bg-[#FF592C] px-[12px] py-[14px] text-[14px] font-bold leading-[22px] text-white",onClick:n.confirm.onClick,children:n.confirm.text}),n.cancel&&T.jsx("button",{onClick:()=>e(!1),className:"w-full rounded-[12px] bg-[#F0F1F2] px-[12px] py-[14px] text-[14px] font-bold leading-[22px] text-[#585E67]",children:n.cancel.text})]})]})})]})})};function Sh(n){return Tn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(n)}function _h(n){return Tn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"},child:[]}]})(n)}const Oh=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return T.jsxs("div",{className:"my-2.5 flex w-full cursor-pointer flex-col justify-center rounded-xl px-4 pt-8 shadow-[0_2px_8px_0_rgba(0,0,0,0.08)] md:rounded-2xl md:pt-10",onClick:()=>a(i=>!i),children:[T.jsxs("div",{className:"flex w-full items-center justify-between px-2 pb-8 transition-all duration-300 md:px-4 md:pb-10",children:[T.jsxs("p",{className:ur("mr-4 text-lg font-medium md:text-xl",e),children:[T.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?T.jsx(_h,{className:"min-w-6 text-petnowOrange",size:24}):T.jsx(Sh,{className:"min-w-6 text-petnowOrange",size:24})]}),T.jsx("p",{className:ur(`w-full overflow-hidden whitespace-pre-wrap px-2 text-base leading-6 text-[#8B919A] transition-all duration-300 md:px-4 md:text-lg ${o?"max-h-[24rem] pb-8 sm:max-h-60 md:pb-10":"max-h-0"}`,t),children:r})]})};function Ph(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,fa(n,r)}function fa(n,r){return fa=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t},fa(n,r)}function Mh(n,r){if(n==null)return{};var e={},t=Object.keys(n),o,a;for(a=0;a<t.length;a++)o=t[a],!(r.indexOf(o)>=0)&&(e[o]=n[o]);return e}function ul(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Th(n,r,e){return n===r?!0:n.correspondingElement?n.correspondingElement.classList.contains(e):n.classList.contains(e)}function Nh(n,r,e){if(n===r)return!0;for(;n.parentNode||n.host;){if(n.parentNode&&Th(n,r,e))return!0;n=n.parentNode||n.host}return n}function Ih(n){return document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY}var Fh=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var r=!1,e=Object.defineProperty({},"passive",{get:function(){r=!0}}),t=function(){};return window.addEventListener("testPassiveEventSupport",t,e),window.removeEventListener("testPassiveEventSupport",t,e),r}};function Lh(n){return n===void 0&&(n=0),function(){return++n}}var Ah=Lh(),pa,Wr={},ha={},$h=["touchstart","touchmove"],Yh="ignore-react-onclickoutside";function cl(n,r){var e={},t=$h.indexOf(r)!==-1;return t&&pa&&(e.passive=!n.props.preventDefault),e}function Hr(n,r){var e,t,o=n.displayName||n.name||"Component";return t=e=function(a){Ph(i,a);function i(l){var u;return u=a.call(this,l)||this,u.__outsideClickHandler=function(c){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(c);return}var f=u.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(c);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(c);return}throw new Error("WrappedComponent: "+o+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var c=u.getInstance();return typeof c.setClickOutsideRef=="function"?c.setClickOutsideRef():xe.findDOMNode(c)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||ha[u._uid])){typeof pa>"u"&&(pa=Fh()),ha[u._uid]=!0;var c=u.props.eventTypes;c.forEach||(c=[c]),Wr[u._uid]=function(f){if(u.componentNode!==null&&!(u.initTimeStamp>f.timeStamp)&&(u.props.preventDefault&&f.preventDefault(),u.props.stopPropagation&&f.stopPropagation(),!(u.props.excludeScrollbar&&Ih(f)))){var m=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;Nh(m,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(f)}},c.forEach(function(f){document.addEventListener(f,Wr[u._uid],cl(ul(u),f))})}},u.disableOnClickOutside=function(){delete ha[u._uid];var c=Wr[u._uid];if(c&&typeof document<"u"){var f=u.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(m){return document.removeEventListener(m,c,cl(ul(u),m))}),delete Wr[u._uid]}},u.getRef=function(c){return u.instanceRef=c},u._uid=Ah(),u.initTimeStamp=performance.now(),u}var s=i.prototype;return s.getInstance=function(){if(n.prototype&&!n.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},s.componentDidMount=function(){typeof document>"u"||!document.createElement||(this.getInstance(),this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside())},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var u=this.props;u.excludeScrollbar;var c=Mh(u,["excludeScrollbar"]);return n.prototype&&n.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,d.createElement(n,c)},i}(d.Component),e.displayName="OnClickOutside("+o+")",e.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:!1,outsideClickIgnoreClass:Yh,preventDefault:!1,stopPropagation:!1},e.getClass=function(){return n.getClass?n.getClass():n},t}function z(n){const r=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&r==="[object Date]"?new n.constructor(+n):typeof n=="number"||r==="[object Number]"||typeof n=="string"||r==="[object String]"?new Date(n):new Date(NaN)}function de(n,r){return n instanceof Date?new n.constructor(r):new Date(r)}function It(n,r){const e=z(n);return isNaN(r)?de(n,NaN):(r&&e.setDate(e.getDate()+r),e)}function ma(n,r){const e=+z(n);return de(n,e+r)}const dl=6048e5,jh=864e5,Rr=6e4,Br=36e5,Wh=1e3;function Hh(n,r){return ma(n,r*Br)}function va(n,r){return ma(n,r*Rr)}function et(n,r){const e=z(n);if(isNaN(r))return de(n,NaN);if(!r)return e;const t=e.getDate(),o=de(n,e.getTime());o.setMonth(e.getMonth()+r+1,0);const a=o.getDate();return t>=a?o:(e.setFullYear(o.getFullYear(),o.getMonth(),t),e)}function ga(n,r){const e=r*3;return et(n,e)}function Rh(n,r){return ma(n,r*1e3)}function Vr(n,r){const e=r*7;return It(n,e)}function yt(n,r){return et(n,r*12)}function Gt(n){const r=z(n);return r.setHours(0,0,0,0),r}function zr(n){const r=z(n),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+n-+e}function Jn(n,r){const e=Gt(n),t=Gt(r),o=+e-zr(e),a=+t-zr(t);return Math.round((o-a)/jh)}function Qr(n,r){const e=z(n),t=z(r),o=e.getFullYear()-t.getFullYear(),a=e.getMonth()-t.getMonth();return o*12+a}function Xt(n){const r=z(n);return Math.trunc(r.getMonth()/3)+1}function Ur(n,r){const e=z(n),t=z(r),o=e.getFullYear()-t.getFullYear(),a=Xt(e)-Xt(t);return o*4+a}function Kr(n,r){const e=z(n),t=z(r);return e.getFullYear()-t.getFullYear()}function fl(n){const r=z(n);return r.setHours(23,59,59,999),r}function Bh(n){const r=z(n),e=r.getMonth();return r.setFullYear(r.getFullYear(),e+1,0),r.setHours(23,59,59,999),r}let Vh={};function Jt(){return Vh}function zh(n,r){var s,l;const e=Jt(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=z(n),a=o.getDay(),i=(a<t?-7:0)+6-(a-t);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function pl(n){const r=z(n),e=r.getFullYear();return r.setFullYear(e+1,0,0),r.setHours(23,59,59,999),r}const Qh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Uh=(n,r,e)=>{let t;const o=Qh[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+t:t+" ago":t};function gn(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Kh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xh={date:gn({formats:Kh,defaultWidth:"full"}),time:gn({formats:qh,defaultWidth:"full"}),dateTime:gn({formats:Gh,defaultWidth:"full"})},Jh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Zh=(n,r,e,t)=>Jh[n];function ot(n){return(r,e)=>{const t=e!=null&&e.context?String(e.context):"standalone";let o;if(t==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):i;o=n.formattingValues[s]||n.formattingValues[i]}else{const i=n.defaultWidth,s=e!=null&&e.width?String(e.width):n.defaultWidth;o=n.values[s]||n.values[i]}const a=n.argumentCallback?n.argumentCallback(r):r;return o[a]}}const em={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tm={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nm={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rm={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},om={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},am={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},im={ordinalNumber:(n,r)=>{const e=Number(n),t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:ot({values:em,defaultWidth:"wide"}),quarter:ot({values:tm,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ot({values:nm,defaultWidth:"wide"}),day:ot({values:rm,defaultWidth:"wide"}),dayPeriod:ot({values:om,defaultWidth:"wide",formattingValues:am,defaultFormattingWidth:"wide"})};function at(n){return(r,e={})=>{const t=e.width,o=t&&n.matchPatterns[t]||n.matchPatterns[n.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=t&&n.parsePatterns[t]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?lm(s,f=>f.test(i)):sm(s,f=>f.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=r.slice(i.length);return{value:u,rest:c}}}function sm(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function lm(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function hl(n){return(r,e={})=>{const t=r.match(n.matchPattern);if(!t)return null;const o=t[0],a=r.match(n.parsePattern);if(!a)return null;let i=n.valueCallback?n.valueCallback(a[0]):a[0];i=e.valueCallback?e.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const um=/^(\d+)(th|st|nd|rd)?/i,cm=/\d+/i,dm={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fm={any:[/^b/i,/^(a|c)/i]},pm={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hm={any:[/1/i,/2/i,/3/i,/4/i]},mm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},bm={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ym={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wm={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xm={ordinalNumber:hl({matchPattern:um,parsePattern:cm,valueCallback:n=>parseInt(n,10)}),era:at({matchPatterns:dm,defaultMatchWidth:"wide",parsePatterns:fm,defaultParseWidth:"any"}),quarter:at({matchPatterns:pm,defaultMatchWidth:"wide",parsePatterns:hm,defaultParseWidth:"any",valueCallback:n=>n+1}),month:at({matchPatterns:mm,defaultMatchWidth:"wide",parsePatterns:vm,defaultParseWidth:"any"}),day:at({matchPatterns:gm,defaultMatchWidth:"wide",parsePatterns:bm,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:ym,defaultMatchWidth:"any",parsePatterns:wm,defaultParseWidth:"any"})},ml={code:"en-US",formatDistance:Uh,formatLong:Xh,formatRelative:Zh,localize:im,match:xm,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qr(n){const r=z(n),e=de(n,0);return e.setFullYear(r.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Dm(n){const r=z(n);return Jn(r,qr(r))+1}function wt(n,r){var s,l,u,c;const e=Jt(),t=(r==null?void 0:r.weekStartsOn)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=z(n),a=o.getDay(),i=(a<t?7:0)+a-t;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function bn(n){return wt(n,{weekStartsOn:1})}function vl(n){const r=z(n),e=r.getFullYear(),t=de(n,0);t.setFullYear(e+1,0,4),t.setHours(0,0,0,0);const o=bn(t),a=de(n,0);a.setFullYear(e,0,4),a.setHours(0,0,0,0);const i=bn(a);return r.getTime()>=o.getTime()?e+1:r.getTime()>=i.getTime()?e:e-1}function Em(n){const r=vl(n),e=de(n,0);return e.setFullYear(r,0,4),e.setHours(0,0,0,0),bn(e)}function ba(n){const r=z(n),e=+bn(r)-+Em(r);return Math.round(e/dl)+1}function ya(n,r){var c,f,m,p;const e=z(n),t=e.getFullYear(),o=Jt(),a=(r==null?void 0:r.firstWeekContainsDate)??((f=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(m=o.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,i=de(n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=wt(i,r),l=de(n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=wt(l,r);return e.getTime()>=s.getTime()?t+1:e.getTime()>=u.getTime()?t:t-1}function Cm(n,r){var s,l,u,c;const e=Jt(),t=(r==null?void 0:r.firstWeekContainsDate)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=ya(n,r),a=de(n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),wt(a,r)}function gl(n,r){const e=z(n),t=+wt(e,r)-+Cm(e,r);return Math.round(t/dl)+1}function fe(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const Ft={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return fe(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):fe(e+1,2)},d(n,r){return fe(n.getDate(),r.length)},a(n,r){const e=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,r){return fe(n.getHours()%12||12,r.length)},H(n,r){return fe(n.getHours(),r.length)},m(n,r){return fe(n.getMinutes(),r.length)},s(n,r){return fe(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return fe(o,r.length)}},yn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bl={G:function(n,r,e){const t=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(t,{width:"abbreviated"});case"GGGGG":return e.era(t,{width:"narrow"});case"GGGG":default:return e.era(t,{width:"wide"})}},y:function(n,r,e){if(r==="yo"){const t=n.getFullYear(),o=t>0?t:1-t;return e.ordinalNumber(o,{unit:"year"})}return Ft.y(n,r)},Y:function(n,r,e,t){const o=ya(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return fe(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):fe(a,r.length)},R:function(n,r){const e=vl(n);return fe(e,r.length)},u:function(n,r){const e=n.getFullYear();return fe(e,r.length)},Q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(t);case"QQ":return fe(t,2);case"Qo":return e.ordinalNumber(t,{unit:"quarter"});case"QQQ":return e.quarter(t,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(t,{width:"wide",context:"formatting"})}},q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(t);case"qq":return fe(t,2);case"qo":return e.ordinalNumber(t,{unit:"quarter"});case"qqq":return e.quarter(t,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(t,{width:"wide",context:"standalone"})}},M:function(n,r,e){const t=n.getMonth();switch(r){case"M":case"MM":return Ft.M(n,r);case"Mo":return e.ordinalNumber(t+1,{unit:"month"});case"MMM":return e.month(t,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(t,{width:"wide",context:"formatting"})}},L:function(n,r,e){const t=n.getMonth();switch(r){case"L":return String(t+1);case"LL":return fe(t+1,2);case"Lo":return e.ordinalNumber(t+1,{unit:"month"});case"LLL":return e.month(t,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(t,{width:"wide",context:"standalone"})}},w:function(n,r,e,t){const o=gl(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):fe(o,r.length)},I:function(n,r,e){const t=ba(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):fe(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Ft.d(n,r)},D:function(n,r,e){const t=Dm(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):fe(t,r.length)},E:function(n,r,e){const t=n.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(t,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(t,{width:"short",context:"formatting"});case"EEEE":default:return e.day(t,{width:"wide",context:"formatting"})}},e:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return fe(a,2);case"eo":return e.ordinalNumber(a,{unit:"day"});case"eee":return e.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(o,{width:"short",context:"formatting"});case"eeee":default:return e.day(o,{width:"wide",context:"formatting"})}},c:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return fe(a,r.length);case"co":return e.ordinalNumber(a,{unit:"day"});case"ccc":return e.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(o,{width:"narrow",context:"standalone"});case"cccccc":return e.day(o,{width:"short",context:"standalone"});case"cccc":default:return e.day(o,{width:"wide",context:"standalone"})}},i:function(n,r,e){const t=n.getDay(),o=t===0?7:t;switch(r){case"i":return String(o);case"ii":return fe(o,r.length);case"io":return e.ordinalNumber(o,{unit:"day"});case"iii":return e.day(t,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(t,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(t,{width:"short",context:"formatting"});case"iiii":default:return e.day(t,{width:"wide",context:"formatting"})}},a:function(n,r,e){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,r,e){const t=n.getHours();let o;switch(t===12?o=yn.noon:t===0?o=yn.midnight:o=t/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,r,e){const t=n.getHours();let o;switch(t>=17?o=yn.evening:t>=12?o=yn.afternoon:t>=4?o=yn.morning:o=yn.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,r,e){if(r==="ho"){let t=n.getHours()%12;return t===0&&(t=12),e.ordinalNumber(t,{unit:"hour"})}return Ft.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Ft.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):fe(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):fe(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ft.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Ft.s(n,r)},S:function(n,r){return Ft.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return wl(t);case"XXXX":case"XX":return Zt(t);case"XXXXX":case"XXX":default:return Zt(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return wl(t);case"xxxx":case"xx":return Zt(t);case"xxxxx":case"xxx":default:return Zt(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yl(t,":");case"OOOO":default:return"GMT"+Zt(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yl(t,":");case"zzzz":default:return"GMT"+Zt(t,":")}},t:function(n,r,e){const t=Math.trunc(n.getTime()/1e3);return fe(t,r.length)},T:function(n,r,e){const t=n.getTime();return fe(t,r.length)}};function yl(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Math.trunc(t/60),a=t%60;return a===0?e+String(o):e+String(o)+r+fe(a,2)}function wl(n,r){return n%60===0?(n>0?"-":"+")+fe(Math.abs(n)/60,2):Zt(n,r)}function Zt(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=fe(Math.trunc(t/60),2),a=fe(t%60,2);return e+o+r+a}const xl=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Dl=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Gr={p:Dl,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return xl(n,r);let a;switch(t){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",xl(t,r)).replace("{{time}}",Dl(o,r))}},km=/^D+$/,Sm=/^Y+$/,_m=["D","DD","YY","YYYY"];function El(n){return km.test(n)}function Cl(n){return Sm.test(n)}function wa(n,r,e){const t=Om(n,r,e);if(console.warn(t),_m.includes(n))throw new RangeError(t)}function Om(n,r,e){const t=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${t} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function xt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Xr(n){if(!xt(n)&&typeof n!="number")return!1;const r=z(n);return!isNaN(Number(r))}const Pm=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mm=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tm=/^'([^]*?)'?$/,Nm=/''/g,Im=/[a-zA-Z]/;function kl(n,r,e){var c,f,m,p,h,v,g,b;const t=Jt(),o=(e==null?void 0:e.locale)??t.locale??ml,a=(e==null?void 0:e.firstWeekContainsDate)??((f=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(m=t.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((v=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:v.weekStartsOn)??t.weekStartsOn??((b=(g=t.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,s=z(n);if(!Xr(s))throw new RangeError("Invalid time value");let l=r.match(Mm).map(w=>{const x=w[0];if(x==="p"||x==="P"){const k=Gr[x];return k(w,o.formatLong)}return w}).join("").match(Pm).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:Fm(w)};if(bl[x])return{isToken:!0,value:w};if(x.match(Im))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Cl(x)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&El(x))&&wa(x,r,String(n));const k=bl[x[0]];return k(s,x,o.localize,u)}).join("")}function Fm(n){const r=n.match(Tm);return r?r[1].replace(Nm,"'"):n}function Sl(n){return z(n).getDate()}function Lm(n){return z(n).getDay()}function it(n){return z(n).getHours()}function st(n){return z(n).getMinutes()}function je(n){return z(n).getMonth()}function Dt(n){return z(n).getSeconds()}function xa(n){return z(n).getTime()}function Z(n){return z(n).getFullYear()}function Lt(n,r){const e=z(n),t=z(r);return e.getTime()>t.getTime()}function en(n,r){const e=z(n),t=z(r);return+e<+t}function Am(n,r){const e=z(n),t=z(r);return+e==+t}function $m(n,r){const e=Gt(n),t=Gt(r);return+e==+t}function Ym(n,r){const e=z(n),t=z(r);return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function Da(n){const r=z(n),e=r.getMonth(),t=e-e%3;return r.setMonth(t,1),r.setHours(0,0,0,0),r}function jm(n,r){const e=Da(n),t=Da(r);return+e==+t}function Wm(n,r){const e=z(n),t=z(r);return e.getFullYear()===t.getFullYear()}function Zn(n,r){const e=+z(n),[t,o]=[+z(r.start),+z(r.end)].sort((a,i)=>a-i);return e>=t&&e<=o}function _l(n){let r;return n.forEach(function(e){const t=z(e);(r===void 0||r<t||isNaN(Number(t)))&&(r=t)}),r||new Date(NaN)}function Ol(n){let r;return n.forEach(e=>{const t=z(e);(!r||r>t||isNaN(+t))&&(r=t)}),r||new Date(NaN)}function Hm(){return Object.assign({},Jt())}function Rm(n,r){const e=r instanceof Date?de(r,0):new r(0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}const Bm=10;class Pl{constructor(){V(this,"subPriority",0)}validate(r,e){return!0}}class Vm extends Pl{constructor(r,e,t,o,a){super(),this.value=r,this.validateValue=e,this.setValue=t,this.priority=o,a&&(this.subPriority=a)}validate(r,e){return this.validateValue(r,this.value,e)}set(r,e,t){return this.setValue(r,e,this.value,t)}}class zm extends Pl{constructor(){super(...arguments);V(this,"priority",Bm);V(this,"subPriority",-1)}set(e,t){return t.timestampIsSet?e:de(e,Rm(e,Date))}}class le{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new Vm(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class Qm extends le{constructor(){super(...arguments);V(this,"priority",140);V(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,o){switch(t){case"G":case"GG":case"GGG":return o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"});case"GGGGG":return o.era(e,{width:"narrow"});case"GGGG":default:return o.era(e,{width:"wide"})||o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"})}}set(e,t,o){return t.era=o,e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}const Pe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},lt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Me(n,r){return n&&{value:r(n.value),rest:n.rest}}function ke(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function ut(n,r){const e=r.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:r.slice(1)};const t=e[1]==="+"?1:-1,o=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,i=e[5]?parseInt(e[5],10):0;return{value:t*(o*Br+a*Rr+i*Wh),rest:r.slice(e[0].length)}}function Ml(n){return ke(Pe.anyDigitsSigned,n)}function _e(n,r){switch(n){case 1:return ke(Pe.singleDigit,r);case 2:return ke(Pe.twoDigits,r);case 3:return ke(Pe.threeDigits,r);case 4:return ke(Pe.fourDigits,r);default:return ke(new RegExp("^\\d{1,"+n+"}"),r)}}function Jr(n,r){switch(n){case 1:return ke(Pe.singleDigitSigned,r);case 2:return ke(Pe.twoDigitsSigned,r);case 3:return ke(Pe.threeDigitsSigned,r);case 4:return ke(Pe.fourDigitsSigned,r);default:return ke(new RegExp("^-?\\d{1,"+n+"}"),r)}}function Ea(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Tl(n,r){const e=r>0,t=e?r:1-r;let o;if(t<=50)o=n||100;else{const a=t+50,i=Math.trunc(a/100)*100,s=n>=a%100;o=n+i-(s?100:0)}return e?o:1-o}function Nl(n){return n%400===0||n%4===0&&n%100!==0}class Um extends le{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return Me(_e(4,e),a);case"yo":return Me(o.ordinalNumber(e,{unit:"year"}),a);default:return Me(_e(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o){const a=e.getFullYear();if(o.isTwoDigitYear){const s=Tl(o.year,a);return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class Km extends le{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return Me(_e(4,e),a);case"Yo":return Me(o.ordinalNumber(e,{unit:"year"}),a);default:return Me(_e(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=ya(e,a);if(o.isTwoDigitYear){const l=Tl(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),wt(e,a)}const s=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(s,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),wt(e,a)}}class qm extends le{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Jr(t==="R"?4:t.length,e)}set(e,t,o){const a=de(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),bn(a)}}class Gm extends le{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Jr(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Xm extends le{constructor(){super(...arguments);V(this,"priority",120);V(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"Q":case"QQ":return _e(t.length,e);case"Qo":return o.ordinalNumber(e,{unit:"quarter"});case"QQQ":return o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(e,{width:"wide",context:"formatting"})||o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Jm extends le{constructor(){super(...arguments);V(this,"priority",120);V(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"q":case"qq":return _e(t.length,e);case"qo":return o.ordinalNumber(e,{unit:"quarter"});case"qqq":return o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(e,{width:"wide",context:"standalone"})||o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Zm extends le{constructor(){super(...arguments);V(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);V(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return Me(ke(Pe.month,e),a);case"MM":return Me(_e(2,e),a);case"Mo":return Me(o.ordinalNumber(e,{unit:"month"}),a);case"MMM":return o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(e,{width:"wide",context:"formatting"})||o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}class ev extends le{constructor(){super(...arguments);V(this,"priority",110);V(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,o){const a=i=>i-1;switch(t){case"L":return Me(ke(Pe.month,e),a);case"LL":return Me(_e(2,e),a);case"Lo":return Me(o.ordinalNumber(e,{unit:"month"}),a);case"LLL":return o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(e,{width:"wide",context:"standalone"})||o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}function tv(n,r,e){const t=z(n),o=gl(t,e)-r;return t.setDate(t.getDate()-o*7),t}class nv extends le{constructor(){super(...arguments);V(this,"priority",100);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return ke(Pe.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return _e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return wt(tv(e,o,a),a)}}function rv(n,r){const e=z(n),t=ba(e)-r;return e.setDate(e.getDate()-t*7),e}class ov extends le{constructor(){super(...arguments);V(this,"priority",100);V(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,o){switch(t){case"I":return ke(Pe.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return _e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return bn(rv(e,o))}}const av=[31,28,31,30,31,30,31,31,30,31,30,31],iv=[31,29,31,30,31,30,31,31,30,31,30,31];class sv extends le{constructor(){super(...arguments);V(this,"priority",90);V(this,"subPriority",1);V(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return ke(Pe.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return _e(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=Nl(o),i=e.getMonth();return a?t>=1&&t<=iv[i]:t>=1&&t<=av[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class lv extends le{constructor(){super(...arguments);V(this,"priority",90);V(this,"subpriority",1);V(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,o){switch(t){case"D":case"DD":return ke(Pe.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return _e(t.length,e)}}validate(e,t){const o=e.getFullYear();return Nl(o)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,o){return e.setMonth(0,o),e.setHours(0,0,0,0),e}}function Ca(n,r,e){var f,m,p,h;const t=Jt(),o=(e==null?void 0:e.weekStartsOn)??((m=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??t.weekStartsOn??((h=(p=t.locale)==null?void 0:p.options)==null?void 0:h.weekStartsOn)??0,a=z(n),i=a.getDay(),l=(r%7+7)%7,u=7-o,c=r<0||r>6?r-(i+u)%7:(l+u)%7-(i+u)%7;return It(a,c)}class uv extends le{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"E":case"EE":case"EEE":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Ca(e,o,a),e.setHours(0,0,0,0),e}}class cv extends le{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"e":case"ee":return Me(_e(t.length,e),i);case"eo":return Me(o.ordinalNumber(e,{unit:"day"}),i);case"eee":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeeee":return o.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Ca(e,o,a),e.setHours(0,0,0,0),e}}class dv extends le{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"c":case"cc":return Me(_e(t.length,e),i);case"co":return Me(o.ordinalNumber(e,{unit:"day"}),i);case"ccc":return o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"ccccc":return o.day(e,{width:"narrow",context:"standalone"});case"cccccc":return o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(e,{width:"wide",context:"standalone"})||o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Ca(e,o,a),e.setHours(0,0,0,0),e}}function fv(n){let e=z(n).getDay();return e===0&&(e=7),e}function pv(n,r){const e=z(n),t=fv(e),o=r-t;return It(e,o)}class hv extends le{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,o){const a=i=>i===0?7:i;switch(t){case"i":case"ii":return _e(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Me(o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return Me(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Me(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Me(o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,o){return e=pv(e,o),e.setHours(0,0,0,0),e}}class mv extends le{constructor(){super(...arguments);V(this,"priority",80);V(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,o){switch(t){case"a":case"aa":case"aaa":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Ea(o),0,0,0),e}}class vv extends le{constructor(){super(...arguments);V(this,"priority",80);V(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,o){switch(t){case"b":case"bb":case"bbb":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Ea(o),0,0,0),e}}class gv extends le{constructor(){super(...arguments);V(this,"priority",80);V(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,o){switch(t){case"B":case"BB":case"BBB":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Ea(o),0,0,0),e}}class bv extends le{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return ke(Pe.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return _e(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,o){const a=e.getHours()>=12;return a&&o<12?e.setHours(o+12,0,0,0):!a&&o===12?e.setHours(0,0,0,0):e.setHours(o,0,0,0),e}}class yv extends le{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return ke(Pe.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return _e(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class wv extends le{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return ke(Pe.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return _e(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.getHours()>=12&&o<12?e.setHours(o+12,0,0,0):e.setHours(o,0,0,0),e}}class xv extends le{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return ke(Pe.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return _e(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,o){const a=o<=24?o%24:o;return e.setHours(a,0,0,0),e}}class Dv extends le{constructor(){super(...arguments);V(this,"priority",60);V(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return ke(Pe.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return _e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class Ev extends le{constructor(){super(...arguments);V(this,"priority",50);V(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return ke(Pe.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return _e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class Cv extends le{constructor(){super(...arguments);V(this,"priority",30);V(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return Me(_e(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class kv extends le{constructor(){super(...arguments);V(this,"priority",10);V(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return ut(lt.basicOptionalMinutes,e);case"XX":return ut(lt.basic,e);case"XXXX":return ut(lt.basicOptionalSeconds,e);case"XXXXX":return ut(lt.extendedOptionalSeconds,e);case"XXX":default:return ut(lt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:de(e,e.getTime()-zr(e)-o)}}class Sv extends le{constructor(){super(...arguments);V(this,"priority",10);V(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return ut(lt.basicOptionalMinutes,e);case"xx":return ut(lt.basic,e);case"xxxx":return ut(lt.basicOptionalSeconds,e);case"xxxxx":return ut(lt.extendedOptionalSeconds,e);case"xxx":default:return ut(lt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:de(e,e.getTime()-zr(e)-o)}}class _v extends le{constructor(){super(...arguments);V(this,"priority",40);V(this,"incompatibleTokens","*")}parse(e){return Ml(e)}set(e,t,o){return[de(e,o*1e3),{timestampIsSet:!0}]}}class Ov extends le{constructor(){super(...arguments);V(this,"priority",20);V(this,"incompatibleTokens","*")}parse(e){return Ml(e)}set(e,t,o){return[de(e,o),{timestampIsSet:!0}]}}const Pv={G:new Qm,y:new Um,Y:new Km,R:new qm,u:new Gm,Q:new Xm,q:new Jm,M:new Zm,L:new ev,w:new nv,I:new ov,d:new sv,D:new lv,E:new uv,e:new cv,c:new dv,i:new hv,a:new mv,b:new vv,B:new gv,h:new bv,H:new yv,K:new wv,k:new xv,m:new Dv,s:new Ev,S:new Cv,X:new kv,x:new Sv,t:new _v,T:new Ov},Mv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nv=/^'([^]*?)'?$/,Iv=/''/g,Fv=/\S/,Lv=/[a-zA-Z]/;function ka(n,r,e,t){var v,g,b,w,x,k,P,M;const o=Hm(),a=(t==null?void 0:t.locale)??o.locale??ml,i=(t==null?void 0:t.firstWeekContainsDate)??((g=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:g.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(b=o.locale)==null?void 0:b.options)==null?void 0:w.firstWeekContainsDate)??1,s=(t==null?void 0:t.weekStartsOn)??((k=(x=t==null?void 0:t.locale)==null?void 0:x.options)==null?void 0:k.weekStartsOn)??o.weekStartsOn??((M=(P=o.locale)==null?void 0:P.options)==null?void 0:M.weekStartsOn)??0;if(r==="")return n===""?z(e):de(e,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:a},u=[new zm],c=r.match(Tv).map(S=>{const O=S[0];if(O in Gr){const I=Gr[O];return I(S,a.formatLong)}return S}).join("").match(Mv),f=[];for(let S of c){!(t!=null&&t.useAdditionalWeekYearTokens)&&Cl(S)&&wa(S,r,n),!(t!=null&&t.useAdditionalDayOfYearTokens)&&El(S)&&wa(S,r,n);const O=S[0],I=Pv[O];if(I){const{incompatibleTokens:W}=I;if(Array.isArray(W)){const C=f.find(_=>W.includes(_.token)||_.token===O);if(C)throw new RangeError(`The format string mustn't contain \`${C.fullToken}\` and \`${S}\` at the same time`)}else if(I.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);f.push({token:O,fullToken:S});const E=I.run(n,S,a.match,l);if(!E)return de(e,NaN);u.push(E.setter),n=E.rest}else{if(O.match(Lv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");if(S==="''"?S="'":O==="'"&&(S=Av(S)),n.indexOf(S)===0)n=n.slice(S.length);else return de(e,NaN)}}if(n.length>0&&Fv.test(n))return de(e,NaN);const m=u.map(S=>S.priority).sort((S,O)=>O-S).filter((S,O,I)=>I.indexOf(S)===O).map(S=>u.filter(O=>O.priority===S).sort((O,I)=>I.subPriority-O.subPriority)).map(S=>S[0]);let p=z(e);if(isNaN(p.getTime()))return de(e,NaN);const h={};for(const S of m){if(!S.validate(p,l))return de(e,NaN);const O=S.set(p,h,l);Array.isArray(O)?(p=O[0],Object.assign(h,O[1])):p=O}return de(e,p)}function Av(n){return n.match(Nv)[1].replace(Iv,"'")}function $v(n,r){const t=Hv(n);let o;if(t.date){const l=Rv(t.date,2);o=Bv(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const a=o.getTime();let i=0,s;if(t.time&&(i=Vv(t.time),isNaN(i)))return new Date(NaN);if(t.timezone){if(s=zv(t.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(a+i),u=new Date(0);return u.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),u.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),u}return new Date(a+i+s)}const Zr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Yv=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,jv=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Wv=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Hv(n){const r={},e=n.split(Zr.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],Zr.timeZoneDelimiter.test(r.date)&&(r.date=n.split(Zr.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=Zr.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function Rv(n,r){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),t=n.match(e);if(!t)return{year:NaN,restDateString:""};const o=t[1]?parseInt(t[1]):null,a=t[2]?parseInt(t[2]):null;return{year:a===null?o:a*100,restDateString:n.slice((t[1]||t[2]).length)}}function Bv(n,r){if(r===null)return new Date(NaN);const e=n.match(Yv);if(!e)return new Date(NaN);const t=!!e[4],o=er(e[1]),a=er(e[2])-1,i=er(e[3]),s=er(e[4]),l=er(e[5])-1;if(t)return Gv(r,s,l)?Qv(r,s,l):new Date(NaN);{const u=new Date(0);return!Kv(r,a,i)||!qv(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function er(n){return n?parseInt(n):1}function Vv(n){const r=n.match(jv);if(!r)return NaN;const e=Sa(r[1]),t=Sa(r[2]),o=Sa(r[3]);return Xv(e,t,o)?e*Br+t*Rr+o*1e3:NaN}function Sa(n){return n&&parseFloat(n.replace(",","."))||0}function zv(n){if(n==="Z")return 0;const r=n.match(Wv);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return Jv(t,o)?e*(t*Br+o*Rr):NaN}function Qv(n,r,e){const t=new Date(0);t.setUTCFullYear(n,0,4);const o=t.getUTCDay()||7,a=(r-1)*7+e+1-o;return t.setUTCDate(t.getUTCDate()+a),t}const Uv=[31,null,31,30,31,30,31,31,30,31,30,31];function Il(n){return n%400===0||n%4===0&&n%100!==0}function Kv(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(Uv[r]||(Il(n)?29:28))}function qv(n,r){return r>=1&&r<=(Il(n)?366:365)}function Gv(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function Xv(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function Jv(n,r){return r>=0&&r<=59}function Zv(n){const r=z(n),e=r.getFullYear(),t=r.getMonth(),o=de(n,0);return o.setFullYear(e,t+1,0),o.setHours(0,0,0,0),o.getDate()}function Ue(n,r){const e=z(n),t=e.getFullYear(),o=e.getDate(),a=de(n,0);a.setFullYear(t,r,15),a.setHours(0,0,0,0);const i=Zv(a);return e.setMonth(r,Math.min(o,i)),e}function eg(n,r){let e=z(n);return isNaN(+e)?de(n,NaN):(r.year!=null&&e.setFullYear(r.year),r.month!=null&&(e=Ue(e,r.month)),r.date!=null&&e.setDate(r.date),r.hours!=null&&e.setHours(r.hours),r.minutes!=null&&e.setMinutes(r.minutes),r.seconds!=null&&e.setSeconds(r.seconds),r.milliseconds!=null&&e.setMilliseconds(r.milliseconds),e)}function eo(n,r){const e=z(n);return e.setHours(r),e}function to(n,r){const e=z(n);return e.setMinutes(r),e}function wn(n,r){const e=z(n),t=Math.trunc(e.getMonth()/3)+1,o=r-t;return Ue(e,e.getMonth()+o*3)}function no(n,r){const e=z(n);return e.setSeconds(r),e}function ct(n,r){const e=z(n);return isNaN(+e)?de(n,NaN):(e.setFullYear(r),e)}function Fl(n){const r=z(n);return r.setDate(1),r.setHours(0,0,0,0),r}function tg(n,r){return It(n,-r)}function xn(n,r){return et(n,-r)}function Ll(n,r){return ga(n,-r)}function Al(n,r){return Vr(n,-r)}function Dn(n,r){return yt(n,-r)}/*!
|
|
38
|
-
react-datepicker v7.
|
|
36
|
+
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(l=t==null?void 0:t.onChange)==null||l.call(t,o),o}}function Io(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const rd=(n,r)=>Math.abs(n-r)<1,od=(n,r,t)=>{let e;return function(...o){n.clearTimeout(e),e=n.setTimeout(()=>r.apply(this,o),t)}},ad=n=>n,id=n=>{const r=Math.max(n.startIndex-n.overscan,0),t=Math.min(n.endIndex+n.overscan,n.count-1),e=[];for(let o=r;o<=t;o++)e.push(o);return e},sd=(n,r)=>{const t=n.scrollElement;if(!t)return;const e=n.targetWindow;if(!e)return;const o=i=>{const{width:s,height:l}=i;r({width:Math.round(s),height:Math.round(l)})};if(o(t.getBoundingClientRect()),!e.ResizeObserver)return()=>{};const a=new e.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const l=s.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Ii={passive:!0},ld=typeof window>"u"?!0:"onscrollend"in window,ud=(n,r)=>{const t=n.scrollElement;if(!t)return;const e=n.targetWindow;if(!e)return;let o=0;const a=ld?()=>{}:od(e,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=d=>()=>{o=t[n.options.horizontal?"scrollLeft":"scrollTop"],a(),r(o,d)},s=i(!0),l=i(!1);return l(),t.addEventListener("scroll",s,Ii),t.addEventListener("scrollend",l,Ii),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",l)}},cd=(n,r,t)=>{if(r!=null&&r.borderBoxSize){const e=r.borderBoxSize[0];if(e)return Math.round(e[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[t.options.horizontal?"width":"height"])},dd=(n,{adjustments:r=0,behavior:t},e)=>{var o,a;const i=n+r;(a=(o=e.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[e.options.horizontal?"left":"top"]:i,behavior:t})};class fd{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const e=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var o;return(o=e())==null?void 0:o.disconnect()},observe:o=>{var a;return(a=e())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=e())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([e,o])=>{typeof o>"u"&&delete t[e]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ad,rangeExtractor:id,onChange:()=>{},measureElement:cd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,e)=>{var o,a;const{startIndex:i,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(t||i!==(l==null?void 0:l.startIndex)||s!==(l==null?void 0:l.endIndex))&&((a=(o=this.options).onChange)==null||a.call(o,this,e))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.notify(!1,!1);return}this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const i=this.isScrolling;this.isScrolling=a,this.notify(i!==a,a)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,e)=>{const o=new Map,a=new Map;for(let i=e-1;i>=0;i--){const s=t[i];if(o.has(s.lane))continue;const l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.end<l.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=Yn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,e,o,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:e,scrollMargin:o,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=Yn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:e,scrollMargin:o,getItemKey:a,enabled:i},s)=>{var l;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,d);for(let p=d;p<t;p++){let h=(l=this.measurementsCache[p])==null?void 0:l.measureElement;h||(h=E=>{const P=a(p),M=this.elementsCache.get(P);if(!E){M&&(this.observer.unobserve(M),this.elementsCache.delete(P));return}M!==E&&(M&&this.observer.unobserve(M),this.observer.observe(E),this.elementsCache.set(P,E)),E.isConnected&&this.resizeItem(p,this.options.measureElement(E,void 0,this))});const f=a(p),m=this.options.lanes===1?u[p-1]:this.getFurthestMeasurement(u,p),v=m?m.end+this.options.gap:e+o,g=s.get(f),b=typeof g=="number"?g:this.options.estimateSize(p),w=v+b,x=m?m.lane:p%this.options.lanes;u[p]={index:p,start:v,size:b,end:w,key:f,lane:x,measureElement:h}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Yn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,e,o)=>this.range=t.length>0&&e>0?pd({measurements:t,outerSize:e,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Yn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,e,o,a)=>e===null?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:o,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,o=t.getAttribute(e);return o?parseInt(o,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const o=this.indexFromElement(t),a=this.getMeasurements()[o];if(!a||!t.isConnected){this.elementsCache.forEach((s,l)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(a.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(a.key,t)),this.resizeItem(o,this.options.measureElement(t,e,this))},this.resizeItem=(t,e)=>{const o=this.getMeasurements()[t];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=e-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,e)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=Yn(()=>[this.getIndexes(),this.getMeasurements()],(t,e)=>{const o=[];for(let a=0,i=t.length;a<i;a++){const s=t[a],l=e[s];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements();if(e.length!==0)return Io(e[Fi(0,e.length-1,o=>Io(e[o]).start,t)])},this.getOffsetForAlignment=(t,e)=>{const o=this.getSize(),a=this.getScrollOffset();e==="auto"&&(t<=a?e="start":t>=a+o?e="end":e="start"),e==="start"?t=t:e==="end"?t=t-o:e==="center"&&(t=t-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(e==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)e="end";else if(o.start<=i+this.options.scrollPaddingStart)e="start";else return[i,e];const s=e==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,e),e]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:e="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,e),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:e="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(t,e);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=Io(this.getOffsetForIndex(t,s));rd(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:e}={})=>{this.cancelScrollToIndex(),e==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var t;const e=this.getMeasurements();let o;return e.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=e[e.length-1])==null?void 0:t.end)??0:Math.max(...e.slice(-this.options.lanes).map(a=>a.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:e,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:e},this)},this.measure=()=>{var t,e;this.itemSizeCache=new Map,(e=(t=this.options).onChange)==null||e.call(t,this,!1)},this.setOptions(r)}}const Fi=(n,r,t,e)=>{for(;n<=r;){const o=(n+r)/2|0,a=t(o);if(a<e)n=o+1;else if(a>e)r=o-1;else return o}return n>0?n-1:0};function pd({measurements:n,outerSize:r,scrollOffset:t}){const e=n.length-1,a=Fi(0,e,s=>n[s].start,t);let i=a;for(;i<e&&n[i].end<t+r;)i++;return{startIndex:a,endIndex:i}}const md=typeof document<"u"?T.useLayoutEffect:T.useEffect;function hd(n){const r=T.useReducer(()=>({}),{})[1],t={...n,onChange:(o,a)=>{var i;a?Ee.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[e]=T.useState(()=>new fd(t));return e.setOptions(t),T.useEffect(()=>e._didMount(),[]),md(()=>e._willUpdate()),e}function vd(n){return hd({observeElementRect:sd,observeElementOffset:ud,scrollToFn:dd,...n})}function gd(n,r){return n!==null&&r!==null&&typeof n=="object"&&typeof r=="object"&&"id"in n&&"id"in r?n.id===r.id:n===r}function Li(n=gd){return c.useCallback((r,t)=>{if(typeof n=="string"){let e=n;return(r==null?void 0:r[e])===(t==null?void 0:t[e])}return n(r,t)},[n])}function bd(n){if(n===null)return{width:0,height:0};let{width:r,height:t}=n.getBoundingClientRect();return{width:r,height:t}}function Fo(n,r=!1){let[t,e]=c.useReducer(()=>({}),{}),o=c.useMemo(()=>bd(n),[n,t]);return ne(()=>{if(!n)return;let a=new ResizeObserver(e);return a.observe(n),()=>{a.disconnect()}},[n]),r?{width:`${o.width}px`,height:`${o.height}px`}:o}let yd=class extends Map{constructor(r){super(),this.factory=r}get(r){let t=super.get(r);return t===void 0&&(t=this.factory(r),this.set(r,t)),t}};function $i(n,r){let t=n(),e=new Set;return{getSnapshot(){return t},subscribe(o){return e.add(o),()=>e.delete(o)},dispatch(o,...a){let i=r[o].call(t,...a);i&&(t=i,e.forEach(s=>s()))}}}function Ai(n){return c.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}let wd=new yd(()=>$i(()=>[],{ADD(n){return this.includes(n)?this:[...this,n]},REMOVE(n){let r=this.indexOf(n);if(r===-1)return this;let t=this.slice();return t.splice(r,1),t}}));function ln(n,r){let t=wd.get(r),e=c.useId(),o=Ai(t);if(ne(()=>{if(n)return t.dispatch("ADD",e),()=>t.dispatch("REMOVE",e)},[t,n]),!n)return!1;let a=o.indexOf(e),i=o.length;return a===-1&&(a=i,i+=1),a===i-1}let Lo=new Map,jn=new Map;function Yi(n){var r;let t=(r=jn.get(n))!=null?r:0;return jn.set(n,t+1),t!==0?()=>ji(n):(Lo.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>ji(n))}function ji(n){var r;let t=(r=jn.get(n))!=null?r:1;if(t===1?jn.delete(n):jn.set(n,t-1),t!==1)return;let e=Lo.get(n);e&&(e["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",e["aria-hidden"]),n.inert=e.inert,Lo.delete(n))}function $o(n,{allowed:r,disallowed:t}={}){let e=ln(n,"inert-others");ne(()=>{var o,a;if(!e)return;let i=Je();for(let l of(o=t==null?void 0:t())!=null?o:[])l&&i.add(Yi(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let d=Vt(l);if(!d)continue;let u=l.parentElement;for(;u&&u!==d.body;){for(let p of u.children)s.some(h=>p.contains(h))||i.add(Yi(p));u=u.parentElement}}return i.dispose},[e,r,t])}function Ao(n,r,t){let e=gt(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});c.useEffect(()=>{if(!n)return;let o=r===null?null:r instanceof HTMLElement?r:r.current;if(!o)return;let a=Je();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>e.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>e.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,e,n])}let Dr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),xd=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Ze=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Ze||{}),Yo=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Yo||{}),Dd=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Dd||{});function Wi(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Dr)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function Ed(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(xd)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var jo=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(jo||{});function Hi(n,r=0){var t;return n===((t=Vt(n))==null?void 0:t.body)?!1:Ne(r,{0(){return n.matches(Dr)},1(){let e=n;for(;e!==null;){if(e.matches(Dr))return!0;e=e.parentElement}return!1}})}var Cd=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Cd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function bt(n){n==null||n.focus({preventScroll:!0})}let kd=["textarea","input"].join(",");function Sd(n){var r,t;return(t=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,kd))!=null?t:!1}function Wo(n,r=t=>t){return n.slice().sort((t,e)=>{let o=r(t),a=r(e);if(o===null||a===null)return 0;let i=o.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function _d(n,r){return un(Wi(),r,{relativeTo:n})}function un(n,r,{sorted:t=!0,relativeTo:e=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,i=Array.isArray(n)?t?Wo(n):n:r&64?Ed(n):Wi(n);o.length>0&&i.length>1&&(i=i.filter(f=>!o.some(m=>m!=null&&"current"in m?(m==null?void 0:m.current)===f:m===f))),e=e??a.activeElement;let s=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,i.indexOf(e))-1;if(r&4)return Math.max(0,i.indexOf(e))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=r&32?{preventScroll:!0}:{},u=0,p=i.length,h;do{if(u>=p||u+p<=0)return 0;let f=l+u;if(r&16)f=(f+p)%p;else{if(f<0)return 3;if(f>=p)return 1}h=i[f],h==null||h.focus(d),u+=s}while(h!==a.activeElement);return r&6&&Sd(h)&&h.select(),2}function Ri(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Od(){return/Android/gi.test(window.navigator.userAgent)}function Bi(){return Ri()||Od()}function Wn(n,r,t,e){let o=gt(t);c.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return document.addEventListener(r,a,e),()=>document.removeEventListener(r,a,e)},[n,r,e])}function Vi(n,r,t,e){let o=gt(t);c.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return window.addEventListener(r,a,e),()=>window.removeEventListener(r,a,e)},[n,r,e])}const zi=30;function Ho(n,r,t){let e=ln(n,"outside-click"),o=gt(t),a=c.useCallback(function(l,d){if(l.defaultPrevented)return;let u=d(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let p=function h(f){return typeof f=="function"?h(f()):Array.isArray(f)||f instanceof Set?f:[f]}(r);for(let h of p)if(h!==null&&(h.contains(u)||l.composed&&l.composedPath().includes(h)))return;return!Hi(u,jo.Loose)&&u.tabIndex!==-1&&l.preventDefault(),o.current(l,u)},[o,r]),i=c.useRef(null);Wn(e,"pointerdown",l=>{var d,u;i.current=((u=(d=l.composedPath)==null?void 0:d.call(l))==null?void 0:u[0])||l.target},!0),Wn(e,"mousedown",l=>{var d,u;i.current=((u=(d=l.composedPath)==null?void 0:d.call(l))==null?void 0:u[0])||l.target},!0),Wn(e,"click",l=>{Bi()||i.current&&(a(l,()=>i.current),i.current=null)},!0);let s=c.useRef({x:0,y:0});Wn(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),Wn(e,"touchend",l=>{let d={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(d.x-s.current.x)>=zi||Math.abs(d.y-s.current.y)>=zi))return a(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),Vi(e,"blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Mt(...n){return c.useMemo(()=>Vt(...n),[...n])}function Ro(n,r,t,e){let o=gt(t);c.useEffect(()=>{n=n??window;function a(i){o.current(i)}return n.addEventListener(r,a,e),()=>n.removeEventListener(r,a,e)},[n,r,e])}function Qi(n){let r=c.useRef({value:"",selectionStart:null,selectionEnd:null});return Ro(n,"blur",t=>{let e=t.target;e instanceof HTMLInputElement&&(r.current={value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd})}),j(()=>{if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==r.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:t,selectionEnd:e}=r.current;t!==null&&e!==null&&n.setSelectionRange(t,e)}r.current={value:"",selectionStart:null,selectionEnd:null}}})}function Ui(n,r){return c.useMemo(()=>{var t;if(n.type)return n.type;let e=(t=n.as)!=null?t:"button";if(typeof e=="string"&&e.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[n.type,n.as,r])}function Pd(){let n;return{before({doc:r}){var t;let e=r.documentElement,o=(t=r.defaultView)!=null?t:window;n=Math.max(0,o.innerWidth-e.clientWidth)},after({doc:r,d:t}){let e=r.documentElement,o=Math.max(0,e.clientWidth-e.offsetWidth),a=Math.max(0,n-o);t.style(e,"paddingRight",`${a}px`)}}}function Md(){return Ri()?{before({doc:n,d:r,meta:t}){function e(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=Je();s.style(n.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(n,"click",s=>{if(s.target instanceof HTMLElement)try{let l=s.target.closest("a");if(!l)return;let{hash:d}=new URL(l.href),u=n.querySelector(d);u&&!e(u)&&(i=u)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(s.target instanceof HTMLElement)if(e(s.target)){let l=s.target;for(;l.parentElement&&e(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(s.target instanceof HTMLElement){if(s.target.tagName==="INPUT")return;if(e(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function Td(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function Nd(n){let r={};for(let t of n)Object.assign(r,t(r));return r}let zt=$i(()=>new Map,{PUSH(n,r){var t;let e=(t=this.get(n))!=null?t:{doc:n,count:0,d:Je(),meta:new Set};return e.count++,e.meta.add(r),this.set(n,e),this},POP(n,r){let t=this.get(n);return t&&(t.count--,t.meta.delete(r)),this},SCROLL_PREVENT({doc:n,d:r,meta:t}){let e={doc:n,d:r,meta:Nd(t)},o=[Md(),Pd(),Td()];o.forEach(({before:a})=>a==null?void 0:a(e)),o.forEach(({after:a})=>a==null?void 0:a(e))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});zt.subscribe(()=>{let n=zt.getSnapshot(),r=new Map;for(let[t]of n)r.set(t,t.documentElement.style.overflow);for(let t of n.values()){let e=r.get(t.doc)==="hidden",o=t.count!==0;(o&&!e||!o&&e)&&zt.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&zt.dispatch("TEARDOWN",t)}});function Id(n,r,t=()=>({containers:[]})){let e=Ai(zt),o=r?e.get(r):void 0,a=o?o.count>0:!1;return ne(()=>{if(!(!r||!n))return zt.dispatch("PUSH",r,t),()=>zt.dispatch("POP",r,t)},[n,r]),a}function Bo(n,r,t=()=>[document.body]){let e=ln(n,"scroll-lock");Id(e,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function Ki(n){return[n.screenX,n.screenY]}function qi(){let n=c.useRef([-1,-1]);return{wasMoved(r){let t=Ki(r);return n.current[0]===t[0]&&n.current[1]===t[1]?!1:(n.current=t,!0)},update(r){n.current=Ki(r)}}}function Fd(n=0){let[r,t]=c.useState(n),e=c.useCallback(l=>t(l),[r]),o=c.useCallback(l=>t(d=>d|l),[r]),a=c.useCallback(l=>(r&l)===l,[r]),i=c.useCallback(l=>t(d=>d&~l),[t]),s=c.useCallback(l=>t(d=>d^l),[t]);return{flags:r,setFlag:e,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var Gi;typeof process<"u"&&typeof globalThis<"u"&&((Gi=process==null?void 0:process.env)==null?void 0:Gi.NODE_ENV)==="test"&&typeof Element.prototype.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(`
|
|
37
|
+
`)),[]});var Ld=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(Ld||{});function Vo(n){let r={};for(let t in n)n[t]===!0&&(r[`data-${t}`]="");return r}function zo(n,r,t,e){let[o,a]=c.useState(t),{hasFlag:i,addFlag:s,removeFlag:l}=Fd(n&&o?3:0),d=c.useRef(!1),u=c.useRef(!1),p=vt();return ne(()=>{var h;if(n){if(t&&a(!0),!r){t&&s(3);return}return(h=e==null?void 0:e.start)==null||h.call(e,t),$d(r,{inFlight:d,prepare(){u.current?u.current=!1:u.current=d.current,d.current=!0,!u.current&&(t?(s(3),l(4)):(s(4),l(2)))},run(){u.current?t?(l(3),s(4)):(l(4),s(3)):t?l(1):s(1)},done(){var f;u.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(d.current=!1,l(7),t||a(!1),(f=e==null?void 0:e.end)==null||f.call(e,t))}})}},[n,t,r,p]),n?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function $d(n,{prepare:r,run:t,done:e,inFlight:o}){let a=Je();return Yd(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(Ad(n,e))})}),a.dispose}function Ad(n,r){var t,e;let o=Je();if(!n)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(e=(t=n.getAnimations)==null?void 0:t.call(n).filter(s=>s instanceof CSSTransition))!=null?e:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function Yd(n,{inFlight:r,prepare:t}){if(r!=null&&r.current){t();return}let e=n.style.transition;n.style.transition="none",t(),n.offsetHeight,n.style.transition=e}function jd(n,{container:r,accept:t,walk:e}){let o=c.useRef(t),a=c.useRef(e);c.useEffect(()=>{o.current=t,a.current=e},[t,e]),ne(()=>{if(!r||!n)return;let i=Vt(r);if(!i)return;let s=o.current,l=a.current,d=Object.assign(p=>s(p),{acceptNode:s}),u=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,d,!1);for(;u.nextNode();)l(u.currentNode)},[r,n,o,a])}function Hn(n,r){let t=c.useRef([]),e=j(n);c.useEffect(()=>{let o=[...t.current];for(let[a,i]of r.entries())if(t.current[a]!==i){let s=e(r,o);return t.current=r,s}},[e,...r])}function Wd(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function Rn(n){return n instanceof Element||n instanceof Wd(n).Element}function Hd(){const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(r=>{let{brand:t,version:e}=r;return t+"/"+e}).join(" "):navigator.userAgent}function Rd(n,r){return typeof n=="function"?n(r):n}const tt=Math.min,ze=Math.max,Er=Math.round,Cr=Math.floor,Tt=n=>({x:n,y:n}),Bd={left:"right",right:"left",bottom:"top",top:"bottom"},Vd={start:"end",end:"start"};function Qo(n,r,t){return ze(n,tt(r,t))}function cn(n,r){return typeof n=="function"?n(r):n}function Nt(n){return n.split("-")[0]}function dn(n){return n.split("-")[1]}function Xi(n){return n==="x"?"y":"x"}function Uo(n){return n==="y"?"height":"width"}function Qt(n){return["top","bottom"].includes(Nt(n))?"y":"x"}function Ko(n){return Xi(Qt(n))}function zd(n,r,t){t===void 0&&(t=!1);const e=dn(n),o=Ko(n),a=Uo(o);let i=o==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=kr(i)),[i,kr(i)]}function Qd(n){const r=kr(n);return[qo(n),r,qo(r)]}function qo(n){return n.replace(/start|end/g,r=>Vd[r])}function Ud(n,r,t){const e=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(n){case"top":case"bottom":return t?r?o:e:r?e:o;case"left":case"right":return r?a:i;default:return[]}}function Kd(n,r,t,e){const o=dn(n);let a=Ud(Nt(n),t==="start",e);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(qo)))),a}function kr(n){return n.replace(/left|right|bottom|top/g,r=>Bd[r])}function qd(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ji(n){return typeof n!="number"?qd(n):{top:n,right:n,bottom:n,left:n}}function Sr(n){const{x:r,y:t,width:e,height:o}=n;return{width:e,height:o,top:t,left:r,right:r+e,bottom:t+o,x:r,y:t}}function Zi(n,r,t){let{reference:e,floating:o}=n;const a=Qt(r),i=Ko(r),s=Uo(i),l=Nt(r),d=a==="y",u=e.x+e.width/2-o.width/2,p=e.y+e.height/2-o.height/2,h=e[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:e.y-o.height};break;case"bottom":f={x:u,y:e.y+e.height};break;case"right":f={x:e.x+e.width,y:p};break;case"left":f={x:e.x-o.width,y:p};break;default:f={x:e.x,y:e.y}}switch(dn(r)){case"start":f[i]-=h*(t&&d?-1:1);break;case"end":f[i]+=h*(t&&d?-1:1);break}return f}const Gd=async(n,r,t)=>{const{placement:e="bottom",strategy:o="absolute",middleware:a=[],platform:i}=t,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let d=await i.getElementRects({reference:n,floating:r,strategy:o}),{x:u,y:p}=Zi(d,e,l),h=e,f={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:b}=s[v],{x:w,y:x,data:E,reset:P}=await b({x:u,y:p,initialPlacement:e,placement:h,strategy:o,middlewareData:f,rects:d,platform:i,elements:{reference:n,floating:r}});u=w??u,p=x??p,f={...f,[g]:{...f[g],...E}},P&&m<=50&&(m++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(d=P.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):P.rects),{x:u,y:p}=Zi(d,h,l)),v=-1)}return{x:u,y:p,placement:h,strategy:o,middlewareData:f}};async function _r(n,r){var t;r===void 0&&(r={});const{x:e,y:o,platform:a,rects:i,elements:s,strategy:l}=n,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:h=!1,padding:f=0}=cn(r,n),m=Ji(f),g=s[h?p==="floating"?"reference":"floating":p],b=Sr(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(g)))==null||t?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:d,rootBoundary:u,strategy:l})),w=p==="floating"?{x:e,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),E=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},P=Sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:l}):w);return{top:(b.top-P.top+m.top)/E.y,bottom:(P.bottom-b.bottom+m.bottom)/E.y,left:(b.left-P.left+m.left)/E.x,right:(P.right-b.right+m.right)/E.x}}const Xd=n=>({name:"arrow",options:n,async fn(r){const{x:t,y:e,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:d,padding:u=0}=cn(n,r)||{};if(d==null)return{};const p=Ji(u),h={x:t,y:e},f=Ko(o),m=Uo(f),v=await i.getDimensions(d),g=f==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",E=a.reference[m]+a.reference[f]-h[f]-a.floating[m],P=h[f]-a.reference[f],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let _=M?M[x]:0;(!_||!await(i.isElement==null?void 0:i.isElement(M)))&&(_=s.floating[x]||a.floating[m]);const S=E/2-P/2,I=_/2-v[m]/2-1,Y=tt(p[b],I),k=tt(p[w],I),D=Y,O=_-v[m]-k,C=_/2-v[m]/2+S,A=Qo(D,C,O),$=!l.arrow&&dn(o)!=null&&C!==A&&a.reference[m]/2-(C<D?Y:k)-v[m]/2<0,F=$?C<D?C-D:C-O:0;return{[f]:h[f]+F,data:{[f]:A,centerOffset:C-A-F,...$&&{alignmentOffset:F}},reset:$}}}),Jd=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var t,e;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:d}=r,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=cn(n,r);if((t=a.arrow)!=null&&t.alignmentOffset)return{};const b=Nt(o),w=Qt(s),x=Nt(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(d.floating)),P=h||(x||!v?[kr(s)]:Qd(s)),M=m!=="none";!h&&M&&P.push(...Kd(s,v,m,E));const _=[s,...P],S=await _r(r,g),I=[];let Y=((e=a.flip)==null?void 0:e.overflows)||[];if(u&&I.push(S[b]),p){const C=zd(o,i,E);I.push(S[C[0]],S[C[1]])}if(Y=[...Y,{placement:o,overflows:I}],!I.every(C=>C<=0)){var k,D;const C=(((k=a.flip)==null?void 0:k.index)||0)+1,A=_[C];if(A)return{data:{index:C,overflows:Y},reset:{placement:A}};let $=(D=Y.filter(F=>F.overflows[0]<=0).sort((F,R)=>F.overflows[1]-R.overflows[1])[0])==null?void 0:D.placement;if(!$)switch(f){case"bestFit":{var O;const F=(O=Y.filter(R=>{if(M){const H=Qt(R.placement);return H===w||H==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(H=>H>0).reduce((H,K)=>H+K,0)]).sort((R,H)=>R[1]-H[1])[0])==null?void 0:O[0];F&&($=F);break}case"initialPlacement":$=s;break}if(o!==$)return{reset:{placement:$}}}return{}}}};async function Zd(n,r){const{placement:t,platform:e,elements:o}=n,a=await(e.isRTL==null?void 0:e.isRTL(o.floating)),i=Nt(t),s=dn(t),l=Qt(t)==="y",d=["left","top"].includes(i)?-1:1,u=a&&l?-1:1,p=cn(r,n);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:h*d}:{x:h*d,y:f*u}}const ef=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var t,e;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await Zd(r,n);return i===((t=s.offset)==null?void 0:t.placement)&&(e=s.arrow)!=null&&e.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},tf=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:t,y:e,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...l}=cn(n,r),d={x:t,y:e},u=await _r(r,l),p=Qt(Nt(o)),h=Xi(p);let f=d[h],m=d[p];if(a){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=f+u[g],x=f-u[b];f=Qo(w,f,x)}if(i){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=m+u[g],x=m-u[b];m=Qo(w,m,x)}const v=s.fn({...r,[h]:f,[p]:m});return{...v,data:{x:v.x-t,y:v.y-e}}}}},nf=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){const{placement:t,rects:e,platform:o,elements:a}=r,{apply:i=()=>{},...s}=cn(n,r),l=await _r(r,s),d=Nt(t),u=dn(t),p=Qt(t)==="y",{width:h,height:f}=e.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=u===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=u==="end"?"top":"bottom");const g=f-l.top-l.bottom,b=h-l.left-l.right,w=tt(f-l[m],g),x=tt(h-l[v],b),E=!r.middlewareData.shift;let P=w,M=x;if(p?M=u||E?tt(x,b):b:P=u||E?tt(w,g):g,E&&!u){const S=ze(l.left,0),I=ze(l.right,0),Y=ze(l.top,0),k=ze(l.bottom,0);p?M=h-2*(S!==0||I!==0?S+I:ze(l.left,l.right)):P=f-2*(Y!==0||k!==0?Y+k:ze(l.top,l.bottom))}await i({...r,availableWidth:M,availableHeight:P});const _=await o.getDimensions(a.floating);return h!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function Or(){return typeof window<"u"}function fn(n){return es(n)?(n.nodeName||"").toLowerCase():"#document"}function Qe(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function yt(n){var r;return(r=(es(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function es(n){return Or()?n instanceof Node||n instanceof Qe(n).Node:!1}function Ye(n){return Or()?n instanceof Element||n instanceof Qe(n).Element:!1}function nt(n){return Or()?n instanceof HTMLElement||n instanceof Qe(n).HTMLElement:!1}function ts(n){return!Or()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Qe(n).ShadowRoot}function Bn(n){const{overflow:r,overflowX:t,overflowY:e,display:o}=qe(n);return/auto|scroll|overlay|hidden|clip/.test(r+e+t)&&!["inline","contents"].includes(o)}function rf(n){return["table","td","th"].includes(fn(n))}function Pr(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function Go(n){const r=Xo(),t=Ye(n)?qe(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(e=>(t.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(t.contain||"").includes(e))}function of(n){let r=It(n);for(;nt(r)&&!pn(r);){if(Go(r))return r;if(Pr(r))return null;r=It(r)}return null}function Xo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pn(n){return["html","body","#document"].includes(fn(n))}function qe(n){return Qe(n).getComputedStyle(n)}function Mr(n){return Ye(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function It(n){if(fn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||ts(n)&&n.host||yt(n);return ts(r)?r.host:r}function ns(n){const r=It(n);return pn(r)?n.ownerDocument?n.ownerDocument.body:n.body:nt(r)&&Bn(r)?r:ns(r)}function Vn(n,r,t){var e;r===void 0&&(r=[]),t===void 0&&(t=!0);const o=ns(n),a=o===((e=n.ownerDocument)==null?void 0:e.body),i=Qe(o);if(a){const s=af(i);return r.concat(i,i.visualViewport||[],Bn(o)?o:[],s&&t?Vn(s):[])}return r.concat(o,Vn(o,[],t))}function af(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function rs(n){const r=qe(n);let t=parseFloat(r.width)||0,e=parseFloat(r.height)||0;const o=nt(n),a=o?n.offsetWidth:t,i=o?n.offsetHeight:e,s=Er(t)!==a||Er(e)!==i;return s&&(t=a,e=i),{width:t,height:e,$:s}}function Jo(n){return Ye(n)?n:n.contextElement}function mn(n){const r=Jo(n);if(!nt(r))return Tt(1);const t=r.getBoundingClientRect(),{width:e,height:o,$:a}=rs(r);let i=(a?Er(t.width):t.width)/e,s=(a?Er(t.height):t.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const sf=Tt(0);function os(n){const r=Qe(n);return!Xo()||!r.visualViewport?sf:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function lf(n,r,t){return r===void 0&&(r=!1),!t||r&&t!==Qe(n)?!1:r}function Ut(n,r,t,e){r===void 0&&(r=!1),t===void 0&&(t=!1);const o=n.getBoundingClientRect(),a=Jo(n);let i=Tt(1);r&&(e?Ye(e)&&(i=mn(e)):i=mn(n));const s=lf(a,t,e)?os(a):Tt(0);let l=(o.left+s.x)/i.x,d=(o.top+s.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(a){const h=Qe(a),f=e&&Ye(e)?Qe(e):e;let m=h,v=m.frameElement;for(;v&&e&&f!==m;){const g=mn(v),b=v.getBoundingClientRect(),w=qe(v),x=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,E=b.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,d*=g.y,u*=g.x,p*=g.y,l+=x,d+=E,m=Qe(v),v=m.frameElement}}return Sr({width:u,height:p,x:l,y:d})}function uf(n){let{elements:r,rect:t,offsetParent:e,strategy:o}=n;const a=o==="fixed",i=yt(e),s=r?Pr(r.floating):!1;if(e===i||s&&a)return t;let l={scrollLeft:0,scrollTop:0},d=Tt(1);const u=Tt(0),p=nt(e);if((p||!p&&!a)&&((fn(e)!=="body"||Bn(i))&&(l=Mr(e)),nt(e))){const h=Ut(e);d=mn(e),u.x=h.x+e.clientLeft,u.y=h.y+e.clientTop}return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+u.x,y:t.y*d.y-l.scrollTop*d.y+u.y}}function cf(n){return Array.from(n.getClientRects())}function as(n){return Ut(yt(n)).left+Mr(n).scrollLeft}function df(n){const r=yt(n),t=Mr(n),e=n.ownerDocument.body,o=ze(r.scrollWidth,r.clientWidth,e.scrollWidth,e.clientWidth),a=ze(r.scrollHeight,r.clientHeight,e.scrollHeight,e.clientHeight);let i=-t.scrollLeft+as(n);const s=-t.scrollTop;return qe(e).direction==="rtl"&&(i+=ze(r.clientWidth,e.clientWidth)-o),{width:o,height:a,x:i,y:s}}function ff(n,r){const t=Qe(n),e=yt(n),o=t.visualViewport;let a=e.clientWidth,i=e.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const d=Xo();(!d||d&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function pf(n,r){const t=Ut(n,!0,r==="fixed"),e=t.top+n.clientTop,o=t.left+n.clientLeft,a=nt(n)?mn(n):Tt(1),i=n.clientWidth*a.x,s=n.clientHeight*a.y,l=o*a.x,d=e*a.y;return{width:i,height:s,x:l,y:d}}function is(n,r,t){let e;if(r==="viewport")e=ff(n,t);else if(r==="document")e=df(yt(n));else if(Ye(r))e=pf(r,t);else{const o=os(n);e={...r,x:r.x-o.x,y:r.y-o.y}}return Sr(e)}function ss(n,r){const t=It(n);return t===r||!Ye(t)||pn(t)?!1:qe(t).position==="fixed"||ss(t,r)}function mf(n,r){const t=r.get(n);if(t)return t;let e=Vn(n,[],!1).filter(s=>Ye(s)&&fn(s)!=="body"),o=null;const a=qe(n).position==="fixed";let i=a?It(n):n;for(;Ye(i)&&!pn(i);){const s=qe(i),l=Go(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Bn(i)&&!l&&ss(n,i))?e=e.filter(u=>u!==i):o=s,i=It(i)}return r.set(n,e),e}function hf(n){let{element:r,boundary:t,rootBoundary:e,strategy:o}=n;const i=[...t==="clippingAncestors"?Pr(r)?[]:mf(r,this._c):[].concat(t),e],s=i[0],l=i.reduce((d,u)=>{const p=is(r,u,o);return d.top=ze(p.top,d.top),d.right=tt(p.right,d.right),d.bottom=tt(p.bottom,d.bottom),d.left=ze(p.left,d.left),d},is(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vf(n){const{width:r,height:t}=rs(n);return{width:r,height:t}}function gf(n,r,t){const e=nt(r),o=yt(r),a=t==="fixed",i=Ut(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Tt(0);if(e||!e&&!a)if((fn(r)!=="body"||Bn(o))&&(s=Mr(r)),e){const p=Ut(r,!0,a,r);l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}else o&&(l.x=as(o));const d=i.left+s.scrollLeft-l.x,u=i.top+s.scrollTop-l.y;return{x:d,y:u,width:i.width,height:i.height}}function Zo(n){return qe(n).position==="static"}function ls(n,r){return!nt(n)||qe(n).position==="fixed"?null:r?r(n):n.offsetParent}function us(n,r){const t=Qe(n);if(Pr(n))return t;if(!nt(n)){let o=It(n);for(;o&&!pn(o);){if(Ye(o)&&!Zo(o))return o;o=It(o)}return t}let e=ls(n,r);for(;e&&rf(e)&&Zo(e);)e=ls(e,r);return e&&pn(e)&&Zo(e)&&!Go(e)?t:e||of(n)||t}const bf=async function(n){const r=this.getOffsetParent||us,t=this.getDimensions,e=await t(n.floating);return{reference:gf(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function yf(n){return qe(n).direction==="rtl"}const wf={convertOffsetParentRelativeRectToViewportRelativeRect:uf,getDocumentElement:yt,getClippingRect:hf,getOffsetParent:us,getElementRects:bf,getClientRects:cf,getDimensions:vf,getScale:mn,isElement:Ye,isRTL:yf};function xf(n,r){let t=null,e;const o=yt(n);function a(){var s;clearTimeout(e),(s=t)==null||s.disconnect(),t=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:d,top:u,width:p,height:h}=n.getBoundingClientRect();if(s||r(),!p||!h)return;const f=Cr(u),m=Cr(o.clientWidth-(d+p)),v=Cr(o.clientHeight-(u+h)),g=Cr(d),w={rootMargin:-f+"px "+-m+"px "+-v+"px "+-g+"px",threshold:ze(0,tt(1,l))||1};let x=!0;function E(P){const M=P[0].intersectionRatio;if(M!==l){if(!x)return i();M?i(!1,M):e=setTimeout(()=>{i(!1,1e-7)},1e3)}x=!1}try{t=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{t=new IntersectionObserver(E,w)}t.observe(n)}return i(!0),a}function cs(n,r,t,e){e===void 0&&(e={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,d=Jo(n),u=o||a?[...d?Vn(d):[],...Vn(r)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",t,{passive:!0}),a&&b.addEventListener("resize",t)});const p=d&&s?xf(d,t):null;let h=-1,f=null;i&&(f=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&f&&(f.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(r)})),t()}),d&&!l&&f.observe(d),f.observe(r));let m,v=l?Ut(n):null;l&&g();function g(){const b=Ut(n);v&&(b.x!==v.x||b.y!==v.y||b.width!==v.width||b.height!==v.height)&&t(),v=b,m=requestAnimationFrame(g)}return t(),()=>{var b;u.forEach(w=>{o&&w.removeEventListener("scroll",t),a&&w.removeEventListener("resize",t)}),p==null||p(),(b=f)==null||b.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const ea=_r,ds=ef,Df=tf,fs=Jd,Ef=nf,ps=Xd,ms=(n,r,t)=>{const e=new Map,o={platform:wf,...t},a={...o.platform,_c:e};return Gd(n,r,{...o,platform:a})};var Tr=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Nr(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let t,e,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==r.length)return!1;for(e=t;e--!==0;)if(!Nr(n[e],r[e]))return!1;return!0}if(o=Object.keys(n),t=o.length,t!==Object.keys(r).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(r,o[e]))return!1;for(e=t;e--!==0;){const a=o[e];if(!(a==="_owner"&&n.$$typeof)&&!Nr(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function hs(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function vs(n,r){const t=hs(n);return Math.round(r*t)/t}function gs(n){const r=T.useRef(n);return Tr(()=>{r.current=n}),r}function Cf(n){n===void 0&&(n={});const{placement:r="bottom",strategy:t="absolute",middleware:e=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:d}=n,[u,p]=T.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[h,f]=T.useState(e);Nr(h,e)||f(e);const[m,v]=T.useState(null),[g,b]=T.useState(null),w=T.useCallback(F=>{F!==M.current&&(M.current=F,v(F))},[]),x=T.useCallback(F=>{F!==_.current&&(_.current=F,b(F))},[]),E=a||m,P=i||g,M=T.useRef(null),_=T.useRef(null),S=T.useRef(u),I=l!=null,Y=gs(l),k=gs(o),D=T.useCallback(()=>{if(!M.current||!_.current)return;const F={placement:r,strategy:t,middleware:h};k.current&&(F.platform=k.current),ms(M.current,_.current,F).then(R=>{const H={...R,isPositioned:!0};O.current&&!Nr(S.current,H)&&(S.current=H,rn.flushSync(()=>{p(H)}))})},[h,r,t,k]);Tr(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[d]);const O=T.useRef(!1);Tr(()=>(O.current=!0,()=>{O.current=!1}),[]),Tr(()=>{if(E&&(M.current=E),P&&(_.current=P),E&&P){if(Y.current)return Y.current(E,P,D);D()}},[E,P,D,Y,I]);const C=T.useMemo(()=>({reference:M,floating:_,setReference:w,setFloating:x}),[w,x]),A=T.useMemo(()=>({reference:E,floating:P}),[E,P]),$=T.useMemo(()=>{const F={position:t,left:0,top:0};if(!A.floating)return F;const R=vs(A.floating,u.x),H=vs(A.floating,u.y);return s?{...F,transform:"translate("+R+"px, "+H+"px)",...hs(A.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:R,top:H}},[t,s,A.floating,u.x,u.y]);return T.useMemo(()=>({...u,update:D,refs:C,elements:A,floatingStyles:$}),[u,D,C,A,$])}const bs=(n,r)=>({...ds(n),options:[n,r]}),kf=(n,r)=>({...Df(n),options:[n,r]}),Sf=(n,r)=>({...fs(n),options:[n,r]}),_f=(n,r)=>({...Ef(n),options:[n,r]}),ys={...T},Of=ys.useInsertionEffect||(n=>n());function ws(n){const r=T.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Of(()=>{r.current=n}),T.useCallback(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return r.current==null?void 0:r.current(...e)},[])}var ta=typeof document<"u"?c.useLayoutEffect:c.useEffect;let xs=!1,Pf=0;const Ds=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Pf++;function Mf(){const[n,r]=T.useState(()=>xs?Ds():void 0);return ta(()=>{n==null&&r(Ds())},[]),T.useEffect(()=>{xs=!0},[]),n}const Tf=ys.useId||Mf;let zn;process.env.NODE_ENV!=="production"&&(zn=new Set);function Nf(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=zn)!=null&&n.has(o))){var a;(a=zn)==null||a.add(o),console.warn(o)}}function If(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=zn)!=null&&n.has(o))){var a;(a=zn)==null||a.add(o),console.error(o)}}function Ff(){const n=new Map;return{emit(r,t){var e;(e=n.get(r))==null||e.forEach(o=>o(t))},on(r,t){n.set(r,[...n.get(r)||[],t])},off(r,t){var e;n.set(r,((e=n.get(r))==null?void 0:e.filter(o=>o!==t))||[])}}}const Lf=T.createContext(null),$f=T.createContext(null),Af=()=>{var n;return((n=T.useContext(Lf))==null?void 0:n.id)||null},Yf=()=>T.useContext($f);function jf(n){const{open:r=!1,onOpenChange:t,elements:e}=n,o=Tf(),a=T.useRef({}),[i]=T.useState(()=>Ff()),s=Af()!=null;if(process.env.NODE_ENV!=="production"){const f=e.reference;f&&!Rn(f)&&If("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,d]=T.useState(e.reference),u=ws((f,m,v)=>{a.current.openEvent=f?m:void 0,i.emit("openchange",{open:f,event:m,reason:v,nested:s}),t==null||t(f,m,v)}),p=T.useMemo(()=>({setPositionReference:d}),[]),h=T.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return T.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:h,events:i,floatingId:o,refs:p}),[r,u,h,i,o,p])}function Wf(n){n===void 0&&(n={});const{nodeId:r}=n,t=jf({...n,elements:{reference:null,floating:null,...n.elements}}),e=n.rootContext||t,o=e.elements,[a,i]=T.useState(null),[s,l]=T.useState(null),u=(o==null?void 0:o.reference)||a,p=T.useRef(null),h=Yf();ta(()=>{u&&(p.current=u)},[u]);const f=Cf({...n,elements:{...o,...s&&{reference:s}}}),m=T.useCallback(x=>{const E=Rn(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(E),f.refs.setReference(E)},[f.refs]),v=T.useCallback(x=>{(Rn(x)||x===null)&&(p.current=x,i(x)),(Rn(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Rn(x))&&f.refs.setReference(x)},[f.refs]),g=T.useMemo(()=>({...f.refs,setReference:v,setPositionReference:m,domReference:p}),[f.refs,v,m]),b=T.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=T.useMemo(()=>({...f,...e,refs:g,elements:b,nodeId:r}),[f,g,b,r,e]);return ta(()=>{e.dataRef.current.floatingContext=w;const x=h==null?void 0:h.nodesRef.current.find(E=>E.id===r);x&&(x.context=w)}),T.useMemo(()=>({...f,context:w,refs:g,elements:b}),[f,g,b,w])}const Es="active",Cs="selected";function na(n,r,t){const e=new Map,o=t==="item";let a=n;if(o&&n){const{[Es]:i,[Cs]:s,...l}=n;a=l}return{...t==="floating"&&{tabIndex:-1},...a,...r.map(i=>{const s=i?i[t]:null;return typeof s=="function"?n?s(n):null:s}).concat(n).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[d,u]=l;if(!(o&&[Es,Cs].includes(d)))if(d.indexOf("on")===0){if(e.has(d)||e.set(d,[]),typeof u=="function"){var p;(p=e.get(d))==null||p.push(u),i[d]=function(){for(var h,f=arguments.length,m=new Array(f),v=0;v<f;v++)m[v]=arguments[v];return(h=e.get(d))==null?void 0:h.map(g=>g(...m)).find(g=>g!==void 0)}}}else i[d]=u}),i),{})}}function Hf(n){n===void 0&&(n=[]);const r=n.map(s=>s==null?void 0:s.reference),t=n.map(s=>s==null?void 0:s.floating),e=n.map(s=>s==null?void 0:s.item),o=T.useCallback(s=>na(s,n,"reference"),r),a=T.useCallback(s=>na(s,n,"floating"),t),i=T.useCallback(s=>na(s,n,"item"),e);return T.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function ks(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const Rf=n=>({name:"inner",options:n,async fn(r){const{listRef:t,overflowRef:e,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:d,...u}=Rd(n,r),{rects:p,elements:{floating:h}}=r,f=t.current[i];if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||Nf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const m={...r,...await bs(-f.offsetTop-h.clientTop-p.reference.height/2-f.offsetHeight/2-a).fn(r)},v=(d==null?void 0:d.current)||h,g=await ea(ks(m,v.scrollHeight),u),b=await ea(m,{...u,elementContext:"reference"}),w=Math.max(0,g.top),x=m.y+w,E=Math.max(0,v.scrollHeight-w-Math.max(0,g.bottom));return v.style.maxHeight=E+"px",v.scrollTop=w,o&&(v.offsetHeight<f.offsetHeight*Math.min(s,t.current.length-1)-1||b.top>=-l||b.bottom>=-l?rn.flushSync(()=>o(!0)):rn.flushSync(()=>o(!1))),e&&(e.current=await ea(ks({...m,y:x},v.offsetHeight),u)),{y:x}}});function Bf(n,r){const{open:t,elements:e}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=ws(s),d=T.useRef(!1),u=T.useRef(null),p=T.useRef(null);T.useEffect(()=>{if(!o)return;function f(v){if(v.ctrlKey||!m||a.current==null)return;const g=v.deltaY,b=a.current.top>=-.5,w=a.current.bottom>=-.5,x=m.scrollHeight-m.clientHeight,E=g<0?-1:1,P=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!b&&g>0||!w&&g<0?(v.preventDefault(),rn.flushSync(()=>{l(M=>M+Math[P](g,x*E))})):/firefox/i.test(Hd())&&(m.scrollTop+=g))}const m=(i==null?void 0:i.current)||e.floating;if(t&&m)return m.addEventListener("wheel",f),requestAnimationFrame(()=>{u.current=m.scrollTop,a.current!=null&&(p.current={...a.current})}),()=>{u.current=null,p.current=null,m.removeEventListener("wheel",f)}},[o,t,e.floating,a,i,l]);const h=T.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const f=(i==null?void 0:i.current)||e.floating;if(!(!a.current||!f||!d.current)){if(u.current!==null){const m=f.scrollTop-u.current;(a.current.bottom<-.5&&m<-1||a.current.top<-.5&&m>1)&&rn.flushSync(()=>l(v=>v+m))}requestAnimationFrame(()=>{u.current=f.scrollTop})}}}),[e.floating,l,a,i]);return T.useMemo(()=>o?{floating:h}:{},[o,h])}let hn=c.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});hn.displayName="FloatingContext";let ra=c.createContext(null);ra.displayName="PlacementContext";function Ss(n){return c.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function _s(){return c.useContext(hn).setReference}function Vf(){return c.useContext(hn).getReferenceProps}function Os(){let{getFloatingProps:n,slot:r}=c.useContext(hn);return c.useCallback((...t)=>Object.assign({},n(...t),{"data-anchor":r.anchor}),[n,r])}function Ps(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=c.useContext(ra),t=c.useMemo(()=>n,[JSON.stringify(n,typeof HTMLElement<"u"?(o,a)=>a instanceof HTMLElement?a.outerHTML:a:void 0)]);ne(()=>{r==null||r(t??null)},[r,t]);let e=c.useContext(hn);return c.useMemo(()=>[e.setFloating,n?e.styles:{}],[e.setFloating,n,e.styles])}let Ms=4;function Ts({children:n,enabled:r=!0}){let[t,e]=c.useState(null),[o,a]=c.useState(0),i=c.useRef(null),[s,l]=c.useState(null);zf(s);let d=r&&t!==null&&s!==null,{to:u="bottom",gap:p=0,offset:h=0,padding:f=0,inner:m}=Qf(t,s),[v,g="center"]=u.split(" ");ne(()=>{d&&a(0)},[d]);let{refs:b,floatingStyles:w,context:x}=Wf({open:d,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[bs({mainAxis:v==="selection"?0:p,crossAxis:h}),kf({padding:f}),v!=="selection"&&Sf({padding:f}),v==="selection"&&m?Rf({...m,padding:f,overflowRef:i,offset:o,minItemsVisible:Ms,referenceOverflowThreshold:f,onFallbackChange(k){var D,O;if(!k)return;let C=x.elements.floating;if(!C)return;let A=parseFloat(getComputedStyle(C).scrollPaddingBottom)||0,$=Math.min(Ms,C.childElementCount),F=0,R=0;for(let H of(O=(D=x.elements.floating)==null?void 0:D.childNodes)!=null?O:[])if(H instanceof HTMLElement){let K=H.offsetTop,U=K+H.clientHeight+A,G=C.scrollTop,W=G+C.clientHeight;if(K>=G&&U<=W)$--;else{R=Math.max(0,Math.min(U,W)-Math.max(K,G)),F=H.clientHeight;break}}$>=1&&a(H=>{let K=F*$-R+A;return H>=K?H:K})}}):null,_f({padding:f,apply({availableWidth:k,availableHeight:D,elements:O}){Object.assign(O.floating.style,{overflow:"auto",maxWidth:`${k}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${D}px)`})}})].filter(Boolean),whileElementsMounted:cs}),[E=v,P=g]=x.placement.split("-");v==="selection"&&(E="selection");let M=c.useMemo(()=>({anchor:[E,P].filter(Boolean).join(" ")}),[E,P]),_=Bf(x,{overflowRef:i,onChange:a}),{getReferenceProps:S,getFloatingProps:I}=Hf([_]),Y=j(k=>{l(k),b.setFloating(k)});return T.createElement(ra.Provider,{value:e},T.createElement(hn.Provider,{value:{setFloating:Y,setReference:b.setReference,styles:w,getReferenceProps:S,getFloatingProps:I,slot:M}},n))}function zf(n){ne(()=>{if(!n)return;let r=new MutationObserver(()=>{let t=window.getComputedStyle(n).maxHeight,e=parseFloat(t);if(isNaN(e))return;let o=parseInt(t);isNaN(o)||e!==o&&(n.style.maxHeight=`${Math.ceil(e)}px`)});return r.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[n])}function Qf(n,r){var t,e,o;let a=oa((t=n==null?void 0:n.gap)!=null?t:"var(--anchor-gap, 0)",r),i=oa((e=n==null?void 0:n.offset)!=null?e:"var(--anchor-offset, 0)",r),s=oa((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function oa(n,r,t=void 0){let e=vt(),o=j((l,d)=>{if(l==null)return[t,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!d)return[t,null];let u=Is(l,d);return[u,p=>{let h=Ns(l);{let f=h.map(m=>window.getComputedStyle(d).getPropertyValue(m));e.requestAnimationFrame(function m(){e.nextFrame(m);let v=!1;for(let[b,w]of h.entries()){let x=window.getComputedStyle(d).getPropertyValue(w);if(f[b]!==x){f[b]=x,v=!0;break}}if(!v)return;let g=Is(l,d);u!==g&&(p(g),u=g)})}return e.dispose}]}return[t,null]}),a=c.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=c.useState();return ne(()=>{let[l,d]=o(n,r);if(s(l),!!d)return d(s)},[n,r]),i}function Ns(n){let r=/var\((.*)\)/.exec(n);if(r){let t=r[1].indexOf(",");if(t===-1)return[r[1]];let e=r[1].slice(0,t).trim(),o=r[1].slice(t+1).trim();return o?[e,...Ns(o)]:[e]}return[]}function Is(n,r){let t=document.createElement("div");r.appendChild(t),t.style.setProperty("margin-top","0px","important"),t.style.setProperty("margin-top",n,"important");let e=parseFloat(window.getComputedStyle(t).marginTop)||0;return r.removeChild(t),e}function Uf({children:n,freeze:r}){let t=Ir(r,n);return c.createElement(c.Fragment,null,t)}function Ir(n,r){let[t,e]=c.useState(r);return!n&&t!==r&&e(r),n?t:r}let Fr=c.createContext(null);Fr.displayName="OpenClosedContext";var $e=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))($e||{});function vn(){return c.useContext(Fr)}function aa({value:n,children:r}){return c.createElement(Fr.Provider,{value:n},r)}function Kf({children:n}){return c.createElement(Fr.Provider,{value:null},n)}function qf(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let rt=[];qf(()=>{function n(r){if(!(r.target instanceof HTMLElement)||r.target===document.body||rt[0]===r.target)return;let t=r.target;t=t.closest(Dr),rt.unshift(t??r.target),rt=rt.filter(e=>e!=null&&e.isConnected),rt.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function Gf(n){throw new Error("Unexpected object: "+n)}var ee=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(ee||{});function Qn(n,r){let t=r.resolveItems();if(t.length<=0)return null;let e=r.resolveActiveIndex(),o=e??-1;switch(n.focus){case 0:{for(let a=0;a<t.length;++a)if(!r.resolveDisabled(t[a],a,t))return a;return e}case 1:{o===-1&&(o=t.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(t[a],a,t))return a;return e}case 2:{for(let a=o+1;a<t.length;++a)if(!r.resolveDisabled(t[a],a,t))return a;return e}case 3:{for(let a=t.length-1;a>=0;--a)if(!r.resolveDisabled(t[a],a,t))return a;return e}case 4:{for(let a=0;a<t.length;++a)if(r.resolveId(t[a],a,t)===n.id)return a;return e}case 5:return null;default:Gf(n)}}var ia=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(ia||{});function Fs(n){let r=j(n),t=c.useRef(!1);c.useEffect(()=>(t.current=!1,()=>{t.current=!0,vr(()=>{t.current&&r()})}),[r])}function Xf(){let n=typeof document>"u";return"useSyncExternalStore"in T?(r=>r.useSyncExternalStore)(T)(()=>()=>{},()=>!1,()=>!n):!1}function Un(){let n=Xf(),[r,t]=T.useState(Bt.isHandoffComplete);return r&&Bt.isHandoffComplete===!1&&t(!1),T.useEffect(()=>{r!==!0&&t(!0)},[r]),T.useEffect(()=>Bt.handoff(),[]),n?!1:r}let Ls=c.createContext(!1);function Jf(){return c.useContext(Ls)}function $s(n){return c.createElement(Ls.Provider,{value:n.force},n.children)}function Zf(n){let r=Jf(),t=c.useContext(Ys),e=Mt(n),[o,a]=c.useState(()=>{var i;if(!r&&t!==null)return(i=t.current)!=null?i:null;if(Bt.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return c.useEffect(()=>{o!==null&&(e!=null&&e.body.contains(o)||e==null||e.body.appendChild(o))},[o,e]),c.useEffect(()=>{r||t!==null&&a(t.current)},[t,a,r]),o}let As=c.Fragment,ep=ye(function(n,r){let t=n,e=c.useRef(null),o=Ie(Uc(u=>{e.current=u}),r),a=Mt(e),i=Zf(e),[s]=c.useState(()=>{var u;return Bt.isServer?null:(u=a==null?void 0:a.createElement("div"))!=null?u:null}),l=c.useContext(sa),d=Un();return ne(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),ne(()=>{if(s&&l)return l.register(s)},[l,s]),Fs(()=>{var u;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((u=i.parentElement)==null||u.removeChild(i)))}),d?!i||!s?null:Ee.createPortal(Ce({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:As,name:"Portal"}),s):null});function tp(n,r){let t=Ie(r),{enabled:e=!0,...o}=n;return e?c.createElement(ep,{...o,ref:t}):Ce({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:As,name:"Portal"})}let np=c.Fragment,Ys=c.createContext(null);function rp(n,r){let{target:t,...e}=n,o={ref:Ie(r)};return c.createElement(Ys.Provider,{value:t},Ce({ourProps:o,theirProps:e,defaultTag:np,name:"Popover.Group"}))}let sa=c.createContext(null);function op(){let n=c.useContext(sa),r=c.useRef([]),t=j(a=>(r.current.push(a),n&&n.register(a),()=>e(a))),e=j(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),n&&n.unregister(a)}),o=c.useMemo(()=>({register:t,unregister:e,portals:r}),[t,e,r]);return[r,c.useMemo(()=>function({children:a}){return c.createElement(sa.Provider,{value:o},a)},[o])]}let ap=ye(tp),js=ye(rp),la=Object.assign(ap,{Group:js});var ip=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(ip||{}),sp=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(sp||{}),lp=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(lp||{}),up=(n=>(n[n.OpenCombobox=0]="OpenCombobox",n[n.CloseCombobox=1]="CloseCombobox",n[n.GoToOption=2]="GoToOption",n[n.SetTyping=3]="SetTyping",n[n.RegisterOption=4]="RegisterOption",n[n.UnregisterOption=5]="UnregisterOption",n[n.SetActivationTrigger=6]="SetActivationTrigger",n[n.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",n[n.SetInputElement=8]="SetInputElement",n[n.SetButtonElement=9]="SetButtonElement",n[n.SetOptionsElement=10]="SetOptionsElement",n))(up||{});function ua(n,r=t=>t){let t=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,e=r(n.options.slice()),o=e.length>0&&e[0].dataRef.current.order!==null?e.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Wo(e,i=>i.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let cp={1(n){var r;return(r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1?n:{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(n){var r,t;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===0)return n;if((t=n.dataRef.current)!=null&&t.value){let e=n.dataRef.current.calculateIndex(n.dataRef.current.value);if(e!==-1)return{...n,activeOptionIndex:e,comboboxState:0,__demoMode:!1}}return{...n,comboboxState:0,__demoMode:!1}},3(n,r){return n.isTyping===r.isTyping?n:{...n,isTyping:r.isTyping}},2(n,r){var t,e,o,a;if((t=n.dataRef.current)!=null&&t.disabled||n.optionsElement&&!((e=n.dataRef.current)!=null&&e.optionsPropsRef.current.static)&&n.comboboxState===1)return n;if(n.virtual){let{options:d,disabled:u}=n.virtual,p=r.focus===ee.Specific?r.idx:Qn(r,{resolveItems:()=>d,resolveActiveIndex:()=>{var f,m;return(m=(f=n.activeOptionIndex)!=null?f:d.findIndex(v=>!u(v)))!=null?m:null},resolveDisabled:u,resolveId(){throw new Error("Function not implemented.")}}),h=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===p&&n.activationTrigger===h?n:{...n,activeOptionIndex:p,activationTrigger:h,isTyping:!1,__demoMode:!1}}let i=ua(n);if(i.activeOptionIndex===null){let d=i.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(i.activeOptionIndex=d)}let s=r.focus===ee.Specific?r.idx:Qn(r,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),l=(a=r.trigger)!=null?a:2;return n.activeOptionIndex===s&&n.activationTrigger===l?n:{...n,...i,isTyping:!1,activeOptionIndex:s,activationTrigger:l,__demoMode:!1}},4:(n,r)=>{var t,e,o;if((t=n.dataRef.current)!=null&&t.virtual)return{...n,options:[...n.options,r.payload]};let a=r.payload,i=ua(n,l=>(l.push(a),l));n.activeOptionIndex===null&&(e=n.dataRef.current)!=null&&e.isSelected(r.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(a));let s={...n,...i,activationTrigger:2};return(o=n.dataRef.current)!=null&&o.__demoMode&&n.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},5:(n,r)=>{var t;if((t=n.dataRef.current)!=null&&t.virtual)return{...n,options:n.options.filter(o=>o.id!==r.id)};let e=ua(n,o=>{let a=o.findIndex(i=>i.id===r.id);return a!==-1&&o.splice(a,1),o});return{...n,...e,activationTrigger:2}},6:(n,r)=>n.activationTrigger===r.trigger?n:{...n,activationTrigger:r.trigger},7:(n,r)=>{var t,e;if(n.virtual===null)return{...n,virtual:{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}};if(n.virtual.options===r.options&&n.virtual.disabled===r.disabled)return n;let o=n.activeOptionIndex;if(n.activeOptionIndex!==null){let a=r.options.indexOf(n.virtual.options[n.activeOptionIndex]);a!==-1?o=a:o=null}return{...n,activeOptionIndex:o,virtual:{options:r.options,disabled:(e=r.disabled)!=null?e:()=>!1}}},8:(n,r)=>n.inputElement===r.element?n:{...n,inputElement:r.element},9:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},10:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},ca=c.createContext(null);ca.displayName="ComboboxActionsContext";function Kn(n){let r=c.useContext(ca);if(r===null){let t=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Kn),t}return r}let Ws=c.createContext(null);function dp(n){let r=gn("VirtualProvider"),{options:t}=r.virtual,[e,o]=c.useMemo(()=>{let d=r.optionsElement;if(!d)return[0,0];let u=window.getComputedStyle(d);return[parseFloat(u.paddingBlockStart||u.paddingTop),parseFloat(u.paddingBlockEnd||u.paddingBottom)]},[r.optionsElement]),a=vd({enabled:t.length!==0,scrollPaddingStart:e,scrollPaddingEnd:o,count:t.length,estimateSize(){return 40},getScrollElement(){return r.optionsElement},overscan:12}),[i,s]=c.useState(0);ne(()=>{s(d=>d+1)},[t]);let l=a.getVirtualItems();return l.length===0?null:c.createElement(Ws.Provider,{value:a},c.createElement("div",{style:{position:"relative",width:"100%",height:`${a.getTotalSize()}px`},ref:d=>{if(d){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&t.length>r.activeOptionIndex&&a.scrollToIndex(r.activeOptionIndex)}}},l.map(d=>{var u;return c.createElement(c.Fragment,{key:d.key},c.cloneElement((u=n.children)==null?void 0:u.call(n,{...n.slot,option:t[d.index]}),{key:`${i}-${d.key}`,"data-index":d.index,"aria-setsize":t.length,"aria-posinset":d.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${d.start}px)`,overflowAnchor:"none"}}))})))}let qn=c.createContext(null);qn.displayName="ComboboxDataContext";function gn(n){let r=c.useContext(qn);if(r===null){let t=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,gn),t}return r}function fp(n,r){return Ne(r.type,cp,n,r)}let pp=c.Fragment;function mp(n,r){var t,e;let o=gr(),{value:a,defaultValue:i,onChange:s,form:l,name:d,by:u,disabled:p=o||!1,onClose:h,__demoMode:f=!1,multiple:m=!1,immediate:v=!1,virtual:g=null,nullable:b,...w}=n,x=xi(i),[E=m?[]:void 0,P]=wi(a,s,x),[M,_]=c.useReducer(fp,{dataRef:c.createRef(),comboboxState:f?0:1,isTyping:!1,options:[],virtual:g?{options:g.options,disabled:(t=g.disabled)!=null?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:f}),S=c.useRef(!1),I=c.useRef({static:!1,hold:!1}),Y=Li(u),k=j(q=>g?u===null?g.options.indexOf(q):g.options.findIndex(ve=>Y(ve,q)):M.options.findIndex(ve=>Y(ve.dataRef.current.value,q))),D=c.useCallback(q=>Ne(C.mode,{1:()=>E.some(ve=>Y(ve,q)),0:()=>Y(E,q)}),[E]),O=j(q=>M.activeOptionIndex===k(q)),C=c.useMemo(()=>({...M,immediate:v,optionsPropsRef:I,value:E,defaultValue:x,disabled:p,mode:m?1:0,virtual:g?M.virtual:null,get activeOptionIndex(){if(S.current&&M.activeOptionIndex===null&&(g?g.options.length>0:M.options.length>0)){if(g){let ve=g.options.findIndex(Re=>{var mt,ur;return!((ur=(mt=g.disabled)==null?void 0:mt.call(g,Re))!=null&&ur)});if(ve!==-1)return ve}let q=M.options.findIndex(ve=>!ve.dataRef.current.disabled);if(q!==-1)return q}return M.activeOptionIndex},calculateIndex:k,compare:Y,isSelected:D,isActive:O}),[E,x,p,m,f,M,g]);ne(()=>{var q;g&&_({type:7,options:g.options,disabled:(q=g.disabled)!=null?q:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),ne(()=>{M.dataRef.current=C},[C]);let A=C.comboboxState===0;Ho(A,[C.buttonElement,C.inputElement,C.optionsElement],()=>me.closeCombobox());let $=c.useMemo(()=>{var q,ve,Re;return{open:C.comboboxState===0,disabled:p,activeIndex:C.activeOptionIndex,activeOption:C.activeOptionIndex===null?null:C.virtual?C.virtual.options[(q=C.activeOptionIndex)!=null?q:0]:(Re=(ve=C.options[C.activeOptionIndex])==null?void 0:ve.dataRef.current.value)!=null?Re:null,value:E}},[C,p,E]),F=j(()=>{if(C.activeOptionIndex!==null){if(me.setIsTyping(!1),C.virtual)W(C.virtual.options[C.activeOptionIndex]);else{let{dataRef:q}=C.options[C.activeOptionIndex];W(q.current.value)}me.goToOption(ee.Specific,C.activeOptionIndex)}}),R=j(()=>{_({type:0}),S.current=!0}),H=j(()=>{_({type:1}),S.current=!1,h==null||h()}),K=j(q=>{_({type:3,isTyping:q})}),U=j((q,ve,Re)=>(S.current=!1,q===ee.Specific?_({type:2,focus:ee.Specific,idx:ve,trigger:Re}):_({type:2,focus:q,trigger:Re}))),G=j((q,ve)=>(_({type:4,payload:{id:q,dataRef:ve}}),()=>{C.isActive(ve.current.value)&&(S.current=!0),_({type:5,id:q})})),W=j(q=>Ne(C.mode,{0(){return P==null?void 0:P(q)},1(){let ve=C.value.slice(),Re=ve.findIndex(mt=>Y(mt,q));return Re===-1?ve.push(q):ve.splice(Re,1),P==null?void 0:P(ve)}})),xe=j(q=>{_({type:6,trigger:q})}),ue=j(q=>{_({type:8,element:q})}),Se=j(q=>{_({type:9,element:q})}),se=j(q=>{_({type:10,element:q})}),me=c.useMemo(()=>({onChange:W,registerOption:G,goToOption:U,setIsTyping:K,closeCombobox:H,openCombobox:R,setActivationTrigger:xe,selectActiveOption:F,setInputElement:ue,setButtonElement:Se,setOptionsElement:se}),[]),[He,Wt]=Ni(),he=r===null?{}:{ref:r},Oe=c.useCallback(()=>{if(x!==void 0)return P==null?void 0:P(x)},[P,x]);return c.createElement(Wt,{value:He,props:{htmlFor:(e=C.inputElement)==null?void 0:e.id},slot:{open:C.comboboxState===0,disabled:p}},c.createElement(Ts,null,c.createElement(ca.Provider,{value:me},c.createElement(qn.Provider,{value:C},c.createElement(aa,{value:Ne(C.comboboxState,{0:$e.Open,1:$e.Closed})},d!=null&&c.createElement(ki,{disabled:p,data:E!=null?{[d]:E}:{},form:l,onReset:Oe}),Ce({ourProps:he,theirProps:w,slot:$,defaultTag:pp,name:"Combobox"}))))))}let hp="input";function vp(n,r){var t,e,o,a,i;let s=gn("Combobox.Input"),l=Kn("Combobox.Input"),d=c.useId(),u=No(),{id:p=u||`headlessui-combobox-input-${d}`,onChange:h,displayValue:f,disabled:m=s.disabled||!1,autoFocus:v=!1,type:g="text",...b}=n,w=c.useRef(null),x=Ie(w,r,_s(),l.setInputElement),E=Mt(s.inputElement),P=vt(),M=j(()=>{l.onChange(null),s.optionsElement&&(s.optionsElement.scrollTop=0),l.goToOption(ee.Nothing)}),_=c.useMemo(()=>{var W;return typeof f=="function"&&s.value!==void 0?(W=f(s.value))!=null?W:"":typeof s.value=="string"?s.value:""},[s.value,f]);Hn(([W,xe],[ue,Se])=>{if(s.isTyping)return;let se=w.current;se&&((Se===0&&xe===1||W!==ue)&&(se.value=W),requestAnimationFrame(()=>{if(s.isTyping||!se||(E==null?void 0:E.activeElement)!==se)return;let{selectionStart:me,selectionEnd:He}=se;Math.abs((He??0)-(me??0))===0&&me===0&&se.setSelectionRange(se.value.length,se.value.length)}))},[_,s.comboboxState,E,s.isTyping]),Hn(([W],[xe])=>{if(W===0&&xe===1){if(s.isTyping)return;let ue=w.current;if(!ue)return;let Se=ue.value,{selectionStart:se,selectionEnd:me,selectionDirection:He}=ue;ue.value="",ue.value=Se,He!==null?ue.setSelectionRange(se,me,He):ue.setSelectionRange(se,me)}},[s.comboboxState]);let S=c.useRef(!1),I=j(()=>{S.current=!0}),Y=j(()=>{P.nextFrame(()=>{S.current=!1})}),k=j(W=>{switch(l.setIsTyping(!0),W.key){case ae.Enter:if(s.comboboxState!==0||S.current)return;if(W.preventDefault(),W.stopPropagation(),s.activeOptionIndex===null){l.closeCombobox();return}l.selectActiveOption(),s.mode===0&&l.closeCombobox();break;case ae.ArrowDown:return W.preventDefault(),W.stopPropagation(),Ne(s.comboboxState,{0:()=>l.goToOption(ee.Next),1:()=>l.openCombobox()});case ae.ArrowUp:return W.preventDefault(),W.stopPropagation(),Ne(s.comboboxState,{0:()=>l.goToOption(ee.Previous),1:()=>{Ee.flushSync(()=>l.openCombobox()),s.value||l.goToOption(ee.Last)}});case ae.Home:if(W.shiftKey)break;return W.preventDefault(),W.stopPropagation(),l.goToOption(ee.First);case ae.PageUp:return W.preventDefault(),W.stopPropagation(),l.goToOption(ee.First);case ae.End:if(W.shiftKey)break;return W.preventDefault(),W.stopPropagation(),l.goToOption(ee.Last);case ae.PageDown:return W.preventDefault(),W.stopPropagation(),l.goToOption(ee.Last);case ae.Escape:return s.comboboxState!==0?void 0:(W.preventDefault(),s.optionsElement&&!s.optionsPropsRef.current.static&&W.stopPropagation(),s.mode===0&&s.value===null&&M(),l.closeCombobox());case ae.Tab:if(s.comboboxState!==0)return;s.mode===0&&s.activationTrigger!==1&&l.selectActiveOption(),l.closeCombobox();break}}),D=j(W=>{h==null||h(W),s.mode===0&&W.target.value===""&&M(),l.openCombobox()}),O=j(W=>{var xe,ue,Se;let se=(xe=W.relatedTarget)!=null?xe:rt.find(me=>me!==W.currentTarget);if(!((ue=s.optionsElement)!=null&&ue.contains(se))&&!((Se=s.buttonElement)!=null&&Se.contains(se))&&s.comboboxState===0)return W.preventDefault(),s.mode===0&&s.value===null&&M(),l.closeCombobox()}),C=j(W=>{var xe,ue,Se;let se=(xe=W.relatedTarget)!=null?xe:rt.find(me=>me!==W.currentTarget);(ue=s.buttonElement)!=null&&ue.contains(se)||(Se=s.optionsElement)!=null&&Se.contains(se)||s.disabled||s.immediate&&s.comboboxState!==0&&P.microTask(()=>{Ee.flushSync(()=>l.openCombobox()),l.setActivationTrigger(1)})}),A=An(),$=Pi(),{isFocused:F,focusProps:R}=Oo({autoFocus:v}),{isHovered:H,hoverProps:K}=_o({isDisabled:m}),U=c.useMemo(()=>({open:s.comboboxState===0,disabled:m,hover:H,focus:F,autofocus:v}),[s,H,F,v,m]),G=Ln({ref:x,id:p,role:"combobox",type:g,"aria-controls":(t=s.optionsElement)==null?void 0:t.id,"aria-expanded":s.comboboxState===0,"aria-activedescendant":s.activeOptionIndex===null?void 0:s.virtual?(e=s.options.find(W=>!W.dataRef.current.disabled&&s.compare(W.dataRef.current.value,s.virtual.options[s.activeOptionIndex])))==null?void 0:e.id:(o=s.options[s.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":A,"aria-describedby":$,"aria-autocomplete":"list",defaultValue:(i=(a=n.defaultValue)!=null?a:s.defaultValue!==void 0?f==null?void 0:f(s.defaultValue):null)!=null?i:s.defaultValue,disabled:m||void 0,autoFocus:v,onCompositionStart:I,onCompositionEnd:Y,onKeyDown:k,onChange:D,onFocus:C,onBlur:O},R,K);return Ce({ourProps:G,theirProps:b,slot:U,defaultTag:hp,name:"Combobox.Input"})}let gp="button";function bp(n,r){var t;let e=gn("Combobox.Button"),o=Kn("Combobox.Button"),a=Ie(r,o.setButtonElement),i=bi(),s=c.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:d=e.disabled||!1,autoFocus:u=!1,...p}=n,h=Qi(e.inputElement),f=j(S=>{switch(S.key){case ae.Space:case ae.Enter:S.preventDefault(),S.stopPropagation(),e.comboboxState===1&&Ee.flushSync(()=>o.openCombobox()),h();return;case ae.ArrowDown:S.preventDefault(),S.stopPropagation(),e.comboboxState===1&&(Ee.flushSync(()=>o.openCombobox()),e.value||o.goToOption(ee.First)),h();return;case ae.ArrowUp:S.preventDefault(),S.stopPropagation(),e.comboboxState===1&&(Ee.flushSync(()=>o.openCombobox()),e.value||o.goToOption(ee.Last)),h();return;case ae.Escape:if(e.comboboxState!==0)return;S.preventDefault(),e.optionsElement&&!e.optionsPropsRef.current.static&&S.stopPropagation(),Ee.flushSync(()=>o.closeCombobox()),h();return;default:return}}),m=j(S=>{S.preventDefault(),!Si(S.currentTarget)&&(S.button===ia.Left&&(e.comboboxState===0?o.closeCombobox():o.openCombobox()),h())}),v=An([l]),{isFocusVisible:g,focusProps:b}=Oo({autoFocus:u}),{isHovered:w,hoverProps:x}=_o({isDisabled:d}),{pressed:E,pressProps:P}=gi({disabled:d}),M=c.useMemo(()=>({open:e.comboboxState===0,active:E||e.comboboxState===0,disabled:d,value:e.value,hover:w,focus:g}),[e,w,g,E,d]),_=Ln({ref:a,id:l,type:Ui(n,e.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=e.optionsElement)==null?void 0:t.id,"aria-expanded":e.comboboxState===0,"aria-labelledby":v,disabled:d||void 0,autoFocus:u,onMouseDown:m,onKeyDown:f},b,x,P);return Ce({mergeRefs:i,ourProps:_,theirProps:p,slot:M,defaultTag:gp,name:"Combobox.Button"})}let yp="div",wp=_t.RenderStrategy|_t.Static;function xp(n,r){var t,e,o;let a=c.useId(),{id:i=`headlessui-combobox-options-${a}`,hold:s=!1,anchor:l,portal:d=!1,modal:u=!0,transition:p=!1,...h}=n,f=gn("Combobox.Options"),m=Kn("Combobox.Options"),v=Ss(l);v&&(d=!0);let[g,b]=Ps(v),[w,x]=c.useState(null),E=Os(),P=Ie(r,v?g:null,m.setOptionsElement,x),M=Mt(f.optionsElement),_=vn(),[S,I]=zo(p,w,_!==null?(_&$e.Open)===$e.Open:f.comboboxState===0);Ao(S,f.inputElement,m.closeCombobox);let Y=f.__demoMode?!1:u&&f.comboboxState===0;Bo(Y,M);let k=f.__demoMode?!1:u&&f.comboboxState===0;$o(k,{allowed:c.useCallback(()=>[f.inputElement,f.buttonElement,f.optionsElement],[f.inputElement,f.buttonElement,f.optionsElement])}),ne(()=>{var U;f.optionsPropsRef.current.static=(U=n.static)!=null?U:!1},[f.optionsPropsRef,n.static]),ne(()=>{f.optionsPropsRef.current.hold=s},[f.optionsPropsRef,s]),jd(f.comboboxState===0,{container:f.optionsElement,accept(U){return U.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:U.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(U){U.setAttribute("role","none")}});let D=An([(t=f.buttonElement)==null?void 0:t.id]),O=c.useMemo(()=>({open:f.comboboxState===0,option:void 0}),[f.comboboxState]),C=j(()=>{m.setActivationTrigger(0)}),A=j(U=>{U.preventDefault(),m.setActivationTrigger(0)}),$=Ln(v?E():{},{"aria-labelledby":D,role:"listbox","aria-multiselectable":f.mode===1?!0:void 0,id:i,ref:P,style:{...h.style,...b,"--input-width":Fo(f.inputElement,!0).width,"--button-width":Fo(f.buttonElement,!0).width},onWheel:f.activationTrigger===0?void 0:C,onMouseDown:A,...Vo(I)}),F=S&&f.comboboxState===1,R=Ir(F,(e=f.virtual)==null?void 0:e.options),H=Ir(F,f.value),K=j(U=>f.compare(H,U));if(f.virtual){if(R===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(h,{children:c.createElement(qn.Provider,{value:R!==f.virtual.options?{...f,virtual:{...f.virtual,options:R}}:f},c.createElement(dp,{slot:O},h.children))})}return c.createElement(la,{enabled:d?n.static||S:!1},c.createElement(qn.Provider,{value:f.mode===1?f:{...f,isSelected:K}},Ce({ourProps:$,theirProps:{...h,children:c.createElement(Uf,{freeze:F},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,O):h.children)},slot:O,defaultTag:yp,features:wp,visible:S,name:"Combobox.Options"})))}let Dp="div";function Ep(n,r){var t,e,o,a;let i=gn("Combobox.Option"),s=Kn("Combobox.Option"),l=c.useId(),{id:d=`headlessui-combobox-option-${l}`,value:u,disabled:p=(o=(e=(t=i.virtual)==null?void 0:t.disabled)==null?void 0:e.call(t,u))!=null?o:!1,order:h=null,...f}=n,m=Qi(i.inputElement),v=i.virtual?i.activeOptionIndex===i.calculateIndex(u):i.activeOptionIndex===null?!1:((a=i.options[i.activeOptionIndex])==null?void 0:a.id)===d,g=i.isSelected(u),b=c.useRef(null),w=gt({disabled:p,value:u,domRef:b,order:h}),x=c.useContext(Ws),E=Ie(r,b,x?x.measureElement:null),P=j(()=>{s.setIsTyping(!1),s.onChange(u)});ne(()=>s.registerOption(d,w),[w,d]);let M=c.useRef(!(i.virtual||i.__demoMode));ne(()=>{if(!i.virtual&&!i.__demoMode)return Je().requestAnimationFrame(()=>{M.current=!0})},[i.virtual,i.__demoMode]),ne(()=>{if(M.current&&i.comboboxState===0&&v&&i.activationTrigger!==0)return Je().requestAnimationFrame(()=>{var C,A;(A=(C=b.current)==null?void 0:C.scrollIntoView)==null||A.call(C,{block:"nearest"})})},[b,v,i.comboboxState,i.activationTrigger,i.activeOptionIndex]);let _=j(C=>{C.preventDefault(),C.button===ia.Left&&(p||(P(),Bi()||requestAnimationFrame(()=>m()),i.mode===0&&s.closeCombobox()))}),S=j(()=>{if(p)return s.goToOption(ee.Nothing);let C=i.calculateIndex(u);s.goToOption(ee.Specific,C)}),I=qi(),Y=j(C=>I.update(C)),k=j(C=>{if(!I.wasMoved(C)||p||v)return;let A=i.calculateIndex(u);s.goToOption(ee.Specific,A,0)}),D=j(C=>{I.wasMoved(C)&&(p||v&&(i.optionsPropsRef.current.hold||s.goToOption(ee.Nothing)))}),O=c.useMemo(()=>({active:v,focus:v,selected:g,disabled:p}),[v,g,p]);return Ce({ourProps:{id:d,ref:E,role:"option",tabIndex:p===!0?void 0:-1,"aria-disabled":p===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:_,onFocus:S,onPointerEnter:Y,onMouseEnter:Y,onPointerMove:k,onMouseMove:k,onPointerLeave:D,onMouseLeave:D},theirProps:f,slot:O,defaultTag:Dp,name:"Combobox.Option"})}let Cp=ye(mp),kp=ye(bp),Hs=ye(vp),Sp=xr,Rs=ye(xp),Bs=ye(Ep),_p=Object.assign(Cp,{Input:Hs,Button:kp,Label:Sp,Options:Rs,Option:Bs});function Op(n,r=typeof document<"u"?document.defaultView:null,t){let e=ln(n,"escape");Ro(r,"keydown",o=>{e&&(o.defaultPrevented||o.key===ae.Escape&&t(o))})}function Pp(){var n;let[r]=c.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,e]=c.useState((n=r==null?void 0:r.matches)!=null?n:!1);return ne(()=>{if(!r)return;function o(a){e(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),t}function Mp({defaultContainers:n=[],portals:r,mainTreeNode:t}={}){let e=Mt(t),o=j(()=>{var a,i;let s=[];for(let l of n)l!==null&&(l instanceof HTMLElement?s.push(l):"current"in l&&l.current instanceof HTMLElement&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=e==null?void 0:e.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(t&&(l.contains(t)||l.contains((i=t==null?void 0:t.getRootNode())==null?void 0:i.host))||s.some(d=>l.contains(d))||s.push(l));return s});return{resolveContainers:o,contains:j(a=>o().some(i=>i.contains(a)))}}let Vs=c.createContext(null);function zs({children:n,node:r}){let[t,e]=c.useState(null),o=Qs(r??t);return c.createElement(Vs.Provider,{value:o},n,o===null&&c.createElement($n,{features:sn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=Vt(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(a)){e(l);break}}}}))}function Qs(n=null){var r;return(r=c.useContext(Vs))!=null?r:n}function da(){let n=c.useRef(!1);return ne(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Gn=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Gn||{});function Tp(){let n=c.useRef(0);return Vi(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function Us(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let t of n.current)t.current instanceof HTMLElement&&r.add(t.current);return r}let Np="div";var Kt=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Kt||{});function Ip(n,r){let t=c.useRef(null),e=Ie(t,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Un()||(s=0);let d=Mt(t);Ap(s,{ownerDocument:d});let u=Yp(s,{ownerDocument:d,container:t,initialFocus:o,initialFocusFallback:a});jp(s,{ownerDocument:d,container:t,containers:i,previousActiveElement:u});let p=Tp(),h=j(b=>{let w=t.current;w&&(x=>x())(()=>{Ne(p.current,{[Gn.Forwards]:()=>{un(w,Ze.First,{skipElements:[b.relatedTarget,a]})},[Gn.Backwards]:()=>{un(w,Ze.Last,{skipElements:[b.relatedTarget,a]})}})})}),f=ln(!!(s&2),"focus-trap#tab-lock"),m=vt(),v=c.useRef(!1),g={ref:e,onKeyDown(b){b.key=="Tab"&&(v.current=!0,m.requestAnimationFrame(()=>{v.current=!1}))},onBlur(b){if(!(s&4))return;let w=Us(i);t.current instanceof HTMLElement&&w.add(t.current);let x=b.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(Ks(w,x)||(v.current?un(t.current,Ne(p.current,{[Gn.Forwards]:()=>Ze.Next,[Gn.Backwards]:()=>Ze.Previous})|Ze.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&bt(b.target)))}};return c.createElement(c.Fragment,null,f&&c.createElement($n,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:sn.Focusable}),Ce({ourProps:g,theirProps:l,defaultTag:Np,name:"FocusTrap"}),f&&c.createElement($n,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:sn.Focusable}))}let Fp=ye(Ip),Lp=Object.assign(Fp,{features:Kt});function $p(n=!0){let r=c.useRef(rt.slice());return Hn(([t],[e])=>{e===!0&&t===!1&&vr(()=>{r.current.splice(0)}),e===!1&&t===!0&&(r.current=rt.slice())},[n,rt,r]),j(()=>{var t;return(t=r.current.find(e=>e!=null&&e.isConnected))!=null?t:null})}function Ap(n,{ownerDocument:r}){let t=!!(n&8),e=$p(t);Hn(()=>{t||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&bt(e())},[t]),Fs(()=>{t&&bt(e())})}function Yp(n,{ownerDocument:r,container:t,initialFocus:e,initialFocusFallback:o}){let a=c.useRef(null),i=ln(!!(n&1),"focus-trap#initial-focus"),s=da();return Hn(()=>{if(n===0)return;if(!i){o!=null&&o.current&&bt(o.current);return}let l=t.current;l&&vr(()=>{if(!s.current)return;let d=r==null?void 0:r.activeElement;if(e!=null&&e.current){if((e==null?void 0:e.current)===d){a.current=d;return}}else if(l.contains(d)){a.current=d;return}if(e!=null&&e.current)bt(e.current);else{if(n&16){if(un(l,Ze.First|Ze.AutoFocus)!==Yo.Error)return}else if(un(l,Ze.First)!==Yo.Error)return;if(o!=null&&o.current&&(bt(o.current),(r==null?void 0:r.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=r==null?void 0:r.activeElement})},[o,i,n]),a}function jp(n,{ownerDocument:r,container:t,containers:e,previousActiveElement:o}){let a=da(),i=!!(n&4);Ro(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=Us(e);t.current instanceof HTMLElement&&l.add(t.current);let d=o.current;if(!d)return;let u=s.target;u&&u instanceof HTMLElement?Ks(l,u)?(o.current=u,bt(u)):(s.preventDefault(),s.stopPropagation(),bt(d)):bt(o.current)},!0)}function Ks(n,r){for(let t of n)if(t.contains(r))return!0;return!1}function qs(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Xs)!==c.Fragment||c.Children.count(n.children)===1}let Lr=c.createContext(null);Lr.displayName="TransitionContext";var Wp=(n=>(n.Visible="visible",n.Hidden="hidden",n))(Wp||{});function Hp(){let n=c.useContext(Lr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function Rp(){let n=c.useContext($r);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let $r=c.createContext(null);$r.displayName="NestingContext";function Ar(n){return"children"in n?Ar(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Gs(n,r){let t=gt(n),e=c.useRef([]),o=da(),a=vt(),i=j((f,m=Ot.Hidden)=>{let v=e.current.findIndex(({el:g})=>g===f);v!==-1&&(Ne(m,{[Ot.Unmount](){e.current.splice(v,1)},[Ot.Hidden](){e.current[v].state="hidden"}}),a.microTask(()=>{var g;!Ar(e)&&o.current&&((g=t.current)==null||g.call(t))}))}),s=j(f=>{let m=e.current.find(({el:v})=>v===f);return m?m.state!=="visible"&&(m.state="visible"):e.current.push({el:f,state:"visible"}),()=>i(f,Ot.Unmount)}),l=c.useRef([]),d=c.useRef(Promise.resolve()),u=c.useRef({enter:[],leave:[]}),p=j((f,m,v)=>{l.current.splice(0),r&&(r.chains.current[m]=r.chains.current[m].filter(([g])=>g!==f)),r==null||r.chains.current[m].push([f,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[m].push([f,new Promise(g=>{Promise.all(u.current[m].map(([b,w])=>w)).then(()=>g())})]),m==="enter"?d.current=d.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(m)):v(m)}),h=j((f,m,v)=>{Promise.all(u.current[m].splice(0).map(([g,b])=>b)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(m))});return c.useMemo(()=>({children:e,register:s,unregister:i,onStart:p,onStop:h,wait:d,chains:u}),[s,i,e,p,h,u,d])}let Xs=c.Fragment,Js=_t.RenderStrategy;function Bp(n,r){var t,e;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:d,enterFrom:u,enterTo:p,entered:h,leave:f,leaveFrom:m,leaveTo:v,...g}=n,[b,w]=c.useState(null),x=c.useRef(null),E=qs(n),P=Ie(...E?[x,r,w]:r===null?[]:[r]),M=(t=g.unmount)==null||t?Ot.Unmount:Ot.Hidden,{show:_,appear:S,initial:I}=Hp(),[Y,k]=c.useState(_?"visible":"hidden"),D=Rp(),{register:O,unregister:C}=D;ne(()=>O(x),[O,x]),ne(()=>{if(M===Ot.Hidden&&x.current){if(_&&Y!=="visible"){k("visible");return}return Ne(Y,{hidden:()=>C(x),visible:()=>O(x)})}},[Y,x,O,C,_,M]);let A=Un();ne(()=>{if(E&&A&&Y==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,Y,A,E]);let $=I&&!S,F=S&&_&&I,R=c.useRef(!1),H=Gs(()=>{R.current||(k("hidden"),C(x))},D),K=j(Se=>{R.current=!0;let se=Se?"enter":"leave";H.onStart(x,se,me=>{me==="enter"?a==null||a():me==="leave"&&(s==null||s())})}),U=j(Se=>{let se=Se?"enter":"leave";R.current=!1,H.onStop(x,se,me=>{me==="enter"?i==null||i():me==="leave"&&(l==null||l())}),se==="leave"&&!Ar(H)&&(k("hidden"),C(x))});c.useEffect(()=>{E&&o||(K(_),U(_))},[_,E,o]);let G=!(!o||!E||!A||$),[,W]=zo(G,b,_,{start:K,end:U}),xe=Pt({ref:P,className:((e=Mo(g.className,F&&d,F&&u,W.enter&&d,W.enter&&W.closed&&u,W.enter&&!W.closed&&p,W.leave&&f,W.leave&&!W.closed&&m,W.leave&&W.closed&&v,!W.transition&&_&&h))==null?void 0:e.trim())||void 0,...Vo(W)}),ue=0;return Y==="visible"&&(ue|=$e.Open),Y==="hidden"&&(ue|=$e.Closed),W.enter&&(ue|=$e.Opening),W.leave&&(ue|=$e.Closing),c.createElement($r.Provider,{value:H},c.createElement(aa,{value:ue},Ce({ourProps:xe,theirProps:g,defaultTag:Xs,features:Js,visible:Y==="visible",name:"Transition.Child"})))}function Vp(n,r){let{show:t,appear:e=!1,unmount:o=!0,...a}=n,i=c.useRef(null),s=qs(n),l=Ie(...s?[i,r]:r===null?[]:[r]);Un();let d=vn();if(t===void 0&&d!==null&&(t=(d&$e.Open)===$e.Open),t===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,p]=c.useState(t?"visible":"hidden"),h=Gs(()=>{t||p("hidden")}),[f,m]=c.useState(!0),v=c.useRef([t]);ne(()=>{f!==!1&&v.current[v.current.length-1]!==t&&(v.current.push(t),m(!1))},[v,t]);let g=c.useMemo(()=>({show:t,appear:e,initial:f}),[t,e,f]);ne(()=>{t?p("visible"):!Ar(h)&&i.current!==null&&p("hidden")},[t,h]);let b={unmount:o},w=j(()=>{var E;f&&m(!1),(E=n.beforeEnter)==null||E.call(n)}),x=j(()=>{var E;f&&m(!1),(E=n.beforeLeave)==null||E.call(n)});return c.createElement($r.Provider,{value:h},c.createElement(Lr.Provider,{value:g},Ce({ourProps:{...b,as:c.Fragment,children:c.createElement(Zs,{ref:l,...b,...a,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:c.Fragment,features:Js,visible:u==="visible",name:"Transition"})))}function zp(n,r){let t=c.useContext(Lr)!==null,e=vn()!==null;return c.createElement(c.Fragment,null,!t&&e?c.createElement(fa,{ref:r,...n}):c.createElement(Zs,{ref:r,...n}))}let fa=ye(Vp),Zs=ye(Bp),pa=ye(zp),el=Object.assign(fa,{Child:pa,Root:fa});var Qp=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Qp||{}),Up=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(Up||{});let Kp={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},ma=c.createContext(null);ma.displayName="DialogContext";function Yr(n){let r=c.useContext(ma);if(r===null){let t=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Yr),t}return r}function qp(n,r){return Ne(r.type,Kp,n,r)}let tl=ye(function(n,r){let t=c.useId(),{id:e=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:d=!1,unmount:u=!1,...p}=n,h=c.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(h.current||(h.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=vn();o===void 0&&f!==null&&(o=(f&$e.Open)===$e.Open);let m=c.useRef(null),v=Ie(m,r),g=Mt(m),b=o?0:1,[w,x]=c.useReducer(qp,{titleId:null,descriptionId:null,panelRef:c.createRef()}),E=j(()=>a(!1)),P=j(K=>x({type:0,id:K})),M=Un()?b===0:!1,[_,S]=op(),I={get current(){var K;return(K=w.panelRef.current)!=null?K:m.current}},Y=Qs(),{resolveContainers:k}=Mp({mainTreeNode:Y,portals:_,defaultContainers:[I]}),D=f!==null?(f&$e.Closing)===$e.Closing:!1;$o(d||D?!1:M,{allowed:j(()=>{var K,U;return[(U=(K=m.current)==null?void 0:K.closest("[data-headlessui-portal]"))!=null?U:null]}),disallowed:j(()=>{var K;return[(K=Y==null?void 0:Y.closest("body > *:not(#headlessui-portal-root)"))!=null?K:null]})}),Ho(M,k,K=>{K.preventDefault(),E()}),Op(M,g==null?void 0:g.defaultView,K=>{K.preventDefault(),K.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),Bo(d||D?!1:M,g,k),Ao(M,m,E);let[O,C]=Kc(),A=c.useMemo(()=>[{dialogState:b,close:E,setTitleId:P,unmount:u},w],[b,w,E,P,u]),$=c.useMemo(()=>({open:b===0}),[b]),F={ref:v,id:e,role:s,tabIndex:-1,"aria-modal":d?void 0:b===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":O,unmount:u},R=!Pp(),H=Kt.None;return M&&!d&&(H|=Kt.RestoreFocus,H|=Kt.TabLock,l&&(H|=Kt.AutoFocus),R&&(H|=Kt.InitialFocus)),c.createElement(Kf,null,c.createElement($s,{force:!0},c.createElement(la,null,c.createElement(ma.Provider,{value:A},c.createElement(js,{target:m},c.createElement($s,{force:!1},c.createElement(C,{slot:$},c.createElement(S,null,c.createElement(Lp,{initialFocus:i,initialFocusFallback:m,containers:k,features:H},c.createElement(nd,{value:E},Ce({ourProps:F,theirProps:p,slot:$,defaultTag:Gp,features:Xp,visible:b===0,name:"Dialog"})))))))))))}),Gp="div",Xp=_t.RenderStrategy|_t.Static;function Jp(n,r){let{transition:t=!1,open:e,...o}=n,a=vn(),i=n.hasOwnProperty("open")||a!==null,s=n.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(e!==void 0||t)&&!o.static?c.createElement(zs,null,c.createElement(el,{show:e,transition:t,unmount:o.unmount},c.createElement(tl,{ref:r,...o}))):c.createElement(zs,null,c.createElement(tl,{ref:r,open:e,...o}))}let Zp="div";function em(n,r){let t=c.useId(),{id:e=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Yr("Dialog.Panel"),d=Ie(r,l.panelRef),u=c.useMemo(()=>({open:i===0}),[i]),p=j(f=>{f.stopPropagation()}),h={ref:d,id:e,onClick:p};return c.createElement(o?pa:c.Fragment,{...o?{unmount:s}:{}},Ce({ourProps:h,theirProps:a,slot:u,defaultTag:Zp,name:"Dialog.Panel"}))}let tm="div";function nm(n,r){let{transition:t=!1,...e}=n,[{dialogState:o,unmount:a}]=Yr("Dialog.Backdrop"),i=c.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0};return c.createElement(t?pa:c.Fragment,{...t?{unmount:a}:{}},Ce({ourProps:s,theirProps:e,slot:i,defaultTag:tm,name:"Dialog.Backdrop"}))}let rm="h2";function om(n,r){let t=c.useId(),{id:e=`headlessui-dialog-title-${t}`,...o}=n,[{dialogState:a,setTitleId:i}]=Yr("Dialog.Title"),s=Ie(r);c.useEffect(()=>(i(e),()=>i(null)),[e,i]);let l=c.useMemo(()=>({open:a===0}),[a]);return Ce({ourProps:{ref:s,id:e},theirProps:o,slot:l,defaultTag:rm,name:"Dialog.Title"})}let am=ye(Jp),nl=ye(em);ye(nm);let rl=ye(om),Xn=Object.assign(am,{Panel:nl,Title:rl,Description:Mi});function im(n,r){let t=c.useRef({left:0,top:0});if(ne(()=>{if(!r)return;let o=r.getBoundingClientRect();o&&(t.current=o)},[n,r]),r==null||!n||r===document.activeElement)return!1;let e=r.getBoundingClientRect();return e.top!==t.current.top||e.left!==t.current.left}let ol=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function al(n){var r,t;let e=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!(o instanceof HTMLElement))return e;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(t=o.innerText)!=null?t:"":e;return ol.test(i)&&(i=i.replace(ol,"")),i}function sm(n){let r=n.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=n.getAttribute("aria-labelledby");if(t){let e=t.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():al(a).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return al(n).trim()}function lm(n){let r=c.useRef(""),t=c.useRef("");return j(()=>{let e=n.current;if(!e)return"";let o=e.innerText;if(r.current===o)return t.current;let a=sm(e).trim().toLowerCase();return r.current=o,t.current=a,a})}var um=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(um||{}),cm=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(cm||{}),dm=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(dm||{}),fm=(n=>(n[n.OpenListbox=0]="OpenListbox",n[n.CloseListbox=1]="CloseListbox",n[n.GoToOption=2]="GoToOption",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterOption=5]="RegisterOption",n[n.UnregisterOption=6]="UnregisterOption",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetOptionsElement=8]="SetOptionsElement",n))(fm||{});function ha(n,r=t=>t){let t=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,e=Wo(r(n.options.slice()),a=>a.dataRef.current.domRef.current),o=t?e.indexOf(t):null;return o===-1&&(o=null),{options:e,activeOptionIndex:o}}let pm={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(n){if(n.dataRef.current.disabled||n.listboxState===0)return n;let r=n.activeOptionIndex,{isSelected:t}=n.dataRef.current,e=n.options.findIndex(o=>t(o.dataRef.current.value));return e!==-1&&(r=e),{...n,listboxState:0,activeOptionIndex:r,__demoMode:!1}},2(n,r){var t,e,o,a,i;if(n.dataRef.current.disabled||n.listboxState===1)return n;let s={...n,searchQuery:"",activationTrigger:(t=r.trigger)!=null?t:1,__demoMode:!1};if(r.focus===ee.Nothing)return{...s,activeOptionIndex:null};if(r.focus===ee.Specific)return{...s,activeOptionIndex:n.options.findIndex(u=>u.id===r.id)};if(r.focus===ee.Previous){let u=n.activeOptionIndex;if(u!==null){let p=n.options[u].dataRef.current.domRef,h=Qn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(h!==null){let f=n.options[h].dataRef.current.domRef;if(((e=p.current)==null?void 0:e.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(r.focus===ee.Next){let u=n.activeOptionIndex;if(u!==null){let p=n.options[u].dataRef.current.domRef,h=Qn(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(h!==null){let f=n.options[h].dataRef.current.domRef;if(((a=p.current)==null?void 0:a.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:h}}}}let l=ha(n),d=Qn(r,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...s,...l,activeOptionIndex:d}},3:(n,r)=>{if(n.dataRef.current.disabled||n.listboxState===1)return n;let t=n.searchQuery!==""?0:1,e=n.searchQuery+r.value.toLowerCase(),o=(n.activeOptionIndex!==null?n.options.slice(n.activeOptionIndex+t).concat(n.options.slice(0,n.activeOptionIndex+t)):n.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(e))}),a=o?n.options.indexOf(o):-1;return a===-1||a===n.activeOptionIndex?{...n,searchQuery:e}:{...n,searchQuery:e,activeOptionIndex:a,activationTrigger:1}},4(n){return n.dataRef.current.disabled||n.listboxState===1||n.searchQuery===""?n:{...n,searchQuery:""}},5:(n,r)=>{let t={id:r.id,dataRef:r.dataRef},e=ha(n,o=>[...o,t]);return n.activeOptionIndex===null&&n.dataRef.current.isSelected(r.dataRef.current.value)&&(e.activeOptionIndex=e.options.indexOf(t)),{...n,...e}},6:(n,r)=>{let t=ha(n,e=>{let o=e.findIndex(a=>a.id===r.id);return o!==-1&&e.splice(o,1),e});return{...n,...t,activationTrigger:1}},7:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},8:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},va=c.createContext(null);va.displayName="ListboxActionsContext";function jr(n){let r=c.useContext(va);if(r===null){let t=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,jr),t}return r}let Wr=c.createContext(null);Wr.displayName="ListboxDataContext";function Jn(n){let r=c.useContext(Wr);if(r===null){let t=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Jn),t}return r}function mm(n,r){return Ne(r.type,pm,n,r)}let hm=c.Fragment;function vm(n,r){var t;let e=gr(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:d,invalid:u=!1,disabled:p=e||!1,horizontal:h=!1,multiple:f=!1,__demoMode:m=!1,...v}=n;const g=h?"horizontal":"vertical";let b=Ie(r),w=xi(a),[x=f?[]:void 0,E]=wi(o,l,w),[P,M]=c.useReducer(mm,{dataRef:c.createRef(),listboxState:m?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:m}),_=c.useRef({static:!1,hold:!1}),S=c.useRef(new Map),I=Li(d),Y=c.useCallback(he=>Ne(k.mode,{1:()=>x.some(Oe=>I(Oe,he)),0:()=>I(x,he)}),[x]),k=c.useMemo(()=>({...P,value:x,disabled:p,invalid:u,mode:f?1:0,orientation:g,compare:I,isSelected:Y,optionsPropsRef:_,listRef:S}),[x,p,u,f,P,S]);ne(()=>{P.dataRef.current=k},[k]);let D=k.listboxState===0;Ho(D,[k.buttonElement,k.optionsElement],(he,Oe)=>{var q;M({type:1}),Hi(Oe,jo.Loose)||(he.preventDefault(),(q=k.buttonElement)==null||q.focus())});let O=c.useMemo(()=>({open:k.listboxState===0,disabled:p,invalid:u,value:x}),[k,p,x,u]),C=j(he=>{let Oe=k.options.find(q=>q.id===he);Oe&&U(Oe.dataRef.current.value)}),A=j(()=>{if(k.activeOptionIndex!==null){let{dataRef:he,id:Oe}=k.options[k.activeOptionIndex];U(he.current.value),M({type:2,focus:ee.Specific,id:Oe})}}),$=j(()=>M({type:0})),F=j(()=>M({type:1})),R=vt(),H=j((he,Oe,q)=>{R.dispose(),R.microTask(()=>he===ee.Specific?M({type:2,focus:ee.Specific,id:Oe,trigger:q}):M({type:2,focus:he,trigger:q}))}),K=j((he,Oe)=>(M({type:5,id:he,dataRef:Oe}),()=>M({type:6,id:he}))),U=j(he=>Ne(k.mode,{0(){return E==null?void 0:E(he)},1(){let Oe=k.value.slice(),q=Oe.findIndex(ve=>I(ve,he));return q===-1?Oe.push(he):Oe.splice(q,1),E==null?void 0:E(Oe)}})),G=j(he=>M({type:3,value:he})),W=j(()=>M({type:4})),xe=j(he=>{M({type:7,element:he})}),ue=j(he=>{M({type:8,element:he})}),Se=c.useMemo(()=>({onChange:U,registerOption:K,goToOption:H,closeListbox:F,openListbox:$,selectActiveOption:A,selectOption:C,search:G,clearSearch:W,setButtonElement:xe,setOptionsElement:ue}),[]),[se,me]=Ni({inherit:!0}),He={ref:b},Wt=c.useCallback(()=>{if(w!==void 0)return E==null?void 0:E(w)},[E,w]);return c.createElement(me,{value:se,props:{htmlFor:(t=k.buttonElement)==null?void 0:t.id},slot:{open:k.listboxState===0,disabled:p}},c.createElement(Ts,null,c.createElement(va.Provider,{value:Se},c.createElement(Wr.Provider,{value:k},c.createElement(aa,{value:Ne(k.listboxState,{0:$e.Open,1:$e.Closed})},s!=null&&x!=null&&c.createElement(ki,{disabled:p,data:{[s]:x},form:i,onReset:Wt}),Ce({ourProps:He,theirProps:v,slot:O,defaultTag:hm,name:"Listbox"}))))))}let gm="button";function bm(n,r){var t;let e=Jn("Listbox.Button"),o=jr("Listbox.Button"),a=c.useId(),i=No(),{id:s=i||`headlessui-listbox-button-${a}`,disabled:l=e.disabled||!1,autoFocus:d=!1,...u}=n,p=bi(),h=Ie(r,_s(),o.setButtonElement),f=Vf(),m=j(D=>{switch(D.key){case ae.Enter:jc(D.currentTarget);break;case ae.Space:case ae.ArrowDown:D.preventDefault(),Ee.flushSync(()=>o.openListbox()),e.value||o.goToOption(ee.First);break;case ae.ArrowUp:D.preventDefault(),Ee.flushSync(()=>o.openListbox()),e.value||o.goToOption(ee.Last);break}}),v=j(D=>{switch(D.key){case ae.Space:D.preventDefault();break}}),g=j(D=>{var O;if(Si(D.currentTarget))return D.preventDefault();e.listboxState===0?(Ee.flushSync(()=>o.closeListbox()),(O=e.buttonElement)==null||O.focus({preventScroll:!0})):(D.preventDefault(),o.openListbox())}),b=j(D=>D.preventDefault()),w=An([s]),x=Pi(),{isFocusVisible:E,focusProps:P}=Oo({autoFocus:d}),{isHovered:M,hoverProps:_}=_o({isDisabled:l}),{pressed:S,pressProps:I}=gi({disabled:l}),Y=c.useMemo(()=>({open:e.listboxState===0,active:S||e.listboxState===0,disabled:l,invalid:e.invalid,value:e.value,hover:M,focus:E,autofocus:d}),[e.listboxState,e.value,l,M,E,S,e.invalid,d]),k=Ln(f(),{ref:h,id:s,type:Ui(n,e.buttonElement),"aria-haspopup":"listbox","aria-controls":(t=e.optionsElement)==null?void 0:t.id,"aria-expanded":e.listboxState===0,"aria-labelledby":w,"aria-describedby":x,disabled:l||void 0,autoFocus:d,onKeyDown:m,onKeyUp:v,onKeyPress:b,onClick:g},P,_,I);return Ce({mergeRefs:p,ourProps:k,theirProps:u,slot:Y,defaultTag:gm,name:"Listbox.Button"})}let il=c.createContext(!1),ym="div",wm=_t.RenderStrategy|_t.Static;function xm(n,r){var t,e;let o=c.useId(),{id:a=`headlessui-listbox-options-${o}`,anchor:i,portal:s=!1,modal:l=!0,transition:d=!1,...u}=n,p=Ss(i),[h,f]=c.useState(null);p&&(s=!0);let m=Jn("Listbox.Options"),v=jr("Listbox.Options"),g=Mt(m.optionsElement),b=vn(),[w,x]=zo(d,h,b!==null?(b&$e.Open)===$e.Open:m.listboxState===0);Ao(w,m.buttonElement,v.closeListbox);let E=m.__demoMode?!1:l&&m.listboxState===0;Bo(E,g);let P=m.__demoMode?!1:l&&m.listboxState===0;$o(P,{allowed:c.useCallback(()=>[m.buttonElement,m.optionsElement],[m.buttonElement,m.optionsElement])});let M=m.listboxState!==0,_=im(M,m.buttonElement)?!1:w,S=w&&m.listboxState===1,I=Ir(S,m.value),Y=j(G=>m.compare(I,G)),k=c.useMemo(()=>{var G;if(p==null||!((G=p==null?void 0:p.to)!=null&&G.includes("selection")))return null;let W=m.options.findIndex(xe=>Y(xe.dataRef.current.value));return W===-1&&(W=0),W},[p,m.options]),D=(()=>{if(p==null)return;if(k===null)return{...p,inner:void 0};let G=Array.from(m.listRef.current.values());return{...p,inner:{listRef:{current:G},index:k}}})(),[O,C]=Ps(D),A=Os(),$=Ie(r,p?O:null,v.setOptionsElement,f),F=vt();c.useEffect(()=>{var G;let W=m.optionsElement;W&&m.listboxState===0&&W!==((G=Vt(W))==null?void 0:G.activeElement)&&(W==null||W.focus({preventScroll:!0}))},[m.listboxState,m.optionsElement]);let R=j(G=>{var W,xe;switch(F.dispose(),G.key){case ae.Space:if(m.searchQuery!=="")return G.preventDefault(),G.stopPropagation(),v.search(G.key);case ae.Enter:if(G.preventDefault(),G.stopPropagation(),m.activeOptionIndex!==null){let{dataRef:ue}=m.options[m.activeOptionIndex];v.onChange(ue.current.value)}m.mode===0&&(Ee.flushSync(()=>v.closeListbox()),(W=m.buttonElement)==null||W.focus({preventScroll:!0}));break;case Ne(m.orientation,{vertical:ae.ArrowDown,horizontal:ae.ArrowRight}):return G.preventDefault(),G.stopPropagation(),v.goToOption(ee.Next);case Ne(m.orientation,{vertical:ae.ArrowUp,horizontal:ae.ArrowLeft}):return G.preventDefault(),G.stopPropagation(),v.goToOption(ee.Previous);case ae.Home:case ae.PageUp:return G.preventDefault(),G.stopPropagation(),v.goToOption(ee.First);case ae.End:case ae.PageDown:return G.preventDefault(),G.stopPropagation(),v.goToOption(ee.Last);case ae.Escape:G.preventDefault(),G.stopPropagation(),Ee.flushSync(()=>v.closeListbox()),(xe=m.buttonElement)==null||xe.focus({preventScroll:!0});return;case ae.Tab:G.preventDefault(),G.stopPropagation(),Ee.flushSync(()=>v.closeListbox()),_d(m.buttonElement,G.shiftKey?Ze.Previous:Ze.Next);break;default:G.key.length===1&&(v.search(G.key),F.setTimeout(()=>v.clearSearch(),350));break}}),H=(t=m.buttonElement)==null?void 0:t.id,K=c.useMemo(()=>({open:m.listboxState===0}),[m.listboxState]),U=Ln(p?A():{},{id:a,ref:$,"aria-activedescendant":m.activeOptionIndex===null||(e=m.options[m.activeOptionIndex])==null?void 0:e.id,"aria-multiselectable":m.mode===1?!0:void 0,"aria-labelledby":H,"aria-orientation":m.orientation,onKeyDown:R,role:"listbox",tabIndex:m.listboxState===0?0:void 0,style:{...u.style,...C,"--button-width":Fo(m.buttonElement,!0).width},...Vo(x)});return c.createElement(la,{enabled:s?n.static||w:!1},c.createElement(Wr.Provider,{value:m.mode===1?m:{...m,isSelected:Y}},Ce({ourProps:U,theirProps:u,slot:K,defaultTag:ym,features:wm,visible:_,name:"Listbox.Options"})))}let Dm="div";function Em(n,r){let t=c.useId(),{id:e=`headlessui-listbox-option-${t}`,disabled:o=!1,value:a,...i}=n,s=c.useContext(il)===!0,l=Jn("Listbox.Option"),d=jr("Listbox.Option"),u=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===e:!1,p=l.isSelected(a),h=c.useRef(null),f=lm(h),m=gt({disabled:o,value:a,domRef:h,get textValue(){return f()}}),v=Ie(r,h,S=>{S?l.listRef.current.set(e,S):l.listRef.current.delete(e)});ne(()=>{if(!l.__demoMode&&l.listboxState===0&&u&&l.activationTrigger!==0)return Je().requestAnimationFrame(()=>{var S,I;(I=(S=h.current)==null?void 0:S.scrollIntoView)==null||I.call(S,{block:"nearest"})})},[h,u,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),ne(()=>{if(!s)return d.registerOption(e,m)},[m,e,s]);let g=j(S=>{var I;if(o)return S.preventDefault();d.onChange(a),l.mode===0&&(Ee.flushSync(()=>d.closeListbox()),(I=l.buttonElement)==null||I.focus({preventScroll:!0}))}),b=j(()=>{if(o)return d.goToOption(ee.Nothing);d.goToOption(ee.Specific,e)}),w=qi(),x=j(S=>{w.update(S),!o&&(u||d.goToOption(ee.Specific,e,0))}),E=j(S=>{w.wasMoved(S)&&(o||u||d.goToOption(ee.Specific,e,0))}),P=j(S=>{w.wasMoved(S)&&(o||u&&d.goToOption(ee.Nothing))}),M=c.useMemo(()=>({active:u,focus:u,selected:p,disabled:o,selectedOption:p&&s}),[u,p,o,s]);return!p&&s?null:Ce({ourProps:s?{}:{id:e,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":p,disabled:void 0,onClick:g,onFocus:b,onPointerEnter:x,onMouseEnter:x,onPointerMove:E,onMouseMove:E,onPointerLeave:P,onMouseLeave:P},theirProps:i,slot:M,defaultTag:Dm,name:"Listbox.Option"})}let Cm=c.Fragment;function km(n,r){let{options:t,placeholder:e,...o}=n,a={ref:Ie(r)},i=Jn("ListboxSelectedOption"),s=c.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===1&&Array.isArray(i.value)&&i.value.length===0;return c.createElement(il.Provider,{value:!0},Ce({ourProps:a,theirProps:{...o,children:c.createElement(c.Fragment,null,e&&l?e:t)},slot:s,defaultTag:Cm,name:"ListboxSelectedOption"}))}let Sm=ye(vm),sl=ye(bm),_m=xr,ll=ye(xm),ul=ye(Em),Om=ye(km),Pm=Object.assign(Sm,{Button:sl,Label:_m,Options:ll,Option:ul,SelectedOption:Om});const Mm=({checked:n,label:r,onChange:t,termImageUrl:e})=>{const[o,a]=c.useState(!1);return N.jsxs(N.Fragment,{children:[N.jsx(Tm,{isOpen:o,setIsOpen:a,termImageUrl:e}),N.jsxs("div",{className:"inline-flex items-center",children:[N.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[N.jsx("input",{type:"checkbox",className:"before:content[''] border-blue-gray-200 before:bg-blue-gray-500 peer relative size-6 cursor-pointer appearance-none rounded-xl border bg-[#C5C8CD] transition-all before:absolute before:left-2/4 before:top-2/4 before:block before:h-12 before:w-12 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity checked:border-petnowOrange checked:bg-petnowOrange checked:before:bg-petnowOrange",id:r,checked:n,onChange:i=>{t(i.target.checked)}}),N.jsx("span",{className:"pointer-events-none absolute left-2/4 top-2/4 -translate-x-2/4 -translate-y-2/4 text-[#8B919A] transition peer-checked:text-white",children:N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:N.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),r&&N.jsxs("div",{className:"flex items-center",children:[N.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),N.jsx(hc,{onClick:()=>{a(!0)},className:"ml-2 mt-[2.5px] cursor-pointer text-deepGray",size:24})]})]})]})},Tm=({isOpen:n,setIsOpen:r,termImageUrl:t})=>N.jsxs(Xn,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[N.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),N.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:N.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:N.jsxs(Xn.Panel,{className:"mx-auto flex max-w-sm flex-col items-center gap-8 rounded bg-white",children:[N.jsx("div",{className:"flex h-[36px] w-full flex-row-reverse items-center bg-[#F0F1F2]",children:N.jsx(si,{size:20,className:"mr-2",onClick:()=>r(!1)})}),N.jsx("img",{src:t,alt:"약관동의 이미지"}),N.jsx(ni,{text:"닫기",className:"mb-4 w-[90%] text-base focus:outline-none",onClick:()=>r(!1)})]})})})]});var cl={},dl={},Hr={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.postcodeScriptUrl=void 0;var r="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";n.postcodeScriptUrl="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";var t=function(){var o=null;return function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:r;return o||(o=new Promise(function(i,s){var l=document.createElement("script");l.src=a,l.onload=function(){var d,u;return(d=window)!==null&&d!==void 0&&(u=d.daum)!==null&&u!==void 0&&u.Postcode?i(window.daum.Postcode):void s(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."))},l.onerror=function(d){return s(d)},l.id="daum_postcode_script",document.body.appendChild(l)}),o)}}(),e=t;n.default=e})(Hr),function(n){function r(k){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},r(k)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=i(c),e=i(Hr),o=["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"];function a(k){if(typeof WeakMap!="function")return null;var D=new WeakMap,O=new WeakMap;return(a=function(C){return C?O:D})(k)}function i(k,D){if(k&&k.__esModule)return k;if(k===null||r(k)!=="object"&&typeof k!="function")return{default:k};var O=a(D);if(O&&O.has(k))return O.get(k);var C={},A=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $ in k)if($!="default"&&Object.prototype.hasOwnProperty.call(k,$)){var F=A?Object.getOwnPropertyDescriptor(k,$):null;F&&(F.get||F.set)?Object.defineProperty(C,$,F):C[$]=k[$]}return C.default=k,O&&O.set(k,C),C}function s(k,D){var O=Object.keys(k);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(k);D&&(C=C.filter(function(A){return Object.getOwnPropertyDescriptor(k,A).enumerable})),O.push.apply(O,C)}return O}function l(k){for(var D,O=1;O<arguments.length;O++)D=arguments[O]==null?{}:arguments[O],O%2?s(Object(D),!0).forEach(function(C){P(k,C,D[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(D)):s(Object(D)).forEach(function(C){Object.defineProperty(k,C,Object.getOwnPropertyDescriptor(D,C))});return k}function d(k,D){if(k==null)return{};var O,C,A=u(k,D);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(k);for(C=0;C<$.length;C++)O=$[C],0<=D.indexOf(O)||Object.prototype.propertyIsEnumerable.call(k,O)&&(A[O]=k[O])}return A}function u(k,D){if(k==null)return{};var O,C,A={},$=Object.keys(k);for(C=0;C<$.length;C++)O=$[C],0<=D.indexOf(O)||(A[O]=k[O]);return A}function p(k,D){if(!(k instanceof D))throw new TypeError("Cannot call a class as a function")}function h(k,D){for(var O,C=0;C<D.length;C++)O=D[C],O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}function f(k,D,O){return D&&h(k.prototype,D),k}function m(k,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(D&&D.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),D&&v(k,D)}function v(k,D){return v=Object.setPrototypeOf||function(O,C){return O.__proto__=C,O},v(k,D)}function g(k){var D=x();return function(){var O,C=E(k);if(D){var A=E(this).constructor;O=Reflect.construct(C,arguments,A)}else O=C.apply(this,arguments);return b(this,O)}}function b(k,D){return D&&(r(D)==="object"||typeof D=="function")?D:w(k)}function w(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function x(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(k){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)},E(k)}function P(k,D,O){return D in k?Object.defineProperty(k,D,{value:O,enumerable:!0,configurable:!0,writable:!0}):k[D]=O,k}var M=t.default.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),_={width:"100%",height:400},S={scriptUrl:e.postcodeScriptUrl,errorMessage:M,autoClose:!0},I=function(k){function D(){var C;p(this,D);for(var A=arguments.length,$=Array(A),F=0;F<A;F++)$[F]=arguments[F];return C=O.call.apply(O,[this].concat($)),P(w(C),"mounted",!1),P(w(C),"wrap",(0,t.createRef)()),P(w(C),"state",{hasError:!1}),P(w(C),"initiate",function(R){if(C.wrap.current){var H=C.props;H.scriptUrl,H.className,H.style;var K=H.defaultQuery,U=H.autoClose;H.errorMessage;var G=H.onComplete,W=H.onClose,xe=H.onResize,ue=H.onSearch,Se=d(H,o),se=new R(l(l({},Se),{},{oncomplete:function(He){G&&G(He),U&&C.wrap.current&&C.wrap.current.remove()},onsearch:ue,onresize:xe,onclose:W,width:"100%",height:"100%"}));se.embed(C.wrap.current,{q:K,autoClose:U})}}),P(w(C),"onError",function(R){console.error(R),C.setState({hasError:!0})}),C}m(D,k);var O=g(D);return f(D,[{key:"componentDidMount",value:function(){var A=this.initiate,$=this.onError,F=this.props.scriptUrl;F&&(this.mounted||((0,e.default)(F).then(A).catch($),this.mounted=!0))}},{key:"render",value:function(){var A=this.props,$=A.className,F=A.style,R=A.errorMessage,H=this.state.hasError;return t.default.createElement("div",{ref:this.wrap,className:$,style:l(l({},_),F)},H&&R)}}]),D}(t.Component);P(I,"defaultProps",S);var Y=I;n.default=Y}(dl);var fl={};(function(n){function r(m){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},r(m)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=c,e=i(Hr),o=["defaultQuery","left","top","popupKey","popupTitle","autoClose","onComplete","onResize","onClose","onSearch","onError"];function a(m){if(typeof WeakMap!="function")return null;var v=new WeakMap,g=new WeakMap;return(a=function(b){return b?g:v})(m)}function i(m,v){if(m&&m.__esModule)return m;if(m===null||r(m)!=="object"&&typeof m!="function")return{default:m};var g=a(v);if(g&&g.has(m))return g.get(m);var b={},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in m)if(x!="default"&&Object.prototype.hasOwnProperty.call(m,x)){var E=w?Object.getOwnPropertyDescriptor(m,x):null;E&&(E.get||E.set)?Object.defineProperty(b,x,E):b[x]=m[x]}return b.default=m,g&&g.set(m,b),b}function s(m,v){var g=Object.keys(m);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(m);v&&(b=b.filter(function(w){return Object.getOwnPropertyDescriptor(m,w).enumerable})),g.push.apply(g,b)}return g}function l(m){for(var v,g=1;g<arguments.length;g++)v=arguments[g]==null?{}:arguments[g],g%2?s(Object(v),!0).forEach(function(b){d(m,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(v)):s(Object(v)).forEach(function(b){Object.defineProperty(m,b,Object.getOwnPropertyDescriptor(v,b))});return m}function d(m,v,g){return v in m?Object.defineProperty(m,v,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[v]=g,m}function u(m,v){if(m==null)return{};var g,b,w=p(m,v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(m);for(b=0;b<x.length;b++)g=x[b],0<=v.indexOf(g)||Object.prototype.propertyIsEnumerable.call(m,g)&&(w[g]=m[g])}return w}function p(m,v){if(m==null)return{};var g,b,w={},x=Object.keys(m);for(b=0;b<x.length;b++)g=x[b],0<=v.indexOf(g)||(w[g]=m[g]);return w}function h(){var m=0<arguments.length&&arguments[0]!==void 0?arguments[0]:e.postcodeScriptUrl;(0,t.useEffect)(function(){(0,e.default)(m)},[m]);var v=(0,t.useCallback)(function(g){var b=l({},g),w=b.defaultQuery,x=b.left,E=b.top,P=b.popupKey,M=b.popupTitle,_=b.autoClose,S=b.onComplete,I=b.onResize,Y=b.onClose,k=b.onSearch,D=b.onError,O=u(b,o);return(0,e.default)(m).then(function(C){var A=new C(l(l({},O),{},{oncomplete:S,onsearch:k,onresize:I,onclose:Y}));A.open({q:w,left:x,top:E,popupTitle:M,popupKey:P,autoClose:_})}).catch(D)},[m]);return v}var f=h;n.default=f})(fl),function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"DaumPostcodeEmbed",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"useDaumPostcodePopup",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(n,"loadPostcode",{enumerable:!0,get:function(){return e.default}}),n.default=void 0;var r=o(dl),t=o(fl),e=o(Hr);function o(i){return i&&i.__esModule?i:{default:i}}var a=r.default;n.default=a}(cl);const Nm=({label:n,value:r,onFrontChange:t,onBackChange:e,onPostalCodeChange:o,disabled:a})=>{const[i,s]=c.useState(!1),l=p=>{let h=p.address,f="";p.addressType==="R"&&(p.bname!==""&&(f+=p.bname),p.buildingName!==""&&(f+=f!==""?`, ${p.buildingName}`:p.buildingName),h+=f!==""?` (${f})`:""),t(h),o&&o(p.zonecode),s(!1)},d=()=>{s(!0)},u=()=>r.front?r.front:N.jsx("p",{className:"text-[#C5C8CD]",children:"주소를 입력해주세요."});return N.jsxs(N.Fragment,{children:[N.jsx(Im,{isOpen:i,setIsOpen:s,handleComplete:l}),N.jsxs("div",{className:"text-deepGray",children:[N.jsx("label",{htmlFor:n,className:"text-sm font-bold text-lightBlack",children:n}),N.jsxs("div",{className:"relative flex flex-col",children:[N.jsx("div",{className:`mt-4 h-[60px] w-full overflow-hidden whitespace-nowrap rounded-xl bg-[#F8F8F9] p-4 text-base placeholder:text-[#C5C8CD] focus:outline-none ${a&&"opacity-50"}`,onClick:d,children:u()}),N.jsx("input",{disabled:!r.front||a,value:r.back,type:"text",name:n,id:n,placeholder:"상세 주소를 입력해주세요.",className:"mt-4 h-[60px] w-full rounded-xl bg-[#F8F8F9] p-4 text-base placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",autoComplete:"off",onChange:p=>e(p.target.value)})]})]})]})},Im=n=>{const{isOpen:r,setIsOpen:t,handleComplete:e}=n;return N.jsxs(Xn,{open:r,onClose:()=>t(!1),className:"relateive z-50",children:[N.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":"true"}),N.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:N.jsx(Xn.Panel,{children:N.jsxs("div",{children:[N.jsx("div",{className:"flex h-[36px] w-[90vw] flex-row-reverse items-center bg-[#F0F1F2]",children:N.jsx(si,{size:20,className:"mr-2",onClick:()=>t(!1)})}),N.jsx(cl.DaumPostcodeEmbed,{onComplete:e,style:{width:"90vw",height:"65vh",minHeight:"450px",borderRadius:"100px"}})]})})})]})},Fm=n=>{const{isOpen:r,setIsOpen:t}=n;return N.jsx(el,{show:r,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:N.jsxs(Xn,{onClose:()=>t(!1),className:"relative z-50 focus:outline-none",children:[N.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),N.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:N.jsxs(nl,{className:"flex w-[260px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]",children:[N.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.title&&N.jsx(rl,{className:"whitespace-pre-wrap text-[18px] font-bold leading-[26px] text-[#2C2F34]",children:n.title}),n.image&&N.jsx("img",{src:n.image.url,alt:n.image.alt}),n.description&&n.description!==""&&N.jsx(Mi,{className:"break-all text-[16px] leading-[24px] text-[#585E67]",children:n.description})]}),N.jsxs("div",{className:"flex flex-col gap-[4px]",children:[N.jsx("button",{className:"w-full rounded-[12px] bg-[#FF592C] px-[12px] py-[14px] text-[14px] font-bold leading-[22px] text-white",onClick:n.confirm.onClick,children:n.confirm.text}),n.cancel&&N.jsx("button",{onClick:()=>t(!1),className:"w-full rounded-[12px] bg-[#F0F1F2] px-[12px] py-[14px] text-[14px] font-bold leading-[22px] text-[#585E67]",children:n.cancel.text})]})]})})]})})};function Lm(n){return Tn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(n)}function $m(n){return Tn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"},child:[]}]})(n)}const Am=({title:n,description:r,titleTextClassName:t,descriptionTextClassName:e})=>{const[o,a]=c.useState(!1);return N.jsxs("div",{className:"my-2.5 flex w-full cursor-pointer flex-col justify-center rounded-xl px-4 pt-8 shadow-[0_2px_8px_0_rgba(0,0,0,0.08)] md:rounded-2xl md:pt-10",onClick:()=>a(i=>!i),children:[N.jsxs("div",{className:"flex w-full items-center justify-between px-2 pb-8 transition-all duration-300 md:px-4 md:pb-10",children:[N.jsxs("p",{className:dr("mr-4 text-lg font-medium md:text-xl",t),children:[N.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?N.jsx($m,{className:"min-w-6 text-petnowOrange",size:24}):N.jsx(Lm,{className:"min-w-6 text-petnowOrange",size:24})]}),N.jsx("p",{className:dr(`w-full overflow-hidden whitespace-pre-wrap px-2 text-base leading-6 text-[#8B919A] transition-all duration-300 md:px-4 md:text-lg ${o?"max-h-[24rem] pb-8 sm:max-h-60 md:pb-10":"max-h-0"}`,e),children:r})]})};function Q(n){const r=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&r==="[object Date]"?new n.constructor(+n):typeof n=="number"||r==="[object Number]"||typeof n=="string"||r==="[object String]"?new Date(n):new Date(NaN)}function de(n,r){return n instanceof Date?new n.constructor(r):new Date(r)}function Ft(n,r){const t=Q(n);return isNaN(r)?de(n,NaN):(r&&t.setDate(t.getDate()+r),t)}function ga(n,r){const t=+Q(n);return de(n,t+r)}const pl=6048e5,Ym=864e5,Rr=6e4,Br=36e5,jm=1e3;function Wm(n,r){return ga(n,r*Br)}function ba(n,r){return ga(n,r*Rr)}function et(n,r){const t=Q(n);if(isNaN(r))return de(n,NaN);if(!r)return t;const e=t.getDate(),o=de(n,t.getTime());o.setMonth(t.getMonth()+r+1,0);const a=o.getDate();return e>=a?o:(t.setFullYear(o.getFullYear(),o.getMonth(),e),t)}function ya(n,r){const t=r*3;return et(n,t)}function Hm(n,r){return ga(n,r*1e3)}function Vr(n,r){const t=r*7;return Ft(n,t)}function wt(n,r){return et(n,r*12)}function qt(n){const r=Q(n);return r.setHours(0,0,0,0),r}function zr(n){const r=Q(n),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+n-+t}function Zn(n,r){const t=qt(n),e=qt(r),o=+t-zr(t),a=+e-zr(e);return Math.round((o-a)/Ym)}function Qr(n,r){const t=Q(n),e=Q(r),o=t.getFullYear()-e.getFullYear(),a=t.getMonth()-e.getMonth();return o*12+a}function Gt(n){const r=Q(n);return Math.trunc(r.getMonth()/3)+1}function Ur(n,r){const t=Q(n),e=Q(r),o=t.getFullYear()-e.getFullYear(),a=Gt(t)-Gt(e);return o*4+a}function Kr(n,r){const t=Q(n),e=Q(r);return t.getFullYear()-e.getFullYear()}function ml(n){const r=Q(n);return r.setHours(23,59,59,999),r}function Rm(n){const r=Q(n),t=r.getMonth();return r.setFullYear(r.getFullYear(),t+1,0),r.setHours(23,59,59,999),r}let Bm={};function Xt(){return Bm}function Vm(n,r){var s,l;const t=Xt(),e=t.weekStartsOn??((l=(s=t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Q(n),a=o.getDay(),i=(a<e?-7:0)+6-(a-e);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function hl(n){const r=Q(n),t=r.getFullYear();return r.setFullYear(t+1,0,0),r.setHours(23,59,59,999),r}const zm={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qm=(n,r,t)=>{let e;const o=zm[n];return typeof o=="string"?e=o:r===1?e=o.one:e=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function bn(n){return(r={})=>{const t=r.width?String(r.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const Um={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Km={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Gm={date:bn({formats:Um,defaultWidth:"full"}),time:bn({formats:Km,defaultWidth:"full"}),dateTime:bn({formats:qm,defaultWidth:"full"})},Xm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jm=(n,r,t,e)=>Xm[n];function ot(n){return(r,t)=>{const e=t!=null&&t.context?String(t.context):"standalone";let o;if(e==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,s=t!=null&&t.width?String(t.width):i;o=n.formattingValues[s]||n.formattingValues[i]}else{const i=n.defaultWidth,s=t!=null&&t.width?String(t.width):n.defaultWidth;o=n.values[s]||n.values[i]}const a=n.argumentCallback?n.argumentCallback(r):r;return o[a]}}const Zm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},th={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},nh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},rh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},oh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ah={ordinalNumber:(n,r)=>{const t=Number(n),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:ot({values:Zm,defaultWidth:"wide"}),quarter:ot({values:eh,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ot({values:th,defaultWidth:"wide"}),day:ot({values:nh,defaultWidth:"wide"}),dayPeriod:ot({values:rh,defaultWidth:"wide",formattingValues:oh,defaultFormattingWidth:"wide"})};function at(n){return(r,t={})=>{const e=t.width,o=e&&n.matchPatterns[e]||n.matchPatterns[n.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=e&&n.parsePatterns[e]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?sh(s,p=>p.test(i)):ih(s,p=>p.test(i));let d;d=n.valueCallback?n.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;const u=r.slice(i.length);return{value:d,rest:u}}}function ih(n,r){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&r(n[t]))return t}function sh(n,r){for(let t=0;t<n.length;t++)if(r(n[t]))return t}function vl(n){return(r,t={})=>{const e=r.match(n.matchPattern);if(!e)return null;const o=e[0],a=r.match(n.parsePattern);if(!a)return null;let i=n.valueCallback?n.valueCallback(a[0]):a[0];i=t.valueCallback?t.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const lh=/^(\d+)(th|st|nd|rd)?/i,uh=/\d+/i,ch={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dh={any:[/^b/i,/^(a|c)/i]},fh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ph={any:[/1/i,/2/i,/3/i,/4/i]},mh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},vh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},wh={ordinalNumber:vl({matchPattern:lh,parsePattern:uh,valueCallback:n=>parseInt(n,10)}),era:at({matchPatterns:ch,defaultMatchWidth:"wide",parsePatterns:dh,defaultParseWidth:"any"}),quarter:at({matchPatterns:fh,defaultMatchWidth:"wide",parsePatterns:ph,defaultParseWidth:"any",valueCallback:n=>n+1}),month:at({matchPatterns:mh,defaultMatchWidth:"wide",parsePatterns:hh,defaultParseWidth:"any"}),day:at({matchPatterns:vh,defaultMatchWidth:"wide",parsePatterns:gh,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:bh,defaultMatchWidth:"any",parsePatterns:yh,defaultParseWidth:"any"})},gl={code:"en-US",formatDistance:Qm,formatLong:Gm,formatRelative:Jm,localize:ah,match:wh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qr(n){const r=Q(n),t=de(n,0);return t.setFullYear(r.getFullYear(),0,1),t.setHours(0,0,0,0),t}function xh(n){const r=Q(n);return Zn(r,qr(r))+1}function xt(n,r){var s,l,d,u;const t=Xt(),e=(r==null?void 0:r.weekStartsOn)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Q(n),a=o.getDay(),i=(a<e?7:0)+a-e;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function yn(n){return xt(n,{weekStartsOn:1})}function bl(n){const r=Q(n),t=r.getFullYear(),e=de(n,0);e.setFullYear(t+1,0,4),e.setHours(0,0,0,0);const o=yn(e),a=de(n,0);a.setFullYear(t,0,4),a.setHours(0,0,0,0);const i=yn(a);return r.getTime()>=o.getTime()?t+1:r.getTime()>=i.getTime()?t:t-1}function Dh(n){const r=bl(n),t=de(n,0);return t.setFullYear(r,0,4),t.setHours(0,0,0,0),yn(t)}function wa(n){const r=Q(n),t=+yn(r)-+Dh(r);return Math.round(t/pl)+1}function xa(n,r){var u,p,h,f;const t=Q(n),e=t.getFullYear(),o=Xt(),a=(r==null?void 0:r.firstWeekContainsDate)??((p=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(h=o.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,i=de(n,0);i.setFullYear(e+1,0,a),i.setHours(0,0,0,0);const s=xt(i,r),l=de(n,0);l.setFullYear(e,0,a),l.setHours(0,0,0,0);const d=xt(l,r);return t.getTime()>=s.getTime()?e+1:t.getTime()>=d.getTime()?e:e-1}function Eh(n,r){var s,l,d,u;const t=Xt(),e=(r==null?void 0:r.firstWeekContainsDate)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(d=t.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=xa(n,r),a=de(n,0);return a.setFullYear(o,0,e),a.setHours(0,0,0,0),xt(a,r)}function yl(n,r){const t=Q(n),e=+xt(t,r)-+Eh(t,r);return Math.round(e/pl)+1}function fe(n,r){const t=n<0?"-":"",e=Math.abs(n).toString().padStart(r,"0");return t+e}const Lt={y(n,r){const t=n.getFullYear(),e=t>0?t:1-t;return fe(r==="yy"?e%100:e,r.length)},M(n,r){const t=n.getMonth();return r==="M"?String(t+1):fe(t+1,2)},d(n,r){return fe(n.getDate(),r.length)},a(n,r){const t=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,r){return fe(n.getHours()%12||12,r.length)},H(n,r){return fe(n.getHours(),r.length)},m(n,r){return fe(n.getMinutes(),r.length)},s(n,r){return fe(n.getSeconds(),r.length)},S(n,r){const t=r.length,e=n.getMilliseconds(),o=Math.trunc(e*Math.pow(10,t-3));return fe(o,r.length)}},wn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wl={G:function(n,r,t){const e=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(n,r,t){if(r==="yo"){const e=n.getFullYear(),o=e>0?e:1-e;return t.ordinalNumber(o,{unit:"year"})}return Lt.y(n,r)},Y:function(n,r,t,e){const o=xa(n,e),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return fe(i,2)}return r==="Yo"?t.ordinalNumber(a,{unit:"year"}):fe(a,r.length)},R:function(n,r){const t=bl(n);return fe(t,r.length)},u:function(n,r){const t=n.getFullYear();return fe(t,r.length)},Q:function(n,r,t){const e=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return fe(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,r,t){const e=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return fe(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,r,t){const e=n.getMonth();switch(r){case"M":case"MM":return Lt.M(n,r);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(n,r,t){const e=n.getMonth();switch(r){case"L":return String(e+1);case"LL":return fe(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(n,r,t,e){const o=yl(n,e);return r==="wo"?t.ordinalNumber(o,{unit:"week"}):fe(o,r.length)},I:function(n,r,t){const e=wa(n);return r==="Io"?t.ordinalNumber(e,{unit:"week"}):fe(e,r.length)},d:function(n,r,t){return r==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Lt.d(n,r)},D:function(n,r,t){const e=xh(n);return r==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):fe(e,r.length)},E:function(n,r,t){const e=n.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(n,r,t,e){const o=n.getDay(),a=(o-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return fe(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(n,r,t,e){const o=n.getDay(),a=(o-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return fe(a,r.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(n,r,t){const e=n.getDay(),o=e===0?7:e;switch(r){case"i":return String(o);case"ii":return fe(o,r.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(n,r,t){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,r,t){const e=n.getHours();let o;switch(e===12?o=wn.noon:e===0?o=wn.midnight:o=e/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,r,t){const e=n.getHours();let o;switch(e>=17?o=wn.evening:e>=12?o=wn.afternoon:e>=4?o=wn.morning:o=wn.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,r,t){if(r==="ho"){let e=n.getHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return Lt.h(n,r)},H:function(n,r,t){return r==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Lt.H(n,r)},K:function(n,r,t){const e=n.getHours()%12;return r==="Ko"?t.ordinalNumber(e,{unit:"hour"}):fe(e,r.length)},k:function(n,r,t){let e=n.getHours();return e===0&&(e=24),r==="ko"?t.ordinalNumber(e,{unit:"hour"}):fe(e,r.length)},m:function(n,r,t){return r==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Lt.m(n,r)},s:function(n,r,t){return r==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Lt.s(n,r)},S:function(n,r){return Lt.S(n,r)},X:function(n,r,t){const e=n.getTimezoneOffset();if(e===0)return"Z";switch(r){case"X":return Dl(e);case"XXXX":case"XX":return Jt(e);case"XXXXX":case"XXX":default:return Jt(e,":")}},x:function(n,r,t){const e=n.getTimezoneOffset();switch(r){case"x":return Dl(e);case"xxxx":case"xx":return Jt(e);case"xxxxx":case"xxx":default:return Jt(e,":")}},O:function(n,r,t){const e=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+xl(e,":");case"OOOO":default:return"GMT"+Jt(e,":")}},z:function(n,r,t){const e=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+xl(e,":");case"zzzz":default:return"GMT"+Jt(e,":")}},t:function(n,r,t){const e=Math.trunc(n.getTime()/1e3);return fe(e,r.length)},T:function(n,r,t){const e=n.getTime();return fe(e,r.length)}};function xl(n,r=""){const t=n>0?"-":"+",e=Math.abs(n),o=Math.trunc(e/60),a=e%60;return a===0?t+String(o):t+String(o)+r+fe(a,2)}function Dl(n,r){return n%60===0?(n>0?"-":"+")+fe(Math.abs(n)/60,2):Jt(n,r)}function Jt(n,r=""){const t=n>0?"-":"+",e=Math.abs(n),o=fe(Math.trunc(e/60),2),a=fe(e%60,2);return t+o+r+a}const El=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Cl=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Gr={p:Cl,P:(n,r)=>{const t=n.match(/(P+)(p+)?/)||[],e=t[1],o=t[2];if(!o)return El(n,r);let a;switch(e){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",El(e,r)).replace("{{time}}",Cl(o,r))}},Ch=/^D+$/,kh=/^Y+$/,Sh=["D","DD","YY","YYYY"];function kl(n){return Ch.test(n)}function Sl(n){return kh.test(n)}function Da(n,r,t){const e=_h(n,r,t);if(console.warn(e),Sh.includes(n))throw new RangeError(e)}function _h(n,r,t){const e=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${e} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Dt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Xr(n){if(!Dt(n)&&typeof n!="number")return!1;const r=Q(n);return!isNaN(Number(r))}const Oh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ph=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mh=/^'([^]*?)'?$/,Th=/''/g,Nh=/[a-zA-Z]/;function _l(n,r,t){var u,p,h,f,m,v,g,b;const e=Xt(),o=(t==null?void 0:t.locale)??e.locale??gl,a=(t==null?void 0:t.firstWeekContainsDate)??((p=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??e.firstWeekContainsDate??((f=(h=e.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((v=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??e.weekStartsOn??((b=(g=e.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,s=Q(n);if(!Xr(s))throw new RangeError("Invalid time value");let l=r.match(Ph).map(w=>{const x=w[0];if(x==="p"||x==="P"){const E=Gr[x];return E(w,o.formatLong)}return w}).join("").match(Oh).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:Ih(w)};if(wl[x])return{isToken:!0,value:w};if(x.match(Nh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Sl(x)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&kl(x))&&Da(x,r,String(n));const E=wl[x[0]];return E(s,x,o.localize,d)}).join("")}function Ih(n){const r=n.match(Mh);return r?r[1].replace(Th,"'"):n}function Ol(n){return Q(n).getDate()}function Fh(n){return Q(n).getDay()}function it(n){return Q(n).getHours()}function st(n){return Q(n).getMinutes()}function je(n){return Q(n).getMonth()}function Et(n){return Q(n).getSeconds()}function Ea(n){return Q(n).getTime()}function Z(n){return Q(n).getFullYear()}function $t(n,r){const t=Q(n),e=Q(r);return t.getTime()>e.getTime()}function Zt(n,r){const t=Q(n),e=Q(r);return+t<+e}function Lh(n,r){const t=Q(n),e=Q(r);return+t==+e}function $h(n,r){const t=qt(n),e=qt(r);return+t==+e}function Ah(n,r){const t=Q(n),e=Q(r);return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function Ca(n){const r=Q(n),t=r.getMonth(),e=t-t%3;return r.setMonth(e,1),r.setHours(0,0,0,0),r}function Yh(n,r){const t=Ca(n),e=Ca(r);return+t==+e}function jh(n,r){const t=Q(n),e=Q(r);return t.getFullYear()===e.getFullYear()}function er(n,r){const t=+Q(n),[e,o]=[+Q(r.start),+Q(r.end)].sort((a,i)=>a-i);return t>=e&&t<=o}function Pl(n){let r;return n.forEach(function(t){const e=Q(t);(r===void 0||r<e||isNaN(Number(e)))&&(r=e)}),r||new Date(NaN)}function Ml(n){let r;return n.forEach(t=>{const e=Q(t);(!r||r>e||isNaN(+e))&&(r=e)}),r||new Date(NaN)}function Wh(){return Object.assign({},Xt())}function Hh(n,r){const t=r instanceof Date?de(r,0):new r(0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}const Rh=10;class Tl{constructor(){z(this,"subPriority",0)}validate(r,t){return!0}}class Bh extends Tl{constructor(r,t,e,o,a){super(),this.value=r,this.validateValue=t,this.setValue=e,this.priority=o,a&&(this.subPriority=a)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,e){return this.setValue(r,t,this.value,e)}}class Vh extends Tl{constructor(){super(...arguments);z(this,"priority",Rh);z(this,"subPriority",-1)}set(t,e){return e.timestampIsSet?t:de(t,Hh(t,Date))}}class le{run(r,t,e,o){const a=this.parse(r,t,e,o);return a?{setter:new Bh(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,t,e){return!0}}class zh extends le{constructor(){super(...arguments);z(this,"priority",140);z(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,o){switch(e){case"G":case"GG":case"GGG":return o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"});case"GGGGG":return o.era(t,{width:"narrow"});case"GGGG":default:return o.era(t,{width:"wide"})||o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"})}}set(t,e,o){return e.era=o,t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}const Pe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},lt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Me(n,r){return n&&{value:r(n.value),rest:n.rest}}function ke(n,r){const t=r.match(n);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function ut(n,r){const t=r.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const e=t[1]==="+"?1:-1,o=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:e*(o*Br+a*Rr+i*jm),rest:r.slice(t[0].length)}}function Nl(n){return ke(Pe.anyDigitsSigned,n)}function _e(n,r){switch(n){case 1:return ke(Pe.singleDigit,r);case 2:return ke(Pe.twoDigits,r);case 3:return ke(Pe.threeDigits,r);case 4:return ke(Pe.fourDigits,r);default:return ke(new RegExp("^\\d{1,"+n+"}"),r)}}function Jr(n,r){switch(n){case 1:return ke(Pe.singleDigitSigned,r);case 2:return ke(Pe.twoDigitsSigned,r);case 3:return ke(Pe.threeDigitsSigned,r);case 4:return ke(Pe.fourDigitsSigned,r);default:return ke(new RegExp("^-?\\d{1,"+n+"}"),r)}}function ka(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Il(n,r){const t=r>0,e=t?r:1-r;let o;if(e<=50)o=n||100;else{const a=e+50,i=Math.trunc(a/100)*100,s=n>=a%100;o=n+i-(s?100:0)}return t?o:1-o}function Fl(n){return n%400===0||n%4===0&&n%100!==0}class Qh extends le{constructor(){super(...arguments);z(this,"priority",130);z(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,o){const a=i=>({year:i,isTwoDigitYear:e==="yy"});switch(e){case"y":return Me(_e(4,t),a);case"yo":return Me(o.ordinalNumber(t,{unit:"year"}),a);default:return Me(_e(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,o){const a=t.getFullYear();if(o.isTwoDigitYear){const s=Il(o.year,a);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in e)||e.era===1?o.year:1-o.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class Uh extends le{constructor(){super(...arguments);z(this,"priority",130);z(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,o){const a=i=>({year:i,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Me(_e(4,t),a);case"Yo":return Me(o.ordinalNumber(t,{unit:"year"}),a);default:return Me(_e(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,o,a){const i=xa(t,a);if(o.isTwoDigitYear){const l=Il(o.year,i);return t.setFullYear(l,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),xt(t,a)}const s=!("era"in e)||e.era===1?o.year:1-o.year;return t.setFullYear(s,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),xt(t,a)}}class Kh extends le{constructor(){super(...arguments);z(this,"priority",130);z(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Jr(e==="R"?4:e.length,t)}set(t,e,o){const a=de(t,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),yn(a)}}class qh extends le{constructor(){super(...arguments);z(this,"priority",130);z(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Jr(e==="u"?4:e.length,t)}set(t,e,o){return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class Gh extends le{constructor(){super(...arguments);z(this,"priority",120);z(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"Q":case"QQ":return _e(e.length,t);case"Qo":return o.ordinalNumber(t,{unit:"quarter"});case"QQQ":return o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(t,{width:"wide",context:"formatting"})||o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class Xh extends le{constructor(){super(...arguments);z(this,"priority",120);z(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"q":case"qq":return _e(e.length,t);case"qo":return o.ordinalNumber(t,{unit:"quarter"});case"qqq":return o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(t,{width:"wide",context:"standalone"})||o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class Jh extends le{constructor(){super(...arguments);z(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);z(this,"priority",110)}parse(t,e,o){const a=i=>i-1;switch(e){case"M":return Me(ke(Pe.month,t),a);case"MM":return Me(_e(2,t),a);case"Mo":return Me(o.ordinalNumber(t,{unit:"month"}),a);case"MMM":return o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(t,{width:"wide",context:"formatting"})||o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}class Zh extends le{constructor(){super(...arguments);z(this,"priority",110);z(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,o){const a=i=>i-1;switch(e){case"L":return Me(ke(Pe.month,t),a);case"LL":return Me(_e(2,t),a);case"Lo":return Me(o.ordinalNumber(t,{unit:"month"}),a);case"LLL":return o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(t,{width:"wide",context:"standalone"})||o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}function ev(n,r,t){const e=Q(n),o=yl(e,t)-r;return e.setDate(e.getDate()-o*7),e}class tv extends le{constructor(){super(...arguments);z(this,"priority",100);z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,o){switch(e){case"w":return ke(Pe.week,t);case"wo":return o.ordinalNumber(t,{unit:"week"});default:return _e(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,o,a){return xt(ev(t,o,a),a)}}function nv(n,r){const t=Q(n),e=wa(t)-r;return t.setDate(t.getDate()-e*7),t}class rv extends le{constructor(){super(...arguments);z(this,"priority",100);z(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,o){switch(e){case"I":return ke(Pe.week,t);case"Io":return o.ordinalNumber(t,{unit:"week"});default:return _e(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,o){return yn(nv(t,o))}}const ov=[31,28,31,30,31,30,31,31,30,31,30,31],av=[31,29,31,30,31,30,31,31,30,31,30,31];class iv extends le{constructor(){super(...arguments);z(this,"priority",90);z(this,"subPriority",1);z(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"d":return ke(Pe.date,t);case"do":return o.ordinalNumber(t,{unit:"date"});default:return _e(e.length,t)}}validate(t,e){const o=t.getFullYear(),a=Fl(o),i=t.getMonth();return a?e>=1&&e<=av[i]:e>=1&&e<=ov[i]}set(t,e,o){return t.setDate(o),t.setHours(0,0,0,0),t}}class sv extends le{constructor(){super(...arguments);z(this,"priority",90);z(this,"subpriority",1);z(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,o){switch(e){case"D":case"DD":return ke(Pe.dayOfYear,t);case"Do":return o.ordinalNumber(t,{unit:"date"});default:return _e(e.length,t)}}validate(t,e){const o=t.getFullYear();return Fl(o)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,o){return t.setMonth(0,o),t.setHours(0,0,0,0),t}}function Sa(n,r,t){var p,h,f,m;const e=Xt(),o=(t==null?void 0:t.weekStartsOn)??((h=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:h.weekStartsOn)??e.weekStartsOn??((m=(f=e.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,a=Q(n),i=a.getDay(),l=(r%7+7)%7,d=7-o,u=r<0||r>6?r-(i+d)%7:(l+d)%7-(i+d)%7;return Ft(a,u)}class lv extends le{constructor(){super(...arguments);z(this,"priority",90);z(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"E":case"EE":case"EEE":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,o,a){return t=Sa(t,o,a),t.setHours(0,0,0,0),t}}class uv extends le{constructor(){super(...arguments);z(this,"priority",90);z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(e){case"e":case"ee":return Me(_e(e.length,t),i);case"eo":return Me(o.ordinalNumber(t,{unit:"day"}),i);case"eee":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeeee":return o.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,o,a){return t=Sa(t,o,a),t.setHours(0,0,0,0),t}}class cv extends le{constructor(){super(...arguments);z(this,"priority",90);z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(e){case"c":case"cc":return Me(_e(e.length,t),i);case"co":return Me(o.ordinalNumber(t,{unit:"day"}),i);case"ccc":return o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"ccccc":return o.day(t,{width:"narrow",context:"standalone"});case"cccccc":return o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(t,{width:"wide",context:"standalone"})||o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,o,a){return t=Sa(t,o,a),t.setHours(0,0,0,0),t}}function dv(n){let t=Q(n).getDay();return t===0&&(t=7),t}function fv(n,r){const t=Q(n),e=dv(t),o=r-e;return Ft(t,o)}class pv extends le{constructor(){super(...arguments);z(this,"priority",90);z(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,o){const a=i=>i===0?7:i;switch(e){case"i":case"ii":return _e(e.length,t);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return Me(o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return Me(o.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Me(o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Me(o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,e){return e>=1&&e<=7}set(t,e,o){return t=fv(t,o),t.setHours(0,0,0,0),t}}class mv extends le{constructor(){super(...arguments);z(this,"priority",80);z(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,o){switch(e){case"a":case"aa":case"aaa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,o){return t.setHours(ka(o),0,0,0),t}}class hv extends le{constructor(){super(...arguments);z(this,"priority",80);z(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,o){switch(e){case"b":case"bb":case"bbb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,o){return t.setHours(ka(o),0,0,0),t}}class vv extends le{constructor(){super(...arguments);z(this,"priority",80);z(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,o){switch(e){case"B":case"BB":case"BBB":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,o){return t.setHours(ka(o),0,0,0),t}}class gv extends le{constructor(){super(...arguments);z(this,"priority",70);z(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,o){switch(e){case"h":return ke(Pe.hour12h,t);case"ho":return o.ordinalNumber(t,{unit:"hour"});default:return _e(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,o){const a=t.getHours()>=12;return a&&o<12?t.setHours(o+12,0,0,0):!a&&o===12?t.setHours(0,0,0,0):t.setHours(o,0,0,0),t}}class bv extends le{constructor(){super(...arguments);z(this,"priority",70);z(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,o){switch(e){case"H":return ke(Pe.hour23h,t);case"Ho":return o.ordinalNumber(t,{unit:"hour"});default:return _e(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,o){return t.setHours(o,0,0,0),t}}class yv extends le{constructor(){super(...arguments);z(this,"priority",70);z(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,o){switch(e){case"K":return ke(Pe.hour11h,t);case"Ko":return o.ordinalNumber(t,{unit:"hour"});default:return _e(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,o){return t.getHours()>=12&&o<12?t.setHours(o+12,0,0,0):t.setHours(o,0,0,0),t}}class wv extends le{constructor(){super(...arguments);z(this,"priority",70);z(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,o){switch(e){case"k":return ke(Pe.hour24h,t);case"ko":return o.ordinalNumber(t,{unit:"hour"});default:return _e(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,o){const a=o<=24?o%24:o;return t.setHours(a,0,0,0),t}}class xv extends le{constructor(){super(...arguments);z(this,"priority",60);z(this,"incompatibleTokens",["t","T"])}parse(t,e,o){switch(e){case"m":return ke(Pe.minute,t);case"mo":return o.ordinalNumber(t,{unit:"minute"});default:return _e(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,o){return t.setMinutes(o,0,0),t}}class Dv extends le{constructor(){super(...arguments);z(this,"priority",50);z(this,"incompatibleTokens",["t","T"])}parse(t,e,o){switch(e){case"s":return ke(Pe.second,t);case"so":return o.ordinalNumber(t,{unit:"second"});default:return _e(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,o){return t.setSeconds(o,0),t}}class Ev extends le{constructor(){super(...arguments);z(this,"priority",30);z(this,"incompatibleTokens",["t","T"])}parse(t,e){const o=a=>Math.trunc(a*Math.pow(10,-e.length+3));return Me(_e(e.length,t),o)}set(t,e,o){return t.setMilliseconds(o),t}}class Cv extends le{constructor(){super(...arguments);z(this,"priority",10);z(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return ut(lt.basicOptionalMinutes,t);case"XX":return ut(lt.basic,t);case"XXXX":return ut(lt.basicOptionalSeconds,t);case"XXXXX":return ut(lt.extendedOptionalSeconds,t);case"XXX":default:return ut(lt.extended,t)}}set(t,e,o){return e.timestampIsSet?t:de(t,t.getTime()-zr(t)-o)}}class kv extends le{constructor(){super(...arguments);z(this,"priority",10);z(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return ut(lt.basicOptionalMinutes,t);case"xx":return ut(lt.basic,t);case"xxxx":return ut(lt.basicOptionalSeconds,t);case"xxxxx":return ut(lt.extendedOptionalSeconds,t);case"xxx":default:return ut(lt.extended,t)}}set(t,e,o){return e.timestampIsSet?t:de(t,t.getTime()-zr(t)-o)}}class Sv extends le{constructor(){super(...arguments);z(this,"priority",40);z(this,"incompatibleTokens","*")}parse(t){return Nl(t)}set(t,e,o){return[de(t,o*1e3),{timestampIsSet:!0}]}}class _v extends le{constructor(){super(...arguments);z(this,"priority",20);z(this,"incompatibleTokens","*")}parse(t){return Nl(t)}set(t,e,o){return[de(t,o),{timestampIsSet:!0}]}}const Ov={G:new zh,y:new Qh,Y:new Uh,R:new Kh,u:new qh,Q:new Gh,q:new Xh,M:new Jh,L:new Zh,w:new tv,I:new rv,d:new iv,D:new sv,E:new lv,e:new uv,c:new cv,i:new pv,a:new mv,b:new hv,B:new vv,h:new gv,H:new bv,K:new yv,k:new wv,m:new xv,s:new Dv,S:new Ev,X:new Cv,x:new kv,t:new Sv,T:new _v},Pv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tv=/^'([^]*?)'?$/,Nv=/''/g,Iv=/\S/,Fv=/[a-zA-Z]/;function _a(n,r,t,e){var v,g,b,w,x,E,P,M;const o=Wh(),a=(e==null?void 0:e.locale)??o.locale??gl,i=(e==null?void 0:e.firstWeekContainsDate)??((g=(v=e==null?void 0:e.locale)==null?void 0:v.options)==null?void 0:g.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(b=o.locale)==null?void 0:b.options)==null?void 0:w.firstWeekContainsDate)??1,s=(e==null?void 0:e.weekStartsOn)??((E=(x=e==null?void 0:e.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??o.weekStartsOn??((M=(P=o.locale)==null?void 0:P.options)==null?void 0:M.weekStartsOn)??0;if(r==="")return n===""?Q(t):de(t,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:a},d=[new Vh],u=r.match(Mv).map(_=>{const S=_[0];if(S in Gr){const I=Gr[S];return I(_,a.formatLong)}return _}).join("").match(Pv),p=[];for(let _ of u){!(e!=null&&e.useAdditionalWeekYearTokens)&&Sl(_)&&Da(_,r,n),!(e!=null&&e.useAdditionalDayOfYearTokens)&&kl(_)&&Da(_,r,n);const S=_[0],I=Ov[S];if(I){const{incompatibleTokens:Y}=I;if(Array.isArray(Y)){const D=p.find(O=>Y.includes(O.token)||O.token===S);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${_}\` at the same time`)}else if(I.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);p.push({token:S,fullToken:_});const k=I.run(n,_,a.match,l);if(!k)return de(t,NaN);d.push(k.setter),n=k.rest}else{if(S.match(Fv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(_==="''"?_="'":S==="'"&&(_=Lv(_)),n.indexOf(_)===0)n=n.slice(_.length);else return de(t,NaN)}}if(n.length>0&&Iv.test(n))return de(t,NaN);const h=d.map(_=>_.priority).sort((_,S)=>S-_).filter((_,S,I)=>I.indexOf(_)===S).map(_=>d.filter(S=>S.priority===_).sort((S,I)=>I.subPriority-S.subPriority)).map(_=>_[0]);let f=Q(t);if(isNaN(f.getTime()))return de(t,NaN);const m={};for(const _ of h){if(!_.validate(f,l))return de(t,NaN);const S=_.set(f,m,l);Array.isArray(S)?(f=S[0],Object.assign(m,S[1])):f=S}return de(t,f)}function Lv(n){return n.match(Tv)[1].replace(Nv,"'")}function $v(n,r){const e=Wv(n);let o;if(e.date){const l=Hv(e.date,2);o=Rv(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const a=o.getTime();let i=0,s;if(e.time&&(i=Bv(e.time),isNaN(i)))return new Date(NaN);if(e.timezone){if(s=Vv(e.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(a+i),d=new Date(0);return d.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),d.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),d}return new Date(a+i+s)}const Zr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Av=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Yv=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,jv=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Wv(n){const r={},t=n.split(Zr.dateTimeDelimiter);let e;if(t.length>2)return r;if(/:/.test(t[0])?e=t[0]:(r.date=t[0],e=t[1],Zr.timeZoneDelimiter.test(r.date)&&(r.date=n.split(Zr.timeZoneDelimiter)[0],e=n.substr(r.date.length,n.length))),e){const o=Zr.timezone.exec(e);o?(r.time=e.replace(o[1],""),r.timezone=o[1]):r.time=e}return r}function Hv(n,r){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),e=n.match(t);if(!e)return{year:NaN,restDateString:""};const o=e[1]?parseInt(e[1]):null,a=e[2]?parseInt(e[2]):null;return{year:a===null?o:a*100,restDateString:n.slice((e[1]||e[2]).length)}}function Rv(n,r){if(r===null)return new Date(NaN);const t=n.match(Av);if(!t)return new Date(NaN);const e=!!t[4],o=tr(t[1]),a=tr(t[2])-1,i=tr(t[3]),s=tr(t[4]),l=tr(t[5])-1;if(e)return qv(r,s,l)?zv(r,s,l):new Date(NaN);{const d=new Date(0);return!Uv(r,a,i)||!Kv(r,o)?new Date(NaN):(d.setUTCFullYear(r,a,Math.max(o,i)),d)}}function tr(n){return n?parseInt(n):1}function Bv(n){const r=n.match(Yv);if(!r)return NaN;const t=Oa(r[1]),e=Oa(r[2]),o=Oa(r[3]);return Gv(t,e,o)?t*Br+e*Rr+o*1e3:NaN}function Oa(n){return n&&parseFloat(n.replace(",","."))||0}function Vv(n){if(n==="Z")return 0;const r=n.match(jv);if(!r)return 0;const t=r[1]==="+"?-1:1,e=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return Xv(e,o)?t*(e*Br+o*Rr):NaN}function zv(n,r,t){const e=new Date(0);e.setUTCFullYear(n,0,4);const o=e.getUTCDay()||7,a=(r-1)*7+t+1-o;return e.setUTCDate(e.getUTCDate()+a),e}const Qv=[31,null,31,30,31,30,31,31,30,31,30,31];function Ll(n){return n%400===0||n%4===0&&n%100!==0}function Uv(n,r,t){return r>=0&&r<=11&&t>=1&&t<=(Qv[r]||(Ll(n)?29:28))}function Kv(n,r){return r>=1&&r<=(Ll(n)?366:365)}function qv(n,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function Gv(n,r,t){return n===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&n>=0&&n<25}function Xv(n,r){return r>=0&&r<=59}function Jv(n){const r=Q(n),t=r.getFullYear(),e=r.getMonth(),o=de(n,0);return o.setFullYear(t,e+1,0),o.setHours(0,0,0,0),o.getDate()}function Ue(n,r){const t=Q(n),e=t.getFullYear(),o=t.getDate(),a=de(n,0);a.setFullYear(e,r,15),a.setHours(0,0,0,0);const i=Jv(a);return t.setMonth(r,Math.min(o,i)),t}function Zv(n,r){let t=Q(n);return isNaN(+t)?de(n,NaN):(r.year!=null&&t.setFullYear(r.year),r.month!=null&&(t=Ue(t,r.month)),r.date!=null&&t.setDate(r.date),r.hours!=null&&t.setHours(r.hours),r.minutes!=null&&t.setMinutes(r.minutes),r.seconds!=null&&t.setSeconds(r.seconds),r.milliseconds!=null&&t.setMilliseconds(r.milliseconds),t)}function eo(n,r){const t=Q(n);return t.setHours(r),t}function to(n,r){const t=Q(n);return t.setMinutes(r),t}function xn(n,r){const t=Q(n),e=Math.trunc(t.getMonth()/3)+1,o=r-e;return Ue(t,t.getMonth()+o*3)}function no(n,r){const t=Q(n);return t.setSeconds(r),t}function ct(n,r){const t=Q(n);return isNaN(+t)?de(n,NaN):(t.setFullYear(r),t)}function $l(n){const r=Q(n);return r.setDate(1),r.setHours(0,0,0,0),r}function eg(n,r){return Ft(n,-r)}function Dn(n,r){return et(n,-r)}function Al(n,r){return ya(n,-r)}function Yl(n,r){return Vr(n,-r)}function En(n,r){return wt(n,-r)}var ro=typeof document<"u"?c.useLayoutEffect:c.useEffect;function oo(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let t,e,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==r.length)return!1;for(e=t;e--!==0;)if(!oo(n[e],r[e]))return!1;return!0}if(o=Object.keys(n),t=o.length,t!==Object.keys(r).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(r,o[e]))return!1;for(e=t;e--!==0;){const a=o[e];if(!(a==="_owner"&&n.$$typeof)&&!oo(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function jl(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Wl(n,r){const t=jl(n);return Math.round(r*t)/t}function Pa(n){const r=T.useRef(n);return ro(()=>{r.current=n}),r}function tg(n){n===void 0&&(n={});const{placement:r="bottom",strategy:t="absolute",middleware:e=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:d}=n,[u,p]=T.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[h,f]=T.useState(e);oo(h,e)||f(e);const[m,v]=T.useState(null),[g,b]=T.useState(null),w=T.useCallback(R=>{R!==M.current&&(M.current=R,v(R))},[]),x=T.useCallback(R=>{R!==_.current&&(_.current=R,b(R))},[]),E=a||m,P=i||g,M=T.useRef(null),_=T.useRef(null),S=T.useRef(u),I=l!=null,Y=Pa(l),k=Pa(o),D=Pa(d),O=T.useCallback(()=>{if(!M.current||!_.current)return;const R={placement:r,strategy:t,middleware:h};k.current&&(R.platform=k.current),ms(M.current,_.current,R).then(H=>{const K={...H,isPositioned:D.current!==!1};C.current&&!oo(S.current,K)&&(S.current=K,rn.flushSync(()=>{p(K)}))})},[h,r,t,k,D]);ro(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[d]);const C=T.useRef(!1);ro(()=>(C.current=!0,()=>{C.current=!1}),[]),ro(()=>{if(E&&(M.current=E),P&&(_.current=P),E&&P){if(Y.current)return Y.current(E,P,O);O()}},[E,P,O,Y,I]);const A=T.useMemo(()=>({reference:M,floating:_,setReference:w,setFloating:x}),[w,x]),$=T.useMemo(()=>({reference:E,floating:P}),[E,P]),F=T.useMemo(()=>{const R={position:t,left:0,top:0};if(!$.floating)return R;const H=Wl($.floating,u.x),K=Wl($.floating,u.y);return s?{...R,transform:"translate("+H+"px, "+K+"px)",...jl($.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:H,top:K}},[t,s,$.floating,u.x,u.y]);return T.useMemo(()=>({...u,update:O,refs:A,elements:$,floatingStyles:F}),[u,O,A,$,F])}const ng=n=>{function r(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:e,padding:o}=typeof n=="function"?n(t):n;return e&&r(e)?e.current!=null?ps({element:e.current,padding:o}).fn(t):{}:e?ps({element:e,padding:o}).fn(t):{}}}},rg=(n,r)=>({...ds(n),options:[n,r]}),og=(n,r)=>({...fs(n),options:[n,r]}),ag=(n,r)=>({...ng(n),options:[n,r]}),Hl={...T},ig=Hl.useInsertionEffect||(n=>n());function sg(n){const r=T.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ig(()=>{r.current=n}),T.useCallback(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return r.current==null?void 0:r.current(...e)},[])}var ao=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Ma(){return Ma=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},Ma.apply(this,arguments)}let Rl=!1,lg=0;const Bl=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+lg++;function ug(){const[n,r]=T.useState(()=>Rl?Bl():void 0);return ao(()=>{n==null&&r(Bl())},[]),T.useEffect(()=>{Rl=!0},[]),n}const Vl=Hl.useId||ug;let nr;process.env.NODE_ENV!=="production"&&(nr=new Set);function cg(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=nr)!=null&&n.has(o))){var a;(a=nr)==null||a.add(o),console.warn(o)}}function dg(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=nr)!=null&&n.has(o))){var a;(a=nr)==null||a.add(o),console.error(o)}}const fg=T.forwardRef(function(r,t){const{context:{placement:e,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:d=0,strokeWidth:u=0,staticOffset:p,stroke:h,d:f,style:{transform:m,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(t||cg("The `ref` prop is required for `FloatingArrow`."));const b=Vl(),[w,x]=T.useState(!1);if(ao(()=>{if(!o)return;qe(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[E,P]=e.split("-"),M=E==="top"||E==="bottom";let _=p;(M&&i!=null&&i.x||!M&&i!=null&&i.y)&&(_=null);const S=u*2,I=S/2,Y=s/2*(d/-8+1),k=l/2*d/4,D=!!f,O=_&&P==="end"?"bottom":"top";let C=_&&P==="end"?"right":"left";_&&w&&(C=P==="end"?"left":"right");const A=(a==null?void 0:a.x)!=null?_||a.x:"",$=(a==null?void 0:a.y)!=null?_||a.y:"",F=f||"M0,0"+(" H"+s)+(" L"+(s-Y)+","+(l-k))+(" Q"+s/2+","+l+" "+Y+","+(l-k))+" Z",R={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[E];return T.createElement("svg",Ma({},g,{"aria-hidden":!0,ref:t,width:D?s:s+S,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[C]:A,[O]:$,[E]:M||D?"100%":"calc(100% - "+S/2+"px)",transform:[R,m].filter(H=>!!H).join(" "),...v}}),S>0&&T.createElement("path",{clipPath:"url(#"+b+")",fill:"none",stroke:h,strokeWidth:S+(f?0:1),d:F}),T.createElement("path",{stroke:S&&!f?g.fill:"none",d:F}),T.createElement("clipPath",{id:b},T.createElement("rect",{x:-I,y:I*(D?-1:1),width:s+S,height:s})))});function pg(){const n=new Map;return{emit(r,t){var e;(e=n.get(r))==null||e.forEach(o=>o(t))},on(r,t){n.set(r,[...n.get(r)||[],t])},off(r,t){var e;n.set(r,((e=n.get(r))==null?void 0:e.filter(o=>o!==t))||[])}}}const mg=T.createContext(null),hg=T.createContext(null),vg=()=>{var n;return((n=T.useContext(mg))==null?void 0:n.id)||null},gg=()=>T.useContext(hg);function bg(n){const{open:r=!1,onOpenChange:t,elements:e}=n,o=Vl(),a=T.useRef({}),[i]=T.useState(()=>pg()),s=vg()!=null;if(process.env.NODE_ENV!=="production"){const f=e.reference;f&&!Ye(f)&&dg("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,d]=T.useState(e.reference),u=sg((f,m,v)=>{a.current.openEvent=f?m:void 0,i.emit("openchange",{open:f,event:m,reason:v,nested:s}),t==null||t(f,m,v)}),p=T.useMemo(()=>({setPositionReference:d}),[]),h=T.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return T.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:h,events:i,floatingId:o,refs:p}),[r,u,h,i,o,p])}function yg(n){n===void 0&&(n={});const{nodeId:r}=n,t=bg({...n,elements:{reference:null,floating:null,...n.elements}}),e=n.rootContext||t,o=e.elements,[a,i]=T.useState(null),[s,l]=T.useState(null),u=(o==null?void 0:o.reference)||a,p=T.useRef(null),h=gg();ao(()=>{u&&(p.current=u)},[u]);const f=tg({...n,elements:{...o,...s&&{reference:s}}}),m=T.useCallback(x=>{const E=Ye(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(E),f.refs.setReference(E)},[f.refs]),v=T.useCallback(x=>{(Ye(x)||x===null)&&(p.current=x,i(x)),(Ye(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!Ye(x))&&f.refs.setReference(x)},[f.refs]),g=T.useMemo(()=>({...f.refs,setReference:v,setPositionReference:m,domReference:p}),[f.refs,v,m]),b=T.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=T.useMemo(()=>({...f,...e,refs:g,elements:b,nodeId:r}),[f,g,b,r,e]);return ao(()=>{e.dataRef.current.floatingContext=w;const x=h==null?void 0:h.nodesRef.current.find(E=>E.id===r);x&&(x.context=w)}),T.useMemo(()=>({...f,context:w,refs:g,elements:b}),[f,g,b,w])}/*!
|
|
38
|
+
react-datepicker v7.4.0
|
|
39
39
|
https://github.com/Hacker0x01/react-datepicker
|
|
40
40
|
Released under the MIT License.
|
|
41
|
-
*/var _a=function(r,e){return _a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])},_a(r,e)};function $e(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");_a(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var ie=function(){return ie=Object.assign||function(e){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ie.apply(this,arguments)};function dt(n,r,e){if(e||arguments.length===2)for(var t=0,o=r.length,a;t<o;t++)(a||!(t in r))&&(a||(a=Array.prototype.slice.call(r,0,t)),a[t]=r[t]);return n.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var ng=function(n){var r=n.showTimeSelectOnly,e=r===void 0?!1:r,t=n.showTime,o=t===void 0?!1:t,a=n.className,i=n.children,s=e?"Choose Time":"Choose Date".concat(o?" and Time":"");return d.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},H;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(H||(H={}));function $l(){var n=typeof window<"u"?window:globalThis;return n}var tr=12,rg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function pe(n){if(n==null)return new Date;var r=typeof n=="string"?$v(n):z(n);return Et(r)?r:new Date}function og(n,r,e,t,o){var a,i=null,s=nn(e)||nn(or()),l=!0;if(Array.isArray(r))return r.forEach(function(c){var f=ka(n,c,new Date,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});t&&(l=Et(f,o)&&n===we(f,c,e)),Et(f,o)&&l&&(i=f)}),i;if(i=ka(n,r,new Date,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),t)l=Et(i)&&n===we(i,r,e);else if(!Et(i)){var u=((a=r.match(rg))!==null&&a!==void 0?a:[]).map(function(c){var f=c[0];if(f==="p"||f==="P"){var m=Gr[f];return s?m(c,s.formatLong):f}return c}).join("");n.length>0&&(i=ka(n,u.slice(0,n.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),Et(i)||(i=new Date(n))}return Et(i)&&l?i:null}function Et(n,r){return Xr(n)&&!en(n,r??new Date("1/1/1800"))}function we(n,r,e){if(e==="en")return kl(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?nn(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),!t&&or()&&nn(or())&&(t=nn(or())),kl(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Ge(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&we(n,o,t)||""}function ag(n,r,e){if(!n)return"";var t=Ge(n,e),o=r?Ge(r,e):"";return"".concat(t," - ").concat(o)}function ig(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?Ge(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=Ge(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function Oa(n,r){var e=r.hour,t=e===void 0?0:e,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return eo(to(no(n,s),a),t)}function sg(n){return ba(n)}function lg(n,r){return we(n,"ddd",r)}function ro(n){return Gt(n)}function At(n,r,e){var t=nn(r||or());return wt(n,{locale:t,weekStartsOn:e})}function $t(n){return Fl(n)}function nr(n){return qr(n)}function Yl(n){return Da(n)}function jl(){return Gt(pe())}function Wl(n){return fl(n)}function ug(n){return zh(n)}function ft(n,r){return n&&r?Wm(n,r):!n&&!r}function We(n,r){return n&&r?Ym(n,r):!n&&!r}function oo(n,r){return n&&r?jm(n,r):!n&&!r}function re(n,r){return n&&r?$m(n,r):!n&&!r}function tn(n,r){return n&&r?Am(n,r):!n&&!r}function rr(n,r,e){var t,o=Gt(r),a=fl(e);try{t=Zn(n,{start:o,end:a})}catch{t=!1}return t}function or(){var n=$l();return n.__localeId__}function nn(n){if(typeof n=="string"){var r=$l();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function cg(n,r,e){return r(we(n,"EEEE",e))}function dg(n,r){return we(n,"EEEEEE",r)}function fg(n,r){return we(n,"EEE",r)}function Pa(n,r){return we(Ue(pe(),n),"LLLL",r)}function Hl(n,r){return we(Ue(pe(),n),"LLL",r)}function pg(n,r){return we(wn(pe(),n),"QQQ",r)}function Yt(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.excludeDateIntervals,s=e.includeDates,l=e.includeDateIntervals,u=e.filterDate;return ar(n,{minDate:t,maxDate:o})||a&&a.some(function(c){var f;return c instanceof Date?re(n,c):re(n,(f=c.date)!==null&&f!==void 0?f:new Date)})||i&&i.some(function(c){var f=c.start,m=c.end;return Zn(n,{start:f,end:m})})||s&&!s.some(function(c){return re(n,c)})||l&&!l.some(function(c){var f=c.start,m=c.end;return Zn(n,{start:f,end:m})})||u&&!u(pe(n))||!1}function Ma(n,r){var e=r===void 0?{}:r,t=e.excludeDates,o=e.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return Zn(n,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?re(n,a):re(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Rl(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return ar(n,{minDate:t?Fl(t):void 0,maxDate:o?Bh(o):void 0})||(a==null?void 0:a.some(function(l){return We(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return We(n,l)})||s&&!s(pe(n))||!1}function ao(n,r,e,t){var o=Z(n),a=je(n),i=Z(r),s=je(r),l=Z(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function hg(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return ar(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return We(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return We(s,n)})||!1}function Ta(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return ar(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return oo(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return oo(n,l)})||s&&!s(pe(n))||!1}function io(n,r,e){if(!r||!e||!Xr(r)||!Xr(e))return!1;var t=Z(r),o=Z(e);return t<=n&&o>=n}function Na(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate,l=new Date(n,0,1);return ar(l,{minDate:t?qr(t):void 0,maxDate:o?pl(o):void 0})||(a==null?void 0:a.some(function(u){return ft(l,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return ft(l,u)})||s&&!s(pe(l))||!1}function so(n,r,e,t){var o=Z(n),a=Xt(n),i=Z(r),s=Xt(r),l=Z(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function ar(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&Jn(n,o)<0||a&&Jn(n,a)>0)!==null&&e!==void 0?e:!1}function Bl(n,r){return r.some(function(e){return it(e)===it(n)&&st(e)===st(n)&&Dt(e)===Dt(n)})}function Vl(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&Bl(n,t)||o&&!Bl(n,o)||a&&!a(n)||!1}function zl(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=pe();o=eo(o,it(n)),o=to(o,st(n)),o=no(o,Dt(n));var a=pe();a=eo(a,it(e)),a=to(a,st(e)),a=no(a,Dt(e));var i=pe();i=eo(i,it(t)),i=to(i,st(t)),i=no(i,Dt(t));var s;try{s=!Zn(o,{start:a,end:i})}catch{s=!1}return s}function Ql(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=xn(n,1);return t&&Qr(t,a)>0||o&&o.every(function(i){return Qr(i,a)>0})||!1}function Ul(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=et(n,1);return t&&Qr(a,t)>0||o&&o.every(function(i){return Qr(a,i)>0})||!1}function mg(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=qr(n),i=Ll(a,1);return t&&Ur(t,i)>0||o&&o.every(function(s){return Ur(s,i)>0})||!1}function vg(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=pl(n),i=ga(a,1);return t&&Ur(i,t)>0||o&&o.every(function(s){return Ur(i,s)>0})||!1}function Kl(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Dn(n,1);return t&&Kr(t,a)>0||o&&o.every(function(i){return Kr(i,a)>0})||!1}function gg(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?tr:o,i=nr(Dn(n,a)),s=jt(i,a).endPeriod,l=t&&Z(t);return l&&l>s||!1}function ql(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=yt(n,1);return t&&Kr(a,t)>0||o&&o.every(function(i){return Kr(a,i)>0})||!1}function bg(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?tr:o,i=yt(n,a),s=jt(i,a).startPeriod,l=t&&Z(t);return l&&l<s||!1}function Gl(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return Jn(o,r)>=0});return Ol(t)}else return e?Ol(e):r}function Xl(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return Jn(o,r)<=0});return _l(t)}else return e?_l(e):r}function Jl(n,r){var e;n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var t=new Map,o=0,a=n.length;o<a;o++){var i=n[o];if(xt(i)){var s=we(i,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(r)||(l.push(r),t.set(s,l))}else if(typeof i=="object"){var u=Object.keys(i),c=(e=u[0])!==null&&e!==void 0?e:"",f=i[c];if(typeof c=="string"&&Array.isArray(f))for(var m=0,p=f.length;m<p;m++){var h=f[m];if(h){var s=we(h,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function yg(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function wg(n,r){n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--holidays");var e=new Map;return n.forEach(function(t){var o=t.date,a=t.holidayName;if(xt(o)){var i=we(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&yg(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?dt(dt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function xg(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=Hh(l,it(u)),l=va(l,st(u)),l=Rh(l,Dt(u)));var c=va(n,(e+1)*t);Lt(l,r)&&en(l,c)&&u!=null&&i.push(u)}return i}function Zl(n){return n<10?"0".concat(n):"".concat(n)}function jt(n,r){r===void 0&&(r=tr);var e=Math.ceil(Z(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function Dg(n){var r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),e=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+e-+r)/36e5)}function eu(n){var r=n.getSeconds(),e=n.getMilliseconds();return z(n.getTime()-r*1e3-e)}function Eg(n,r){return eu(n).getTime()===eu(r).getTime()}function tu(n){if(!xt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function nu(n,r){if(!xt(n)||!xt(r))throw new Error("Invalid date received");var e=tu(n),t=tu(r);return en(e,t)}function ru(n){return n.key===H.Space}var Cg=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.onTimeChange=function(o){var a,i;t.setState({time:o});var s=t.props.date,l=s instanceof Date&&!isNaN(+s),u=l?s:new Date;if(o!=null&&o.includes(":")){var c=o.split(":"),f=c[0],m=c[1];u.setHours(Number(f)),u.setMinutes(Number(m))}(i=(a=t.props).onChange)===null||i===void 0||i.call(a,u)},t.renderTimeInput=function(){var o=t.state.time,a=t.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?d.cloneElement(l,{date:i,value:o,onChange:t.onTimeChange}):d.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:o,onChange:function(u){t.onTimeChange(u.target.value||s)}})},t.state={time:t.props.timeString},t}return r.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},r.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__input-time-container"},d.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),d.createElement("div",{className:"react-datepicker-time__input-container"},d.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r}(d.Component),kg=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.dayEl=d.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===H.Space&&(t.preventDefault(),t.key=H.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isSameDay=function(t){return re(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var o=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(i){return e.isSameDayOrWeek(i)}):e.isSameDayOrWeek(e.props.selected),a=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!o&&e.isSameDayOrWeek(e.props.preSelection)&&!a},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),Yt(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(){return Ma(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return re(e.props.day,At(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&re(t,At(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,o=t.day,a=t.highlightDates;if(!a)return!1;var i=we(o,"MM.dd.yyyy");return a.get(i)},e.getHolidaysClass=function(){var t,o=e.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=we(a,"MM.dd.yyyy");return i.has(s)?[(t=i.get(s))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:rr(o,a,i)},e.isInSelectingRange=function(){var t,o=e.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,u=o.selectsDisabledDaysInRange,c=o.startDate,f=o.endDate,m=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!m||!u&&e.isDisabled()?!1:i&&f&&(en(m,f)||tn(m,f))?rr(a,m,f):s&&c&&(Lt(m,c)||tn(m,c))||l&&c&&!f&&(Lt(m,c)||tn(m,c))?rr(a,c,m):!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.startDate,s=o.selectsStart,l=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s?re(a,l):re(a,i)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s||l?re(a,u):re(a,i)},e.isRangeStart=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:re(a,o)},e.isRangeEnd=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:re(i,o)},e.isWeekend=function(){var t=Lm(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===je(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(je(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(pe())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return e.isSameDayOrWeek(o)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var o=e.props.dayClassName?e.props.dayClassName(t):void 0;return Le("react-datepicker__day",o,"react-datepicker__day--"+lg(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,o=t.day,a=t.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=t.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,u=e.isDisabled()||e.isExcluded()?l:i;return"".concat(u," ").concat(we(o,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,o=t.day,a=t.holidays,i=a===void 0?new Map:a,s=t.excludeDates,l=we(o,"MM.dd.yyyy"),u=[];return i.has(l)&&u.push.apply(u,i.get(l).holidayNames),e.isExcluded()&&u.push(s==null?void 0:s.filter(function(c){return c instanceof Date?re(c,o):re(c==null?void 0:c.date,o)}).map(function(c){if(!(c instanceof Date))return c==null?void 0:c.message})),u.join(", ")},e.getTabIndex=function(){var t=e.props.selected,o=e.props.preSelection,a=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&re(o,t))?0:-1;return a},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(Sl(e.props.day),e.props.day):Sl(e.props.day)},e.render=function(){return d.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&d.createElement("span",{className:"overlay"},e.getTitle()))},e}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},r.prototype.isDayActiveElement=function(){var e,t,o;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},r.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},r}(d.Component),Sg=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.weekNumberEl=d.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===H.Space&&(t.preventDefault(),t.key=H.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!re(e.props.date,e.props.selected)&&re(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||re(e.props.date,e.props.selected)&&re(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var o=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&re(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(o=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},r.prototype.render=function(){var e=this.props,t=e.weekNumber,o=e.ariaLabelPrefix,a=o===void 0?r.defaultProps.ariaLabelPrefix:o,i=e.onClick,s={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!i,"react-datepicker__week-number--selected":!!i&&re(this.props.date,this.props.selected),"react-datepicker__week-number--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{ref:this.weekNumberEl,className:Le(s),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),_g=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return Yt(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,o){e.props.onDayClick&&e.props.onDayClick(t,o)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,o,a){for(var i,s,l,u=new Date(t),c=0;c<7;c++){var f=new Date(t);f.setDate(f.getDate()+c);var m=!e.isDisabled(f);if(m){u=f;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(u,o,a),e.props.showWeekPicker&&e.handleDayClick(u,a),((i=e.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):sg(t)},e.renderDays=function(){var t=e.startOfWeek(),o=[],a=e.formatWeekNumber(t);if(e.props.showWeekNumber){var i=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,a):void 0;o.push(d.createElement(Sg,ie({key:"W"},r.defaultProps,e.props,{weekNumber:a,date:t,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=It(t,s);return d.createElement(kg,ie({},r.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:e.handleDayClick.bind(e,l),onMouseEnter:e.handleDayMouseEnter.bind(e,l)}))}))},e.startOfWeek=function(){return At(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!re(e.startOfWeek(),e.props.selected)&&re(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":re(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{className:Le(e)},this.renderDays())},r}(d.Component),ir,Og=6,En={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Ia=(ir={},ir[En.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ir[En.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ir[En.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ir),lo=1;function ou(n,r){return n?En.FOUR_COLUMNS:r?En.TWO_COLUMNS:En.THREE_COLUMNS}var Pg=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=dt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=dt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return Yt(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(t){return Ma(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,o){var a,i;(i=(a=e.props).onDayClick)===null||i===void 0||i.call(a,t,o,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var o,a;(a=(o=e.props).onDayMouseEnter)===null||a===void 0||a.call(o,t)},e.handleMouseLeave=function(){var t,o;(o=(t=e.props).onMouseLeave)===null||o===void 0||o.call(t)},e.isRangeStartMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:We(Ue(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:oo(wn(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:We(Ue(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:oo(wn(a,t),s)},e.isInSelectingRangeMonth=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,f=a.endDate,m=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!m?!1:s&&f?ao(m,f,t,i):l&&c||u&&c&&!f?ao(c,m,t,i):!1},e.isSelectingMonthRangeStart=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.startDate,l=a.selectsStart,u=Ue(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?We(u,c):We(u,s)},e.isSelectingMonthRangeEnd=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.endDate,l=a.selectsEnd,u=a.selectsRange,c=Ue(i,t),f=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?We(c,f):We(c,s)},e.isInSelectingRangeQuarter=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,f=a.endDate,m=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!m?!1:s&&f?so(m,f,t,i):l&&c||u&&c&&!f?so(c,m,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=It(t,6);return We(t,o)||We(a,o)},e.isCurrentMonth=function(t,o){return Z(t)===Z(pe())&&o===je(pe())},e.isCurrentQuarter=function(t,o){return Z(t)===Z(pe())&&o===Xt(pe())},e.isSelectedMonth=function(t,o,a){return je(a)===o&&Z(t)===Z(a)},e.isSelectMonthInList=function(t,o,a){return a.some(function(i){return e.isSelectedMonth(t,o,i)})},e.isSelectedQuarter=function(t,o,a){return Xt(t)===o&&Z(t)===Z(a)},e.renderWeeks=function(){for(var t=[],o=e.props.fixedHeight,a=0,i=!1,s=At($t(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(h){return e.props.showWeekPicker?At(h,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(h){return e.props.showWeekPicker?At(h,e.props.locale,e.props.calendarStartDay):e.props.selected},c=e.props.selected?u(e.props.selected):void 0,f=e.props.preSelection?l(e.props.preSelection):void 0;t.push(d.createElement(_g,ie({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:je(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Vr(s,1);var m=o&&a>=Og,p=!o&&!e.isWeekInMonth(s);if(m||p)if(e.props.peekNextMonth)i=!0;else break}return t},e.onMonthClick=function(t,o){var a=e.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||e.handleDayClick($t(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter($t(i))},e.handleMonthNavigation=function(t,o){var a,i,s,l;(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.MONTH_REFS[t])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},e.handleKeyboardNavigation=function(t,o,a){var i,s=e.props,l=s.selected,u=s.preSelection,c=s.setPreSelection,f=s.minDate,m=s.maxDate,p=s.showFourColumnMonthYearPicker,h=s.showTwoColumnMonthYearPicker;if(u){var v=ou(p,h),g=e.getVerticalOffset(v),b=(i=Ia[v])===null||i===void 0?void 0:i.grid,w=function(S,O,I){var W,E,C=O,_=I;switch(S){case H.ArrowRight:C=et(O,lo),_=I===11?0:I+lo;break;case H.ArrowLeft:C=xn(O,lo),_=I===0?11:I-lo;break;case H.ArrowUp:C=xn(O,g),_=!((W=b==null?void 0:b[0])===null||W===void 0)&&W.includes(I)?I+12-g:I-g;break;case H.ArrowDown:C=et(O,g),_=!((E=b==null?void 0:b[b.length-1])===null||E===void 0)&&E.includes(I)?I-12+g:I+g;break}return{newCalculatedDate:C,newCalculatedMonth:_}},x=function(S,O,I){for(var W=40,E=S,C=!1,_=0,D=w(E,O,I),N=D.newCalculatedDate,A=D.newCalculatedMonth;!C;){if(_>=W){N=O,A=I;break}if(f&&N<f){E=H.ArrowRight;var $=w(E,N,A);N=$.newCalculatedDate,A=$.newCalculatedMonth}if(m&&N>m){E=H.ArrowLeft;var $=w(E,N,A);N=$.newCalculatedDate,A=$.newCalculatedMonth}if(hg(N,e.props)){var $=w(E,N,A);N=$.newCalculatedDate,A=$.newCalculatedMonth}else C=!0;_++}return{newCalculatedDate:N,newCalculatedMonth:A}};if(o===H.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var k=x(o,u,a),P=k.newCalculatedDate,M=k.newCalculatedMonth;switch(o){case H.ArrowRight:case H.ArrowLeft:case H.ArrowUp:case H.ArrowDown:e.handleMonthNavigation(M,P);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=Ia[t])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},e.onMonthKeyDown=function(t,o){var a=e.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=t.key;l!==H.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=wn(e.props.day,o);Ta(a,e.props)||e.handleDayClick(Yl(a),t)},e.onQuarterMouseEnter=function(t){var o=wn(e.props.day,t);Ta(o,e.props)||e.handleDayMouseEnter(Yl(o))},e.handleQuarterNavigation=function(t,o){var a,i,s,l;e.isDisabled(o)||e.isExcluded(o)||((i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.QUARTER_REFS[t-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},e.onQuarterKeyDown=function(t,o){var a,i,s=t.key;if(!e.props.disabledKeyboardNavigation)switch(s){case H.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case H.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,ga(e.props.preSelection,1));break;case H.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,Ll(e.props.preSelection,1));break}},e.isMonthDisabledForLabelDate=function(t){var o,a=e.props,i=a.day,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,f=Ue(i,t);return{isDisabled:(o=(s||l||u||c)&&Rl(f,e.props))!==null&&o!==void 0?o:!1,labelDate:f}},e.isMonthDisabled=function(t){var o=e.isMonthDisabledForLabelDate(t).isDisabled;return o},e.getMonthClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,u=o.monthClassName,c=u?u(Ue(a,t)):void 0,f=e.getSelection();return Le("react-datepicker__month-text","react-datepicker__month-".concat(t),c,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":f?e.isSelectMonthInList(a,t,f):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(a,t,l)&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?ao(i,s,t,a):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(a,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=je(e.props.preSelection),a=!e.props.disabledKeyboardNavigation&&t===o?"0":"-1";return a},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=Xt(e.props.preSelection),a=!e.props.disabledKeyboardNavigation&&t===o?"0":"-1";return a},e.getAriaLabel=function(t){var o=e.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,u=o.day,c=o.locale,f=Ue(u,t),m=e.isDisabled(f)||e.isExcluded(f)?l:i;return"".concat(m," ").concat(we(f,"MMMM yyyy",c))},e.getQuarterClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,u=o.minDate,c=o.maxDate,f=o.excludeDates,m=o.includeDates,p=o.filterDate,h=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||f||m||p)&&Ta(wn(a,t),e.props);return Le("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":g,"react-datepicker__quarter-text--selected":l?e.isSelectedQuarter(a,t,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!v&&h&&e.isSelectedQuarter(a,t,h)&&!g,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?so(i,s,t,a):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t)})},e.getMonthContent=function(t){var o=e.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,u=Hl(t,s),c=Pa(t,s);return i?i(t,u,c,l):a?c:u},e.getQuarterContent=function(t){var o,a=e.props,i=a.renderQuarterContent,s=a.locale,l=pg(t,s);return(o=i==null?void 0:i(t,l))!==null&&o!==void 0?o:l},e.renderMonths=function(){var t,o=e.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,u=(t=Ia[ou(i,a)])===null||t===void 0?void 0:t.grid;return u==null?void 0:u.map(function(c,f){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:f},c.map(function(m,p){return d.createElement("div",{ref:e.MONTH_REFS[m],key:p,onClick:function(h){e.onMonthClick(h,m)},onKeyDown:function(h){ru(h)&&(h.preventDefault(),h.key=H.Enter),e.onMonthKeyDown(h,m)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(m)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(m)}:void 0,tabIndex:Number(e.getTabIndex(m)),className:e.getMonthClassNames(m),"aria-disabled":e.isMonthDisabled(m),role:"option","aria-label":e.getAriaLabel(m),"aria-current":e.isCurrentMonth(s,m)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,m,l):void 0},e.getMonthContent(m))}))})},e.renderQuarters=function(){var t=e.props,o=t.day,a=t.selected,i=[1,2,3,4];return d.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return d.createElement("div",{key:l,ref:e.QUARTER_REFS[l],role:"option",onClick:function(u){e.onQuarterClick(u,s)},onKeyDown:function(u){e.onQuarterKeyDown(u,s)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(s)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(s)}:void 0,className:e.getQuarterClassNames(s),"aria-selected":a?e.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(e.getQuarterTabIndex(s)),"aria-current":e.isCurrentQuarter(o,s)?"date":void 0},e.getQuarterContent(s))}))},e.getClassNames=function(){var t=e.props,o=t.selectingDate,a=t.selectsStart,i=t.selectsEnd,s=t.showMonthYearPicker,l=t.showQuarterYearPicker,u=t.showWeekPicker;return Le("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":u})},e}return r.prototype.getSelection=function(){var e=this.props,t=e.selected,o=e.selectedDates,a=e.selectsMultiple;if(a)return o;if(t)return[t]},r.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,o=e.showQuarterYearPicker,a=e.day,i=e.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"";return d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(we(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),Mg=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isSelectedMonth=function(t){return e.props.month===t},e.renderOptions=function(){return e.props.monthNames.map(function(t,o){return d.createElement("div",{className:e.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,o),"aria-selected":e.isSelectedMonth(o)?"true":void 0},e.isSelectedMonth(o)?d.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return r.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__month-dropdown"},this.renderOptions())},r}(d.Component),Tg=Hr(Mg),Ng=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(o,a){return d.createElement("option",{key:o,value:a},o)})},e.renderSelectMode=function(t){return d.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(o){return e.onChange(parseInt(o.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,o){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[e.props.month]))},e.renderDropdown=function(t){return d.createElement(Tg,ie({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var o=e.state.dropdownVisible,a=[e.renderReadView(!o,t)];return o&&a.unshift(e.renderDropdown(t)),a},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Hl(a,e.props.locale)}:function(a){return Pa(a,e.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(t);break;case"select":o=this.renderSelectMode(t);break}return d.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r}(d.Component);function Ig(n,r){for(var e=[],t=$t(n),o=$t(r);!Lt(t,o);)e.push(pe(t)),t=et(t,1);return e}var Fg=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(o){var a=xa(o),i=ft(t.props.date,o)&&We(t.props.date,o);return d.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:t.onChange.bind(t,a),"aria-selected":i?"true":void 0},i?d.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",we(o,t.props.dateFormat,t.props.locale))})},t.onChange=function(o){return t.props.onChange(o)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:Ig(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Le({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement("div",{className:e},this.renderOptions())},r}(d.Component),Lg=Hr(Fg),Ag=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=$t(e.props.minDate),o=$t(e.props.maxDate),a=[];!Lt(t,o);){var i=xa(t);a.push(d.createElement("option",{key:i,value:i},we(t,e.props.dateFormat,e.props.locale))),t=et(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:xa($t(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=we(e.props.date,e.props.dateFormat,e.props.locale);return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},e.renderDropdown=function(){return d.createElement(Lg,ie({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown();var o=pe(t);ft(e.props.date,o)&&We(e.props.date,o)||e.props.onChange(o)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),$g=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,o,a;e.list&&(e.list.scrollTop=(a=e.centerLi&&r.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((o=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&o!==void 0?o:0):e.list.clientHeight,e.centerLi))!==null&&a!==void 0?a:0)})},e.handleClick=function(t){var o,a;(e.props.minTime||e.props.maxTime)&&zl(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Vl(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&Eg(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&zl(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Vl(t,e.props)},e.liClasses=function(t){var o,a=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&a.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&a.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(it(t)*3600+st(t)*60+Dt(t))%(((o=e.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},e.handleOnKeyDown=function(t,o){var a,i;t.key===H.Space&&(t.preventDefault(),t.key=H.Enter),(t.key===H.ArrowUp||t.key===H.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===H.ArrowDown||t.key===H.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===H.Enter&&e.handleClick(o),(i=(a=e.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},e.renderTimes=function(){for(var t,o=[],a=e.props.format?e.props.format:"p",i=(t=e.props.intervals)!==null&&t!==void 0?t:r.defaultProps.intervals,s=e.props.selected||e.props.openToDate||pe(),l=ro(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,b){return g.getTime()-b.getTime()}),c=60*Dg(s),f=c/i,m=0;m<f;m++){var p=va(l,m*i);if(o.push(p),u){var h=xg(l,p,m,i,u);o=o.concat(h)}}var v=o.reduce(function(g,b){return b.getTime()<=s.getTime()?b:g},o[0]);return o.map(function(g){return d.createElement("li",{key:g.valueOf(),onClick:e.handleClick.bind(e,g),className:e.liClasses(g),ref:function(b){g===v&&(e.centerLi=b)},onKeyDown:function(b){e.handleOnKeyDown(b,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},we(g,a,e.props.locale))})},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time"}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var e=this,t,o=this.state.height;return d.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},d.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(this.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(a){e.header=a}},d.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),d.createElement("div",{className:"react-datepicker__time"},d.createElement("div",{className:"react-datepicker__time-box"},d.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){e.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},r}(d.Component),au=3,Yg=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=dt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return Yt(o,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(o){return Ma(o,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var o;return(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection},t.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=t.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},t.handleYearClick=function(o,a){t.props.onDayClick&&t.props.onDayClick(o,a)},t.handleYearNavigation=function(o,a){var i,s,l,u,c=t.props,f=c.date,m=c.yearItemNumber;if(!(f===void 0||m===void 0)){var p=jt(f,m).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-p<0?t.updateFocusOnPaginate(m-(p-o)):o-p>=m?t.updateFocusOnPaginate(Math.abs(m-(o-p))):(u=(l=t.YEAR_REFS[o-p])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},t.isSameDay=function(o,a){return re(o,a)},t.isCurrentYear=function(o){return o===Z(pe())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&ft(ct(pe(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&ft(ct(pe(),o),t.props.endDate)},t.isInRange=function(o){return io(o,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(o){var a=t.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,u=a.startDate,c=a.endDate;return!(i||s||l)||!t.selectingDate()?!1:i&&c?io(o,t.selectingDate(),c):s&&u||l&&u&&!c?io(o,u,t.selectingDate()):!1},t.isSelectingRangeStart=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.startDate,l=i.selectsStart,u=ct(pe(),o);return l?ft(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):ft(u,s??null)},t.isSelectingRangeEnd=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.endDate,l=i.selectsEnd,u=i.selectsRange,c=ct(pe(),o);return l||u?ft(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):ft(c,s??null)},t.isKeyboardSelected=function(o){if(!(t.props.date===void 0||t.props.selected==null||t.props.preSelection==null)){var a=t.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,u=a.includeDates,c=a.filterDate,f=nr(ct(t.props.date,o)),m=(i||s||l||u||c)&&Na(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!re(f,nr(t.props.selected))&&re(f,nr(t.props.preSelection))&&!m}},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick(nr(ct(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,f=u.yearItemNumber,m=u.handleOnKeyDown;if(l!==H.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case H.Enter:if(t.props.selected==null)break;t.onYearClick(o,a),(s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,t.props.selected);break;case H.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,yt(t.props.preSelection,1));break;case H.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,Dn(t.props.preSelection,1));break;case H.ArrowUp:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var p=jt(c,f).startPeriod,h=au,v=a-h;if(v<p){var g=f%h;a>=p&&a<p+g?h=g:h+=g,v=a-h}t.handleYearNavigation(v,Dn(t.props.preSelection,h));break}case H.ArrowDown:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var b=jt(c,f).endPeriod,h=au,v=a+h;if(v>b){var g=f%h;a<=b&&a>b-g?h=g:h+=g,v=a+h}t.handleYearNavigation(v,yt(t.props.preSelection,h));break}}m&&m(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,u=a.selected,c=a.excludeDates,f=a.includeDates,m=a.filterDate,p=a.yearClassName;return Le("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p==null?void 0:p(ct(i,o)):void 0,{"react-datepicker__year-text--selected":u?o===Z(u):void 0,"react-datepicker__year-text--disabled":(s||l||c||f||m)&&Na(o,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(o),"react-datepicker__year-text--range-start":t.isRangeStart(o),"react-datepicker__year-text--range-end":t.isRangeEnd(o),"react-datepicker__year-text--in-range":t.isInRange(o),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(o),"react-datepicker__year-text--today":t.isCurrentYear(o)})},t.getYearTabIndex=function(o){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var a=Z(t.props.preSelection);return o===a?"0":"-1"},t.getYearContainerClassNames=function(){var o=t.props,a=o.selectingDate,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange;return Le("react-datepicker__year",{"react-datepicker__year--selecting-range":a&&(i||s||l)})},t.getYearContent=function(o){return t.props.renderYearContent?t.props.renderYearContent(o):o},t}return r.prototype.render=function(){var e=this,t=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var u=jt(a,i),c=u.startPeriod,f=u.endPeriod,m=function(v){t.push(d.createElement("div",{ref:p.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){ru(g)&&(g.preventDefault(),g.key=H.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(p.getYearTabIndex(v)),className:p.getYearClassNames(v),onMouseEnter:p.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:p.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:p.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":p.isCurrentYear(v)?"date":void 0},p.getYearContent(v)))},p=this,h=c;h<=f;h++)m(h);return d.createElement("div",{className:this.getYearContainerClassNames()},d.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},r}(d.Component);function jg(n,r,e,t){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;e&&(s=Z(e)<=i),t&&s&&(s=Z(t)>=i),s&&o.push(i)}return o}var Wg=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;t.renderOptions=function(){var s=t.props.year,l=t.state.yearsList.map(function(f){return d.createElement("div",{className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:t.onChange.bind(t,f),"aria-selected":s===f?"true":void 0},s===f?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),u=t.props.minDate?Z(t.props.minDate):null,c=t.props.maxDate?Z(t.props.maxDate):null;return(!c||!t.state.yearsList.find(function(f){return f===c}))&&l.unshift(d.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!u||!t.state.yearsList.find(function(f){return f===u}))&&l.push(d.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},t.onChange=function(s){t.props.onChange(s)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(s){var l=t.state.yearsList.map(function(u){return u+s});t.setState({yearsList:l})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var o=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,i=o||(a?10:5);return t.state={yearsList:jg(t.props.year,i,t.props.minDate,t.props.maxDate)},t.dropdownRef=d.createRef(),t}return r.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,o=t?t.find(function(a){return a.ariaSelected}):null;e.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},r.prototype.render=function(){var e=Le({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement("div",{className:e,ref:this.dropdownRef},this.renderOptions())},r}(d.Component),Hg=Hr(Wg),Rg=function(n){$e(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?Z(e.props.minDate):1900,o=e.props.maxDate?Z(e.props.maxDate):2100,a=[],i=t;i<=o;i++)a.push(d.createElement("option",{key:i,value:i},i));return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(o){return e.toggleDropdown(o)}},d.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return d.createElement(Hg,ie({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,o){e.onSelect(t,o),e.setOpen()},e.onSelect=function(t,o){e.props.onSelect&&e.props.onSelect(t,o)},e.setOpen=function(){e.props.setOpen&&e.props.setOpen(!0)},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),Bg=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Vg=function(n){var r=(n.className||"").split(/\s+/);return Bg.some(function(e){return r.indexOf(e)>=0})},zg=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(o){t.props.onClickOutside(o)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(o){var a,i;Vg(o.target)&&((i=(a=t.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},t.getDateInView=function(){var o=t.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=Gl(t.props),u=Xl(t.props),c=pe(),f=s||i||a;return f||(l&&en(c,l)?l:u&&Lt(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:et(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:xn(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(o,a,i){t.props.onSelect(o,a,i),t.props.setPreSelection&&t.props.setPreSelection(o)},t.handleDayMouseEnter=function(o){t.setState({selectingDate:o}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(o)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(o,a){t.setState({selectingDate:ct(pe(),a)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(o,a)},t.handleYearMouseLeave=function(o,a){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(o,a)},t.handleYearChange=function(o){t.props.onYearChange&&(t.props.onYearChange(o),t.setState({isRenderAriaLiveMessage:!0})),t.props.adjustDateOnChange&&(t.props.onSelect&&t.props.onSelect(o),t.props.setOpen&&t.props.setOpen(!0)),t.props.setPreSelection&&t.props.setPreSelection(o)},t.handleMonthChange=function(o){t.handleCustomMonthChange(o),t.props.adjustDateOnChange&&(t.props.onSelect&&t.props.onSelect(o),t.props.setOpen&&t.props.setOpen(!0)),t.props.setPreSelection&&t.props.setPreSelection(o)},t.handleCustomMonthChange=function(o){t.props.onMonthChange&&(t.props.onMonthChange(o),t.setState({isRenderAriaLiveMessage:!0}))},t.handleMonthYearChange=function(o){t.handleYearChange(o),t.handleMonthChange(o)},t.changeYear=function(o){t.setState(function(a){var i=a.date;return{date:ct(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:Ue(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:ct(Ue(i,je(o)),Z(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=At(o,t.props.locale,t.props.calendarStartDay),i=[];return t.props.showWeekNumbers&&i.push(d.createElement("div",{key:"W",className:"react-datepicker__day-name"},t.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(s){var l=It(a,s),u=t.formatWeekday(l,t.props.locale),c=t.props.weekDayClassName?t.props.weekDayClassName(l):void 0;return d.createElement("div",{key:s,"aria-label":we(l,"EEEE",t.props.locale),className:Le("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?cg(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?fg(o,a):dg(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Dn(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var o;if(!t.props.renderCustomHeader){var a;switch(!0){case t.props.showMonthYearPicker:a=Kl(t.state.date,t.props);break;case t.props.showYearPicker:a=gg(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=mg(t.state.date,t.props);break;default:a=Ql(t.state.date,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&a||t.props.showTimeSelectOnly)){var i=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],s=["react-datepicker__navigation","react-datepicker__navigation--previous"],l=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(l=t.decreaseYear),a&&t.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),l=void 0);var u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,c=t.props,f=c.previousMonthButtonLabel,m=f===void 0?r.defaultProps.previousMonthButtonLabel:f,p=c.previousYearButtonLabel,h=p===void 0?r.defaultProps.previousYearButtonLabel:p,v=t.props,g=v.previousMonthAriaLabel,b=g===void 0?typeof m=="string"?m:"Previous Month":g,w=v.previousYearAriaLabel,x=w===void 0?typeof h=="string"?h:"Previous Year":w;return d.createElement("button",{type:"button",className:s.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?x:b},d.createElement("span",{className:i.join(" ")},u?h:m))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:yt(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var o;if(!t.props.renderCustomHeader){var a;switch(!0){case t.props.showMonthYearPicker:a=ql(t.state.date,t.props);break;case t.props.showYearPicker:a=bg(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=vg(t.state.date,t.props);break;default:a=Ul(t.state.date,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&a||t.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(l=t.increaseYear),a&&t.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,c=t.props,f=c.nextMonthButtonLabel,m=f===void 0?r.defaultProps.nextMonthButtonLabel:f,p=c.nextYearButtonLabel,h=p===void 0?r.defaultProps.nextYearButtonLabel:p,v=t.props,g=v.nextMonthAriaLabel,b=g===void 0?typeof m=="string"?m:"Next Month":g,w=v.nextYearAriaLabel,x=w===void 0?typeof h=="string"?h:"Next Year":w;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?x:b},d.createElement("span",{className:s.join(" ")},u?h:m))}}},t.renderCurrentMonth=function(o){o===void 0&&(o=t.state.date);var a=["react-datepicker__current-month"];return t.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),d.createElement("h2",{className:a.join(" ")},we(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(Rg,ie({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:Z(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return d.createElement(Ng,ie({},r.defaultProps,t.props,{month:je(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(Ag,ie({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(jl(),o),t.props.setPreSelection&&t.props.setPreSelection(jl())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return d.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return d.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(a),d.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(i!==0),t.renderMonthYearDropdown(i!==0),t.renderYearDropdown(i!==0)),d.createElement("div",{className:"react-datepicker__day-names"},t.header(a)))},t.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var u=Ql(t.state.date,t.props),c=Ul(t.state.date,t.props),f=Kl(t.state.date,t.props),m=ql(t.state.date,t.props),p=!t.props.showMonthYearPicker&&!t.props.showQuarterYearPicker&&!t.props.showYearPicker;return d.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(i=(a=t.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,ie(ie({},t.state),{customHeaderCount:l,monthDate:s,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:u,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:m})),p&&d.createElement("div",{className:"react-datepicker__day-names"},t.header(s)))},t.renderYearHeader=function(o){var a=o.monthDate,i=t.props,s=i.showYearPicker,l=i.yearItemNumber,u=l===void 0?r.defaultProps.yearItemNumber:l,c=jt(a,u),f=c.startPeriod,m=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(m):Z(a))},t.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(l);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(l);default:return t.renderDefaultHeader(l)}},t.renderMonths=function(){var o,a;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var i=[],s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?yt(t.state.date,l):xn(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var m=f-c+l,p=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?yt(u,m):et(u,m),h="month-".concat(f),v=f<s-1,g=f>0;i.push(d.createElement("div",{key:h,ref:function(b){t.monthContainer=b??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:p,i:f}),d.createElement(Pg,ie({},r.defaultProps,t.props,{ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:p,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:f,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:v,monthShowsDuplicateDaysStart:g}))))}return i}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return d.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),d.createElement(Yg,ie({},r.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return d.createElement($g,ie({},r.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var o=t.props.selected?new Date(t.props.selected):void 0,a=o&&Et(o)&&!!t.props.selected,i=a?"".concat(Zl(o.getHours()),":").concat(Zl(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(Cg,ie({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=jt(t.state.date,(o=t.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return t.props.showYearPicker?l="".concat(i," - ").concat(s):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?l=Z(t.state.date):l="".concat(Pa(je(t.state.date),t.props.locale)," ").concat(Z(t.state.date)),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&l)},t.renderChildren=function(){if(t.props.children)return d.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=d.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:tr}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},r.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&(!re(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var o=!We(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!re(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var e=this.props.container||ng;return d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Le("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},r}(d.Component),Qg=function(n){var r=n.icon,e=n.className,t=e===void 0?"":e,o=n.onClick,a="react-datepicker__calendar-icon";return typeof r=="string"?d.createElement("i",{className:"".concat(a," ").concat(r," ").concat(t),"aria-hidden":"true",onClick:o}):d.isValidElement(r)?d.cloneElement(r,{className:"".concat(r.props.className||""," ").concat(a," ").concat(t),onClick:function(i){typeof r.props.onClick=="function"&&r.props.onClick(i),typeof o=="function"&&o(i)}}):d.createElement("svg",{className:"".concat(a," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},d.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},iu=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return r.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},r.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},r.prototype.render=function(){return xe.createPortal(this.props.children,this.el)},r}(d.Component),Ug="[tabindex], a, button, input, select, textarea",Kg=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},su=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.getTabChildren=function(){var o;return Array.prototype.slice.call((o=t.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(Ug),1,-1).filter(Kg)},t.handleFocusStart=function(){var o=t.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},t.handleFocusEnd=function(){var o=t.getTabChildren();o&&o.length>1&&o[0].focus()},t.tabLoopRef=d.createRef(),t}return r.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:r.defaultProps.enableTabLoop)?d.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},d.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,d.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r}(d.Component);function qg(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=bs(ie({open:!o,whileElementsMounted:is,placement:e.popperPlacement,middleware:dt([ds({padding:15}),qo(10),wf({element:a})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),s=ie(ie({},e),{hidePopper:o,popperProps:ie(ie({},i),{arrowRef:a})});return d.createElement(n,ie({},s))};return r}var Gg=function(n){$e(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(r,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e=this.props,t=e.className,o=e.wrapperClassName,a=e.hidePopper,i=a===void 0?r.defaultProps.hidePopper:a,s=e.popperComponent,l=e.targetComponent,u=e.enableTabLoop,c=e.popperOnKeyDown,f=e.portalId,m=e.portalHost,p=e.popperProps,h=e.showArrow,v=void 0;if(!i){var g=Le("react-datepicker-popper",t);v=d.createElement(su,{enableTabLoop:u},d.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:g,"data-placement":p.placement,onKeyDown:c},s,h&&d.createElement(kf,{ref:p.arrowRef,context:p.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(v=d.createElement(this.props.popperContainer,{},v)),f&&!i&&(v=d.createElement(iu,{portalId:f,portalHost:m},v));var b=Le("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:p.refs.setReference,className:b},l),v)},r}(d.Component),Xg=qg(Gg),lu="react-datepicker-ignore-onclickoutside",Jg=Hr(zg);function Zg(n,r){return n&&r?je(n)!==je(r)||Z(n)!==Z(r):n!==r}var Fa="Date input not valid.",eb=function(n){$e(r,n);function r(e){var t=n.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:pe()},t.modifyHolidays=function(){var o;return(o=t.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return Et(s)?dt(dt([],a,!0),[ie(ie({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Gl(t.props),s=Xl(t.props),l=i&&en(a,ro(i))?i:s&&Lt(a,Wl(s))?s:a;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&o!==void 0?o:l,highlightDates:Jl(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(ie(ie({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(ie(ie({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.setFocus=function(){t.input&&t.input.focus&&t.input.focus({preventScroll:!0})},t.setBlur=function(){t.input&&t.input.blur&&t.input.blur(),t.cancelFocusInput()},t.setOpen=function(o,a){a===void 0&&(a=!1),t.setState({open:o,preSelection:o&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:La},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.setBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return xt(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(o){var a,i,s=t.state.wasHidden,l=s?t.state.open:!0;s&&t.resetHiddenStatus(),!t.state.preventFocus&&l&&((i=(a=t.props).onFocus)===null||i===void 0||i.call(a,o),!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.handleBlur=function(o){var a,i;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((i=(a=t.props).onBlur)===null||i===void 0||i.call(a,o)),t.setState({focused:!1})},t.handleCalendarClickOutside=function(o){var a,i;t.props.inline||t.setOpen(!1),(i=(a=t.props).onClickOutside)===null||i===void 0||i.call(a,o),t.props.withPortal&&o.preventDefault()},t.handleChange=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var i=o[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,o),!i||typeof i.isDefaultPrevented!="function"||i.isDefaultPrevented()))){t.setState({inputValue:(i==null?void 0:i.target)instanceof HTMLInputElement?i.target.value:null,lastPreSelectChange:tb});var s=t.props,l=s.dateFormat,u=l===void 0?r.defaultProps.dateFormat:l,c=s.strictParsing,f=c===void 0?r.defaultProps.strictParsing:c,m=og((i==null?void 0:i.target)instanceof HTMLInputElement?i.target.value:"",u,t.props.locale,f,t.props.minDate);t.props.showTimeSelectOnly&&t.props.selected&&m&&!re(m,t.props.selected)&&(m=eg(t.props.selected,{hours:it(m),minutes:st(m),seconds:Dt(m)})),(m||!((i==null?void 0:i.target)instanceof HTMLInputElement)||!(i!=null&&i.target.value))&&t.setSelected(m,i,!0)}},t.handleSelect=function(o,a,i){if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&t.sendFocusBackToInput(),t.props.onChangeRaw&&t.props.onChangeRaw(a),t.setSelected(o,a,!1,i),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect)t.setPreSelection(o);else if(!t.props.inline){t.props.selectsRange||t.setOpen(!1);var s=t.props,l=s.startDate,u=s.endDate;l&&!u&&(t.props.swapRange||!nu(o,l))&&t.setOpen(!1)}},t.setSelected=function(o,a,i,s){var l,u=o;if(t.props.showYearPicker){if(u!==null&&Na(Z(u),t.props))return}else if(t.props.showMonthYearPicker){if(u!==null&&Rl(u,t.props))return}else if(u!==null&&Yt(u,t.props))return;var c=t.props,f=c.onChange,m=c.selectsRange,p=c.startDate,h=c.endDate,v=c.selectsMultiple,g=c.selectedDates,b=c.minTime,w=c.swapRange;if(!tn(t.props.selected,u)||t.props.allowSameDay||m||v)if(u!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(u=Oa(u,{hour:it(t.props.selected),minute:st(t.props.selected),second:Dt(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&b&&(u=Oa(u,{hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})),t.props.inline||t.setState({preSelection:u}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),m){var x=!p&&!h,k=p&&!h,P=p&&h;x?f?f([u,null],a):r.defaultProps.onChange:k&&(u===null?f?f([null,null],a):r.defaultProps.onChange:nu(u,p)?w?f?f([u,p],a):r.defaultProps.onChange:f?f([u,null],a):r.defaultProps.onChange:f?f([p,u],a):r.defaultProps.onChange),P&&(f?f([u,null],a):r.defaultProps.onChange)}else if(v){if(u!==null)if(!(g!=null&&g.length))f?f([u],a):r.defaultProps.onChange;else{var M=g.some(function(I){return re(I,u)});if(M){var S=g.filter(function(I){return!re(I,u)});f?f(S,a):r.defaultProps.onChange}else f?f(dt(dt([],g,!0),[u],!1),a):r.defaultProps.onChange}}else f?f(u,a):r.defaultProps.onChange;if(!i){var O=(l=t.props.onSelect)!==null&&l!==void 0?l:r.defaultProps.onSelect;O(u,a),t.setState({inputValue:null})}},t.setPreSelection=function(o){var a=xt(t.props.minDate),i=xt(t.props.maxDate),s=!0;if(o){var l=ro(o);if(a&&i)s=rr(o,t.props.minDate,t.props.maxDate);else if(a){var u=ro(t.props.minDate);s=Lt(o,u)||tn(l,u)}else if(i){var c=Wl(t.props.maxDate);s=en(o,c)||tn(l,c)}}s&&t.setState({preSelection:o})},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(o){var a;if(!(t.props.selectsRange||t.props.selectsMultiple)){var i=t.props.selected?t.props.selected:t.getPreSelection(),s=t.props.selected?o:Oa(i,{hour:it(o),minute:st(o)});t.setState({preSelection:s});var l=(a=t.props.onChange)!==null&&a!==void 0?a:r.defaultProps.onChange;l(s),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var o,a;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(a=(o=t.props).onInputClick)===null||a===void 0||a.call(o)},t.onInputKeyDown=function(o){var a,i,s,l,u;(i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o);var c=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(c===H.ArrowDown||c===H.ArrowUp||c===H.Enter)&&t.onInputClick();return}if(t.state.open){if(c===H.ArrowDown||c===H.ArrowUp){o.preventDefault();var f=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',m=((s=t.calendar)===null||s===void 0?void 0:s.componentNode)instanceof Element&&t.calendar.componentNode.querySelector(f);m instanceof HTMLElement&&m.focus({preventScroll:!0});return}var p=pe(t.state.preSelection);c===H.Enter?(o.preventDefault(),t.inputOk()&&t.state.lastPreSelectChange===La?(t.handleSelect(p,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(p)):t.setOpen(!1)):c===H.Escape?(o.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1)):c===H.Tab&&t.setOpen(!1),t.inputOk()||(u=(l=t.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:Fa})}},t.onPortalKeyDown=function(o){var a=o.key;a===H.Escape&&(o.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(o){var a,i,s,l,u=t.props,c=u.minDate,f=u.maxDate,m=u.disabledKeyboardNavigation,p=u.showWeekPicker,h=u.shouldCloseOnSelect,v=u.locale,g=u.calendarStartDay,b=u.adjustDateOnChange,w=u.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var x=o.key,k=o.shiftKey,P=pe(t.state.preSelection),M=function(_,D){var N=D;switch(_){case H.ArrowRight:N=p?Vr(D,1):It(D,1);break;case H.ArrowLeft:N=p?Al(D,1):tg(D,1);break;case H.ArrowUp:N=Al(D,1);break;case H.ArrowDown:N=Vr(D,1);break;case H.PageUp:N=k?Dn(D,1):xn(D,1);break;case H.PageDown:N=k?yt(D,1):et(D,1);break;case H.Home:N=At(D,v,g);break;case H.End:N=ug(D);break}return N},S=function(_,D){for(var N=40,A=_,$=!1,U=0,j=M(_,D);!$;){if(U>=N){j=D;break}c&&j<c&&(A=H.ArrowRight,j=Yt(c,t.props)?M(A,j):c),f&&j>f&&(A=H.ArrowLeft,j=Yt(f,t.props)?M(A,j):f),Yt(j,t.props)?((A===H.PageUp||A===H.Home)&&(A=H.ArrowRight),(A===H.PageDown||A===H.End)&&(A=H.ArrowLeft),j=M(A,j)):$=!0,U++}return j};if(x===H.Enter){o.preventDefault(),t.handleSelect(P,o),!h&&t.setPreSelection(P);return}else if(x===H.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Fa});return}var O=null;switch(x){case H.ArrowLeft:case H.ArrowRight:case H.ArrowUp:case H.ArrowDown:case H.PageUp:case H.PageDown:case H.Home:case H.End:O=S(x,P);break}if(!O){t.props.onInputError&&t.props.onInputError({code:1,msg:Fa});return}if(o.preventDefault(),t.setState({lastPreSelectChange:La}),b&&t.setSelected(O),t.setPreSelection(O),w){var I=je(P),W=je(O),E=Z(P),C=Z(O);I!==W||E!==C?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===H.Escape&&(o.preventDefault(),t.sendFocusBackToInput())},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;i?s?s([null,null],o):r.defaultProps.onChange():s?s(null,o):r.defaultProps.onChange(),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(o){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(o)&&t.setOpen(!1)},t.renderCalendar=function(){var o,a;return!t.props.inline&&!t.isCalendarOpen()?null:d.createElement(Jg,ie({ref:function(i){t.calendar=i}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(o=t.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:wg(t.modifyHolidays()),outsideClickIgnoreClass:lu,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(a=t.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var o=t.props,a=o.dateFormat,i=a===void 0?r.defaultProps.dateFormat:a,s=o.locale,l=t.props.showTimeInput||t.props.showTimeSelect,u=l?"PPPPp":"PPPP",c;return t.props.selectsRange?c="Selected start date: ".concat(Ge(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+Ge(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(Ge(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(Ge(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(Ge(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(Ge(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(Ge(t.props.selected,{dateFormat:u,locale:s})),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},t.renderDateInput=function(){var o,a,i,s=Le(t.props.className,(o={},o[lu]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,f=c.dateFormat,m=f===void 0?r.defaultProps.dateFormat:f,p=c.locale,h=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?ag(t.props.startDate,t.props.endDate,{dateFormat:m,locale:p}):t.props.selectsMultiple?ig((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:m,locale:p}):Ge(t.props.selected,{dateFormat:m,locale:p});return d.cloneElement(l,(a={},a[u]=function(v){t.input=v},a.value=h,a.onBlur=t.handleBlur,a.onChange=t.handleChange,a.onClick=t.onInputClick,a.onFocus=t.handleFocus,a.onKeyDown=t.onInputKeyDown,a.id=t.props.id,a.name=t.props.name,a.form=t.props.form,a.autoFocus=t.props.autoFocus,a.placeholder=t.props.placeholderText,a.disabled=t.props.disabled,a.autoComplete=t.props.autoComplete,a.className=Le(l.props.className,s),a.title=t.props.title,a.readOnly=t.props.readOnly,a.required=t.props.required,a.tabIndex=t.props.tabIndex,a["aria-describedby"]=t.props.ariaDescribedBy,a["aria-invalid"]=t.props.ariaInvalid,a["aria-labelledby"]=t.props.ariaLabelledBy,a["aria-required"]=t.props.ariaRequired,a))},t.renderClearButton=function(){var o=t.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,u=o.endDate,c=o.clearButtonTitle,f=o.clearButtonClassName,m=f===void 0?"":f,p=o.ariaLabelClose,h=p===void 0?"Close":p,v=o.selectedDates;return a&&(s!=null||l!=null||u!=null||v!=null&&v.length)?d.createElement("button",{type:"button",className:Le("react-datepicker__close-icon",m,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":h,onClick:t.onClearClick,title:c,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(r,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:tr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.componentDidUpdate=function(e,t){var o,a,i,s;e.inline&&Zg(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Jl(this.props.highlightDates)}),!t.focused&&!tn(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),t.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},r.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,o=e.icon,a=e.calendarIconClassname,i=e.calendarIconClassName,s=e.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),d.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&d.createElement(Qg,ie({icon:o,className:Le(i,!i&&a,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},r.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?d.createElement(su,{enableTabLoop:this.props.enableTabLoop},d.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=d.createElement(iu,ie({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(Xg,ie({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(d.Component),tb="input",La="navigate";const nb={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},rb=(n,r,e)=>{let t;const o=nb[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?t+" 후":t+" 전":t},ob={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},ab={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ib={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},sb={date:gn({formats:ob,defaultWidth:"full"}),time:gn({formats:ab,defaultWidth:"full"}),dateTime:gn({formats:ib,defaultWidth:"full"})},lb={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},ub=(n,r,e,t)=>lb[n],cb={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},db={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},fb={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},pb={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},hb={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},mb={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},vb={ordinalNumber:(n,r)=>{const e=Number(n);switch(String(r==null?void 0:r.unit)){case"minute":case"second":return String(e);case"date":return e+"일";default:return e+"번째"}},era:ot({values:cb,defaultWidth:"wide"}),quarter:ot({values:db,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ot({values:fb,defaultWidth:"wide"}),day:ot({values:pb,defaultWidth:"wide"}),dayPeriod:ot({values:hb,defaultWidth:"wide",formattingValues:mb,defaultFormattingWidth:"wide"})},gb=/^(\d+)(일|번째)?/i,bb=/\d+/i,yb={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},wb={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},xb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},Db={any:[/1/i,/2/i,/3/i,/4/i]},Eb={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},Cb={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},kb={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},Sb={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},_b={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},Ob={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},Pb={ordinalNumber:hl({matchPattern:gb,parsePattern:bb,valueCallback:n=>parseInt(n,10)}),era:at({matchPatterns:yb,defaultMatchWidth:"wide",parsePatterns:wb,defaultParseWidth:"any"}),quarter:at({matchPatterns:xb,defaultMatchWidth:"wide",parsePatterns:Db,defaultParseWidth:"any",valueCallback:n=>n+1}),month:at({matchPatterns:Eb,defaultMatchWidth:"wide",parsePatterns:Cb,defaultParseWidth:"any"}),day:at({matchPatterns:kb,defaultMatchWidth:"wide",parsePatterns:Sb,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:_b,defaultMatchWidth:"any",parsePatterns:Ob,defaultParseWidth:"any"})},Mb={code:"ko",formatDistance:rb,formatLong:sb,formatRelative:ub,localize:vb,match:Pb,options:{weekStartsOn:0,firstWeekContainsDate:1}},Tb=({label:n,placeholder:r,value:e,onChange:t,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(c,f)=>1990+f),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=d.forwardRef(({value:c,onClick:f},m)=>T.jsx("button",{"aria-label":"inputButton",type:"button",id:n,className:"h-[60px] w-full rounded-xl bg-[#F8F8F9] p-4 text-left text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",onClick:f,ref:m,children:c||T.jsx("p",{className:"text-[#C5C8CD]",children:r})}));l.displayName="CustomInput";function u(c){var f=c.substring(0,4),m=c.substring(5,7),p=c.substring(8,10);return new Date(Number(f),Number(m)-1,Number(p))}return T.jsxs("div",{className:"flex flex-col text-deepGray",children:[T.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-lightBlack",children:n}),T.jsx(eb,{disabledKeyboardNavigation:!0,locale:Mb,id:n,name:"출생일",placeholderText:r,onChange:c=>c&&t(c),selected:e?u(e):void 0,value:e,dateFormat:"yyyy-MM-dd",autoComplete:"off",maxDate:new Date,customInput:T.jsx(l,{}),renderCustomHeader:({date:c,changeYear:f,changeMonth:m,decreaseMonth:p,increaseMonth:h})=>T.jsxs("div",{className:"flex justify-center pb-4 pt-5 text-lightBlack",children:[T.jsx("button",{onClick:p,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:T.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),T.jsxs("div",{className:"text-lg",children:[T.jsx("select",{"aria-label":"yearsSelect",dir:"rtl",className:"datepicker-select w-auto cursor-pointer rounded-md bg-[#e8e8e9] px-2 py-1 text-center focus:outline-none",value:Z(c),onChange:({target:{value:v}})=>f(Number(v)),children:i.map(v=>T.jsx("option",{value:v,children:v},v))}),T.jsx("span",{className:"ml-1 mr-2",children:"년"}),T.jsx("select",{"aria-label":"monthsSelect",dir:"rtl",className:"datepicker-select cursor-pointer rounded-md bg-[#e8e8e9] px-2 py-1 text-center focus:outline-none",value:s[je(c)],onChange:({target:{value:v}})=>m(s.indexOf(v)),children:s.map(v=>T.jsx("option",{value:v,children:v},v))}),T.jsx("span",{className:"mx-1",children:"월"})]}),T.jsx("button",{onClick:h,disabled:c.getFullYear()>=new Date().getFullYear()&&c.getMonth()>=new Date().getMonth(),type:"button",className:"react-datepicker__navigation react-datepicker__navigation--next","aria-label":"Next Month",children:T.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&T.jsx("p",{className:"px-4 pt-2 text-[#8B919A]",children:o})]})};function Nb(n){return Tn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},child:[]}]})(n)}const Ib=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>T.jsx("div",{className:"relative text-deepGray",children:T.jsxs(wh,{disabled:a,onChange:o,children:[T.jsx(yr,{className:"text-xl font-bold text-lightBlack",children:n}),T.jsxs(rl,{className:"relative mt-4 h-[60px] w-full rounded-xl bg-[#F8F8F8] p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",children:[e.name?T.jsx("p",{children:e.name}):T.jsx("p",{className:"text-[#C5C8CD]",children:r})," ",T.jsx(Nb,{className:"absolute bottom-5 right-4"})]}),T.jsx(ol,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>T.jsx(al,{value:i,as:T.Fragment,children:({focus:s,selected:l})=>T.jsx("li",{className:`flex w-full cursor-pointer justify-between p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50 ${s?"bg-[#E8E8E8]":"bg-[#F8F8F8]"} ${l&&"bg-[#D8D8D8]"}`,children:i.name})},i.name))})]})}),Fb=({className:n,id:r,name:e,onChange:t,disabled:o,checked:a})=>T.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:ur("petnowRadio size-[3.5vw]",n),onChange:t}),Lb=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,u]=d.useState("");let c;const f=h=>{c&&clearTimeout(c),o(""),c=setTimeout(async()=>{u(h.target.value)},200)},m=h=>{o(""),u(h.target.value)},p=l===""?t.slice(0,4):t.filter(h=>h.name.replace(/ /g,"").includes(l.replace(/ /g,""))).slice(0,4);return T.jsxs("div",{children:[T.jsx("div",{className:"relative flex flex-col text-deepGray",children:T.jsxs(bp,{onChange:h=>{o(h)},disabled:a,children:[T.jsx(yr,{className:"text-xl font-bold text-lightBlack",children:n}),T.jsx($s,{"aria-label":"comboboxInput",className:"mt-4 flex w-full items-center justify-between rounded-xl bg-[#F8F8F8] p-4 text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",value:e,onChange:s?m:f,placeholder:r,autoComplete:"off"}),T.jsx(Ys,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-p.length*60},children:p.map(h=>T.jsx(js,{value:h,as:d.Fragment,children:({focus:v,selected:g})=>T.jsx("li",{className:`flex w-full cursor-pointer justify-between p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50 ${v?"bg-[#E8E8E8]":"bg-[#F8F8F8]"} ${g&&"bg-[#D8D8D8]"}`,children:h.name})},h.name))})]})}),i&&T.jsx("p",{className:"mt-2 px-4 text-[#8B919A]",children:i})]})},Ab=({tabList:n,onTabChange:r})=>{const[e,t]=d.useState(n[0]),o=a=>{if(a<=1||a>4)throw new Error("[@petnow/ui/Tabs] Tab에 들어갈 수 있는 길이는 2~4개입니다.");return a===2?`absolute h-[2px] w-[50%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":"translate-x-[100%]"}`:a===3?`absolute h-[2px] w-[33.3%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(e)===JSON.stringify(n[1])?"translate-x-[100%]":"translate-x-[200%]"}`:`absolute h-[2px] w-[25%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(e)===JSON.stringify(n[1])?"translate-x-[100%]":JSON.stringify(e)===JSON.stringify(n[2])?"translate-x-[200%]":"translate-x-[300%]"}`};return T.jsxs("div",{className:"flex flex-col text-2xl font-bold",children:[T.jsx("div",{className:"flex",children:n.map(a=>T.jsx("div",{className:"flex flex-1 flex-col",children:T.jsx("button",{className:`py-5 hover:text-lightBlack ${JSON.stringify(a)===JSON.stringify(e)?"text-lightBlack":"text-[#8B919A]"}`,onClick:()=>{t(a),r(a)},children:a.displayName})},a.key))}),T.jsx("div",{className:"relative h-[2px] w-full bg-lightGray",children:T.jsx("div",{className:o(n.length)})})]})};Ee.AccordionCard=Oh,Ee.Checkbox=xh,Ee.CtaButton=Za,Ee.LabeledAddressInput=Eh,Ee.LabeledAutocomplete=Lb,Ee.LabeledDatepicker=Tb,Ee.LabeledSelect=Ib,Ee.Modal=kh,Ee.Radio=Fb,Ee.Tabs=Ab,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});
|
|
41
|
+
*/var Ta=function(r,t){return Ta=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])},Ta(r,t)};function Ae(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Ta(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var ie=function(){return ie=Object.assign||function(t){for(var e,o=1,a=arguments.length;o<a;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ie.apply(this,arguments)};function dt(n,r,t){if(t||arguments.length===2)for(var e=0,o=r.length,a;e<o;e++)(a||!(e in r))&&(a||(a=Array.prototype.slice.call(r,0,e)),a[e]=r[e]);return n.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var wg=function(n){var r=n.showTimeSelectOnly,t=r===void 0?!1:r,e=n.showTime,o=e===void 0?!1:e,a=n.className,i=n.children,s=t?"Choose Time":"Choose Date".concat(o?" and Time":"");return c.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},xg=function(n,r){var t=c.useRef(null),e=c.useRef(n);e.current=n;var o=c.useCallback(function(a){var i;t.current&&!t.current.contains(a.target)&&(r&&a.target instanceof HTMLElement&&a.target.classList.contains(r)||(i=e.current)===null||i===void 0||i.call(e,a))},[r]);return c.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),t},io=function(n){var r=n.children,t=n.onClickOutside,e=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=xg(t,i);return c.createElement("div",{className:e,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},B;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(B||(B={}));function zl(){var n=typeof window<"u"?window:globalThis;return n}var rr=12,Dg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function pe(n){if(n==null)return new Date;var r=typeof n=="string"?$v(n):Q(n);return Ct(r)?r:new Date}function Na(n,r,t,e,o){var a,i=null,s=tn(t)||tn(ir()),l=!0;if(Array.isArray(r))return r.forEach(function(u){var p=_a(n,u,new Date,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});e&&(l=Ct(p,o)&&n===we(p,u,t)),Ct(p,o)&&l&&(i=p)}),i;if(i=_a(n,r,new Date,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),e)l=Ct(i)&&n===we(i,r,t);else if(!Ct(i)){var d=((a=r.match(Dg))!==null&&a!==void 0?a:[]).map(function(u){var p=u[0];if(p==="p"||p==="P"){var h=Gr[p];return s?h(u,s.formatLong):p}return u}).join("");n.length>0&&(i=_a(n,d.slice(0,n.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),Ct(i)||(i=new Date(n))}return Ct(i)&&l?i:null}function Ct(n,r){return Xr(n)&&!Zt(n,r??new Date("1/1/1800"))}function we(n,r,t){if(t==="en")return _l(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?tn(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),!e&&ir()&&tn(ir())&&(e=tn(ir())),_l(n,r,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Ge(n,r){var t=r.dateFormat,e=r.locale,o=Array.isArray(t)&&t.length>0?t[0]:t;return n&&we(n,o,e)||""}function Eg(n,r,t){if(!n)return"";var e=Ge(n,t),o=r?Ge(r,t):"";return"".concat(e," - ").concat(o)}function Cg(n,r){if(!(n!=null&&n.length))return"";var t=n[0]?Ge(n[0],r):"";if(n.length===1)return t;if(n.length===2&&n[1]){var e=Ge(n[1],r);return"".concat(t,", ").concat(e)}var o=n.length-1;return"".concat(t," (+").concat(o,")")}function Ia(n,r){var t=r.hour,e=t===void 0?0:t,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return eo(to(no(n,s),a),e)}function kg(n){return wa(n)}function Sg(n,r){return we(n,"ddd",r)}function so(n){return qt(n)}function At(n,r,t){var e=tn(r||ir());return xt(n,{locale:e,weekStartsOn:t})}function Yt(n){return $l(n)}function or(n){return qr(n)}function Ql(n){return Ca(n)}function Ul(){return qt(pe())}function Kl(n){return ml(n)}function _g(n){return Vm(n)}function ft(n,r){return n&&r?jh(n,r):!n&&!r}function We(n,r){return n&&r?Ah(n,r):!n&&!r}function lo(n,r){return n&&r?Yh(n,r):!n&&!r}function re(n,r){return n&&r?$h(n,r):!n&&!r}function en(n,r){return n&&r?Lh(n,r):!n&&!r}function ar(n,r,t){var e,o=qt(r),a=ml(t);try{e=er(n,{start:o,end:a})}catch{e=!1}return e}function ir(){var n=zl();return n.__localeId__}function tn(n){if(typeof n=="string"){var r=zl();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function Og(n,r,t){return r(we(n,"EEEE",t))}function Pg(n,r){return we(n,"EEEEEE",r)}function Mg(n,r){return we(n,"EEE",r)}function Fa(n,r){return we(Ue(pe(),n),"LLLL",r)}function ql(n,r){return we(Ue(pe(),n),"LLL",r)}function Tg(n,r){return we(xn(pe(),n),"QQQ",r)}function pt(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.excludeDateIntervals,s=t.includeDates,l=t.includeDateIntervals,d=t.filterDate;return sr(n,{minDate:e,maxDate:o})||a&&a.some(function(u){return u instanceof Date?re(n,u):re(n,u.date)})||i&&i.some(function(u){var p=u.start,h=u.end;return er(n,{start:p,end:h})})||s&&!s.some(function(u){return re(n,u)})||l&&!l.some(function(u){var p=u.start,h=u.end;return er(n,{start:p,end:h})})||d&&!d(pe(n))||!1}function La(n,r){var t=r===void 0?{}:r,e=t.excludeDates,o=t.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return er(n,{start:i,end:s})}):e&&e.some(function(a){var i;return a instanceof Date?re(n,a):re(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Gl(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return sr(n,{minDate:e?$l(e):void 0,maxDate:o?Rm(o):void 0})||(a==null?void 0:a.some(function(l){return We(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return We(n,l)})||s&&!s(pe(n))||!1}function uo(n,r,t,e){var o=Z(n),a=je(n),i=Z(r),s=je(r),l=Z(e);return o===i&&o===l?a<=t&&t<=s:o<i?l===o&&a<=t||l===i&&s>=t||l<i&&l>o:!1}function Ng(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates;return sr(n,{minDate:e,maxDate:o})||a&&a.some(function(s){return We(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return We(s,n)})||!1}function co(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return sr(n,{minDate:e,maxDate:o})||(a==null?void 0:a.some(function(l){return lo(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return lo(n,l)})||s&&!s(pe(n))||!1}function fo(n,r,t){if(!r||!t||!Xr(r)||!Xr(t))return!1;var e=Z(r),o=Z(t);return e<=n&&o>=n}function po(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate,l=new Date(n,0,1);return sr(l,{minDate:e?qr(e):void 0,maxDate:o?hl(o):void 0})||(a==null?void 0:a.some(function(d){return ft(l,d instanceof Date?d:d.date)}))||i&&!i.some(function(d){return ft(l,d)})||s&&!s(pe(l))||!1}function mo(n,r,t,e){var o=Z(n),a=Gt(n),i=Z(r),s=Gt(r),l=Z(e);return o===i&&o===l?a<=t&&t<=s:o<i?l===o&&a<=t||l===i&&s>=t||l<i&&l>o:!1}function sr(n,r){var t,e=r===void 0?{}:r,o=e.minDate,a=e.maxDate;return(t=o&&Zn(n,o)<0||a&&Zn(n,a)>0)!==null&&t!==void 0?t:!1}function Xl(n,r){return r.some(function(t){return it(t)===it(n)&&st(t)===st(n)&&Et(t)===Et(n)})}function Jl(n,r){var t=r===void 0?{}:r,e=t.excludeTimes,o=t.includeTimes,a=t.filterTime;return e&&Xl(n,e)||o&&!Xl(n,o)||a&&!a(n)||!1}function Zl(n,r){var t=r.minTime,e=r.maxTime;if(!t||!e)throw new Error("Both minTime and maxTime props required");var o=pe();o=eo(o,it(n)),o=to(o,st(n)),o=no(o,Et(n));var a=pe();a=eo(a,it(t)),a=to(a,st(t)),a=no(a,Et(t));var i=pe();i=eo(i,it(e)),i=to(i,st(e)),i=no(i,Et(e));var s;try{s=!er(o,{start:a,end:i})}catch{s=!1}return s}function eu(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.includeDates,a=Dn(n,1);return e&&Qr(e,a)>0||o&&o.every(function(i){return Qr(i,a)>0})||!1}function tu(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.includeDates,a=et(n,1);return e&&Qr(a,e)>0||o&&o.every(function(i){return Qr(a,i)>0})||!1}function Ig(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.includeDates,a=qr(n),i=Al(a,1);return e&&Ur(e,i)>0||o&&o.every(function(s){return Ur(s,i)>0})||!1}function Fg(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.includeDates,a=hl(n),i=ya(a,1);return e&&Ur(i,e)>0||o&&o.every(function(s){return Ur(i,s)>0})||!1}function nu(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.includeDates,a=En(n,1);return e&&Kr(e,a)>0||o&&o.every(function(i){return Kr(i,a)>0})||!1}function Lg(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.yearItemNumber,a=o===void 0?rr:o,i=or(En(n,a)),s=jt(i,a).endPeriod,l=e&&Z(e);return l&&l>s||!1}function ru(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.includeDates,a=wt(n,1);return e&&Kr(a,e)>0||o&&o.every(function(i){return Kr(a,i)>0})||!1}function $g(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.yearItemNumber,a=o===void 0?rr:o,i=wt(n,a),s=jt(i,a).startPeriod,l=e&&Z(e);return l&&l<s||!1}function ou(n){var r=n.minDate,t=n.includeDates;if(t&&r){var e=t.filter(function(o){return Zn(o,r)>=0});return Ml(e)}else return t?Ml(t):r}function au(n){var r=n.maxDate,t=n.includeDates;if(t&&r){var e=t.filter(function(o){return Zn(o,r)<=0});return Pl(e)}else return t?Pl(t):r}function iu(n,r){var t;n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var e=new Map,o=0,a=n.length;o<a;o++){var i=n[o];if(Dt(i)){var s=we(i,"MM.dd.yyyy"),l=e.get(s)||[];l.includes(r)||(l.push(r),e.set(s,l))}else if(typeof i=="object"){var d=Object.keys(i),u=(t=d[0])!==null&&t!==void 0?t:"",p=i[u];if(typeof u=="string"&&Array.isArray(p))for(var h=0,f=p.length;h<f;h++){var m=p[h];if(m){var s=we(m,"MM.dd.yyyy"),l=e.get(s)||[];l.includes(u)||(l.push(u),e.set(s,l))}}}}return e}function Ag(n,r){return n.length!==r.length?!1:n.every(function(t,e){return t===r[e]})}function Yg(n,r){n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--holidays");var t=new Map;return n.forEach(function(e){var o=e.date,a=e.holidayName;if(Dt(o)){var i=we(o,"MM.dd.yyyy"),s=t.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&Ag(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?dt(dt([],l,!0),[a],!1):[a],t.set(i,s)}}}),t}function jg(n,r,t,e,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,d=o[s];d&&(l=Wm(l,it(d)),l=ba(l,st(d)),l=Hm(l,Et(d)));var u=ba(n,(t+1)*e);$t(l,r)&&Zt(l,u)&&d!=null&&i.push(d)}return i}function su(n){return n<10?"0".concat(n):"".concat(n)}function jt(n,r){r===void 0&&(r=rr);var t=Math.ceil(Z(n)/r)*r,e=t-(r-1);return{startPeriod:e,endPeriod:t}}function Wg(n){var r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+t-+r)/36e5)}function lu(n){var r=n.getSeconds(),t=n.getMilliseconds();return Q(n.getTime()-r*1e3-t)}function Hg(n,r){return lu(n).getTime()===lu(r).getTime()}function uu(n){if(!Dt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function cu(n,r){if(!Dt(n)||!Dt(r))throw new Error("Invalid date received");var t=uu(n),e=uu(r);return Zt(t,e)}function du(n){return n.key===B.Space}var Rg=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.inputRef=c.createRef(),e.onTimeChange=function(o){var a,i;e.setState({time:o});var s=e.props.date,l=s instanceof Date&&!isNaN(+s),d=l?s:new Date;if(o!=null&&o.includes(":")){var u=o.split(":"),p=u[0],h=u[1];d.setHours(Number(p)),d.setMinutes(Number(h))}(i=(a=e.props).onChange)===null||i===void 0||i.call(a,d)},e.renderTimeInput=function(){var o=e.state.time,a=e.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?c.cloneElement(l,{date:i,value:o,onChange:e.onTimeChange}):c.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:e.inputRef,onClick:function(){var d;(d=e.inputRef.current)===null||d===void 0||d.focus()},required:!0,value:o,onChange:function(d){e.onTimeChange(d.target.value||s)}})},e.state={time:e.props.timeString},e}return r.getDerivedStateFromProps=function(t,e){return t.timeString!==e.time?{time:t.timeString}:null},r.prototype.render=function(){return c.createElement("div",{className:"react-datepicker__input-time-container"},c.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),c.createElement("div",{className:"react-datepicker-time__input-container"},c.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r}(c.Component),Bg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.dayEl=c.createRef(),t.handleClick=function(e){!t.isDisabled()&&t.props.onClick&&t.props.onClick(e)},t.handleMouseEnter=function(e){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(e)},t.handleOnKeyDown=function(e){var o,a,i=e.key;i===B.Space&&(e.preventDefault(),e.key=B.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,e)},t.isSameDay=function(e){return re(t.props.day,e)},t.isKeyboardSelected=function(){var e;if(t.props.disabledKeyboardNavigation)return!1;var o=t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(i){return t.isSameDayOrWeek(i)}):t.isSameDayOrWeek(t.props.selected),a=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!o&&t.isSameDayOrWeek(t.props.preSelection)&&!a},t.isDisabled=function(e){return e===void 0&&(e=t.props.day),pt(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return La(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return re(t.props.day,At(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(e){return t.props.showWeekPicker&&re(e,At(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(e){return t.isSameDay(e)||t.isSameWeek(e)},t.getHighLightedClass=function(){var e=t.props,o=e.day,a=e.highlightDates;if(!a)return!1;var i=we(o,"MM.dd.yyyy");return a.get(i)},t.getHolidaysClass=function(){var e,o=t.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=we(a,"MM.dd.yyyy");return i.has(s)?[(e=i.get(s))===null||e===void 0?void 0:e.className]:[void 0]},t.isInRange=function(){var e=t.props,o=e.day,a=e.startDate,i=e.endDate;return!a||!i?!1:ar(o,a,i)},t.isInSelectingRange=function(){var e,o=t.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,d=o.selectsDisabledDaysInRange,u=o.startDate,p=o.endDate,h=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return!(i||s||l)||!h||!d&&t.isDisabled()?!1:i&&p&&(Zt(h,p)||en(h,p))?ar(a,h,p):s&&u&&($t(h,u)||en(h,u))||l&&u&&!p&&($t(h,u)||en(h,u))?ar(a,u,h):!1},t.isSelectingRangeStart=function(){var e;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.startDate,s=o.selectsStart,l=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return s?re(a,l):re(a,i)},t.isSelectingRangeEnd=function(){var e;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,d=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return s||l?re(a,d):re(a,i)},t.isRangeStart=function(){var e=t.props,o=e.day,a=e.startDate,i=e.endDate;return!a||!i?!1:re(a,o)},t.isRangeEnd=function(){var e=t.props,o=e.day,a=e.startDate,i=e.endDate;return!a||!i?!1:re(i,o)},t.isWeekend=function(){var e=Fh(t.props.day);return e===0||e===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===je(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(je(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(pe())},t.isSelected=function(){var e;return t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(o){return t.isSameDayOrWeek(o)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(e){var o=t.props.dayClassName?t.props.dayClassName(e):void 0;return Le("react-datepicker__day",o,"react-datepicker__day--"+Sg(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var e=t.props,o=e.day,a=e.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=e.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,d=t.isDisabled()||t.isExcluded()?l:i;return"".concat(d," ").concat(we(o,"PPPP",t.props.locale))},t.getTitle=function(){var e=t.props,o=e.day,a=e.holidays,i=a===void 0?new Map:a,s=e.excludeDates,l=we(o,"MM.dd.yyyy"),d=[];return i.has(l)&&d.push.apply(d,i.get(l).holidayNames),t.isExcluded()&&d.push(s==null?void 0:s.filter(function(u){return u instanceof Date?re(u,o):re(u==null?void 0:u.date,o)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),d.join(", ")},t.getTabIndex=function(){var e=t.props.selected,o=t.props.preSelection,a=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(e)&&re(o,e))?0:-1;return a},t.handleFocusDay=function(){var e;t.shouldFocusDay()&&((e=t.dayEl.current)===null||e===void 0||e.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(Ol(t.props.day),t.props.day):Ol(t.props.day)},t.render=function(){return c.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"option",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&c.createElement("span",{className:"overlay"},t.getTitle()))},t}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},r.prototype.isDayActiveElement=function(){var t,e,o;return((e=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||e===void 0?void 0:e.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},r.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},r}(c.Component),Vg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.weekNumberEl=c.createRef(),t.handleClick=function(e){t.props.onClick&&t.props.onClick(e)},t.handleOnKeyDown=function(e){var o,a,i=e.key;i===B.Space&&(e.preventDefault(),e.key=B.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,e)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!re(t.props.date,t.props.selected)&&re(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||re(t.props.date,t.props.selected)&&re(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(e){var o=!1;t.getTabIndex()===0&&!(e!=null&&e.isInputFocused)&&re(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(o=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},r.prototype.render=function(){var t=this.props,e=t.weekNumber,o=t.ariaLabelPrefix,a=o===void 0?r.defaultProps.ariaLabelPrefix:o,i=t.onClick,s={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!i,"react-datepicker__week-number--selected":!!i&&re(this.props.date,this.props.selected),"react-datepicker__week-number--keyboard-selected":this.isKeyboardSelected()};return c.createElement("div",{ref:this.weekNumberEl,className:Le(s),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},e)},r}(c.Component),zg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(e){return pt(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(e,o){t.props.onDayClick&&t.props.onDayClick(e,o)},t.handleDayMouseEnter=function(e){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(e)},t.handleWeekClick=function(e,o,a){for(var i,s,l,d=new Date(e),u=0;u<7;u++){var p=new Date(e);p.setDate(p.getDate()+u);var h=!t.isDisabled(p);if(h){d=p;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(d,o,a),t.props.showWeekPicker&&t.handleDayClick(d,a),((i=t.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=t.props).setOpen)===null||l===void 0||l.call(s,!1))},t.formatWeekNumber=function(e){return t.props.formatWeekNumber?t.props.formatWeekNumber(e):kg(e)},t.renderDays=function(){var e=t.startOfWeek(),o=[],a=t.formatWeekNumber(e);if(t.props.showWeekNumber){var i=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,e,a):void 0;o.push(c.createElement(Vg,ie({key:"W"},r.defaultProps,t.props,{weekNumber:a,date:e,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=Ft(e,s);return c.createElement(Bg,ie({},r.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:t.handleDayClick.bind(t,l),onMouseEnter:t.handleDayMouseEnter.bind(t,l)}))}))},t.startOfWeek=function(){return At(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!re(t.startOfWeek(),t.props.selected)&&re(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":re(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return c.createElement("div",{className:Le(t)},this.renderDays())},r}(c.Component),lr,Qg=6,Cn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},$a=(lr={},lr[Cn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},lr[Cn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},lr[Cn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},lr),ho=1;function fu(n,r){return n?Cn.FOUR_COLUMNS:r?Cn.TWO_COLUMNS:Cn.THREE_COLUMNS}var Ug=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=dt([],Array(12),!0).map(function(){return c.createRef()}),t.QUARTER_REFS=dt([],Array(4),!0).map(function(){return c.createRef()}),t.isDisabled=function(e){return pt(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(e){return La(e,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(e,o){var a,i;(i=(a=t.props).onDayClick)===null||i===void 0||i.call(a,e,o,t.props.orderInDisplay)},t.handleDayMouseEnter=function(e){var o,a;(a=(o=t.props).onDayMouseEnter)===null||a===void 0||a.call(o,e)},t.handleMouseLeave=function(){var e,o;(o=(e=t.props).onMouseLeave)===null||o===void 0||o.call(e)},t.isRangeStartMonth=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:We(Ue(a,e),i)},t.isRangeStartQuarter=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:lo(xn(a,e),i)},t.isRangeEndMonth=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:We(Ue(a,e),s)},t.isRangeEndQuarter=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:lo(xn(a,e),s)},t.isInSelectingRangeMonth=function(e){var o,a=t.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,d=a.selectsRange,u=a.startDate,p=a.endDate,h=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||l||d)||!h?!1:s&&p?uo(h,p,e,i):l&&u||d&&u&&!p?uo(u,h,e,i):!1},t.isSelectingMonthRangeStart=function(e){var o;if(!t.isInSelectingRangeMonth(e))return!1;var a=t.props,i=a.day,s=a.startDate,l=a.selectsStart,d=Ue(i,e),u=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return l?We(d,u):We(d,s)},t.isSelectingMonthRangeEnd=function(e){var o;if(!t.isInSelectingRangeMonth(e))return!1;var a=t.props,i=a.day,s=a.endDate,l=a.selectsEnd,d=a.selectsRange,u=Ue(i,e),p=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return l||d?We(u,p):We(u,s)},t.isInSelectingRangeQuarter=function(e){var o,a=t.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,d=a.selectsRange,u=a.startDate,p=a.endDate,h=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||l||d)||!h?!1:s&&p?mo(h,p,e,i):l&&u||d&&u&&!p?mo(u,h,e,i):!1},t.isWeekInMonth=function(e){var o=t.props.day,a=Ft(e,6);return We(e,o)||We(a,o)},t.isCurrentMonth=function(e,o){return Z(e)===Z(pe())&&o===je(pe())},t.isCurrentQuarter=function(e,o){return Z(e)===Z(pe())&&o===Gt(pe())},t.isSelectedMonth=function(e,o,a){return je(a)===o&&Z(e)===Z(a)},t.isSelectMonthInList=function(e,o,a){return a.some(function(i){return t.isSelectedMonth(e,o,i)})},t.isSelectedQuarter=function(e,o,a){return Gt(e)===o&&Z(e)===Z(a)},t.renderWeeks=function(){for(var e=[],o=t.props.fixedHeight,a=0,i=!1,s=At(Yt(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(m){return t.props.showWeekPicker?At(m,t.props.locale,t.props.calendarStartDay):t.props.preSelection},d=function(m){return t.props.showWeekPicker?At(m,t.props.locale,t.props.calendarStartDay):t.props.selected},u=t.props.selected?d(t.props.selected):void 0,p=t.props.preSelection?l(t.props.preSelection):void 0;e.push(c.createElement(zg,ie({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:a,day:s,month:je(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:u,preSelection:p,showWeekNumber:t.props.showWeekNumbers}))),!i;){a++,s=Vr(s,1);var h=o&&a>=Qg,f=!o&&!t.isWeekInMonth(s);if(h||f)if(t.props.peekNextMonth)i=!0;else break}return e},t.onMonthClick=function(e,o){var a=t.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||t.handleDayClick(Yt(s),e)},t.onMonthMouseEnter=function(e){var o=t.isMonthDisabledForLabelDate(e),a=o.isDisabled,i=o.labelDate;a||t.handleDayMouseEnter(Yt(i))},t.handleMonthNavigation=function(e,o){var a,i,s,l;(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=t.MONTH_REFS[e])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},t.handleKeyboardNavigation=function(e,o,a){var i,s=t.props,l=s.selected,d=s.preSelection,u=s.setPreSelection,p=s.minDate,h=s.maxDate,f=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(d){var v=fu(f,m),g=t.getVerticalOffset(v),b=(i=$a[v])===null||i===void 0?void 0:i.grid,w=function(_,S,I){var Y,k,D=S,O=I;switch(_){case B.ArrowRight:D=et(S,ho),O=I===11?0:I+ho;break;case B.ArrowLeft:D=Dn(S,ho),O=I===0?11:I-ho;break;case B.ArrowUp:D=Dn(S,g),O=!((Y=b==null?void 0:b[0])===null||Y===void 0)&&Y.includes(I)?I+12-g:I-g;break;case B.ArrowDown:D=et(S,g),O=!((k=b==null?void 0:b[b.length-1])===null||k===void 0)&&k.includes(I)?I-12+g:I+g;break}return{newCalculatedDate:D,newCalculatedMonth:O}},x=function(_,S,I){for(var Y=40,k=_,D=!1,O=0,C=w(k,S,I),A=C.newCalculatedDate,$=C.newCalculatedMonth;!D;){if(O>=Y){A=S,$=I;break}if(p&&A<p){k=B.ArrowRight;var F=w(k,A,$);A=F.newCalculatedDate,$=F.newCalculatedMonth}if(h&&A>h){k=B.ArrowLeft;var F=w(k,A,$);A=F.newCalculatedDate,$=F.newCalculatedMonth}if(Ng(A,t.props)){var F=w(k,A,$);A=F.newCalculatedDate,$=F.newCalculatedMonth}else D=!0;O++}return{newCalculatedDate:A,newCalculatedMonth:$}};if(o===B.Enter){t.isMonthDisabled(a)||(t.onMonthClick(e,a),u==null||u(l));return}var E=x(o,d,a),P=E.newCalculatedDate,M=E.newCalculatedMonth;switch(o){case B.ArrowRight:case B.ArrowLeft:case B.ArrowUp:case B.ArrowDown:t.handleMonthNavigation(M,P);break}}},t.getVerticalOffset=function(e){var o,a;return(a=(o=$a[e])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},t.onMonthKeyDown=function(e,o){var a=t.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=e.key;l!==B.Tab&&e.preventDefault(),i||t.handleKeyboardNavigation(e,l,o),s&&s(e)},t.onQuarterClick=function(e,o){var a=xn(t.props.day,o);co(a,t.props)||t.handleDayClick(Ql(a),e)},t.onQuarterMouseEnter=function(e){var o=xn(t.props.day,e);co(o,t.props)||t.handleDayMouseEnter(Ql(o))},t.handleQuarterNavigation=function(e,o){var a,i,s,l;t.isDisabled(o)||t.isExcluded(o)||((i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=t.QUARTER_REFS[e-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},t.onQuarterKeyDown=function(e,o){var a,i,s=e.key;if(!t.props.disabledKeyboardNavigation)switch(s){case B.Enter:t.onQuarterClick(e,o),(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,t.props.selected);break;case B.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===4?1:o+1,ya(t.props.preSelection,1));break;case B.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===1?4:o-1,Al(t.props.preSelection,1));break}},t.isMonthDisabledForLabelDate=function(e){var o,a=t.props,i=a.day,s=a.minDate,l=a.maxDate,d=a.excludeDates,u=a.includeDates,p=Ue(i,e);return{isDisabled:(o=(s||l||d||u)&&Gl(p,t.props))!==null&&o!==void 0?o:!1,labelDate:p}},t.isMonthDisabled=function(e){var o=t.isMonthDisabledForLabelDate(e).isDisabled;return o},t.getMonthClassNames=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,d=o.monthClassName,u=d?d(Ue(a,e)):void 0,p=t.getSelection();return Le("react-datepicker__month-text","react-datepicker__month-".concat(e),u,{"react-datepicker__month-text--disabled":t.isMonthDisabled(e),"react-datepicker__month-text--selected":p?t.isSelectMonthInList(a,e,p):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&l&&t.isSelectedMonth(a,e,l)&&!t.isMonthDisabled(e),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(e),"react-datepicker__month-text--in-range":i&&s?uo(i,s,e,a):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(e),"react-datepicker__month-text--range-end":t.isRangeEndMonth(e),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(e),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(e),"react-datepicker__month-text--today":t.isCurrentMonth(a,e)})},t.getTabIndex=function(e){if(t.props.preSelection==null)return"-1";var o=je(t.props.preSelection),a=t.isMonthDisabledForLabelDate(o).isDisabled,i=e===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getQuarterTabIndex=function(e){if(t.props.preSelection==null)return"-1";var o=Gt(t.props.preSelection),a=co(t.props.day,t.props),i=e===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getAriaLabel=function(e){var o=t.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,d=o.day,u=o.locale,p=Ue(d,e),h=t.isDisabled(p)||t.isExcluded(p)?l:i;return"".concat(h," ").concat(we(p,"MMMM yyyy",u))},t.getQuarterClassNames=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,d=o.minDate,u=o.maxDate,p=o.excludeDates,h=o.includeDates,f=o.filterDate,m=o.preSelection,v=o.disabledKeyboardNavigation,g=(d||u||p||h||f)&&co(xn(a,e),t.props);return Le("react-datepicker__quarter-text","react-datepicker__quarter-".concat(e),{"react-datepicker__quarter-text--disabled":g,"react-datepicker__quarter-text--selected":l?t.isSelectedQuarter(a,e,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!v&&m&&t.isSelectedQuarter(a,e,m)&&!g,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(e),"react-datepicker__quarter-text--in-range":i&&s?mo(i,s,e,a):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(e),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(e)})},t.getMonthContent=function(e){var o=t.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,d=ql(e,s),u=Fa(e,s);return i?i(e,d,u,l):a?u:d},t.getQuarterContent=function(e){var o,a=t.props,i=a.renderQuarterContent,s=a.locale,l=Tg(e,s);return(o=i==null?void 0:i(e,l))!==null&&o!==void 0?o:l},t.renderMonths=function(){var e,o=t.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,d=(e=$a[fu(i,a)])===null||e===void 0?void 0:e.grid;return d==null?void 0:d.map(function(u,p){return c.createElement("div",{className:"react-datepicker__month-wrapper",key:p},u.map(function(h,f){return c.createElement("div",{ref:t.MONTH_REFS[h],key:f,onClick:function(m){t.onMonthClick(m,h)},onKeyDown:function(m){du(m)&&(m.preventDefault(),m.key=B.Enter),t.onMonthKeyDown(m,h)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(h)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(h)}:void 0,tabIndex:Number(t.getTabIndex(h)),className:t.getMonthClassNames(h),"aria-disabled":t.isMonthDisabled(h),role:"option","aria-label":t.getAriaLabel(h),"aria-current":t.isCurrentMonth(s,h)?"date":void 0,"aria-selected":l?t.isSelectedMonth(s,h,l):void 0},t.getMonthContent(h))}))})},t.renderQuarters=function(){var e=t.props,o=e.day,a=e.selected,i=[1,2,3,4];return c.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return c.createElement("div",{key:l,ref:t.QUARTER_REFS[l],role:"option",onClick:function(d){t.onQuarterClick(d,s)},onKeyDown:function(d){t.onQuarterKeyDown(d,s)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(s)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(s)}:void 0,className:t.getQuarterClassNames(s),"aria-selected":a?t.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(t.getQuarterTabIndex(s)),"aria-current":t.isCurrentQuarter(o,s)?"date":void 0},t.getQuarterContent(s))}))},t.getClassNames=function(){var e=t.props,o=e.selectingDate,a=e.selectsStart,i=e.selectsEnd,s=e.showMonthYearPicker,l=e.showQuarterYearPicker,d=e.showWeekPicker;return Le("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":d})},t}return r.prototype.getSelection=function(){var t=this.props,e=t.selected,o=t.selectedDates,a=t.selectsMultiple;if(a)return o;if(e)return[e]},r.prototype.render=function(){var t=this.props,e=t.showMonthYearPicker,o=t.showQuarterYearPicker,a=t.day,i=t.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"";return c.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(we(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},e?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(c.Component),Kg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.isSelectedMonth=function(e){return t.props.month===e},t.renderOptions=function(){return t.props.monthNames.map(function(e,o){return c.createElement("div",{className:t.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:e,onClick:t.onChange.bind(t,o),"aria-selected":t.isSelectedMonth(o)?"true":void 0},t.isSelectedMonth(o)?c.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",e)})},t.onChange=function(e){return t.props.onChange(e)},t.handleClickOutside=function(){return t.props.onCancel()},t}return r.prototype.render=function(){return c.createElement(io,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(c.Component),qg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(e){return e.map(function(o,a){return c.createElement("option",{key:o,value:a},o)})},t.renderSelectMode=function(e){return c.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(o){return t.onChange(parseInt(o.target.value))}},t.renderSelectOptions(e))},t.renderReadView=function(e,o){return c.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},c.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),c.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[t.props.month]))},t.renderDropdown=function(e){return c.createElement(Kg,ie({key:"dropdown"},t.props,{monthNames:e,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(e){var o=t.state.dropdownVisible,a=[t.renderReadView(!o,e)];return o&&a.unshift(t.renderDropdown(e)),a},t.onChange=function(e){t.toggleDropdown(),e!==t.props.month&&t.props.onChange(e)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return r.prototype.render=function(){var t=this,e=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return ql(a,t.props.locale)}:function(a){return Fa(a,t.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(e);break;case"select":o=this.renderSelectMode(e);break}return c.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r}(c.Component);function Gg(n,r){for(var t=[],e=Yt(n),o=Yt(r);!$t(e,o);)t.push(pe(e)),e=et(e,1);return t}var Xg=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.renderOptions=function(){return e.state.monthYearsList.map(function(o){var a=Ea(o),i=ft(e.props.date,o)&&We(e.props.date,o);return c.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:e.onChange.bind(e,a),"aria-selected":i?"true":void 0},i?c.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",we(o,e.props.dateFormat,e.props.locale))})},e.onChange=function(o){return e.props.onChange(o)},e.handleClickOutside=function(){e.props.onCancel()},e.state={monthYearsList:Gg(e.props.minDate,e.props.maxDate)},e}return r.prototype.render=function(){var t=Le({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return c.createElement(io,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(c.Component),Jg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=Yt(t.props.minDate),o=Yt(t.props.maxDate),a=[];!$t(e,o);){var i=Ea(e);a.push(c.createElement("option",{key:i,value:i},we(e,t.props.dateFormat,t.props.locale))),e=et(e,1)}return a},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return c.createElement("select",{value:Ea(Yt(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){var o=we(t.props.date,t.props.dateFormat,t.props.locale);return c.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},c.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),c.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},t.renderDropdown=function(){return c.createElement(Xg,ie({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,o=[t.renderReadView(!e)];return e&&o.unshift(t.renderDropdown()),o},t.onChange=function(e){t.toggleDropdown();var o=pe(e);ft(t.props.date,o)&&We(t.props.date,o)||t.props.onChange(o)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return r.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return c.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},r}(c.Component),Zg=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var e,o,a;t.list&&(t.list.scrollTop=(a=t.centerLi&&r.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((o=(e=t.header)===null||e===void 0?void 0:e.clientHeight)!==null&&o!==void 0?o:0):t.list.clientHeight,t.centerLi))!==null&&a!==void 0?a:0)})},t.handleClick=function(e){var o,a;(t.props.minTime||t.props.maxTime)&&Zl(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Jl(e,t.props)||(a=(o=t.props).onChange)===null||a===void 0||a.call(o,e)},t.isSelectedTime=function(e){return t.props.selected&&Hg(t.props.selected,e)},t.isDisabledTime=function(e){return(t.props.minTime||t.props.maxTime)&&Zl(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Jl(e,t.props)},t.liClasses=function(e){var o,a=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(e):void 0];return t.isSelectedTime(e)&&a.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(e)&&a.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(it(e)*3600+st(e)*60+Et(e))%(((o=t.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},t.handleOnKeyDown=function(e,o){var a,i;e.key===B.Space&&(e.preventDefault(),e.key=B.Enter),(e.key===B.ArrowUp||e.key===B.ArrowLeft)&&e.target instanceof HTMLElement&&e.target.previousSibling&&(e.preventDefault(),e.target.previousSibling instanceof HTMLElement&&e.target.previousSibling.focus()),(e.key===B.ArrowDown||e.key===B.ArrowRight)&&e.target instanceof HTMLElement&&e.target.nextSibling&&(e.preventDefault(),e.target.nextSibling instanceof HTMLElement&&e.target.nextSibling.focus()),e.key===B.Enter&&t.handleClick(o),(i=(a=t.props).handleOnKeyDown)===null||i===void 0||i.call(a,e)},t.renderTimes=function(){for(var e,o=[],a=t.props.format?t.props.format:"p",i=(e=t.props.intervals)!==null&&e!==void 0?e:r.defaultProps.intervals,s=t.props.selected||t.props.openToDate||pe(),l=so(s),d=t.props.injectTimes&&t.props.injectTimes.sort(function(g,b){return g.getTime()-b.getTime()}),u=60*Wg(s),p=u/i,h=0;h<p;h++){var f=ba(l,h*i);if(o.push(f),d){var m=jg(l,f,h,i,d);o=o.concat(m)}}var v=o.reduce(function(g,b){return b.getTime()<=s.getTime()?b:g},o[0]);return o.map(function(g){return c.createElement("li",{key:g.valueOf(),onClick:t.handleClick.bind(t,g),className:t.liClasses(g),ref:function(b){g===v&&(t.centerLi=b)},onKeyDown:function(b){t.handleOnKeyDown(b,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":t.isSelectedTime(g)?"true":void 0,"aria-disabled":t.isDisabledTime(g)?"true":void 0},we(g,a,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?c.createElement(c.Fragment,null):c.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(e){t.header=e}},c.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var t=this,e,o=this.state.height;return c.createElement("div",{className:"react-datepicker__time-container ".concat(((e=this.props.todayButton)!==null&&e!==void 0?e:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),c.createElement("div",{className:"react-datepicker__time"},c.createElement("div",{className:"react-datepicker__time-box"},c.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){t.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(t,e){return e.offsetTop-(t/2-e.clientHeight/2)},r}(c.Component),pu=3,eb=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.YEAR_REFS=dt([],Array(e.props.yearItemNumber),!0).map(function(){return c.createRef()}),e.isDisabled=function(o){return pt(o,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(o){return La(o,{excludeDates:e.props.excludeDates})},e.selectingDate=function(){var o;return(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection},e.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=e.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},e.handleYearClick=function(o,a){e.props.onDayClick&&e.props.onDayClick(o,a)},e.handleYearNavigation=function(o,a){var i,s,l,d,u=e.props,p=u.date,h=u.yearItemNumber;if(!(p===void 0||h===void 0)){var f=jt(p,h).startPeriod;e.isDisabled(a)||e.isExcluded(a)||((s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,a),o-f<0?e.updateFocusOnPaginate(h-(f-o)):o-f>=h?e.updateFocusOnPaginate(Math.abs(h-(o-f))):(d=(l=e.YEAR_REFS[o-f])===null||l===void 0?void 0:l.current)===null||d===void 0||d.focus())}},e.isSameDay=function(o,a){return re(o,a)},e.isCurrentYear=function(o){return o===Z(pe())},e.isRangeStart=function(o){return e.props.startDate&&e.props.endDate&&ft(ct(pe(),o),e.props.startDate)},e.isRangeEnd=function(o){return e.props.startDate&&e.props.endDate&&ft(ct(pe(),o),e.props.endDate)},e.isInRange=function(o){return fo(o,e.props.startDate,e.props.endDate)},e.isInSelectingRange=function(o){var a=e.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,d=a.startDate,u=a.endDate;return!(i||s||l)||!e.selectingDate()?!1:i&&u?fo(o,e.selectingDate(),u):s&&d||l&&d&&!u?fo(o,d,e.selectingDate()):!1},e.isSelectingRangeStart=function(o){var a;if(!e.isInSelectingRange(o))return!1;var i=e.props,s=i.startDate,l=i.selectsStart,d=ct(pe(),o);return l?ft(d,(a=e.selectingDate())!==null&&a!==void 0?a:null):ft(d,s??null)},e.isSelectingRangeEnd=function(o){var a;if(!e.isInSelectingRange(o))return!1;var i=e.props,s=i.endDate,l=i.selectsEnd,d=i.selectsRange,u=ct(pe(),o);return l||d?ft(u,(a=e.selectingDate())!==null&&a!==void 0?a:null):ft(u,s??null)},e.isKeyboardSelected=function(o){if(!(e.props.date===void 0||e.props.selected==null||e.props.preSelection==null)){var a=e.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,d=a.includeDates,u=a.filterDate,p=or(ct(e.props.date,o)),h=(i||s||l||d||u)&&po(o,e.props);return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!re(p,or(e.props.selected))&&re(p,or(e.props.preSelection))&&!h}},e.onYearClick=function(o,a){var i=e.props.date;i!==void 0&&e.handleYearClick(or(ct(i,a)),o)},e.onYearKeyDown=function(o,a){var i,s,l=o.key,d=e.props,u=d.date,p=d.yearItemNumber,h=d.handleOnKeyDown;if(l!==B.Tab&&o.preventDefault(),!e.props.disabledKeyboardNavigation)switch(l){case B.Enter:if(e.props.selected==null)break;e.onYearClick(o,a),(s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,e.props.selected);break;case B.ArrowRight:if(e.props.preSelection==null)break;e.handleYearNavigation(a+1,wt(e.props.preSelection,1));break;case B.ArrowLeft:if(e.props.preSelection==null)break;e.handleYearNavigation(a-1,En(e.props.preSelection,1));break;case B.ArrowUp:{if(u===void 0||p===void 0||e.props.preSelection==null)break;var f=jt(u,p).startPeriod,m=pu,v=a-m;if(v<f){var g=p%m;a>=f&&a<f+g?m=g:m+=g,v=a-m}e.handleYearNavigation(v,En(e.props.preSelection,m));break}case B.ArrowDown:{if(u===void 0||p===void 0||e.props.preSelection==null)break;var b=jt(u,p).endPeriod,m=pu,v=a+m;if(v>b){var g=p%m;a<=b&&a>b-g?m=g:m+=g,v=a+m}e.handleYearNavigation(v,wt(e.props.preSelection,m));break}}h&&h(o)},e.getYearClassNames=function(o){var a=e.props,i=a.date,s=a.minDate,l=a.maxDate,d=a.selected,u=a.excludeDates,p=a.includeDates,h=a.filterDate,f=a.yearClassName;return Le("react-datepicker__year-text","react-datepicker__year-".concat(o),i?f==null?void 0:f(ct(i,o)):void 0,{"react-datepicker__year-text--selected":d?o===Z(d):void 0,"react-datepicker__year-text--disabled":(s||l||u||p||h)&&po(o,e.props),"react-datepicker__year-text--keyboard-selected":e.isKeyboardSelected(o),"react-datepicker__year-text--range-start":e.isRangeStart(o),"react-datepicker__year-text--range-end":e.isRangeEnd(o),"react-datepicker__year-text--in-range":e.isInRange(o),"react-datepicker__year-text--in-selecting-range":e.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":e.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":e.isSelectingRangeEnd(o),"react-datepicker__year-text--today":e.isCurrentYear(o)})},e.getYearTabIndex=function(o){if(e.props.disabledKeyboardNavigation||e.props.preSelection==null)return"-1";var a=Z(e.props.preSelection),i=po(o,e.props);return o===a&&!i?"0":"-1"},e.getYearContainerClassNames=function(){var o=e.props,a=o.selectingDate,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange;return Le("react-datepicker__year",{"react-datepicker__year--selecting-range":a&&(i||s||l)})},e.getYearContent=function(o){return e.props.renderYearContent?e.props.renderYearContent(o):o},e}return r.prototype.render=function(){var t=this,e=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var d=jt(a,i),u=d.startPeriod,p=d.endPeriod,h=function(v){e.push(c.createElement("div",{ref:f.YEAR_REFS[v-u],onClick:function(g){t.onYearClick(g,v)},onKeyDown:function(g){du(g)&&(g.preventDefault(),g.key=B.Enter),t.onYearKeyDown(g,v)},tabIndex:Number(f.getYearTabIndex(v)),className:f.getYearClassNames(v),onMouseEnter:f.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:f.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:f.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":f.isCurrentYear(v)?"date":void 0},f.getYearContent(v)))},f=this,m=u;m<=p;m++)h(m);return c.createElement("div",{className:this.getYearContainerClassNames()},c.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},e))},r}(c.Component);function tb(n,r,t,e){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;t&&(s=Z(t)<=i),e&&s&&(s=Z(e)>=i),s&&o.push(i)}return o}var nb=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;e.renderOptions=function(){var s=e.props.year,l=e.state.yearsList.map(function(p){return c.createElement("div",{className:s===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:e.onChange.bind(e,p),"aria-selected":s===p?"true":void 0},s===p?c.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),d=e.props.minDate?Z(e.props.minDate):null,u=e.props.maxDate?Z(e.props.maxDate):null;return(!u||!e.state.yearsList.find(function(p){return p===u}))&&l.unshift(c.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:e.incrementYears},c.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!d||!e.state.yearsList.find(function(p){return p===d}))&&l.push(c.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:e.decrementYears},c.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},e.onChange=function(s){e.props.onChange(s)},e.handleClickOutside=function(){e.props.onCancel()},e.shiftYears=function(s){var l=e.state.yearsList.map(function(d){return d+s});e.setState({yearsList:l})},e.incrementYears=function(){return e.shiftYears(1)},e.decrementYears=function(){return e.shiftYears(-1)};var o=t.yearDropdownItemNumber,a=t.scrollableYearDropdown,i=o||(a?10:5);return e.state={yearsList:tb(e.props.year,i,e.props.minDate,e.props.maxDate)},e.dropdownRef=c.createRef(),e}return r.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var e=t.children?Array.from(t.children):null,o=e?e.find(function(a){return a.ariaSelected}):null;t.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},r.prototype.render=function(){var t=Le({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return c.createElement(io,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(c.Component),rb=function(n){Ae(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=t.props.minDate?Z(t.props.minDate):1900,o=t.props.maxDate?Z(t.props.maxDate):2100,a=[],i=e;i<=o;i++)a.push(c.createElement("option",{key:i,value:i},i));return a},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return c.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){return c.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(o){return t.toggleDropdown(o)}},c.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),c.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return c.createElement(nb,ie({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,o=[t.renderReadView(!e)];return e&&o.unshift(t.renderDropdown()),o},t.onChange=function(e){t.toggleDropdown(),e!==t.props.year&&t.props.onChange(e)},t.toggleDropdown=function(e){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,e)})},t.handleYearChange=function(e,o){var a;(a=t.onSelect)===null||a===void 0||a.call(t,e,o),t.setOpen()},t.onSelect=function(e,o){var a,i;(i=(a=t.props).onSelect)===null||i===void 0||i.call(a,e,o)},t.setOpen=function(){var e,o;(o=(e=t.props).setOpen)===null||o===void 0||o.call(e,!0)},t}return r.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return c.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},r}(c.Component),ob=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],ab=function(n){var r=(n.className||"").split(/\s+/);return ob.some(function(t){return r.indexOf(t)>=0})},ib=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.monthContainer=void 0,e.handleClickOutside=function(o){e.props.onClickOutside(o)},e.setClickOutsideRef=function(){return e.containerRef.current},e.handleDropdownFocus=function(o){var a,i;ab(o.target)&&((i=(a=e.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},e.getDateInView=function(){var o=e.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=ou(e.props),d=au(e.props),u=pe(),p=s||i||a;return p||(l&&Zt(u,l)?l:d&&$t(u,d)?d:u)},e.increaseMonth=function(){e.setState(function(o){var a=o.date;return{date:et(a,1)}},function(){return e.handleMonthChange(e.state.date)})},e.decreaseMonth=function(){e.setState(function(o){var a=o.date;return{date:Dn(a,1)}},function(){return e.handleMonthChange(e.state.date)})},e.handleDayClick=function(o,a,i){e.props.onSelect(o,a,i),e.props.setPreSelection&&e.props.setPreSelection(o)},e.handleDayMouseEnter=function(o){e.setState({selectingDate:o}),e.props.onDayMouseEnter&&e.props.onDayMouseEnter(o)},e.handleMonthMouseLeave=function(){e.setState({selectingDate:void 0}),e.props.onMonthMouseLeave&&e.props.onMonthMouseLeave()},e.handleYearMouseEnter=function(o,a){e.setState({selectingDate:ct(pe(),a)}),e.props.onYearMouseEnter&&e.props.onYearMouseEnter(o,a)},e.handleYearMouseLeave=function(o,a){e.props.onYearMouseLeave&&e.props.onYearMouseLeave(o,a)},e.handleYearChange=function(o){var a,i,s,l;(i=(a=e.props).onYearChange)===null||i===void 0||i.call(a,o),e.setState({isRenderAriaLiveMessage:!0}),e.props.adjustDateOnChange&&(e.props.onSelect(o),(l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!0)),e.props.setPreSelection&&e.props.setPreSelection(o)},e.handleMonthChange=function(o){var a,i;e.handleCustomMonthChange(o),e.props.adjustDateOnChange&&(e.props.onSelect(o),(i=(a=e.props).setOpen)===null||i===void 0||i.call(a,!0)),e.props.setPreSelection&&e.props.setPreSelection(o)},e.handleCustomMonthChange=function(o){var a,i;(i=(a=e.props).onMonthChange)===null||i===void 0||i.call(a,o),e.setState({isRenderAriaLiveMessage:!0})},e.handleMonthYearChange=function(o){e.handleYearChange(o),e.handleMonthChange(o)},e.changeYear=function(o){e.setState(function(a){var i=a.date;return{date:ct(i,Number(o))}},function(){return e.handleYearChange(e.state.date)})},e.changeMonth=function(o){e.setState(function(a){var i=a.date;return{date:Ue(i,Number(o))}},function(){return e.handleMonthChange(e.state.date)})},e.changeMonthYear=function(o){e.setState(function(a){var i=a.date;return{date:ct(Ue(i,je(o)),Z(o))}},function(){return e.handleMonthYearChange(e.state.date)})},e.header=function(o){o===void 0&&(o=e.state.date);var a=At(o,e.props.locale,e.props.calendarStartDay),i=[];return e.props.showWeekNumbers&&i.push(c.createElement("div",{key:"W",className:"react-datepicker__day-name"},e.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(s){var l=Ft(a,s),d=e.formatWeekday(l,e.props.locale),u=e.props.weekDayClassName?e.props.weekDayClassName(l):void 0;return c.createElement("div",{key:s,"aria-label":we(l,"EEEE",e.props.locale),className:Le("react-datepicker__day-name",u)},d)}))},e.formatWeekday=function(o,a){return e.props.formatWeekDay?Og(o,e.props.formatWeekDay,a):e.props.useWeekdaysShort?Mg(o,a):Pg(o,a)},e.decreaseYear=function(){e.setState(function(o){var a,i=o.date;return{date:En(i,e.props.showYearPicker?(a=e.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.clearSelectingDate=function(){e.setState({selectingDate:void 0})},e.renderPreviousButton=function(){var o;if(!e.props.renderCustomHeader){var a;switch(!0){case e.props.showMonthYearPicker:a=nu(e.state.date,e.props);break;case e.props.showYearPicker:a=Lg(e.state.date,e.props);break;case e.props.showQuarterYearPicker:a=Ig(e.state.date,e.props);break;default:a=eu(e.state.date,e.props);break}if(!(!((o=e.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&a||e.props.showTimeSelectOnly)){var i=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],s=["react-datepicker__navigation","react-datepicker__navigation--previous"],l=e.decreaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(l=e.decreaseYear),a&&e.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),l=void 0);var d=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,u=e.props,p=u.previousMonthButtonLabel,h=p===void 0?r.defaultProps.previousMonthButtonLabel:p,f=u.previousYearButtonLabel,m=f===void 0?r.defaultProps.previousYearButtonLabel:f,v=e.props,g=v.previousMonthAriaLabel,b=g===void 0?typeof h=="string"?h:"Previous Month":g,w=v.previousYearAriaLabel,x=w===void 0?typeof m=="string"?m:"Previous Year":w;return c.createElement("button",{type:"button",className:s.join(" "),onClick:l,onKeyDown:e.props.handleOnKeyDown,"aria-label":d?x:b},c.createElement("span",{className:i.join(" ")},d?m:h))}}},e.increaseYear=function(){e.setState(function(o){var a,i=o.date;return{date:wt(i,e.props.showYearPicker?(a=e.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.renderNextButton=function(){var o;if(!e.props.renderCustomHeader){var a;switch(!0){case e.props.showMonthYearPicker:a=ru(e.state.date,e.props);break;case e.props.showYearPicker:a=$g(e.state.date,e.props);break;case e.props.showQuarterYearPicker:a=Fg(e.state.date,e.props);break;default:a=tu(e.state.date,e.props);break}if(!(!((o=e.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&a||e.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];e.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),e.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=e.increaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(l=e.increaseYear),a&&e.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var d=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,u=e.props,p=u.nextMonthButtonLabel,h=p===void 0?r.defaultProps.nextMonthButtonLabel:p,f=u.nextYearButtonLabel,m=f===void 0?r.defaultProps.nextYearButtonLabel:f,v=e.props,g=v.nextMonthAriaLabel,b=g===void 0?typeof h=="string"?h:"Next Month":g,w=v.nextYearAriaLabel,x=w===void 0?typeof m=="string"?m:"Next Year":w;return c.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:e.props.handleOnKeyDown,"aria-label":d?x:b},c.createElement("span",{className:s.join(" ")},d?m:h))}}},e.renderCurrentMonth=function(o){o===void 0&&(o=e.state.date);var a=["react-datepicker__current-month"];return e.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),e.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),e.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),c.createElement("h2",{className:a.join(" ")},we(o,e.props.dateFormat,e.props.locale))},e.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!e.props.showYearDropdown||o))return c.createElement(rb,ie({},r.defaultProps,e.props,{date:e.state.date,onChange:e.changeYear,year:Z(e.state.date)}))},e.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!e.props.showMonthDropdown||o))return c.createElement(qg,ie({},r.defaultProps,e.props,{month:je(e.state.date),onChange:e.changeMonth}))},e.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!e.props.showMonthYearDropdown||o))return c.createElement(Jg,ie({},r.defaultProps,e.props,{date:e.state.date,onChange:e.changeMonthYear}))},e.handleTodayButtonClick=function(o){e.props.onSelect(Ul(),o),e.props.setPreSelection&&e.props.setPreSelection(Ul())},e.renderTodayButton=function(){if(!(!e.props.todayButton||e.props.showTimeSelectOnly))return c.createElement("div",{className:"react-datepicker__today-button",onClick:e.handleTodayButtonClick},e.props.todayButton)},e.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return c.createElement("div",{className:"react-datepicker__header ".concat(e.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},e.renderCurrentMonth(a),c.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(e.props.dropdownMode),onFocus:e.handleDropdownFocus},e.renderMonthDropdown(i!==0),e.renderMonthYearDropdown(i!==0),e.renderYearDropdown(i!==0)),c.createElement("div",{className:"react-datepicker__day-names"},e.header(a)))},e.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(e.props.showTimeSelect&&!e.state.monthContainer||e.props.showTimeSelectOnly)return null;var d=eu(e.state.date,e.props),u=tu(e.state.date,e.props),p=nu(e.state.date,e.props),h=ru(e.state.date,e.props),f=!e.props.showMonthYearPicker&&!e.props.showQuarterYearPicker&&!e.props.showYearPicker;return c.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:e.props.onDropdownFocus},(i=(a=e.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,ie(ie({},e.state),{customHeaderCount:l,monthDate:s,changeMonth:e.changeMonth,changeYear:e.changeYear,decreaseMonth:e.decreaseMonth,increaseMonth:e.increaseMonth,decreaseYear:e.decreaseYear,increaseYear:e.increaseYear,prevMonthButtonDisabled:d,nextMonthButtonDisabled:u,prevYearButtonDisabled:p,nextYearButtonDisabled:h})),f&&c.createElement("div",{className:"react-datepicker__day-names"},e.header(s)))},e.renderYearHeader=function(o){var a=o.monthDate,i=e.props,s=i.showYearPicker,l=i.yearItemNumber,d=l===void 0?r.defaultProps.yearItemNumber:l,u=jt(a,d),p=u.startPeriod,h=u.endPeriod;return c.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(p," - ").concat(h):Z(a))},e.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case e.props.renderCustomHeader!==void 0:return e.renderCustomHeader(l);case(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker):return e.renderYearHeader(l);default:return e.renderDefaultHeader(l)}},e.renderMonths=function(){var o,a;if(!(e.props.showTimeSelectOnly||e.props.showYearPicker)){for(var i=[],s=(o=e.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=e.props.showPreviousMonths?s-1:0,d=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?wt(e.state.date,l):Dn(e.state.date,l),u=(a=e.props.monthSelectedIn)!==null&&a!==void 0?a:l,p=0;p<s;++p){var h=p-u+l,f=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?wt(d,h):et(d,h),m="month-".concat(p),v=p<s-1,g=p>0;i.push(c.createElement("div",{key:m,ref:function(b){e.monthContainer=b??void 0},className:"react-datepicker__month-container"},e.renderHeader({monthDate:f,i:p}),c.createElement(Ug,ie({},r.defaultProps,e.props,{ariaLabelPrefix:e.props.monthAriaLabelPrefix,day:f,onDayClick:e.handleDayClick,handleOnKeyDown:e.props.handleOnDayKeyDown,handleOnMonthKeyDown:e.props.handleOnKeyDown,onDayMouseEnter:e.handleDayMouseEnter,onMouseLeave:e.handleMonthMouseLeave,orderInDisplay:p,selectingDate:e.state.selectingDate,monthShowsDuplicateDaysEnd:v,monthShowsDuplicateDaysStart:g}))))}return i}},e.renderYears=function(){if(!e.props.showTimeSelectOnly&&e.props.showYearPicker)return c.createElement("div",{className:"react-datepicker__year--container"},e.renderHeader({monthDate:e.state.date}),c.createElement(eb,ie({},r.defaultProps,e.props,{selectingDate:e.state.selectingDate,date:e.state.date,onDayClick:e.handleDayClick,clearSelectingDate:e.clearSelectingDate,onYearMouseEnter:e.handleYearMouseEnter,onYearMouseLeave:e.handleYearMouseLeave})))},e.renderTimeSection=function(){if(e.props.showTimeSelect&&(e.state.monthContainer||e.props.showTimeSelectOnly))return c.createElement(Zg,ie({},r.defaultProps,e.props,{onChange:e.props.onTimeChange,format:e.props.timeFormat,intervals:e.props.timeIntervals,monthRef:e.state.monthContainer}))},e.renderInputTimeSection=function(){var o=e.props.selected?new Date(e.props.selected):void 0,a=o&&Ct(o)&&!!e.props.selected,i=a?"".concat(su(o.getHours()),":").concat(su(o.getMinutes())):"";if(e.props.showTimeInput)return c.createElement(Rg,ie({},r.defaultProps,e.props,{date:o,timeString:i,onChange:e.props.onTimeChange}))},e.renderAriaLiveRegion=function(){var o,a=jt(e.state.date,(o=e.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return e.props.showYearPicker?l="".concat(i," - ").concat(s):e.props.showMonthYearPicker||e.props.showQuarterYearPicker?l=Z(e.state.date):l="".concat(Fa(je(e.state.date),e.props.locale)," ").concat(Z(e.state.date)),c.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e.state.isRenderAriaLiveMessage&&l)},e.renderChildren=function(){if(e.props.children)return c.createElement("div",{className:"react-datepicker__children-container"},e.props.children)},e.containerRef=c.createRef(),e.state={date:e.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:rr}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){t.setState({monthContainer:t.monthContainer})}())},r.prototype.componentDidUpdate=function(t){var e=this;if(this.props.preSelection&&(!re(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var o=!We(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&e.handleCustomMonthChange(e.state.date)})}else this.props.openToDate&&!re(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var t=this.props.container||wg;return c.createElement(io,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},c.createElement(t,{className:Le("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},r}(c.Component),sb=function(n){var r=n.icon,t=n.className,e=t===void 0?"":t,o=n.onClick,a="react-datepicker__calendar-icon";return typeof r=="string"?c.createElement("i",{className:"".concat(a," ").concat(r," ").concat(e),"aria-hidden":"true",onClick:o}):c.isValidElement(r)?c.cloneElement(r,{className:"".concat(r.props.className||""," ").concat(a," ").concat(e),onClick:function(i){typeof r.props.onClick=="function"&&r.props.onClick(i),typeof o=="function"&&o(i)}}):c.createElement("svg",{className:"".concat(a," ").concat(e),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},c.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},mu=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.portalRoot=null,e.el=document.createElement("div"),e}return r.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},r.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},r.prototype.render=function(){return Ee.createPortal(this.props.children,this.el)},r}(c.Component),lb="[tabindex], a, button, input, select, textarea",ub=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},hu=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.getTabChildren=function(){var o;return Array.prototype.slice.call((o=e.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(lb),1,-1).filter(ub)},e.handleFocusStart=function(){var o=e.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},e.handleFocusEnd=function(){var o=e.getTabChildren();o&&o.length>1&&o[0].focus()},e.tabLoopRef=c.createRef(),e}return r.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:r.defaultProps.enableTabLoop)?c.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},c.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,c.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r}(c.Component);function cb(n){var r=function(t){var e,o=typeof t.hidePopper=="boolean"?t.hidePopper:!0,a=c.useRef(null),i=yg(ie({open:!o,whileElementsMounted:cs,placement:t.popperPlacement,middleware:dt([og({padding:15}),rg(10),ag({element:a})],(e=t.popperModifiers)!==null&&e!==void 0?e:[],!0)},t.popperProps)),s=ie(ie({},t),{hidePopper:o,popperProps:ie(ie({},i),{arrowRef:a})});return c.createElement(n,ie({},s))};return r}var db=function(n){Ae(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(r,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var t=this.props,e=t.className,o=t.wrapperClassName,a=t.hidePopper,i=a===void 0?r.defaultProps.hidePopper:a,s=t.popperComponent,l=t.targetComponent,d=t.enableTabLoop,u=t.popperOnKeyDown,p=t.portalId,h=t.portalHost,f=t.popperProps,m=t.showArrow,v=void 0;if(!i){var g=Le("react-datepicker-popper",e);v=c.createElement(hu,{enableTabLoop:d},c.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:u},s,m&&c.createElement(fg,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(v=c.createElement(this.props.popperContainer,{},v)),p&&!i&&(v=c.createElement(mu,{portalId:p,portalHost:h},v));var b=Le("react-datepicker-wrapper",o);return c.createElement(c.Fragment,null,c.createElement("div",{ref:f.refs.setReference,className:b},l),v)},r}(c.Component),fb=cb(db),vu="react-datepicker-ignore-onclickoutside";function pb(n,r){return n&&r?je(n)!==je(r)||Z(n)!==Z(r):n!==r}var Aa="Date input not valid.",mb=function(n){Ae(r,n);function r(t){var e=n.call(this,t)||this;return e.calendar=null,e.input=null,e.getPreSelection=function(){return e.props.openToDate?e.props.openToDate:e.props.selectsEnd&&e.props.startDate?e.props.startDate:e.props.selectsStart&&e.props.endDate?e.props.endDate:pe()},e.modifyHolidays=function(){var o;return(o=e.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return Ct(s)?dt(dt([],a,!0),[ie(ie({},i),{date:s})],!1):a},[])},e.calcInitialState=function(){var o,a=e.getPreSelection(),i=ou(e.props),s=au(e.props),l=i&&Zt(a,so(i))?i:s&&$t(a,Kl(s))?s:a;return{open:e.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=e.props.selectsRange?e.props.startDate:e.props.selected)!==null&&o!==void 0?o:l,highlightDates:iu(e.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},e.resetHiddenStatus=function(){e.setState(ie(ie({},e.state),{wasHidden:!1}))},e.setHiddenStatus=function(){e.setState(ie(ie({},e.state),{wasHidden:!0}))},e.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&e.setHiddenStatus()},e.clearPreventFocusTimeout=function(){e.preventFocusTimeout&&clearTimeout(e.preventFocusTimeout)},e.setFocus=function(){e.input&&e.input.focus&&e.input.focus({preventScroll:!0})},e.setBlur=function(){e.input&&e.input.blur&&e.input.blur(),e.cancelFocusInput()},e.setOpen=function(o,a){a===void 0&&(a=!1),e.setState({open:o,preSelection:o&&e.state.open?e.state.preSelection:e.calcInitialState().preSelection,lastPreSelectChange:Ya},function(){o||e.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&e.setBlur(),e.setState({inputValue:null})})})},e.inputOk=function(){return Dt(e.state.preSelection)},e.isCalendarOpen=function(){return e.props.open===void 0?e.state.open&&!e.props.disabled&&!e.props.readOnly:e.props.open},e.handleFocus=function(o){var a,i,s=e.state.wasHidden,l=s?e.state.open:!0;s&&e.resetHiddenStatus(),!e.state.preventFocus&&l&&((i=(a=e.props).onFocus)===null||i===void 0||i.call(a,o),!e.props.preventOpenOnFocus&&!e.props.readOnly&&e.setOpen(!0)),e.setState({focused:!0})},e.sendFocusBackToInput=function(){e.preventFocusTimeout&&e.clearPreventFocusTimeout(),e.setState({preventFocus:!0},function(){e.preventFocusTimeout=setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})})},e.cancelFocusInput=function(){clearTimeout(e.inputFocusTimeout),e.inputFocusTimeout=void 0},e.deferFocusInput=function(){e.cancelFocusInput(),e.inputFocusTimeout=setTimeout(function(){return e.setFocus()},1)},e.handleDropdownFocus=function(){e.cancelFocusInput()},e.handleBlur=function(o){var a,i;(!e.state.open||e.props.withPortal||e.props.showTimeInput)&&((i=(a=e.props).onBlur)===null||i===void 0||i.call(a,o)),e.setState({focused:!1})},e.handleCalendarClickOutside=function(o){var a,i;e.props.inline||e.setOpen(!1),(i=(a=e.props).onClickOutside)===null||i===void 0||i.call(a,o),e.props.withPortal&&o.preventDefault()},e.handleChange=function(){for(var o,a,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var l=i[0];if(!(e.props.onChangeRaw&&(e.props.onChangeRaw.apply(e,i),!l||typeof l.isDefaultPrevented!="function"||l.isDefaultPrevented()))){e.setState({inputValue:(l==null?void 0:l.target)instanceof HTMLInputElement?l.target.value:null,lastPreSelectChange:hb});var d=e.props,u=d.dateFormat,p=u===void 0?r.defaultProps.dateFormat:u,h=d.strictParsing,f=h===void 0?r.defaultProps.strictParsing:h,m=d.selectsRange,v=d.startDate,g=d.endDate,b=(l==null?void 0:l.target)instanceof HTMLInputElement?l.target.value:"";if(m){var w=b.split("-",2).map(function(Y){return Y.trim()}),x=w[0],E=w[1],P=Na(x??"",p,e.props.locale,f),M=Na(E??"",p,e.props.locale,f),_=(v==null?void 0:v.getTime())!==(P==null?void 0:P.getTime()),S=(g==null?void 0:g.getTime())!==(M==null?void 0:M.getTime());if(!_&&!S||P&&pt(P,e.props)||M&&pt(M,e.props))return;(a=(o=e.props).onChange)===null||a===void 0||a.call(o,[P,M],l)}else{var I=Na(b,p,e.props.locale,f,e.props.minDate);e.props.showTimeSelectOnly&&e.props.selected&&I&&!re(I,e.props.selected)&&(I=Zv(e.props.selected,{hours:it(I),minutes:st(I),seconds:Et(I)})),(I||!b)&&e.setSelected(I,l,!0)}}},e.handleSelect=function(o,a,i){if(e.props.shouldCloseOnSelect&&!e.props.showTimeSelect&&e.sendFocusBackToInput(),e.props.onChangeRaw&&e.props.onChangeRaw(a),e.setSelected(o,a,!1,i),e.props.showDateSelect&&e.setState({isRenderAriaLiveMessage:!0}),!e.props.shouldCloseOnSelect||e.props.showTimeSelect)e.setPreSelection(o);else if(!e.props.inline){e.props.selectsRange||e.setOpen(!1);var s=e.props,l=s.startDate,d=s.endDate;l&&!d&&(e.props.swapRange||!cu(o,l))&&e.setOpen(!1)}},e.setSelected=function(o,a,i,s){var l,d,u=o;if(e.props.showYearPicker){if(u!==null&&po(Z(u),e.props))return}else if(e.props.showMonthYearPicker){if(u!==null&&Gl(u,e.props))return}else if(u!==null&&pt(u,e.props))return;var p=e.props,h=p.onChange,f=p.selectsRange,m=p.startDate,v=p.endDate,g=p.selectsMultiple,b=p.selectedDates,w=p.minTime,x=p.swapRange;if(!en(e.props.selected,u)||e.props.allowSameDay||f||g)if(u!==null&&(e.props.selected&&(!i||!e.props.showTimeSelect&&!e.props.showTimeSelectOnly&&!e.props.showTimeInput)&&(u=Ia(u,{hour:it(e.props.selected),minute:st(e.props.selected),second:Et(e.props.selected)})),!i&&(e.props.showTimeSelect||e.props.showTimeSelectOnly)&&w&&(u=Ia(u,{hour:w.getHours(),minute:w.getMinutes(),second:w.getSeconds()})),e.props.inline||e.setState({preSelection:u}),e.props.focusSelectedMonth||e.setState({monthSelectedIn:s})),f){var E=!m&&!v,P=m&&!v,M=m&&v;E?h==null||h([u,null],a):P&&(u===null?h==null||h([null,null],a):cu(u,m)?x?h==null||h([u,m],a):h==null||h([u,null],a):h==null||h([m,u],a)),M&&(h==null||h([u,null],a))}else if(g){if(u!==null)if(!(b!=null&&b.length))h==null||h([u],a);else{var _=b.some(function(I){return re(I,u)});if(_){var S=b.filter(function(I){return!re(I,u)});h==null||h(S,a)}else h==null||h(dt(dt([],b,!0),[u],!1),a)}}else h==null||h(u,a);i||((d=(l=e.props).onSelect)===null||d===void 0||d.call(l,u,a),e.setState({inputValue:null}))},e.setPreSelection=function(o){var a=Dt(e.props.minDate),i=Dt(e.props.maxDate),s=!0;if(o){var l=so(o);if(a&&i)s=ar(o,e.props.minDate,e.props.maxDate);else if(a){var d=so(e.props.minDate);s=$t(o,d)||en(l,d)}else if(i){var u=Kl(e.props.maxDate);s=Zt(o,u)||en(l,u)}}s&&e.setState({preSelection:o})},e.toggleCalendar=function(){e.setOpen(!e.state.open)},e.handleTimeChange=function(o){var a,i;if(!(e.props.selectsRange||e.props.selectsMultiple)){var s=e.props.selected?e.props.selected:e.getPreSelection(),l=e.props.selected?o:Ia(s,{hour:it(o),minute:st(o)});e.setState({preSelection:l}),(i=(a=e.props).onChange)===null||i===void 0||i.call(a,l),e.props.shouldCloseOnSelect&&!e.props.showTimeInput&&(e.sendFocusBackToInput(),e.setOpen(!1)),e.props.showTimeInput&&e.setOpen(!0),(e.props.showTimeSelectOnly||e.props.showTimeSelect)&&e.setState({isRenderAriaLiveMessage:!0}),e.setState({inputValue:null})}},e.onInputClick=function(){var o,a;!e.props.disabled&&!e.props.readOnly&&e.setOpen(!0),(a=(o=e.props).onInputClick)===null||a===void 0||a.call(o)},e.onInputKeyDown=function(o){var a,i,s,l,d,u;(i=(a=e.props).onKeyDown)===null||i===void 0||i.call(a,o);var p=o.key;if(!e.state.open&&!e.props.inline&&!e.props.preventOpenOnFocus){(p===B.ArrowDown||p===B.ArrowUp||p===B.Enter)&&((s=e.onInputClick)===null||s===void 0||s.call(e));return}if(e.state.open){if(p===B.ArrowDown||p===B.ArrowUp){o.preventDefault();var h=e.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":e.props.showWeekPicker&&e.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':e.props.showFullMonthYearPicker||e.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',f=((l=e.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&e.calendar.containerRef.current.querySelector(h);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var m=pe(e.state.preSelection);p===B.Enter?(o.preventDefault(),e.inputOk()&&e.state.lastPreSelectChange===Ya?(e.handleSelect(m,o),!e.props.shouldCloseOnSelect&&e.setPreSelection(m)):e.setOpen(!1)):p===B.Escape?(o.preventDefault(),e.sendFocusBackToInput(),e.setOpen(!1)):p===B.Tab&&e.setOpen(!1),e.inputOk()||(u=(d=e.props).onInputError)===null||u===void 0||u.call(d,{code:1,msg:Aa})}},e.onPortalKeyDown=function(o){var a=o.key;a===B.Escape&&(o.preventDefault(),e.setState({preventFocus:!0},function(){e.setOpen(!1),setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})}))},e.onDayKeyDown=function(o){var a,i,s,l,d,u,p=e.props,h=p.minDate,f=p.maxDate,m=p.disabledKeyboardNavigation,v=p.showWeekPicker,g=p.shouldCloseOnSelect,b=p.locale,w=p.calendarStartDay,x=p.adjustDateOnChange,E=p.inline;if((i=(a=e.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var P=o.key,M=o.shiftKey,_=pe(e.state.preSelection),S=function(A,$){var F=$;switch(A){case B.ArrowRight:F=v?Vr($,1):Ft($,1);break;case B.ArrowLeft:F=v?Yl($,1):eg($,1);break;case B.ArrowUp:F=Yl($,1);break;case B.ArrowDown:F=Vr($,1);break;case B.PageUp:F=M?En($,1):Dn($,1);break;case B.PageDown:F=M?wt($,1):et($,1);break;case B.Home:F=At($,b,w);break;case B.End:F=_g($);break}return F},I=function(A,$){for(var F=40,R=A,H=!1,K=0,U=S(A,$);!H;){if(K>=F){U=$;break}h&&U<h&&(R=B.ArrowRight,U=pt(h,e.props)?S(R,U):h),f&&U>f&&(R=B.ArrowLeft,U=pt(f,e.props)?S(R,U):f),pt(U,e.props)?((R===B.PageUp||R===B.Home)&&(R=B.ArrowRight),(R===B.PageDown||R===B.End)&&(R=B.ArrowLeft),U=S(R,U)):H=!0,K++}return U};if(P===B.Enter){o.preventDefault(),e.handleSelect(_,o),!g&&e.setPreSelection(_);return}else if(P===B.Escape){o.preventDefault(),e.setOpen(!1),e.inputOk()||(l=(s=e.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Aa});return}var Y=null;switch(P){case B.ArrowLeft:case B.ArrowRight:case B.ArrowUp:case B.ArrowDown:case B.PageUp:case B.PageDown:case B.Home:case B.End:Y=I(P,_);break}if(!Y){(u=(d=e.props).onInputError)===null||u===void 0||u.call(d,{code:1,msg:Aa});return}if(o.preventDefault(),e.setState({lastPreSelectChange:Ya}),x&&e.setSelected(Y),e.setPreSelection(Y),E){var k=je(_),D=je(Y),O=Z(_),C=Z(Y);k!==D||O!==C?e.setState({shouldFocusDayInline:!0}):e.setState({shouldFocusDayInline:!1})}}},e.onPopperKeyDown=function(o){var a=o.key;a===B.Escape&&(o.preventDefault(),e.sendFocusBackToInput())},e.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),e.sendFocusBackToInput();var a=e.props,i=a.selectsRange,s=a.onChange;i?s==null||s([null,null],o):s==null||s(null,o),e.setState({inputValue:null})},e.clear=function(){e.onClearClick()},e.onScroll=function(o){typeof e.props.closeOnScroll=="boolean"&&e.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&e.setOpen(!1):typeof e.props.closeOnScroll=="function"&&e.props.closeOnScroll(o)&&e.setOpen(!1)},e.renderCalendar=function(){var o,a;return!e.props.inline&&!e.isCalendarOpen()?null:c.createElement(ib,ie({showMonthYearDropdown:void 0,ref:function(i){e.calendar=i}},e.props,e.state,{setOpen:e.setOpen,dateFormat:(o=e.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:e.handleSelect,onClickOutside:e.handleCalendarClickOutside,holidays:Yg(e.modifyHolidays()),outsideClickIgnoreClass:vu,onDropdownFocus:e.handleDropdownFocus,onTimeChange:e.handleTimeChange,className:e.props.calendarClassName,container:e.props.calendarContainer,handleOnKeyDown:e.props.onKeyDown,handleOnDayKeyDown:e.onDayKeyDown,setPreSelection:e.setPreSelection,dropdownMode:(a=e.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),e.props.children)},e.renderAriaLiveRegion=function(){var o=e.props,a=o.dateFormat,i=a===void 0?r.defaultProps.dateFormat:a,s=o.locale,l=e.props.showTimeInput||e.props.showTimeSelect,d=l?"PPPPp":"PPPP",u;return e.props.selectsRange?u="Selected start date: ".concat(Ge(e.props.startDate,{dateFormat:d,locale:s}),". ").concat(e.props.endDate?"End date: "+Ge(e.props.endDate,{dateFormat:d,locale:s}):""):e.props.showTimeSelectOnly?u="Selected time: ".concat(Ge(e.props.selected,{dateFormat:i,locale:s})):e.props.showYearPicker?u="Selected year: ".concat(Ge(e.props.selected,{dateFormat:"yyyy",locale:s})):e.props.showMonthYearPicker?u="Selected month: ".concat(Ge(e.props.selected,{dateFormat:"MMMM yyyy",locale:s})):e.props.showQuarterYearPicker?u="Selected quarter: ".concat(Ge(e.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(Ge(e.props.selected,{dateFormat:d,locale:s})),c.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},e.renderDateInput=function(){var o,a,i,s=Le(e.props.className,(o={},o[vu]=e.state.open,o)),l=e.props.customInput||c.createElement("input",{type:"text"}),d=e.props.customInputRef||"ref",u=e.props,p=u.dateFormat,h=p===void 0?r.defaultProps.dateFormat:p,f=u.locale,m=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?Eg(e.props.startDate,e.props.endDate,{dateFormat:h,locale:f}):e.props.selectsMultiple?Cg((i=e.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:h,locale:f}):Ge(e.props.selected,{dateFormat:h,locale:f});return c.cloneElement(l,(a={},a[d]=function(v){e.input=v},a.value=m,a.onBlur=e.handleBlur,a.onChange=e.handleChange,a.onClick=e.onInputClick,a.onFocus=e.handleFocus,a.onKeyDown=e.onInputKeyDown,a.id=e.props.id,a.name=e.props.name,a.form=e.props.form,a.autoFocus=e.props.autoFocus,a.placeholder=e.props.placeholderText,a.disabled=e.props.disabled,a.autoComplete=e.props.autoComplete,a.className=Le(l.props.className,s),a.title=e.props.title,a.readOnly=e.props.readOnly,a.required=e.props.required,a.tabIndex=e.props.tabIndex,a["aria-describedby"]=e.props.ariaDescribedBy,a["aria-invalid"]=e.props.ariaInvalid,a["aria-labelledby"]=e.props.ariaLabelledBy,a["aria-required"]=e.props.ariaRequired,a))},e.renderClearButton=function(){var o=e.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,d=o.endDate,u=o.clearButtonTitle,p=o.clearButtonClassName,h=p===void 0?"":p,f=o.ariaLabelClose,m=f===void 0?"Close":f,v=o.selectedDates;return a&&(s!=null||l!=null||d!=null||v!=null&&v.length)?c.createElement("button",{type:"button",className:Le("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,onClick:e.onClearClick,title:u,tabIndex:-1}):null},e.state=e.calcInitialState(),e.preventFocusTimeout=void 0,e}return Object.defineProperty(r,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:rr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.componentDidUpdate=function(t,e){var o,a,i,s;t.inline&&pb(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:iu(this.props.highlightDates)}),!e.focused&&!en(t.selected,this.props.selected)&&this.setState({inputValue:null}),e.open!==this.state.open&&(e.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),e.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},r.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.renderInputContainer=function(){var t=this.props,e=t.showIcon,o=t.icon,a=t.calendarIconClassname,i=t.calendarIconClassName,s=t.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),c.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&c.createElement(sb,ie({icon:o,className:Le(i,!i&&a,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},r.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var e=this.state.open?c.createElement(hu,{enableTabLoop:this.props.enableTabLoop},c.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(e=c.createElement(mu,ie({portalId:this.props.portalId},this.props),e)),c.createElement("div",null,this.renderInputContainer(),e)}return c.createElement(fb,ie({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(c.Component),hb="input",Ya="navigate";const vb={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},gb=(n,r,t)=>{let e;const o=vb[n];return typeof o=="string"?e=o:r===1?e=o.one:e=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?e+" 후":e+" 전":e},bb={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},yb={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wb={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},xb={date:bn({formats:bb,defaultWidth:"full"}),time:bn({formats:yb,defaultWidth:"full"}),dateTime:bn({formats:wb,defaultWidth:"full"})},Db={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},Eb=(n,r,t,e)=>Db[n],Cb={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},kb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},Sb={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},_b={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},Ob={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Pb={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Mb={ordinalNumber:(n,r)=>{const t=Number(n);switch(String(r==null?void 0:r.unit)){case"minute":case"second":return String(t);case"date":return t+"일";default:return t+"번째"}},era:ot({values:Cb,defaultWidth:"wide"}),quarter:ot({values:kb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ot({values:Sb,defaultWidth:"wide"}),day:ot({values:_b,defaultWidth:"wide"}),dayPeriod:ot({values:Ob,defaultWidth:"wide",formattingValues:Pb,defaultFormattingWidth:"wide"})},Tb=/^(\d+)(일|번째)?/i,Nb=/\d+/i,Ib={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},Fb={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},Lb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},$b={any:[/1/i,/2/i,/3/i,/4/i]},Ab={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},Yb={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},jb={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},Wb={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},Hb={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},Rb={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},Bb={ordinalNumber:vl({matchPattern:Tb,parsePattern:Nb,valueCallback:n=>parseInt(n,10)}),era:at({matchPatterns:Ib,defaultMatchWidth:"wide",parsePatterns:Fb,defaultParseWidth:"any"}),quarter:at({matchPatterns:Lb,defaultMatchWidth:"wide",parsePatterns:$b,defaultParseWidth:"any",valueCallback:n=>n+1}),month:at({matchPatterns:Ab,defaultMatchWidth:"wide",parsePatterns:Yb,defaultParseWidth:"any"}),day:at({matchPatterns:jb,defaultMatchWidth:"wide",parsePatterns:Wb,defaultParseWidth:"any"}),dayPeriod:at({matchPatterns:Hb,defaultMatchWidth:"any",parsePatterns:Rb,defaultParseWidth:"any"})},Vb={code:"ko",formatDistance:gb,formatLong:xb,formatRelative:Eb,localize:Mb,match:Bb,options:{weekStartsOn:0,firstWeekContainsDate:1}},zb=({label:n,placeholder:r,value:t,onChange:e,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(u,p)=>1990+p),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=c.forwardRef(({value:u,onClick:p},h)=>N.jsx("button",{"aria-label":"inputButton",type:"button",id:n,className:"h-[60px] w-full rounded-xl bg-[#F8F8F9] p-4 text-left text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",onClick:p,ref:h,children:u||N.jsx("p",{className:"text-[#C5C8CD]",children:r})}));l.displayName="CustomInput";function d(u){var p=u.substring(0,4),h=u.substring(5,7),f=u.substring(8,10);return new Date(Number(p),Number(h)-1,Number(f))}return N.jsxs("div",{className:"flex flex-col text-deepGray",children:[N.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-lightBlack",children:n}),N.jsx(mb,{disabledKeyboardNavigation:!0,locale:Vb,id:n,name:"출생일",placeholderText:r,onChange:u=>u&&e(u),selected:t?d(t):void 0,value:t,dateFormat:"yyyy-MM-dd",autoComplete:"off",maxDate:new Date,customInput:N.jsx(l,{}),renderCustomHeader:({date:u,changeYear:p,changeMonth:h,decreaseMonth:f,increaseMonth:m})=>N.jsxs("div",{className:"flex justify-center pb-4 pt-5 text-lightBlack",children:[N.jsx("button",{onClick:f,disabled:u.getFullYear()<=1990&&u.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:N.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),N.jsxs("div",{className:"text-lg",children:[N.jsx("select",{"aria-label":"yearsSelect",dir:"rtl",className:"datepicker-select w-auto cursor-pointer rounded-md bg-[#e8e8e9] px-2 py-1 text-center focus:outline-none",value:Z(u),onChange:({target:{value:v}})=>p(Number(v)),children:i.map(v=>N.jsx("option",{value:v,children:v},v))}),N.jsx("span",{className:"ml-1 mr-2",children:"년"}),N.jsx("select",{"aria-label":"monthsSelect",dir:"rtl",className:"datepicker-select cursor-pointer rounded-md bg-[#e8e8e9] px-2 py-1 text-center focus:outline-none",value:s[je(u)],onChange:({target:{value:v}})=>h(s.indexOf(v)),children:s.map(v=>N.jsx("option",{value:v,children:v},v))}),N.jsx("span",{className:"mx-1",children:"월"})]}),N.jsx("button",{onClick:m,disabled:u.getFullYear()>=new Date().getFullYear()&&u.getMonth()>=new Date().getMonth(),type:"button",className:"react-datepicker__navigation react-datepicker__navigation--next","aria-label":"Next Month",children:N.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&N.jsx("p",{className:"px-4 pt-2 text-[#8B919A]",children:o})]})};function Qb(n){return Tn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},child:[]}]})(n)}const Ub=({label:n,placeholder:r,value:t,options:e,onChange:o,disabled:a})=>N.jsx("div",{className:"relative text-deepGray",children:N.jsxs(Pm,{disabled:a,onChange:o,children:[N.jsx(xr,{className:"text-xl font-bold text-lightBlack",children:n}),N.jsxs(sl,{className:"relative mt-4 h-[60px] w-full rounded-xl bg-[#F8F8F8] p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",children:[t.name?N.jsx("p",{children:t.name}):N.jsx("p",{className:"text-[#C5C8CD]",children:r})," ",N.jsx(Qb,{className:"absolute bottom-5 right-4"})]}),N.jsx(ll,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:e.map(i=>N.jsx(ul,{value:i,as:N.Fragment,children:({focus:s,selected:l})=>N.jsx("li",{className:`flex w-full cursor-pointer justify-between p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50 ${s?"bg-[#E8E8E8]":"bg-[#F8F8F8]"} ${l&&"bg-[#D8D8D8]"}`,children:i.name})},i.name))})]})}),Kb=({className:n,id:r,name:t,onChange:e,disabled:o,checked:a})=>N.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:t,className:dr("petnowRadio size-[3.5vw]",n),onChange:e}),qb=({label:n,placeholder:r,value:t,options:e,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,d]=c.useState("");let u;const p=m=>{u&&clearTimeout(u),o(""),u=setTimeout(async()=>{d(m.target.value)},200)},h=m=>{o(""),d(m.target.value)},f=l===""?e.slice(0,4):e.filter(m=>m.name.replace(/ /g,"").includes(l.replace(/ /g,""))).slice(0,4);return N.jsxs("div",{children:[N.jsx("div",{className:"relative flex flex-col text-deepGray",children:N.jsxs(_p,{onChange:m=>{o(m)},disabled:a,children:[N.jsx(xr,{className:"text-xl font-bold text-lightBlack",children:n}),N.jsx(Hs,{"aria-label":"comboboxInput",className:"mt-4 flex w-full items-center justify-between rounded-xl bg-[#F8F8F8] p-4 text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50",value:t,onChange:s?h:p,placeholder:r,autoComplete:"off"}),N.jsx(Rs,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-f.length*60},children:f.map(m=>N.jsx(Bs,{value:m,as:c.Fragment,children:({focus:v,selected:g})=>N.jsx("li",{className:`flex w-full cursor-pointer justify-between p-4 text-start text-xl placeholder:text-[#C5C8CD] focus:outline-none disabled:opacity-50 ${v?"bg-[#E8E8E8]":"bg-[#F8F8F8]"} ${g&&"bg-[#D8D8D8]"}`,children:m.name})},m.name))})]})}),i&&N.jsx("p",{className:"mt-2 px-4 text-[#8B919A]",children:i})]})},Gb=({tabList:n,onTabChange:r})=>{const[t,e]=c.useState(n[0]),o=a=>{if(a<=1||a>4)throw new Error("[@petnow/ui/Tabs] Tab에 들어갈 수 있는 길이는 2~4개입니다.");return a===2?`absolute h-[2px] w-[50%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(t)===JSON.stringify(n[0])?"translate-x-[0%]":"translate-x-[100%]"}`:a===3?`absolute h-[2px] w-[33.3%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(t)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(t)===JSON.stringify(n[1])?"translate-x-[100%]":"translate-x-[200%]"}`:`absolute h-[2px] w-[25%] bg-petnowOrange transition-all duration-200 ${JSON.stringify(t)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(t)===JSON.stringify(n[1])?"translate-x-[100%]":JSON.stringify(t)===JSON.stringify(n[2])?"translate-x-[200%]":"translate-x-[300%]"}`};return N.jsxs("div",{className:"flex flex-col text-2xl font-bold",children:[N.jsx("div",{className:"flex",children:n.map(a=>N.jsx("div",{className:"flex flex-1 flex-col",children:N.jsx("button",{className:`py-5 hover:text-lightBlack ${JSON.stringify(a)===JSON.stringify(t)?"text-lightBlack":"text-[#8B919A]"}`,onClick:()=>{e(a),r(a)},children:a.displayName})},a.key))}),N.jsx("div",{className:"relative h-[2px] w-full bg-lightGray",children:N.jsx("div",{className:o(n.length)})})]})};De.AccordionCard=Am,De.Checkbox=Mm,De.CtaButton=ni,De.LabeledAddressInput=Nm,De.LabeledAutocomplete=qb,De.LabeledDatepicker=zb,De.LabeledSelect=Ub,De.Modal=Fm,De.Radio=Kb,De.Tabs=Gb,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})});
|
|
42
42
|
//# sourceMappingURL=index.umd.js.map
|