beesoft-components 0.10.1 → 0.10.2

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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ne,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(ne=typeof globalThis<"u"?globalThis:ne||self,p(ne.BeeSoftComponents={},ne.React,ne.ReactDOM))})(this,function(ne,p,Je){"use strict";var Lp=Object.defineProperty;var Ap=(ne,p,Je)=>p in ne?Lp(ne,p,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ne[p]=Je;var T=(ne,p,Je)=>Ap(ne,typeof p!="symbol"?p+"":p,Je);function ki(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const or=ki(p);function rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jr={exports:{}},ir={};/**
1
+ (function(se,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],h):(se=typeof globalThis<"u"?globalThis:se||self,h(se.BeeSoftComponents={},se.React,se.ReactDOM))})(this,function(se,h,Xe){"use strict";var Yp=Object.defineProperty;var Wp=(se,h,Xe)=>h in se?Yp(se,h,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):se[h]=Xe;var T=(se,h,Xe)=>Wp(se,typeof h!="symbol"?h+"":h,Xe);function Ei(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const cr=Ei(h);function en(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr={exports:{}},ur={};/**
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 ss;function Ci(){if(ss)return ir;ss=1;var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,h){var f,v={},P=null,l=null;h!==void 0&&(P=""+h),u.key!==void 0&&(P=""+u.key),u.ref!==void 0&&(l=u.ref);for(f in u)n.call(u,f)&&!o.hasOwnProperty(f)&&(v[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)v[f]===void 0&&(v[f]=u[f]);return{$$typeof:t,type:c,key:P,ref:l,props:v,_owner:s.current}}return ir.Fragment=r,ir.jsx=i,ir.jsxs=i,ir}var ar={};/**
9
+ */var ss;function ki(){if(ss)return ur;ss=1;var e=h,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,p){var d,b={},x=null,l=null;p!==void 0&&(x=""+p),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(l=u.ref);for(d in u)n.call(u,d)&&!o.hasOwnProperty(d)&&(b[d]=u[d]);if(c&&c.defaultProps)for(d in u=c.defaultProps,u)b[d]===void 0&&(b[d]=u[d]);return{$$typeof:t,type:c,key:x,ref:l,props:b,_owner:s.current}}return ur.Fragment=r,ur.jsx=i,ur.jsxs=i,ur}var lr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,24 +14,24 @@
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 os;function Di(){return os||(os=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),d=Symbol.iterator,b="@@iterator";function x(a){if(a===null||typeof a!="object")return null;var m=d&&a[d]||a[b];return typeof m=="function"?m:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(a){{for(var m=arguments.length,w=new Array(m>1?m-1:0),j=1;j<m;j++)w[j-1]=arguments[j];V("error",a,w)}}function V(a,m,w){{var j=y.ReactDebugCurrentFrame,G=j.getStackAddendum();G!==""&&(m+="%s",w=w.concat([G]));var X=w.map(function(B){return String(B)});X.unshift("Warning: "+m),Function.prototype.apply.call(console[a],console,X)}}var R=!1,S=!1,$=!1,O=!1,q=!1,z;z=Symbol.for("react.module.reference");function se(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||q||a===s||a===h||a===f||O||a===l||R||S||$||typeof a=="object"&&a!==null&&(a.$$typeof===P||a.$$typeof===v||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===z||a.getModuleId!==void 0))}function ae(a,m,w){var j=a.displayName;if(j)return j;var G=m.displayName||m.name||"";return G!==""?w+"("+G+")":w}function re(a){return a.displayName||"Context"}function K(a){if(a==null)return null;if(typeof a.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var m=a;return re(m)+".Consumer";case i:var w=a;return re(w._context)+".Provider";case u:return ae(a,a.render,"ForwardRef");case v:var j=a.displayName||null;return j!==null?j:K(a.type)||"Memo";case P:{var G=a,X=G._payload,B=G._init;try{return K(B(X))}catch{return null}}}return null}var L=Object.assign,F=0,C,Q,I,he,k,M,N;function _(){}_.__reactDisabledLog=!0;function W(){{if(F===0){C=console.log,Q=console.info,I=console.warn,he=console.error,k=console.group,M=console.groupCollapsed,N=console.groupEnd;var a={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}F++}}function J(){{if(F--,F===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},a,{value:C}),info:L({},a,{value:Q}),warn:L({},a,{value:I}),error:L({},a,{value:he}),group:L({},a,{value:k}),groupCollapsed:L({},a,{value:M}),groupEnd:L({},a,{value:N})})}F<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=y.ReactCurrentDispatcher,U;function Z(a,m,w){{if(U===void 0)try{throw Error()}catch(G){var j=G.stack.trim().match(/\n( *(at )?)/);U=j&&j[1]||""}return`
18
- `+U+a}}var te=!1,D;{var ie=typeof WeakMap=="function"?WeakMap:Map;D=new ie}function A(a,m){if(!a||te)return"";{var w=D.get(a);if(w!==void 0)return w}var j;te=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=H.current,H.current=null,W();try{if(m){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(ve){j=ve}Reflect.construct(a,[],B)}else{try{B.call()}catch(ve){j=ve}a.call(B.prototype)}}else{try{throw Error()}catch(ve){j=ve}a()}}catch(ve){if(ve&&j&&typeof ve.stack=="string"){for(var Y=ve.stack.split(`
19
- `),ge=j.stack.split(`
20
- `),oe=Y.length-1,ce=ge.length-1;oe>=1&&ce>=0&&Y[oe]!==ge[ce];)ce--;for(;oe>=1&&ce>=0;oe--,ce--)if(Y[oe]!==ge[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,ce<0||Y[oe]!==ge[ce]){var _e=`
21
- `+Y[oe].replace(" at new "," at ");return a.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",a.displayName)),typeof a=="function"&&D.set(a,_e),_e}while(oe>=1&&ce>=0);break}}}finally{te=!1,H.current=X,J(),Error.prepareStackTrace=G}var ze=a?a.displayName||a.name:"",We=ze?Z(ze):"";return typeof a=="function"&&D.set(a,We),We}function Ne(a,m,w){return A(a,!1)}function qe(a){var m=a.prototype;return!!(m&&m.isReactComponent)}function Le(a,m,w){if(a==null)return"";if(typeof a=="function")return A(a,qe(a));if(typeof a=="string")return Z(a);switch(a){case h:return Z("Suspense");case f:return Z("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return Ne(a.render);case v:return Le(a.type,m,w);case P:{var j=a,G=j._payload,X=j._init;try{return Le(X(G),m,w)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,ot={},Ge=y.ReactDebugCurrentFrame;function Ve(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);Ge.setExtraStackFrame(w)}else Ge.setExtraStackFrame(null)}function Kt(a,m,w,j,G){{var X=Function.call.bind(Ye);for(var B in a)if(X(a,B)){var Y=void 0;try{if(typeof a[B]!="function"){var ge=Error((j||"React class")+": "+w+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}Y=a[B](m,B,j,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){Y=oe}Y&&!(Y instanceof Error)&&(Ve(G),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",w,B,typeof Y),Ve(null)),Y instanceof Error&&!(Y.message in ot)&&(ot[Y.message]=!0,Ve(G),E("Failed %s type: %s",w,Y.message),Ve(null))}}}var Zt=Array.isArray;function Qe(a){return Zt(a)}function Gt(a){{var m=typeof Symbol=="function"&&Symbol.toStringTag,w=m&&a[Symbol.toStringTag]||a.constructor.name||"Object";return w}}function Qt(a){try{return Ot(a),!1}catch{return!0}}function Ot(a){return""+a}function it(a){if(Qt(a))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gt(a)),Ot(a)}var at=y.ReactCurrentOwner,Cr={key:!0,ref:!0,__self:!0,__source:!0},Xe,Nt;function en(a){if(Ye.call(a,"ref")){var m=Object.getOwnPropertyDescriptor(a,"ref").get;if(m&&m.isReactWarning)return!1}return a.ref!==void 0}function Dr(a){if(Ye.call(a,"key")){var m=Object.getOwnPropertyDescriptor(a,"key").get;if(m&&m.isReactWarning)return!1}return a.key!==void 0}function Xt(a,m){typeof a.ref=="string"&&at.current}function Jt(a,m){{var w=function(){Xe||(Xe=!0,E("%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)",m))};w.isReactWarning=!0,Object.defineProperty(a,"key",{get:w,configurable:!0})}}function tn(a,m){{var w=function(){Nt||(Nt=!0,E("%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)",m))};w.isReactWarning=!0,Object.defineProperty(a,"ref",{get:w,configurable:!0})}}var er=function(a,m,w,j,G,X,B){var Y={$$typeof:t,type:a,key:m,ref:w,props:B,_owner:X};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function jt(a,m,w,j,G){{var X,B={},Y=null,ge=null;w!==void 0&&(it(w),Y=""+w),Dr(m)&&(it(m.key),Y=""+m.key),en(m)&&(ge=m.ref,Xt(m,G));for(X in m)Ye.call(m,X)&&!Cr.hasOwnProperty(X)&&(B[X]=m[X]);if(a&&a.defaultProps){var oe=a.defaultProps;for(X in oe)B[X]===void 0&&(B[X]=oe[X])}if(Y||ge){var ce=typeof a=="function"?a.displayName||a.name||"Unknown":a;Y&&Jt(B,ce),ge&&tn(B,ce)}return er(a,Y,ge,G,j,at.current,B)}}var ee=y.ReactCurrentOwner,fe=y.ReactDebugCurrentFrame;function Ee(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);fe.setExtraStackFrame(w)}else fe.setExtraStackFrame(null)}var ct;ct=!1;function ut(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function xt(){{if(ee.current){var a=K(ee.current.type);if(a)return`
17
+ */var os;function Ci(){return os||(os=1,process.env.NODE_ENV!=="production"&&function(){var e=h,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),f=Symbol.iterator,m="@@iterator";function w(a){if(a===null||typeof a!="object")return null;var g=f&&a[f]||a[m];return typeof g=="function"?g:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(a){{for(var g=arguments.length,S=new Array(g>1?g-1:0),N=1;N<g;N++)S[N-1]=arguments[N];A("error",a,S)}}function A(a,g,S){{var N=v.ReactDebugCurrentFrame,X=N.getStackAddendum();X!==""&&(g+="%s",S=S.concat([X]));var J=S.map(function(z){return String(z)});J.unshift("Warning: "+g),Function.prototype.apply.call(console[a],console,J)}}var D=!1,E=!1,q=!1,R=!1,B=!1,H;H=Symbol.for("react.module.reference");function ne(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||B||a===s||a===p||a===d||R||a===l||D||E||q||typeof a=="object"&&a!==null&&(a.$$typeof===x||a.$$typeof===b||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===H||a.getModuleId!==void 0))}function oe(a,g,S){var N=a.displayName;if(N)return N;var X=g.displayName||g.name||"";return X!==""?S+"("+X+")":S}function W(a){return a.displayName||"Context"}function $(a){if(a==null)return null;if(typeof a.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case p:return"Suspense";case d:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var g=a;return W(g)+".Consumer";case i:var S=a;return W(S._context)+".Provider";case u:return oe(a,a.render,"ForwardRef");case b:var N=a.displayName||null;return N!==null?N:$(a.type)||"Memo";case x:{var X=a,J=X._payload,z=X._init;try{return $(z(J))}catch{return null}}}return null}var I=Object.assign,Z=0,F,Q,j,ue,k,M,_;function C(){}C.__reactDisabledLog=!0;function U(){{if(Z===0){F=console.log,Q=console.info,j=console.warn,ue=console.error,k=console.group,M=console.groupCollapsed,_=console.groupEnd;var a={configurable:!0,enumerable:!0,value:C,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}Z++}}function ee(){{if(Z--,Z===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},a,{value:F}),info:I({},a,{value:Q}),warn:I({},a,{value:j}),error:I({},a,{value:ue}),group:I({},a,{value:k}),groupCollapsed:I({},a,{value:M}),groupEnd:I({},a,{value:_})})}Z<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=v.ReactCurrentDispatcher,K;function G(a,g,S){{if(K===void 0)try{throw Error()}catch(X){var N=X.stack.trim().match(/\n( *(at )?)/);K=N&&N[1]||""}return`
18
+ `+K+a}}var re=!1,O;{var ae=typeof WeakMap=="function"?WeakMap:Map;O=new ae}function L(a,g){if(!a||re)return"";{var S=O.get(a);if(S!==void 0)return S}var N;re=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=Y.current,Y.current=null,U();try{if(g){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(xe){N=xe}Reflect.construct(a,[],z)}else{try{z.call()}catch(xe){N=xe}a.call(z.prototype)}}else{try{throw Error()}catch(xe){N=xe}a()}}catch(xe){if(xe&&N&&typeof xe.stack=="string"){for(var V=xe.stack.split(`
19
+ `),ge=N.stack.split(`
20
+ `),ie=V.length-1,ce=ge.length-1;ie>=1&&ce>=0&&V[ie]!==ge[ce];)ce--;for(;ie>=1&&ce>=0;ie--,ce--)if(V[ie]!==ge[ce]){if(ie!==1||ce!==1)do if(ie--,ce--,ce<0||V[ie]!==ge[ce]){var ke=`
21
+ `+V[ie].replace(" at new "," at ");return a.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",a.displayName)),typeof a=="function"&&O.set(a,ke),ke}while(ie>=1&&ce>=0);break}}}finally{re=!1,Y.current=J,ee(),Error.prepareStackTrace=X}var Ue=a?a.displayName||a.name:"",We=Ue?G(Ue):"";return typeof a=="function"&&O.set(a,We),We}function Ne(a,g,S){return L(a,!1)}function Be(a){var g=a.prototype;return!!(g&&g.isReactComponent)}function Re(a,g,S){if(a==null)return"";if(typeof a=="function")return L(a,Be(a));if(typeof a=="string")return G(a);switch(a){case p:return G("Suspense");case d:return G("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return Ne(a.render);case b:return Re(a.type,g,S);case x:{var N=a,X=N._payload,J=N._init;try{return Re(J(X),g,S)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,st={},Ze=v.ReactDebugCurrentFrame;function Ve(a){if(a){var g=a._owner,S=Re(a.type,a._source,g?g.type:null);Ze.setExtraStackFrame(S)}else Ze.setExtraStackFrame(null)}function Gt(a,g,S,N,X){{var J=Function.call.bind(Ye);for(var z in a)if(J(a,z)){var V=void 0;try{if(typeof a[z]!="function"){var ge=Error((N||"React class")+": "+S+" type `"+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}V=a[z](g,z,N,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ie){V=ie}V&&!(V instanceof Error)&&(Ve(X),P("%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).",N||"React class",S,z,typeof V),Ve(null)),V instanceof Error&&!(V.message in st)&&(st[V.message]=!0,Ve(X),P("Failed %s type: %s",S,V.message),Ve(null))}}}var Xt=Array.isArray;function Qe(a){return Xt(a)}function Jt(a){{var g=typeof Symbol=="function"&&Symbol.toStringTag,S=g&&a[Symbol.toStringTag]||a.constructor.name||"Object";return S}}function er(a){try{return Dt(a),!1}catch{return!0}}function Dt(a){return""+a}function ot(a){if(er(a))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jt(a)),Dt(a)}var it=v.ReactCurrentOwner,_r={key:!0,ref:!0,__self:!0,__source:!0},Ge,_t;function Xr(a){if(Ye.call(a,"ref")){var g=Object.getOwnPropertyDescriptor(a,"ref").get;if(g&&g.isReactWarning)return!1}return a.ref!==void 0}function Nr(a){if(Ye.call(a,"key")){var g=Object.getOwnPropertyDescriptor(a,"key").get;if(g&&g.isReactWarning)return!1}return a.key!==void 0}function tr(a,g){typeof a.ref=="string"&&it.current}function rr(a,g){{var S=function(){Ge||(Ge=!0,P("%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)",g))};S.isReactWarning=!0,Object.defineProperty(a,"key",{get:S,configurable:!0})}}function Jr(a,g){{var S=function(){_t||(_t=!0,P("%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)",g))};S.isReactWarning=!0,Object.defineProperty(a,"ref",{get:S,configurable:!0})}}var nr=function(a,g,S,N,X,J,z){var V={$$typeof:t,type:a,key:g,ref:S,props:z,_owner:J};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function Nt(a,g,S,N,X){{var J,z={},V=null,ge=null;S!==void 0&&(ot(S),V=""+S),Nr(g)&&(ot(g.key),V=""+g.key),Xr(g)&&(ge=g.ref,tr(g,X));for(J in g)Ye.call(g,J)&&!_r.hasOwnProperty(J)&&(z[J]=g[J]);if(a&&a.defaultProps){var ie=a.defaultProps;for(J in ie)z[J]===void 0&&(z[J]=ie[J])}if(V||ge){var ce=typeof a=="function"?a.displayName||a.name||"Unknown":a;V&&rr(z,ce),ge&&Jr(z,ce)}return nr(a,V,ge,X,N,it.current,z)}}var te=v.ReactCurrentOwner,de=v.ReactDebugCurrentFrame;function Ee(a){if(a){var g=a._owner,S=Re(a.type,a._source,g?g.type:null);de.setExtraStackFrame(S)}else de.setExtraStackFrame(null)}var at;at=!1;function ct(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function yt(){{if(te.current){var a=$(te.current.type);if(a)return`
22
22
 
23
- Check the render method of \``+a+"`."}return""}}function tr(a){return""}var wt={};function rr(a){{var m=xt();if(!m){var w=typeof a=="string"?a:a.displayName||a.name;w&&(m=`
23
+ Check the render method of \``+a+"`."}return""}}function sr(a){return""}var vt={};function or(a){{var g=yt();if(!g){var S=typeof a=="string"?a:a.displayName||a.name;S&&(g=`
24
24
 
25
- Check the top-level render call using <`+w+">.")}return m}}function Pt(a,m){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var w=rr(m);if(wt[w])return;wt[w]=!0;var j="";a&&a._owner&&a._owner!==ee.current&&(j=" It was passed a child from "+K(a._owner.type)+"."),Ee(a),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,j),Ee(null)}}function Tt(a,m){{if(typeof a!="object")return;if(Qe(a))for(var w=0;w<a.length;w++){var j=a[w];ut(j)&&Pt(j,m)}else if(ut(a))a._store&&(a._store.validated=!0);else if(a){var G=x(a);if(typeof G=="function"&&G!==a.entries)for(var X=G.call(a),B;!(B=X.next()).done;)ut(B.value)&&Pt(B.value,m)}}}function nr(a){{var m=a.type;if(m==null||typeof m=="string")return;var w;if(typeof m=="function")w=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===u||m.$$typeof===v))w=m.propTypes;else return;if(w){var j=K(m);Kt(w,a.props,"prop",j,a)}else if(m.PropTypes!==void 0&&!ct){ct=!0;var G=K(m);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(a){{for(var m=Object.keys(a.props),w=0;w<m.length;w++){var j=m[w];if(j!=="children"&&j!=="key"){Ee(a),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),Ee(null);break}}a.ref!==null&&(Ee(a),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var Or={};function Nr(a,m,w,j,G,X){{var B=se(a);if(!B){var Y="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(Y+=" 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 ge=tr();ge?Y+=ge:Y+=xt();var oe;a===null?oe="null":Qe(a)?oe="array":a!==void 0&&a.$$typeof===t?(oe="<"+(K(a.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof a,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,Y)}var ce=jt(a,m,w,G,X);if(ce==null)return ce;if(B){var _e=m.children;if(_e!==void 0)if(j)if(Qe(_e)){for(var ze=0;ze<_e.length;ze++)Tt(_e[ze],a);Object.freeze&&Object.freeze(_e)}else E("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 Tt(_e,a)}if(Ye.call(m,"key")){var We=K(a),ve=Object.keys(m).filter(function(ns){return ns!=="key"}),It=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!Or[We+It]){var rs=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+S+">.")}return g}}function xt(a,g){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var S=or(g);if(vt[S])return;vt[S]=!0;var N="";a&&a._owner&&a._owner!==te.current&&(N=" It was passed a child from "+$(a._owner.type)+"."),Ee(a),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,N),Ee(null)}}function wt(a,g){{if(typeof a!="object")return;if(Qe(a))for(var S=0;S<a.length;S++){var N=a[S];ct(N)&&xt(N,g)}else if(ct(a))a._store&&(a._store.validated=!0);else if(a){var X=w(a);if(typeof X=="function"&&X!==a.entries)for(var J=X.call(a),z;!(z=J.next()).done;)ct(z.value)&&xt(z.value,g)}}}function ir(a){{var g=a.type;if(g==null||typeof g=="string")return;var S;if(typeof g=="function")S=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===u||g.$$typeof===b))S=g.propTypes;else return;if(S){var N=$(g);Gt(S,a.props,"prop",N,a)}else if(g.PropTypes!==void 0&&!at){at=!0;var X=$(g);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(a){{for(var g=Object.keys(a.props),S=0;S<g.length;S++){var N=g[S];if(N!=="children"&&N!=="key"){Ee(a),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),Ee(null);break}}a.ref!==null&&(Ee(a),P("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var jr={};function Ir(a,g,S,N,X,J){{var z=ne(a);if(!z){var V="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(V+=" 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 ge=sr();ge?V+=ge:V+=yt();var ie;a===null?ie="null":Qe(a)?ie="array":a!==void 0&&a.$$typeof===t?(ie="<"+($(a.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof a,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,V)}var ce=Nt(a,g,S,X,J);if(ce==null)return ce;if(z){var ke=g.children;if(ke!==void 0)if(N)if(Qe(ke)){for(var Ue=0;Ue<ke.length;Ue++)wt(ke[Ue],a);Object.freeze&&Object.freeze(ke)}else P("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 wt(ke,a)}if(Ye.call(g,"key")){var We=$(a),xe=Object.keys(g).filter(function(ns){return ns!=="key"}),jt=xe.length>0?"{key: someKey, "+xe.join(": ..., ")+": ...}":"{key: someKey}";if(!jr[We+jt]){var rs=xe.length>0?"{"+xe.join(": ..., ")+": ...}":"{}";P(`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} />`,It,We,rs,We),Or[We+It]=!0}}return a===n?sr(ce):nr(ce),ce}}function Xn(a,m,w){return Nr(a,m,w,!0)}function Jn(a,m,w){return Nr(a,m,w,!1)}var es=Jn,ts=Xn;ar.Fragment=n,ar.jsx=es,ar.jsxs=ts}()),ar}var is;function Oi(){return is||(is=1,process.env.NODE_ENV==="production"?jr.exports=Ci():jr.exports=Di()),jr.exports}var g=Oi();const as=p.createContext(void 0),cs=()=>p.useContext(as),Ni=({overlayKeepOnScreen:e=!0,useAnimations:t=!0,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o,children:i})=>{const c={overlayKeepOnScreen:e,useAnimations:t,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o};return g.jsx(as.Provider,{value:c,children:i})};var $e=(e=>(e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal",e))($e||{}),Be=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e))(Be||{}),nn={exports:{}};/*!
30
+ <%s key={someKey} {...props} />`,jt,We,rs,We),jr[We+jt]=!0}}return a===n?ar(ce):ir(ce),ce}}function Xn(a,g,S){return Ir(a,g,S,!0)}function Jn(a,g,S){return Ir(a,g,S,!1)}var es=Jn,ts=Xn;lr.Fragment=n,lr.jsx=es,lr.jsxs=ts}()),lr}var is;function Oi(){return is||(is=1,process.env.NODE_ENV==="production"?Mr.exports=ki():Mr.exports=Ci()),Mr.exports}var y=Oi();const as=h.createContext(void 0),cs=()=>h.useContext(as),Di=({overlayKeepOnScreen:e=!0,useAnimations:t=!0,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o,children:i})=>{const c={overlayKeepOnScreen:e,useAnimations:t,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o};return y.jsx(as.Provider,{value:c,children:i})};var Ae=(e=>(e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal",e))(Ae||{}),ze=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e))(ze||{}),tn={exports:{}};/*!
31
31
  Copyright (c) 2018 Jed Watson.
32
32
  Licensed under the MIT License (MIT), see
33
33
  http://jedwatson.github.io/classnames
34
- */var us;function ji(){return us||(us=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(nn)),nn.exports}var Ii=ji();const de=rn(Ii);var cr=(e=>(e[e.Focus=0]="Focus",e[e.FocusWithin=1]="FocusWithin",e))(cr||{});const Ir=(e=1)=>p.useMemo(()=>de("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":e===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":e===0}),[e]),Mi=(e,t)=>{const r=p.useRef(null),{buttonType:n,buttonStyle:s="flat",type:o="button",disabled:i=!1,form:c,fullWidth:u=!1,onClick:h,className:f,children:v}=e,P=()=>{h==null||h()},l=()=>{var x;(x=r.current)==null||x.click()};p.useImperativeHandle(t,()=>({click:l}));const d=Ir(cr.Focus),b=de("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",d,{"bsc:w-full":u,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":i,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":n==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":n==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":n==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":n==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":n==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":n==="error","bsc:rounded-md":s==="curved","bsc:rounded-full bsc:px-4!":s==="round"},f);return g.jsx("button",{ref:r,type:o,onClick:P,disabled:i,form:c,className:b,children:v})},et=p.forwardRef(Mi);var sn={exports:{}},ur={};/**
34
+ */var us;function _i(){return us||(us=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(tn)),tn.exports}var Ni=_i();const he=en(Ni);var It=(e=>(e[e.Focus=0]="Focus",e[e.FocusWithin=1]="FocusWithin",e))(It||{});const fr=(e=1)=>h.useMemo(()=>he("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":e===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":e===0}),[e]),ji=(e,t)=>{const r=h.useRef(null),{buttonType:n,buttonStyle:s="flat",type:o="button",disabled:i=!1,form:c,fullWidth:u=!1,onClick:p,className:d,children:b}=e,x=()=>{p==null||p()},l=()=>{var w;(w=r.current)==null||w.click()};h.useImperativeHandle(t,()=>({click:l}));const f=fr(It.Focus),m=he("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",f,{"bsc:w-full":u,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":i,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":n==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":n==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":n==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":n==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":n==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":n==="error","bsc:rounded-md":s==="curved","bsc:rounded-full bsc:px-4!":s==="round"},d);return y.jsx("button",{ref:r,type:o,onClick:x,disabled:i,form:c,className:m,children:b})},Je=h.forwardRef(ji);var rn={exports:{}},dr={};/**
35
35
  * @license React
36
36
  * react-jsx-runtime.production.min.js
37
37
  *
@@ -39,7 +39,7 @@ React keys must be passed directly to JSX without using spread:
39
39
  *
40
40
  * This source code is licensed under the MIT license found in the
41
41
  * LICENSE file in the root directory of this source tree.
42
- */var ls;function Ri(){if(ls)return ur;ls=1;var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,h){var f,v={},P=null,l=null;h!==void 0&&(P=""+h),u.key!==void 0&&(P=""+u.key),u.ref!==void 0&&(l=u.ref);for(f in u)n.call(u,f)&&!o.hasOwnProperty(f)&&(v[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)v[f]===void 0&&(v[f]=u[f]);return{$$typeof:t,type:c,key:P,ref:l,props:v,_owner:s.current}}return ur.Fragment=r,ur.jsx=i,ur.jsxs=i,ur}var Mr={};/**
42
+ */var ls;function Ii(){if(ls)return dr;ls=1;var e=h,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,p){var d,b={},x=null,l=null;p!==void 0&&(x=""+p),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(l=u.ref);for(d in u)n.call(u,d)&&!o.hasOwnProperty(d)&&(b[d]=u[d]);if(c&&c.defaultProps)for(d in u=c.defaultProps,u)b[d]===void 0&&(b[d]=u[d]);return{$$typeof:t,type:c,key:x,ref:l,props:b,_owner:s.current}}return dr.Fragment=r,dr.jsx=i,dr.jsxs=i,dr}var Rr={};/**
43
43
  * @license React
44
44
  * react-jsx-runtime.development.js
45
45
  *
@@ -47,40 +47,56 @@ React keys must be passed directly to JSX without using spread:
47
47
  *
48
48
  * This source code is licensed under the MIT license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
- */var fs;function Li(){return fs||(fs=1,process.env.NODE_ENV!=="production"&&function(){var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),d=Symbol.iterator,b="@@iterator";function x(a){if(a===null||typeof a!="object")return null;var m=d&&a[d]||a[b];return typeof m=="function"?m:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(a){{for(var m=arguments.length,w=new Array(m>1?m-1:0),j=1;j<m;j++)w[j-1]=arguments[j];V("error",a,w)}}function V(a,m,w){{var j=y.ReactDebugCurrentFrame,G=j.getStackAddendum();G!==""&&(m+="%s",w=w.concat([G]));var X=w.map(function(B){return String(B)});X.unshift("Warning: "+m),Function.prototype.apply.call(console[a],console,X)}}var R=!1,S=!1,$=!1,O=!1,q=!1,z;z=Symbol.for("react.module.reference");function se(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||q||a===s||a===h||a===f||O||a===l||R||S||$||typeof a=="object"&&a!==null&&(a.$$typeof===P||a.$$typeof===v||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===z||a.getModuleId!==void 0))}function ae(a,m,w){var j=a.displayName;if(j)return j;var G=m.displayName||m.name||"";return G!==""?w+"("+G+")":w}function re(a){return a.displayName||"Context"}function K(a){if(a==null)return null;if(typeof a.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var m=a;return re(m)+".Consumer";case i:var w=a;return re(w._context)+".Provider";case u:return ae(a,a.render,"ForwardRef");case v:var j=a.displayName||null;return j!==null?j:K(a.type)||"Memo";case P:{var G=a,X=G._payload,B=G._init;try{return K(B(X))}catch{return null}}}return null}var L=Object.assign,F=0,C,Q,I,he,k,M,N;function _(){}_.__reactDisabledLog=!0;function W(){{if(F===0){C=console.log,Q=console.info,I=console.warn,he=console.error,k=console.group,M=console.groupCollapsed,N=console.groupEnd;var a={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}F++}}function J(){{if(F--,F===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},a,{value:C}),info:L({},a,{value:Q}),warn:L({},a,{value:I}),error:L({},a,{value:he}),group:L({},a,{value:k}),groupCollapsed:L({},a,{value:M}),groupEnd:L({},a,{value:N})})}F<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=y.ReactCurrentDispatcher,U;function Z(a,m,w){{if(U===void 0)try{throw Error()}catch(G){var j=G.stack.trim().match(/\n( *(at )?)/);U=j&&j[1]||""}return`
51
- `+U+a}}var te=!1,D;{var ie=typeof WeakMap=="function"?WeakMap:Map;D=new ie}function A(a,m){if(!a||te)return"";{var w=D.get(a);if(w!==void 0)return w}var j;te=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=H.current,H.current=null,W();try{if(m){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(ve){j=ve}Reflect.construct(a,[],B)}else{try{B.call()}catch(ve){j=ve}a.call(B.prototype)}}else{try{throw Error()}catch(ve){j=ve}a()}}catch(ve){if(ve&&j&&typeof ve.stack=="string"){for(var Y=ve.stack.split(`
52
- `),ge=j.stack.split(`
53
- `),oe=Y.length-1,ce=ge.length-1;oe>=1&&ce>=0&&Y[oe]!==ge[ce];)ce--;for(;oe>=1&&ce>=0;oe--,ce--)if(Y[oe]!==ge[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,ce<0||Y[oe]!==ge[ce]){var _e=`
54
- `+Y[oe].replace(" at new "," at ");return a.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",a.displayName)),typeof a=="function"&&D.set(a,_e),_e}while(oe>=1&&ce>=0);break}}}finally{te=!1,H.current=X,J(),Error.prepareStackTrace=G}var ze=a?a.displayName||a.name:"",We=ze?Z(ze):"";return typeof a=="function"&&D.set(a,We),We}function Ne(a,m,w){return A(a,!1)}function qe(a){var m=a.prototype;return!!(m&&m.isReactComponent)}function Le(a,m,w){if(a==null)return"";if(typeof a=="function")return A(a,qe(a));if(typeof a=="string")return Z(a);switch(a){case h:return Z("Suspense");case f:return Z("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return Ne(a.render);case v:return Le(a.type,m,w);case P:{var j=a,G=j._payload,X=j._init;try{return Le(X(G),m,w)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,ot={},Ge=y.ReactDebugCurrentFrame;function Ve(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);Ge.setExtraStackFrame(w)}else Ge.setExtraStackFrame(null)}function Kt(a,m,w,j,G){{var X=Function.call.bind(Ye);for(var B in a)if(X(a,B)){var Y=void 0;try{if(typeof a[B]!="function"){var ge=Error((j||"React class")+": "+w+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}Y=a[B](m,B,j,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){Y=oe}Y&&!(Y instanceof Error)&&(Ve(G),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",w,B,typeof Y),Ve(null)),Y instanceof Error&&!(Y.message in ot)&&(ot[Y.message]=!0,Ve(G),E("Failed %s type: %s",w,Y.message),Ve(null))}}}var Zt=Array.isArray;function Qe(a){return Zt(a)}function Gt(a){{var m=typeof Symbol=="function"&&Symbol.toStringTag,w=m&&a[Symbol.toStringTag]||a.constructor.name||"Object";return w}}function Qt(a){try{return Ot(a),!1}catch{return!0}}function Ot(a){return""+a}function it(a){if(Qt(a))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gt(a)),Ot(a)}var at=y.ReactCurrentOwner,Cr={key:!0,ref:!0,__self:!0,__source:!0},Xe,Nt;function en(a){if(Ye.call(a,"ref")){var m=Object.getOwnPropertyDescriptor(a,"ref").get;if(m&&m.isReactWarning)return!1}return a.ref!==void 0}function Dr(a){if(Ye.call(a,"key")){var m=Object.getOwnPropertyDescriptor(a,"key").get;if(m&&m.isReactWarning)return!1}return a.key!==void 0}function Xt(a,m){typeof a.ref=="string"&&at.current}function Jt(a,m){{var w=function(){Xe||(Xe=!0,E("%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)",m))};w.isReactWarning=!0,Object.defineProperty(a,"key",{get:w,configurable:!0})}}function tn(a,m){{var w=function(){Nt||(Nt=!0,E("%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)",m))};w.isReactWarning=!0,Object.defineProperty(a,"ref",{get:w,configurable:!0})}}var er=function(a,m,w,j,G,X,B){var Y={$$typeof:t,type:a,key:m,ref:w,props:B,_owner:X};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function jt(a,m,w,j,G){{var X,B={},Y=null,ge=null;w!==void 0&&(it(w),Y=""+w),Dr(m)&&(it(m.key),Y=""+m.key),en(m)&&(ge=m.ref,Xt(m));for(X in m)Ye.call(m,X)&&!Cr.hasOwnProperty(X)&&(B[X]=m[X]);if(a&&a.defaultProps){var oe=a.defaultProps;for(X in oe)B[X]===void 0&&(B[X]=oe[X])}if(Y||ge){var ce=typeof a=="function"?a.displayName||a.name||"Unknown":a;Y&&Jt(B,ce),ge&&tn(B,ce)}return er(a,Y,ge,G,j,at.current,B)}}var ee=y.ReactCurrentOwner,fe=y.ReactDebugCurrentFrame;function Ee(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);fe.setExtraStackFrame(w)}else fe.setExtraStackFrame(null)}var ct;ct=!1;function ut(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function xt(){{if(ee.current){var a=K(ee.current.type);if(a)return`
50
+ */var fs;function Mi(){return fs||(fs=1,process.env.NODE_ENV!=="production"&&function(){var e=h,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),f=Symbol.iterator,m="@@iterator";function w(a){if(a===null||typeof a!="object")return null;var g=f&&a[f]||a[m];return typeof g=="function"?g:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(a){{for(var g=arguments.length,S=new Array(g>1?g-1:0),N=1;N<g;N++)S[N-1]=arguments[N];A("error",a,S)}}function A(a,g,S){{var N=v.ReactDebugCurrentFrame,X=N.getStackAddendum();X!==""&&(g+="%s",S=S.concat([X]));var J=S.map(function(z){return String(z)});J.unshift("Warning: "+g),Function.prototype.apply.call(console[a],console,J)}}var D=!1,E=!1,q=!1,R=!1,B=!1,H;H=Symbol.for("react.module.reference");function ne(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||B||a===s||a===p||a===d||R||a===l||D||E||q||typeof a=="object"&&a!==null&&(a.$$typeof===x||a.$$typeof===b||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===H||a.getModuleId!==void 0))}function oe(a,g,S){var N=a.displayName;if(N)return N;var X=g.displayName||g.name||"";return X!==""?S+"("+X+")":S}function W(a){return a.displayName||"Context"}function $(a){if(a==null)return null;if(typeof a.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case p:return"Suspense";case d:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var g=a;return W(g)+".Consumer";case i:var S=a;return W(S._context)+".Provider";case u:return oe(a,a.render,"ForwardRef");case b:var N=a.displayName||null;return N!==null?N:$(a.type)||"Memo";case x:{var X=a,J=X._payload,z=X._init;try{return $(z(J))}catch{return null}}}return null}var I=Object.assign,Z=0,F,Q,j,ue,k,M,_;function C(){}C.__reactDisabledLog=!0;function U(){{if(Z===0){F=console.log,Q=console.info,j=console.warn,ue=console.error,k=console.group,M=console.groupCollapsed,_=console.groupEnd;var a={configurable:!0,enumerable:!0,value:C,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}Z++}}function ee(){{if(Z--,Z===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},a,{value:F}),info:I({},a,{value:Q}),warn:I({},a,{value:j}),error:I({},a,{value:ue}),group:I({},a,{value:k}),groupCollapsed:I({},a,{value:M}),groupEnd:I({},a,{value:_})})}Z<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=v.ReactCurrentDispatcher,K;function G(a,g,S){{if(K===void 0)try{throw Error()}catch(X){var N=X.stack.trim().match(/\n( *(at )?)/);K=N&&N[1]||""}return`
51
+ `+K+a}}var re=!1,O;{var ae=typeof WeakMap=="function"?WeakMap:Map;O=new ae}function L(a,g){if(!a||re)return"";{var S=O.get(a);if(S!==void 0)return S}var N;re=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=Y.current,Y.current=null,U();try{if(g){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(xe){N=xe}Reflect.construct(a,[],z)}else{try{z.call()}catch(xe){N=xe}a.call(z.prototype)}}else{try{throw Error()}catch(xe){N=xe}a()}}catch(xe){if(xe&&N&&typeof xe.stack=="string"){for(var V=xe.stack.split(`
52
+ `),ge=N.stack.split(`
53
+ `),ie=V.length-1,ce=ge.length-1;ie>=1&&ce>=0&&V[ie]!==ge[ce];)ce--;for(;ie>=1&&ce>=0;ie--,ce--)if(V[ie]!==ge[ce]){if(ie!==1||ce!==1)do if(ie--,ce--,ce<0||V[ie]!==ge[ce]){var ke=`
54
+ `+V[ie].replace(" at new "," at ");return a.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",a.displayName)),typeof a=="function"&&O.set(a,ke),ke}while(ie>=1&&ce>=0);break}}}finally{re=!1,Y.current=J,ee(),Error.prepareStackTrace=X}var Ue=a?a.displayName||a.name:"",We=Ue?G(Ue):"";return typeof a=="function"&&O.set(a,We),We}function Ne(a,g,S){return L(a,!1)}function Be(a){var g=a.prototype;return!!(g&&g.isReactComponent)}function Re(a,g,S){if(a==null)return"";if(typeof a=="function")return L(a,Be(a));if(typeof a=="string")return G(a);switch(a){case p:return G("Suspense");case d:return G("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return Ne(a.render);case b:return Re(a.type,g,S);case x:{var N=a,X=N._payload,J=N._init;try{return Re(J(X),g,S)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,st={},Ze=v.ReactDebugCurrentFrame;function Ve(a){if(a){var g=a._owner,S=Re(a.type,a._source,g?g.type:null);Ze.setExtraStackFrame(S)}else Ze.setExtraStackFrame(null)}function Gt(a,g,S,N,X){{var J=Function.call.bind(Ye);for(var z in a)if(J(a,z)){var V=void 0;try{if(typeof a[z]!="function"){var ge=Error((N||"React class")+": "+S+" type `"+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}V=a[z](g,z,N,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ie){V=ie}V&&!(V instanceof Error)&&(Ve(X),P("%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).",N||"React class",S,z,typeof V),Ve(null)),V instanceof Error&&!(V.message in st)&&(st[V.message]=!0,Ve(X),P("Failed %s type: %s",S,V.message),Ve(null))}}}var Xt=Array.isArray;function Qe(a){return Xt(a)}function Jt(a){{var g=typeof Symbol=="function"&&Symbol.toStringTag,S=g&&a[Symbol.toStringTag]||a.constructor.name||"Object";return S}}function er(a){try{return Dt(a),!1}catch{return!0}}function Dt(a){return""+a}function ot(a){if(er(a))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jt(a)),Dt(a)}var it=v.ReactCurrentOwner,_r={key:!0,ref:!0,__self:!0,__source:!0},Ge,_t;function Xr(a){if(Ye.call(a,"ref")){var g=Object.getOwnPropertyDescriptor(a,"ref").get;if(g&&g.isReactWarning)return!1}return a.ref!==void 0}function Nr(a){if(Ye.call(a,"key")){var g=Object.getOwnPropertyDescriptor(a,"key").get;if(g&&g.isReactWarning)return!1}return a.key!==void 0}function tr(a,g){typeof a.ref=="string"&&it.current}function rr(a,g){{var S=function(){Ge||(Ge=!0,P("%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)",g))};S.isReactWarning=!0,Object.defineProperty(a,"key",{get:S,configurable:!0})}}function Jr(a,g){{var S=function(){_t||(_t=!0,P("%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)",g))};S.isReactWarning=!0,Object.defineProperty(a,"ref",{get:S,configurable:!0})}}var nr=function(a,g,S,N,X,J,z){var V={$$typeof:t,type:a,key:g,ref:S,props:z,_owner:J};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function Nt(a,g,S,N,X){{var J,z={},V=null,ge=null;S!==void 0&&(ot(S),V=""+S),Nr(g)&&(ot(g.key),V=""+g.key),Xr(g)&&(ge=g.ref,tr(g));for(J in g)Ye.call(g,J)&&!_r.hasOwnProperty(J)&&(z[J]=g[J]);if(a&&a.defaultProps){var ie=a.defaultProps;for(J in ie)z[J]===void 0&&(z[J]=ie[J])}if(V||ge){var ce=typeof a=="function"?a.displayName||a.name||"Unknown":a;V&&rr(z,ce),ge&&Jr(z,ce)}return nr(a,V,ge,X,N,it.current,z)}}var te=v.ReactCurrentOwner,de=v.ReactDebugCurrentFrame;function Ee(a){if(a){var g=a._owner,S=Re(a.type,a._source,g?g.type:null);de.setExtraStackFrame(S)}else de.setExtraStackFrame(null)}var at;at=!1;function ct(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function yt(){{if(te.current){var a=$(te.current.type);if(a)return`
55
55
 
56
- Check the render method of \``+a+"`."}return""}}function tr(a){return""}var wt={};function rr(a){{var m=xt();if(!m){var w=typeof a=="string"?a:a.displayName||a.name;w&&(m=`
56
+ Check the render method of \``+a+"`."}return""}}function sr(a){return""}var vt={};function or(a){{var g=yt();if(!g){var S=typeof a=="string"?a:a.displayName||a.name;S&&(g=`
57
57
 
58
- Check the top-level render call using <`+w+">.")}return m}}function Pt(a,m){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var w=rr(m);if(wt[w])return;wt[w]=!0;var j="";a&&a._owner&&a._owner!==ee.current&&(j=" It was passed a child from "+K(a._owner.type)+"."),Ee(a),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,j),Ee(null)}}function Tt(a,m){{if(typeof a!="object")return;if(Qe(a))for(var w=0;w<a.length;w++){var j=a[w];ut(j)&&Pt(j,m)}else if(ut(a))a._store&&(a._store.validated=!0);else if(a){var G=x(a);if(typeof G=="function"&&G!==a.entries)for(var X=G.call(a),B;!(B=X.next()).done;)ut(B.value)&&Pt(B.value,m)}}}function nr(a){{var m=a.type;if(m==null||typeof m=="string")return;var w;if(typeof m=="function")w=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===u||m.$$typeof===v))w=m.propTypes;else return;if(w){var j=K(m);Kt(w,a.props,"prop",j,a)}else if(m.PropTypes!==void 0&&!ct){ct=!0;var G=K(m);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(a){{for(var m=Object.keys(a.props),w=0;w<m.length;w++){var j=m[w];if(j!=="children"&&j!=="key"){Ee(a),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),Ee(null);break}}a.ref!==null&&(Ee(a),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var Or={};function Nr(a,m,w,j,G,X){{var B=se(a);if(!B){var Y="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(Y+=" 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 ge=tr();ge?Y+=ge:Y+=xt();var oe;a===null?oe="null":Qe(a)?oe="array":a!==void 0&&a.$$typeof===t?(oe="<"+(K(a.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof a,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,Y)}var ce=jt(a,m,w,G,X);if(ce==null)return ce;if(B){var _e=m.children;if(_e!==void 0)if(j)if(Qe(_e)){for(var ze=0;ze<_e.length;ze++)Tt(_e[ze],a);Object.freeze&&Object.freeze(_e)}else E("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 Tt(_e,a)}if(Ye.call(m,"key")){var We=K(a),ve=Object.keys(m).filter(function(ns){return ns!=="key"}),It=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!Or[We+It]){var rs=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
58
+ Check the top-level render call using <`+S+">.")}return g}}function xt(a,g){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var S=or(g);if(vt[S])return;vt[S]=!0;var N="";a&&a._owner&&a._owner!==te.current&&(N=" It was passed a child from "+$(a._owner.type)+"."),Ee(a),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,N),Ee(null)}}function wt(a,g){{if(typeof a!="object")return;if(Qe(a))for(var S=0;S<a.length;S++){var N=a[S];ct(N)&&xt(N,g)}else if(ct(a))a._store&&(a._store.validated=!0);else if(a){var X=w(a);if(typeof X=="function"&&X!==a.entries)for(var J=X.call(a),z;!(z=J.next()).done;)ct(z.value)&&xt(z.value,g)}}}function ir(a){{var g=a.type;if(g==null||typeof g=="string")return;var S;if(typeof g=="function")S=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===u||g.$$typeof===b))S=g.propTypes;else return;if(S){var N=$(g);Gt(S,a.props,"prop",N,a)}else if(g.PropTypes!==void 0&&!at){at=!0;var X=$(g);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(a){{for(var g=Object.keys(a.props),S=0;S<g.length;S++){var N=g[S];if(N!=="children"&&N!=="key"){Ee(a),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),Ee(null);break}}a.ref!==null&&(Ee(a),P("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var jr={};function Ir(a,g,S,N,X,J){{var z=ne(a);if(!z){var V="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(V+=" 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 ge=sr();ge?V+=ge:V+=yt();var ie;a===null?ie="null":Qe(a)?ie="array":a!==void 0&&a.$$typeof===t?(ie="<"+($(a.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof a,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,V)}var ce=Nt(a,g,S,X,J);if(ce==null)return ce;if(z){var ke=g.children;if(ke!==void 0)if(N)if(Qe(ke)){for(var Ue=0;Ue<ke.length;Ue++)wt(ke[Ue],a);Object.freeze&&Object.freeze(ke)}else P("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 wt(ke,a)}if(Ye.call(g,"key")){var We=$(a),xe=Object.keys(g).filter(function(ns){return ns!=="key"}),jt=xe.length>0?"{key: someKey, "+xe.join(": ..., ")+": ...}":"{key: someKey}";if(!jr[We+jt]){var rs=xe.length>0?"{"+xe.join(": ..., ")+": ...}":"{}";P(`A props object containing a "key" prop is being spread into JSX:
59
59
  let props = %s;
60
60
  <%s {...props} />
61
61
  React keys must be passed directly to JSX without using spread:
62
62
  let props = %s;
63
- <%s key={someKey} {...props} />`,It,We,rs,We),Or[We+It]=!0}}return a===n?sr(ce):nr(ce),ce}}function Xn(a,m,w){return Nr(a,m,w,!0)}function Jn(a,m,w){return Nr(a,m,w,!1)}var es=Jn,ts=Xn;Mr.Fragment=n,Mr.jsx=es,Mr.jsxs=ts}()),Mr}var ds;function Ai(){return ds||(ds=1,process.env.NODE_ENV==="production"?sn.exports=Ri():sn.exports=Li()),sn.exports}var lt=Ai();function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $i=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const Hi=Fi($i),hs=e=>{const t=p.useRef();let r=!1;t.current!==void 0&&(r=!Hi(t.current,e));const n={changed:r,previousValue:t.current};return t.current=e,n},Yi=e=>typeof e=="function",Wi=e=>{const[t,r]=p.useState({value:e,initial:!0}),n=p.useRef(e);return[t,s=>{if(!Yi(s))r({value:s,initial:!1});else{const o=s(n.current);n.current=o,r({value:o,initial:!1})}}]},Vi=e=>{const[t,r]=Wi(e),n=p.useRef({value:e,initial:!0});return n.current!==t&&(n.current=t),[t,r,n]},ps=p.createContext(void 0),ms=()=>p.useContext(ps),Bi=({id:e,name:t,value:r,type:n,checked:s,readOnly:o,onChange:i})=>lt.jsx("input",{id:e,name:t,value:r,type:n,checked:s,onChange:i,readOnly:o,disabled:o,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function Ui(e){const t=Object.keys(e),r={};for(let n=0,s=t.length;n<s;n++){const o=t[n];if(o){const i=e[o],c=o.replace(/([A-Z])/g,u=>`-${u.toLowerCase()}`);typeof i=="boolean"?i&&(r[`data-${c}`]=!0):r[`data-${c}`]=e[o]}}return r}const on=({wrapperElement:e,renderProps:t,elementProps:r,innerWrapperElement:n,className:s,children:o})=>{if(typeof o=="function")return n?lt.jsxs(lt.Fragment,{children:[n,o(t)]}):o(t);{const i=n?lt.jsxs(lt.Fragment,{children:[n,o]}):o;return p.createElement(e,Object.assign({},t?Ui(t):{},r,{className:s}),i)}},qi=(e,t)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,readOnly:i,onChange:c,children:u,className:h}=e,f=ms(),v=p.useId(),P=p.useMemo(()=>(f==null?void 0:f.sharedId)||e.id||v,[(f==null?void 0:f.sharedId)||e.id||v]),[l,d,b]=Vi({checked:!1,partial:!1}),x=hs(s),y=hs(o);p.useEffect(()=>{if(l.initial)d({checked:o?!1:s,partial:o});else{const $=x.changed?s:l.value.checked,O=y.changed?o:l.value.partial;d({checked:O?!1:$,partial:O})}},[s,o]);const E=$=>{var O;const q=((O=b.current)==null?void 0:O.value.partial)===!0?!0:$.target.checked;d({checked:q,partial:!1}),c==null||c({originalEvent:$,name:r||$.target.name,value:n,checked:q})},V=$=>{var O;const q={checked:$?!1:((O=b.current)==null?void 0:O.value.checked)??!1,partial:$};d(q)},R=$=>{d({checked:$,partial:!1})};p.useImperativeHandle(t,()=>({setPartiallyChecked:V,setChecked:R}));const S=lt.jsx(Bi,{id:P,name:r,type:"checkbox",checked:l.value.checked,readOnly:i,onChange:E});return on({wrapperElement:"label",renderProps:{...l.value,readOnly:i},elementProps:{htmlFor:P},className:h,innerWrapperElement:S,children:u})},zi=p.memo(p.forwardRef(qi)),Ki=({className:e,children:t})=>{const r=p.useId(),n=p.useMemo(()=>({sharedId:r}),[r]),s=lt.jsx(ps.Provider,{value:n,children:t});return on({wrapperElement:"div",className:e,children:s})},Zi=({htmlFor:e,className:t,children:r})=>{const n=ms(),s=p.useMemo(()=>(n==null?void 0:n.sharedId)||e,[n==null?void 0:n.sharedId,e]);return on({wrapperElement:"label",elementProps:{htmlFor:s},className:t,children:r})};var lr,gs;lr={__e:function(e,t,r,n){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),i=s.__d),i)return s.__E=s}catch(c){e=c}throw e}},gs=function(e){return e!=null&&e.constructor==null},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var an,Ue,cn,bs,ys=0,vs=[],Me=lr,xs=Me.__b,ws=Me.__r,Ps=Me.diffed,Ts=Me.__c,Ss=Me.unmount,Es=Me.__;function Gi(e,t){Me.__h&&Me.__h(Ue,e,ys||t),ys=0;var r=Ue.__H||(Ue.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function _s(e,t){var r=Gi(an++,7);return Ji(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Qi(){for(var e;e=vs.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Rr),e.__H.__h.forEach(un),e.__H.__h=[]}catch(t){e.__H.__h=[],Me.__e(t,e.__v)}}Me.__b=function(e){Ue=null,xs&&xs(e)},Me.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Es&&Es(e,t)},Me.__r=function(e){ws&&ws(e),an=0;var t=(Ue=e.__c).__H;t&&(cn===Ue?(t.__h=[],Ue.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Rr),t.__h.forEach(un),t.__h=[],an=0)),cn=Ue},Me.diffed=function(e){Ps&&Ps(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(vs.push(t)!==1&&bs===Me.requestAnimationFrame||((bs=Me.requestAnimationFrame)||Xi)(Qi)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),cn=Ue=null},Me.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Rr),r.__h=r.__h.filter(function(n){return!n.__||un(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Me.__e(n,r.__v)}}),Ts&&Ts(e,t)},Me.unmount=function(e){Ss&&Ss(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Rr(n)}catch(s){t=s}}),r.__H=void 0,t&&Me.__e(t,r.__v))};var ks=typeof requestAnimationFrame=="function";function Xi(e){var t,r=function(){clearTimeout(n),ks&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ks&&(t=requestAnimationFrame(r))}function Rr(e){var t=Ue,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Ue=t}function un(e){var t=Ue;e.__c=e.__(),Ue=t}function Ji(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var ea=Symbol.for("preact-signals");function Lr(){if(mt>1)mt--;else{for(var e,t=!1;fr!==void 0;){var r=fr;for(fr=void 0,ln++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Os(r))try{r.c()}catch(s){t||(e=s,t=!0)}r=n}}if(ln=0,mt--,t)throw e}}function ta(e){if(mt>0)return e();mt++;try{return e()}finally{Lr()}}var xe=void 0,fr=void 0,mt=0,ln=0,Ar=0;function Cs(e){if(xe!==void 0){var t=e.n;if(t===void 0||t.t!==xe)return t={i:0,S:e,p:xe.s,n:void 0,t:xe,e:void 0,x:void 0,r:t},xe.s!==void 0&&(xe.s.n=t),xe.s=t,e.n=t,32&xe.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=xe.s,t.n=void 0,xe.s.n=t,xe.s=t),t}}function Ae(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}Ae.prototype.brand=ea,Ae.prototype.h=function(){return!0},Ae.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},Ae.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},Ae.prototype.subscribe=function(e){var t=this;return hr(function(){var r=t.value,n=xe;xe=void 0;try{e(r)}finally{xe=n}})},Ae.prototype.valueOf=function(){return this.value},Ae.prototype.toString=function(){return this.value+""},Ae.prototype.toJSON=function(){return this.value},Ae.prototype.peek=function(){var e=xe;xe=void 0;try{return this.value}finally{xe=e}},Object.defineProperty(Ae.prototype,"value",{get:function(){var e=Cs(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ln>100)throw new Error("Cycle detected");this.v=e,this.i++,Ar++,mt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Lr()}}}});function Ds(e){return new Ae(e)}function Os(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ns(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function js(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Mt(e){Ae.call(this,void 0),this.x=e,this.s=void 0,this.g=Ar-1,this.f=4}(Mt.prototype=new Ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ar))return!0;if(this.g=Ar,this.f|=1,this.i>0&&!Os(this))return this.f&=-2,!0;var e=xe;try{Ns(this),xe=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return xe=e,js(this),this.f&=-2,!0},Mt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Ae.prototype.S.call(this,e)},Mt.prototype.U=function(e){if(this.t!==void 0&&(Ae.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Mt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Mt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Cs(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Is(e){return new Mt(e)}function Ms(e){var t=e.u;if(e.u=void 0,typeof t=="function"){mt++;var r=xe;xe=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,fn(e),n}finally{xe=r,Lr()}}}function fn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ms(e)}function ra(e){if(xe!==this)throw new Error("Out-of-order effect");js(this),xe=e,this.f&=-2,8&this.f&&fn(this),Lr()}function dr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}dr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},dr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ms(this),Ns(this),mt++;var e=xe;return xe=this,ra.bind(this,e)},dr.prototype.N=function(){2&this.f||(this.f|=2,this.o=fr,fr=this)},dr.prototype.d=function(){this.f|=8,1&this.f||fn(this)};function hr(e){var t=new dr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Rs,dn,Ls=[];hr(function(){Rs=this.N})();function Rt(e,t){lr[e]=t.bind(null,lr[e]||function(){})}function Fr(e){dn&&dn(),dn=e&&e.S()}function As(e){var t=this,r=e.data,n=sa(r);n.value=r;var s=_s(function(){for(var c=t,u=t.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var h=Is(function(){var l=n.value.value;return l===0?0:l===!0?"":l||""}),f=Is(function(){return!Array.isArray(h.value)&&!gs(h.value)}),v=hr(function(){if(this.N=Fs,f.value){var l=h.value;c.__v&&c.__v.__e&&c.__v.__e.nodeType===3&&(c.__v.__e.data=l)}}),P=t.__$u.d;return t.__$u.d=function(){v(),P.call(this)},[f,h]},[]),o=s[0],i=s[1];return o.value?i.peek():i.value}As.displayName="_st",Object.defineProperties(Ae.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:As},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Rt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var s in n)if(s!=="children"){var o=n[s];o instanceof Ae&&(r||(t.__np=r={}),r[s]=o,n[s]=o.peek())}}e(t)}),Rt("__r",function(e,t){Fr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(s){var o;return hr(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Fr(r),e(t)}),Rt("__e",function(e,t,r,n){Fr(),e(t,r,n)}),Rt("diffed",function(e,t){Fr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,s=t.props;if(n){var o=r.U;if(o)for(var i in o){var c=o[i];c!==void 0&&!(i in n)&&(c.d(),o[i]=void 0)}else o={},r.U=o;for(var u in n){var h=o[u],f=n[u];h===void 0?(h=na(r,u,f,s),o[u]=h):h.o(f,s)}}}e(t)});function na(e,t,r,n){var s=t in e&&e.ownerSVGElement===void 0,o=Ds(r);return{o:function(i,c){o.value=i,n=c},d:hr(function(){this.N=Fs;var i=o.value.value;n[t]!==i&&(n[t]=i,s?e[t]=i:i?e.setAttribute(t,i):e.removeAttribute(t))})}}Rt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var s in n){var o=n[s];o&&o.d()}}}}else{var i=t.__c;if(i){var c=i.__$u;c&&(i.__$u=void 0,c.d())}}e(t)}),Rt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});function sa(e){return _s(function(){return Ds(e)},[])}var oa=function(e){queueMicrotask(function(){queueMicrotask(e)})};function ia(){ta(function(){for(var e;e=Ls.shift();)Rs.call(e)})}function Fs(){Ls.push(this)===1&&(lr.requestAnimationFrame||oa)(ia)}p.createContext(void 0);var $s={exports:{}};/*!
63
+ <%s key={someKey} {...props} />`,jt,We,rs,We),jr[We+jt]=!0}}return a===n?ar(ce):ir(ce),ce}}function Xn(a,g,S){return Ir(a,g,S,!0)}function Jn(a,g,S){return Ir(a,g,S,!1)}var es=Jn,ts=Xn;Rr.Fragment=n,Rr.jsx=es,Rr.jsxs=ts}()),Rr}var ds;function Ri(){return ds||(ds=1,process.env.NODE_ENV==="production"?rn.exports=Ii():rn.exports=Mi()),rn.exports}var Fe=Ri();function Li(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ai=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const Fi=Li(Ai),$i=()=>{throw new Error("useEvent should not be called before the component is mounted")},hr=e=>{const t=h.useRef($i);h.useInsertionEffect(()=>{t.current=e},[e]);const r=h.useRef(null);return r.current||(r.current=function(){var n;return(n=t.current)==null?void 0:n.apply(this,arguments)}),r.current},hs=e=>{const t=h.useRef();let r=!1;t.current!==void 0&&(r=!Fi(t.current,e));const n={changed:r,previousValue:t.current};return t.current=e,n},Hi=e=>typeof e=="function",Yi=e=>{const[t,r]=h.useState({value:e,initial:!0}),n=h.useRef(e);return[t,s=>{if(!Hi(s))r({value:s,initial:!1});else{const o=s(n.current);n.current=o,r({value:o,initial:!1})}}]},Wi=e=>{const[t,r]=Yi(e),n=h.useRef({value:e,initial:!0});return n.current!==t&&(n.current=t),[t,r,n]},ps=h.createContext(void 0),Lr=()=>h.useContext(ps),nn=({id:e,name:t,value:r,type:n,checked:s,readOnly:o,onChange:i})=>Fe.jsx("input",{id:e,name:t,value:r,type:n,checked:s,onChange:i,readOnly:o,disabled:o,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function Vi(e){const t=Object.keys(e),r={};for(let n=0,s=t.length;n<s;n++){const o=t[n];if(o){const i=e[o],c=o.replace(/([A-Z])/g,u=>`-${u.toLowerCase()}`);typeof i=="boolean"?i&&(r[`data-${c}`]=!0):r[`data-${c}`]=e[o]}}return r}const pr=({wrapperElement:e,renderProps:t,elementProps:r,innerWrapperElement:n,className:s,children:o})=>{if(typeof o=="function")return n?Fe.jsxs(Fe.Fragment,{children:[n,o(t)]}):o(t);{const i=n?Fe.jsxs(Fe.Fragment,{children:[n,o]}):o;return h.createElement(e,Object.assign({},t?Vi(t):{},r,{className:s}),i)}};var Bi=Symbol.for("preact-signals");function sn(){if(Mt>1)Mt--;else{for(var e,t=!1;mr!==void 0;){var r=mr;for(mr=void 0,on++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&bs(r))try{r.c()}catch(s){t||(e=s,t=!0)}r=n}}if(on=0,Mt--,t)throw e}}var be=void 0;function ms(e){var t=be;be=void 0;try{return e()}finally{be=t}}var mr=void 0,Mt=0,on=0,Ar=0;function gs(e){if(be!==void 0){var t=e.n;if(t===void 0||t.t!==be)return t={i:0,S:e,p:be.s,n:void 0,t:be,e:void 0,x:void 0,r:t},be.s!==void 0&&(be.s.n=t),be.s=t,e.n=t,32&be.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=be.s,t.n=void 0,be.s.n=t,be.s=t),t}}function $e(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched}$e.prototype.brand=Bi,$e.prototype.h=function(){return!0},$e.prototype.S=function(e){var t=this,r=this.t;r!==e&&e.e===void 0&&(e.x=r,this.t=e,r!==void 0?r.e=e:ms(function(){var n;(n=t.W)==null||n.call(t)}))},$e.prototype.U=function(e){var t=this;if(this.t!==void 0){var r=e.e,n=e.x;r!==void 0&&(r.x=n,e.e=void 0),n!==void 0&&(n.e=r,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&ms(function(){var s;(s=t.Z)==null||s.call(t)}))}},$e.prototype.subscribe=function(e){var t=this;return cn(function(){var r=t.value,n=be;be=void 0;try{e(r)}finally{be=n}})},$e.prototype.valueOf=function(){return this.value},$e.prototype.toString=function(){return this.value+""},$e.prototype.toJSON=function(){return this.value},$e.prototype.peek=function(){var e=be;be=void 0;try{return this.value}finally{be=e}},Object.defineProperty($e.prototype,"value",{get:function(){var e=gs(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(on>100)throw new Error("Cycle detected");this.v=e,this.i++,Ar++,Mt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{sn()}}}});function Ui(e,t){return new $e(e,t)}function bs(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ys(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function vs(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Rt(e,t){$e.call(this,void 0),this.x=e,this.s=void 0,this.g=Ar-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched}Rt.prototype=new $e,Rt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ar))return!0;if(this.g=Ar,this.f|=1,this.i>0&&!bs(this))return this.f&=-2,!0;var e=be;try{ys(this),be=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return be=e,vs(this),this.f&=-2,!0},Rt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}$e.prototype.S.call(this,e)},Rt.prototype.U=function(e){if(this.t!==void 0&&($e.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Rt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Rt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=gs(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function xs(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Mt++;var r=be;be=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,an(e),n}finally{be=r,sn()}}}function an(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,xs(e)}function zi(e){if(be!==this)throw new Error("Out-of-order effect");vs(this),be=e,this.f&=-2,8&this.f&&an(this),sn()}function Lt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Lt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Lt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,xs(this),ys(this),Mt++;var e=be;return be=this,zi.bind(this,e)},Lt.prototype.N=function(){2&this.f||(this.f|=2,this.o=mr,mr=this)},Lt.prototype.d=function(){this.f|=8,1&this.f||an(this)},Lt.prototype.dispose=function(){this.d()};function cn(e){var t=new Lt(e);try{t.c()}catch(n){throw t.d(),n}var r=t.d.bind(t);return r[Symbol.dispose]=r,r}var un={exports:{}},ln={};/**
64
+ * @license React
65
+ * use-sync-external-store-shim.production.js
66
+ *
67
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
68
+ *
69
+ * This source code is licensed under the MIT license found in the
70
+ * LICENSE file in the root directory of this source tree.
71
+ */var ws;function qi(){if(ws)return ln;ws=1;var e=h;function t(b,x){return b===x&&(b!==0||1/b===1/x)||b!==b&&x!==x}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,s=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function c(b,x){var l=x(),f=n({inst:{value:l,getSnapshot:x}}),m=f[0].inst,w=f[1];return o(function(){m.value=l,m.getSnapshot=x,u(m)&&w({inst:m})},[b,l,x]),s(function(){return u(m)&&w({inst:m}),b(function(){u(m)&&w({inst:m})})},[b]),i(l),l}function u(b){var x=b.getSnapshot;b=b.value;try{var l=x();return!r(b,l)}catch{return!0}}function p(b,x){return x()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return ln.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,ln}var Ss={};/**
72
+ * @license React
73
+ * use-sync-external-store-shim.development.js
74
+ *
75
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
76
+ *
77
+ * This source code is licensed under the MIT license found in the
78
+ * LICENSE file in the root directory of this source tree.
79
+ */var Ts;function Ki(){return Ts||(Ts=1,process.env.NODE_ENV!=="production"&&function(){function e(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}function t(l,f){d||s.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!b){var w=f();o(m,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),b=!0)}w=i({inst:{value:m,getSnapshot:f}});var v=w[0].inst,P=w[1];return u(function(){v.value=m,v.getSnapshot=f,r(v)&&P({inst:v})},[l,m,f]),c(function(){return r(v)&&P({inst:v}),l(function(){r(v)&&P({inst:v})})},[l]),p(m),m}function r(l){var f=l.getSnapshot;l=l.value;try{var m=f();return!o(l,m)}catch{return!0}}function n(l,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=h,o=typeof Object.is=="function"?Object.is:e,i=s.useState,c=s.useEffect,u=s.useLayoutEffect,p=s.useDebugValue,d=!1,b=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Ss.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ss}var Ps;function Zi(){return Ps||(Ps=1,process.env.NODE_ENV==="production"?un.exports=qi():un.exports=Ki()),un.exports}var Qi=Zi(),Gi=h.version.split(".").map(Number)[0],Es=[],Xi=Symbol.for(Gi>=19?"react.transitional.element":"react.element"),St,ks=Symbol.dispose||Symbol.for("Symbol.dispose");function fn(e,t){var r=t.effect.S();return St=t,Ji.bind(t,e,r)}function Ji(e,t){t(),St=e}var Cs,dn,Os=function(){},ea=((Cs={o:0,effect:{s:void 0,c:function(){},S:function(){return Os},d:function(){}},subscribe:function(){return Os},getSnapshot:function(){return 0},S:function(){},f:function(){}})[ks]=function(){},Cs),ta=Promise.prototype.then.bind(Promise.resolve());function ra(){dn||(dn=ta(na))}function na(){var e;dn=void 0,(e=St)==null||e.f()}function sa(e){ra();var t=h.useRef();t.current==null&&(typeof window>"u"?t.current=ea:t.current=function(n){var s,o,i,c,u=0,p=cn(function(){o=this});return o.c=function(){u=u+1|0,c&&c()},(s={o:n,effect:o,subscribe:function(d){return c=d,function(){u=u+1|0,c=void 0,p()}},getSnapshot:function(){return u},S:function(){if(St!=null){var d=St.o,b=this.o;d==0&&b==0||d==0&&b==1?(St.f(),i=fn(void 0,this)):d==1&&b==0||d==2&&b==0||(i=fn(St,this))}else i=fn(void 0,this)},f:function(){var d=i;i=void 0,d==null||d()}})[ks]=function(){this.f()},s}(e));var r=t.current;return Qi.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot),r.S(),r}Object.defineProperties($e.prototype,{$$typeof:{configurable:!0,value:Xi},type:{configurable:!0,value:function(e){var t=e.data,r=sa(1);try{return t.value}finally{r.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function ht(e,t){return h.useMemo(function(){return Ui(e,t)},Es)}function At(e){var t=h.useRef(e);t.current=e,h.useEffect(function(){return cn(function(){return t.current()})},Es)}const Ds=h.createContext(void 0),_s=()=>h.useContext(Ds),oa=(e,t)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,readOnly:i,onChange:c,children:u,className:p}=e,[d,b]=h.useState(r),[x,l]=h.useState(i),f=h.useRef(),m=h.useRef(),w=h.useRef(),v=h.useRef(),P=h.useRef(),A=h.useRef(),D=_s(),E=Lr(),q=h.useId(),R=h.useMemo(()=>(E==null?void 0:E.sharedId)||e.id||q,[E==null?void 0:E.sharedId,e.id,q]),[B,H,ne]=Wi({checked:!1,partial:!1}),oe=hs(s),W=hs(o);h.useEffect(()=>{if(B.initial)H({checked:o?!1:s,partial:o});else{const Q=oe.changed?s:B.value.checked,j=W.changed?o:B.value.partial;H({checked:j?!1:Q,partial:j})}},[s,o]),h.useEffect(()=>{D&&(f.current=D.nameSignal,m.current=D.valueSignal,w.current=D.readOnlySignal,v.current=D.useComparator,P.current=D.compare,A.current=D.onCheckboxChange)},[D]),At(()=>{var Q,j,ue;if(m.current)if((Q=v.current)!=null&&Q.value&&P.current){const k=P.current,M=((j=m.current.value)==null?void 0:j.some(_=>k(n,_)))??!1;H(_=>({..._,checked:M}))}else{const k=((ue=m.current.value)==null?void 0:ue.some(M=>n===M))??!1;H(M=>({...M,checked:k}))}}),At(()=>{f.current&&b(f.current.value)}),At(()=>{var Q;l(((Q=w.current)==null?void 0:Q.value)??!1)});const $=hr(Q=>{var j;const ue=((j=ne.current)==null?void 0:j.value.partial)===!0?!0:Q.target.checked;H({checked:ue,partial:!1}),A.current?A.current({originalEvent:Q,name:d,value:n,checked:ue}):c==null||c({originalEvent:Q,name:d,value:n,checked:ue})}),I=Q=>{var j;const ue={checked:Q?!1:((j=ne.current)==null?void 0:j.value.checked)??!1,partial:Q};H(ue)},Z=Q=>{H({checked:Q,partial:!1})};h.useImperativeHandle(t,()=>({setPartiallyChecked:I,setChecked:Z}));const F=d&&Fe.jsx(nn,{id:R,name:d,type:"checkbox",checked:B.value.checked,readOnly:x,onChange:$});return pr({wrapperElement:"label",renderProps:{...B.value,readOnly:x},elementProps:{htmlFor:R},className:p,innerWrapperElement:F,children:u})},Ns=h.memo(h.forwardRef(oa)),ia=(e,t)=>e&&t&&typeof e=="object"&&typeof t=="object"&&"value"in e&&"value"in t?e.value===t.value:e===t,js=(e=ia)=>hr((t,r)=>{if(typeof e=="string"){const n=e;return(t==null?void 0:t[n])===(r==null?void 0:r[n])}return e(t,r)}),Is=({props:e,children:t})=>Fe.jsx(Ds.Provider,{value:e,children:t}),aa=({name:e,value:t,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const c=ht(),u=ht(),p=ht(),d=ht(),b=js(r),x=hr(f=>{if(f){const{checked:m}=f,w=f.value;if(u.value)if(r)if(m)u.value.findIndex(v=>b(w,v))===-1&&u.value.push(w);else{const v=u.value.filter(P=>!b(w,P));u.value=[...v]}else if(m)u.value.indexOf(w)===-1&&u.value.push(w);else{const v=u.value.filter(P=>P!==w);u.value=[...v]}else m&&(u.value=[w])}s==null||s({originalEvent:f==null?void 0:f.originalEvent,name:e,value:u.value})}),l=h.useMemo(()=>({nameSignal:c,valueSignal:u,readOnlySignal:p,useComparator:d,compare:b,onCheckboxChange:x}),[]);return h.useEffect(()=>{c.value=e},[e]),h.useEffect(()=>{u.value=t},[t]),h.useEffect(()=>{p.value=n},[n]),h.useEffect(()=>{d.value=r!==void 0},[r]),Fe.jsx("div",{className:o,children:Fe.jsx(Is,{props:l,children:i})})},ca=h.memo(aa),Ft=({className:e,children:t})=>{const r=h.useId(),n=h.useMemo(()=>({sharedId:r}),[r]),s=Fe.jsx(ps.Provider,{value:n,children:t});return pr({wrapperElement:"div",className:e,children:s})},ua=({htmlFor:e,className:t,children:r})=>{const n=Lr(),s=h.useMemo(()=>(n==null?void 0:n.sharedId)||e,[n==null?void 0:n.sharedId,e]);return pr({wrapperElement:"label",elementProps:{htmlFor:s},className:t,children:r})};var Ms={exports:{}};/*!
64
80
  Copyright (c) 2018 Jed Watson.
65
81
  Licensed under the MIT License (MIT), see
66
82
  http://jedwatson.github.io/classnames
67
- */var Hs;function aa(){return Hs||(Hs=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}($s)),$s.exports}aa();const ca=({intersectionObserver:e,resizeObserver:t,page:r,height:n,children:s})=>{const o=p.useRef();p.useEffect(()=>()=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current))},[]),p.useEffect(()=>(o.current&&(e==null||e.observe(o.current)),()=>{o.current&&e&&e.unobserve(o.current)}),[e]);const i=u=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current)),e==null||e.observe(u),t==null||t.observe(u),o.current=u},c=n?{height:`${n}px`}:{};return lt.jsx("div",{"data-page":r,"data-name":"page",style:c,ref:u=>u&&i(u),children:s})};p.memo(ca);const ua=({intersectionObserver:e,page:t})=>{const r=p.useRef();p.useEffect(()=>()=>{r.current&&(e==null||e.unobserve(r.current))},[]);const n=s=>{r.current&&(e==null||e.unobserve(r.current)),e==null||e.observe(s),r.current=s};return lt.jsx("div",{"data-page":t,"data-name":"marker",ref:s=>s&&n(s)})};p.memo(ua);const hn=e=>{const[t,r]=p.useState(!0),n=cs();return p.useEffect(()=>{n&&n.useAnimations!==void 0?r(n.useAnimations):e!==void 0&&r(e)},[n,e]),t},ft=({label:e,htmlFor:t,readOnly:r=!1,className:n})=>{const s=de("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!r,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":r},n);return g.jsx(Zi,{htmlFor:t,className:s,children:e})},la=(e,t)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:c=!1,labelLocation:u=Be.Right,className:h,useAnimation:f,onChange:v}=e,P=hn(f),l=de("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer",{"bc-read-only bsc:pointer-events-none bsc:text-gray-2 bsc:dark:text-mono-light-3":o,"bc-checked":i},h),d=de("bc-checkbox-label",{"bsc:ml-2":u===Be.Right,"bsc:mr-2":u===Be.Left}),b=Ir(cr.FocusWithin),x=de("bc-checkbox-outer bsc:group/checkbox bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",b),y=de("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]",{"bc-read-only bsc:group-data-checked/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:fill-mono-light-3":o,"bsc:group-data-checked/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1":!o,"bsc:group-data-checked/checkbox:animate-bounce bsc:group-data-partial/checkbox:animate-bounce":!o&&P,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":o||!P});return g.jsxs(Ki,{className:l,children:[n&&u===Be.Left&&g.jsx(ft,{label:n,readOnly:o,className:d}),g.jsx(zi,{ref:t,name:r,value:s,checked:i,partial:c,readOnly:o,className:x,onChange:v,children:g.jsxs("svg",{viewBox:"0 0 21 21",className:y,children:[g.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),g.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),n&&u===Be.Right&&g.jsx(ft,{label:n,readOnly:o,className:d})]})},Ys=p.memo(p.forwardRef(la)),$r=e=>e==null?!1:typeof e=="object",Ws=e=>e instanceof Date,Vs=e=>typeof e=="function",Bs=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},pn=e=>{if(!$r(e))return e;const t={},r=Object.keys(e);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=e[o];Bs(i)||Vs(i)?t[o]=i:Ws(i)?t[o]=new Date(i.getTime()):Array.isArray(i)?t[o]=mn(i):$r(i)&&(t[o]=pn(i))}return t},mn=e=>{let t=e.length;const r=new Array(t);for(;t--!==0;){const n=e[t];Bs(n)||Vs(n)?r[t]=n:Ws(n)?r[t]=new Date(n.getTime()):$r(n)&&!Array.isArray(n)?r[t]=pn(n):Array.isArray(n)?r[t]=mn(n):r[t]=n}return r},fa=e=>$r(e)?Array.isArray(e)?mn(e):pn(e):e;function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ha=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const pa=da(ha);function ma(e,t){for(let r=e.length;r--!==0;)if(!pa(e[r],t[r]))return!0;return!1}const gn=(e,t)=>{const r=p.useRef([]),n=r.current.length>0&&r.current[0]&&ma(r.current[0],t);return(r.current.length===0||n)&&(r.current=[fa(t),e()]),r.current[1]},ga=e=>{const[t,r]=p.useState(e),n=p.useRef(e);return n.current!==t&&(n.current=t),[t,r,n]},ba=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=$e.Vertical,className:u,onChange:h})=>{const[f,v]=p.useState([]),P=gn(()=>n,[n]);p.useEffect(()=>{v(r??[])},[r]);const l=E=>{const{value:V,checked:R}=E;let S;R?S=[...f,V]:S=f.filter($=>$!==V),v(S),h==null||h({name:e,value:S})},d=(E,V)=>g.jsx(Ys,{name:e,label:E[s],value:E[o],checked:f.some(R=>R===E[o]),readOnly:i,onChange:R=>R&&l(R),className:"bsc:mr-3"},`${e}_checkbox_${V}`),b=de("bsc:flex bsc:flex-col bsc:gap-1",u),x=de("bsc:flex bsc:gap-1",{"bsc:flex-col":c===$e.Vertical}),y=E=>g.jsx("div",{className:x,children:E.map(d)});return g.jsxs("div",{className:b,children:[t&&g.jsx(ft,{label:t,readOnly:i}),P&&y(P)]})},ya=p.memo(ba);var Us=typeof global=="object"&&global&&global.Object===Object&&global,va=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Us||va||Function("return this")(),Lt=Ze.Symbol,qs=Object.prototype,xa=qs.hasOwnProperty,wa=qs.toString,pr=Lt?Lt.toStringTag:void 0;function Pa(e){var t=xa.call(e,pr),r=e[pr];try{e[pr]=void 0;var n=!0}catch{}var s=wa.call(e);return n&&(t?e[pr]=r:delete e[pr]),s}var Ta=Object.prototype,Sa=Ta.toString;function Ea(e){return Sa.call(e)}var _a="[object Null]",ka="[object Undefined]",zs=Lt?Lt.toStringTag:void 0;function At(e){return e==null?e===void 0?ka:_a:zs&&zs in Object(e)?Pa(e):Ea(e)}function Ft(e){return e!=null&&typeof e=="object"}var Ca="[object Symbol]";function Da(e){return typeof e=="symbol"||Ft(e)&&At(e)==Ca}var bn=Array.isArray,Oa=/\s/;function Na(e){for(var t=e.length;t--&&Oa.test(e.charAt(t)););return t}var ja=/^\s+/;function Ia(e){return e&&e.slice(0,Na(e)+1).replace(ja,"")}function gt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ks=NaN,Ma=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,La=/^0o[0-7]+$/i,Aa=parseInt;function Zs(e){if(typeof e=="number")return e;if(Da(e))return Ks;if(gt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ia(e);var r=Ra.test(e);return r||La.test(e)?Aa(e.slice(2),r?2:8):Ma.test(e)?Ks:+e}var Fa="[object AsyncFunction]",$a="[object Function]",Ha="[object GeneratorFunction]",Ya="[object Proxy]";function Gs(e){if(!gt(e))return!1;var t=At(e);return t==$a||t==Ha||t==Fa||t==Ya}var yn=Ze["__core-js_shared__"],Qs=function(){var e=/[^.]+$/.exec(yn&&yn.keys&&yn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Wa(e){return!!Qs&&Qs in e}var Va=Function.prototype,Ba=Va.toString;function St(e){if(e!=null){try{return Ba.call(e)}catch{}try{return e+""}catch{}}return""}var Ua=/[\\^$.*+?()[\]{}|]/g,qa=/^\[object .+?Constructor\]$/,za=Function.prototype,Ka=Object.prototype,Za=za.toString,Ga=Ka.hasOwnProperty,Qa=RegExp("^"+Za.call(Ga).replace(Ua,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xa(e){if(!gt(e)||Wa(e))return!1;var t=Gs(e)?Qa:qa;return t.test(St(e))}function Ja(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=Ja(e,t);return Xa(r)?r:void 0}var vn=Et(Ze,"WeakMap"),Xs=Object.create,ec=function(){function e(){}return function(t){if(!gt(t))return{};if(Xs)return Xs(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Js=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}();function tc(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var rc=9007199254740991,nc=/^(?:0|[1-9]\d*)$/;function sc(e,t){var r=typeof e;return t=t??rc,!!t&&(r=="number"||r!="symbol"&&nc.test(e))&&e>-1&&e%1==0&&e<t}function oc(e,t,r){t=="__proto__"&&Js?Js(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function eo(e,t){return e===t||e!==e&&t!==t}var ic=Object.prototype,ac=ic.hasOwnProperty;function cc(e,t,r){var n=e[t];(!(ac.call(e,t)&&eo(n,r))||r===void 0&&!(t in e))&&oc(e,t,r)}var uc=9007199254740991;function to(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=uc}function lc(e){return e!=null&&to(e.length)&&!Gs(e)}var fc=Object.prototype;function ro(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fc;return e===r}function dc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var hc="[object Arguments]";function no(e){return Ft(e)&&At(e)==hc}var so=Object.prototype,pc=so.hasOwnProperty,mc=so.propertyIsEnumerable,gc=no(function(){return arguments}())?no:function(e){return Ft(e)&&pc.call(e,"callee")&&!mc.call(e,"callee")};function bc(){return!1}var oo=typeof ne=="object"&&ne&&!ne.nodeType&&ne,io=oo&&typeof module=="object"&&module&&!module.nodeType&&module,yc=io&&io.exports===oo,ao=yc?Ze.Buffer:void 0,vc=ao?ao.isBuffer:void 0,co=vc||bc,xc="[object Arguments]",wc="[object Array]",Pc="[object Boolean]",Tc="[object Date]",Sc="[object Error]",Ec="[object Function]",_c="[object Map]",kc="[object Number]",Cc="[object Object]",Dc="[object RegExp]",Oc="[object Set]",Nc="[object String]",jc="[object WeakMap]",Ic="[object ArrayBuffer]",Mc="[object DataView]",Rc="[object Float32Array]",Lc="[object Float64Array]",Ac="[object Int8Array]",Fc="[object Int16Array]",$c="[object Int32Array]",Hc="[object Uint8Array]",Yc="[object Uint8ClampedArray]",Wc="[object Uint16Array]",Vc="[object Uint32Array]",Se={};Se[Rc]=Se[Lc]=Se[Ac]=Se[Fc]=Se[$c]=Se[Hc]=Se[Yc]=Se[Wc]=Se[Vc]=!0,Se[xc]=Se[wc]=Se[Ic]=Se[Pc]=Se[Mc]=Se[Tc]=Se[Sc]=Se[Ec]=Se[_c]=Se[kc]=Se[Cc]=Se[Dc]=Se[Oc]=Se[Nc]=Se[jc]=!1;function Bc(e){return Ft(e)&&to(e.length)&&!!Se[At(e)]}function xn(e){return function(t){return e(t)}}var uo=typeof ne=="object"&&ne&&!ne.nodeType&&ne,mr=uo&&typeof module=="object"&&module&&!module.nodeType&&module,Uc=mr&&mr.exports===uo,wn=Uc&&Us.process,$t=function(){try{var e=mr&&mr.require&&mr.require("util").types;return e||wn&&wn.binding&&wn.binding("util")}catch{}}(),lo=$t&&$t.isTypedArray,qc=lo?xn(lo):Bc,zc=Object.prototype,Kc=zc.hasOwnProperty;function Zc(e,t){var r=bn(e),n=!r&&gc(e),s=!r&&!n&&co(e),o=!r&&!n&&!s&&qc(e),i=r||n||s||o,c=i?dc(e.length,String):[],u=c.length;for(var h in e)Kc.call(e,h)&&!(i&&(h=="length"||s&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||sc(h,u)))&&c.push(h);return c}function fo(e,t){return function(r){return e(t(r))}}var Gc=fo(Object.keys,Object),Qc=Object.prototype,Xc=Qc.hasOwnProperty;function Jc(e){if(!ro(e))return Gc(e);var t=[];for(var r in Object(e))Xc.call(e,r)&&r!="constructor"&&t.push(r);return t}function eu(e){return lc(e)?Zc(e):Jc(e)}var gr=Et(Object,"create");function tu(){this.__data__=gr?gr(null):{},this.size=0}function ru(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nu="__lodash_hash_undefined__",su=Object.prototype,ou=su.hasOwnProperty;function iu(e){var t=this.__data__;if(gr){var r=t[e];return r===nu?void 0:r}return ou.call(t,e)?t[e]:void 0}var au=Object.prototype,cu=au.hasOwnProperty;function uu(e){var t=this.__data__;return gr?t[e]!==void 0:cu.call(t,e)}var lu="__lodash_hash_undefined__";function fu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=gr&&t===void 0?lu:t,this}function _t(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_t.prototype.clear=tu,_t.prototype.delete=ru,_t.prototype.get=iu,_t.prototype.has=uu,_t.prototype.set=fu;function du(){this.__data__=[],this.size=0}function Hr(e,t){for(var r=e.length;r--;)if(eo(e[r][0],t))return r;return-1}var hu=Array.prototype,pu=hu.splice;function mu(e){var t=this.__data__,r=Hr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():pu.call(t,r,1),--this.size,!0}function gu(e){var t=this.__data__,r=Hr(t,e);return r<0?void 0:t[r][1]}function bu(e){return Hr(this.__data__,e)>-1}function yu(e,t){var r=this.__data__,n=Hr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function dt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}dt.prototype.clear=du,dt.prototype.delete=mu,dt.prototype.get=gu,dt.prototype.has=bu,dt.prototype.set=yu;var br=Et(Ze,"Map");function vu(){this.size=0,this.__data__={hash:new _t,map:new(br||dt),string:new _t}}function xu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yr(e,t){var r=e.__data__;return xu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function wu(e){var t=Yr(this,e).delete(e);return this.size-=t?1:0,t}function Pu(e){return Yr(this,e).get(e)}function Tu(e){return Yr(this,e).has(e)}function Su(e,t){var r=Yr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ht.prototype.clear=vu,Ht.prototype.delete=wu,Ht.prototype.get=Pu,Ht.prototype.has=Tu,Ht.prototype.set=Su;function Eu(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var _u=fo(Object.getPrototypeOf,Object);function ku(){this.__data__=new dt,this.size=0}function Cu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Du(e){return this.__data__.get(e)}function Ou(e){return this.__data__.has(e)}var Nu=200;function ju(e,t){var r=this.__data__;if(r instanceof dt){var n=r.__data__;if(!br||n.length<Nu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ht(n)}return r.set(e,t),this.size=r.size,this}function Yt(e){var t=this.__data__=new dt(e);this.size=t.size}Yt.prototype.clear=ku,Yt.prototype.delete=Cu,Yt.prototype.get=Du,Yt.prototype.has=Ou,Yt.prototype.set=ju;var ho=typeof ne=="object"&&ne&&!ne.nodeType&&ne,po=ho&&typeof module=="object"&&module&&!module.nodeType&&module,Iu=po&&po.exports===ho,mo=Iu?Ze.Buffer:void 0;mo&&mo.allocUnsafe;function Mu(e,t){return e.slice()}function Ru(e,t){for(var r=-1,n=e==null?0:e.length,s=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[s++]=i)}return o}function Lu(){return[]}var Au=Object.prototype,Fu=Au.propertyIsEnumerable,go=Object.getOwnPropertySymbols,$u=go?function(e){return e==null?[]:(e=Object(e),Ru(go(e),function(t){return Fu.call(e,t)}))}:Lu;function Hu(e,t,r){var n=t(e);return bn(e)?n:Eu(n,r(e))}function Yu(e){return Hu(e,eu,$u)}var Pn=Et(Ze,"DataView"),Tn=Et(Ze,"Promise"),Sn=Et(Ze,"Set"),bo="[object Map]",Wu="[object Object]",yo="[object Promise]",vo="[object Set]",xo="[object WeakMap]",wo="[object DataView]",Vu=St(Pn),Bu=St(br),Uu=St(Tn),qu=St(Sn),zu=St(vn),ht=At;(Pn&&ht(new Pn(new ArrayBuffer(1)))!=wo||br&&ht(new br)!=bo||Tn&&ht(Tn.resolve())!=yo||Sn&&ht(new Sn)!=vo||vn&&ht(new vn)!=xo)&&(ht=function(e){var t=At(e),r=t==Wu?e.constructor:void 0,n=r?St(r):"";if(n)switch(n){case Vu:return wo;case Bu:return bo;case Uu:return yo;case qu:return vo;case zu:return xo}return t});var Ku=Object.prototype,Zu=Ku.hasOwnProperty;function Gu(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Zu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Po=Ze.Uint8Array;function En(e){var t=new e.constructor(e.byteLength);return new Po(t).set(new Po(e)),t}function Qu(e,t){var r=En(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Xu=/\w*$/;function Ju(e){var t=new e.constructor(e.source,Xu.exec(e));return t.lastIndex=e.lastIndex,t}var To=Lt?Lt.prototype:void 0,So=To?To.valueOf:void 0;function el(e){return So?Object(So.call(e)):{}}function tl(e,t){var r=En(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var rl="[object Boolean]",nl="[object Date]",sl="[object Map]",ol="[object Number]",il="[object RegExp]",al="[object Set]",cl="[object String]",ul="[object Symbol]",ll="[object ArrayBuffer]",fl="[object DataView]",dl="[object Float32Array]",hl="[object Float64Array]",pl="[object Int8Array]",ml="[object Int16Array]",gl="[object Int32Array]",bl="[object Uint8Array]",yl="[object Uint8ClampedArray]",vl="[object Uint16Array]",xl="[object Uint32Array]";function wl(e,t,r){var n=e.constructor;switch(t){case ll:return En(e);case rl:case nl:return new n(+e);case fl:return Qu(e);case dl:case hl:case pl:case ml:case gl:case bl:case yl:case vl:case xl:return tl(e);case sl:return new n;case ol:case cl:return new n(e);case il:return Ju(e);case al:return new n;case ul:return el(e)}}function Pl(e){return typeof e.constructor=="function"&&!ro(e)?ec(_u(e)):{}}var Tl="[object Map]";function Sl(e){return Ft(e)&&ht(e)==Tl}var Eo=$t&&$t.isMap,El=Eo?xn(Eo):Sl,_l="[object Set]";function kl(e){return Ft(e)&&ht(e)==_l}var _o=$t&&$t.isSet,Cl=_o?xn(_o):kl,ko="[object Arguments]",Dl="[object Array]",Ol="[object Boolean]",Nl="[object Date]",jl="[object Error]",Co="[object Function]",Il="[object GeneratorFunction]",Ml="[object Map]",Rl="[object Number]",Do="[object Object]",Ll="[object RegExp]",Al="[object Set]",Fl="[object String]",$l="[object Symbol]",Hl="[object WeakMap]",Yl="[object ArrayBuffer]",Wl="[object DataView]",Vl="[object Float32Array]",Bl="[object Float64Array]",Ul="[object Int8Array]",ql="[object Int16Array]",zl="[object Int32Array]",Kl="[object Uint8Array]",Zl="[object Uint8ClampedArray]",Gl="[object Uint16Array]",Ql="[object Uint32Array]",Pe={};Pe[ko]=Pe[Dl]=Pe[Yl]=Pe[Wl]=Pe[Ol]=Pe[Nl]=Pe[Vl]=Pe[Bl]=Pe[Ul]=Pe[ql]=Pe[zl]=Pe[Ml]=Pe[Rl]=Pe[Do]=Pe[Ll]=Pe[Al]=Pe[Fl]=Pe[$l]=Pe[Kl]=Pe[Zl]=Pe[Gl]=Pe[Ql]=!0,Pe[jl]=Pe[Co]=Pe[Hl]=!1;function Wr(e,t,r,n,s,o){var i;if(i!==void 0)return i;if(!gt(e))return e;var c=bn(e);if(c)i=Gu(e);else{var u=ht(e),h=u==Co||u==Il;if(co(e))return Mu(e);if(u==Do||u==ko||h&&!s)i=h?{}:Pl(e);else{if(!Pe[u])return s?e:{};i=wl(e,u)}}o||(o=new Yt);var f=o.get(e);if(f)return f;o.set(e,i),Cl(e)?e.forEach(function(l){i.add(Wr(l,t,r,l,e,o))}):El(e)&&e.forEach(function(l,d){i.set(d,Wr(l,t,r,d,e,o))});var v=Yu,P=c?void 0:v(e);return tc(P||e,function(l,d){P&&(d=l,l=e[d]),cc(i,d,Wr(l,t,r,d,e,o))}),i}var Xl=1,Jl=4;function ef(e){return Wr(e,Xl|Jl)}var _n=function(){return Ze.Date.now()},tf="Expected a function",rf=Math.max,nf=Math.min;function yr(e,t,r){var n,s,o,i,c,u,h=0,f=!1,v=!1,P=!0;if(typeof e!="function")throw new TypeError(tf);t=Zs(t)||0,gt(r)&&(f=!!r.leading,v="maxWait"in r,o=v?rf(Zs(r.maxWait)||0,t):o,P="trailing"in r?!!r.trailing:P);function l($){var O=n,q=s;return n=s=void 0,h=$,i=e.apply(q,O),i}function d($){return h=$,c=setTimeout(y,t),f?l($):i}function b($){var O=$-u,q=$-h,z=t-O;return v?nf(z,o-q):z}function x($){var O=$-u,q=$-h;return u===void 0||O>=t||O<0||v&&q>=o}function y(){var $=_n();if(x($))return E($);c=setTimeout(y,b($))}function E($){return c=void 0,P&&n?l($):(n=s=void 0,i)}function V(){c!==void 0&&clearTimeout(c),h=0,n=u=s=c=void 0}function R(){return c===void 0?i:E(_n())}function S(){var $=_n(),O=x($);if(n=arguments,s=this,u=$,O){if(c===void 0)return d(u);if(v)return clearTimeout(c),c=setTimeout(y,t),l(u)}return c===void 0&&(c=setTimeout(y,t)),i}return S.cancel=V,S.flush=R,S}var sf="Expected a function";function of(e,t,r){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(sf);return gt(r)&&(n="leading"in r?!0:n,s="trailing"in r?!!r.trailing:s),yr(e,t,{leading:n,maxWait:t,trailing:s})}const af=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:c,className:u,leftElementClassName:h,rightElementClassName:f,isSingleLine:v=!0,allowSingleLineScroll:P=!1,inputMode:l,placeholder:d,onFocus:b,onBlur:x,onInput:y,onInnerTextChange:E,onInnerHTMLChange:V,onElementCreate:R,onLeftElementClick:S,onRightElementClick:$}=e,O=p.useRef("bsc:grow bsc:focus:outline-hidden"),q=p.useRef("bsc:text-gray-4"),z=p.useRef(),se=p.useCallback(_=>{const W=_.target,J=W.innerHTML;W.className=`${O.current}`,d&&J===d&&(W.innerHTML=""),b==null||b(_)},[d,b]),ae=p.useCallback(_=>{const W=_.target.innerHTML;if(d&&W===""){const J=_.target;J.innerHTML=d,J.className=`${O.current} ${q.current}`}x==null||x(_)},[d,x]),re=p.useCallback(_=>{var W,J;(W=z.current)==null||W.removeEventListener("focus",se),(J=z.current)==null||J.removeEventListener("blur",ae),d&&_&&_!==document.activeElement&&_.innerHTML===""&&(_.innerHTML=d,_.className=`${O.current} ${q.current}`),_.addEventListener("focus",se),_.addEventListener("blur",ae),z.current=_},[d]),K=p.useCallback(_=>{R==null||R(_)},[R]),L=_=>{S==null||S(_)},F=_=>{$==null||$(_)},C=yr(_=>{y==null||y(_),E==null||E(_.target.innerText),V==null||V(_.target.innerHTML)},s),Q=p.useCallback(_=>{z.current&&(z.current.innerText=_)},[]),I=p.useCallback(_=>{z.current&&(z.current.innerHTML=_)},[]),he=p.useCallback(()=>{var _;(_=z.current)==null||_.focus()},[]);p.useImperativeHandle(t,()=>({inputElement:z.current,setInnerText:Q,setInnerHTML:I,focus:he}));const k=de({"bsc:w-full ":o},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":v&&P,"bsc:overflow-hidden bsc:whitespace-pre":v&&!P},u),M=de("bsc:shrink",{"bsc:mr-2":i},h),N=de("bsc:shrink",{"bsc:ml-2":c},f);return g.jsxs("div",{className:k,ref:_=>_&&K(_),children:[i&&g.jsx("div",{className:M,onClick:L,children:i}),g.jsx("div",{ref:_=>_&&re(_),className:O.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:l,onInput:C,children:r}),c&&g.jsx("div",{className:N,onClick:F,children:c})]})},Vr=p.forwardRef(af);function pe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Te(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Wt(e,t){const r=pe(e);return isNaN(t)?Te(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bt(e,t){const r=pe(e);if(isNaN(t))return Te(e,NaN);if(!t)return r;const n=r.getDate(),s=Te(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return n>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const Oo=6048e5,kn=6e4,Cn=36e5,cf=1e3;let uf={};function vr(){return uf}function yt(e,t){var c,u,h,f;const r=vr(),n=(t==null?void 0:t.weekStartsOn)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,s=pe(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function Vt(e){return yt(e,{weekStartsOn:1})}function lf(e){const t=pe(e),r=t.getFullYear(),n=Te(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=Vt(n),o=Te(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=Vt(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function No(e){const t=pe(e);return t.setHours(0,0,0,0),t}function jo(e){const t=pe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function ff(e){const t=lf(e),r=Te(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Vt(r)}function xr(e,t){return bt(e,t*12)}function Io(e,t){const r=No(e),n=No(t);return+r==+n}function df(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function hf(e,t){const r=pe(e.start),n=pe(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0);let c=1;const u=[];for(;+i<=o;)u.push(pe(i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return s?u.reverse():u}function Mo(e){const t=pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function pf(e,t){const r=pe(e.start),n=pe(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let c=1;const u=[];for(;+i<=o;)u.push(pe(i)),i.setFullYear(i.getFullYear()+c);return s?u.reverse():u}const mf={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"}},gf=(e,t,r)=>{let n;const s=mf[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Dn(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const bf={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xf={date:Dn({formats:bf,defaultWidth:"full"}),time:Dn({formats:yf,defaultWidth:"full"}),dateTime:Dn({formats:vf,defaultWidth:"full"})},wf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pf=(e,t,r,n)=>wf[e];function wr(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=r!=null&&r.width?String(r.width):i;s=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[c]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const Tf={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Sf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ef={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"]},_f={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"]},kf={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"}},Cf={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"}},Df={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:wr({values:Tf,defaultWidth:"wide"}),quarter:wr({values:Sf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:wr({values:Ef,defaultWidth:"wide"}),day:wr({values:_f,defaultWidth:"wide"}),dayPeriod:wr({values:kf,defaultWidth:"wide",formattingValues:Cf,defaultFormattingWidth:"wide"})};function Pr(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Nf(c,v=>v.test(i)):Of(c,v=>v.test(i));let h;h=e.valueCallback?e.valueCallback(u):u,h=r.valueCallback?r.valueCallback(h):h;const f=t.slice(i.length);return{value:h,rest:f}}}function Of(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Nf(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function jf(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const c=t.slice(s.length);return{value:i,rest:c}}}const If=/^(\d+)(th|st|nd|rd)?/i,Mf=/\d+/i,Rf={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},Lf={any:[/^b/i,/^(a|c)/i]},Af={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ff={any:[/1/i,/2/i,/3/i,/4/i]},$f={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},Hf={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]},Yf={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},Wf={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]},Vf={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},Bf={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}},Uf={ordinalNumber:jf({matchPattern:If,parsePattern:Mf,valueCallback:e=>parseInt(e,10)}),era:Pr({matchPatterns:Rf,defaultMatchWidth:"wide",parsePatterns:Lf,defaultParseWidth:"any"}),quarter:Pr({matchPatterns:Af,defaultMatchWidth:"wide",parsePatterns:Ff,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pr({matchPatterns:$f,defaultMatchWidth:"wide",parsePatterns:Hf,defaultParseWidth:"any"}),day:Pr({matchPatterns:Yf,defaultMatchWidth:"wide",parsePatterns:Wf,defaultParseWidth:"any"}),dayPeriod:Pr({matchPatterns:Vf,defaultMatchWidth:"any",parsePatterns:Bf,defaultParseWidth:"any"})},qf={code:"en-US",formatDistance:gf,formatLong:xf,formatRelative:Pf,localize:Df,match:Uf,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zf(e){const t=pe(e),r=+Vt(t)-+ff(t);return Math.round(r/Oo)+1}function Ro(e,t){var f,v,P,l;const r=pe(e),n=r.getFullYear(),s=vr(),o=(t==null?void 0:t.firstWeekContainsDate)??((v=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:v.firstWeekContainsDate)??s.firstWeekContainsDate??((l=(P=s.locale)==null?void 0:P.options)==null?void 0:l.firstWeekContainsDate)??1,i=Te(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const c=yt(i,t),u=Te(e,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const h=yt(u,t);return r.getTime()>=c.getTime()?n+1:r.getTime()>=h.getTime()?n:n-1}function Kf(e,t){var c,u,h,f;const r=vr(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,s=Ro(e,t),o=Te(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),yt(o,t)}function Zf(e,t){const r=pe(e),n=+yt(r,t)-+Kf(r,t);return Math.round(n/Oo)+1}const Lo=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ao=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Fo={p:Ao,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Lo(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Lo(n,t)).replace("{{time}}",Ao(s,t))}},Gf=/^D+$/,Qf=/^Y+$/,Xf=["D","DD","YY","YYYY"];function Jf(e){return Gf.test(e)}function ed(e){return Qf.test(e)}function $o(e,t,r){const n=td(e,t,r);if(console.warn(n),Xf.includes(e))throw new RangeError(n)}function td(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function On(e){return pe(e).getDay()}function Ho(e){const t=pe(e),r=t.getFullYear(),n=t.getMonth(),s=Te(e,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function rd(){return Object.assign({},vr())}function nd(e){let r=pe(e).getDay();return r===0&&(r=7),r}function sd(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function od(e,t){const r=pe(e),n=pe(t);return+r<+n}function id(e,t){const r=t instanceof Date?Te(t,0):new t(0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}const ad=10;class Yo{constructor(){T(this,"subPriority",0)}validate(t,r){return!0}}class cd extends Yo{constructor(t,r,n,s,o){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=s,o&&(this.subPriority=o)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class ud extends Yo{constructor(){super(...arguments);T(this,"priority",ad);T(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:Te(r,id(r,Date))}}class me{run(t,r,n,s){const o=this.parse(t,r,n,s);return o?{setter:new cd(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class ld extends me{constructor(){super(...arguments);T(this,"priority",140);T(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}set(r,n,s){return n.era=s,r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}const je={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}/},tt={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 Ie(e,t){return e&&{value:t(e.value),rest:e.rest}}function Ce(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function rt(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,s=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(s*Cn+o*kn+i*cf),rest:t.slice(r[0].length)}}function Wo(e){return Ce(je.anyDigitsSigned,e)}function De(e,t){switch(e){case 1:return Ce(je.singleDigit,t);case 2:return Ce(je.twoDigits,t);case 3:return Ce(je.threeDigits,t);case 4:return Ce(je.fourDigits,t);default:return Ce(new RegExp("^\\d{1,"+e+"}"),t)}}function Br(e,t){switch(e){case 1:return Ce(je.singleDigitSigned,t);case 2:return Ce(je.twoDigitsSigned,t);case 3:return Ce(je.threeDigitsSigned,t);case 4:return Ce(je.fourDigitsSigned,t);default:return Ce(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Nn(e){switch(e){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 Vo(e,t){const r=t>0,n=r?t:1-t;let s;if(n<=50)s=e||100;else{const o=n+50,i=Math.trunc(o/100)*100,c=e>=o%100;s=e+i-(c?100:0)}return r?s:1-s}function Bo(e){return e%400===0||e%4===0&&e%100!==0}class fd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Ie(De(4,r),o);case"yo":return Ie(s.ordinalNumber(r,{unit:"year"}),o);default:return Ie(De(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s){const o=r.getFullYear();if(s.isTwoDigitYear){const c=Vo(s.year,o);return r.setFullYear(c,0,1),r.setHours(0,0,0,0),r}const i=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}}class dd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ie(De(4,r),o);case"Yo":return Ie(s.ordinalNumber(r,{unit:"year"}),o);default:return Ie(De(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s,o){const i=Ro(r,o);if(s.isTwoDigitYear){const u=Vo(s.year,i);return r.setFullYear(u,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),yt(r,o)}const c=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(c,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),yt(r,o)}}class hd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return Br(n==="R"?4:n.length,r)}set(r,n,s){const o=Te(r,0);return o.setFullYear(s,0,4),o.setHours(0,0,0,0),Vt(o)}}class pd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return Br(n==="u"?4:n.length,r)}set(r,n,s){return r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}class md extends me{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"Q":case"QQ":return De(n.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class gd extends me{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"q":case"qq":return De(n.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class bd extends me{constructor(){super(...arguments);T(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);T(this,"priority",110)}parse(r,n,s){const o=i=>i-1;switch(n){case"M":return Ie(Ce(je.month,r),o);case"MM":return Ie(De(2,r),o);case"Mo":return Ie(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}class yd extends me{constructor(){super(...arguments);T(this,"priority",110);T(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,s){const o=i=>i-1;switch(n){case"L":return Ie(Ce(je.month,r),o);case"LL":return Ie(De(2,r),o);case"Lo":return Ie(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}function vd(e,t,r){const n=pe(e),s=Zf(n,r)-t;return n.setDate(n.getDate()-s*7),n}class xd extends me{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,s){switch(n){case"w":return Ce(je.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s,o){return yt(vd(r,s,o),o)}}function wd(e,t){const r=pe(e),n=zf(r)-t;return r.setDate(r.getDate()-n*7),r}class Pd extends me{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,s){switch(n){case"I":return Ce(je.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s){return Vt(wd(r,s))}}const Td=[31,28,31,30,31,30,31,31,30,31,30,31],Sd=[31,29,31,30,31,30,31,31,30,31,30,31];class Ed extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"subPriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"d":return Ce(je.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return De(n.length,r)}}validate(r,n){const s=r.getFullYear(),o=Bo(s),i=r.getMonth();return o?n>=1&&n<=Sd[i]:n>=1&&n<=Td[i]}set(r,n,s){return r.setDate(s),r.setHours(0,0,0,0),r}}class _d extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"subpriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,s){switch(n){case"D":case"DD":return Ce(je.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return De(n.length,r)}}validate(r,n){const s=r.getFullYear();return Bo(s)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,s){return r.setMonth(0,s),r.setHours(0,0,0,0),r}}function jn(e,t,r){var v,P,l,d;const n=vr(),s=(r==null?void 0:r.weekStartsOn)??((P=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:P.weekStartsOn)??n.weekStartsOn??((d=(l=n.locale)==null?void 0:l.options)==null?void 0:d.weekStartsOn)??0,o=pe(e),i=o.getDay(),u=(t%7+7)%7,h=7-s,f=t<0||t>6?t-(i+h)%7:(u+h)%7-(i+h)%7;return Wt(o,f)}class kd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}class Cd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,s,o){const i=c=>{const u=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+u};switch(n){case"e":case"ee":return Ie(De(n.length,r),i);case"eo":return Ie(s.ordinalNumber(r,{unit:"day"}),i);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}class Dd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,s,o){const i=c=>{const u=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+u};switch(n){case"c":case"cc":return Ie(De(n.length,r),i);case"co":return Ie(s.ordinalNumber(r,{unit:"day"}),i);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}function Od(e,t){const r=pe(e),n=nd(r),s=t-n;return Wt(r,s)}class Nd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,s){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return De(n.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Ie(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return Ie(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Ie(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Ie(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}validate(r,n){return n>=1&&n<=7}set(r,n,s){return r=Od(r,s),r.setHours(0,0,0,0),r}}class jd extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Id extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Md extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Rd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,s){switch(n){case"h":return Ce(je.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,s){const o=r.getHours()>=12;return o&&s<12?r.setHours(s+12,0,0,0):!o&&s===12?r.setHours(0,0,0,0):r.setHours(s,0,0,0),r}}class Ld extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,s){switch(n){case"H":return Ce(je.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,s){return r.setHours(s,0,0,0),r}}class Ad extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,s){switch(n){case"K":return Ce(je.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.getHours()>=12&&s<12?r.setHours(s+12,0,0,0):r.setHours(s,0,0,0),r}}class Fd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,s){switch(n){case"k":return Ce(je.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,s){const o=s<=24?s%24:s;return r.setHours(o,0,0,0),r}}class $d extends me{constructor(){super(...arguments);T(this,"priority",60);T(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"m":return Ce(je.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setMinutes(s,0,0),r}}class Hd extends me{constructor(){super(...arguments);T(this,"priority",50);T(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"s":return Ce(je.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setSeconds(s,0),r}}class Yd extends me{constructor(){super(...arguments);T(this,"priority",30);T(this,"incompatibleTokens",["t","T"])}parse(r,n){const s=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Ie(De(n.length,r),s)}set(r,n,s){return r.setMilliseconds(s),r}}class Wd extends me{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return rt(tt.basicOptionalMinutes,r);case"XX":return rt(tt.basic,r);case"XXXX":return rt(tt.basicOptionalSeconds,r);case"XXXXX":return rt(tt.extendedOptionalSeconds,r);case"XXX":default:return rt(tt.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-jo(r)-s)}}class Vd extends me{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return rt(tt.basicOptionalMinutes,r);case"xx":return rt(tt.basic,r);case"xxxx":return rt(tt.basicOptionalSeconds,r);case"xxxxx":return rt(tt.extendedOptionalSeconds,r);case"xxx":default:return rt(tt.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-jo(r)-s)}}class Bd extends me{constructor(){super(...arguments);T(this,"priority",40);T(this,"incompatibleTokens","*")}parse(r){return Wo(r)}set(r,n,s){return[Te(r,s*1e3),{timestampIsSet:!0}]}}class Ud extends me{constructor(){super(...arguments);T(this,"priority",20);T(this,"incompatibleTokens","*")}parse(r){return Wo(r)}set(r,n,s){return[Te(r,s),{timestampIsSet:!0}]}}const qd={G:new ld,y:new fd,Y:new dd,R:new hd,u:new pd,Q:new md,q:new gd,M:new bd,L:new yd,w:new xd,I:new Pd,d:new Ed,D:new _d,E:new kd,e:new Cd,c:new Dd,i:new Nd,a:new jd,b:new Id,B:new Md,h:new Rd,H:new Ld,K:new Ad,k:new Fd,m:new $d,s:new Hd,S:new Yd,X:new Wd,x:new Vd,t:new Bd,T:new Ud},zd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zd=/^'([^]*?)'?$/,Gd=/''/g,Qd=/\S/,Xd=/[a-zA-Z]/;function nt(e,t,r,n){var b,x,y,E,V,R,S,$;const s=rd(),o=(n==null?void 0:n.locale)??s.locale??qf,i=(n==null?void 0:n.firstWeekContainsDate)??((x=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:x.firstWeekContainsDate)??s.firstWeekContainsDate??((E=(y=s.locale)==null?void 0:y.options)==null?void 0:E.firstWeekContainsDate)??1,c=(n==null?void 0:n.weekStartsOn)??((R=(V=n==null?void 0:n.locale)==null?void 0:V.options)==null?void 0:R.weekStartsOn)??s.weekStartsOn??(($=(S=s.locale)==null?void 0:S.options)==null?void 0:$.weekStartsOn)??0;if(t==="")return e===""?pe(r):Te(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:c,locale:o},h=[new ud],f=t.match(Kd).map(O=>{const q=O[0];if(q in Fo){const z=Fo[q];return z(O,o.formatLong)}return O}).join("").match(zd),v=[];for(let O of f){!(n!=null&&n.useAdditionalWeekYearTokens)&&ed(O)&&$o(O,t,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Jf(O)&&$o(O,t,e);const q=O[0],z=qd[q];if(z){const{incompatibleTokens:se}=z;if(Array.isArray(se)){const re=v.find(K=>se.includes(K.token)||K.token===q);if(re)throw new RangeError(`The format string mustn't contain \`${re.fullToken}\` and \`${O}\` at the same time`)}else if(z.incompatibleTokens==="*"&&v.length>0)throw new RangeError(`The format string mustn't contain \`${O}\` and any other token at the same time`);v.push({token:q,fullToken:O});const ae=z.run(e,O,o.match,u);if(!ae)return Te(r,NaN);h.push(ae.setter),e=ae.rest}else{if(q.match(Xd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");if(O==="''"?O="'":q==="'"&&(O=Jd(O)),e.indexOf(O)===0)e=e.slice(O.length);else return Te(r,NaN)}}if(e.length>0&&Qd.test(e))return Te(r,NaN);const P=h.map(O=>O.priority).sort((O,q)=>q-O).filter((O,q,z)=>z.indexOf(O)===q).map(O=>h.filter(q=>q.priority===O).sort((q,z)=>z.subPriority-q.subPriority)).map(O=>O[0]);let l=pe(r);if(isNaN(l.getTime()))return Te(r,NaN);const d={};for(const O of P){if(!O.validate(l,u))return Te(r,NaN);const q=O.set(l,d,u);Array.isArray(q)?(l=q[0],Object.assign(d,q[1])):l=q}return Te(r,l)}function Jd(e){return e.match(Zd)[1].replace(Gd,"'")}function eh(e){return Io(e,Date.now())}function th(e,t){return Wt(e,-t)}function rh(e,t){let r=t-On(e);return r<=0&&(r+=7),Wt(e,r)}function nh(e,t){const n=ah(e);let s;if(n.date){const u=ch(n.date,2);s=uh(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let i=0,c;if(n.time&&(i=lh(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(c=fh(n.timezone),isNaN(c))return new Date(NaN)}else{const u=new Date(o+i),h=new Date(0);return h.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),h.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),h}return new Date(o+i+c)}const Ur={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},sh=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,oh=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ih=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ah(e){const t={},r=e.split(Ur.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Ur.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ur.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const s=Ur.timezone.exec(n);s?(t.time=n.replace(s[1],""),t.timezone=s[1]):t.time=n}return t}function ch(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((n[1]||n[2]).length)}}function uh(e,t){if(t===null)return new Date(NaN);const r=e.match(sh);if(!r)return new Date(NaN);const n=!!r[4],s=Tr(r[1]),o=Tr(r[2])-1,i=Tr(r[3]),c=Tr(r[4]),u=Tr(r[5])-1;if(n)return gh(t,c,u)?dh(t,c,u):new Date(NaN);{const h=new Date(0);return!ph(t,o,i)||!mh(t,s)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(s,i)),h)}}function Tr(e){return e?parseInt(e):1}function lh(e){const t=e.match(oh);if(!t)return NaN;const r=In(t[1]),n=In(t[2]),s=In(t[3]);return bh(r,n,s)?r*Cn+n*kn+s*1e3:NaN}function In(e){return e&&parseFloat(e.replace(",","."))||0}function fh(e){if(e==="Z")return 0;const t=e.match(ih);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return yh(n,s)?r*(n*Cn+s*kn):NaN}function dh(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const s=n.getUTCDay()||7,o=(t-1)*7+r+1-s;return n.setUTCDate(n.getUTCDate()+o),n}const hh=[31,null,31,30,31,30,31,31,30,31,30,31];function Uo(e){return e%400===0||e%4===0&&e%100!==0}function ph(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(hh[t]||(Uo(e)?29:28))}function mh(e,t){return t>=1&&t<=(Uo(e)?366:365)}function gh(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function bh(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function yh(e,t){return t>=0&&t<=59}function vh(e,t){const r=pe(e),n=r.getFullYear(),s=r.getDate(),o=Te(e,0);o.setFullYear(n,t,15),o.setHours(0,0,0,0);const i=Ho(o);return r.setMonth(t,Math.min(s,i)),r}function xh(e,t){const r=pe(e);return isNaN(+r)?Te(e,NaN):(r.setFullYear(t),r)}function Mn(e,t){return bt(e,-t)}function Rn(e,t){return xr(e,-t)}function qo(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function wh(e,t,r){const n=[];for(let s=e;s<=t;s++)n.push(r?r(s):s);return n}function Ph(e,t){const r=e.target;return r?!t.isSameNode(r)&&!t.contains(r):!1}function Th(e,t){return e.isSameNode(t)||e.contains(t)}function Sh(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,c]=r[s];if(typeof c=="string"&&c.indexOf(",")>-1){if(!c.split(",").map(h=>h.trim()).includes(n[i]))return!1}else if(n[i]!==c)return!1}return!0}function Eh(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,c]=r[s];if(typeof c=="string"&&c.indexOf(",")>-1){if(c.split(",").map(h=>h.trim()).includes(n[i]))return!0}else if(n[i]===c)return!0}return!1}function zo(e,t,r=!1,n){if(r&&Sh(e,t)){if(!n||(n==null?void 0:n(e))===!0)return e}else if(!r&&Eh(e,t)&&(!n||(n==null?void 0:n(e))===!0))return e;return e.parentElement?zo(e.parentElement,t,r,n):e}function Ko(e,t){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,o=r.length;s<o;s++){const i=getComputedStyle(r[s]);i[e]&&t(i[e])&&n.push(i[e])}return n}function Hp(e){return e}function _h(e){const t=document.documentElement;Object.keys(e).forEach(r=>{t.style.setProperty(r,e[r])})}function kh(e){return{"--theme-bsc-primary-1":e.primary1,"--theme-bsc-primary-2":e.primary2,"--theme-bsc-primary-3":e.primary3,"--theme-bsc-primary-4":e.primary4,"--theme-bsc-primary-5":e.primary5,"--theme-bsc-gray-1":e.gray1||"#303030","--theme-bsc-gray-2":e.gray2||"#5f5f5f","--theme-bsc-gray-3":e.gray3||"#8f8f8f","--theme-bsc-gray-4":e.gray4||"#bebebe","--theme-bsc-gray-5":e.gray5||"#eee","--theme-bsc-black":e.black||"#000","--theme-bsc-white":e.white||"#fff","--theme-bsc-mono-dark-1":e.monoDark1||"#222","--theme-bsc-mono-dark-2":e.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":e.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":e.monoLight1||"#fefefe","--theme-bsc-mono-light-2":e.monoLight2||"#eee","--theme-bsc-mono-light-3":e.monoLight3||"#ccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}var He=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(He||{});const Zo=({className:e})=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),Ch=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Dh=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},Oh=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},Nh=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},jh=({className:e})=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ke=({icon:e,size:t=He.Regular,onClick:r,className:n})=>{const s=p.useRef({calendar:Zo,chevronDown:Ch,chevronLeft:Dh,chevronRight:Oh,chevronUp:Nh,close:jh}),o=p.useMemo(()=>s.current[e]||Zo,[e]),i=de({"bsc:h-[24px] bsc:w-[24px]":t===He.Regular,"bsc:h-[20px] bsc:w-[20px]":t===He.Small},n);return g.jsx("div",{onClick:r,children:g.jsx(o,{className:i})})},kt=({template:e,props:t,children:r})=>e(t,r);function Ih(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((o,i)=>o!==n[i]))return!0;const s=Object.keys(e);return Object.keys(t).some((o,i)=>o!==s[i])}function Mh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function Go(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Mh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const s=window.matchMedia(e[n]);return r.mediaQueries[n]=s,r.matches[n]=s.matches,r},{mediaQueries:{},matches:{}})}function Rh(e,t){function r(n,s){return n[s]=e.mediaQueries[s].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return Go(t.queries)}}function Lh(e){const t=or.useRef(e),[r,n]=or.useReducer(Rh,e,Go);or.useEffect(()=>{Ih(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function s(){return n({type:"updateMatches"})}function o(u){const h=s;return typeof u.addListener<"u"?u.addListener(h):u.addEventListener("change",h),h}or.useEffect(()=>{const u=Object.values(r.mediaQueries),h=u.map(o);function f(v,P){typeof v.addListener<"u"?v.removeListener(h[P]):v.removeEventListener("change",h[P])}return()=>{u.forEach(f)}},[r.mediaQueries]);const{matches:i}=r,c=or.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:c.some(Boolean),matchesAll:c.length>0&&c.every(Boolean)}}function qr(e){return Lh(Ah(e)).matchesAll}const Ln={};function Ah(e){return Ln[e]===void 0&&(Ln[e]={default:e}),Ln[e]}const An=({mobileQuery:e="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:r="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:o,desktopMarkup:i})=>{const c=qr(e),u=qr(t),h=qr(r);return c&&n?n:!c&&s?s:u&&o?o:h&&i?i:(console.error("Invalid media settings"),null)};function Qo(e,t,r){const n=o=>{const i=o.target,c=e.style.display!=="hidden";e&&c&&!Th(e,i)&&!s(r,i)&&t(!1),t(!0)},s=(o,i)=>{if(!o)return!1;for(let c=0,u=o.length;c<u;c++)if(o[c].isSameNode(i)||o[c].contains(i))return!0;return!1};return document.addEventListener("mousedown",n),n}function Xo(e){document.removeEventListener("mousedown",e)}function Fh(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function Fn(e,t){return Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Fn(e,t)}function $h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fn(e,t)}var zr={exports:{}},Kr={exports:{}},be={};/** @license React v16.13.1
83
+ */var Rs;function la(){return Rs||(Rs=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Ms)),Ms.exports}la();const fa=({intersectionObserver:e,resizeObserver:t,page:r,height:n,children:s})=>{const o=h.useRef();h.useEffect(()=>()=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current))},[]),h.useEffect(()=>(o.current&&(e==null||e.observe(o.current)),()=>{o.current&&e&&e.unobserve(o.current)}),[e]);const i=u=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current)),e==null||e.observe(u),t==null||t.observe(u),o.current=u},c=n?{height:`${n}px`}:{};return Fe.jsx("div",{"data-page":r,"data-name":"page",style:c,ref:u=>u&&i(u),children:s})};h.memo(fa);const da=({intersectionObserver:e,page:t})=>{const r=h.useRef();h.useEffect(()=>()=>{r.current&&(e==null||e.unobserve(r.current))},[]);const n=s=>{r.current&&(e==null||e.unobserve(r.current)),e==null||e.observe(s),r.current=s};return Fe.jsx("div",{"data-page":t,"data-name":"marker",ref:s=>s&&n(s)})};h.memo(da);const ha=({name:e,value:t,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const c=ht(),u=ht(),p=ht(),d=ht(),b=js(r),x=h.useMemo(()=>({nameSignal:c,valueSignal:u,readOnlySignal:p,useComparator:d,compare:b}),[]);h.useEffect(()=>{c.value=e},[e]),h.useEffect(()=>{u.value=t},[t]),h.useEffect(()=>{p.value=n},[n]),h.useEffect(()=>{d.value=r!==void 0},[r]);const l=hr(f=>{s==null||s({originalEvent:f,name:e,value:u.value})});return Fe.jsx("div",{className:o,onChange:l,children:Fe.jsx(Is,{props:x,children:i})})},Ls=h.memo(ha),pa=({value:e,className:t,children:r})=>{const[n,s]=h.useState(),[o,i]=h.useState(!1),[c,u]=h.useState(!1),p=h.useRef(),d=h.useRef(),b=h.useRef(),x=h.useRef(),l=h.useRef(),f=_s(),m=Lr(),w=h.useId(),v=h.useMemo(()=>(m==null?void 0:m.sharedId)||w,[m==null?void 0:m.sharedId,w]);h.useEffect(()=>{f&&(p.current=f.nameSignal,d.current=f.valueSignal,b.current=f.readOnlySignal,x.current=f.useComparator,l.current=f.compare)},[f]),At(()=>{var A;x&&d.current&&l.current?i(l.current(e,d.current.value)):i(e===((A=d.current)==null?void 0:A.value))}),At(()=>{var A;s((A=p.current)==null?void 0:A.value)}),At(()=>{var A;u(((A=b.current)==null?void 0:A.value)??!1)});const P=hr(A=>{A.target.checked&&d.current&&(d.current.value=e)});return pr({wrapperElement:"label",renderProps:{checked:o,readOnly:c},elementProps:{htmlFor:v},className:t,innerWrapperElement:n?Fe.jsx(nn,{id:v,name:n,type:"radio",value:e,checked:o,readOnly:c,onChange:P}):null,children:r})},As=h.memo(pa),ma=(e,t)=>{const{id:r,name:n,value:s,toggled:o=!1,readOnly:i,onChange:c,children:u,className:p}=e,[d,b]=h.useState(o),x=Lr(),l=h.useId(),f=h.useMemo(()=>(x==null?void 0:x.sharedId)||r||l,[x==null?void 0:x.sharedId,r,l]);h.useEffect(()=>{b(o)},[o]);const m=v=>{b(v.target.checked),c==null||c({originalEvent:v,name:n,value:s,checked:v.target.checked})},w=v=>{b(v)};return h.useImperativeHandle(t,()=>({setToggled:w})),pr({wrapperElement:"label",renderProps:{toggled:d,readOnly:i},elementProps:{htmlFor:f},className:p,innerWrapperElement:Fe.jsx(nn,{id:f,name:n,type:"checkbox",checked:d,readOnly:i,onChange:m}),children:u})},ga=h.memo(h.forwardRef(ma)),hn=e=>{const[t,r]=h.useState(!0),n=cs();return h.useEffect(()=>{n&&n.useAnimations!==void 0?r(n.useAnimations):e!==void 0&&r(e)},[n,e]),t},ut=({label:e,htmlFor:t,readOnly:r=!1,className:n})=>{const s=he("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!r,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":r},n);return y.jsx(ua,{htmlFor:t,className:s,children:e})},ba=(e,t)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:c=!1,labelLocation:u=ze.Right,className:p,useAnimation:d,onChange:b}=e,x=hn(d),l=he("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer",{"bc-read-only bsc:pointer-events-none bsc:text-gray-2 bsc:dark:text-mono-light-3":o,"bc-checked":i},p),f=he("bc-checkbox-label",{"bsc:ml-2":u===ze.Right,"bsc:mr-2":u===ze.Left}),m=fr(It.FocusWithin),w=he("bc-checkbox-outer bsc:group/checkbox bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",m),v=he("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]",{"bc-read-only bsc:group-data-checked/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:fill-mono-light-3":o,"bsc:group-data-checked/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1":!o,"bsc:group-data-checked/checkbox:animate-bounce bsc:group-data-partial/checkbox:animate-bounce":!o&&x,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":o||!x});return y.jsxs(Ft,{className:l,children:[n&&u===ze.Left&&y.jsx(ut,{label:n,readOnly:o,className:f}),y.jsx(Ns,{ref:t,name:r,value:s,checked:i,partial:c,readOnly:o,className:w,onChange:b,children:y.jsxs("svg",{viewBox:"0 0 21 21",className:v,children:[y.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),y.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),n&&u===ze.Right&&y.jsx(ut,{label:n,readOnly:o,className:f})]})},Fs=h.memo(h.forwardRef(ba)),Fr=e=>e==null?!1:typeof e=="object",$s=e=>e instanceof Date,Hs=e=>typeof e=="function",Ys=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},pn=e=>{if(!Fr(e))return e;const t={},r=Object.keys(e);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=e[o];Ys(i)||Hs(i)?t[o]=i:$s(i)?t[o]=new Date(i.getTime()):Array.isArray(i)?t[o]=mn(i):Fr(i)&&(t[o]=pn(i))}return t},mn=e=>{let t=e.length;const r=new Array(t);for(;t--!==0;){const n=e[t];Ys(n)||Hs(n)?r[t]=n:$s(n)?r[t]=new Date(n.getTime()):Fr(n)&&!Array.isArray(n)?r[t]=pn(n):Array.isArray(n)?r[t]=mn(n):r[t]=n}return r},ya=e=>Fr(e)?Array.isArray(e)?mn(e):pn(e):e;function va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xa=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const wa=va(xa);function Sa(e,t){for(let r=e.length;r--!==0;)if(!wa(e[r],t[r]))return!0;return!1}const gn=(e,t)=>{const r=h.useRef([]),n=r.current.length>0&&r.current[0]&&Sa(r.current[0],t);return(r.current.length===0||n)&&(r.current=[ya(t),e()]),r.current[1]},Ta=e=>{const[t,r]=h.useState(e),n=h.useRef(e);return n.current!==t&&(n.current=t),[t,r,n]},Pa=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=Ae.Vertical,className:u,onChange:p})=>{const[d,b]=h.useState([]),x=gn(()=>n,[n]);h.useEffect(()=>{b(r??[])},[r]);const l=P=>{const{value:A,checked:D}=P;let E;D?E=[...d,A]:E=d.filter(q=>q!==A),b(E),p==null||p({name:e,value:E})},f=(P,A)=>y.jsx(Fs,{name:e,label:P[s],value:P[o],checked:d.some(D=>D===P[o]),readOnly:i,onChange:D=>D&&l(D),className:"bsc:mr-3"},`${e}_checkbox_${A}`),m=he("bsc:flex bsc:flex-col bsc:gap-1",u),w=he("bsc:flex bsc:gap-1",{"bsc:flex-col":c===Ae.Vertical}),v=P=>y.jsx("div",{className:w,children:P.map(f)});return y.jsxs("div",{className:m,children:[t&&y.jsx(ut,{label:t,readOnly:i}),x&&v(x)]})},Ea=h.memo(Pa);var Ws=typeof global=="object"&&global&&global.Object===Object&&global,ka=typeof self=="object"&&self&&self.Object===Object&&self,Ke=Ws||ka||Function("return this")(),$t=Ke.Symbol,Vs=Object.prototype,Ca=Vs.hasOwnProperty,Oa=Vs.toString,gr=$t?$t.toStringTag:void 0;function Da(e){var t=Ca.call(e,gr),r=e[gr];try{e[gr]=void 0;var n=!0}catch{}var s=Oa.call(e);return n&&(t?e[gr]=r:delete e[gr]),s}var _a=Object.prototype,Na=_a.toString;function ja(e){return Na.call(e)}var Ia="[object Null]",Ma="[object Undefined]",Bs=$t?$t.toStringTag:void 0;function Ht(e){return e==null?e===void 0?Ma:Ia:Bs&&Bs in Object(e)?Da(e):ja(e)}function Yt(e){return e!=null&&typeof e=="object"}var Ra="[object Symbol]";function La(e){return typeof e=="symbol"||Yt(e)&&Ht(e)==Ra}var bn=Array.isArray,Aa=/\s/;function Fa(e){for(var t=e.length;t--&&Aa.test(e.charAt(t)););return t}var $a=/^\s+/;function Ha(e){return e&&e.slice(0,Fa(e)+1).replace($a,"")}function pt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Us=NaN,Ya=/^[-+]0x[0-9a-f]+$/i,Wa=/^0b[01]+$/i,Va=/^0o[0-7]+$/i,Ba=parseInt;function zs(e){if(typeof e=="number")return e;if(La(e))return Us;if(pt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ha(e);var r=Wa.test(e);return r||Va.test(e)?Ba(e.slice(2),r?2:8):Ya.test(e)?Us:+e}var Ua="[object AsyncFunction]",za="[object Function]",qa="[object GeneratorFunction]",Ka="[object Proxy]";function qs(e){if(!pt(e))return!1;var t=Ht(e);return t==za||t==qa||t==Ua||t==Ka}var yn=Ke["__core-js_shared__"],Ks=function(){var e=/[^.]+$/.exec(yn&&yn.keys&&yn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Za(e){return!!Ks&&Ks in e}var Qa=Function.prototype,Ga=Qa.toString;function Tt(e){if(e!=null){try{return Ga.call(e)}catch{}try{return e+""}catch{}}return""}var Xa=/[\\^$.*+?()[\]{}|]/g,Ja=/^\[object .+?Constructor\]$/,ec=Function.prototype,tc=Object.prototype,rc=ec.toString,nc=tc.hasOwnProperty,sc=RegExp("^"+rc.call(nc).replace(Xa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oc(e){if(!pt(e)||Za(e))return!1;var t=qs(e)?sc:Ja;return t.test(Tt(e))}function ic(e,t){return e==null?void 0:e[t]}function Pt(e,t){var r=ic(e,t);return oc(r)?r:void 0}var vn=Pt(Ke,"WeakMap"),Zs=Object.create,ac=function(){function e(){}return function(t){if(!pt(t))return{};if(Zs)return Zs(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Qs=function(){try{var e=Pt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function cc(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var uc=9007199254740991,lc=/^(?:0|[1-9]\d*)$/;function fc(e,t){var r=typeof e;return t=t??uc,!!t&&(r=="number"||r!="symbol"&&lc.test(e))&&e>-1&&e%1==0&&e<t}function dc(e,t,r){t=="__proto__"&&Qs?Qs(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Gs(e,t){return e===t||e!==e&&t!==t}var hc=Object.prototype,pc=hc.hasOwnProperty;function mc(e,t,r){var n=e[t];(!(pc.call(e,t)&&Gs(n,r))||r===void 0&&!(t in e))&&dc(e,t,r)}var gc=9007199254740991;function Xs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gc}function bc(e){return e!=null&&Xs(e.length)&&!qs(e)}var yc=Object.prototype;function Js(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||yc;return e===r}function vc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var xc="[object Arguments]";function eo(e){return Yt(e)&&Ht(e)==xc}var to=Object.prototype,wc=to.hasOwnProperty,Sc=to.propertyIsEnumerable,Tc=eo(function(){return arguments}())?eo:function(e){return Yt(e)&&wc.call(e,"callee")&&!Sc.call(e,"callee")};function Pc(){return!1}var ro=typeof se=="object"&&se&&!se.nodeType&&se,no=ro&&typeof module=="object"&&module&&!module.nodeType&&module,Ec=no&&no.exports===ro,so=Ec?Ke.Buffer:void 0,kc=so?so.isBuffer:void 0,oo=kc||Pc,Cc="[object Arguments]",Oc="[object Array]",Dc="[object Boolean]",_c="[object Date]",Nc="[object Error]",jc="[object Function]",Ic="[object Map]",Mc="[object Number]",Rc="[object Object]",Lc="[object RegExp]",Ac="[object Set]",Fc="[object String]",$c="[object WeakMap]",Hc="[object ArrayBuffer]",Yc="[object DataView]",Wc="[object Float32Array]",Vc="[object Float64Array]",Bc="[object Int8Array]",Uc="[object Int16Array]",zc="[object Int32Array]",qc="[object Uint8Array]",Kc="[object Uint8ClampedArray]",Zc="[object Uint16Array]",Qc="[object Uint32Array]",Pe={};Pe[Wc]=Pe[Vc]=Pe[Bc]=Pe[Uc]=Pe[zc]=Pe[qc]=Pe[Kc]=Pe[Zc]=Pe[Qc]=!0,Pe[Cc]=Pe[Oc]=Pe[Hc]=Pe[Dc]=Pe[Yc]=Pe[_c]=Pe[Nc]=Pe[jc]=Pe[Ic]=Pe[Mc]=Pe[Rc]=Pe[Lc]=Pe[Ac]=Pe[Fc]=Pe[$c]=!1;function Gc(e){return Yt(e)&&Xs(e.length)&&!!Pe[Ht(e)]}function xn(e){return function(t){return e(t)}}var io=typeof se=="object"&&se&&!se.nodeType&&se,br=io&&typeof module=="object"&&module&&!module.nodeType&&module,Xc=br&&br.exports===io,wn=Xc&&Ws.process,Wt=function(){try{var e=br&&br.require&&br.require("util").types;return e||wn&&wn.binding&&wn.binding("util")}catch{}}(),ao=Wt&&Wt.isTypedArray,Jc=ao?xn(ao):Gc,eu=Object.prototype,tu=eu.hasOwnProperty;function ru(e,t){var r=bn(e),n=!r&&Tc(e),s=!r&&!n&&oo(e),o=!r&&!n&&!s&&Jc(e),i=r||n||s||o,c=i?vc(e.length,String):[],u=c.length;for(var p in e)tu.call(e,p)&&!(i&&(p=="length"||s&&(p=="offset"||p=="parent")||o&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||fc(p,u)))&&c.push(p);return c}function co(e,t){return function(r){return e(t(r))}}var nu=co(Object.keys,Object),su=Object.prototype,ou=su.hasOwnProperty;function iu(e){if(!Js(e))return nu(e);var t=[];for(var r in Object(e))ou.call(e,r)&&r!="constructor"&&t.push(r);return t}function au(e){return bc(e)?ru(e):iu(e)}var yr=Pt(Object,"create");function cu(){this.__data__=yr?yr(null):{},this.size=0}function uu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var lu="__lodash_hash_undefined__",fu=Object.prototype,du=fu.hasOwnProperty;function hu(e){var t=this.__data__;if(yr){var r=t[e];return r===lu?void 0:r}return du.call(t,e)?t[e]:void 0}var pu=Object.prototype,mu=pu.hasOwnProperty;function gu(e){var t=this.__data__;return yr?t[e]!==void 0:mu.call(t,e)}var bu="__lodash_hash_undefined__";function yu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yr&&t===void 0?bu:t,this}function Et(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Et.prototype.clear=cu,Et.prototype.delete=uu,Et.prototype.get=hu,Et.prototype.has=gu,Et.prototype.set=yu;function vu(){this.__data__=[],this.size=0}function $r(e,t){for(var r=e.length;r--;)if(Gs(e[r][0],t))return r;return-1}var xu=Array.prototype,wu=xu.splice;function Su(e){var t=this.__data__,r=$r(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():wu.call(t,r,1),--this.size,!0}function Tu(e){var t=this.__data__,r=$r(t,e);return r<0?void 0:t[r][1]}function Pu(e){return $r(this.__data__,e)>-1}function Eu(e,t){var r=this.__data__,n=$r(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function lt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lt.prototype.clear=vu,lt.prototype.delete=Su,lt.prototype.get=Tu,lt.prototype.has=Pu,lt.prototype.set=Eu;var vr=Pt(Ke,"Map");function ku(){this.size=0,this.__data__={hash:new Et,map:new(vr||lt),string:new Et}}function Cu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Hr(e,t){var r=e.__data__;return Cu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ou(e){var t=Hr(this,e).delete(e);return this.size-=t?1:0,t}function Du(e){return Hr(this,e).get(e)}function _u(e){return Hr(this,e).has(e)}function Nu(e,t){var r=Hr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Vt.prototype.clear=ku,Vt.prototype.delete=Ou,Vt.prototype.get=Du,Vt.prototype.has=_u,Vt.prototype.set=Nu;function ju(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var Iu=co(Object.getPrototypeOf,Object);function Mu(){this.__data__=new lt,this.size=0}function Ru(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Lu(e){return this.__data__.get(e)}function Au(e){return this.__data__.has(e)}var Fu=200;function $u(e,t){var r=this.__data__;if(r instanceof lt){var n=r.__data__;if(!vr||n.length<Fu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Vt(n)}return r.set(e,t),this.size=r.size,this}function Bt(e){var t=this.__data__=new lt(e);this.size=t.size}Bt.prototype.clear=Mu,Bt.prototype.delete=Ru,Bt.prototype.get=Lu,Bt.prototype.has=Au,Bt.prototype.set=$u;var uo=typeof se=="object"&&se&&!se.nodeType&&se,lo=uo&&typeof module=="object"&&module&&!module.nodeType&&module,Hu=lo&&lo.exports===uo,fo=Hu?Ke.Buffer:void 0;fo&&fo.allocUnsafe;function Yu(e,t){return e.slice()}function Wu(e,t){for(var r=-1,n=e==null?0:e.length,s=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[s++]=i)}return o}function Vu(){return[]}var Bu=Object.prototype,Uu=Bu.propertyIsEnumerable,ho=Object.getOwnPropertySymbols,zu=ho?function(e){return e==null?[]:(e=Object(e),Wu(ho(e),function(t){return Uu.call(e,t)}))}:Vu;function qu(e,t,r){var n=t(e);return bn(e)?n:ju(n,r(e))}function Ku(e){return qu(e,au,zu)}var Sn=Pt(Ke,"DataView"),Tn=Pt(Ke,"Promise"),Pn=Pt(Ke,"Set"),po="[object Map]",Zu="[object Object]",mo="[object Promise]",go="[object Set]",bo="[object WeakMap]",yo="[object DataView]",Qu=Tt(Sn),Gu=Tt(vr),Xu=Tt(Tn),Ju=Tt(Pn),el=Tt(vn),ft=Ht;(Sn&&ft(new Sn(new ArrayBuffer(1)))!=yo||vr&&ft(new vr)!=po||Tn&&ft(Tn.resolve())!=mo||Pn&&ft(new Pn)!=go||vn&&ft(new vn)!=bo)&&(ft=function(e){var t=Ht(e),r=t==Zu?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case Qu:return yo;case Gu:return po;case Xu:return mo;case Ju:return go;case el:return bo}return t});var tl=Object.prototype,rl=tl.hasOwnProperty;function nl(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&rl.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var vo=Ke.Uint8Array;function En(e){var t=new e.constructor(e.byteLength);return new vo(t).set(new vo(e)),t}function sl(e,t){var r=En(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var ol=/\w*$/;function il(e){var t=new e.constructor(e.source,ol.exec(e));return t.lastIndex=e.lastIndex,t}var xo=$t?$t.prototype:void 0,wo=xo?xo.valueOf:void 0;function al(e){return wo?Object(wo.call(e)):{}}function cl(e,t){var r=En(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var ul="[object Boolean]",ll="[object Date]",fl="[object Map]",dl="[object Number]",hl="[object RegExp]",pl="[object Set]",ml="[object String]",gl="[object Symbol]",bl="[object ArrayBuffer]",yl="[object DataView]",vl="[object Float32Array]",xl="[object Float64Array]",wl="[object Int8Array]",Sl="[object Int16Array]",Tl="[object Int32Array]",Pl="[object Uint8Array]",El="[object Uint8ClampedArray]",kl="[object Uint16Array]",Cl="[object Uint32Array]";function Ol(e,t,r){var n=e.constructor;switch(t){case bl:return En(e);case ul:case ll:return new n(+e);case yl:return sl(e);case vl:case xl:case wl:case Sl:case Tl:case Pl:case El:case kl:case Cl:return cl(e);case fl:return new n;case dl:case ml:return new n(e);case hl:return il(e);case pl:return new n;case gl:return al(e)}}function Dl(e){return typeof e.constructor=="function"&&!Js(e)?ac(Iu(e)):{}}var _l="[object Map]";function Nl(e){return Yt(e)&&ft(e)==_l}var So=Wt&&Wt.isMap,jl=So?xn(So):Nl,Il="[object Set]";function Ml(e){return Yt(e)&&ft(e)==Il}var To=Wt&&Wt.isSet,Rl=To?xn(To):Ml,Po="[object Arguments]",Ll="[object Array]",Al="[object Boolean]",Fl="[object Date]",$l="[object Error]",Eo="[object Function]",Hl="[object GeneratorFunction]",Yl="[object Map]",Wl="[object Number]",ko="[object Object]",Vl="[object RegExp]",Bl="[object Set]",Ul="[object String]",zl="[object Symbol]",ql="[object WeakMap]",Kl="[object ArrayBuffer]",Zl="[object DataView]",Ql="[object Float32Array]",Gl="[object Float64Array]",Xl="[object Int8Array]",Jl="[object Int16Array]",ef="[object Int32Array]",tf="[object Uint8Array]",rf="[object Uint8ClampedArray]",nf="[object Uint16Array]",sf="[object Uint32Array]",Se={};Se[Po]=Se[Ll]=Se[Kl]=Se[Zl]=Se[Al]=Se[Fl]=Se[Ql]=Se[Gl]=Se[Xl]=Se[Jl]=Se[ef]=Se[Yl]=Se[Wl]=Se[ko]=Se[Vl]=Se[Bl]=Se[Ul]=Se[zl]=Se[tf]=Se[rf]=Se[nf]=Se[sf]=!0,Se[$l]=Se[Eo]=Se[ql]=!1;function Yr(e,t,r,n,s,o){var i;if(i!==void 0)return i;if(!pt(e))return e;var c=bn(e);if(c)i=nl(e);else{var u=ft(e),p=u==Eo||u==Hl;if(oo(e))return Yu(e);if(u==ko||u==Po||p&&!s)i=p?{}:Dl(e);else{if(!Se[u])return s?e:{};i=Ol(e,u)}}o||(o=new Bt);var d=o.get(e);if(d)return d;o.set(e,i),Rl(e)?e.forEach(function(l){i.add(Yr(l,t,r,l,e,o))}):jl(e)&&e.forEach(function(l,f){i.set(f,Yr(l,t,r,f,e,o))});var b=Ku,x=c?void 0:b(e);return cc(x||e,function(l,f){x&&(f=l,l=e[f]),mc(i,f,Yr(l,t,r,f,e,o))}),i}var of=1,af=4;function cf(e){return Yr(e,of|af)}var kn=function(){return Ke.Date.now()},uf="Expected a function",lf=Math.max,ff=Math.min;function xr(e,t,r){var n,s,o,i,c,u,p=0,d=!1,b=!1,x=!0;if(typeof e!="function")throw new TypeError(uf);t=zs(t)||0,pt(r)&&(d=!!r.leading,b="maxWait"in r,o=b?lf(zs(r.maxWait)||0,t):o,x="trailing"in r?!!r.trailing:x);function l(q){var R=n,B=s;return n=s=void 0,p=q,i=e.apply(B,R),i}function f(q){return p=q,c=setTimeout(v,t),d?l(q):i}function m(q){var R=q-u,B=q-p,H=t-R;return b?ff(H,o-B):H}function w(q){var R=q-u,B=q-p;return u===void 0||R>=t||R<0||b&&B>=o}function v(){var q=kn();if(w(q))return P(q);c=setTimeout(v,m(q))}function P(q){return c=void 0,x&&n?l(q):(n=s=void 0,i)}function A(){c!==void 0&&clearTimeout(c),p=0,n=u=s=c=void 0}function D(){return c===void 0?i:P(kn())}function E(){var q=kn(),R=w(q);if(n=arguments,s=this,u=q,R){if(c===void 0)return f(u);if(b)return clearTimeout(c),c=setTimeout(v,t),l(u)}return c===void 0&&(c=setTimeout(v,t)),i}return E.cancel=A,E.flush=D,E}var df="Expected a function";function hf(e,t,r){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(df);return pt(r)&&(n="leading"in r?!0:n,s="trailing"in r?!!r.trailing:s),xr(e,t,{leading:n,maxWait:t,trailing:s})}const pf=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:c,className:u,leftElementClassName:p,rightElementClassName:d,isSingleLine:b=!0,allowSingleLineScroll:x=!1,inputMode:l,placeholder:f,onFocus:m,onBlur:w,onInput:v,onInnerTextChange:P,onInnerHTMLChange:A,onElementCreate:D,onLeftElementClick:E,onRightElementClick:q}=e,R=h.useRef("bsc:grow bsc:focus:outline-hidden"),B=h.useRef("bsc:text-gray-4"),H=h.useRef(),ne=h.useCallback(C=>{const U=C.target,ee=U.innerHTML;U.className=`${R.current}`,f&&ee===f&&(U.innerHTML=""),m==null||m(C)},[f,m]),oe=h.useCallback(C=>{const U=C.target.innerHTML;if(f&&U===""){const ee=C.target;ee.innerHTML=f,ee.className=`${R.current} ${B.current}`}w==null||w(C)},[f,w]),W=h.useCallback(C=>{var U,ee;(U=H.current)==null||U.removeEventListener("focus",ne),(ee=H.current)==null||ee.removeEventListener("blur",oe),f&&C&&C!==document.activeElement&&C.innerHTML===""&&(C.innerHTML=f,C.className=`${R.current} ${B.current}`),C.addEventListener("focus",ne),C.addEventListener("blur",oe),H.current=C},[f]),$=h.useCallback(C=>{D==null||D(C)},[D]),I=C=>{E==null||E(C)},Z=C=>{q==null||q(C)},F=xr(C=>{v==null||v(C),P==null||P(C.target.innerText),A==null||A(C.target.innerHTML)},s),Q=h.useCallback(C=>{H.current&&(H.current.innerText=C)},[]),j=h.useCallback(C=>{H.current&&(H.current.innerHTML=C)},[]),ue=h.useCallback(()=>{var C;(C=H.current)==null||C.focus()},[]);h.useImperativeHandle(t,()=>({inputElement:H.current,setInnerText:Q,setInnerHTML:j,focus:ue}));const k=he({"bsc:w-full ":o},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":b&&x,"bsc:overflow-hidden bsc:whitespace-pre":b&&!x},u),M=he("bsc:shrink",{"bsc:mr-2":i},p),_=he("bsc:shrink",{"bsc:ml-2":c},d);return y.jsxs("div",{className:k,ref:C=>C&&$(C),children:[i&&y.jsx("div",{className:M,onClick:I,children:i}),y.jsx("div",{ref:C=>C&&W(C),className:R.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:l,onInput:F,children:r}),c&&y.jsx("div",{className:_,onClick:Z,children:c})]})},Wr=h.forwardRef(pf);function pe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Te(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ut(e,t){const r=pe(e);return isNaN(t)?Te(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function mt(e,t){const r=pe(e);if(isNaN(t))return Te(e,NaN);if(!t)return r;const n=r.getDate(),s=Te(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return n>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const Co=6048e5,Cn=6e4,On=36e5,mf=1e3;let gf={};function wr(){return gf}function gt(e,t){var c,u,p,d;const r=wr(),n=(t==null?void 0:t.weekStartsOn)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((d=(p=r.locale)==null?void 0:p.options)==null?void 0:d.weekStartsOn)??0,s=pe(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function zt(e){return gt(e,{weekStartsOn:1})}function bf(e){const t=pe(e),r=t.getFullYear(),n=Te(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=zt(n),o=Te(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=zt(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Oo(e){const t=pe(e);return t.setHours(0,0,0,0),t}function Do(e){const t=pe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function yf(e){const t=bf(e),r=Te(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),zt(r)}function Sr(e,t){return mt(e,t*12)}function _o(e,t){const r=Oo(e),n=Oo(t);return+r==+n}function vf(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function xf(e,t){const r=pe(e.start),n=pe(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0);let c=1;const u=[];for(;+i<=o;)u.push(pe(i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return s?u.reverse():u}function No(e){const t=pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function wf(e,t){const r=pe(e.start),n=pe(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let c=1;const u=[];for(;+i<=o;)u.push(pe(i)),i.setFullYear(i.getFullYear()+c);return s?u.reverse():u}const Sf={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"}},Tf=(e,t,r)=>{let n;const s=Sf[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Dn(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Pf={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ef={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Cf={date:Dn({formats:Pf,defaultWidth:"full"}),time:Dn({formats:Ef,defaultWidth:"full"}),dateTime:Dn({formats:kf,defaultWidth:"full"})},Of={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Df=(e,t,r,n)=>Of[e];function Tr(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=r!=null&&r.width?String(r.width):i;s=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[c]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const _f={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jf={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"]},If={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"]},Mf={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"}},Rf={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"}},Lf={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Tr({values:_f,defaultWidth:"wide"}),quarter:Tr({values:Nf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Tr({values:jf,defaultWidth:"wide"}),day:Tr({values:If,defaultWidth:"wide"}),dayPeriod:Tr({values:Mf,defaultWidth:"wide",formattingValues:Rf,defaultFormattingWidth:"wide"})};function Pr(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Ff(c,b=>b.test(i)):Af(c,b=>b.test(i));let p;p=e.valueCallback?e.valueCallback(u):u,p=r.valueCallback?r.valueCallback(p):p;const d=t.slice(i.length);return{value:p,rest:d}}}function Af(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Ff(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function $f(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const c=t.slice(s.length);return{value:i,rest:c}}}const Hf=/^(\d+)(th|st|nd|rd)?/i,Yf=/\d+/i,Wf={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},Vf={any:[/^b/i,/^(a|c)/i]},Bf={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Uf={any:[/1/i,/2/i,/3/i,/4/i]},zf={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},qf={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]},Kf={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},Zf={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]},Qf={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},Gf={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}},Xf={ordinalNumber:$f({matchPattern:Hf,parsePattern:Yf,valueCallback:e=>parseInt(e,10)}),era:Pr({matchPatterns:Wf,defaultMatchWidth:"wide",parsePatterns:Vf,defaultParseWidth:"any"}),quarter:Pr({matchPatterns:Bf,defaultMatchWidth:"wide",parsePatterns:Uf,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pr({matchPatterns:zf,defaultMatchWidth:"wide",parsePatterns:qf,defaultParseWidth:"any"}),day:Pr({matchPatterns:Kf,defaultMatchWidth:"wide",parsePatterns:Zf,defaultParseWidth:"any"}),dayPeriod:Pr({matchPatterns:Qf,defaultMatchWidth:"any",parsePatterns:Gf,defaultParseWidth:"any"})},Jf={code:"en-US",formatDistance:Tf,formatLong:Cf,formatRelative:Df,localize:Lf,match:Xf,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ed(e){const t=pe(e),r=+zt(t)-+yf(t);return Math.round(r/Co)+1}function jo(e,t){var d,b,x,l;const r=pe(e),n=r.getFullYear(),s=wr(),o=(t==null?void 0:t.firstWeekContainsDate)??((b=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:b.firstWeekContainsDate)??s.firstWeekContainsDate??((l=(x=s.locale)==null?void 0:x.options)==null?void 0:l.firstWeekContainsDate)??1,i=Te(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const c=gt(i,t),u=Te(e,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const p=gt(u,t);return r.getTime()>=c.getTime()?n+1:r.getTime()>=p.getTime()?n:n-1}function td(e,t){var c,u,p,d;const r=wr(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(p=r.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??1,s=jo(e,t),o=Te(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),gt(o,t)}function rd(e,t){const r=pe(e),n=+gt(r,t)-+td(r,t);return Math.round(n/Co)+1}const Io=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Mo=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ro={p:Mo,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Io(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Io(n,t)).replace("{{time}}",Mo(s,t))}},nd=/^D+$/,sd=/^Y+$/,od=["D","DD","YY","YYYY"];function id(e){return nd.test(e)}function ad(e){return sd.test(e)}function Lo(e,t,r){const n=cd(e,t,r);if(console.warn(n),od.includes(e))throw new RangeError(n)}function cd(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function _n(e){return pe(e).getDay()}function Ao(e){const t=pe(e),r=t.getFullYear(),n=t.getMonth(),s=Te(e,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function ud(){return Object.assign({},wr())}function ld(e){let r=pe(e).getDay();return r===0&&(r=7),r}function fd(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function dd(e,t){const r=pe(e),n=pe(t);return+r<+n}function hd(e,t){const r=t instanceof Date?Te(t,0):new t(0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}const pd=10;class Fo{constructor(){T(this,"subPriority",0)}validate(t,r){return!0}}class md extends Fo{constructor(t,r,n,s,o){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=s,o&&(this.subPriority=o)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class gd extends Fo{constructor(){super(...arguments);T(this,"priority",pd);T(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:Te(r,hd(r,Date))}}class me{run(t,r,n,s){const o=this.parse(t,r,n,s);return o?{setter:new md(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class bd extends me{constructor(){super(...arguments);T(this,"priority",140);T(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}set(r,n,s){return n.era=s,r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}const je={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}/},et={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 Ie(e,t){return e&&{value:t(e.value),rest:e.rest}}function Oe(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function tt(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,s=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(s*On+o*Cn+i*mf),rest:t.slice(r[0].length)}}function $o(e){return Oe(je.anyDigitsSigned,e)}function De(e,t){switch(e){case 1:return Oe(je.singleDigit,t);case 2:return Oe(je.twoDigits,t);case 3:return Oe(je.threeDigits,t);case 4:return Oe(je.fourDigits,t);default:return Oe(new RegExp("^\\d{1,"+e+"}"),t)}}function Vr(e,t){switch(e){case 1:return Oe(je.singleDigitSigned,t);case 2:return Oe(je.twoDigitsSigned,t);case 3:return Oe(je.threeDigitsSigned,t);case 4:return Oe(je.fourDigitsSigned,t);default:return Oe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Nn(e){switch(e){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 Ho(e,t){const r=t>0,n=r?t:1-t;let s;if(n<=50)s=e||100;else{const o=n+50,i=Math.trunc(o/100)*100,c=e>=o%100;s=e+i-(c?100:0)}return r?s:1-s}function Yo(e){return e%400===0||e%4===0&&e%100!==0}class yd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Ie(De(4,r),o);case"yo":return Ie(s.ordinalNumber(r,{unit:"year"}),o);default:return Ie(De(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s){const o=r.getFullYear();if(s.isTwoDigitYear){const c=Ho(s.year,o);return r.setFullYear(c,0,1),r.setHours(0,0,0,0),r}const i=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}}class vd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ie(De(4,r),o);case"Yo":return Ie(s.ordinalNumber(r,{unit:"year"}),o);default:return Ie(De(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s,o){const i=jo(r,o);if(s.isTwoDigitYear){const u=Ho(s.year,i);return r.setFullYear(u,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),gt(r,o)}const c=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(c,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),gt(r,o)}}class xd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return Vr(n==="R"?4:n.length,r)}set(r,n,s){const o=Te(r,0);return o.setFullYear(s,0,4),o.setHours(0,0,0,0),zt(o)}}class wd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return Vr(n==="u"?4:n.length,r)}set(r,n,s){return r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}class Sd extends me{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"Q":case"QQ":return De(n.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class Td extends me{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"q":case"qq":return De(n.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class Pd extends me{constructor(){super(...arguments);T(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);T(this,"priority",110)}parse(r,n,s){const o=i=>i-1;switch(n){case"M":return Ie(Oe(je.month,r),o);case"MM":return Ie(De(2,r),o);case"Mo":return Ie(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}class Ed extends me{constructor(){super(...arguments);T(this,"priority",110);T(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,s){const o=i=>i-1;switch(n){case"L":return Ie(Oe(je.month,r),o);case"LL":return Ie(De(2,r),o);case"Lo":return Ie(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}function kd(e,t,r){const n=pe(e),s=rd(n,r)-t;return n.setDate(n.getDate()-s*7),n}class Cd extends me{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,s){switch(n){case"w":return Oe(je.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s,o){return gt(kd(r,s,o),o)}}function Od(e,t){const r=pe(e),n=ed(r)-t;return r.setDate(r.getDate()-n*7),r}class Dd extends me{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,s){switch(n){case"I":return Oe(je.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s){return zt(Od(r,s))}}const _d=[31,28,31,30,31,30,31,31,30,31,30,31],Nd=[31,29,31,30,31,30,31,31,30,31,30,31];class jd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"subPriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"d":return Oe(je.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return De(n.length,r)}}validate(r,n){const s=r.getFullYear(),o=Yo(s),i=r.getMonth();return o?n>=1&&n<=Nd[i]:n>=1&&n<=_d[i]}set(r,n,s){return r.setDate(s),r.setHours(0,0,0,0),r}}class Id extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"subpriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,s){switch(n){case"D":case"DD":return Oe(je.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return De(n.length,r)}}validate(r,n){const s=r.getFullYear();return Yo(s)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,s){return r.setMonth(0,s),r.setHours(0,0,0,0),r}}function jn(e,t,r){var b,x,l,f;const n=wr(),s=(r==null?void 0:r.weekStartsOn)??((x=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??n.weekStartsOn??((f=(l=n.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,o=pe(e),i=o.getDay(),u=(t%7+7)%7,p=7-s,d=t<0||t>6?t-(i+p)%7:(u+p)%7-(i+p)%7;return Ut(o,d)}class Md extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}class Rd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,s,o){const i=c=>{const u=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+u};switch(n){case"e":case"ee":return Ie(De(n.length,r),i);case"eo":return Ie(s.ordinalNumber(r,{unit:"day"}),i);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}class Ld extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,s,o){const i=c=>{const u=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+u};switch(n){case"c":case"cc":return Ie(De(n.length,r),i);case"co":return Ie(s.ordinalNumber(r,{unit:"day"}),i);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}function Ad(e,t){const r=pe(e),n=ld(r),s=t-n;return Ut(r,s)}class Fd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,s){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return De(n.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Ie(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return Ie(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Ie(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Ie(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}validate(r,n){return n>=1&&n<=7}set(r,n,s){return r=Ad(r,s),r.setHours(0,0,0,0),r}}class $d extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Hd extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Yd extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Wd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,s){switch(n){case"h":return Oe(je.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,s){const o=r.getHours()>=12;return o&&s<12?r.setHours(s+12,0,0,0):!o&&s===12?r.setHours(0,0,0,0):r.setHours(s,0,0,0),r}}class Vd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,s){switch(n){case"H":return Oe(je.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,s){return r.setHours(s,0,0,0),r}}class Bd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,s){switch(n){case"K":return Oe(je.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.getHours()>=12&&s<12?r.setHours(s+12,0,0,0):r.setHours(s,0,0,0),r}}class Ud extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,s){switch(n){case"k":return Oe(je.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,s){const o=s<=24?s%24:s;return r.setHours(o,0,0,0),r}}class zd extends me{constructor(){super(...arguments);T(this,"priority",60);T(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"m":return Oe(je.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setMinutes(s,0,0),r}}class qd extends me{constructor(){super(...arguments);T(this,"priority",50);T(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"s":return Oe(je.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setSeconds(s,0),r}}class Kd extends me{constructor(){super(...arguments);T(this,"priority",30);T(this,"incompatibleTokens",["t","T"])}parse(r,n){const s=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Ie(De(n.length,r),s)}set(r,n,s){return r.setMilliseconds(s),r}}class Zd extends me{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return tt(et.basicOptionalMinutes,r);case"XX":return tt(et.basic,r);case"XXXX":return tt(et.basicOptionalSeconds,r);case"XXXXX":return tt(et.extendedOptionalSeconds,r);case"XXX":default:return tt(et.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-Do(r)-s)}}class Qd extends me{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return tt(et.basicOptionalMinutes,r);case"xx":return tt(et.basic,r);case"xxxx":return tt(et.basicOptionalSeconds,r);case"xxxxx":return tt(et.extendedOptionalSeconds,r);case"xxx":default:return tt(et.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-Do(r)-s)}}class Gd extends me{constructor(){super(...arguments);T(this,"priority",40);T(this,"incompatibleTokens","*")}parse(r){return $o(r)}set(r,n,s){return[Te(r,s*1e3),{timestampIsSet:!0}]}}class Xd extends me{constructor(){super(...arguments);T(this,"priority",20);T(this,"incompatibleTokens","*")}parse(r){return $o(r)}set(r,n,s){return[Te(r,s),{timestampIsSet:!0}]}}const Jd={G:new bd,y:new yd,Y:new vd,R:new xd,u:new wd,Q:new Sd,q:new Td,M:new Pd,L:new Ed,w:new Cd,I:new Dd,d:new jd,D:new Id,E:new Md,e:new Rd,c:new Ld,i:new Fd,a:new $d,b:new Hd,B:new Yd,h:new Wd,H:new Vd,K:new Bd,k:new Ud,m:new zd,s:new qd,S:new Kd,X:new Zd,x:new Qd,t:new Gd,T:new Xd},eh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rh=/^'([^]*?)'?$/,nh=/''/g,sh=/\S/,oh=/[a-zA-Z]/;function rt(e,t,r,n){var m,w,v,P,A,D,E,q;const s=ud(),o=(n==null?void 0:n.locale)??s.locale??Jf,i=(n==null?void 0:n.firstWeekContainsDate)??((w=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:w.firstWeekContainsDate)??s.firstWeekContainsDate??((P=(v=s.locale)==null?void 0:v.options)==null?void 0:P.firstWeekContainsDate)??1,c=(n==null?void 0:n.weekStartsOn)??((D=(A=n==null?void 0:n.locale)==null?void 0:A.options)==null?void 0:D.weekStartsOn)??s.weekStartsOn??((q=(E=s.locale)==null?void 0:E.options)==null?void 0:q.weekStartsOn)??0;if(t==="")return e===""?pe(r):Te(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:c,locale:o},p=[new gd],d=t.match(th).map(R=>{const B=R[0];if(B in Ro){const H=Ro[B];return H(R,o.formatLong)}return R}).join("").match(eh),b=[];for(let R of d){!(n!=null&&n.useAdditionalWeekYearTokens)&&ad(R)&&Lo(R,t,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&id(R)&&Lo(R,t,e);const B=R[0],H=Jd[B];if(H){const{incompatibleTokens:ne}=H;if(Array.isArray(ne)){const W=b.find($=>ne.includes($.token)||$.token===B);if(W)throw new RangeError(`The format string mustn't contain \`${W.fullToken}\` and \`${R}\` at the same time`)}else if(H.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${R}\` and any other token at the same time`);b.push({token:B,fullToken:R});const oe=H.run(e,R,o.match,u);if(!oe)return Te(r,NaN);p.push(oe.setter),e=oe.rest}else{if(B.match(oh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");if(R==="''"?R="'":B==="'"&&(R=ih(R)),e.indexOf(R)===0)e=e.slice(R.length);else return Te(r,NaN)}}if(e.length>0&&sh.test(e))return Te(r,NaN);const x=p.map(R=>R.priority).sort((R,B)=>B-R).filter((R,B,H)=>H.indexOf(R)===B).map(R=>p.filter(B=>B.priority===R).sort((B,H)=>H.subPriority-B.subPriority)).map(R=>R[0]);let l=pe(r);if(isNaN(l.getTime()))return Te(r,NaN);const f={};for(const R of x){if(!R.validate(l,u))return Te(r,NaN);const B=R.set(l,f,u);Array.isArray(B)?(l=B[0],Object.assign(f,B[1])):l=B}return Te(r,l)}function ih(e){return e.match(rh)[1].replace(nh,"'")}function ah(e){return _o(e,Date.now())}function ch(e,t){return Ut(e,-t)}function uh(e,t){let r=t-_n(e);return r<=0&&(r+=7),Ut(e,r)}function lh(e,t){const n=ph(e);let s;if(n.date){const u=mh(n.date,2);s=gh(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let i=0,c;if(n.time&&(i=bh(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(c=yh(n.timezone),isNaN(c))return new Date(NaN)}else{const u=new Date(o+i),p=new Date(0);return p.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),p.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),p}return new Date(o+i+c)}const Br={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},fh=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,dh=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,hh=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ph(e){const t={},r=e.split(Br.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Br.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Br.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const s=Br.timezone.exec(n);s?(t.time=n.replace(s[1],""),t.timezone=s[1]):t.time=n}return t}function mh(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((n[1]||n[2]).length)}}function gh(e,t){if(t===null)return new Date(NaN);const r=e.match(fh);if(!r)return new Date(NaN);const n=!!r[4],s=Er(r[1]),o=Er(r[2])-1,i=Er(r[3]),c=Er(r[4]),u=Er(r[5])-1;if(n)return Th(t,c,u)?vh(t,c,u):new Date(NaN);{const p=new Date(0);return!wh(t,o,i)||!Sh(t,s)?new Date(NaN):(p.setUTCFullYear(t,o,Math.max(s,i)),p)}}function Er(e){return e?parseInt(e):1}function bh(e){const t=e.match(dh);if(!t)return NaN;const r=In(t[1]),n=In(t[2]),s=In(t[3]);return Ph(r,n,s)?r*On+n*Cn+s*1e3:NaN}function In(e){return e&&parseFloat(e.replace(",","."))||0}function yh(e){if(e==="Z")return 0;const t=e.match(hh);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return Eh(n,s)?r*(n*On+s*Cn):NaN}function vh(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const s=n.getUTCDay()||7,o=(t-1)*7+r+1-s;return n.setUTCDate(n.getUTCDate()+o),n}const xh=[31,null,31,30,31,30,31,31,30,31,30,31];function Wo(e){return e%400===0||e%4===0&&e%100!==0}function wh(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(xh[t]||(Wo(e)?29:28))}function Sh(e,t){return t>=1&&t<=(Wo(e)?366:365)}function Th(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function Ph(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function Eh(e,t){return t>=0&&t<=59}function kh(e,t){const r=pe(e),n=r.getFullYear(),s=r.getDate(),o=Te(e,0);o.setFullYear(n,t,15),o.setHours(0,0,0,0);const i=Ao(o);return r.setMonth(t,Math.min(s,i)),r}function Ch(e,t){const r=pe(e);return isNaN(+r)?Te(e,NaN):(r.setFullYear(t),r)}function Mn(e,t){return mt(e,-t)}function Rn(e,t){return Sr(e,-t)}function Vo(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function Oh(e,t,r){const n=[];for(let s=e;s<=t;s++)n.push(r?r(s):s);return n}function Dh(e,t){const r=e.target;return r?!t.isSameNode(r)&&!t.contains(r):!1}function _h(e,t){return e.isSameNode(t)||e.contains(t)}function Nh(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,c]=r[s];if(typeof c=="string"&&c.indexOf(",")>-1){if(!c.split(",").map(p=>p.trim()).includes(n[i]))return!1}else if(n[i]!==c)return!1}return!0}function jh(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,c]=r[s];if(typeof c=="string"&&c.indexOf(",")>-1){if(c.split(",").map(p=>p.trim()).includes(n[i]))return!0}else if(n[i]===c)return!0}return!1}function Bo(e,t,r=!1,n){if(r&&Nh(e,t)){if(!n||(n==null?void 0:n(e))===!0)return e}else if(!r&&jh(e,t)&&(!n||(n==null?void 0:n(e))===!0))return e;return e.parentElement?Bo(e.parentElement,t,r,n):e}function Uo(e,t){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,o=r.length;s<o;s++){const i=getComputedStyle(r[s]);i[e]&&t(i[e])&&n.push(i[e])}return n}function Up(e){return e}function Ih(e){const t=document.documentElement;Object.keys(e).forEach(r=>{t.style.setProperty(r,e[r])})}function Mh(e){return{"--theme-bsc-primary-1":e.primary1,"--theme-bsc-primary-2":e.primary2,"--theme-bsc-primary-3":e.primary3,"--theme-bsc-primary-4":e.primary4,"--theme-bsc-primary-5":e.primary5,"--theme-bsc-gray-1":e.gray1||"#303030","--theme-bsc-gray-2":e.gray2||"#5f5f5f","--theme-bsc-gray-3":e.gray3||"#8f8f8f","--theme-bsc-gray-4":e.gray4||"#bebebe","--theme-bsc-gray-5":e.gray5||"#eee","--theme-bsc-black":e.black||"#000","--theme-bsc-white":e.white||"#fff","--theme-bsc-mono-dark-1":e.monoDark1||"#222","--theme-bsc-mono-dark-2":e.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":e.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":e.monoLight1||"#fefefe","--theme-bsc-mono-light-2":e.monoLight2||"#eee","--theme-bsc-mono-light-3":e.monoLight3||"#ccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}var He=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(He||{});const zo=({className:e})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),Rh=({className:e})=>{const t=he("bsc:h-6 bsc:w-6",e);return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Lh=({className:e})=>{const t=he("bsc:h-6 bsc:w-6",e);return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},Ah=({className:e})=>{const t=he("bsc:h-6 bsc:w-6",e);return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},Fh=({className:e})=>{const t=he("bsc:h-6 bsc:w-6",e);return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},$h=({className:e})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),qe=({icon:e,size:t=He.Regular,onClick:r,className:n})=>{const s=h.useRef({calendar:zo,chevronDown:Rh,chevronLeft:Lh,chevronRight:Ah,chevronUp:Fh,close:$h}),o=h.useMemo(()=>s.current[e]||zo,[e]),i=he({"bsc:h-[24px] bsc:w-[24px]":t===He.Regular,"bsc:h-[20px] bsc:w-[20px]":t===He.Small},n);return y.jsx("div",{onClick:r,children:y.jsx(o,{className:i})})},kt=({template:e,props:t,children:r})=>e(t,r);function Hh(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((o,i)=>o!==n[i]))return!0;const s=Object.keys(e);return Object.keys(t).some((o,i)=>o!==s[i])}function Yh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function qo(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Yh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const s=window.matchMedia(e[n]);return r.mediaQueries[n]=s,r.matches[n]=s.matches,r},{mediaQueries:{},matches:{}})}function Wh(e,t){function r(n,s){return n[s]=e.mediaQueries[s].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return qo(t.queries)}}function Vh(e){const t=cr.useRef(e),[r,n]=cr.useReducer(Wh,e,qo);cr.useEffect(()=>{Hh(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function s(){return n({type:"updateMatches"})}function o(u){const p=s;return typeof u.addListener<"u"?u.addListener(p):u.addEventListener("change",p),p}cr.useEffect(()=>{const u=Object.values(r.mediaQueries),p=u.map(o);function d(b,x){typeof b.addListener<"u"?b.removeListener(p[x]):b.removeEventListener("change",p[x])}return()=>{u.forEach(d)}},[r.mediaQueries]);const{matches:i}=r,c=cr.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:c.some(Boolean),matchesAll:c.length>0&&c.every(Boolean)}}function Ur(e){return Vh(Bh(e)).matchesAll}const Ln={};function Bh(e){return Ln[e]===void 0&&(Ln[e]={default:e}),Ln[e]}const An=({mobileQuery:e="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:r="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:o,desktopMarkup:i})=>{const c=Ur(e),u=Ur(t),p=Ur(r);return c&&n?n:!c&&s?s:u&&o?o:p&&i?i:(console.error("Invalid media settings"),null)};function Ko(e,t,r){const n=o=>{const i=o.target,c=e.style.display!=="hidden";e&&c&&!_h(e,i)&&!s(r,i)&&t(!1),t(!0)},s=(o,i)=>{if(!o)return!1;for(let c=0,u=o.length;c<u;c++)if(o[c].isSameNode(i)||o[c].contains(i))return!0;return!1};return document.addEventListener("mousedown",n),n}function Zo(e){document.removeEventListener("mousedown",e)}function Uh(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function Fn(e,t){return Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Fn(e,t)}function zh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fn(e,t)}var zr={exports:{}},qr={exports:{}},ye={};/** @license React v16.13.1
68
84
  * react-is.production.min.js
69
85
  *
70
86
  * Copyright (c) Facebook, Inc. and its affiliates.
71
87
  *
72
88
  * This source code is licensed under the MIT license found in the
73
89
  * LICENSE file in the root directory of this source tree.
74
- */var Jo;function Hh(){if(Jo)return be;Jo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,P=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function V(S){if(typeof S=="object"&&S!==null){var $=S.$$typeof;switch($){case t:switch(S=S.type,S){case u:case h:case n:case o:case s:case v:return S;default:switch(S=S&&S.$$typeof,S){case c:case f:case d:case l:case i:return S;default:return $}}case r:return $}}}function R(S){return V(S)===h}return be.AsyncMode=u,be.ConcurrentMode=h,be.ContextConsumer=c,be.ContextProvider=i,be.Element=t,be.ForwardRef=f,be.Fragment=n,be.Lazy=d,be.Memo=l,be.Portal=r,be.Profiler=o,be.StrictMode=s,be.Suspense=v,be.isAsyncMode=function(S){return R(S)||V(S)===u},be.isConcurrentMode=R,be.isContextConsumer=function(S){return V(S)===c},be.isContextProvider=function(S){return V(S)===i},be.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},be.isForwardRef=function(S){return V(S)===f},be.isFragment=function(S){return V(S)===n},be.isLazy=function(S){return V(S)===d},be.isMemo=function(S){return V(S)===l},be.isPortal=function(S){return V(S)===r},be.isProfiler=function(S){return V(S)===o},be.isStrictMode=function(S){return V(S)===s},be.isSuspense=function(S){return V(S)===v},be.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===h||S===o||S===s||S===v||S===P||typeof S=="object"&&S!==null&&(S.$$typeof===d||S.$$typeof===l||S.$$typeof===i||S.$$typeof===c||S.$$typeof===f||S.$$typeof===x||S.$$typeof===y||S.$$typeof===E||S.$$typeof===b)},be.typeOf=V,be}var ye={};/** @license React v16.13.1
90
+ */var Qo;function qh(){if(Qo)return ye;Qo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function A(E){if(typeof E=="object"&&E!==null){var q=E.$$typeof;switch(q){case t:switch(E=E.type,E){case u:case p:case n:case o:case s:case b:return E;default:switch(E=E&&E.$$typeof,E){case c:case d:case f:case l:case i:return E;default:return q}}case r:return q}}}function D(E){return A(E)===p}return ye.AsyncMode=u,ye.ConcurrentMode=p,ye.ContextConsumer=c,ye.ContextProvider=i,ye.Element=t,ye.ForwardRef=d,ye.Fragment=n,ye.Lazy=f,ye.Memo=l,ye.Portal=r,ye.Profiler=o,ye.StrictMode=s,ye.Suspense=b,ye.isAsyncMode=function(E){return D(E)||A(E)===u},ye.isConcurrentMode=D,ye.isContextConsumer=function(E){return A(E)===c},ye.isContextProvider=function(E){return A(E)===i},ye.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ye.isForwardRef=function(E){return A(E)===d},ye.isFragment=function(E){return A(E)===n},ye.isLazy=function(E){return A(E)===f},ye.isMemo=function(E){return A(E)===l},ye.isPortal=function(E){return A(E)===r},ye.isProfiler=function(E){return A(E)===o},ye.isStrictMode=function(E){return A(E)===s},ye.isSuspense=function(E){return A(E)===b},ye.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===p||E===o||E===s||E===b||E===x||typeof E=="object"&&E!==null&&(E.$$typeof===f||E.$$typeof===l||E.$$typeof===i||E.$$typeof===c||E.$$typeof===d||E.$$typeof===w||E.$$typeof===v||E.$$typeof===P||E.$$typeof===m)},ye.typeOf=A,ye}var ve={};/** @license React v16.13.1
75
91
  * react-is.development.js
76
92
  *
77
93
  * Copyright (c) Facebook, Inc. and its affiliates.
78
94
  *
79
95
  * This source code is licensed under the MIT license found in the
80
96
  * LICENSE file in the root directory of this source tree.
81
- */var ei;function Yh(){return ei||(ei=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,P=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function V(A){return typeof A=="string"||typeof A=="function"||A===n||A===h||A===o||A===s||A===v||A===P||typeof A=="object"&&A!==null&&(A.$$typeof===d||A.$$typeof===l||A.$$typeof===i||A.$$typeof===c||A.$$typeof===f||A.$$typeof===x||A.$$typeof===y||A.$$typeof===E||A.$$typeof===b)}function R(A){if(typeof A=="object"&&A!==null){var Ne=A.$$typeof;switch(Ne){case t:var qe=A.type;switch(qe){case u:case h:case n:case o:case s:case v:return qe;default:var Le=qe&&qe.$$typeof;switch(Le){case c:case f:case d:case l:case i:return Le;default:return Ne}}case r:return Ne}}}var S=u,$=h,O=c,q=i,z=t,se=f,ae=n,re=d,K=l,L=r,F=o,C=s,Q=v,I=!1;function he(A){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(A)||R(A)===u}function k(A){return R(A)===h}function M(A){return R(A)===c}function N(A){return R(A)===i}function _(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function W(A){return R(A)===f}function J(A){return R(A)===n}function H(A){return R(A)===d}function U(A){return R(A)===l}function Z(A){return R(A)===r}function te(A){return R(A)===o}function D(A){return R(A)===s}function ie(A){return R(A)===v}ye.AsyncMode=S,ye.ConcurrentMode=$,ye.ContextConsumer=O,ye.ContextProvider=q,ye.Element=z,ye.ForwardRef=se,ye.Fragment=ae,ye.Lazy=re,ye.Memo=K,ye.Portal=L,ye.Profiler=F,ye.StrictMode=C,ye.Suspense=Q,ye.isAsyncMode=he,ye.isConcurrentMode=k,ye.isContextConsumer=M,ye.isContextProvider=N,ye.isElement=_,ye.isForwardRef=W,ye.isFragment=J,ye.isLazy=H,ye.isMemo=U,ye.isPortal=Z,ye.isProfiler=te,ye.isStrictMode=D,ye.isSuspense=ie,ye.isValidElementType=V,ye.typeOf=R}()),ye}var ti;function ri(){return ti||(ti=1,process.env.NODE_ENV==="production"?Kr.exports=Hh():Kr.exports=Yh()),Kr.exports}/*
97
+ */var Go;function Kh(){return Go||(Go=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function A(L){return typeof L=="string"||typeof L=="function"||L===n||L===p||L===o||L===s||L===b||L===x||typeof L=="object"&&L!==null&&(L.$$typeof===f||L.$$typeof===l||L.$$typeof===i||L.$$typeof===c||L.$$typeof===d||L.$$typeof===w||L.$$typeof===v||L.$$typeof===P||L.$$typeof===m)}function D(L){if(typeof L=="object"&&L!==null){var Ne=L.$$typeof;switch(Ne){case t:var Be=L.type;switch(Be){case u:case p:case n:case o:case s:case b:return Be;default:var Re=Be&&Be.$$typeof;switch(Re){case c:case d:case f:case l:case i:return Re;default:return Ne}}case r:return Ne}}}var E=u,q=p,R=c,B=i,H=t,ne=d,oe=n,W=f,$=l,I=r,Z=o,F=s,Q=b,j=!1;function ue(L){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(L)||D(L)===u}function k(L){return D(L)===p}function M(L){return D(L)===c}function _(L){return D(L)===i}function C(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function U(L){return D(L)===d}function ee(L){return D(L)===n}function Y(L){return D(L)===f}function K(L){return D(L)===l}function G(L){return D(L)===r}function re(L){return D(L)===o}function O(L){return D(L)===s}function ae(L){return D(L)===b}ve.AsyncMode=E,ve.ConcurrentMode=q,ve.ContextConsumer=R,ve.ContextProvider=B,ve.Element=H,ve.ForwardRef=ne,ve.Fragment=oe,ve.Lazy=W,ve.Memo=$,ve.Portal=I,ve.Profiler=Z,ve.StrictMode=F,ve.Suspense=Q,ve.isAsyncMode=ue,ve.isConcurrentMode=k,ve.isContextConsumer=M,ve.isContextProvider=_,ve.isElement=C,ve.isForwardRef=U,ve.isFragment=ee,ve.isLazy=Y,ve.isMemo=K,ve.isPortal=G,ve.isProfiler=re,ve.isStrictMode=O,ve.isSuspense=ae,ve.isValidElementType=A,ve.typeOf=D}()),ve}var Xo;function Jo(){return Xo||(Xo=1,process.env.NODE_ENV==="production"?qr.exports=qh():qr.exports=Kh()),qr.exports}/*
82
98
  object-assign
83
99
  (c) Sindre Sorhus
84
100
  @license MIT
85
- */var $n,ni;function Wh(){if(ni)return $n;ni=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(u.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(f){h[f]=f}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $n=s()?Object.assign:function(o,i){for(var c,u=n(o),h,f=1;f<arguments.length;f++){c=Object(arguments[f]);for(var v in c)t.call(c,v)&&(u[v]=c[v]);if(e){h=e(c);for(var P=0;P<h.length;P++)r.call(c,h[P])&&(u[h[P]]=c[h[P]])}}return u},$n}var Hn,si;function Yn(){if(si)return Hn;si=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hn=e,Hn}var Wn,oi;function ii(){return oi||(oi=1,Wn=Function.call.bind(Object.prototype.hasOwnProperty)),Wn}var Vn,ai;function Vh(){if(ai)return Vn;ai=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yn(),r={},n=ii();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,c,u,h){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var v;try{if(typeof o[f]!="function"){var P=Error((u||"React class")+": "+c+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}v=o[f](i,f,u,c,null,t)}catch(d){v=d}if(v&&!(v instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof v+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),v instanceof Error&&!(v.message in r)){r[v.message]=!0;var l=h?h():"";e("Failed "+c+" type: "+v.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Vn=s,Vn}var Bn,ci;function Bh(){if(ci)return Bn;ci=1;var e=ri(),t=Wh(),r=Yn(),n=ii(),s=Vh(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Bn=function(c,u){var h=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function v(k){var M=k&&(h&&k[h]||k[f]);if(typeof M=="function")return M}var P="<<anonymous>>",l={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:V,element:R(),elementType:S(),instanceOf:$,node:se(),objectOf:q,oneOf:O,oneOfType:z,shape:re,exact:K};function d(k,M){return k===M?k!==0||1/k===1/M:k!==k&&M!==M}function b(k,M){this.message=k,this.data=M&&typeof M=="object"?M:{},this.stack=""}b.prototype=Error.prototype;function x(k){if(process.env.NODE_ENV!=="production")var M={},N=0;function _(J,H,U,Z,te,D,ie){if(Z=Z||P,D=D||U,ie!==r){if(u){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=Z+":"+U;!M[Ne]&&N<3&&(o("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[Ne]=!0,N++)}}return H[U]==null?J?H[U]===null?new b("The "+te+" `"+D+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new b("The "+te+" `"+D+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:k(H,U,Z,te,D)}var W=_.bind(null,!1);return W.isRequired=_.bind(null,!0),W}function y(k){function M(N,_,W,J,H,U){var Z=N[_],te=C(Z);if(te!==k){var D=Q(Z);return new b("Invalid "+J+" `"+H+"` of type "+("`"+D+"` supplied to `"+W+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return x(M)}function E(){return x(i)}function V(k){function M(N,_,W,J,H){if(typeof k!="function")return new b("Property `"+H+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var U=N[_];if(!Array.isArray(U)){var Z=C(U);return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an array."))}for(var te=0;te<U.length;te++){var D=k(U,te,W,J,H+"["+te+"]",r);if(D instanceof Error)return D}return null}return x(M)}function R(){function k(M,N,_,W,J){var H=M[N];if(!c(H)){var U=C(H);return new b("Invalid "+W+" `"+J+"` of type "+("`"+U+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return x(k)}function S(){function k(M,N,_,W,J){var H=M[N];if(!e.isValidElementType(H)){var U=C(H);return new b("Invalid "+W+" `"+J+"` of type "+("`"+U+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return x(k)}function $(k){function M(N,_,W,J,H){if(!(N[_]instanceof k)){var U=k.name||P,Z=he(N[_]);return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected ")+("instance of `"+U+"`."))}return null}return x(M)}function O(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function M(N,_,W,J,H){for(var U=N[_],Z=0;Z<k.length;Z++)if(d(U,k[Z]))return null;var te=JSON.stringify(k,function(ie,A){var Ne=Q(A);return Ne==="symbol"?String(A):A});return new b("Invalid "+J+" `"+H+"` of value `"+String(U)+"` "+("supplied to `"+W+"`, expected one of "+te+"."))}return x(M)}function q(k){function M(N,_,W,J,H){if(typeof k!="function")return new b("Property `"+H+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an object."));for(var te in U)if(n(U,te)){var D=k(U,te,W,J,H+"."+te,r);if(D instanceof Error)return D}return null}return x(M)}function z(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var M=0;M<k.length;M++){var N=k[M];if(typeof N!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(N)+" at index "+M+"."),i}function _(W,J,H,U,Z){for(var te=[],D=0;D<k.length;D++){var ie=k[D],A=ie(W,J,H,U,Z,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&te.push(A.data.expectedType)}var Ne=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new b("Invalid "+U+" `"+Z+"` supplied to "+("`"+H+"`"+Ne+"."))}return x(_)}function se(){function k(M,N,_,W,J){return L(M[N])?null:new b("Invalid "+W+" `"+J+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return x(k)}function ae(k,M,N,_,W){return new b((k||"React class")+": "+M+" type `"+N+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function re(k){function M(N,_,W,J,H){var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));for(var te in k){var D=k[te];if(typeof D!="function")return ae(W,J,H,te,Q(D));var ie=D(U,te,W,J,H+"."+te,r);if(ie)return ie}return null}return x(M)}function K(k){function M(N,_,W,J,H){var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));var te=t({},N[_],k);for(var D in te){var ie=k[D];if(n(k,D)&&typeof ie!="function")return ae(W,J,H,D,Q(ie));if(!ie)return new b("Invalid "+J+" `"+H+"` key `"+D+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(N[_],null," ")+`
86
- Valid keys: `+JSON.stringify(Object.keys(k),null," "));var A=ie(U,D,W,J,H+"."+D,r);if(A)return A}return null}return x(M)}function L(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(L);if(k===null||c(k))return!0;var M=v(k);if(M){var N=M.call(k),_;if(M!==k.entries){for(;!(_=N.next()).done;)if(!L(_.value))return!1}else for(;!(_=N.next()).done;){var W=_.value;if(W&&!L(W[1]))return!1}}else return!1;return!0;default:return!1}}function F(k,M){return k==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function C(k){var M=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":F(M,k)?"symbol":M}function Q(k){if(typeof k>"u"||k===null)return""+k;var M=C(k);if(M==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return M}function I(k){var M=Q(k);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function he(k){return!k.constructor||!k.constructor.name?P:k.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Bn}var Un,ui;function Uh(){if(ui)return Un;ui=1;var e=Yn();function t(){}function r(){}return r.resetWarningCache=t,Un=function(){function n(i,c,u,h,f,v){if(v!==e){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Un}var li;function qh(){if(li)return zr.exports;if(li=1,process.env.NODE_ENV!=="production"){var e=ri(),t=!0;zr.exports=Bh()(e.isElement,t)}else zr.exports=Uh()();return zr.exports}var zh=qh();const ue=rn(zh),fi={disabled:!1};var Kh=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ue.oneOfType([ue.string,ue.shape({enter:ue.string,exit:ue.string,active:ue.string}),ue.shape({enter:ue.string,enterDone:ue.string,enterActive:ue.string,exit:ue.string,exitDone:ue.string,exitActive:ue.string})]);const di=p.createContext(null);var Zh=function(t){return t.scrollTop},Sr="unmounted",Ct="exited",Dt="entering",Bt="entered",qn="exiting",pt=function(e){$h(t,e);function t(n,s){var o;o=e.call(this,n,s)||this;var i=s,c=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?c?(u=Ct,o.appearStatus=Dt):u=Bt:n.unmountOnExit||n.mountOnEnter?u=Sr:u=Ct,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===Sr?{status:Ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Dt&&i!==Bt&&(o=Dt):(i===Dt||i===Bt)&&(o=qn)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,c;return o=i=c=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,c=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:c}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Dt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this);i&&Zh(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:Sr})},r.performEnter=function(s){var o=this,i=this.props.enter,c=this.context?this.context.isMounting:s,u=this.props.nodeRef?[c]:[Je.findDOMNode(this),c],h=u[0],f=u[1],v=this.getTimeouts(),P=c?v.appear:v.enter;if(!s&&!i||fi.disabled){this.safeSetState({status:Bt},function(){o.props.onEntered(h)});return}this.props.onEnter(h,f),this.safeSetState({status:Dt},function(){o.props.onEntering(h,f),o.onTransitionEnd(P,function(){o.safeSetState({status:Bt},function(){o.props.onEntered(h,f)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),c=this.props.nodeRef?void 0:Je.findDOMNode(this);if(!o||fi.disabled){this.safeSetState({status:Ct},function(){s.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:qn},function(){s.props.onExiting(c),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ct},function(){s.props.onExited(c)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(c){i&&(i=!1,o.nextCallback=null,s(c))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this),c=s==null&&!this.props.addEndListener;if(!i||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],h=u[0],f=u[1];this.props.addEndListener(h,f)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Sr)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var c=Fh(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(di.Provider,{value:null},typeof i=="function"?i(s,c):p.cloneElement(p.Children.only(i),c))},t}(p.Component);pt.contextType=di,pt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ue.shape({current:typeof Element>"u"?ue.any:function(e,t,r,n,s,o){var i=e[t];return ue.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,r,n,s,o)}}),children:ue.oneOfType([ue.func.isRequired,ue.element.isRequired]).isRequired,in:ue.bool,mountOnEnter:ue.bool,unmountOnExit:ue.bool,appear:ue.bool,enter:ue.bool,exit:ue.bool,timeout:function(t){var r=Kh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[t].concat(s))},addEndListener:ue.func,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}:{};function Ut(){}pt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ut,onEntering:Ut,onEntered:Ut,onExit:Ut,onExiting:Ut,onExited:Ut},pt.UNMOUNTED=Sr,pt.EXITED=Ct,pt.ENTERING=Dt,pt.ENTERED=Bt,pt.EXITING=qn;const hi=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:c,onEntered:u,onExit:h,onExited:f,children:v})=>{const P=r||{transition:`opacity ${t}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${o}`,opacity:0},exited:{transition:`opacity ${t}ms ${o}`,opacity:0},unmounted:{}};return g.jsx(pt,{in:e,timeout:t,onEntering:c,onEntered:u,onExit:h,onExited:f,unmountOnExit:i,children:d=>v({state:d,defaultStyle:P,transitionStyles:l})})};function pi(e){return e.target?e.target:e}const mi=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:c="DONE",shown:u,hidden:h,isClickedWithin:f,children:v})=>{const[P,l]=p.useState(-1),[d,b]=p.useState(-1),[x,y]=p.useState(e),E=p.useRef(100),V=p.useRef(101),R=p.useRef(),S=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(R.current=pi(t));const K=Ko("zIndex",L=>L==="auto"||L==="-1"?!1:parseInt(L)>100).map(L=>parseInt(L,10));K.length>0&&(E.current=Math.max(...K)+1,V.current=Math.max(...K)+2),y(e)},[e,t]);const O=K=>{S.current=K},q=()=>{b(E.current),l(V.current)},z=()=>{if(!S.current)return;u==null||u();let K;R.current&&(K=[R.current]);const L=F=>{F?f==null||f():y(!1)};$.current=Qo(S.current,L,K)},se=()=>{$.current&&Xo($.current)},ae=()=>{b(-1),l(-1),h==null||h()},re={entering:{opacity:.5},entered:{opacity:.5}};return Je.createPortal(g.jsx(hi,{start:x,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:q,onEntered:z,onExit:se,onExited:ae,unmountOnExit:n,children:({state:K,defaultStyle:L,transitionStyles:F})=>g.jsxs("div",{ref:C=>C&&O(C),children:[g.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:d,...F[K],...re[K]}}),g.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:P,...L,...F[K]},children:[g.jsx("div",{className:"bsc:w-full",children:v}),g.jsx(g.Fragment,{children:g.jsx(et,{buttonType:"primary",fullWidth:!0,onClick:()=>y(!1),className:"bsc:text-xs bsc:font-bold",children:c})})]})]})}),r)};var gi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(gi||{}),bi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(bi||{});class ke{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(t,r,n=0,s=2){let{left:o,top:i}=ke.positionToTarget(r,s);const c=t.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-c.width;break;case 2:i=i-c.height;break;case 3:i=i-c.height,o=o-c.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(t,r){const n=ke.getScreenDimensions(),s=t.getBoundingClientRect(),o=ke.positionElementToTarget(t,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||ke.positionElementToTarget(t,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const c=ke.positionElementToTarget(t,r,2,0);if(c.left+s.width<n.width&&c.top>=0)return!0;const u=ke.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(t){const r=ke.getScreenDimensions(),n=t.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(t,r,n=0,s=2){const{left:o,top:i}=ke.positionElementToTarget(t,r,n,s),c=t.getBoundingClientRect(),u=ke.determineOffScreenLocation(c);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return ke.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return ke.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return ke.positionElementToTarget(t,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return ke.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return ke.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return ke.positionElementToTarget(t,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(t){const r=ke.getScreenDimensions(),n={left:t.left<0,top:t.top<0,right:t.left+t.width>r.width,bottom:t.top+t.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const yi=({visible:e,target:t,targetPosition:r=gi.BottomLeft,elementAlignment:n=bi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:c=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:h=!1,transitionDuration:f=400,showTransitionOptions:v="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:P="linear",shown:l,hidden:d,isClickedWithin:b,markupCreated:x,children:y})=>{const[E,V]=p.useState(-1),[R,S]=p.useState(e),[$,O]=p.useState(!1),q=p.useRef(!1),z=p.useRef(100),se=p.useRef({left:0,top:0,width:0}),ae=p.useRef(),re=p.useRef(),K=p.useRef(),L=p.useRef(),F=p.useRef(),C=p.useRef(),Q=cs();p.useEffect(()=>(u===!0&&(C.current=new ResizeObserver(I)),()=>{var H,U;u===!0&&(re.current&&((H=C.current)==null||H.unobserve(re.current)),(U=C.current)==null||U.disconnect())}),[]),p.useEffect(()=>{if(t&&(ae.current=pi(t),i)){const H=Q==null?void 0:Q.isValidScrollableElement;K.current=zo(ae.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,H),K.current.tagName.toLowerCase()==="html"&&(K.current=document)}if(c){const H=Ko("zIndex",U=>parseInt(U)>=100).map(U=>parseInt(U));H.length>0&&(z.current=Math.max(...H)+1)}e!==void 0&&S(e)},[t,e,i,c]);const I=H=>{if(re.current){const U=ke.getScreenDimensions(),Z=H[H.length-1].target,te=Z.getBoundingClientRect(),D=ke.determineOffScreenLocation(te);if(D){if(ae.current&&ke.canPositionElementOnScreenWithTarget(Z,ae.current)){const ie=ke.positionElementToTargetOnScreen(re.current,ae.current,n,r);se.current={...se.current,...ie}}else D.right?se.current.left=U.width-te.width:D.left&&(se.current.left=0),D.bottom?se.current.top=U.height-te.height:D.top&&(se.current.top=0);he()}}},he=yr(()=>{q.current=!q.current,O(q.current)},20),k=()=>{V(z.current)},M=()=>{if(!re.current)return;l==null||l();let H;!s&&ae.current&&(H=[ae.current]);const U=Z=>{Z?b==null||b():S(!1)};L.current=Qo(re.current,U,H),i&&(F.current=of(Z=>re.current&&Ph(Z,re.current)&&S(!1),100,{leading:!0}),K.current&&K.current.addEventListener("scroll",F.current))},N=()=>{K.current&&F.current&&(K.current.removeEventListener("scroll",F.current),F.current=void 0),L.current&&Xo(L.current)},_=()=>{V(-1),d==null||d()},W=H=>{var U,Z;if(u===!0&&re.current&&((U=C.current)==null||U.unobserve(re.current)),re.current=H,x==null||x(H),ae.current){const te=ke.positionElementToTarget(re.current,ae.current,n,r);se.current={...te,width:ae.current.offsetWidth},u===!0&&(ke.canPositionElementOnScreenWithTarget(re.current,ae.current)||ke.canPositionElementOnScreen(re.current))&&((Z=C.current)==null||Z.observe(re.current))}},J=p.useMemo(()=>{const H={top:`${se.current.top}px`,left:`${se.current.left}px`,zIndex:E};return o&&(H.width=`${se.current.width}px`),H},[$,E,o]);return g.jsx(hi,{start:R,timeout:f,showTransitionOptions:v,hideTransitionOptions:P,onEntering:k,onEntered:M,onExit:N,onExited:_,unmountOnExit:h,children:({state:H,defaultStyle:U,transitionStyles:Z})=>g.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...J,...U,...Z[H]},ref:te=>te&&W(te),children:y})})};let Zr;const Gh=new Uint8Array(16);function Qh(){if(!Zr&&(Zr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zr(Gh)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function Xh(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const vi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Jh(e,t,r){if(vi.randomUUID&&!e)return vi.randomUUID();e=e||{};const n=e.random||(e.rng||Qh)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xh(n)}class Er{static create(t){const r=[];let n=0;for(let s=0,o=t.formatParts.length;s<o;s++){const i=t.formatParts[s],c=n,u=c+i.characterCount;r.push({startPosition:c,endPosition:u,...i}),n=u}return r}}class ep{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"currentPartIndex",0);T(this,"currentPartIndices",[]);T(this,"currentCursorPosition",0);T(this,"highlightCursorPosition",0);T(this,"currentCursorStartPosition",-1);T(this,"currentCursorEndPosition",-1);T(this,"inputElement");T(this,"inputSelection",null);T(this,"inputRange");T(this,"textNode");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){var r;const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&((r=this.inputRange)==null?void 0:r.startOffset)===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=t,s=t):t<r?(n=t,s=r):(o=!1,n=r,s=t),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){var n;const t=window.getSelection(),r=t==null?void 0:t.getRangeAt(0);if(this.inputElement&&t&&r){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const h=document.createRange();return h.selectNodeContents(u),h.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let o=0;for(;s.nextNode();)o+=((n=s.currentNode.textContent)==null?void 0:n.length)||0;r.startContainer.nodeType===Node.TEXT_NODE&&(o+=r.startOffset);const i=this.inputSlotCollection.getLastSlotWithData(),c=i.startPosition+i.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(o>c?c:o):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(t>=r.startPosition&&t<=r.endPosition)this.setCursorSelection(t);else for(let n=this.currentPartIndex-1;n>=0;n--)if(r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let r=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(t?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let c=this.currentPartIndex+1,u=this.formatPartList.length;c<u;c++)if(i=this.formatPartList[c],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[c+1].startPosition:o=this.formatPartList[c+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,r=this.formatPartList.length;t<r;t++){const n=this.formatPartList[t];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){var t,r;this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),(t=this.inputSelection)==null||t.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),(r=this.inputSelection)==null||r.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class tp{static create(t){const r=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class rp{constructor(t){T(this,"inputSlots");this.inputSlots=tp.create(Er.create(t))}clearAllSlots(){for(let t=0,r=this.inputSlots.length;t<r;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(r=>r.partIndex===t)}getSlots(t){return this.inputSlots.filter(r=>t.includes(r.partIndex))}getSlotsFromCursorPosition(t){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(t>=o.startPosition&&t<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(n=>!n.isComplete);let r=t;for(let n=t+1,s=this.inputSlots.length;n<s;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class qt{static getInstance(){return this.instance||(this.instance=new np),this.instance}}T(qt,"instance");class np{constructor(){T(this,"navigatorInstances");T(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new ep(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new rp(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class zn{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"inputElement");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,s=this.formatPartList.length;n<s;n++){const o=this.formatPartList[n];if(o.isSeparator)t+=o.inputText;else{const i=this.inputSlotCollection.getSlot(n);i&&(t+=i.partText+((r=i.inputText)==null?void 0:r.repeat(i.characterCount-i.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var st=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(st||{});class xi{constructor(){T(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);T(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);T(this,"editingKeys",["Backspace","Delete"]);T(this,"ignoreKeys",["Shift","Alt","Control","Fn","Meta"])}isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class sp{constructor(t){T(this,"_currentIndex",0);T(this,"index",0);T(this,"formatParts");this.formatParts=Er.create(t)}get currentIndex(){return this._currentIndex}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class op{constructor(t){T(this,"formatParts");this.formatParts=Er.create(t)}getUniqueSeparators(){const t=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!t.includes(o.inputText)&&t.push(o.inputText)}return t}}class wi{constructor(t,r){T(this,"instanceCollection");T(this,"inputSlotCollection");T(this,"formatNavigator");T(this,"keyTypeChecker");T(this,"formatRenderer");T(this,"formatPartList");T(this,"partEntryList");this.format=t,this.instanceCollection=qt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r),this.formatPartList=new sp(t),this.partEntryList=new op(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const o=this.formatPartList.currentIndex,i=this.formatPartList.next();if(i&&i.inputText){const c=t.indexOf(i.inputText,r),u=this.inputSlotCollection.getSlot(o);if(u&&c>-1){const h=c-r>u.characterCount?r+u.characterCount:c;u.partText=t.substring(r,h),this.processSlotRules(u),r=c+i.characterCount}}}else{const o=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);o&&(o.partText=t.substring(r,r+o.characterCount),this.processSlotRules(o))}}}processPastedValue(t,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let c=s[0].partText.substring(o);s[0].partText="";for(let v=1,P=s.length;v<P;v++)c+=s[v].partText,s[v].partText="";const u=this.removeSeparatorsFromValue(t),h=i+u+c;let f=0;for(let v=0,P=s.length;v<P;v++){const l=s[v];l.partText=h.substring(f,l.characterCount+f),f+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(t){let r=t;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const c=this.inputSlotCollection.getPreviousSlot(r.partIndex);c&&(c.partText=c.partText.substring(0,c.partText.length-1),o&&this.shiftFormatParts(c),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(c.startPosition+c.partText.length),this.processSlotRules(c,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=t.length;s<o;s++){const i=t[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=t.length;s<o;s++)this.processSlotRules(t[s])}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,s=r.characterCount,o=r.partText;if(r.valueType===st.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,c=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,h=parseInt(this.createNewValue(r,n));if(i&&h>i)if(c){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const f=this.inputSlotCollection.getNextSlot(r.partIndex);f&&!f.isComplete&&(f.partText=n),this.formatRenderer.render(),f&&this.formatNavigator.setCursorPosition(f.isComplete?f.startPosition:f.startPosition+1)}else return;else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,t))}createNewValue(t,r){const n=t.partText,s=this.formatNavigator.getCursorPosition();if(s>=t.startPosition+t.partText.length)return n+r;{const o=s-t.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(t,r=!1){const n=t.characterCount,s=t.allCharactersRequired||!1;if(t.valueType===st.Numeric){const o=t.minimumValue,i=t.maximumValue;if(s)t.isComplete=t.partText.length===n;else if(o!==void 0&&i!==void 0){const c=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=o&&u<=i,t.isComplete&&c&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else s?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class ip{constructor(t,r){T(this,"instanceCollection");T(this,"formatNavigator");T(this,"ruleProcessor");T(this,"keyTypeChecker");T(this,"formatRenderer");this.format=t,this.instanceCollection=qt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new wi(t,r),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=t;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class ap{constructor(t,r=""){T(this,"instanceId");T(this,"instanceCollection");T(this,"keyProcessor");T(this,"formatNavigator");T(this,"formatRenderer");T(this,"inputSlotCollection");T(this,"inputRuleProcessor");T(this,"previousOutputValue","");T(this,"inputElementSet",!1);T(this,"isInputFocused",!1);T(this,"inputElement");T(this,"onFormatChange");this.inputValue=r,this.instanceId=Jh(),this.instanceCollection=qt.getInstance(),this.keyProcessor=new ip(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new zn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new wi(t,this.instanceId)}inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{var r,n;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML),t&&((n=this.inputElement)!=null&&n.innerHTML)&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const cp=(e,t)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:c,rightElement:u,className:h,leftElementClassName:f,rightElementClassName:v,isSingleLine:P=!1,allowSingleLineScroll:l=!1,isInputValid:d,onChange:b,onFocus:x,onBlur:y,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R}=e,[S,$]=p.useState(!0),O=p.useRef(),q=p.useRef(),z=p.useRef(),se=p.useRef(!1);p.useEffect(()=>(document.addEventListener("mouseup",C),()=>{var N;(N=z.current)==null||N.dispose(),document.removeEventListener("mouseup",C)}),[]),p.useEffect(()=>{var N;(N=z.current)==null||N.inputValuePassed(r)},[r]),p.useEffect(()=>{var N,_,W;(N=z.current)==null||N.dispose(),n&&(z.current=new ap(n,r),q.current&&((_=z.current)==null||_.inputElementCreated(q.current)),(W=z.current)==null||W.registerFormatChangeEvent(ae))},[n]);const ae=p.useCallback(N=>{d?d(N)?($(!0),b==null||b(N)):$(!1):b==null||b(N)},[b]),re=p.useCallback(N=>{var _;(_=z.current)==null||_.inputFocused(),x==null||x(N)},[x]),K=p.useCallback(N=>{var _;(_=z.current)==null||_.inputBlurred(),y==null||y(N)},[y]),L=p.useCallback(()=>{se.current=!0},[]),F=p.useCallback(()=>{var N;if(se.current)se.current=!1,(N=z.current)==null||N.mouseUpHandler();else{const _=new MouseEvent("mouseup");document.dispatchEvent(_)}},[]),C=p.useCallback(()=>{var N;se.current&&(se.current=!1,(N=z.current)==null||N.mouseUpHandler())},[]),Q=p.useCallback(N=>{var _;(_=z.current)==null||_.keyDownHandler(N)},[]),I=p.useCallback(N=>{var W,J;N.preventDefault(),N.stopPropagation();const _=(W=N.clipboardData)==null?void 0:W.getData("text/plain");_&&((J=z.current)==null||J.pastedValue(_))},[]),he=p.useCallback(N=>{var _,W,J,H,U,Z,te,D,ie,A,Ne,qe,Le,Ye,ot,Ge,Ve;(W=(_=O.current)==null?void 0:_.inputElement)==null||W.removeEventListener("keydown",Q),(H=(J=O.current)==null?void 0:J.inputElement)==null||H.removeEventListener("mousedown",L),(Z=(U=O.current)==null?void 0:U.inputElement)==null||Z.removeEventListener("mouseup",F),(D=(te=O.current)==null?void 0:te.inputElement)==null||D.removeEventListener("paste",I),O.current=N,(A=(ie=O.current)==null?void 0:ie.inputElement)==null||A.addEventListener("keydown",Q),(qe=(Ne=O.current)==null?void 0:Ne.inputElement)==null||qe.addEventListener("mousedown",L),(Ye=(Le=O.current)==null?void 0:Le.inputElement)==null||Ye.addEventListener("mouseup",F),(Ge=(ot=O.current)==null?void 0:ot.inputElement)==null||Ge.addEventListener("paste",I),q.current=(Ve=O.current)==null?void 0:Ve.inputElement},[]),k=p.useCallback(()=>{var N;(N=O.current)==null||N.focus()},[]);p.useImperativeHandle(t,()=>({focus:k}));const M=de(h,{"bsc:border-error!":!S});return g.jsx(Vr,{ref:N=>N&&he(N),readOnly:s,debounceTime:o,fillContainer:i,leftElement:c,rightElement:u,className:M,leftElementClassName:f,rightElementClassName:v,isSingleLine:P,allowSingleLineScroll:l,onFocus:re,onBlur:K,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R})},Pi=p.forwardRef(cp),Kn=p.createContext(void 0);function Ti(e,t,r=!0){var P,l;const n=Ho(e),s=Mo(e),o=sd(e);let i=On(s)-(((P=t.options)==null?void 0:P.weekStartsOn)||0);i=i===-1?6:i;const c=On(o)-(((l=t.options)==null?void 0:l.weekStartsOn)||0),u=hf({start:s,end:o}),h=n+i>35?6:5,f=Si(h,7,{dayValue:null,isCurrent:!0});let v=1;for(let d=0,b=h;d<b;d++){for(let x=d>0?0:i;x<7;x++){const y=u[v-1];if(y.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[d][x].dayValue=y,++v>n)break}if(v>n)break}if(i>0&&r)for(let d=0;d<i;d++)f[0][d].dayValue=th(s,i-d),f[0][d].isCurrent=!1;if(c>-1&&r)for(let d=6;d>c;d--)f[h-1][d].dayValue=Wt(o,d-c),f[h-1][d].isCurrent=!1;return f}function Si(e,t,r){const n=[];for(let s=0,o=e;s<o;s++){const i=[];for(let c=0,u=t;c<u;c++){const h=up(r)?r:{...r};i.push(h)}n.push(i)}return n}function up(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function lp(e){var n;const t=rh(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let s=0;s<7;s++)r.push(Wt(t,s).toLocaleDateString(e.code,{weekday:"short"}));return r}function fp(e){const t=new Date(Date.UTC(2020,0,1)),r=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let n=0;for(let s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:bt(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function dp(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=pf({start:r,end:xr(r,9)}),o=Si(3,4,"");let i=0;for(let c=0;c<3;c++)for(let u=0;u<4&&(o[c][u]=s[i++].toLocaleDateString(t.code,{year:"numeric"}),i!==s.length);u++);return o}function hp(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function pp(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function Ei(e){return(await import(`/node_modules/date-fns/locale/${mp(e)}`)).default}function mp(e){const[t,r]=e.split("-");switch(t){case"af":return"af";case"ar":switch(r){case"DZ":return"ar-DZ";case"EG":return"ar-EG";case"MA":return"ar-MA";case"SA":return"ar-SA";case"TN":return"ar-TN";default:return"ar"}case"az":return"az";case"be":switch(r){case"tarask":return"be-tarask";default:return"be"}case"bg":return"bg";case"bn":return"bn";case"bs":return"bs";case"ca":return"ca";case"cs":return"cs";case"cy":return"cy";case"da":return"da";case"de":switch(r){case"AT":return"de-AT";default:return"de"}case"el":return"el";case"en":switch(r){case"AU":return"en-AU";case"CA":return"en-CA";case"GB":return"en-GB";case"IE":return"en-IE";case"IN":return"en-IN";case"NZ":return"en-NZ";case"US":return"en-US";default:return"en-ZA"}case"eo":return"eo";case"es":return"es";case"et":return"et";case"eu":return"eu";case"fa":return"fa-IR";case"fi":return"fi";case"fr":switch(r){case"CA":return"fr-CA";case"CH":return"fr-CH";default:return"fr"}case"fy":return"fy";case"gd":return"gd";case"gl":return"gl";case"gu":return"gu";case"he":return"he";case"hi":return"hi";case"hr":return"hr";case"ht":return"ht";case"hu":return"hu";case"hy":return"hy";case"id":return"id";case"is":return"is";case"it":switch(r){case"CH":return"it-CH";default:return"it"}case"ja":switch(r){case"Hira":return"ja-Hira";default:return"ja"}case"ka":return"ka";case"kk":return"kk";case"km":return"km";case"kn":return"kn";case"ko":return"ko";case"lb":return"lb";case"lt":return"lt";case"lv":return"lv";case"mk":return"mk";case"mn":return"mn";case"ms":return"ms";case"mt":return"mt";case"nb":return"nb";case"nl":switch(r){case"BE":return"nl-BE";default:return"nl"}case"nn":return"nn";case"oc":return"oc";case"pl":return"pl";case"pt":switch(r){case"BR":return"pt-BR";default:return"pt"}case"ro":return"ro";case"ru":return"ru";case"sk":return"sk";case"sl":return"sl";case"sq":return"sq";case"sr":switch(r){case"Latn":return"sr-Latn";default:return"sr"}case"sv":return"sv";case"ta":return"ta";case"te":return"te";case"th":return"th";case"tr":return"tr";case"ug":return"ug";case"uk":return"uk";case"uz":switch(r){case"Cyrl":return"uz-Cyrl";default:return"uz"}case"vi":return"vi";case"zh":switch(r){case"CN":return"zh-CN";case"HK":return"zh-HK";default:return"zh-TW"}default:return"en-AU"}}function _r(e,t){const r=nh(e);if(isNaN(r.valueOf())){let n=nt(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=nt(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function Zn(e,t){const r=e.split("-");if(r.length!==2)return;const n=_r(r[0].trim(),t);if(!n)return;const s=_r(r[1].trim(),t);if(s)return[n,s]}var we=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(we||{}),Re=(e=>(e[e.DaySelector=0]="DaySelector",e[e.MonthSelector=1]="MonthSelector",e[e.YearSelector=2]="YearSelector",e[e.TimeSelector=3]="TimeSelector",e[e.DateRangeSelector=4]="DateRangeSelector",e))(Re||{}),zt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(zt||{}),kr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(kr||{}),Oe=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(Oe||{}),vt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(vt||{}),Gr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(Gr||{}),le=(e=>(e[e.SetDateSelector=0]="SetDateSelector",e[e.SetViewDate=1]="SetViewDate",e[e.SetSelectedDate=2]="SetSelectedDate",e[e.SetSelectedDateRange=3]="SetSelectedDateRange",e[e.SetSelectedStartDate=4]="SetSelectedStartDate",e[e.SetSelectedEndDate=5]="SetSelectedEndDate",e[e.SetTimeFormat=6]="SetTimeFormat",e[e.ClearDates=7]="ClearDates",e[e.InitializeDates=8]="InitializeDates",e))(le||{});const gp=(e,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...e,currentSelector:t.dateSelector,currentViewDate:t.viewDate||e.currentViewDate}:{...e};case 1:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 3:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 4:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...e,selectedEndDate:t.selectedEndDate};case 6:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 7:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 8:{const r={...e,currentViewDate:bp(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...r,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...r,selectedDate:t.initialDate}}default:return{...e,currentSelector:Re.DaySelector}}};function bp(e){return e?Array.isArray(e)?e[0]:e:new Date}const Gn=(e,t,r)=>{const n=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:bt(t,u)})},[t]),s=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Mn(t,u)})},[t]),o=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:xr(t,u)})},[t]),i=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Rn(t,u)})},[t]),c=p.useCallback(u=>{r({type:le.SetDateSelector,dateSelector:u})},[]);return{...e,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:c}},Qr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=vt.Normal,locale:o,onDateSelected:i,selectableDate:c,isValidDate:u,dispatcher:h})=>{var F;const[f,v]=p.useState(!1),[P,l]=p.useState(),[d,b]=p.useState(),[x,y]=p.useState(),[E,V]=p.useState(),R=p.useRef(),S=p.useRef(),$=p.useContext(Kn),O=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),q=async()=>o||await Ei(qo());p.useEffect(()=>{q().then(C=>{R.current=C,S.current=lp(R.current),v(!0)}).catch(C=>console.error(C))},[]),p.useEffect(()=>{e&&R.current&&y(Ti(e,R.current,s===vt.Normal))},[e,f]),p.useEffect(()=>{V(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),b(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{R.current&&o&&(R.current=o,y(Ti(e,R.current,s===vt.Normal)))},[o]);const z=C=>{if(s===vt.Normal)h==null||h({type:le.SetSelectedDate,selectedDate:C,viewDate:C}),i==null||i(C);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||od(C,r)?i(C):r&&!n?i(C,{setEndDate:!0}):r&&n&&i(C)}},se=C=>(E==null?void 0:E.toLocaleDateString())===C.toLocaleDateString(),ae=C=>{if(P&&d){const Q=C.getTime();return Q>=P&&Q<=d}return!1},re=Gn({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:S.current,monthMatrix:x,selectableDate:c,isValidDate:u,onDateClicked:z,isSelectedDate:se,isInSelectedDateRange:ae},e,h),L=O||((C,Q)=>g.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:Q}));return g.jsx(kt,{props:re,template:L,children:g.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[(F=S.current)==null?void 0:F.map((C,Q)=>g.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:C},Q)),x==null?void 0:x.map((C,Q)=>C.map((I,he)=>{var N,_;const k=I.dayValue!==null&&(c===void 0||c(I.dayValue)),M=de("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!I.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":I&&I.dayValue&&(E&&se(I.dayValue)||P&&!d&&Io(P,I.dayValue)||P&&d&&ae(I.dayValue)),"bsc:cursor-pointer":k,"bsc:text-error bsc:cursor-not-allowed":!k,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":I.dayValue&&eh(I.dayValue)&&!(se(I.dayValue)||ae(I.dayValue))},"bc-dt-date-cell");return g.jsx("div",{className:M,onClick:()=>I&&I.dayValue&&k&&(u===void 0||u(I.dayValue))&&z(I.dayValue),children:(_=I.dayValue)==null?void 0:_.getDate().toLocaleString((N=R.current)==null?void 0:N.code)},Q.toString()+he.toString())}))]})})},Xr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=p.useContext(Kn).dateScrollerTemplate,h=Gn({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),f="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",P=u||((l,d)=>g.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:d}));return g.jsxs(kt,{props:h,template:P,children:[g.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:n,children:g.jsx(Ke,{icon:"chevronLeft",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:r,children:e}),g.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:s,children:g.jsx(Ke,{icon:"chevronRight",size:He.Regular})})})]})},yp=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:c})=>{const u=()=>{t&&c({type:le.SetViewDate,viewDate:Mn(t,1)})},h=()=>{t&&c({type:le.SetViewDate,viewDate:bt(t,1)})},f=()=>{c({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},v=()=>{c({type:le.SetDateSelector,dateSelector:Re.TimeSelector})},P=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return g.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[g.jsx(Xr,{title:P(),scrollerType:zt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:h,viewDate:t,dispatcher:c}),g.jsx(Qr,{viewDate:t,selectedDate:e,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:c}),n&&g.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:g.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:v,children:(e==null?void 0:e.toLocaleTimeString(r.code))||hp(r)})})]})},vp=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const s=p.useRef(fp(t)),o=()=>{const f=Rn(e,1);n({type:le.SetViewDate,viewDate:f})},i=()=>{const f=xr(e,1);n({type:le.SetViewDate,viewDate:f})},c=f=>{n({type:le.SetDateSelector,dateSelector:r!==we.DateRange?Re.DaySelector:Re.DateRangeSelector,viewDate:vh(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),h=()=>{n({type:le.SetDateSelector,dateSelector:Re.YearSelector})};return g.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:u(),scrollerType:zt.Month,onTitleClicked:h,onMovePrevious:o,onMoveNext:i,viewDate:e,dispatcher:n}),g.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((f,v)=>f.map((P,l)=>g.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>c(P.monthNumber),children:P.monthName},v.toString()+l.toString())))})]})},xp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=qr("screen and (max-device-width: 40rem)"),c=bt(e,1),u=(l,d)=>{!d||!d.setEndDate?o({type:le.SetSelectedStartDate,selectedStartDate:l}):(o({type:le.SetSelectedEndDate,selectedEndDate:l}),t&&s&&s([t,l]))},h=()=>{o({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},f=()=>i?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${c.toLocaleDateString(n.code,{month:"long"})} ${c.toLocaleDateString(n.code,{year:"numeric"})}`,v=()=>{e&&o({type:le.SetViewDate,viewDate:Mn(e,1)})},P=()=>{e&&o({type:le.SetViewDate,viewDate:bt(e,1)})};return g.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[g.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:g.jsx(Xr,{title:f(),scrollerType:zt.Range,onTitleClicked:h,onMovePrevious:v,onMoveNext:P,viewDate:e,dispatcher:o})}),g.jsx("div",{className:"bsc-flex-grow",children:g.jsx(An,{mobileMarkup:g.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:g.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[g.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),g.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:g.jsx(Qr,{viewDate:c,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},wp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=Oe.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const c=p.useRef(n===Oe.TwelveHour?11:23),u=p.useRef(n===Oe.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),h=p.useRef(wh(0,59,L=>L.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),v=p.useRef(ef(e)),P=L=>L>11?L-12:L,[l,d]=p.useState(P(e.getHours())),[b,x]=p.useState(e.getMinutes()),[y,E]=p.useState(e.getHours()<=12?0:1),V=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const L=e.getHours(),F=e.getMinutes();if(L!==l&&d(n===Oe.TwelveHour?P(L):L),F!==b&&x(F),n===Oe.TwelveHour){const C=L<=11?0:1;C!==y&&E(C)}},[e]);const R=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l<c.current?l+L:0;d(F),z(F,b,y)},S=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l>0?l-L:c.current;d(F),z(F,b,y)},$=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b+L<(((Q=s==null?void 0:s.minutes)==null?void 0:Q.max)||59)?b+L:((I=s==null?void 0:s.minutes)==null?void 0:I.min)||0;x(F),z(l,F,y)},O=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b-L>=(((Q=s==null?void 0:s.minutes)==null?void 0:Q.min)||0)?b-L:(((I=s==null?void 0:s.minutes)==null?void 0:I.max)||60)-L;x(F),z(l,F,y)},q=()=>{const L=y===0?1:0;E(L),z(l,b,L)},z=(L,F,C)=>{const Q=n===Oe.TwelveHour&&C===1?L+12:L;v.current.setHours(Q,F),i({type:le.SetSelectedDate,selectedDate:v.current,viewDate:v.current}),o==null||o(v.current)},se=()=>{i({type:le.SetDateSelector,dateSelector:Re.DaySelector})},ae=de("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===Oe.TwelveHour,"bsc:grid-cols-3":n===Oe.TwentyFourHour}),re=de("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":n===Oe.TwelveHour,"bsc:col-span-3":n===Oe.TwentyFourHour}),K="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return g.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===Oe.TwelveHour?"15rem":"11rem"},children:g.jsxs("div",{className:ae,children:[t&&g.jsx("div",{className:re,onClick:se,children:V.current}),g.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:R,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:$,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),g.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),g.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:h.current[b]}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:f.current[y]}),g.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:S,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:O,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})})]})})},Pp=({viewDate:e,locale:t,dispatcher:r})=>{const n=dp(e,t),s=()=>{const u=Rn(e,10);r({type:le.SetViewDate,viewDate:u})},o=()=>{const u=xr(e,10);r({type:le.SetViewDate,viewDate:u})},i=u=>{const h=parseInt(u);r({type:le.SetDateSelector,dateSelector:Re.MonthSelector,viewDate:xh(e,h)})},c=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return g.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:c(),scrollerType:zt.Year,onMovePrevious:s,onMoveNext:o,viewDate:e,dispatcher:r}),g.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:g.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,h)=>u.map((f,v)=>f.length>0?g.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>i(f),children:f},h.toString()+v.toString()):g.jsx("div",{},h.toString()+v.toString())))})})]})};class Tp{constructor(t,r){T(this,"dateFormat");T(this,"timeFormat");T(this,"use24HourTime");T(this,"monthPart");T(this,"dayPart");T(this,"yearPart");T(this,"twelveHourPart");T(this,"twentyFourHourPart");T(this,"minutePart");T(this,"meridianPart");this.dateSelection=t;const n=2023,s=12,o=20,c=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=c.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,h=18,f=24,v=37,P=317;u.setHours(h,f,v,P);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?h:"6"}`,"HH").replace(`${f}`,"MM").replace(`${v}`,"SS").replace(`${P}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case we.DateOnly:return this.createDateFormat(t);case we.TimeOnly:return this.createTimeFormat(t);case we.DateRange:return this.createDateRangeFormat(t);case we.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...r,n,...r),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(r),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),r=t.indexOf("DD"),n=t.substring(0,r);t=t.replace(n,"").replace("DD","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:st.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:st.Text,possibleValues:["AM","PM"]}}}const Sp=(e,t)=>{var o;const[r,n]=p.useState(),s=p.useRef();return p.useEffect(()=>{t&&!r&&(s.current=new Tp(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},Ep=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:c,className:u,dateSelection:h=we.DateTime,dateFormat:f,timeConstraints:v,icon:P,iconPosition:l=Gr.Right,inputElement:d,selectableDate:b,isValidDate:x,onChange:y,calendarTemplate:E,dateScrollerTemplate:V,inputTemplate:R,wrapperTemplate:S})=>{const[$,O]=p.useState(!1),[q,z]=p.useState(),[se,ae]=p.useState(),[re,K,L]=ga(h),F=p.useRef(),C=p.useRef(!1),Q=p.useRef(c||qo()),I=p.useRef(),he=p.useRef(),k=p.useRef(),M=p.useRef(null),N=p.useRef(null),[_,W]=Sp(h,q),J=p.useRef({calendarTemplate:E,dateScrollerTemplate:V});p.useEffect(()=>{Q.current&&U(Q.current)},[Q]),p.useEffect(()=>{c&&U(c)},[c]),p.useEffect(()=>{if(e){const ee=Z();ie({type:le.InitializeDates,initialDate:ee})}else ie({type:le.ClearDates})},[e,I.current]),p.useEffect(()=>{W&&ie({type:le.SetTimeFormat,timeFormat:W?Oe.TwentyFourHour:Oe.TwelveHour})},[W]),p.useEffect(()=>{d&&(he.current=d)},[d]),p.useEffect(()=>{ie({type:le.SetDateSelector,dateSelector:H()})},[re]);const H=p.useCallback(()=>L.current===we.TimeOnly?Re.TimeSelector:L.current===we.DateTime||L.current===we.DateOnly?Re.DaySelector:Re.DateRangeSelector,[]),U=ee=>{Ei(ee).then(fe=>{z(fe.code),I.current=fe;const Ee=Z();ie(e||n?{type:le.InitializeDates,initialDate:Array.isArray(Ee)?Ee[0]:Ee}:{type:le.SetViewDate,viewDate:Array.isArray(Ee)?Ee[0]:Ee})}).catch(fe=>console.error(fe))},Z=()=>{const ee=new Date;return ee.setHours(0,0,0,0),e?typeof e=="string"?L.current!==we.DateRange?_r(e,I.current):Zn(e,I.current):e:ee},te={currentSelector:H(),currentViewDate:new Date,timeFormat:Oe.TwelveHour,dateInitialized:!1},[D,ie]=p.useReducer(gp,te),A=()=>{Gt(),O(!0)},Ne=p.useMemo(()=>yr(()=>{O(!1)},250),[]),qe=p.useMemo(()=>yr(()=>{Ne.cancel()},5),[Ne]),Le=ee=>{const fe=ee.target.innerText;Ge(fe)},Ye=ee=>{if(ee){const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);return fe?x?Array.isArray(fe)?fe.every(Ee=>x(Ee)):x(fe):!0:!1}else return!0},ot=ee=>{Ge(ee||"")},Ge=ee=>{const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);fe?(Array.isArray(fe)?(pp(fe[0],Mo(D.currentViewDate),df(bt(D.currentViewDate,1)))||ie({type:le.SetViewDate,viewDate:fe[0]}),ie({type:le.SetSelectedDateRange,selectedStartDate:fe[0],selectedEndDate:fe[1]})):ie({type:le.SetSelectedDate,selectedDate:fe,viewDate:fe}),y==null||y(fe)):ee===""&&(ie({type:le.ClearDates}),y==null||y())},Ve=ee=>{L.current===we.DateOnly&&i===!0&&O(!1),y==null||y(ee)},Kt=()=>{Gt(),O(!$),N.current?N.current.focus():M.current&&M.current.focus()},Zt=()=>{ie({type:le.ClearDates}),O(!1),y==null||y()},Qe=(ee,fe)=>{(!he.current||F.current!==fe)&&(he.current=ee,F.current=fe,C.current=!0)},Gt=()=>{(!k.current||C.current)&&he.current&&(k.current=he.current,ae(he.current),C.current=!1)},Qt=()=>{O(!1),ie({type:le.SetDateSelector,dateSelector:H()})},Ot=()=>{switch(f){case kr.Short:return"short";case kr.Medium:return"medium";case kr.Long:return"long";default:return}},it=()=>{var fe,Ee,ct,ut,xt,tr,wt,rr,Pt,Tt,nr,sr;const ee=Ot();switch(L.current){case we.DateTime:return D.selectedDate?ee?D.selectedDate.toLocaleString((fe=I.current)==null?void 0:fe.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((Ee=I.current)==null?void 0:Ee.code):"";case we.DateOnly:return D.selectedDate?ee?D.selectedDate.toLocaleDateString((ct=I.current)==null?void 0:ct.code,{dateStyle:ee}):D.selectedDate.toLocaleDateString((ut=I.current)==null?void 0:ut.code):"";case we.TimeOnly:return D.selectedDate?ee?D.selectedDate.toLocaleTimeString((xt=I.current)==null?void 0:xt.code,{timeStyle:ee,hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):D.selectedDate.toLocaleTimeString((tr=I.current)==null?void 0:tr.code,{hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return D.selectedStartDate&&D.selectedEndDate?ee?`${D.selectedStartDate.toLocaleDateString((wt=I.current)==null?void 0:wt.code,{dateStyle:ee})} - ${D.selectedEndDate.toLocaleDateString((rr=I.current)==null?void 0:rr.code,{dateStyle:ee})}`:`${D.selectedStartDate.toLocaleDateString((Pt=I.current)==null?void 0:Pt.code)} - ${D.selectedEndDate.toLocaleDateString((Tt=I.current)==null?void 0:Tt.code)}`:"";default:return D.selectedDate?ee?D.selectedDate.toLocaleString((nr=I.current)==null?void 0:nr.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((sr=I.current)==null?void 0:sr.code):""}},at=re===we.DateTime||re===we.DateOnly||re===we.DateRange,Cr=re===we.DateTime||re===we.TimeOnly,Xe=l===Gr.None?{}:l===Gr.Right?{rightElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})}),g.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[g.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})}),o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})})]}),leftElementClassName:"bsc:justify-center"},Nt={setDateSelector:ee=>K(ee)},Dr=S||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),Xt=()=>g.jsx(kt,{props:Nt,template:Dr,children:g.jsxs(g.Fragment,{children:[D.currentSelector===Re.DaySelector&&at&&D.dateInitialized&&I.current&&g.jsx(yp,{selectedDate:D.selectedDate,viewDate:D.currentViewDate,locale:I.current,showTimeSelector:L.current===we.DateTime,selectableDate:b,isValidDate:x,dispatcher:ie,onChange:Ve}),D.currentSelector===Re.MonthSelector&&at&&D.dateInitialized&&I.current&&g.jsx(vp,{viewDate:D.currentViewDate,locale:I.current,dateSelection:L.current,dispatcher:ie}),D.currentSelector===Re.YearSelector&&at&&D.dateInitialized&&I.current&&g.jsx(Pp,{viewDate:D.currentViewDate,locale:I.current,dispatcher:ie}),D.currentSelector===Re.TimeSelector&&Cr&&D.dateInitialized&&I.current&&g.jsx(wp,{viewDate:D.currentViewDate,showDateSelector:L.current===we.DateTime,locale:I.current,timeFormat:D.timeFormat,timeConstraints:v,onChange:y,dispatcher:ie}),D.currentSelector===Re.DateRangeSelector&&at&&D.dateInitialized&&I.current&&g.jsx(xp,{viewDate:D.currentViewDate,selectedStartDate:D.selectedStartDate,selectedEndDate:D.selectedEndDate,locale:I.current,onChange:y,dispatcher:ie})]})}),Jt=Gn({label:r,readOnly:t,allowClear:o,getValue:it,onFocus:A,onInput:Le,iconPosition:l,iconElement:Xe.rightElement||Xe.leftElement},D.currentViewDate,ie),er=R||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),jt=de("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",u);return g.jsx(Kn.Provider,{value:J.current,children:g.jsxs("div",{className:"bc-date-time",children:[r&&g.jsx(ft,{label:r,readOnly:t,className:"bc-dt-label"}),g.jsx(An,{mobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:g.jsx(Vr,{ref:M,value:it(),readOnly:t,inputMode:"none",className:jt,onFocus:A,onElementCreate:ee=>Qe(ee,!1),...Xe})}),g.jsx(mi,{visible:$,target:se,hidden:Qt,unmountWhenHidden:!0,children:Xt()})]}),aboveMobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:s===!1?g.jsx(Vr,{ref:M,value:it(),readOnly:t,className:jt,onFocus:A,onBlur:Ne,onInput:Le,onElementCreate:ee=>Qe(ee,!1),...Xe}):g.jsx(Pi,{ref:N,value:it(),readOnly:t,className:jt,format:_,isInputValid:Ye,onFocus:A,onBlur:Ne,onChange:ot,onElementCreate:ee=>Qe(ee,!0),...Xe})}),g.jsx(yi,{visible:$,target:se,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Qt,isClickedWithin:qe,unmountWhenHidden:!0,children:Xt()})]})})]})})};var Qn,_i;function _p(){if(_i)return Qn;_i=1;function e(l,d){var b,x;if(typeof d=="function")x=d(l),x!==void 0&&(l=x);else if(Array.isArray(d))for(b=0;b<d.length;b++)x=d[b](l),x!==void 0&&(l=x);return l}function t(l,d){return l[0]==="-"&&Array.isArray(d)&&/^-\d+$/.test(l)?d.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],c=function(l){return i.indexOf(l)===-1};function u(l,d){l.indexOf("[")>=0&&(l=l.replace(/\[/g,d).replace(/]/g,""));var b=l.split(d),x=b.filter(c);if(x.length!==b.length)throw Error("Refusing to update blacklisted property "+l);return b}var h=Object.prototype.hasOwnProperty;function f(l,d,b,x){if(!(this instanceof f))return new f(l,d,b,x);typeof d>"u"&&(d=!1),typeof b>"u"&&(b=!0),typeof x>"u"&&(x=!0),this.separator=l||".",this.override=d,this.useArray=b,this.useBrackets=x,this.keepArray=!1,this.cleanup=[]}var v=new f(".",!1,!0,!0);function P(l){return function(){return v[l].apply(v,arguments)}}return f.prototype._fill=function(l,d,b,x){var y=l.shift();if(l.length>0){if(d[y]=d[y]||(this.useArray&&r(l[0])?[]:{}),!s(d[y]))if(this.override)d[y]={};else{if(!(s(b)&&o(b)))throw new Error("Trying to redefine `"+y+"` which is a "+typeof d[y]);return}this._fill(l,d[y],b,x)}else{if(!this.override&&s(d[y])&&!o(d[y])){if(!(s(b)&&o(b)))throw new Error("Trying to redefine non-empty obj['"+y+"']");return}d[y]=e(b,x)}},f.prototype.object=function(l,d){var b=this;return Object.keys(l).forEach(function(x){var y=d===void 0?null:d[x],E=u(x,b.separator).join(b.separator);E.indexOf(b.separator)!==-1?(b._fill(E.split(b.separator),l,l[x],y),delete l[x]):l[x]=e(l[x],y)}),l},f.prototype.str=function(l,d,b,x){var y=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(y.split(this.separator),b,d,x):b[l]=e(d,x),b},f.prototype.pick=function(l,d,b,x){var y,E,V,R,S;for(E=u(l,this.separator),y=0;y<E.length;y++)if(R=t(E[y],d),d&&typeof d=="object"&&R in d){if(y===E.length-1)return b?(V=d[R],x&&Array.isArray(d)?d.splice(R,1):delete d[R],Array.isArray(d)&&(S=E.slice(0,-1).join("."),this.cleanup.indexOf(S)===-1&&this.cleanup.push(S)),V):d[R];d=d[R]}else return;return b&&Array.isArray(d)&&(d=d.filter(function($){return $!==void 0})),d},f.prototype.delete=function(l,d){return this.remove(l,d,!0)},f.prototype.remove=function(l,d,b){var x;if(this.cleanup=[],Array.isArray(l)){for(x=0;x<l.length;x++)this.pick(l[x],d,!0,b);return b||this._cleanup(d),d}else return this.pick(l,d,!0,b)},f.prototype._cleanup=function(l){var d,b,x,y;if(this.cleanup.length){for(b=0;b<this.cleanup.length;b++)x=this.cleanup[b].split("."),y=x.splice(0,-1).join("."),d=y?this.pick(y,l):l,d=d[x[0]].filter(function(E){return E!==void 0}),this.set(this.cleanup[b],d,l);this.cleanup=[]}},f.prototype.del=f.prototype.remove,f.prototype.move=function(l,d,b,x,y){return typeof x=="function"||Array.isArray(x)?this.set(d,e(this.pick(l,b,!0),x),b,y):(y=x,this.set(d,this.pick(l,b,!0),b,y)),b},f.prototype.transfer=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(this.pick(l,b,!0),y),x,E):(E=y,this.set(d,this.pick(l,b,!0),x,E)),x},f.prototype.copy=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(JSON.parse(JSON.stringify(this.pick(l,b,!1))),y),x,E):(E=y,this.set(d,this.pick(l,b,!1),x,E)),x},f.prototype.set=function(l,d,b,x){var y,E,V,R;if(typeof d>"u")return b;for(V=u(l,this.separator),y=0;y<V.length;y++){if(R=V[y],y===V.length-1)if(x&&n(d)&&n(b[R]))for(E in d)h.call(d,E)&&(b[R][E]=d[E]);else if(x&&Array.isArray(b[R])&&Array.isArray(d))for(var S=0;S<d.length;S++)b[V[y]].push(d[S]);else b[R]=d;else(!h.call(b,R)||!n(b[R])&&!Array.isArray(b[R]))&&(/^\d+$/.test(V[y+1])?b[R]=[]:b[R]={});b=b[R]}return b},f.prototype.transform=function(l,d,b){return d=d||{},b=b||{},Object.keys(l).forEach((function(x){this.set(l[x],this.pick(x,d),b)}).bind(this)),b},f.prototype.dot=function(l,d,b){d=d||{},b=b||[];var x=Array.isArray(l);return Object.keys(l).forEach((function(y){var E=x&&this.useBrackets?"["+y+"]":y;if(s(l[y])&&(n(l[y])&&!o(l[y])||Array.isArray(l[y])&&!this.keepArray&&l[y].length!==0))if(x&&this.useBrackets){var V=b[b.length-1]||"";return this.dot(l[y],d,b.slice(0,-1).concat(V+E))}else return this.dot(l[y],d,b.concat(E));else x&&this.useBrackets?d[b.join(this.separator).concat("["+y+"]")]=l[y]:d[b.concat(E).join(this.separator)]=l[y]}).bind(this)),d},f.pick=P("pick"),f.move=P("move"),f.transfer=P("transfer"),f.transform=P("transform"),f.copy=P("copy"),f.object=P("object"),f.str=P("str"),f.set=P("set"),f.delete=P("delete"),f.del=f.remove=P("remove"),f.dot=P("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v.override},set:function(d){v.override=!!d}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v[l]},set:function(d){v[l]=d}})}),f._process=e,Qn=f,Qn}var kp=_p();const Jr=rn(kp),Cp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=$e.Horizontal,isMultiSelect:u=!1,className:h,onChange:f,itemTemplate:v})=>{const[P,l]=p.useState(),[d,b]=p.useState([]),x=gn(()=>n,[n]),y=p.useId();p.useEffect(()=>{if(u){const F=Array.isArray(r)?r.map(C=>C.toString()):r?[String(r)]:void 0;b(F??[])}else r&&l(r.toString())},[r]);const E=F=>u?d.findIndex(C=>C===F)>-1:P===F,V=F=>{const C=F.toString();if(u){const Q=E(C);let I;Q?I=d.filter(he=>he!=C):I=[...d,C],b(I),f==null||f({name:e,value:I})}else C!==P&&(l(C),f==null||f({name:e,value:C}))},R=F=>{const{value:C}=F.target;l(C),f==null||f({name:e,value:C})},S=F=>{const{value:C,checked:Q}=F.target;let I;Q?I=[...d,C]:I=d.filter(he=>he!=C),b(I),f==null||f({name:e,value:I})},$=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"checkbox",onChange:S,checked:E(Q),className:"bsc:appearance-none"}),C]},F),O=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"radio",onChange:R,checked:E(Q),className:"bsc:appearance-none"}),C]},F),q=Ir(cr.FocusWithin),z=p.useCallback((F,C)=>g.jsx(g.Fragment,{children:C}),[]),se=v||z,ae=(F,C,Q)=>{const I=`element_${y}_${C}`,he=Jr.pick(s,F),k=String(Jr.pick(o,F)),M=C===0,N=C===Q.length-1,_=de("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-1 bsc:has-checked:text-white bsc:dark:has-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!i,"bc-read-only bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3 bsc:has-checked:text-gray-5 bsc:dark:has-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":i,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":M&&c===$e.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":N&&c===$e.Horizontal,"bsc:border-t bsc:border-b":!M&&!N&&c===$e.Horizontal,"bsc:border-l":!M&&c===$e.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":M&&c===$e.Vertical,"bsc:border bsc:rounded-b-md":N&&c===$e.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!M&&!N&&c===$e.Vertical},q),W={itemId:I,selectedValue:u?d:P,itemText:he,itemValue:k,itemData:F,itemStyles:_,isSelected:E(k),isFirstItem:M,isLastItem:N,onItemChanged:V};return u?g.jsx(kt,{props:W,template:se,children:$(I,he,k,_)}):g.jsx(kt,{props:W,template:se,children:O(I,he,k,_)})},re=de("bsc:flex bsc:flex-col bsc:gap-2",h),K=de("bsc:flex",{"bsc:flex-col bsc:w-max":c===$e.Vertical}),L=F=>g.jsx("div",{className:K,children:F.map(ae)});return g.jsxs("div",{className:re,children:[t&&g.jsx(ft,{label:t,readOnly:i}),x&&L(x)]})},Dp=p.memo(Cp),Op=({id:e,name:t,label:r,value:n,checked:s=!1,labelLocation:o=Be.Right,readOnly:i=!1,useAnimation:c,onChange:u})=>{const h=hn(c),f=p.useCallback(l=>{u==null||u(l)},[u]),v=de("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),P=de("bc-radio-item-outer bsc:relative bsc:*:size-[21px]",{"bsc:pl-1":o===Be.Left,"bsc:pr-1":o===Be.Right,"bsc-radio-item-animate":!i&&h,"bsc-radio-item":!i,"bc-read-only bsc-radio-item-read-only":i});return g.jsxs("div",{className:v,children:[o===Be.Left&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i}),g.jsxs("label",{className:P,children:[g.jsx("input",{id:e,name:t,value:n,type:"radio",checked:s,onChange:f,className:"bc-radio-item-input-hidden bsc:hidden"}),g.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:"bc-radio-item-svg",children:[g.jsx("circle",{cx:15,cy:15,r:13}),g.jsx("circle",{cx:"50%",cy:"50%",r:7})]})]}),o===Be.Right&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i})]})},Np=p.memo(Op),jp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:c=Be.Right,orientation:u=$e.Vertical,className:h,useAnimation:f,onChange:v})=>{const[P,l]=p.useState(r),d=gn(()=>n,[n]),b=p.useId(),x=p.useCallback(S=>{const $=S.target.value;l($),v==null||v({name:e,value:$,originalEvent:S})},[e]),y=(S,$)=>{const O=`${b}_radio_${$}`,q=Jr.pick(o,S);return g.jsx(Np,{id:O,name:e,label:Jr.pick(s,S),value:q,checked:q==P,labelLocation:c,readOnly:i,useAnimation:f,onChange:x},O)},E=de("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",h),V=de("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===$e.Vertical,"bsc:*:pr-2":u===$e.Horizontal}),R=S=>g.jsx("div",{className:V,children:S.map(y)});return g.jsxs("div",{className:E,children:[t&&g.jsx(ft,{label:t,readOnly:i}),d&&R(d)]})},Ip=p.memo(jp),Mp=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:c})=>{const[u,h]=p.useState(!1),f=p.useId(),v=hn(o);p.useEffect(()=>{h(n)},[n]);const P=y=>{const{checked:E}=y.target;h(E),c==null||c({originalEvent:y,name:e||y.target.name,value:r||y.target.value,checked:E})},l=de("bc-toggle-wrapper bsc:flex bsc:flex-col",i),d=Ir(cr.FocusWithin),b=de("bc-toggle-container bsc-toggle-switch bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!s,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":s},d),x=de("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!s,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":s,"bsc:[transition:0.3s]":!s&&v});return g.jsxs("div",{className:l,children:[t&&g.jsx(ft,{label:t,htmlFor:f,readOnly:s}),g.jsxs("label",{className:b,children:[g.jsx("input",{id:f,name:e,value:r,type:"checkbox",checked:u,onChange:P,className:"bsc:appearance-none"}),g.jsx("div",{id:"switch",className:x})]})]})},Rp=p.memo(Mp);ne.BeeSoftProvider=Ni,ne.Button=et,ne.Checkbox=Ys,ne.CheckboxGroup=ya,ne.ContentEditableInput=Vr,ne.DateFormatType=kr,ne.DateScrollerType=zt,ne.DateSelectionType=we,ne.DateTime=Ep,ne.FormGroupItemOrientation=$e,ne.FormattedInput=Pi,ne.GroupButton=Dp,ne.MediaQuery=An,ne.MobileOverlayPanel=mi,ne.OverlayPanel=yi,ne.RadioButton=Ip,ne.SelectionLabelLocation=Be,ne.Toggle=Rp,ne.applyBeeSoftTheme=_h,ne.createBeeSoftTheme=kh,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
101
+ */var $n,ei;function Zh(){if(ei)return $n;ei=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(d){p[d]=d}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $n=s()?Object.assign:function(o,i){for(var c,u=n(o),p,d=1;d<arguments.length;d++){c=Object(arguments[d]);for(var b in c)t.call(c,b)&&(u[b]=c[b]);if(e){p=e(c);for(var x=0;x<p.length;x++)r.call(c,p[x])&&(u[p[x]]=c[p[x]])}}return u},$n}var Hn,ti;function Yn(){if(ti)return Hn;ti=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hn=e,Hn}var Wn,ri;function ni(){return ri||(ri=1,Wn=Function.call.bind(Object.prototype.hasOwnProperty)),Wn}var Vn,si;function Qh(){if(si)return Vn;si=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yn(),r={},n=ni();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,c,u,p){if(process.env.NODE_ENV!=="production"){for(var d in o)if(n(o,d)){var b;try{if(typeof o[d]!="function"){var x=Error((u||"React class")+": "+c+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}b=o[d](i,d,u,c,null,t)}catch(f){b=f}if(b&&!(b instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in r)){r[b.message]=!0;var l=p?p():"";e("Failed "+c+" type: "+b.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Vn=s,Vn}var Bn,oi;function Gh(){if(oi)return Bn;oi=1;var e=Jo(),t=Zh(),r=Yn(),n=ni(),s=Qh(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Bn=function(c,u){var p=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function b(k){var M=k&&(p&&k[p]||k[d]);if(typeof M=="function")return M}var x="<<anonymous>>",l={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:P(),arrayOf:A,element:D(),elementType:E(),instanceOf:q,node:ne(),objectOf:B,oneOf:R,oneOfType:H,shape:W,exact:$};function f(k,M){return k===M?k!==0||1/k===1/M:k!==k&&M!==M}function m(k,M){this.message=k,this.data=M&&typeof M=="object"?M:{},this.stack=""}m.prototype=Error.prototype;function w(k){if(process.env.NODE_ENV!=="production")var M={},_=0;function C(ee,Y,K,G,re,O,ae){if(G=G||x,O=O||K,ae!==r){if(u){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=G+":"+K;!M[Ne]&&_<3&&(o("You are manually calling a React.PropTypes validation function for the `"+O+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[Ne]=!0,_++)}}return Y[K]==null?ee?Y[K]===null?new m("The "+re+" `"+O+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new m("The "+re+" `"+O+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:k(Y,K,G,re,O)}var U=C.bind(null,!1);return U.isRequired=C.bind(null,!0),U}function v(k){function M(_,C,U,ee,Y,K){var G=_[C],re=F(G);if(re!==k){var O=Q(G);return new m("Invalid "+ee+" `"+Y+"` of type "+("`"+O+"` supplied to `"+U+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return w(M)}function P(){return w(i)}function A(k){function M(_,C,U,ee,Y){if(typeof k!="function")return new m("Property `"+Y+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var K=_[C];if(!Array.isArray(K)){var G=F(K);return new m("Invalid "+ee+" `"+Y+"` of type "+("`"+G+"` supplied to `"+U+"`, expected an array."))}for(var re=0;re<K.length;re++){var O=k(K,re,U,ee,Y+"["+re+"]",r);if(O instanceof Error)return O}return null}return w(M)}function D(){function k(M,_,C,U,ee){var Y=M[_];if(!c(Y)){var K=F(Y);return new m("Invalid "+U+" `"+ee+"` of type "+("`"+K+"` supplied to `"+C+"`, expected a single ReactElement."))}return null}return w(k)}function E(){function k(M,_,C,U,ee){var Y=M[_];if(!e.isValidElementType(Y)){var K=F(Y);return new m("Invalid "+U+" `"+ee+"` of type "+("`"+K+"` supplied to `"+C+"`, expected a single ReactElement type."))}return null}return w(k)}function q(k){function M(_,C,U,ee,Y){if(!(_[C]instanceof k)){var K=k.name||x,G=ue(_[C]);return new m("Invalid "+ee+" `"+Y+"` of type "+("`"+G+"` supplied to `"+U+"`, expected ")+("instance of `"+K+"`."))}return null}return w(M)}function R(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function M(_,C,U,ee,Y){for(var K=_[C],G=0;G<k.length;G++)if(f(K,k[G]))return null;var re=JSON.stringify(k,function(ae,L){var Ne=Q(L);return Ne==="symbol"?String(L):L});return new m("Invalid "+ee+" `"+Y+"` of value `"+String(K)+"` "+("supplied to `"+U+"`, expected one of "+re+"."))}return w(M)}function B(k){function M(_,C,U,ee,Y){if(typeof k!="function")return new m("Property `"+Y+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var K=_[C],G=F(K);if(G!=="object")return new m("Invalid "+ee+" `"+Y+"` of type "+("`"+G+"` supplied to `"+U+"`, expected an object."));for(var re in K)if(n(K,re)){var O=k(K,re,U,ee,Y+"."+re,r);if(O instanceof Error)return O}return null}return w(M)}function H(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var M=0;M<k.length;M++){var _=k[M];if(typeof _!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(_)+" at index "+M+"."),i}function C(U,ee,Y,K,G){for(var re=[],O=0;O<k.length;O++){var ae=k[O],L=ae(U,ee,Y,K,G,r);if(L==null)return null;L.data&&n(L.data,"expectedType")&&re.push(L.data.expectedType)}var Ne=re.length>0?", expected one of type ["+re.join(", ")+"]":"";return new m("Invalid "+K+" `"+G+"` supplied to "+("`"+Y+"`"+Ne+"."))}return w(C)}function ne(){function k(M,_,C,U,ee){return I(M[_])?null:new m("Invalid "+U+" `"+ee+"` supplied to "+("`"+C+"`, expected a ReactNode."))}return w(k)}function oe(k,M,_,C,U){return new m((k||"React class")+": "+M+" type `"+_+"."+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function W(k){function M(_,C,U,ee,Y){var K=_[C],G=F(K);if(G!=="object")return new m("Invalid "+ee+" `"+Y+"` of type `"+G+"` "+("supplied to `"+U+"`, expected `object`."));for(var re in k){var O=k[re];if(typeof O!="function")return oe(U,ee,Y,re,Q(O));var ae=O(K,re,U,ee,Y+"."+re,r);if(ae)return ae}return null}return w(M)}function $(k){function M(_,C,U,ee,Y){var K=_[C],G=F(K);if(G!=="object")return new m("Invalid "+ee+" `"+Y+"` of type `"+G+"` "+("supplied to `"+U+"`, expected `object`."));var re=t({},_[C],k);for(var O in re){var ae=k[O];if(n(k,O)&&typeof ae!="function")return oe(U,ee,Y,O,Q(ae));if(!ae)return new m("Invalid "+ee+" `"+Y+"` key `"+O+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(_[C],null," ")+`
102
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var L=ae(K,O,U,ee,Y+"."+O,r);if(L)return L}return null}return w(M)}function I(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(I);if(k===null||c(k))return!0;var M=b(k);if(M){var _=M.call(k),C;if(M!==k.entries){for(;!(C=_.next()).done;)if(!I(C.value))return!1}else for(;!(C=_.next()).done;){var U=C.value;if(U&&!I(U[1]))return!1}}else return!1;return!0;default:return!1}}function Z(k,M){return k==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function F(k){var M=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":Z(M,k)?"symbol":M}function Q(k){if(typeof k>"u"||k===null)return""+k;var M=F(k);if(M==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return M}function j(k){var M=Q(k);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function ue(k){return!k.constructor||!k.constructor.name?x:k.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Bn}var Un,ii;function Xh(){if(ii)return Un;ii=1;var e=Yn();function t(){}function r(){}return r.resetWarningCache=t,Un=function(){function n(i,c,u,p,d,b){if(b!==e){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Un}var ai;function Jh(){if(ai)return zr.exports;if(ai=1,process.env.NODE_ENV!=="production"){var e=Jo(),t=!0;zr.exports=Gh()(e.isElement,t)}else zr.exports=Xh()();return zr.exports}var ep=Jh();const le=en(ep),ci={disabled:!1};var tp=process.env.NODE_ENV!=="production"?le.oneOfType([le.number,le.shape({enter:le.number,exit:le.number,appear:le.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&le.oneOfType([le.string,le.shape({enter:le.string,exit:le.string,active:le.string}),le.shape({enter:le.string,enterDone:le.string,enterActive:le.string,exit:le.string,exitDone:le.string,exitActive:le.string})]);const ui=h.createContext(null);var rp=function(t){return t.scrollTop},kr="unmounted",Ct="exited",Ot="entering",qt="entered",zn="exiting",dt=function(e){zh(t,e);function t(n,s){var o;o=e.call(this,n,s)||this;var i=s,c=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?c?(u=Ct,o.appearStatus=Ot):u=qt:n.unmountOnExit||n.mountOnEnter?u=kr:u=Ct,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===kr?{status:Ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Ot&&i!==qt&&(o=Ot):(i===Ot||i===qt)&&(o=zn)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,c;return o=i=c=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,c=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:c}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Ot){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Xe.findDOMNode(this);i&&rp(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:kr})},r.performEnter=function(s){var o=this,i=this.props.enter,c=this.context?this.context.isMounting:s,u=this.props.nodeRef?[c]:[Xe.findDOMNode(this),c],p=u[0],d=u[1],b=this.getTimeouts(),x=c?b.appear:b.enter;if(!s&&!i||ci.disabled){this.safeSetState({status:qt},function(){o.props.onEntered(p)});return}this.props.onEnter(p,d),this.safeSetState({status:Ot},function(){o.props.onEntering(p,d),o.onTransitionEnd(x,function(){o.safeSetState({status:qt},function(){o.props.onEntered(p,d)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),c=this.props.nodeRef?void 0:Xe.findDOMNode(this);if(!o||ci.disabled){this.safeSetState({status:Ct},function(){s.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:zn},function(){s.props.onExiting(c),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ct},function(){s.props.onExited(c)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(c){i&&(i=!1,o.nextCallback=null,s(c))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Xe.findDOMNode(this),c=s==null&&!this.props.addEndListener;if(!i||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],p=u[0],d=u[1];this.props.addEndListener(p,d)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===kr)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var c=Uh(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return h.createElement(ui.Provider,{value:null},typeof i=="function"?i(s,c):h.cloneElement(h.Children.only(i),c))},t}(h.Component);dt.contextType=ui,dt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:le.shape({current:typeof Element>"u"?le.any:function(e,t,r,n,s,o){var i=e[t];return le.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,r,n,s,o)}}),children:le.oneOfType([le.func.isRequired,le.element.isRequired]).isRequired,in:le.bool,mountOnEnter:le.bool,unmountOnExit:le.bool,appear:le.bool,enter:le.bool,exit:le.bool,timeout:function(t){var r=tp;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[t].concat(s))},addEndListener:le.func,onEnter:le.func,onEntering:le.func,onEntered:le.func,onExit:le.func,onExiting:le.func,onExited:le.func}:{};function Kt(){}dt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Kt,onEntering:Kt,onEntered:Kt,onExit:Kt,onExiting:Kt,onExited:Kt},dt.UNMOUNTED=kr,dt.EXITED=Ct,dt.ENTERING=Ot,dt.ENTERED=qt,dt.EXITING=zn;const li=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:c,onEntered:u,onExit:p,onExited:d,children:b})=>{const x=r||{transition:`opacity ${t}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${o}`,opacity:0},exited:{transition:`opacity ${t}ms ${o}`,opacity:0},unmounted:{}};return y.jsx(dt,{in:e,timeout:t,onEntering:c,onEntered:u,onExit:p,onExited:d,unmountOnExit:i,children:f=>b({state:f,defaultStyle:x,transitionStyles:l})})};function fi(e){return e.target?e.target:e}const di=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:c="DONE",shown:u,hidden:p,isClickedWithin:d,children:b})=>{const[x,l]=h.useState(-1),[f,m]=h.useState(-1),[w,v]=h.useState(e),P=h.useRef(100),A=h.useRef(101),D=h.useRef(),E=h.useRef(),q=h.useRef();h.useEffect(()=>{t&&(D.current=fi(t));const $=Uo("zIndex",I=>I==="auto"||I==="-1"?!1:parseInt(I)>100).map(I=>parseInt(I,10));$.length>0&&(P.current=Math.max(...$)+1,A.current=Math.max(...$)+2),v(e)},[e,t]);const R=$=>{E.current=$},B=()=>{m(P.current),l(A.current)},H=()=>{if(!E.current)return;u==null||u();let $;D.current&&($=[D.current]);const I=Z=>{Z?d==null||d():v(!1)};q.current=Ko(E.current,I,$)},ne=()=>{q.current&&Zo(q.current)},oe=()=>{m(-1),l(-1),p==null||p()},W={entering:{opacity:.5},entered:{opacity:.5}};return Xe.createPortal(y.jsx(li,{start:w,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:B,onEntered:H,onExit:ne,onExited:oe,unmountOnExit:n,children:({state:$,defaultStyle:I,transitionStyles:Z})=>y.jsxs("div",{ref:F=>F&&R(F),children:[y.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:f,...Z[$],...W[$]}}),y.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:x,...I,...Z[$]},children:[y.jsx("div",{className:"bsc:w-full",children:b}),y.jsx(y.Fragment,{children:y.jsx(Je,{buttonType:"primary",fullWidth:!0,onClick:()=>v(!1),className:"bsc:text-xs bsc:font-bold",children:c})})]})]})}),r)};var hi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(hi||{}),pi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(pi||{});class Ce{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(t,r,n=0,s=2){let{left:o,top:i}=Ce.positionToTarget(r,s);const c=t.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-c.width;break;case 2:i=i-c.height;break;case 3:i=i-c.height,o=o-c.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(t,r){const n=Ce.getScreenDimensions(),s=t.getBoundingClientRect(),o=Ce.positionElementToTarget(t,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||Ce.positionElementToTarget(t,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const c=Ce.positionElementToTarget(t,r,2,0);if(c.left+s.width<n.width&&c.top>=0)return!0;const u=Ce.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(t){const r=Ce.getScreenDimensions(),n=t.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(t,r,n=0,s=2){const{left:o,top:i}=Ce.positionElementToTarget(t,r,n,s),c=t.getBoundingClientRect(),u=Ce.determineOffScreenLocation(c);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return Ce.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return Ce.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return Ce.positionElementToTarget(t,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return Ce.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return Ce.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return Ce.positionElementToTarget(t,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(t){const r=Ce.getScreenDimensions(),n={left:t.left<0,top:t.top<0,right:t.left+t.width>r.width,bottom:t.top+t.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const mi=({visible:e,target:t,targetPosition:r=hi.BottomLeft,elementAlignment:n=pi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:c=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:p=!1,transitionDuration:d=400,showTransitionOptions:b="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:l,hidden:f,isClickedWithin:m,markupCreated:w,children:v})=>{const[P,A]=h.useState(-1),[D,E]=h.useState(e),[q,R]=h.useState(!1),B=h.useRef(!1),H=h.useRef(100),ne=h.useRef({left:0,top:0,width:0}),oe=h.useRef(),W=h.useRef(),$=h.useRef(),I=h.useRef(),Z=h.useRef(),F=h.useRef(),Q=cs();h.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(j)),()=>{var Y,K;u===!0&&(W.current&&((Y=F.current)==null||Y.unobserve(W.current)),(K=F.current)==null||K.disconnect())}),[]),h.useEffect(()=>{if(t&&(oe.current=fi(t),i)){const Y=Q==null?void 0:Q.isValidScrollableElement;$.current=Bo(oe.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,Y),$.current.tagName.toLowerCase()==="html"&&($.current=document)}if(c){const Y=Uo("zIndex",K=>parseInt(K)>=100).map(K=>parseInt(K));Y.length>0&&(H.current=Math.max(...Y)+1)}e!==void 0&&E(e)},[t,e,i,c]);const j=Y=>{if(W.current){const K=Ce.getScreenDimensions(),G=Y[Y.length-1].target,re=G.getBoundingClientRect(),O=Ce.determineOffScreenLocation(re);if(O){if(oe.current&&Ce.canPositionElementOnScreenWithTarget(G,oe.current)){const ae=Ce.positionElementToTargetOnScreen(W.current,oe.current,n,r);ne.current={...ne.current,...ae}}else O.right?ne.current.left=K.width-re.width:O.left&&(ne.current.left=0),O.bottom?ne.current.top=K.height-re.height:O.top&&(ne.current.top=0);ue()}}},ue=xr(()=>{B.current=!B.current,R(B.current)},20),k=()=>{A(H.current)},M=()=>{if(!W.current)return;l==null||l();let Y;!s&&oe.current&&(Y=[oe.current]);const K=G=>{G?m==null||m():E(!1)};I.current=Ko(W.current,K,Y),i&&(Z.current=hf(G=>W.current&&Dh(G,W.current)&&E(!1),100,{leading:!0}),$.current&&$.current.addEventListener("scroll",Z.current))},_=()=>{$.current&&Z.current&&($.current.removeEventListener("scroll",Z.current),Z.current=void 0),I.current&&Zo(I.current)},C=()=>{A(-1),f==null||f()},U=Y=>{var K,G;if(u===!0&&W.current&&((K=F.current)==null||K.unobserve(W.current)),W.current=Y,w==null||w(Y),oe.current){const re=Ce.positionElementToTarget(W.current,oe.current,n,r);ne.current={...re,width:oe.current.offsetWidth},u===!0&&(Ce.canPositionElementOnScreenWithTarget(W.current,oe.current)||Ce.canPositionElementOnScreen(W.current))&&((G=F.current)==null||G.observe(W.current))}},ee=h.useMemo(()=>{const Y={top:`${ne.current.top}px`,left:`${ne.current.left}px`,zIndex:P};return o&&(Y.width=`${ne.current.width}px`),Y},[q,P,o]);return y.jsx(li,{start:D,timeout:d,showTransitionOptions:b,hideTransitionOptions:x,onEntering:k,onEntered:M,onExit:_,onExited:C,unmountOnExit:p,children:({state:Y,defaultStyle:K,transitionStyles:G})=>y.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...ee,...K,...G[Y]},ref:re=>re&&U(re),children:v})})};let Kr;const np=new Uint8Array(16);function sp(){if(!Kr&&(Kr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kr(np)}const Le=[];for(let e=0;e<256;++e)Le.push((e+256).toString(16).slice(1));function op(e,t=0){return Le[e[t+0]]+Le[e[t+1]]+Le[e[t+2]]+Le[e[t+3]]+"-"+Le[e[t+4]]+Le[e[t+5]]+"-"+Le[e[t+6]]+Le[e[t+7]]+"-"+Le[e[t+8]]+Le[e[t+9]]+"-"+Le[e[t+10]]+Le[e[t+11]]+Le[e[t+12]]+Le[e[t+13]]+Le[e[t+14]]+Le[e[t+15]]}const gi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ip(e,t,r){if(gi.randomUUID&&!e)return gi.randomUUID();e=e||{};const n=e.random||(e.rng||sp)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,op(n)}class Cr{static create(t){const r=[];let n=0;for(let s=0,o=t.formatParts.length;s<o;s++){const i=t.formatParts[s],c=n,u=c+i.characterCount;r.push({startPosition:c,endPosition:u,...i}),n=u}return r}}class ap{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"currentPartIndex",0);T(this,"currentPartIndices",[]);T(this,"currentCursorPosition",0);T(this,"highlightCursorPosition",0);T(this,"currentCursorStartPosition",-1);T(this,"currentCursorEndPosition",-1);T(this,"inputElement");T(this,"inputSelection",null);T(this,"inputRange");T(this,"textNode");this.instanceCollection=Zt.getInstance(),this.formatPartList=Cr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){var r;const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&((r=this.inputRange)==null?void 0:r.startOffset)===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=t,s=t):t<r?(n=t,s=r):(o=!1,n=r,s=t),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){var n;const t=window.getSelection(),r=t==null?void 0:t.getRangeAt(0);if(this.inputElement&&t&&r){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const p=document.createRange();return p.selectNodeContents(u),p.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let o=0;for(;s.nextNode();)o+=((n=s.currentNode.textContent)==null?void 0:n.length)||0;r.startContainer.nodeType===Node.TEXT_NODE&&(o+=r.startOffset);const i=this.inputSlotCollection.getLastSlotWithData(),c=i.startPosition+i.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(o>c?c:o):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(t>=r.startPosition&&t<=r.endPosition)this.setCursorSelection(t);else for(let n=this.currentPartIndex-1;n>=0;n--)if(r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let r=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(t?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let c=this.currentPartIndex+1,u=this.formatPartList.length;c<u;c++)if(i=this.formatPartList[c],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[c+1].startPosition:o=this.formatPartList[c+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,r=this.formatPartList.length;t<r;t++){const n=this.formatPartList[t];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){var t,r;this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),(t=this.inputSelection)==null||t.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),(r=this.inputSelection)==null||r.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class cp{static create(t){const r=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class up{constructor(t){T(this,"inputSlots");this.inputSlots=cp.create(Cr.create(t))}clearAllSlots(){for(let t=0,r=this.inputSlots.length;t<r;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(r=>r.partIndex===t)}getSlots(t){return this.inputSlots.filter(r=>t.includes(r.partIndex))}getSlotsFromCursorPosition(t){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(t>=o.startPosition&&t<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(n=>!n.isComplete);let r=t;for(let n=t+1,s=this.inputSlots.length;n<s;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class Zt{static getInstance(){return this.instance||(this.instance=new lp),this.instance}}T(Zt,"instance");class lp{constructor(){T(this,"navigatorInstances");T(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new ap(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new up(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class qn{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"inputElement");this.instanceCollection=Zt.getInstance(),this.formatPartList=Cr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,s=this.formatPartList.length;n<s;n++){const o=this.formatPartList[n];if(o.isSeparator)t+=o.inputText;else{const i=this.inputSlotCollection.getSlot(n);i&&(t+=i.partText+((r=i.inputText)==null?void 0:r.repeat(i.characterCount-i.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var nt=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(nt||{});class bi{constructor(){T(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);T(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);T(this,"editingKeys",["Backspace","Delete"]);T(this,"ignoreKeys",["Shift","Alt","Control","Fn","Meta"])}isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class fp{constructor(t){T(this,"_currentIndex",0);T(this,"index",0);T(this,"formatParts");this.formatParts=Cr.create(t)}get currentIndex(){return this._currentIndex}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class dp{constructor(t){T(this,"formatParts");this.formatParts=Cr.create(t)}getUniqueSeparators(){const t=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!t.includes(o.inputText)&&t.push(o.inputText)}return t}}class yi{constructor(t,r){T(this,"instanceCollection");T(this,"inputSlotCollection");T(this,"formatNavigator");T(this,"keyTypeChecker");T(this,"formatRenderer");T(this,"formatPartList");T(this,"partEntryList");this.format=t,this.instanceCollection=Zt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new bi,this.formatRenderer=new qn(t,r),this.formatPartList=new fp(t),this.partEntryList=new dp(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const o=this.formatPartList.currentIndex,i=this.formatPartList.next();if(i&&i.inputText){const c=t.indexOf(i.inputText,r),u=this.inputSlotCollection.getSlot(o);if(u&&c>-1){const p=c-r>u.characterCount?r+u.characterCount:c;u.partText=t.substring(r,p),this.processSlotRules(u),r=c+i.characterCount}}}else{const o=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);o&&(o.partText=t.substring(r,r+o.characterCount),this.processSlotRules(o))}}}processPastedValue(t,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let c=s[0].partText.substring(o);s[0].partText="";for(let b=1,x=s.length;b<x;b++)c+=s[b].partText,s[b].partText="";const u=this.removeSeparatorsFromValue(t),p=i+u+c;let d=0;for(let b=0,x=s.length;b<x;b++){const l=s[b];l.partText=p.substring(d,l.characterCount+d),d+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(t){let r=t;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const c=this.inputSlotCollection.getPreviousSlot(r.partIndex);c&&(c.partText=c.partText.substring(0,c.partText.length-1),o&&this.shiftFormatParts(c),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(c.startPosition+c.partText.length),this.processSlotRules(c,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=t.length;s<o;s++){const i=t[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=t.length;s<o;s++)this.processSlotRules(t[s])}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,s=r.characterCount,o=r.partText;if(r.valueType===nt.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,c=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,p=parseInt(this.createNewValue(r,n));if(i&&p>i)if(c){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const d=this.inputSlotCollection.getNextSlot(r.partIndex);d&&!d.isComplete&&(d.partText=n),this.formatRenderer.render(),d&&this.formatNavigator.setCursorPosition(d.isComplete?d.startPosition:d.startPosition+1)}else return;else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,t))}createNewValue(t,r){const n=t.partText,s=this.formatNavigator.getCursorPosition();if(s>=t.startPosition+t.partText.length)return n+r;{const o=s-t.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(t,r=!1){const n=t.characterCount,s=t.allCharactersRequired||!1;if(t.valueType===nt.Numeric){const o=t.minimumValue,i=t.maximumValue;if(s)t.isComplete=t.partText.length===n;else if(o!==void 0&&i!==void 0){const c=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=o&&u<=i,t.isComplete&&c&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else s?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class hp{constructor(t,r){T(this,"instanceCollection");T(this,"formatNavigator");T(this,"ruleProcessor");T(this,"keyTypeChecker");T(this,"formatRenderer");this.format=t,this.instanceCollection=Zt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new yi(t,r),this.keyTypeChecker=new bi,this.formatRenderer=new qn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=t;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class pp{constructor(t,r=""){T(this,"instanceId");T(this,"instanceCollection");T(this,"keyProcessor");T(this,"formatNavigator");T(this,"formatRenderer");T(this,"inputSlotCollection");T(this,"inputRuleProcessor");T(this,"previousOutputValue","");T(this,"inputElementSet",!1);T(this,"isInputFocused",!1);T(this,"inputElement");T(this,"onFormatChange");this.inputValue=r,this.instanceId=ip(),this.instanceCollection=Zt.getInstance(),this.keyProcessor=new hp(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new qn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new yi(t,this.instanceId)}inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{var r,n;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML),t&&((n=this.inputElement)!=null&&n.innerHTML)&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const mp=(e,t)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:c,rightElement:u,className:p,leftElementClassName:d,rightElementClassName:b,isSingleLine:x=!1,allowSingleLineScroll:l=!1,isInputValid:f,onChange:m,onFocus:w,onBlur:v,onElementCreate:P,onLeftElementClick:A,onRightElementClick:D}=e,[E,q]=h.useState(!0),R=h.useRef(),B=h.useRef(),H=h.useRef(),ne=h.useRef(!1);h.useEffect(()=>(document.addEventListener("mouseup",F),()=>{var _;(_=H.current)==null||_.dispose(),document.removeEventListener("mouseup",F)}),[]),h.useEffect(()=>{var _;(_=H.current)==null||_.inputValuePassed(r)},[r]),h.useEffect(()=>{var _,C,U;(_=H.current)==null||_.dispose(),n&&(H.current=new pp(n,r),B.current&&((C=H.current)==null||C.inputElementCreated(B.current)),(U=H.current)==null||U.registerFormatChangeEvent(oe))},[n]);const oe=h.useCallback(_=>{f?f(_)?(q(!0),m==null||m(_)):q(!1):m==null||m(_)},[m]),W=h.useCallback(_=>{var C;(C=H.current)==null||C.inputFocused(),w==null||w(_)},[w]),$=h.useCallback(_=>{var C;(C=H.current)==null||C.inputBlurred(),v==null||v(_)},[v]),I=h.useCallback(()=>{ne.current=!0},[]),Z=h.useCallback(()=>{var _;if(ne.current)ne.current=!1,(_=H.current)==null||_.mouseUpHandler();else{const C=new MouseEvent("mouseup");document.dispatchEvent(C)}},[]),F=h.useCallback(()=>{var _;ne.current&&(ne.current=!1,(_=H.current)==null||_.mouseUpHandler())},[]),Q=h.useCallback(_=>{var C;(C=H.current)==null||C.keyDownHandler(_)},[]),j=h.useCallback(_=>{var U,ee;_.preventDefault(),_.stopPropagation();const C=(U=_.clipboardData)==null?void 0:U.getData("text/plain");C&&((ee=H.current)==null||ee.pastedValue(C))},[]),ue=h.useCallback(_=>{var C,U,ee,Y,K,G,re,O,ae,L,Ne,Be,Re,Ye,st,Ze,Ve;(U=(C=R.current)==null?void 0:C.inputElement)==null||U.removeEventListener("keydown",Q),(Y=(ee=R.current)==null?void 0:ee.inputElement)==null||Y.removeEventListener("mousedown",I),(G=(K=R.current)==null?void 0:K.inputElement)==null||G.removeEventListener("mouseup",Z),(O=(re=R.current)==null?void 0:re.inputElement)==null||O.removeEventListener("paste",j),R.current=_,(L=(ae=R.current)==null?void 0:ae.inputElement)==null||L.addEventListener("keydown",Q),(Be=(Ne=R.current)==null?void 0:Ne.inputElement)==null||Be.addEventListener("mousedown",I),(Ye=(Re=R.current)==null?void 0:Re.inputElement)==null||Ye.addEventListener("mouseup",Z),(Ze=(st=R.current)==null?void 0:st.inputElement)==null||Ze.addEventListener("paste",j),B.current=(Ve=R.current)==null?void 0:Ve.inputElement},[]),k=h.useCallback(()=>{var _;(_=R.current)==null||_.focus()},[]);h.useImperativeHandle(t,()=>({focus:k}));const M=he(p,{"bsc:border-error!":!E});return y.jsx(Wr,{ref:_=>_&&ue(_),readOnly:s,debounceTime:o,fillContainer:i,leftElement:c,rightElement:u,className:M,leftElementClassName:d,rightElementClassName:b,isSingleLine:x,allowSingleLineScroll:l,onFocus:W,onBlur:$,onElementCreate:P,onLeftElementClick:A,onRightElementClick:D})},vi=h.forwardRef(mp),Kn=h.createContext(void 0);function xi(e,t,r=!0){var x,l;const n=Ao(e),s=No(e),o=fd(e);let i=_n(s)-(((x=t.options)==null?void 0:x.weekStartsOn)||0);i=i===-1?6:i;const c=_n(o)-(((l=t.options)==null?void 0:l.weekStartsOn)||0),u=xf({start:s,end:o}),p=n+i>35?6:5,d=wi(p,7,{dayValue:null,isCurrent:!0});let b=1;for(let f=0,m=p;f<m;f++){for(let w=f>0?0:i;w<7;w++){const v=u[b-1];if(v.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),d[f][w].dayValue=v,++b>n)break}if(b>n)break}if(i>0&&r)for(let f=0;f<i;f++)d[0][f].dayValue=ch(s,i-f),d[0][f].isCurrent=!1;if(c>-1&&r)for(let f=6;f>c;f--)d[p-1][f].dayValue=Ut(o,f-c),d[p-1][f].isCurrent=!1;return d}function wi(e,t,r){const n=[];for(let s=0,o=e;s<o;s++){const i=[];for(let c=0,u=t;c<u;c++){const p=gp(r)?r:{...r};i.push(p)}n.push(i)}return n}function gp(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function bp(e){var n;const t=uh(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let s=0;s<7;s++)r.push(Ut(t,s).toLocaleDateString(e.code,{weekday:"short"}));return r}function yp(e){const t=new Date(Date.UTC(2020,0,1)),r=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let n=0;for(let s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:mt(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function vp(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=wf({start:r,end:Sr(r,9)}),o=wi(3,4,"");let i=0;for(let c=0;c<3;c++)for(let u=0;u<4&&(o[c][u]=s[i++].toLocaleDateString(t.code,{year:"numeric"}),i!==s.length);u++);return o}function xp(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function wp(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function Si(e){return(await import(`/node_modules/date-fns/locale/${Sp(e)}`)).default}function Sp(e){const[t,r]=e.split("-");switch(t){case"af":return"af";case"ar":switch(r){case"DZ":return"ar-DZ";case"EG":return"ar-EG";case"MA":return"ar-MA";case"SA":return"ar-SA";case"TN":return"ar-TN";default:return"ar"}case"az":return"az";case"be":switch(r){case"tarask":return"be-tarask";default:return"be"}case"bg":return"bg";case"bn":return"bn";case"bs":return"bs";case"ca":return"ca";case"cs":return"cs";case"cy":return"cy";case"da":return"da";case"de":switch(r){case"AT":return"de-AT";default:return"de"}case"el":return"el";case"en":switch(r){case"AU":return"en-AU";case"CA":return"en-CA";case"GB":return"en-GB";case"IE":return"en-IE";case"IN":return"en-IN";case"NZ":return"en-NZ";case"US":return"en-US";default:return"en-ZA"}case"eo":return"eo";case"es":return"es";case"et":return"et";case"eu":return"eu";case"fa":return"fa-IR";case"fi":return"fi";case"fr":switch(r){case"CA":return"fr-CA";case"CH":return"fr-CH";default:return"fr"}case"fy":return"fy";case"gd":return"gd";case"gl":return"gl";case"gu":return"gu";case"he":return"he";case"hi":return"hi";case"hr":return"hr";case"ht":return"ht";case"hu":return"hu";case"hy":return"hy";case"id":return"id";case"is":return"is";case"it":switch(r){case"CH":return"it-CH";default:return"it"}case"ja":switch(r){case"Hira":return"ja-Hira";default:return"ja"}case"ka":return"ka";case"kk":return"kk";case"km":return"km";case"kn":return"kn";case"ko":return"ko";case"lb":return"lb";case"lt":return"lt";case"lv":return"lv";case"mk":return"mk";case"mn":return"mn";case"ms":return"ms";case"mt":return"mt";case"nb":return"nb";case"nl":switch(r){case"BE":return"nl-BE";default:return"nl"}case"nn":return"nn";case"oc":return"oc";case"pl":return"pl";case"pt":switch(r){case"BR":return"pt-BR";default:return"pt"}case"ro":return"ro";case"ru":return"ru";case"sk":return"sk";case"sl":return"sl";case"sq":return"sq";case"sr":switch(r){case"Latn":return"sr-Latn";default:return"sr"}case"sv":return"sv";case"ta":return"ta";case"te":return"te";case"th":return"th";case"tr":return"tr";case"ug":return"ug";case"uk":return"uk";case"uz":switch(r){case"Cyrl":return"uz-Cyrl";default:return"uz"}case"vi":return"vi";case"zh":switch(r){case"CN":return"zh-CN";case"HK":return"zh-HK";default:return"zh-TW"}default:return"en-AU"}}function Or(e,t){const r=lh(e);if(isNaN(r.valueOf())){let n=rt(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=rt(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=rt(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function Zn(e,t){const r=e.split("-");if(r.length!==2)return;const n=Or(r[0].trim(),t);if(!n)return;const s=Or(r[1].trim(),t);if(s)return[n,s]}var we=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(we||{}),Me=(e=>(e[e.DaySelector=0]="DaySelector",e[e.MonthSelector=1]="MonthSelector",e[e.YearSelector=2]="YearSelector",e[e.TimeSelector=3]="TimeSelector",e[e.DateRangeSelector=4]="DateRangeSelector",e))(Me||{}),Qt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Qt||{}),Dr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(Dr||{}),_e=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(_e||{}),bt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(bt||{}),Zr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(Zr||{}),fe=(e=>(e[e.SetDateSelector=0]="SetDateSelector",e[e.SetViewDate=1]="SetViewDate",e[e.SetSelectedDate=2]="SetSelectedDate",e[e.SetSelectedDateRange=3]="SetSelectedDateRange",e[e.SetSelectedStartDate=4]="SetSelectedStartDate",e[e.SetSelectedEndDate=5]="SetSelectedEndDate",e[e.SetTimeFormat=6]="SetTimeFormat",e[e.ClearDates=7]="ClearDates",e[e.InitializeDates=8]="InitializeDates",e))(fe||{});const Tp=(e,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...e,currentSelector:t.dateSelector,currentViewDate:t.viewDate||e.currentViewDate}:{...e};case 1:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 3:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 4:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...e,selectedEndDate:t.selectedEndDate};case 6:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 7:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 8:{const r={...e,currentViewDate:Pp(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...r,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...r,selectedDate:t.initialDate}}default:return{...e,currentSelector:Me.DaySelector}}};function Pp(e){return e?Array.isArray(e)?e[0]:e:new Date}const Qn=(e,t,r)=>{const n=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:mt(t,u)})},[t]),s=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Mn(t,u)})},[t]),o=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Sr(t,u)})},[t]),i=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Rn(t,u)})},[t]),c=h.useCallback(u=>{r({type:fe.SetDateSelector,dateSelector:u})},[]);return{...e,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:c}},Qr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=bt.Normal,locale:o,onDateSelected:i,selectableDate:c,isValidDate:u,dispatcher:p})=>{var Z;const[d,b]=h.useState(!1),[x,l]=h.useState(),[f,m]=h.useState(),[w,v]=h.useState(),[P,A]=h.useState(),D=h.useRef(),E=h.useRef(),q=h.useContext(Kn),R=h.useMemo(()=>q.calendarTemplate,[q.calendarTemplate]),B=async()=>o||await Si(Vo());h.useEffect(()=>{B().then(F=>{D.current=F,E.current=bp(D.current),b(!0)}).catch(F=>console.error(F))},[]),h.useEffect(()=>{e&&D.current&&v(xi(e,D.current,s===bt.Normal))},[e,d]),h.useEffect(()=>{A(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),h.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),m(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),h.useEffect(()=>{D.current&&o&&(D.current=o,v(xi(e,D.current,s===bt.Normal)))},[o]);const H=F=>{if(s===bt.Normal)p==null||p({type:fe.SetSelectedDate,selectedDate:F,viewDate:F}),i==null||i(F);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||dd(F,r)?i(F):r&&!n?i(F,{setEndDate:!0}):r&&n&&i(F)}},ne=F=>(P==null?void 0:P.toLocaleDateString())===F.toLocaleDateString(),oe=F=>{if(x&&f){const Q=F.getTime();return Q>=x&&Q<=f}return!1},W=Qn({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:E.current,monthMatrix:w,selectableDate:c,isValidDate:u,onDateClicked:H,isSelectedDate:ne,isInSelectedDateRange:oe},e,p),I=R||((F,Q)=>y.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:Q}));return y.jsx(kt,{props:W,template:I,children:y.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[(Z=E.current)==null?void 0:Z.map((F,Q)=>y.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:F},Q)),w==null?void 0:w.map((F,Q)=>F.map((j,ue)=>{var _,C;const k=j.dayValue!==null&&(c===void 0||c(j.dayValue)),M=he("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!j.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":j&&j.dayValue&&(P&&ne(j.dayValue)||x&&!f&&_o(x,j.dayValue)||x&&f&&oe(j.dayValue)),"bsc:cursor-pointer":k,"bsc:text-error bsc:cursor-not-allowed":!k,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":j.dayValue&&ah(j.dayValue)&&!(ne(j.dayValue)||oe(j.dayValue))},"bc-dt-date-cell");return y.jsx("div",{className:M,onClick:()=>j&&j.dayValue&&k&&(u===void 0||u(j.dayValue))&&H(j.dayValue),children:(C=j.dayValue)==null?void 0:C.getDate().toLocaleString((_=D.current)==null?void 0:_.code)},Q.toString()+ue.toString())}))]})})},Gr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=h.useContext(Kn).dateScrollerTemplate,p=Qn({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),d="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",x=u||((l,f)=>y.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:f}));return y.jsxs(kt,{props:p,template:x,children:[y.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:y.jsx(Je,{className:d,onClick:n,children:y.jsx(qe,{icon:"chevronLeft",size:He.Regular})})}),y.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:r,children:e}),y.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:y.jsx(Je,{className:d,onClick:s,children:y.jsx(qe,{icon:"chevronRight",size:He.Regular})})})]})},Ep=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:c})=>{const u=()=>{t&&c({type:fe.SetViewDate,viewDate:Mn(t,1)})},p=()=>{t&&c({type:fe.SetViewDate,viewDate:mt(t,1)})},d=()=>{c({type:fe.SetDateSelector,dateSelector:Me.MonthSelector})},b=()=>{c({type:fe.SetDateSelector,dateSelector:Me.TimeSelector})},x=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return y.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[y.jsx(Gr,{title:x(),scrollerType:Qt.Day,onTitleClicked:d,onMovePrevious:u,onMoveNext:p,viewDate:t,dispatcher:c}),y.jsx(Qr,{viewDate:t,selectedDate:e,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:c}),n&&y.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:y.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:b,children:(e==null?void 0:e.toLocaleTimeString(r.code))||xp(r)})})]})},kp=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const s=h.useRef(yp(t)),o=()=>{const d=Rn(e,1);n({type:fe.SetViewDate,viewDate:d})},i=()=>{const d=Sr(e,1);n({type:fe.SetViewDate,viewDate:d})},c=d=>{n({type:fe.SetDateSelector,dateSelector:r!==we.DateRange?Me.DaySelector:Me.DateRangeSelector,viewDate:kh(e,d)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),p=()=>{n({type:fe.SetDateSelector,dateSelector:Me.YearSelector})};return y.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[y.jsx(Gr,{title:u(),scrollerType:Qt.Month,onTitleClicked:p,onMovePrevious:o,onMoveNext:i,viewDate:e,dispatcher:n}),y.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((d,b)=>d.map((x,l)=>y.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>c(x.monthNumber),children:x.monthName},b.toString()+l.toString())))})]})},Cp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=Ur("screen and (max-device-width: 40rem)"),c=mt(e,1),u=(l,f)=>{!f||!f.setEndDate?o({type:fe.SetSelectedStartDate,selectedStartDate:l}):(o({type:fe.SetSelectedEndDate,selectedEndDate:l}),t&&s&&s([t,l]))},p=()=>{o({type:fe.SetDateSelector,dateSelector:Me.MonthSelector})},d=()=>i?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${c.toLocaleDateString(n.code,{month:"long"})} ${c.toLocaleDateString(n.code,{year:"numeric"})}`,b=()=>{e&&o({type:fe.SetViewDate,viewDate:Mn(e,1)})},x=()=>{e&&o({type:fe.SetViewDate,viewDate:mt(e,1)})};return y.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[y.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:y.jsx(Gr,{title:d(),scrollerType:Qt.Range,onTitleClicked:p,onMovePrevious:b,onMoveNext:x,viewDate:e,dispatcher:o})}),y.jsx("div",{className:"bsc-flex-grow",children:y.jsx(An,{mobileMarkup:y.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:y.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:bt.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:y.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[y.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:y.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:bt.Range,onDateSelected:u,locale:n,dispatcher:o})}),y.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:y.jsx(Qr,{viewDate:c,selectedStartDate:t,selectedEndDate:r,selectionMode:bt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},Op=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=_e.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const c=h.useRef(n===_e.TwelveHour?11:23),u=h.useRef(n===_e.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),p=h.useRef(Oh(0,59,I=>I.toString().padStart(2,"0"))),d=h.useRef(["AM","PM"]),b=h.useRef(cf(e)),x=I=>I>11?I-12:I,[l,f]=h.useState(x(e.getHours())),[m,w]=h.useState(e.getMinutes()),[v,P]=h.useState(e.getHours()<=12?0:1),A=h.useRef(e.toLocaleDateString(r.code));h.useEffect(()=>{const I=e.getHours(),Z=e.getMinutes();if(I!==l&&f(n===_e.TwelveHour?x(I):I),Z!==m&&w(Z),n===_e.TwelveHour){const F=I<=11?0:1;F!==v&&P(F)}},[e]);const D=()=>{var F;const I=((F=s==null?void 0:s.hours)==null?void 0:F.step)||1,Z=l<c.current?l+I:0;f(Z),H(Z,m,v)},E=()=>{var F;const I=((F=s==null?void 0:s.hours)==null?void 0:F.step)||1,Z=l>0?l-I:c.current;f(Z),H(Z,m,v)},q=()=>{var F,Q,j;const I=((F=s==null?void 0:s.minutes)==null?void 0:F.step)||1,Z=m+I<(((Q=s==null?void 0:s.minutes)==null?void 0:Q.max)||59)?m+I:((j=s==null?void 0:s.minutes)==null?void 0:j.min)||0;w(Z),H(l,Z,v)},R=()=>{var F,Q,j;const I=((F=s==null?void 0:s.minutes)==null?void 0:F.step)||1,Z=m-I>=(((Q=s==null?void 0:s.minutes)==null?void 0:Q.min)||0)?m-I:(((j=s==null?void 0:s.minutes)==null?void 0:j.max)||60)-I;w(Z),H(l,Z,v)},B=()=>{const I=v===0?1:0;P(I),H(l,m,I)},H=(I,Z,F)=>{const Q=n===_e.TwelveHour&&F===1?I+12:I;b.current.setHours(Q,Z),i({type:fe.SetSelectedDate,selectedDate:b.current,viewDate:b.current}),o==null||o(b.current)},ne=()=>{i({type:fe.SetDateSelector,dateSelector:Me.DaySelector})},oe=he("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===_e.TwelveHour,"bsc:grid-cols-3":n===_e.TwentyFourHour}),W=he("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":n===_e.TwelveHour,"bsc:col-span-3":n===_e.TwentyFourHour}),$="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return y.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===_e.TwelveHour?"15rem":"11rem"},children:y.jsxs("div",{className:oe,children:[t&&y.jsx("div",{className:W,onClick:ne,children:A.current}),y.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:y.jsx(Je,{className:$,onClick:D,children:y.jsx(qe,{icon:"chevronUp",size:He.Regular})})}),y.jsx("div",{}),y.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:y.jsx(Je,{className:$,onClick:q,children:y.jsx(qe,{icon:"chevronUp",size:He.Regular})})}),n===_e.TwelveHour&&y.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:y.jsx(Je,{className:$,onClick:B,children:y.jsx(qe,{icon:"chevronUp",size:He.Regular})})}),y.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),y.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),y.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:p.current[m]}),n===_e.TwelveHour&&y.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:d.current[v]}),y.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:y.jsx(Je,{className:$,onClick:E,children:y.jsx(qe,{icon:"chevronDown",size:He.Regular})})}),y.jsx("div",{}),y.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:y.jsx(Je,{className:$,onClick:R,children:y.jsx(qe,{icon:"chevronDown",size:He.Regular})})}),n===_e.TwelveHour&&y.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:y.jsx(Je,{className:$,onClick:B,children:y.jsx(qe,{icon:"chevronDown",size:He.Regular})})})]})})},Dp=({viewDate:e,locale:t,dispatcher:r})=>{const n=vp(e,t),s=()=>{const u=Rn(e,10);r({type:fe.SetViewDate,viewDate:u})},o=()=>{const u=Sr(e,10);r({type:fe.SetViewDate,viewDate:u})},i=u=>{const p=parseInt(u);r({type:fe.SetDateSelector,dateSelector:Me.MonthSelector,viewDate:Ch(e,p)})},c=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return y.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[y.jsx(Gr,{title:c(),scrollerType:Qt.Year,onMovePrevious:s,onMoveNext:o,viewDate:e,dispatcher:r}),y.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:y.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,p)=>u.map((d,b)=>d.length>0?y.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>i(d),children:d},p.toString()+b.toString()):y.jsx("div",{},p.toString()+b.toString())))})})]})};class _p{constructor(t,r){T(this,"dateFormat");T(this,"timeFormat");T(this,"use24HourTime");T(this,"monthPart");T(this,"dayPart");T(this,"yearPart");T(this,"twelveHourPart");T(this,"twentyFourHourPart");T(this,"minutePart");T(this,"meridianPart");this.dateSelection=t;const n=2023,s=12,o=20,c=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=c.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,p=18,d=24,b=37,x=317;u.setHours(p,d,b,x);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?p:"6"}`,"HH").replace(`${d}`,"MM").replace(`${b}`,"SS").replace(`${x}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case we.DateOnly:return this.createDateFormat(t);case we.TimeOnly:return this.createTimeFormat(t);case we.DateRange:return this.createDateRangeFormat(t);case we.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...r,n,...r),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(r),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),r=t.indexOf("DD"),n=t.substring(0,r);t=t.replace(n,"").replace("DD","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:nt.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:nt.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:nt.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:nt.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:nt.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:nt.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:nt.Text,possibleValues:["AM","PM"]}}}const Np=(e,t)=>{var o;const[r,n]=h.useState(),s=h.useRef();return h.useEffect(()=>{t&&!r&&(s.current=new _p(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},jp=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:c,className:u,dateSelection:p=we.DateTime,dateFormat:d,timeConstraints:b,icon:x,iconPosition:l=Zr.Right,inputElement:f,selectableDate:m,isValidDate:w,onChange:v,calendarTemplate:P,dateScrollerTemplate:A,inputTemplate:D,wrapperTemplate:E})=>{const[q,R]=h.useState(!1),[B,H]=h.useState(),[ne,oe]=h.useState(),[W,$,I]=Ta(p),Z=h.useRef(),F=h.useRef(!1),Q=h.useRef(c||Vo()),j=h.useRef(),ue=h.useRef(),k=h.useRef(),M=h.useRef(null),_=h.useRef(null),[C,U]=Np(p,B),ee=h.useRef({calendarTemplate:P,dateScrollerTemplate:A});h.useEffect(()=>{Q.current&&K(Q.current)},[Q]),h.useEffect(()=>{c&&K(c)},[c]),h.useEffect(()=>{if(e){const te=G();ae({type:fe.InitializeDates,initialDate:te})}else ae({type:fe.ClearDates})},[e,j.current]),h.useEffect(()=>{U&&ae({type:fe.SetTimeFormat,timeFormat:U?_e.TwentyFourHour:_e.TwelveHour})},[U]),h.useEffect(()=>{f&&(ue.current=f)},[f]),h.useEffect(()=>{ae({type:fe.SetDateSelector,dateSelector:Y()})},[W]);const Y=h.useCallback(()=>I.current===we.TimeOnly?Me.TimeSelector:I.current===we.DateTime||I.current===we.DateOnly?Me.DaySelector:Me.DateRangeSelector,[]),K=te=>{Si(te).then(de=>{H(de.code),j.current=de;const Ee=G();ae(e||n?{type:fe.InitializeDates,initialDate:Array.isArray(Ee)?Ee[0]:Ee}:{type:fe.SetViewDate,viewDate:Array.isArray(Ee)?Ee[0]:Ee})}).catch(de=>console.error(de))},G=()=>{const te=new Date;return te.setHours(0,0,0,0),e?typeof e=="string"?I.current!==we.DateRange?Or(e,j.current):Zn(e,j.current):e:te},re={currentSelector:Y(),currentViewDate:new Date,timeFormat:_e.TwelveHour,dateInitialized:!1},[O,ae]=h.useReducer(Tp,re),L=()=>{Jt(),R(!0)},Ne=h.useMemo(()=>xr(()=>{R(!1)},250),[]),Be=h.useMemo(()=>xr(()=>{Ne.cancel()},5),[Ne]),Re=te=>{const de=te.target.innerText;Ze(de)},Ye=te=>{if(te){const de=I.current!==we.DateRange?Or(te,j.current):Zn(te,j.current);return de?w?Array.isArray(de)?de.every(Ee=>w(Ee)):w(de):!0:!1}else return!0},st=te=>{Ze(te||"")},Ze=te=>{const de=I.current!==we.DateRange?Or(te,j.current):Zn(te,j.current);de?(Array.isArray(de)?(wp(de[0],No(O.currentViewDate),vf(mt(O.currentViewDate,1)))||ae({type:fe.SetViewDate,viewDate:de[0]}),ae({type:fe.SetSelectedDateRange,selectedStartDate:de[0],selectedEndDate:de[1]})):ae({type:fe.SetSelectedDate,selectedDate:de,viewDate:de}),v==null||v(de)):te===""&&(ae({type:fe.ClearDates}),v==null||v())},Ve=te=>{I.current===we.DateOnly&&i===!0&&R(!1),v==null||v(te)},Gt=()=>{Jt(),R(!q),_.current?_.current.focus():M.current&&M.current.focus()},Xt=()=>{ae({type:fe.ClearDates}),R(!1),v==null||v()},Qe=(te,de)=>{(!ue.current||Z.current!==de)&&(ue.current=te,Z.current=de,F.current=!0)},Jt=()=>{(!k.current||F.current)&&ue.current&&(k.current=ue.current,oe(ue.current),F.current=!1)},er=()=>{R(!1),ae({type:fe.SetDateSelector,dateSelector:Y()})},Dt=()=>{switch(d){case Dr.Short:return"short";case Dr.Medium:return"medium";case Dr.Long:return"long";default:return}},ot=()=>{var de,Ee,at,ct,yt,sr,vt,or,xt,wt,ir,ar;const te=Dt();switch(I.current){case we.DateTime:return O.selectedDate?te?O.selectedDate.toLocaleString((de=j.current)==null?void 0:de.code,{dateStyle:te,timeStyle:te}):O.selectedDate.toLocaleString((Ee=j.current)==null?void 0:Ee.code):"";case we.DateOnly:return O.selectedDate?te?O.selectedDate.toLocaleDateString((at=j.current)==null?void 0:at.code,{dateStyle:te}):O.selectedDate.toLocaleDateString((ct=j.current)==null?void 0:ct.code):"";case we.TimeOnly:return O.selectedDate?te?O.selectedDate.toLocaleTimeString((yt=j.current)==null?void 0:yt.code,{timeStyle:te,hour12:O.timeFormat===_e.TwelveHour,hourCycle:O.timeFormat===_e.TwentyFourHour?"h23":void 0}):O.selectedDate.toLocaleTimeString((sr=j.current)==null?void 0:sr.code,{hour12:O.timeFormat===_e.TwelveHour,hourCycle:O.timeFormat===_e.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return O.selectedStartDate&&O.selectedEndDate?te?`${O.selectedStartDate.toLocaleDateString((vt=j.current)==null?void 0:vt.code,{dateStyle:te})} - ${O.selectedEndDate.toLocaleDateString((or=j.current)==null?void 0:or.code,{dateStyle:te})}`:`${O.selectedStartDate.toLocaleDateString((xt=j.current)==null?void 0:xt.code)} - ${O.selectedEndDate.toLocaleDateString((wt=j.current)==null?void 0:wt.code)}`:"";default:return O.selectedDate?te?O.selectedDate.toLocaleString((ir=j.current)==null?void 0:ir.code,{dateStyle:te,timeStyle:te}):O.selectedDate.toLocaleString((ar=j.current)==null?void 0:ar.code):""}},it=W===we.DateTime||W===we.DateOnly||W===we.DateRange,_r=W===we.DateTime||W===we.TimeOnly,Ge=l===Zr.None?{}:l===Zr.Right?{rightElement:y.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!t&&y.jsx("div",{children:y.jsx(qe,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Xt})}),y.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Gt,children:x||y.jsx(qe,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:y.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[y.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Gt,children:x||y.jsx(qe,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})}),o&&!t&&y.jsx("div",{children:y.jsx(qe,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Xt})})]}),leftElementClassName:"bsc:justify-center"},_t={setDateSelector:te=>$(te)},Nr=E||((te,de)=>y.jsx(y.Fragment,{children:de})),tr=()=>y.jsx(kt,{props:_t,template:Nr,children:y.jsxs(y.Fragment,{children:[O.currentSelector===Me.DaySelector&&it&&O.dateInitialized&&j.current&&y.jsx(Ep,{selectedDate:O.selectedDate,viewDate:O.currentViewDate,locale:j.current,showTimeSelector:I.current===we.DateTime,selectableDate:m,isValidDate:w,dispatcher:ae,onChange:Ve}),O.currentSelector===Me.MonthSelector&&it&&O.dateInitialized&&j.current&&y.jsx(kp,{viewDate:O.currentViewDate,locale:j.current,dateSelection:I.current,dispatcher:ae}),O.currentSelector===Me.YearSelector&&it&&O.dateInitialized&&j.current&&y.jsx(Dp,{viewDate:O.currentViewDate,locale:j.current,dispatcher:ae}),O.currentSelector===Me.TimeSelector&&_r&&O.dateInitialized&&j.current&&y.jsx(Op,{viewDate:O.currentViewDate,showDateSelector:I.current===we.DateTime,locale:j.current,timeFormat:O.timeFormat,timeConstraints:b,onChange:v,dispatcher:ae}),O.currentSelector===Me.DateRangeSelector&&it&&O.dateInitialized&&j.current&&y.jsx(Cp,{viewDate:O.currentViewDate,selectedStartDate:O.selectedStartDate,selectedEndDate:O.selectedEndDate,locale:j.current,onChange:v,dispatcher:ae})]})}),rr=Qn({label:r,readOnly:t,allowClear:o,getValue:ot,onFocus:L,onInput:Re,iconPosition:l,iconElement:Ge.rightElement||Ge.leftElement},O.currentViewDate,ae),nr=D||((te,de)=>y.jsx(y.Fragment,{children:de})),Nt=he("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",u);return y.jsx(Kn.Provider,{value:ee.current,children:y.jsxs("div",{className:"bc-date-time",children:[r&&y.jsx(ut,{label:r,readOnly:t,className:"bc-dt-label"}),y.jsx(An,{mobileMarkup:y.jsxs(y.Fragment,{children:[y.jsx(kt,{props:rr,template:nr,children:y.jsx(Wr,{ref:M,value:ot(),readOnly:t,inputMode:"none",className:Nt,onFocus:L,onElementCreate:te=>Qe(te,!1),...Ge})}),y.jsx(di,{visible:q,target:ne,hidden:er,unmountWhenHidden:!0,children:tr()})]}),aboveMobileMarkup:y.jsxs(y.Fragment,{children:[y.jsx(kt,{props:rr,template:nr,children:s===!1?y.jsx(Wr,{ref:M,value:ot(),readOnly:t,className:Nt,onFocus:L,onBlur:Ne,onInput:Re,onElementCreate:te=>Qe(te,!1),...Ge}):y.jsx(vi,{ref:_,value:ot(),readOnly:t,className:Nt,format:C,isInputValid:Ye,onFocus:L,onBlur:Ne,onChange:st,onElementCreate:te=>Qe(te,!0),...Ge})}),y.jsx(mi,{visible:q,target:ne,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:er,isClickedWithin:Be,unmountWhenHidden:!0,children:tr()})]})})]})})};var Gn,Ti;function Ip(){if(Ti)return Gn;Ti=1;function e(l,f){var m,w;if(typeof f=="function")w=f(l),w!==void 0&&(l=w);else if(Array.isArray(f))for(m=0;m<f.length;m++)w=f[m](l),w!==void 0&&(l=w);return l}function t(l,f){return l[0]==="-"&&Array.isArray(f)&&/^-\d+$/.test(l)?f.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],c=function(l){return i.indexOf(l)===-1};function u(l,f){l.indexOf("[")>=0&&(l=l.replace(/\[/g,f).replace(/]/g,""));var m=l.split(f),w=m.filter(c);if(w.length!==m.length)throw Error("Refusing to update blacklisted property "+l);return m}var p=Object.prototype.hasOwnProperty;function d(l,f,m,w){if(!(this instanceof d))return new d(l,f,m,w);typeof f>"u"&&(f=!1),typeof m>"u"&&(m=!0),typeof w>"u"&&(w=!0),this.separator=l||".",this.override=f,this.useArray=m,this.useBrackets=w,this.keepArray=!1,this.cleanup=[]}var b=new d(".",!1,!0,!0);function x(l){return function(){return b[l].apply(b,arguments)}}return d.prototype._fill=function(l,f,m,w){var v=l.shift();if(l.length>0){if(f[v]=f[v]||(this.useArray&&r(l[0])?[]:{}),!s(f[v]))if(this.override)f[v]={};else{if(!(s(m)&&o(m)))throw new Error("Trying to redefine `"+v+"` which is a "+typeof f[v]);return}this._fill(l,f[v],m,w)}else{if(!this.override&&s(f[v])&&!o(f[v])){if(!(s(m)&&o(m)))throw new Error("Trying to redefine non-empty obj['"+v+"']");return}f[v]=e(m,w)}},d.prototype.object=function(l,f){var m=this;return Object.keys(l).forEach(function(w){var v=f===void 0?null:f[w],P=u(w,m.separator).join(m.separator);P.indexOf(m.separator)!==-1?(m._fill(P.split(m.separator),l,l[w],v),delete l[w]):l[w]=e(l[w],v)}),l},d.prototype.str=function(l,f,m,w){var v=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(v.split(this.separator),m,f,w):m[l]=e(f,w),m},d.prototype.pick=function(l,f,m,w){var v,P,A,D,E;for(P=u(l,this.separator),v=0;v<P.length;v++)if(D=t(P[v],f),f&&typeof f=="object"&&D in f){if(v===P.length-1)return m?(A=f[D],w&&Array.isArray(f)?f.splice(D,1):delete f[D],Array.isArray(f)&&(E=P.slice(0,-1).join("."),this.cleanup.indexOf(E)===-1&&this.cleanup.push(E)),A):f[D];f=f[D]}else return;return m&&Array.isArray(f)&&(f=f.filter(function(q){return q!==void 0})),f},d.prototype.delete=function(l,f){return this.remove(l,f,!0)},d.prototype.remove=function(l,f,m){var w;if(this.cleanup=[],Array.isArray(l)){for(w=0;w<l.length;w++)this.pick(l[w],f,!0,m);return m||this._cleanup(f),f}else return this.pick(l,f,!0,m)},d.prototype._cleanup=function(l){var f,m,w,v;if(this.cleanup.length){for(m=0;m<this.cleanup.length;m++)w=this.cleanup[m].split("."),v=w.splice(0,-1).join("."),f=v?this.pick(v,l):l,f=f[w[0]].filter(function(P){return P!==void 0}),this.set(this.cleanup[m],f,l);this.cleanup=[]}},d.prototype.del=d.prototype.remove,d.prototype.move=function(l,f,m,w,v){return typeof w=="function"||Array.isArray(w)?this.set(f,e(this.pick(l,m,!0),w),m,v):(v=w,this.set(f,this.pick(l,m,!0),m,v)),m},d.prototype.transfer=function(l,f,m,w,v,P){return typeof v=="function"||Array.isArray(v)?this.set(f,e(this.pick(l,m,!0),v),w,P):(P=v,this.set(f,this.pick(l,m,!0),w,P)),w},d.prototype.copy=function(l,f,m,w,v,P){return typeof v=="function"||Array.isArray(v)?this.set(f,e(JSON.parse(JSON.stringify(this.pick(l,m,!1))),v),w,P):(P=v,this.set(f,this.pick(l,m,!1),w,P)),w},d.prototype.set=function(l,f,m,w){var v,P,A,D;if(typeof f>"u")return m;for(A=u(l,this.separator),v=0;v<A.length;v++){if(D=A[v],v===A.length-1)if(w&&n(f)&&n(m[D]))for(P in f)p.call(f,P)&&(m[D][P]=f[P]);else if(w&&Array.isArray(m[D])&&Array.isArray(f))for(var E=0;E<f.length;E++)m[A[v]].push(f[E]);else m[D]=f;else(!p.call(m,D)||!n(m[D])&&!Array.isArray(m[D]))&&(/^\d+$/.test(A[v+1])?m[D]=[]:m[D]={});m=m[D]}return m},d.prototype.transform=function(l,f,m){return f=f||{},m=m||{},Object.keys(l).forEach((function(w){this.set(l[w],this.pick(w,f),m)}).bind(this)),m},d.prototype.dot=function(l,f,m){f=f||{},m=m||[];var w=Array.isArray(l);return Object.keys(l).forEach((function(v){var P=w&&this.useBrackets?"["+v+"]":v;if(s(l[v])&&(n(l[v])&&!o(l[v])||Array.isArray(l[v])&&!this.keepArray&&l[v].length!==0))if(w&&this.useBrackets){var A=m[m.length-1]||"";return this.dot(l[v],f,m.slice(0,-1).concat(A+P))}else return this.dot(l[v],f,m.concat(P));else w&&this.useBrackets?f[m.join(this.separator).concat("["+v+"]")]=l[v]:f[m.concat(P).join(this.separator)]=l[v]}).bind(this)),f},d.pick=x("pick"),d.move=x("move"),d.transfer=x("transfer"),d.transform=x("transform"),d.copy=x("copy"),d.object=x("object"),d.str=x("str"),d.set=x("set"),d.delete=x("delete"),d.del=d.remove=x("remove"),d.dot=x("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(d,l,{get:function(){return b.override},set:function(f){b.override=!!f}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(d,l,{get:function(){return b[l]},set:function(f){b[l]=f}})}),d._process=e,Gn=d,Gn}var Mp=Ip();const Pi=en(Mp),Rp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=Ae.Horizontal,isMultiSelect:u=!1,className:p,onChange:d,itemTemplate:b})=>{const[x,l]=h.useState(),[f,m]=h.useState([]),w=gn(()=>n,[n]),v=h.useId();h.useEffect(()=>{if(u){const W=Array.isArray(r)?r.map($=>$.toString()):r?[String(r)]:void 0;m(W??[])}else r&&l(r.toString())},[r]);const P=W=>u?f.findIndex($=>$===W)>-1:x===W,A=W=>{const $=W.toString();if(u){const I=P($);let Z;I?Z=f.filter(F=>F!=$):Z=[...f,$],m(Z),d==null||d({name:e,value:Z})}else $!==x&&(l($),d==null||d({name:e,value:$}))},D=W=>{Array.isArray(W==null?void 0:W.value)?m((W==null?void 0:W.value)??[]):l(W==null?void 0:W.value),d==null||d(W)},E=fr(It.FocusWithin),q=h.useCallback((W,$)=>y.jsx(y.Fragment,{children:$}),[]),R=b||q,B=(W,$,I)=>{const Z=`element_${v}_${$}`,F=Pi.pick(s,W),Q=String(Pi.pick(o,W)),j=$===0,ue=$===I.length-1,k=he("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-data-checked:bg-primary-1 bsc:dark:has-data-checked:bg-mono-light-1 bsc:has-data-checked:text-white bsc:dark:has-data-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!i,"bc-read-only bsc:has-data-checked:bg-primary-4 bsc:dark:has-data-checked:bg-mono-light-3 bsc:has-data-checked:text-gray-5 bsc:dark:has-data-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":i,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":j&&c===Ae.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":ue&&c===Ae.Horizontal,"bsc:border-t bsc:border-b":!j&&!ue&&c===Ae.Horizontal,"bsc:border-l":!j&&c===Ae.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":j&&c===Ae.Vertical,"bsc:border bsc:rounded-b-md":ue&&c===Ae.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!j&&!ue&&c===Ae.Vertical},E),M={itemId:Z,selectedValue:u?f:x,itemText:F,itemValue:Q,itemData:W,itemStyles:k,isSelected:P(Q),isFirstItem:j,isLastItem:ue,onItemChanged:A};return u?y.jsx(kt,{props:M,template:R,children:y.jsx(Ft,{className:k,children:y.jsx(Ns,{value:Q,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:F})})},Z):y.jsx(kt,{props:M,template:R,children:y.jsx(Ft,{className:k,children:y.jsx(As,{value:Q,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:F})})},Z)},H=he("bsc:flex bsc:flex-col bsc:gap-2",p),ne=he("bsc:flex",{"bsc:flex-col bsc:w-max":c===Ae.Vertical}),oe=W=>u?y.jsx(ca,{name:e,value:f,readOnly:i,onChange:D,className:ne,children:W.map(B)}):y.jsx(Ls,{name:e,value:x,readOnly:i,onChange:D,className:ne,children:W.map(B)});return y.jsxs(Ft,{className:H,children:[t&&y.jsx(ut,{label:t,readOnly:i}),w&&oe(w)]})},Lp=h.memo(Rp),Ap=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:c=ze.Right,orientation:u=Ae.Vertical,className:p,useAnimation:d,onChange:b})=>{const x=gn(()=>n,[n]),l=h.useId(),f=hn(d),m=fr(It.FocusWithin),w=he("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",p),v=he("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===Ae.Vertical,"bsc:*:pr-2":u===Ae.Horizontal}),P=he("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),A=he("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":c===ze.Left,"bsc:mr-2":c===ze.Right,"bc-read-only":i},m),D=he("bc-radio-item-svg bsc:stroke-2 bsc:fill-none bsc:rounded-full bsc:stroke-gray-1 bsc:dark:stroke-mono-light-2 bsc:group-data-read-only:stroke-gray-4 bsc:dark:group-data-read-only:stroke-mono-light-3"),E=he("bsc:group-data-checked:fill-primary-1 bsc:dark:group-data-checked:fill-mono-light-2 bsc:group-data-checked:group-data-read-only:fill-primary-4 bsc:dark:group-data-checked:group-data-read-only:fill-mono-light-3",{"bsc:group-data-checked:animate-bounce":!i&&f}),q=he("bsc:invisible bsc:group-data-checked:visible bsc:group-data-checked:fill-white bsc:dark:group-data-checked:fill-mono-dark-1",{"bsc:group-data-checked:animate-bounce":!i&&f}),R=(B,H)=>{const ne=B[s],oe=B[o];return y.jsxs(Ft,{className:P,children:[c===ze.Left&&y.jsx(ut,{label:ne,readOnly:i}),y.jsx(As,{value:oe,className:A,children:y.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:D,children:[y.jsx("circle",{cx:15,cy:15,r:15,className:E}),y.jsx("circle",{cx:"50%",cy:"50%",r:7,className:q})]})}),c===ze.Right&&y.jsx(ut,{label:ne,readOnly:i})]},`radio_${l}_item${H}`)};return y.jsxs("div",{className:w,children:[t&&y.jsx(ut,{label:t,readOnly:i}),y.jsx(Ls,{name:e,value:r,readOnly:i,onChange:b,className:v,children:x&&x.map(R)})]})},Fp=h.memo(Ap),$p=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:c})=>{const u=hn(o),p=he("bc-toggle-wrapper bsc:flex bsc:flex-col",i),d=fr(It.FocusWithin),b=he("bc-toggle-container bsc:group bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!s,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":s},d),x=he("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:group-data-toggled:translate-x-[35px] bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!s,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":s,"bsc:[transition:0.3s]":!s&&u});return y.jsxs(Ft,{className:p,children:[t&&y.jsx(ut,{label:t,readOnly:s}),y.jsx(ga,{name:e,value:r,toggled:n,onChange:c,className:b,children:y.jsx("div",{className:x})})]})},Hp=h.memo($p);se.BeeSoftProvider=Di,se.Button=Je,se.Checkbox=Fs,se.CheckboxGroup=Ea,se.ContentEditableInput=Wr,se.DateFormatType=Dr,se.DateScrollerType=Qt,se.DateSelectionType=we,se.DateTime=jp,se.FormGroupItemOrientation=Ae,se.FormattedInput=vi,se.GroupButton=Lp,se.MediaQuery=An,se.MobileOverlayPanel=di,se.OverlayPanel=mi,se.RadioButton=Fp,se.SelectionLabelLocation=ze,se.Toggle=Hp,se.applyBeeSoftTheme=Ih,se.createBeeSoftTheme=Mh,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});