beesoft-components 0.10.2 → 0.10.4

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(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={};/**
1
+ (function(se,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("@beesoft/locale"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@beesoft/locale","react-dom"],h):(se=typeof globalThis<"u"?globalThis:se||self,h(se.BeeSoftComponents={},se.React,se["beesoft-locale"],se.ReactDOM))})(this,function(se,h,jt,cr){"use strict";var Yp=Object.defineProperty;var Hp=(se,h,jt)=>h in se?Yp(se,h,{enumerable:!0,configurable:!0,writable:!0,value:jt}):se[h]=jt;var P=(se,h,jt)=>Hp(se,typeof h!="symbol"?h+"":h,jt);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 ur=Ei(h);function tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rr={exports:{}},lr={};/**
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 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={};/**
9
+ */var os;function ki(){if(os)return lr;os=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,m){var d,b={},x=null,l=null;m!==void 0&&(x=""+m),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 lr.Fragment=r,lr.jsx=i,lr.jsxs=i,lr}var fr={};/**
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 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`
17
+ */var is;function Ci(){return is||(is=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"),m=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,p="@@iterator";function w(a){if(a===null||typeof a!="object")return null;var g=f&&a[f]||a[p];return typeof g=="function"?g:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(a){{for(var g=arguments.length,S=new Array(g>1?g-1:0),_=1;_<g;_++)S[_-1]=arguments[_];L("error",a,S)}}function L(a,g,S){{var _=v.ReactDebugCurrentFrame,X=_.getStackAddendum();X!==""&&(g+="%s",S=S.concat([X]));var te=S.map(function(Z){return String(Z)});te.unshift("Warning: "+g),Function.prototype.apply.call(console[a],console,te)}}var M=!1,E=!1,Q=!1,I=!1,B=!1,$;$=Symbol.for("react.module.reference");function ne(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||B||a===s||a===m||a===d||I||a===l||M||E||Q||typeof a=="object"&&a!==null&&(a.$$typeof===x||a.$$typeof===b||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===$||a.getModuleId!==void 0))}function oe(a,g,S){var _=a.displayName;if(_)return _;var X=g.displayName||g.name||"";return X!==""?S+"("+X+")":S}function H(a){return a.displayName||"Context"}function A(a){if(a==null)return null;if(typeof a.tag=="number"&&T("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 m:return"Suspense";case d:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var g=a;return H(g)+".Consumer";case i:var S=a;return H(S._context)+".Provider";case u:return oe(a,a.render,"ForwardRef");case b:var _=a.displayName||null;return _!==null?_:A(a.type)||"Memo";case x:{var X=a,te=X._payload,Z=X._init;try{return A(Z(te))}catch{return null}}}return null}var N=Object.assign,F=0,q,U,Y,ce,k,j,D;function C(){}C.__reactDisabledLog=!0;function z(){{if(F===0){q=console.log,U=console.info,Y=console.warn,ce=console.error,k=console.group,j=console.groupCollapsed,D=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})}F++}}function ee(){{if(F--,F===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},a,{value:q}),info:N({},a,{value:U}),warn:N({},a,{value:Y}),error:N({},a,{value:ce}),group:N({},a,{value:k}),groupCollapsed:N({},a,{value:j}),groupEnd:N({},a,{value:D})})}F<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var W=v.ReactCurrentDispatcher,K;function G(a,g,S){{if(K===void 0)try{throw Error()}catch(X){var _=X.stack.trim().match(/\n( *(at )?)/);K=_&&_[1]||""}return`
18
+ `+K+a}}var re=!1,O;{var ae=typeof WeakMap=="function"?WeakMap:Map;O=new ae}function R(a,g){if(!a||re)return"";{var S=O.get(a);if(S!==void 0)return S}var _;re=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var te;te=W.current,W.current=null,z();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){_=xe}Reflect.construct(a,[],Z)}else{try{Z.call()}catch(xe){_=xe}a.call(Z.prototype)}}else{try{throw Error()}catch(xe){_=xe}a()}}catch(xe){if(xe&&_&&typeof xe.stack=="string"){for(var V=xe.stack.split(`
19
+ `),ge=_.stack.split(`
20
+ `),ie=V.length-1,ue=ge.length-1;ie>=1&&ue>=0&&V[ie]!==ge[ue];)ue--;for(;ie>=1&&ue>=0;ie--,ue--)if(V[ie]!==ge[ue]){if(ie!==1||ue!==1)do if(ie--,ue--,ue<0||V[ie]!==ge[ue]){var Ee=`
21
+ `+V[ie].replace(" at new "," at ");return a.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",a.displayName)),typeof a=="function"&&O.set(a,Ee),Ee}while(ie>=1&&ue>=0);break}}}finally{re=!1,W.current=te,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 _e(a,g,S){return R(a,!1)}function Be(a){var g=a.prototype;return!!(g&&g.isReactComponent)}function Me(a,g,S){if(a==null)return"";if(typeof a=="function")return R(a,Be(a));if(typeof a=="string")return G(a);switch(a){case m:return G("Suspense");case d:return G("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return _e(a.render);case b:return Me(a.type,g,S);case x:{var _=a,X=_._payload,te=_._init;try{return Me(te(X),g,S)}catch{}}}return""}var He=Object.prototype.hasOwnProperty,nt={},Ze=v.ReactDebugCurrentFrame;function Ve(a){if(a){var g=a._owner,S=Me(a.type,a._source,g?g.type:null);Ze.setExtraStackFrame(S)}else Ze.setExtraStackFrame(null)}function Gt(a,g,S,_,X){{var te=Function.call.bind(He);for(var Z in a)if(te(a,Z)){var V=void 0;try{if(typeof a[Z]!="function"){var ge=Error((_||"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,_,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ie){V=ie}V&&!(V instanceof Error)&&(Ve(X),T("%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).",_||"React class",S,Z,typeof V),Ve(null)),V instanceof Error&&!(V.message in nt)&&(nt[V.message]=!0,Ve(X),T("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 Ot(a),!1}catch{return!0}}function Ot(a){return""+a}function st(a){if(er(a))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jt(a)),Ot(a)}var ot=v.ReactCurrentOwner,Nr={key:!0,ref:!0,__self:!0,__source:!0},Ge,Dt;function Jr(a){if(He.call(a,"ref")){var g=Object.getOwnPropertyDescriptor(a,"ref").get;if(g&&g.isReactWarning)return!1}return a.ref!==void 0}function jr(a){if(He.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"&&ot.current}function rr(a,g){{var S=function(){Ge||(Ge=!0,T("%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 en(a,g){{var S=function(){Dt||(Dt=!0,T("%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,_,X,te,Z){var V={$$typeof:t,type:a,key:g,ref:S,props:Z,_owner:te};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:_}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function _t(a,g,S,_,X){{var te,Z={},V=null,ge=null;S!==void 0&&(st(S),V=""+S),jr(g)&&(st(g.key),V=""+g.key),Jr(g)&&(ge=g.ref,tr(g,X));for(te in g)He.call(g,te)&&!Nr.hasOwnProperty(te)&&(Z[te]=g[te]);if(a&&a.defaultProps){var ie=a.defaultProps;for(te in ie)Z[te]===void 0&&(Z[te]=ie[te])}if(V||ge){var ue=typeof a=="function"?a.displayName||a.name||"Unknown":a;V&&rr(Z,ue),ge&&en(Z,ue)}return nr(a,V,ge,X,_,ot.current,Z)}}var J=v.ReactCurrentOwner,he=v.ReactDebugCurrentFrame;function Re(a){if(a){var g=a._owner,S=Me(a.type,a._source,g?g.type:null);he.setExtraStackFrame(S)}else he.setExtraStackFrame(null)}var it;it=!1;function at(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function bt(){{if(J.current){var a=A(J.current.type);if(a)return`
22
22
 
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=`
23
+ Check the render method of \``+a+"`."}return""}}function sr(a){return""}var yt={};function or(a){{var g=bt();if(!g){var S=typeof a=="string"?a:a.displayName||a.name;S&&(g=`
24
24
 
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:
25
+ Check the top-level render call using <`+S+">.")}return g}}function vt(a,g){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var S=or(g);if(yt[S])return;yt[S]=!0;var _="";a&&a._owner&&a._owner!==J.current&&(_=" It was passed a child from "+A(a._owner.type)+"."),Re(a),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,_),Re(null)}}function xt(a,g){{if(typeof a!="object")return;if(Qe(a))for(var S=0;S<a.length;S++){var _=a[S];at(_)&&vt(_,g)}else if(at(a))a._store&&(a._store.validated=!0);else if(a){var X=w(a);if(typeof X=="function"&&X!==a.entries)for(var te=X.call(a),Z;!(Z=te.next()).done;)at(Z.value)&&vt(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 _=A(g);Gt(S,a.props,"prop",_,a)}else if(g.PropTypes!==void 0&&!it){it=!0;var X=A(g);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&T("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 _=g[S];if(_!=="children"&&_!=="key"){Re(a),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_),Re(null);break}}a.ref!==null&&(Re(a),T("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var Ir={};function Mr(a,g,S,_,X,te){{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+=bt();var ie;a===null?ie="null":Qe(a)?ie="array":a!==void 0&&a.$$typeof===t?(ie="<"+(A(a.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof a,T("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 ue=_t(a,g,S,X,te);if(ue==null)return ue;if(Z){var Ee=g.children;if(Ee!==void 0)if(_)if(Qe(Ee)){for(var Ue=0;Ue<Ee.length;Ue++)xt(Ee[Ue],a);Object.freeze&&Object.freeze(Ee)}else T("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 xt(Ee,a)}if(He.call(g,"key")){var We=A(a),xe=Object.keys(g).filter(function(ss){return ss!=="key"}),Nt=xe.length>0?"{key: someKey, "+xe.join(": ..., ")+": ...}":"{key: someKey}";if(!Ir[We+Nt]){var ns=xe.length>0?"{"+xe.join(": ..., ")+": ...}":"{}";T(`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} />`,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:{}};/*!
30
+ <%s key={someKey} {...props} />`,Nt,We,ns,We),Ir[We+Nt]=!0}}return a===n?ar(ue):ir(ue),ue}}function Jn(a,g,S){return Mr(a,g,S,!0)}function es(a,g,S){return Mr(a,g,S,!1)}var ts=es,rs=Jn;fr.Fragment=n,fr.jsx=ts,fr.jsxs=rs}()),fr}var as;function Oi(){return as||(as=1,process.env.NODE_ENV==="production"?Rr.exports=ki():Rr.exports=Ci()),Rr.exports}var y=Oi();const cs=h.createContext(void 0),us=()=>h.useContext(cs),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(cs.Provider,{value:c,children:i})};var Ae=(e=>(e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal",e))(Ae||{}),qe=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e))(qe||{}),rn={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 _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={};/**
34
+ */var ls;function _i(){return ls||(ls=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})()}(rn)),rn.exports}var Ni=_i();const de=tn(Ni);var It=(e=>(e[e.Focus=0]="Focus",e[e.FocusWithin=1]="FocusWithin",e))(It||{});const dr=(e=1)=>h.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]),ji=(e,t)=>{const r=h.useRef(null),{buttonType:n,buttonStyle:s="curved",type:o="button",disabled:i=!1,form:c,fullWidth:u=!1,onClick:m,className:d,children:b}=e,x=()=>{var p;(p=r.current)==null||p.click()};h.useImperativeHandle(t,()=>({click:x}));const l=dr(It.Focus),f=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",l,{"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:m,disabled:i,form:c,className:f,children:b})},Xe=h.forwardRef(ji);var nn={exports:{}},hr={};/**
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 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={};/**
42
+ */var fs;function Ii(){if(fs)return hr;fs=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,m){var d,b={},x=null,l=null;m!==void 0&&(x=""+m),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 hr.Fragment=r,hr.jsx=i,hr.jsxs=i,hr}var Lr={};/**
43
43
  * @license React
44
44
  * react-jsx-runtime.development.js
45
45
  *
@@ -47,20 +47,20 @@ 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 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`
50
+ */var ds;function Mi(){return ds||(ds=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"),m=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,p="@@iterator";function w(a){if(a===null||typeof a!="object")return null;var g=f&&a[f]||a[p];return typeof g=="function"?g:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(a){{for(var g=arguments.length,S=new Array(g>1?g-1:0),_=1;_<g;_++)S[_-1]=arguments[_];L("error",a,S)}}function L(a,g,S){{var _=v.ReactDebugCurrentFrame,X=_.getStackAddendum();X!==""&&(g+="%s",S=S.concat([X]));var te=S.map(function(Z){return String(Z)});te.unshift("Warning: "+g),Function.prototype.apply.call(console[a],console,te)}}var M=!1,E=!1,Q=!1,I=!1,B=!1,$;$=Symbol.for("react.module.reference");function ne(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||B||a===s||a===m||a===d||I||a===l||M||E||Q||typeof a=="object"&&a!==null&&(a.$$typeof===x||a.$$typeof===b||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===$||a.getModuleId!==void 0))}function oe(a,g,S){var _=a.displayName;if(_)return _;var X=g.displayName||g.name||"";return X!==""?S+"("+X+")":S}function H(a){return a.displayName||"Context"}function A(a){if(a==null)return null;if(typeof a.tag=="number"&&T("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 m:return"Suspense";case d:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var g=a;return H(g)+".Consumer";case i:var S=a;return H(S._context)+".Provider";case u:return oe(a,a.render,"ForwardRef");case b:var _=a.displayName||null;return _!==null?_:A(a.type)||"Memo";case x:{var X=a,te=X._payload,Z=X._init;try{return A(Z(te))}catch{return null}}}return null}var N=Object.assign,F=0,q,U,Y,ce,k,j,D;function C(){}C.__reactDisabledLog=!0;function z(){{if(F===0){q=console.log,U=console.info,Y=console.warn,ce=console.error,k=console.group,j=console.groupCollapsed,D=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})}F++}}function ee(){{if(F--,F===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},a,{value:q}),info:N({},a,{value:U}),warn:N({},a,{value:Y}),error:N({},a,{value:ce}),group:N({},a,{value:k}),groupCollapsed:N({},a,{value:j}),groupEnd:N({},a,{value:D})})}F<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var W=v.ReactCurrentDispatcher,K;function G(a,g,S){{if(K===void 0)try{throw Error()}catch(X){var _=X.stack.trim().match(/\n( *(at )?)/);K=_&&_[1]||""}return`
51
+ `+K+a}}var re=!1,O;{var ae=typeof WeakMap=="function"?WeakMap:Map;O=new ae}function R(a,g){if(!a||re)return"";{var S=O.get(a);if(S!==void 0)return S}var _;re=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var te;te=W.current,W.current=null,z();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){_=xe}Reflect.construct(a,[],Z)}else{try{Z.call()}catch(xe){_=xe}a.call(Z.prototype)}}else{try{throw Error()}catch(xe){_=xe}a()}}catch(xe){if(xe&&_&&typeof xe.stack=="string"){for(var V=xe.stack.split(`
52
+ `),ge=_.stack.split(`
53
+ `),ie=V.length-1,ue=ge.length-1;ie>=1&&ue>=0&&V[ie]!==ge[ue];)ue--;for(;ie>=1&&ue>=0;ie--,ue--)if(V[ie]!==ge[ue]){if(ie!==1||ue!==1)do if(ie--,ue--,ue<0||V[ie]!==ge[ue]){var Ee=`
54
+ `+V[ie].replace(" at new "," at ");return a.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",a.displayName)),typeof a=="function"&&O.set(a,Ee),Ee}while(ie>=1&&ue>=0);break}}}finally{re=!1,W.current=te,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 _e(a,g,S){return R(a,!1)}function Be(a){var g=a.prototype;return!!(g&&g.isReactComponent)}function Me(a,g,S){if(a==null)return"";if(typeof a=="function")return R(a,Be(a));if(typeof a=="string")return G(a);switch(a){case m:return G("Suspense");case d:return G("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return _e(a.render);case b:return Me(a.type,g,S);case x:{var _=a,X=_._payload,te=_._init;try{return Me(te(X),g,S)}catch{}}}return""}var He=Object.prototype.hasOwnProperty,nt={},Ze=v.ReactDebugCurrentFrame;function Ve(a){if(a){var g=a._owner,S=Me(a.type,a._source,g?g.type:null);Ze.setExtraStackFrame(S)}else Ze.setExtraStackFrame(null)}function Gt(a,g,S,_,X){{var te=Function.call.bind(He);for(var Z in a)if(te(a,Z)){var V=void 0;try{if(typeof a[Z]!="function"){var ge=Error((_||"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,_,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ie){V=ie}V&&!(V instanceof Error)&&(Ve(X),T("%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).",_||"React class",S,Z,typeof V),Ve(null)),V instanceof Error&&!(V.message in nt)&&(nt[V.message]=!0,Ve(X),T("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 Ot(a),!1}catch{return!0}}function Ot(a){return""+a}function st(a){if(er(a))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jt(a)),Ot(a)}var ot=v.ReactCurrentOwner,Nr={key:!0,ref:!0,__self:!0,__source:!0},Ge,Dt;function Jr(a){if(He.call(a,"ref")){var g=Object.getOwnPropertyDescriptor(a,"ref").get;if(g&&g.isReactWarning)return!1}return a.ref!==void 0}function jr(a){if(He.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"&&ot.current}function rr(a,g){{var S=function(){Ge||(Ge=!0,T("%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 en(a,g){{var S=function(){Dt||(Dt=!0,T("%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,_,X,te,Z){var V={$$typeof:t,type:a,key:g,ref:S,props:Z,_owner:te};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:_}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function _t(a,g,S,_,X){{var te,Z={},V=null,ge=null;S!==void 0&&(st(S),V=""+S),jr(g)&&(st(g.key),V=""+g.key),Jr(g)&&(ge=g.ref,tr(g));for(te in g)He.call(g,te)&&!Nr.hasOwnProperty(te)&&(Z[te]=g[te]);if(a&&a.defaultProps){var ie=a.defaultProps;for(te in ie)Z[te]===void 0&&(Z[te]=ie[te])}if(V||ge){var ue=typeof a=="function"?a.displayName||a.name||"Unknown":a;V&&rr(Z,ue),ge&&en(Z,ue)}return nr(a,V,ge,X,_,ot.current,Z)}}var J=v.ReactCurrentOwner,he=v.ReactDebugCurrentFrame;function Re(a){if(a){var g=a._owner,S=Me(a.type,a._source,g?g.type:null);he.setExtraStackFrame(S)}else he.setExtraStackFrame(null)}var it;it=!1;function at(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function bt(){{if(J.current){var a=A(J.current.type);if(a)return`
55
55
 
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=`
56
+ Check the render method of \``+a+"`."}return""}}function sr(a){return""}var yt={};function or(a){{var g=bt();if(!g){var S=typeof a=="string"?a:a.displayName||a.name;S&&(g=`
57
57
 
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:
58
+ Check the top-level render call using <`+S+">.")}return g}}function vt(a,g){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var S=or(g);if(yt[S])return;yt[S]=!0;var _="";a&&a._owner&&a._owner!==J.current&&(_=" It was passed a child from "+A(a._owner.type)+"."),Re(a),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,_),Re(null)}}function xt(a,g){{if(typeof a!="object")return;if(Qe(a))for(var S=0;S<a.length;S++){var _=a[S];at(_)&&vt(_,g)}else if(at(a))a._store&&(a._store.validated=!0);else if(a){var X=w(a);if(typeof X=="function"&&X!==a.entries)for(var te=X.call(a),Z;!(Z=te.next()).done;)at(Z.value)&&vt(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 _=A(g);Gt(S,a.props,"prop",_,a)}else if(g.PropTypes!==void 0&&!it){it=!0;var X=A(g);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&T("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 _=g[S];if(_!=="children"&&_!=="key"){Re(a),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_),Re(null);break}}a.ref!==null&&(Re(a),T("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var Ir={};function Mr(a,g,S,_,X,te){{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+=bt();var ie;a===null?ie="null":Qe(a)?ie="array":a!==void 0&&a.$$typeof===t?(ie="<"+(A(a.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof a,T("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 ue=_t(a,g,S,X,te);if(ue==null)return ue;if(Z){var Ee=g.children;if(Ee!==void 0)if(_)if(Qe(Ee)){for(var Ue=0;Ue<Ee.length;Ue++)xt(Ee[Ue],a);Object.freeze&&Object.freeze(Ee)}else T("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 xt(Ee,a)}if(He.call(g,"key")){var We=A(a),xe=Object.keys(g).filter(function(ss){return ss!=="key"}),Nt=xe.length>0?"{key: someKey, "+xe.join(": ..., ")+": ...}":"{key: someKey}";if(!Ir[We+Nt]){var ns=xe.length>0?"{"+xe.join(": ..., ")+": ...}":"{}";T(`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} />`,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={};/**
63
+ <%s key={someKey} {...props} />`,Nt,We,ns,We),Ir[We+Nt]=!0}}return a===n?ar(ue):ir(ue),ue}}function Jn(a,g,S){return Mr(a,g,S,!0)}function es(a,g,S){return Mr(a,g,S,!1)}var ts=es,rs=Jn;Lr.Fragment=n,Lr.jsx=ts,Lr.jsxs=rs}()),Lr}var hs;function Ri(){return hs||(hs=1,process.env.NODE_ENV==="production"?nn.exports=Ii():nn.exports=Mi()),nn.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")},pr=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},ps=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},Yi=e=>typeof e=="function",Hi=e=>{const[t,r]=h.useState({value:e,initial:!0}),n=h.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})}}]},Wi=e=>{const[t,r]=Hi(e),n=h.useRef({value:e,initial:!0});return n.current!==t&&(n.current=t),[t,r,n]},ms=h.createContext(void 0),Ar=()=>h.useContext(ms),sn=({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 mr=({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 on(){if(Mt>1)Mt--;else{for(var e,t=!1;gr!==void 0;){var r=gr;for(gr=void 0,an++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ys(r))try{r.c()}catch(s){t||(e=s,t=!0)}r=n}}if(an=0,Mt--,t)throw e}}var be=void 0;function gs(e){var t=be;be=void 0;try{return e()}finally{be=t}}var gr=void 0,Mt=0,an=0,Fr=0;function bs(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:gs(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&&gs(function(){var s;(s=t.Z)==null||s.call(t)}))}},$e.prototype.subscribe=function(e){var t=this;return un(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=bs(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(an>100)throw new Error("Cycle detected");this.v=e,this.i++,Fr++,Mt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{on()}}}});function Ui(e,t){return new $e(e,t)}function ys(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 vs(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 xs(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=Fr-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===Fr))return!0;if(this.g=Fr,this.f|=1,this.i>0&&!ys(this))return this.f&=-2,!0;var e=be;try{vs(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,xs(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=bs(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ws(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,cn(e),n}finally{be=r,on()}}}function cn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ws(e)}function qi(e){if(be!==this)throw new Error("Out-of-order effect");xs(this),be=e,this.f&=-2,8&this.f&&cn(this),on()}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,ws(this),vs(this),Mt++;var e=be;return be=this,qi.bind(this,e)},Lt.prototype.N=function(){2&this.f||(this.f|=2,this.o=gr,gr=this)},Lt.prototype.d=function(){this.f|=8,1&this.f||cn(this)},Lt.prototype.dispose=function(){this.d()};function un(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 ln={exports:{}},fn={};/**
64
64
  * @license React
65
65
  * use-sync-external-store-shim.production.js
66
66
  *
@@ -68,7 +68,7 @@ React keys must be passed directly to JSX without using spread:
68
68
  *
69
69
  * This source code is licensed under the MIT license found in the
70
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={};/**
71
+ */var Ss;function zi(){if(Ss)return fn;Ss=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}}),p=f[0].inst,w=f[1];return o(function(){p.value=l,p.getSnapshot=x,u(p)&&w({inst:p})},[b,l,x]),s(function(){return u(p)&&w({inst:p}),b(function(){u(p)&&w({inst:p})})},[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 m(b,x){return x()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:c;return fn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,fn}var Ps={};/**
72
72
  * @license React
73
73
  * use-sync-external-store-shim.development.js
74
74
  *
@@ -76,27 +76,27 @@ React keys must be passed directly to JSX without using spread:
76
76
  *
77
77
  * This source code is licensed under the MIT license found in the
78
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:{}};/*!
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 p=f();if(!b){var w=f();o(p,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),b=!0)}w=i({inst:{value:p,getSnapshot:f}});var v=w[0].inst,T=w[1];return u(function(){v.value=p,v.getSnapshot=f,r(v)&&T({inst:v})},[l,p,f]),c(function(){return r(v)&&T({inst:v}),l(function(){r(v)&&T({inst:v})})},[l]),m(p),p}function r(l){var f=l.getSnapshot;l=l.value;try{var p=f();return!o(l,p)}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,m=s.useDebugValue,d=!1,b=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Ps.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())}()),Ps}var Es;function Zi(){return Es||(Es=1,process.env.NODE_ENV==="production"?ln.exports=zi():ln.exports=Ki()),ln.exports}var Qi=Zi(),Gi=h.version.split(".").map(Number)[0],ks=[],Xi=Symbol.for(Gi>=19?"react.transitional.element":"react.element"),wt,Cs=Symbol.dispose||Symbol.for("Symbol.dispose");function dn(e,t){var r=t.effect.S();return wt=t,Ji.bind(t,e,r)}function Ji(e,t){t(),wt=e}var Os,hn,Ds=function(){},ea=((Os={o:0,effect:{s:void 0,c:function(){},S:function(){return Ds},d:function(){}},subscribe:function(){return Ds},getSnapshot:function(){return 0},S:function(){},f:function(){}})[Cs]=function(){},Os),ta=Promise.prototype.then.bind(Promise.resolve());function ra(){hn||(hn=ta(na))}function na(){var e;hn=void 0,(e=wt)==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,m=un(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,m()}},getSnapshot:function(){return u},S:function(){if(wt!=null){var d=wt.o,b=this.o;d==0&&b==0||d==0&&b==1?(wt.f(),i=dn(void 0,this)):d==1&&b==0||d==2&&b==0||(i=dn(wt,this))}else i=dn(void 0,this)},f:function(){var d=i;i=void 0,d==null||d()}})[Cs]=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 dt(e,t){return h.useMemo(function(){return Ui(e,t)},ks)}function At(e){var t=h.useRef(e);t.current=e,h.useEffect(function(){return un(function(){return t.current()})},ks)}const _s=h.createContext(void 0),Ns=()=>h.useContext(_s),oa=(e,t)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,readOnly:i=!1,onChange:c,children:u,className:m}=e,[d,b]=h.useState(r),[x,l]=h.useState(i),f=h.useRef(),p=h.useRef(),w=h.useRef(),v=h.useRef(),T=h.useRef(),L=h.useRef(),M=Ns(),E=Ar(),Q=h.useId(),I=h.useMemo(()=>(E==null?void 0:E.sharedId)||e.id||Q,[E==null?void 0:E.sharedId,e.id,Q]),[B,$,ne]=Wi({checked:!1,partial:!1}),oe=ps(s),H=ps(o);h.useEffect(()=>{if(B.initial)$({checked:o?!1:s,partial:o});else{const U=oe.changed?s:B.value.checked,Y=H.changed?o:B.value.partial;$({checked:Y?!1:U,partial:Y})}},[s,o]),h.useEffect(()=>{l(i)},[i]),h.useEffect(()=>{M&&(f.current=M.nameSignal,p.current=M.valueSignal,w.current=M.readOnlySignal,v.current=M.useComparator,T.current=M.compare,L.current=M.onCheckboxChange)},[M]),At(()=>{var U,Y,ce;if(p.current)if((U=v.current)!=null&&U.value&&T.current){const k=T.current,j=((Y=p.current.value)==null?void 0:Y.some(D=>k(n,D)))??!1;$(D=>({...D,checked:j}))}else{const k=((ce=p.current.value)==null?void 0:ce.some(j=>n===j))??!1;$(j=>({...j,checked:k}))}}),At(()=>{f.current&&b(f.current.value)}),At(()=>{w.current&&l(w.current.value??!1)});const A=pr(U=>{var Y;const ce=((Y=ne.current)==null?void 0:Y.value.partial)===!0?!0:U.target.checked;$({checked:ce,partial:!1}),L.current?L.current({originalEvent:U,name:d,value:n,checked:ce}):c==null||c({originalEvent:U,name:d,value:n,checked:ce})}),N=U=>{var Y;const ce={checked:U?!1:((Y=ne.current)==null?void 0:Y.value.checked)??!1,partial:U};$(ce)},F=U=>{$({checked:U,partial:!1})};h.useImperativeHandle(t,()=>({setPartiallyChecked:N,setChecked:F}));const q=d&&Fe.jsx(sn,{id:I,name:d,type:"checkbox",checked:B.value.checked,readOnly:x,onChange:A});return mr({wrapperElement:"label",renderProps:{...B.value,readOnly:x},elementProps:{htmlFor:I},className:m,innerWrapperElement:q,children:u})},js=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,Is=(e=ia)=>pr((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)}),Ms=({props:e,children:t})=>Fe.jsx(_s.Provider,{value:e,children:t}),aa=({name:e,value:t,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const c=dt(),u=dt(),m=dt(),d=dt(),b=Is(r),x=pr(f=>{if(f){const{checked:p}=f,w=f.value;if(u.value)if(r)if(p)u.value.findIndex(v=>b(w,v))===-1&&u.value.push(w);else{const v=u.value.filter(T=>!b(w,T));u.value=[...v]}else if(p)u.value.indexOf(w)===-1&&u.value.push(w);else{const v=u.value.filter(T=>T!==w);u.value=[...v]}else p&&(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:m,useComparator:d,compare:b,onCheckboxChange:x}),[]);return h.useEffect(()=>{c.value=e},[e]),h.useEffect(()=>{u.value=t},[t]),h.useEffect(()=>{m.value=n},[n]),h.useEffect(()=>{d.value=r!==void 0},[r]),Fe.jsx("div",{className:o,children:Fe.jsx(Ms,{props:l,children:i})})},Rs=h.memo(aa),Ft=({className:e,children:t})=>{const r=h.useId(),n=h.useMemo(()=>({sharedId:r}),[r]),s=Fe.jsx(ms.Provider,{value:n,children:t});return mr({wrapperElement:"div",className:e,children:s})},ca=({htmlFor:e,className:t,children:r})=>{const n=Ar(),s=h.useMemo(()=>(n==null?void 0:n.sharedId)||e,[n==null?void 0:n.sharedId,e]);return mr({wrapperElement:"label",elementProps:{htmlFor:s},className:t,children:r})};var Ls={exports:{}};/*!
80
80
  Copyright (c) 2018 Jed Watson.
81
81
  Licensed under the MIT License (MIT), see
82
82
  http://jedwatson.github.io/classnames
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
83
+ */var As;function ua(){return As||(As=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})()}(Ls)),Ls.exports}ua();const la=({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(la);const fa=({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(fa);const da=({name:e,value:t,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const c=dt(),u=dt(),m=dt(),d=dt(),b=Is(r),x=h.useMemo(()=>({nameSignal:c,valueSignal:u,readOnlySignal:m,useComparator:d,compare:b}),[]);h.useEffect(()=>{c.value=e},[e]),h.useEffect(()=>{u.value=t},[t]),h.useEffect(()=>{m.value=n},[n]),h.useEffect(()=>{d.value=r!==void 0},[r]);const l=pr(f=>{s==null||s({originalEvent:f,name:e,value:u.value})});return Fe.jsx("div",{className:o,onChange:l,children:Fe.jsx(Ms,{props:x,children:i})})},Fs=h.memo(da),ha=({value:e,className:t,children:r})=>{const[n,s]=h.useState(),[o,i]=h.useState(!1),[c,u]=h.useState(!1),m=h.useRef(),d=h.useRef(),b=h.useRef(),x=h.useRef(),l=h.useRef(),f=Ns(),p=Ar(),w=h.useId(),v=h.useMemo(()=>(p==null?void 0:p.sharedId)||w,[p==null?void 0:p.sharedId,w]);h.useEffect(()=>{f&&(m.current=f.nameSignal,d.current=f.valueSignal,b.current=f.readOnlySignal,x.current=f.useComparator,l.current=f.compare)},[f]),At(()=>{var L;x&&d.current&&l.current?i(l.current(e,d.current.value)):i(e===((L=d.current)==null?void 0:L.value))}),At(()=>{var L;s((L=m.current)==null?void 0:L.value)}),At(()=>{var L;u(((L=b.current)==null?void 0:L.value)??!1)});const T=pr(L=>{L.target.checked&&d.current&&(d.current.value=e)});return mr({wrapperElement:"label",renderProps:{checked:o,readOnly:c},elementProps:{htmlFor:v},className:t,innerWrapperElement:n?Fe.jsx(sn,{id:v,name:n,type:"radio",value:e,checked:o,readOnly:c,onChange:T}):null,children:r})},$s=h.memo(ha),pa=(e,t)=>{const{id:r,name:n,value:s,toggled:o=!1,readOnly:i,onChange:c,children:u,className:m}=e,[d,b]=h.useState(o),x=Ar(),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 p=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})),mr({wrapperElement:"label",renderProps:{toggled:d,readOnly:i},elementProps:{htmlFor:f},className:m,innerWrapperElement:Fe.jsx(sn,{id:f,name:n,type:"checkbox",checked:d,readOnly:i,onChange:p}),children:u})},ma=h.memo(h.forwardRef(pa)),pn=e=>{const[t,r]=h.useState(!0),n=us();return h.useEffect(()=>{n&&n.useAnimations!==void 0?r(n.useAnimations):e!==void 0&&r(e)},[n,e]),t},ct=({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 y.jsx(ca,{htmlFor:t,className:s,children:e})},ga=(e,t)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:c=!1,labelLocation:u=qe.Right,className:m,useAnimation:d,onChange:b}=e,x=pn(d),l=de("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer bsc:has-data-read-only:text-gray-4 bsc:dark:has-data-read-only:text-mono-light-3 bsc:has-data-read-only:pointer-events-none",m),f=de("bc-checkbox-label bsc:peer-data-read-only:text-gray-4 bsc:dark:peer-data-read-only:text-mono-light-3",{"bsc:ml-2":u===qe.Right,"bsc:mr-2":u===qe.Left}),p=dr(It.FocusWithin),w=de("bc-checkbox-outer bsc:group/checkbox bsc:peer 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]",p),v=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)]","bsc:group-data-checked/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:fill-mono-light-3","bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:group-not-data-read-only/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",{"bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-partial/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-checked/checkbox:group-data-read-only/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:group-data-read-only/checkbox:[transform:scale(1)]":x,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":!x});return y.jsxs(Ft,{className:l,children:[n&&u===qe.Left&&y.jsx(ct,{label:n,readOnly:o,className:f}),y.jsx(js,{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===qe.Right&&y.jsx(ct,{label:n,readOnly:o,className:f})]})},Ys=h.memo(h.forwardRef(ga)),$r=e=>e==null?!1:typeof e=="object",Hs=e=>e instanceof Date,Ws=e=>typeof e=="function",Vs=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},mn=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];Vs(i)||Ws(i)?t[o]=i:Hs(i)?t[o]=new Date(i.getTime()):Array.isArray(i)?t[o]=gn(i):$r(i)&&(t[o]=mn(i))}return t},gn=e=>{let t=e.length;const r=new Array(t);for(;t--!==0;){const n=e[t];Vs(n)||Ws(n)?r[t]=n:Hs(n)?r[t]=new Date(n.getTime()):$r(n)&&!Array.isArray(n)?r[t]=mn(n):Array.isArray(n)?r[t]=gn(n):r[t]=n}return r},ba=e=>$r(e)?Array.isArray(e)?gn(e):mn(e):e;function ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var va=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 xa=ya(va);function wa(e,t){for(let r=e.length;r--!==0;)if(!xa(e[r],t[r]))return!0;return!1}const bn=(e,t)=>{const r=h.useRef([]),n=r.current.length>0&&r.current[0]&&wa(r.current[0],t);return(r.current.length===0||n)&&(r.current=[ba(t),e()]),r.current[1]},Sa=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:m})=>{const[d,b]=h.useState([]),x=bn(()=>n,[n]);h.useEffect(()=>{b(r??[])},[r]);const l=T=>{if(T){const{value:L}=T;b(L??[]),m==null||m({name:e,value:L})}},f=(T,L)=>y.jsx(Ys,{label:T[s],value:T[o],className:"bsc:mr-3"},`${e}_checkbox_${L}`),p=de("bsc:flex bsc:flex-col bsc:gap-1",u),w=de("bsc:flex bsc:gap-1",{"bsc:flex-col":c===Ae.Vertical}),v=T=>y.jsx(Rs,{name:e,value:d,readOnly:i,onChange:l,className:w,children:T.map(f)});return y.jsxs("div",{className:p,children:[t&&y.jsx(ct,{label:t,readOnly:i}),x&&v(x)]})},Ta=h.memo(Pa);var Bs=typeof global=="object"&&global&&global.Object===Object&&global,Ea=typeof self=="object"&&self&&self.Object===Object&&self,Ke=Bs||Ea||Function("return this")(),$t=Ke.Symbol,Us=Object.prototype,ka=Us.hasOwnProperty,Ca=Us.toString,br=$t?$t.toStringTag:void 0;function Oa(e){var t=ka.call(e,br),r=e[br];try{e[br]=void 0;var n=!0}catch{}var s=Ca.call(e);return n&&(t?e[br]=r:delete e[br]),s}var Da=Object.prototype,_a=Da.toString;function Na(e){return _a.call(e)}var ja="[object Null]",Ia="[object Undefined]",qs=$t?$t.toStringTag:void 0;function Yt(e){return e==null?e===void 0?Ia:ja:qs&&qs in Object(e)?Oa(e):Na(e)}function Ht(e){return e!=null&&typeof e=="object"}var Ma="[object Symbol]";function Ra(e){return typeof e=="symbol"||Ht(e)&&Yt(e)==Ma}var yn=Array.isArray,La=/\s/;function Aa(e){for(var t=e.length;t--&&La.test(e.charAt(t)););return t}var Fa=/^\s+/;function $a(e){return e&&e.slice(0,Aa(e)+1).replace(Fa,"")}function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var zs=NaN,Ya=/^[-+]0x[0-9a-f]+$/i,Ha=/^0b[01]+$/i,Wa=/^0o[0-7]+$/i,Va=parseInt;function Ks(e){if(typeof e=="number")return e;if(Ra(e))return zs;if(ht(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ht(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$a(e);var r=Ha.test(e);return r||Wa.test(e)?Va(e.slice(2),r?2:8):Ya.test(e)?zs:+e}var Ba="[object AsyncFunction]",Ua="[object Function]",qa="[object GeneratorFunction]",za="[object Proxy]";function Zs(e){if(!ht(e))return!1;var t=Yt(e);return t==Ua||t==qa||t==Ba||t==za}var vn=Ke["__core-js_shared__"],Qs=function(){var e=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ka(e){return!!Qs&&Qs in e}var Za=Function.prototype,Qa=Za.toString;function St(e){if(e!=null){try{return Qa.call(e)}catch{}try{return e+""}catch{}}return""}var Ga=/[\\^$.*+?()[\]{}|]/g,Xa=/^\[object .+?Constructor\]$/,Ja=Function.prototype,ec=Object.prototype,tc=Ja.toString,rc=ec.hasOwnProperty,nc=RegExp("^"+tc.call(rc).replace(Ga,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sc(e){if(!ht(e)||Ka(e))return!1;var t=Zs(e)?nc:Xa;return t.test(St(e))}function oc(e,t){return e==null?void 0:e[t]}function Pt(e,t){var r=oc(e,t);return sc(r)?r:void 0}var xn=Pt(Ke,"WeakMap"),Gs=Object.create,ic=function(){function e(){}return function(t){if(!ht(t))return{};if(Gs)return Gs(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Xs=function(){try{var e=Pt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function ac(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var cc=9007199254740991,uc=/^(?:0|[1-9]\d*)$/;function lc(e,t){var r=typeof e;return t=t??cc,!!t&&(r=="number"||r!="symbol"&&uc.test(e))&&e>-1&&e%1==0&&e<t}function fc(e,t,r){t=="__proto__"&&Xs?Xs(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Js(e,t){return e===t||e!==e&&t!==t}var dc=Object.prototype,hc=dc.hasOwnProperty;function pc(e,t,r){var n=e[t];(!(hc.call(e,t)&&Js(n,r))||r===void 0&&!(t in e))&&fc(e,t,r)}var mc=9007199254740991;function eo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mc}function gc(e){return e!=null&&eo(e.length)&&!Zs(e)}var bc=Object.prototype;function to(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||bc;return e===r}function yc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var vc="[object Arguments]";function ro(e){return Ht(e)&&Yt(e)==vc}var no=Object.prototype,xc=no.hasOwnProperty,wc=no.propertyIsEnumerable,Sc=ro(function(){return arguments}())?ro:function(e){return Ht(e)&&xc.call(e,"callee")&&!wc.call(e,"callee")};function Pc(){return!1}var so=typeof se=="object"&&se&&!se.nodeType&&se,oo=so&&typeof module=="object"&&module&&!module.nodeType&&module,Tc=oo&&oo.exports===so,io=Tc?Ke.Buffer:void 0,Ec=io?io.isBuffer:void 0,ao=Ec||Pc,kc="[object Arguments]",Cc="[object Array]",Oc="[object Boolean]",Dc="[object Date]",_c="[object Error]",Nc="[object Function]",jc="[object Map]",Ic="[object Number]",Mc="[object Object]",Rc="[object RegExp]",Lc="[object Set]",Ac="[object String]",Fc="[object WeakMap]",$c="[object ArrayBuffer]",Yc="[object DataView]",Hc="[object Float32Array]",Wc="[object Float64Array]",Vc="[object Int8Array]",Bc="[object Int16Array]",Uc="[object Int32Array]",qc="[object Uint8Array]",zc="[object Uint8ClampedArray]",Kc="[object Uint16Array]",Zc="[object Uint32Array]",Te={};Te[Hc]=Te[Wc]=Te[Vc]=Te[Bc]=Te[Uc]=Te[qc]=Te[zc]=Te[Kc]=Te[Zc]=!0,Te[kc]=Te[Cc]=Te[$c]=Te[Oc]=Te[Yc]=Te[Dc]=Te[_c]=Te[Nc]=Te[jc]=Te[Ic]=Te[Mc]=Te[Rc]=Te[Lc]=Te[Ac]=Te[Fc]=!1;function Qc(e){return Ht(e)&&eo(e.length)&&!!Te[Yt(e)]}function wn(e){return function(t){return e(t)}}var co=typeof se=="object"&&se&&!se.nodeType&&se,yr=co&&typeof module=="object"&&module&&!module.nodeType&&module,Gc=yr&&yr.exports===co,Sn=Gc&&Bs.process,Wt=function(){try{var e=yr&&yr.require&&yr.require("util").types;return e||Sn&&Sn.binding&&Sn.binding("util")}catch{}}(),uo=Wt&&Wt.isTypedArray,Xc=uo?wn(uo):Qc,Jc=Object.prototype,eu=Jc.hasOwnProperty;function tu(e,t){var r=yn(e),n=!r&&Sc(e),s=!r&&!n&&ao(e),o=!r&&!n&&!s&&Xc(e),i=r||n||s||o,c=i?yc(e.length,String):[],u=c.length;for(var m in e)eu.call(e,m)&&!(i&&(m=="length"||s&&(m=="offset"||m=="parent")||o&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||lc(m,u)))&&c.push(m);return c}function lo(e,t){return function(r){return e(t(r))}}var ru=lo(Object.keys,Object),nu=Object.prototype,su=nu.hasOwnProperty;function ou(e){if(!to(e))return ru(e);var t=[];for(var r in Object(e))su.call(e,r)&&r!="constructor"&&t.push(r);return t}function iu(e){return gc(e)?tu(e):ou(e)}var vr=Pt(Object,"create");function au(){this.__data__=vr?vr(null):{},this.size=0}function cu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uu="__lodash_hash_undefined__",lu=Object.prototype,fu=lu.hasOwnProperty;function du(e){var t=this.__data__;if(vr){var r=t[e];return r===uu?void 0:r}return fu.call(t,e)?t[e]:void 0}var hu=Object.prototype,pu=hu.hasOwnProperty;function mu(e){var t=this.__data__;return vr?t[e]!==void 0:pu.call(t,e)}var gu="__lodash_hash_undefined__";function bu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=vr&&t===void 0?gu:t,this}function Tt(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])}}Tt.prototype.clear=au,Tt.prototype.delete=cu,Tt.prototype.get=du,Tt.prototype.has=mu,Tt.prototype.set=bu;function yu(){this.__data__=[],this.size=0}function Yr(e,t){for(var r=e.length;r--;)if(Js(e[r][0],t))return r;return-1}var vu=Array.prototype,xu=vu.splice;function wu(e){var t=this.__data__,r=Yr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():xu.call(t,r,1),--this.size,!0}function Su(e){var t=this.__data__,r=Yr(t,e);return r<0?void 0:t[r][1]}function Pu(e){return Yr(this.__data__,e)>-1}function Tu(e,t){var r=this.__data__,n=Yr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ut(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])}}ut.prototype.clear=yu,ut.prototype.delete=wu,ut.prototype.get=Su,ut.prototype.has=Pu,ut.prototype.set=Tu;var xr=Pt(Ke,"Map");function Eu(){this.size=0,this.__data__={hash:new Tt,map:new(xr||ut),string:new Tt}}function ku(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 ku(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Cu(e){var t=Hr(this,e).delete(e);return this.size-=t?1:0,t}function Ou(e){return Hr(this,e).get(e)}function Du(e){return Hr(this,e).has(e)}function _u(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=Eu,Vt.prototype.delete=Cu,Vt.prototype.get=Ou,Vt.prototype.has=Du,Vt.prototype.set=_u;function Nu(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var ju=lo(Object.getPrototypeOf,Object);function Iu(){this.__data__=new ut,this.size=0}function Mu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Ru(e){return this.__data__.get(e)}function Lu(e){return this.__data__.has(e)}var Au=200;function Fu(e,t){var r=this.__data__;if(r instanceof ut){var n=r.__data__;if(!xr||n.length<Au-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 ut(e);this.size=t.size}Bt.prototype.clear=Iu,Bt.prototype.delete=Mu,Bt.prototype.get=Ru,Bt.prototype.has=Lu,Bt.prototype.set=Fu;var fo=typeof se=="object"&&se&&!se.nodeType&&se,ho=fo&&typeof module=="object"&&module&&!module.nodeType&&module,$u=ho&&ho.exports===fo,po=$u?Ke.Buffer:void 0;po&&po.allocUnsafe;function Yu(e,t){return e.slice()}function Hu(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 Wu(){return[]}var Vu=Object.prototype,Bu=Vu.propertyIsEnumerable,mo=Object.getOwnPropertySymbols,Uu=mo?function(e){return e==null?[]:(e=Object(e),Hu(mo(e),function(t){return Bu.call(e,t)}))}:Wu;function qu(e,t,r){var n=t(e);return yn(e)?n:Nu(n,r(e))}function zu(e){return qu(e,iu,Uu)}var Pn=Pt(Ke,"DataView"),Tn=Pt(Ke,"Promise"),En=Pt(Ke,"Set"),go="[object Map]",Ku="[object Object]",bo="[object Promise]",yo="[object Set]",vo="[object WeakMap]",xo="[object DataView]",Zu=St(Pn),Qu=St(xr),Gu=St(Tn),Xu=St(En),Ju=St(xn),lt=Yt;(Pn&&lt(new Pn(new ArrayBuffer(1)))!=xo||xr&&lt(new xr)!=go||Tn&&lt(Tn.resolve())!=bo||En&&lt(new En)!=yo||xn&&lt(new xn)!=vo)&&(lt=function(e){var t=Yt(e),r=t==Ku?e.constructor:void 0,n=r?St(r):"";if(n)switch(n){case Zu:return xo;case Qu:return go;case Gu:return bo;case Xu:return yo;case Ju:return vo}return t});var el=Object.prototype,tl=el.hasOwnProperty;function rl(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&tl.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var wo=Ke.Uint8Array;function kn(e){var t=new e.constructor(e.byteLength);return new wo(t).set(new wo(e)),t}function nl(e,t){var r=kn(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var sl=/\w*$/;function ol(e){var t=new e.constructor(e.source,sl.exec(e));return t.lastIndex=e.lastIndex,t}var So=$t?$t.prototype:void 0,Po=So?So.valueOf:void 0;function il(e){return Po?Object(Po.call(e)):{}}function al(e,t){var r=kn(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var cl="[object Boolean]",ul="[object Date]",ll="[object Map]",fl="[object Number]",dl="[object RegExp]",hl="[object Set]",pl="[object String]",ml="[object Symbol]",gl="[object ArrayBuffer]",bl="[object DataView]",yl="[object Float32Array]",vl="[object Float64Array]",xl="[object Int8Array]",wl="[object Int16Array]",Sl="[object Int32Array]",Pl="[object Uint8Array]",Tl="[object Uint8ClampedArray]",El="[object Uint16Array]",kl="[object Uint32Array]";function Cl(e,t,r){var n=e.constructor;switch(t){case gl:return kn(e);case cl:case ul:return new n(+e);case bl:return nl(e);case yl:case vl:case xl:case wl:case Sl:case Pl:case Tl:case El:case kl:return al(e);case ll:return new n;case fl:case pl:return new n(e);case dl:return ol(e);case hl:return new n;case ml:return il(e)}}function Ol(e){return typeof e.constructor=="function"&&!to(e)?ic(ju(e)):{}}var Dl="[object Map]";function _l(e){return Ht(e)&&lt(e)==Dl}var To=Wt&&Wt.isMap,Nl=To?wn(To):_l,jl="[object Set]";function Il(e){return Ht(e)&&lt(e)==jl}var Eo=Wt&&Wt.isSet,Ml=Eo?wn(Eo):Il,ko="[object Arguments]",Rl="[object Array]",Ll="[object Boolean]",Al="[object Date]",Fl="[object Error]",Co="[object Function]",$l="[object GeneratorFunction]",Yl="[object Map]",Hl="[object Number]",Oo="[object Object]",Wl="[object RegExp]",Vl="[object Set]",Bl="[object String]",Ul="[object Symbol]",ql="[object WeakMap]",zl="[object ArrayBuffer]",Kl="[object DataView]",Zl="[object Float32Array]",Ql="[object Float64Array]",Gl="[object Int8Array]",Xl="[object Int16Array]",Jl="[object Int32Array]",ef="[object Uint8Array]",tf="[object Uint8ClampedArray]",rf="[object Uint16Array]",nf="[object Uint32Array]",Se={};Se[ko]=Se[Rl]=Se[zl]=Se[Kl]=Se[Ll]=Se[Al]=Se[Zl]=Se[Ql]=Se[Gl]=Se[Xl]=Se[Jl]=Se[Yl]=Se[Hl]=Se[Oo]=Se[Wl]=Se[Vl]=Se[Bl]=Se[Ul]=Se[ef]=Se[tf]=Se[rf]=Se[nf]=!0,Se[Fl]=Se[Co]=Se[ql]=!1;function Wr(e,t,r,n,s,o){var i;if(i!==void 0)return i;if(!ht(e))return e;var c=yn(e);if(c)i=rl(e);else{var u=lt(e),m=u==Co||u==$l;if(ao(e))return Yu(e);if(u==Oo||u==ko||m&&!s)i=m?{}:Ol(e);else{if(!Se[u])return s?e:{};i=Cl(e,u)}}o||(o=new Bt);var d=o.get(e);if(d)return d;o.set(e,i),Ml(e)?e.forEach(function(l){i.add(Wr(l,t,r,l,e,o))}):Nl(e)&&e.forEach(function(l,f){i.set(f,Wr(l,t,r,f,e,o))});var b=zu,x=c?void 0:b(e);return ac(x||e,function(l,f){x&&(f=l,l=e[f]),pc(i,f,Wr(l,t,r,f,e,o))}),i}var sf=1,of=4;function af(e){return Wr(e,sf|of)}var Cn=function(){return Ke.Date.now()},cf="Expected a function",uf=Math.max,lf=Math.min;function wr(e,t,r){var n,s,o,i,c,u,m=0,d=!1,b=!1,x=!0;if(typeof e!="function")throw new TypeError(cf);t=Ks(t)||0,ht(r)&&(d=!!r.leading,b="maxWait"in r,o=b?uf(Ks(r.maxWait)||0,t):o,x="trailing"in r?!!r.trailing:x);function l(Q){var I=n,B=s;return n=s=void 0,m=Q,i=e.apply(B,I),i}function f(Q){return m=Q,c=setTimeout(v,t),d?l(Q):i}function p(Q){var I=Q-u,B=Q-m,$=t-I;return b?lf($,o-B):$}function w(Q){var I=Q-u,B=Q-m;return u===void 0||I>=t||I<0||b&&B>=o}function v(){var Q=Cn();if(w(Q))return T(Q);c=setTimeout(v,p(Q))}function T(Q){return c=void 0,x&&n?l(Q):(n=s=void 0,i)}function L(){c!==void 0&&clearTimeout(c),m=0,n=u=s=c=void 0}function M(){return c===void 0?i:T(Cn())}function E(){var Q=Cn(),I=w(Q);if(n=arguments,s=this,u=Q,I){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=L,E.flush=M,E}var ff="Expected a function";function df(e,t,r){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(ff);return ht(r)&&(n="leading"in r?!0:n,s="trailing"in r?!!r.trailing:s),wr(e,t,{leading:n,maxWait:t,trailing:s})}const hf=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:c,className:u,leftElementClassName:m,rightElementClassName:d,isSingleLine:b=!0,allowSingleLineScroll:x=!1,inputMode:l,placeholder:f,onFocus:p,onBlur:w,onInput:v,onInnerTextChange:T,onInnerHTMLChange:L,onElementCreate:M,onLeftElementClick:E,onRightElementClick:Q}=e,I=h.useRef("bsc:grow bsc:focus:outline-hidden"),B=h.useRef("bsc:text-gray-4"),$=h.useRef(),ne=h.useCallback(C=>{const z=C.target,ee=z.innerHTML;z.className=`${I.current}`,f&&ee===f&&(z.innerHTML=""),p==null||p(C)},[f,p]),oe=h.useCallback(C=>{const z=C.target.innerHTML;if(f&&z===""){const ee=C.target;ee.innerHTML=f,ee.className=`${I.current} ${B.current}`}w==null||w(C)},[f,w]),H=h.useCallback(C=>{var z,ee;(z=$.current)==null||z.removeEventListener("focus",ne),(ee=$.current)==null||ee.removeEventListener("blur",oe),f&&C&&C!==document.activeElement&&C.innerHTML===""&&(C.innerHTML=f,C.className=`${I.current} ${B.current}`),C.addEventListener("focus",ne),C.addEventListener("blur",oe),$.current=C},[f]),A=h.useCallback(C=>{M==null||M(C)},[M]),N=C=>{E==null||E(C)},F=C=>{Q==null||Q(C)},q=wr(C=>{v==null||v(C),T==null||T(C.target.innerText),L==null||L(C.target.innerHTML)},s),U=h.useCallback(C=>{$.current&&($.current.innerText=C)},[]),Y=h.useCallback(C=>{$.current&&($.current.innerHTML=C)},[]),ce=h.useCallback(()=>{var C;(C=$.current)==null||C.focus()},[]);h.useImperativeHandle(t,()=>({inputElement:$.current,setInnerText:U,setInnerHTML:Y,focus:ce}));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":b&&x,"bsc:overflow-hidden bsc:whitespace-pre":b&&!x},u),j=de("bsc:shrink",{"bsc:mr-2":i},m),D=de("bsc:shrink",{"bsc:ml-2":c},d);return y.jsxs("div",{className:k,ref:C=>C&&A(C),children:[i&&y.jsx("div",{className:j,onClick:N,children:i}),y.jsx("div",{ref:C=>C&&H(C),className:I.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:l,onInput:q,children:r}),c&&y.jsx("div",{className:D,onClick:F,children:c})]})},Vr=h.forwardRef(hf);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 Pe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ut(e,t){const r=pe(e);return isNaN(t)?Pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function pt(e,t){const r=pe(e);if(isNaN(t))return Pe(e,NaN);if(!t)return r;const n=r.getDate(),s=Pe(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 Do=6048e5,On=6e4,Dn=36e5,pf=1e3;let mf={};function Sr(){return mf}function mt(e,t){var c,u,m,d;const r=Sr(),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=(m=r.locale)==null?void 0:m.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 qt(e){return mt(e,{weekStartsOn:1})}function gf(e){const t=pe(e),r=t.getFullYear(),n=Pe(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=qt(n),o=Pe(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=qt(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function _o(e){const t=pe(e);return t.setHours(0,0,0,0),t}function No(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 bf(e){const t=gf(e),r=Pe(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),qt(r)}function Pr(e,t){return pt(e,t*12)}function jo(e,t){const r=_o(e),n=_o(t);return+r==+n}function yf(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function vf(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 Io(e){const t=pe(e);return t.setDate(1),t.setHours(0,0,0,0),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),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 wf={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"}},Sf=(e,t,r)=>{let n;const s=wf[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 _n(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"},Tf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ef={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kf={date:_n({formats:Pf,defaultWidth:"full"}),time:_n({formats:Tf,defaultWidth:"full"}),dateTime:_n({formats:Ef,defaultWidth:"full"})},Cf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Of=(e,t,r,n)=>Cf[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 Df={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_f={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nf={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"]},jf={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"]},If={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"}},Mf={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"}},Rf={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:Df,defaultWidth:"wide"}),quarter:Tr({values:_f,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Tr({values:Nf,defaultWidth:"wide"}),day:Tr({values:jf,defaultWidth:"wide"}),dayPeriod:Tr({values:If,defaultWidth:"wide",formattingValues:Mf,defaultFormattingWidth:"wide"})};function Er(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)?Af(c,b=>b.test(i)):Lf(c,b=>b.test(i));let m;m=e.valueCallback?e.valueCallback(u):u,m=r.valueCallback?r.valueCallback(m):m;const d=t.slice(i.length);return{value:m,rest:d}}}function Lf(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Af(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Ff(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 $f=/^(\d+)(th|st|nd|rd)?/i,Yf=/\d+/i,Hf={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},Wf={any:[/^b/i,/^(a|c)/i]},Vf={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Bf={any:[/1/i,/2/i,/3/i,/4/i]},Uf={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]},zf={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},Kf={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]},Zf={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},Qf={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}},Gf={ordinalNumber:Ff({matchPattern:$f,parsePattern:Yf,valueCallback:e=>parseInt(e,10)}),era:Er({matchPatterns:Hf,defaultMatchWidth:"wide",parsePatterns:Wf,defaultParseWidth:"any"}),quarter:Er({matchPatterns:Vf,defaultMatchWidth:"wide",parsePatterns:Bf,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Er({matchPatterns:Uf,defaultMatchWidth:"wide",parsePatterns:qf,defaultParseWidth:"any"}),day:Er({matchPatterns:zf,defaultMatchWidth:"wide",parsePatterns:Kf,defaultParseWidth:"any"}),dayPeriod:Er({matchPatterns:Zf,defaultMatchWidth:"any",parsePatterns:Qf,defaultParseWidth:"any"})},Xf={code:"en-US",formatDistance:Sf,formatLong:kf,formatRelative:Of,localize:Rf,match:Gf,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jf(e){const t=pe(e),r=+qt(t)-+bf(t);return Math.round(r/Do)+1}function Mo(e,t){var d,b,x,l;const r=pe(e),n=r.getFullYear(),s=Sr(),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=Pe(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const c=mt(i,t),u=Pe(e,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const m=mt(u,t);return r.getTime()>=c.getTime()?n+1:r.getTime()>=m.getTime()?n:n-1}function ed(e,t){var c,u,m,d;const r=Sr(),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=(m=r.locale)==null?void 0:m.options)==null?void 0:d.firstWeekContainsDate)??1,s=Mo(e,t),o=Pe(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),mt(o,t)}function td(e,t){const r=pe(e),n=+mt(r,t)-+ed(r,t);return Math.round(n/Do)+1}const Ro=(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"})}},Lo=(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"})}},Ao={p:Lo,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Ro(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}}",Ro(n,t)).replace("{{time}}",Lo(s,t))}},rd=/^D+$/,nd=/^Y+$/,sd=["D","DD","YY","YYYY"];function od(e){return rd.test(e)}function id(e){return nd.test(e)}function Fo(e,t,r){const n=ad(e,t,r);if(console.warn(n),sd.includes(e))throw new RangeError(n)}function ad(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 Nn(e){return pe(e).getDay()}function $o(e){const t=pe(e),r=t.getFullYear(),n=t.getMonth(),s=Pe(e,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function cd(){return Object.assign({},Sr())}function ud(e){let r=pe(e).getDay();return r===0&&(r=7),r}function ld(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function fd(e,t){const r=pe(e),n=pe(t);return+r<+n}function dd(e,t){const r=t instanceof Date?Pe(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 hd=10;class Yo{constructor(){P(this,"subPriority",0)}validate(t,r){return!0}}class pd 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 md extends Yo{constructor(){super(...arguments);P(this,"priority",hd);P(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:Pe(r,dd(r,Date))}}class me{run(t,r,n,s){const o=this.parse(t,r,n,s);return o?{setter:new pd(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class gd extends me{constructor(){super(...arguments);P(this,"priority",140);P(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 Ne={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}/},Je={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 je(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 et(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*Dn+o*On+i*pf),rest:t.slice(r[0].length)}}function Ho(e){return Ce(Ne.anyDigitsSigned,e)}function Oe(e,t){switch(e){case 1:return Ce(Ne.singleDigit,t);case 2:return Ce(Ne.twoDigits,t);case 3:return Ce(Ne.threeDigits,t);case 4:return Ce(Ne.fourDigits,t);default:return Ce(new RegExp("^\\d{1,"+e+"}"),t)}}function Br(e,t){switch(e){case 1:return Ce(Ne.singleDigitSigned,t);case 2:return Ce(Ne.twoDigitsSigned,t);case 3:return Ce(Ne.threeDigitsSigned,t);case 4:return Ce(Ne.fourDigitsSigned,t);default:return Ce(new RegExp("^-?\\d{1,"+e+"}"),t)}}function jn(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 Wo(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 Vo(e){return e%400===0||e%4===0&&e%100!==0}class bd extends me{constructor(){super(...arguments);P(this,"priority",130);P(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 je(Oe(4,r),o);case"yo":return je(s.ordinalNumber(r,{unit:"year"}),o);default:return je(Oe(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=Wo(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 yd extends me{constructor(){super(...arguments);P(this,"priority",130);P(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 je(Oe(4,r),o);case"Yo":return je(s.ordinalNumber(r,{unit:"year"}),o);default:return je(Oe(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s,o){const i=Mo(r,o);if(s.isTwoDigitYear){const u=Wo(s.year,i);return r.setFullYear(u,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),mt(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),mt(r,o)}}class vd extends me{constructor(){super(...arguments);P(this,"priority",130);P(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=Pe(r,0);return o.setFullYear(s,0,4),o.setHours(0,0,0,0),qt(o)}}class xd extends me{constructor(){super(...arguments);P(this,"priority",130);P(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 wd extends me{constructor(){super(...arguments);P(this,"priority",120);P(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 Oe(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 Sd extends me{constructor(){super(...arguments);P(this,"priority",120);P(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 Oe(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);P(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);P(this,"priority",110)}parse(r,n,s){const o=i=>i-1;switch(n){case"M":return je(Ce(Ne.month,r),o);case"MM":return je(Oe(2,r),o);case"Mo":return je(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 Td extends me{constructor(){super(...arguments);P(this,"priority",110);P(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 je(Ce(Ne.month,r),o);case"LL":return je(Oe(2,r),o);case"Lo":return je(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 Ed(e,t,r){const n=pe(e),s=td(n,r)-t;return n.setDate(n.getDate()-s*7),n}class kd extends me{constructor(){super(...arguments);P(this,"priority",100);P(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(Ne.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Oe(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s,o){return mt(Ed(r,s,o),o)}}function Cd(e,t){const r=pe(e),n=Jf(r)-t;return r.setDate(r.getDate()-n*7),r}class Od extends me{constructor(){super(...arguments);P(this,"priority",100);P(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(Ne.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Oe(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s){return qt(Cd(r,s))}}const Dd=[31,28,31,30,31,30,31,31,30,31,30,31],_d=[31,29,31,30,31,30,31,31,30,31,30,31];class Nd extends me{constructor(){super(...arguments);P(this,"priority",90);P(this,"subPriority",1);P(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"d":return Ce(Ne.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Oe(n.length,r)}}validate(r,n){const s=r.getFullYear(),o=Vo(s),i=r.getMonth();return o?n>=1&&n<=_d[i]:n>=1&&n<=Dd[i]}set(r,n,s){return r.setDate(s),r.setHours(0,0,0,0),r}}class jd extends me{constructor(){super(...arguments);P(this,"priority",90);P(this,"subpriority",1);P(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(Ne.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Oe(n.length,r)}}validate(r,n){const s=r.getFullYear();return Vo(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 In(e,t,r){var b,x,l,f;const n=Sr(),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,m=7-s,d=t<0||t>6?t-(i+m)%7:(u+m)%7-(i+m)%7;return Ut(o,d)}class Id extends me{constructor(){super(...arguments);P(this,"priority",90);P(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=In(r,s,o),r.setHours(0,0,0,0),r}}class Md extends me{constructor(){super(...arguments);P(this,"priority",90);P(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 je(Oe(n.length,r),i);case"eo":return je(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=In(r,s,o),r.setHours(0,0,0,0),r}}class Rd extends me{constructor(){super(...arguments);P(this,"priority",90);P(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 je(Oe(n.length,r),i);case"co":return je(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=In(r,s,o),r.setHours(0,0,0,0),r}}function Ld(e,t){const r=pe(e),n=ud(r),s=t-n;return Ut(r,s)}class Ad extends me{constructor(){super(...arguments);P(this,"priority",90);P(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 Oe(n.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return je(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 je(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return je(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return je(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=Ld(r,s),r.setHours(0,0,0,0),r}}class Fd extends me{constructor(){super(...arguments);P(this,"priority",80);P(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(jn(s),0,0,0),r}}class $d extends me{constructor(){super(...arguments);P(this,"priority",80);P(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(jn(s),0,0,0),r}}class Yd extends me{constructor(){super(...arguments);P(this,"priority",80);P(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(jn(s),0,0,0),r}}class Hd extends me{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,s){switch(n){case"h":return Ce(Ne.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Oe(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 Wd extends me{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,s){switch(n){case"H":return Ce(Ne.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Oe(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,s){return r.setHours(s,0,0,0),r}}class Vd extends me{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,s){switch(n){case"K":return Ce(Ne.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Oe(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 Bd extends me{constructor(){super(...arguments);P(this,"priority",70);P(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,s){switch(n){case"k":return Ce(Ne.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Oe(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 Ud extends me{constructor(){super(...arguments);P(this,"priority",60);P(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"m":return Ce(Ne.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Oe(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);P(this,"priority",50);P(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"s":return Ce(Ne.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Oe(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setSeconds(s,0),r}}class zd extends me{constructor(){super(...arguments);P(this,"priority",30);P(this,"incompatibleTokens",["t","T"])}parse(r,n){const s=o=>Math.trunc(o*Math.pow(10,-n.length+3));return je(Oe(n.length,r),s)}set(r,n,s){return r.setMilliseconds(s),r}}class Kd extends me{constructor(){super(...arguments);P(this,"priority",10);P(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return et(Je.basicOptionalMinutes,r);case"XX":return et(Je.basic,r);case"XXXX":return et(Je.basicOptionalSeconds,r);case"XXXXX":return et(Je.extendedOptionalSeconds,r);case"XXX":default:return et(Je.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Pe(r,r.getTime()-No(r)-s)}}class Zd extends me{constructor(){super(...arguments);P(this,"priority",10);P(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return et(Je.basicOptionalMinutes,r);case"xx":return et(Je.basic,r);case"xxxx":return et(Je.basicOptionalSeconds,r);case"xxxxx":return et(Je.extendedOptionalSeconds,r);case"xxx":default:return et(Je.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Pe(r,r.getTime()-No(r)-s)}}class Qd extends me{constructor(){super(...arguments);P(this,"priority",40);P(this,"incompatibleTokens","*")}parse(r){return Ho(r)}set(r,n,s){return[Pe(r,s*1e3),{timestampIsSet:!0}]}}class Gd extends me{constructor(){super(...arguments);P(this,"priority",20);P(this,"incompatibleTokens","*")}parse(r){return Ho(r)}set(r,n,s){return[Pe(r,s),{timestampIsSet:!0}]}}const Xd={G:new gd,y:new bd,Y:new yd,R:new vd,u:new xd,Q:new wd,q:new Sd,M:new Pd,L:new Td,w:new kd,I:new Od,d:new Nd,D:new jd,E:new Id,e:new Md,c:new Rd,i:new Ad,a:new Fd,b:new $d,B:new Yd,h:new Hd,H:new Wd,K:new Vd,k:new Bd,m:new Ud,s:new qd,S:new zd,X:new Kd,x:new Zd,t:new Qd,T:new Gd},Jd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,th=/^'([^]*?)'?$/,rh=/''/g,nh=/\S/,sh=/[a-zA-Z]/;function tt(e,t,r,n){var p,w,v,T,L,M,E,Q;const s=cd(),o=(n==null?void 0:n.locale)??s.locale??Xf,i=(n==null?void 0:n.firstWeekContainsDate)??((w=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??s.firstWeekContainsDate??((T=(v=s.locale)==null?void 0:v.options)==null?void 0:T.firstWeekContainsDate)??1,c=(n==null?void 0:n.weekStartsOn)??((M=(L=n==null?void 0:n.locale)==null?void 0:L.options)==null?void 0:M.weekStartsOn)??s.weekStartsOn??((Q=(E=s.locale)==null?void 0:E.options)==null?void 0:Q.weekStartsOn)??0;if(t==="")return e===""?pe(r):Pe(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:c,locale:o},m=[new md],d=t.match(eh).map(I=>{const B=I[0];if(B in Ao){const $=Ao[B];return $(I,o.formatLong)}return I}).join("").match(Jd),b=[];for(let I of d){!(n!=null&&n.useAdditionalWeekYearTokens)&&id(I)&&Fo(I,t,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&od(I)&&Fo(I,t,e);const B=I[0],$=Xd[B];if($){const{incompatibleTokens:ne}=$;if(Array.isArray(ne)){const H=b.find(A=>ne.includes(A.token)||A.token===B);if(H)throw new RangeError(`The format string mustn't contain \`${H.fullToken}\` and \`${I}\` at the same time`)}else if($.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${I}\` and any other token at the same time`);b.push({token:B,fullToken:I});const oe=$.run(e,I,o.match,u);if(!oe)return Pe(r,NaN);m.push(oe.setter),e=oe.rest}else{if(B.match(sh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");if(I==="''"?I="'":B==="'"&&(I=oh(I)),e.indexOf(I)===0)e=e.slice(I.length);else return Pe(r,NaN)}}if(e.length>0&&nh.test(e))return Pe(r,NaN);const x=m.map(I=>I.priority).sort((I,B)=>B-I).filter((I,B,$)=>$.indexOf(I)===B).map(I=>m.filter(B=>B.priority===I).sort((B,$)=>$.subPriority-B.subPriority)).map(I=>I[0]);let l=pe(r);if(isNaN(l.getTime()))return Pe(r,NaN);const f={};for(const I of x){if(!I.validate(l,u))return Pe(r,NaN);const B=I.set(l,f,u);Array.isArray(B)?(l=B[0],Object.assign(f,B[1])):l=B}return Pe(r,l)}function oh(e){return e.match(th)[1].replace(rh,"'")}function ih(e){return jo(e,Date.now())}function ah(e,t){return Ut(e,-t)}function ch(e,t){let r=t-Nn(e);return r<=0&&(r+=7),Ut(e,r)}function uh(e,t){const n=hh(e);let s;if(n.date){const u=ph(n.date,2);s=mh(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=gh(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(c=bh(n.timezone),isNaN(c))return new Date(NaN)}else{const u=new Date(o+i),m=new Date(0);return m.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),m.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),m}return new Date(o+i+c)}const Ur={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},lh=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,fh=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,dh=/^([+-])(\d{2})(?::?(\d{2}))?$/;function hh(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 ph(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 mh(e,t){if(t===null)return new Date(NaN);const r=e.match(lh);if(!r)return new Date(NaN);const n=!!r[4],s=kr(r[1]),o=kr(r[2])-1,i=kr(r[3]),c=kr(r[4]),u=kr(r[5])-1;if(n)return Sh(t,c,u)?yh(t,c,u):new Date(NaN);{const m=new Date(0);return!xh(t,o,i)||!wh(t,s)?new Date(NaN):(m.setUTCFullYear(t,o,Math.max(s,i)),m)}}function kr(e){return e?parseInt(e):1}function gh(e){const t=e.match(fh);if(!t)return NaN;const r=Mn(t[1]),n=Mn(t[2]),s=Mn(t[3]);return Ph(r,n,s)?r*Dn+n*On+s*1e3:NaN}function Mn(e){return e&&parseFloat(e.replace(",","."))||0}function bh(e){if(e==="Z")return 0;const t=e.match(dh);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return Th(n,s)?r*(n*Dn+s*On):NaN}function yh(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 vh=[31,null,31,30,31,30,31,31,30,31,30,31];function Bo(e){return e%400===0||e%4===0&&e%100!==0}function xh(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(vh[t]||(Bo(e)?29:28))}function wh(e,t){return t>=1&&t<=(Bo(e)?366:365)}function Sh(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 Th(e,t){return t>=0&&t<=59}function Eh(e,t){const r=pe(e),n=r.getFullYear(),s=r.getDate(),o=Pe(e,0);o.setFullYear(n,t,15),o.setHours(0,0,0,0);const i=$o(o);return r.setMonth(t,Math.min(s,i)),r}function kh(e,t){const r=pe(e);return isNaN(+r)?Pe(e,NaN):(r.setFullYear(t),r)}function Rn(e,t){return pt(e,-t)}function Ln(e,t){return Pr(e,-t)}function Ch(){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(m=>m.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(m=>m.trim()).includes(n[i]))return!0}else if(n[i]===c)return!0}return!1}function Uo(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?Uo(e.parentElement,t,r,n):e}function qo(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 Bp(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 Ye=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(Ye||{});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=de("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=de("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=de("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=de("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"})}),ze=({icon:e,size:t=Ye.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=de({"bsc:h-[24px] bsc:w-[24px]":t===Ye.Regular,"bsc:h-[20px] bsc:w-[20px]":t===Ye.Small},n);return y.jsx("div",{onClick:r,children:y.jsx(o,{className:i})})},Et=({template:e,props:t,children:r})=>e(t,r);function Yh(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 Hh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function Ko(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Hh,{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 Ko(t.queries)}}function Vh(e){const t=ur.useRef(e),[r,n]=ur.useReducer(Wh,e,Ko);ur.useEffect(()=>{Yh(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function s(){return n({type:"updateMatches"})}function o(u){const m=s;return typeof u.addListener<"u"?u.addListener(m):u.addEventListener("change",m),m}ur.useEffect(()=>{const u=Object.values(r.mediaQueries),m=u.map(o);function d(b,x){typeof b.addListener<"u"?b.removeListener(m[x]):b.removeEventListener("change",m[x])}return()=>{u.forEach(d)}},[r.mediaQueries]);const{matches:i}=r,c=ur.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:c.some(Boolean),matchesAll:c.length>0&&c.every(Boolean)}}function qr(e){return Vh(Bh(e)).matchesAll}const An={};function Bh(e){return An[e]===void 0&&(An[e]={default:e}),An[e]}const Fn=({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),m=qr(r);return c&&n?n:!c&&s?s:u&&o?o:m&&i?i:(console.error("Invalid media settings"),null)};function Zo(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 Qo(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 $n(e,t){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},$n(e,t)}function qh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$n(e,t)}var zr={exports:{}},Kr={exports:{}},ye={};/** @license React v16.13.1
84
84
  * react-is.production.min.js
85
85
  *
86
86
  * Copyright (c) Facebook, Inc. and its affiliates.
87
87
  *
88
88
  * This source code is licensed under the MIT license found in the
89
89
  * LICENSE file in the root directory of this source tree.
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
90
+ */var Go;function zh(){if(Go)return ye;Go=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,m=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,p=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function L(E){if(typeof E=="object"&&E!==null){var Q=E.$$typeof;switch(Q){case t:switch(E=E.type,E){case u:case m: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 M(E){return L(E)===m}return ye.AsyncMode=u,ye.ConcurrentMode=m,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 M(E)||L(E)===u},ye.isConcurrentMode=M,ye.isContextConsumer=function(E){return L(E)===c},ye.isContextProvider=function(E){return L(E)===i},ye.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ye.isForwardRef=function(E){return L(E)===d},ye.isFragment=function(E){return L(E)===n},ye.isLazy=function(E){return L(E)===f},ye.isMemo=function(E){return L(E)===l},ye.isPortal=function(E){return L(E)===r},ye.isProfiler=function(E){return L(E)===o},ye.isStrictMode=function(E){return L(E)===s},ye.isSuspense=function(E){return L(E)===b},ye.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===m||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===T||E.$$typeof===p)},ye.typeOf=L,ye}var ve={};/** @license React v16.13.1
91
91
  * react-is.development.js
92
92
  *
93
93
  * Copyright (c) Facebook, Inc. and its affiliates.
94
94
  *
95
95
  * This source code is licensed under the MIT license found in the
96
96
  * LICENSE file in the root directory of this source tree.
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}/*
97
+ */var Xo;function Kh(){return Xo||(Xo=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,m=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,p=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function L(R){return typeof R=="string"||typeof R=="function"||R===n||R===m||R===o||R===s||R===b||R===x||typeof R=="object"&&R!==null&&(R.$$typeof===f||R.$$typeof===l||R.$$typeof===i||R.$$typeof===c||R.$$typeof===d||R.$$typeof===w||R.$$typeof===v||R.$$typeof===T||R.$$typeof===p)}function M(R){if(typeof R=="object"&&R!==null){var _e=R.$$typeof;switch(_e){case t:var Be=R.type;switch(Be){case u:case m:case n:case o:case s:case b:return Be;default:var Me=Be&&Be.$$typeof;switch(Me){case c:case d:case f:case l:case i:return Me;default:return _e}}case r:return _e}}}var E=u,Q=m,I=c,B=i,$=t,ne=d,oe=n,H=f,A=l,N=r,F=o,q=s,U=b,Y=!1;function ce(R){return Y||(Y=!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(R)||M(R)===u}function k(R){return M(R)===m}function j(R){return M(R)===c}function D(R){return M(R)===i}function C(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function z(R){return M(R)===d}function ee(R){return M(R)===n}function W(R){return M(R)===f}function K(R){return M(R)===l}function G(R){return M(R)===r}function re(R){return M(R)===o}function O(R){return M(R)===s}function ae(R){return M(R)===b}ve.AsyncMode=E,ve.ConcurrentMode=Q,ve.ContextConsumer=I,ve.ContextProvider=B,ve.Element=$,ve.ForwardRef=ne,ve.Fragment=oe,ve.Lazy=H,ve.Memo=A,ve.Portal=N,ve.Profiler=F,ve.StrictMode=q,ve.Suspense=U,ve.isAsyncMode=ce,ve.isConcurrentMode=k,ve.isContextConsumer=j,ve.isContextProvider=D,ve.isElement=C,ve.isForwardRef=z,ve.isFragment=ee,ve.isLazy=W,ve.isMemo=K,ve.isPortal=G,ve.isProfiler=re,ve.isStrictMode=O,ve.isSuspense=ae,ve.isValidElementType=L,ve.typeOf=M}()),ve}var Jo;function ei(){return Jo||(Jo=1,process.env.NODE_ENV==="production"?Kr.exports=zh():Kr.exports=Kh()),Kr.exports}/*
98
98
  object-assign
99
99
  (c) Sindre Sorhus
100
100
  @license MIT
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"})});
101
+ */var Yn,ti;function Zh(){if(ti)return Yn;ti=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 m={};return"abcdefghijklmnopqrst".split("").forEach(function(d){m[d]=d}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yn=s()?Object.assign:function(o,i){for(var c,u=n(o),m,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){m=e(c);for(var x=0;x<m.length;x++)r.call(c,m[x])&&(u[m[x]]=c[m[x]])}}return u},Yn}var Hn,ri;function Wn(){if(ri)return Hn;ri=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hn=e,Hn}var Vn,ni;function si(){return ni||(ni=1,Vn=Function.call.bind(Object.prototype.hasOwnProperty)),Vn}var Bn,oi;function Qh(){if(oi)return Bn;oi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wn(),r={},n=si();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,m){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=m?m():"";e("Failed "+c+" type: "+b.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Bn=s,Bn}var Un,ii;function Gh(){if(ii)return Un;ii=1;var e=ei(),t=Zh(),r=Wn(),n=si(),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 Un=function(c,u){var m=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function b(k){var j=k&&(m&&k[m]||k[d]);if(typeof j=="function")return j}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:T(),arrayOf:L,element:M(),elementType:E(),instanceOf:Q,node:ne(),objectOf:B,oneOf:I,oneOfType:$,shape:H,exact:A};function f(k,j){return k===j?k!==0||1/k===1/j:k!==k&&j!==j}function p(k,j){this.message=k,this.data=j&&typeof j=="object"?j:{},this.stack=""}p.prototype=Error.prototype;function w(k){if(process.env.NODE_ENV!=="production")var j={},D=0;function C(ee,W,K,G,re,O,ae){if(G=G||x,O=O||K,ae!==r){if(u){var R=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 R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var _e=G+":"+K;!j[_e]&&D<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."),j[_e]=!0,D++)}}return W[K]==null?ee?W[K]===null?new p("The "+re+" `"+O+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new p("The "+re+" `"+O+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:k(W,K,G,re,O)}var z=C.bind(null,!1);return z.isRequired=C.bind(null,!0),z}function v(k){function j(D,C,z,ee,W,K){var G=D[C],re=q(G);if(re!==k){var O=U(G);return new p("Invalid "+ee+" `"+W+"` of type "+("`"+O+"` supplied to `"+z+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return w(j)}function T(){return w(i)}function L(k){function j(D,C,z,ee,W){if(typeof k!="function")return new p("Property `"+W+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var K=D[C];if(!Array.isArray(K)){var G=q(K);return new p("Invalid "+ee+" `"+W+"` of type "+("`"+G+"` supplied to `"+z+"`, expected an array."))}for(var re=0;re<K.length;re++){var O=k(K,re,z,ee,W+"["+re+"]",r);if(O instanceof Error)return O}return null}return w(j)}function M(){function k(j,D,C,z,ee){var W=j[D];if(!c(W)){var K=q(W);return new p("Invalid "+z+" `"+ee+"` of type "+("`"+K+"` supplied to `"+C+"`, expected a single ReactElement."))}return null}return w(k)}function E(){function k(j,D,C,z,ee){var W=j[D];if(!e.isValidElementType(W)){var K=q(W);return new p("Invalid "+z+" `"+ee+"` of type "+("`"+K+"` supplied to `"+C+"`, expected a single ReactElement type."))}return null}return w(k)}function Q(k){function j(D,C,z,ee,W){if(!(D[C]instanceof k)){var K=k.name||x,G=ce(D[C]);return new p("Invalid "+ee+" `"+W+"` of type "+("`"+G+"` supplied to `"+z+"`, expected ")+("instance of `"+K+"`."))}return null}return w(j)}function I(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 j(D,C,z,ee,W){for(var K=D[C],G=0;G<k.length;G++)if(f(K,k[G]))return null;var re=JSON.stringify(k,function(ae,R){var _e=U(R);return _e==="symbol"?String(R):R});return new p("Invalid "+ee+" `"+W+"` of value `"+String(K)+"` "+("supplied to `"+z+"`, expected one of "+re+"."))}return w(j)}function B(k){function j(D,C,z,ee,W){if(typeof k!="function")return new p("Property `"+W+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var K=D[C],G=q(K);if(G!=="object")return new p("Invalid "+ee+" `"+W+"` of type "+("`"+G+"` supplied to `"+z+"`, expected an object."));for(var re in K)if(n(K,re)){var O=k(K,re,z,ee,W+"."+re,r);if(O instanceof Error)return O}return null}return w(j)}function $(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 j=0;j<k.length;j++){var D=k[j];if(typeof D!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(D)+" at index "+j+"."),i}function C(z,ee,W,K,G){for(var re=[],O=0;O<k.length;O++){var ae=k[O],R=ae(z,ee,W,K,G,r);if(R==null)return null;R.data&&n(R.data,"expectedType")&&re.push(R.data.expectedType)}var _e=re.length>0?", expected one of type ["+re.join(", ")+"]":"";return new p("Invalid "+K+" `"+G+"` supplied to "+("`"+W+"`"+_e+"."))}return w(C)}function ne(){function k(j,D,C,z,ee){return N(j[D])?null:new p("Invalid "+z+" `"+ee+"` supplied to "+("`"+C+"`, expected a ReactNode."))}return w(k)}function oe(k,j,D,C,z){return new p((k||"React class")+": "+j+" type `"+D+"."+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function H(k){function j(D,C,z,ee,W){var K=D[C],G=q(K);if(G!=="object")return new p("Invalid "+ee+" `"+W+"` of type `"+G+"` "+("supplied to `"+z+"`, expected `object`."));for(var re in k){var O=k[re];if(typeof O!="function")return oe(z,ee,W,re,U(O));var ae=O(K,re,z,ee,W+"."+re,r);if(ae)return ae}return null}return w(j)}function A(k){function j(D,C,z,ee,W){var K=D[C],G=q(K);if(G!=="object")return new p("Invalid "+ee+" `"+W+"` of type `"+G+"` "+("supplied to `"+z+"`, expected `object`."));var re=t({},D[C],k);for(var O in re){var ae=k[O];if(n(k,O)&&typeof ae!="function")return oe(z,ee,W,O,U(ae));if(!ae)return new p("Invalid "+ee+" `"+W+"` key `"+O+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(D[C],null," ")+`
102
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var R=ae(K,O,z,ee,W+"."+O,r);if(R)return R}return null}return w(j)}function N(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(N);if(k===null||c(k))return!0;var j=b(k);if(j){var D=j.call(k),C;if(j!==k.entries){for(;!(C=D.next()).done;)if(!N(C.value))return!1}else for(;!(C=D.next()).done;){var z=C.value;if(z&&!N(z[1]))return!1}}else return!1;return!0;default:return!1}}function F(k,j){return k==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function q(k){var j=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":F(j,k)?"symbol":j}function U(k){if(typeof k>"u"||k===null)return""+k;var j=q(k);if(j==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return j}function Y(k){var j=U(k);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function ce(k){return!k.constructor||!k.constructor.name?x:k.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Un}var qn,ai;function Xh(){if(ai)return qn;ai=1;var e=Wn();function t(){}function r(){}return r.resetWarningCache=t,qn=function(){function n(i,c,u,m,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},qn}var ci;function Jh(){if(ci)return zr.exports;if(ci=1,process.env.NODE_ENV!=="production"){var e=ei(),t=!0;zr.exports=Gh()(e.isElement,t)}else zr.exports=Xh()();return zr.exports}var ep=Jh();const le=tn(ep),ui={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 li=h.createContext(null);var rp=function(t){return t.scrollTop},Cr="unmounted",kt="exited",Ct="entering",zt="entered",zn="exiting",ft=function(e){qh(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=kt,o.appearStatus=Ct):u=zt:n.unmountOnExit||n.mountOnEnter?u=Cr:u=kt,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===Cr?{status:kt}: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!==Ct&&i!==zt&&(o=Ct):(i===Ct||i===zt)&&(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===Ct){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:cr.findDOMNode(this);i&&rp(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===kt&&this.setState({status:Cr})},r.performEnter=function(s){var o=this,i=this.props.enter,c=this.context?this.context.isMounting:s,u=this.props.nodeRef?[c]:[cr.findDOMNode(this),c],m=u[0],d=u[1],b=this.getTimeouts(),x=c?b.appear:b.enter;if(!s&&!i||ui.disabled){this.safeSetState({status:zt},function(){o.props.onEntered(m)});return}this.props.onEnter(m,d),this.safeSetState({status:Ct},function(){o.props.onEntering(m,d),o.onTransitionEnd(x,function(){o.safeSetState({status:zt},function(){o.props.onEntered(m,d)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),c=this.props.nodeRef?void 0:cr.findDOMNode(this);if(!o||ui.disabled){this.safeSetState({status:kt},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:kt},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:cr.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],m=u[0],d=u[1];this.props.addEndListener(m,d)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Cr)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(li.Provider,{value:null},typeof i=="function"?i(s,c):h.cloneElement(h.Children.only(i),c))},t}(h.Component);ft.contextType=li,ft.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(){}ft.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},ft.UNMOUNTED=Cr,ft.EXITED=kt,ft.ENTERING=Ct,ft.ENTERED=zt,ft.EXITING=zn;const fi=({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:m,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(ft,{in:e,timeout:t,onEntering:c,onEntered:u,onExit:m,onExited:d,unmountOnExit:i,children:f=>b({state:f,defaultStyle:x,transitionStyles:l})})};function di(e){return e.target?e.target:e}const hi=({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:m,isClickedWithin:d,children:b})=>{const[x,l]=h.useState(-1),[f,p]=h.useState(-1),[w,v]=h.useState(e),T=h.useRef(100),L=h.useRef(101),M=h.useRef(),E=h.useRef(),Q=h.useRef();h.useEffect(()=>{t&&(M.current=di(t));const A=qo("zIndex",N=>N==="auto"||N==="-1"?!1:parseInt(N)>100).map(N=>parseInt(N,10));A.length>0&&(T.current=Math.max(...A)+1,L.current=Math.max(...A)+2),v(e)},[e,t]);const I=A=>{E.current=A},B=()=>{p(T.current),l(L.current)},$=()=>{if(!E.current)return;u==null||u();let A;M.current&&(A=[M.current]);const N=F=>{F?d==null||d():v(!1)};Q.current=Zo(E.current,N,A)},ne=()=>{Q.current&&Qo(Q.current)},oe=()=>{p(-1),l(-1),m==null||m()},H={entering:{opacity:.5},entered:{opacity:.5}};return cr.createPortal(y.jsx(fi,{start:w,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:B,onEntered:$,onExit:ne,onExited:oe,unmountOnExit:n,children:({state:A,defaultStyle:N,transitionStyles:F})=>y.jsxs("div",{ref:q=>q&&I(q),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,...F[A],...H[A]}}),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,...N,...F[A]},children:[y.jsx("div",{className:"bsc:w-full",children:b}),y.jsx(y.Fragment,{children:y.jsx(Xe,{buttonType:"primary",fullWidth:!0,onClick:()=>v(!1),className:"bsc:text-xs bsc:font-bold",children:c})})]})]})}),r)};var pi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(pi||{}),mi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(mi||{});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 gi=({visible:e,target:t,targetPosition:r=pi.BottomLeft,elementAlignment:n=mi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:c=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:m=!1,transitionDuration:d=400,showTransitionOptions:b="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:l,hidden:f,isClickedWithin:p,markupCreated:w,children:v})=>{const[T,L]=h.useState(-1),[M,E]=h.useState(e),[Q,I]=h.useState(!1),B=h.useRef(!1),$=h.useRef(100),ne=h.useRef({left:0,top:0,width:0}),oe=h.useRef(),H=h.useRef(),A=h.useRef(),N=h.useRef(),F=h.useRef(),q=h.useRef(),U=us();h.useEffect(()=>(u===!0&&(q.current=new ResizeObserver(Y)),()=>{var W,K;u===!0&&(H.current&&((W=q.current)==null||W.unobserve(H.current)),(K=q.current)==null||K.disconnect())}),[]),h.useEffect(()=>{if(t&&(oe.current=di(t),i)){const W=U==null?void 0:U.isValidScrollableElement;A.current=Uo(oe.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,W),A.current.tagName.toLowerCase()==="html"&&(A.current=document)}if(c){const W=qo("zIndex",K=>parseInt(K)>=100).map(K=>parseInt(K));W.length>0&&($.current=Math.max(...W)+1)}e!==void 0&&E(e)},[t,e,i,c]);const Y=W=>{if(H.current){const K=ke.getScreenDimensions(),G=W[W.length-1].target,re=G.getBoundingClientRect(),O=ke.determineOffScreenLocation(re);if(O){if(oe.current&&ke.canPositionElementOnScreenWithTarget(G,oe.current)){const ae=ke.positionElementToTargetOnScreen(H.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);ce()}}},ce=wr(()=>{B.current=!B.current,I(B.current)},20),k=()=>{L($.current)},j=()=>{if(!H.current)return;l==null||l();let W;!s&&oe.current&&(W=[oe.current]);const K=G=>{G?p==null||p():E(!1)};N.current=Zo(H.current,K,W),i&&(F.current=df(G=>H.current&&Dh(G,H.current)&&E(!1),100,{leading:!0}),A.current&&A.current.addEventListener("scroll",F.current))},D=()=>{A.current&&F.current&&(A.current.removeEventListener("scroll",F.current),F.current=void 0),N.current&&Qo(N.current)},C=()=>{L(-1),f==null||f()},z=W=>{var K,G;if(u===!0&&H.current&&((K=q.current)==null||K.unobserve(H.current)),H.current=W,w==null||w(W),oe.current){const re=ke.positionElementToTarget(H.current,oe.current,n,r);ne.current={...re,width:oe.current.offsetWidth},u===!0&&(ke.canPositionElementOnScreenWithTarget(H.current,oe.current)||ke.canPositionElementOnScreen(H.current))&&((G=q.current)==null||G.observe(H.current))}},ee=h.useMemo(()=>{const W={top:`${ne.current.top}px`,left:`${ne.current.left}px`,zIndex:T};return o&&(W.width=`${ne.current.width}px`),W},[Q,T,o]);return y.jsx(fi,{start:M,timeout:d,showTransitionOptions:b,hideTransitionOptions:x,onEntering:k,onEntered:j,onExit:D,onExited:C,unmountOnExit:m,children:({state:W,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[W]},ref:re=>re&&z(re),children:v})})};let Zr;const np=new Uint8Array(16);function sp(){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(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 bi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ip(e,t,r){if(bi.randomUUID&&!e)return bi.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 Or{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){P(this,"instanceCollection");P(this,"formatPartList");P(this,"inputSlotCollection");P(this,"currentPartIndex",0);P(this,"currentPartIndices",[]);P(this,"currentCursorPosition",0);P(this,"highlightCursorPosition",0);P(this,"currentCursorStartPosition",-1);P(this,"currentCursorEndPosition",-1);P(this,"inputElement");P(this,"inputSelection",null);P(this,"inputRange");P(this,"textNode");this.instanceCollection=Zt.getInstance(),this.formatPartList=Or.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 m=document.createRange();return m.selectNodeContents(u),m.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){P(this,"inputSlots");this.inputSlots=cp.create(Or.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}}P(Zt,"instance");class lp{constructor(){P(this,"navigatorInstances");P(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 Kn{constructor(t,r){P(this,"instanceCollection");P(this,"formatPartList");P(this,"inputSlotCollection");P(this,"inputElement");this.instanceCollection=Zt.getInstance(),this.formatPartList=Or.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 rt=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(rt||{});class yi{constructor(){P(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);P(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);P(this,"editingKeys",["Backspace","Delete"]);P(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){P(this,"_currentIndex",0);P(this,"index",0);P(this,"formatParts");this.formatParts=Or.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){P(this,"formatParts");this.formatParts=Or.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 vi{constructor(t,r){P(this,"instanceCollection");P(this,"inputSlotCollection");P(this,"formatNavigator");P(this,"keyTypeChecker");P(this,"formatRenderer");P(this,"formatPartList");P(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 yi,this.formatRenderer=new Kn(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 m=c-r>u.characterCount?r+u.characterCount:c;u.partText=t.substring(r,m),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),m=i+u+c;let d=0;for(let b=0,x=s.length;b<x;b++){const l=s[b];l.partText=m.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===rt.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,c=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,m=parseInt(this.createNewValue(r,n));if(i&&m>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===rt.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){P(this,"instanceCollection");P(this,"formatNavigator");P(this,"ruleProcessor");P(this,"keyTypeChecker");P(this,"formatRenderer");this.format=t,this.instanceCollection=Zt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new vi(t,r),this.keyTypeChecker=new yi,this.formatRenderer=new Kn(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=""){P(this,"instanceId");P(this,"instanceCollection");P(this,"keyProcessor");P(this,"formatNavigator");P(this,"formatRenderer");P(this,"inputSlotCollection");P(this,"inputRuleProcessor");P(this,"previousOutputValue","");P(this,"inputElementSet",!1);P(this,"isInputFocused",!1);P(this,"inputElement");P(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 Kn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new vi(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:m,leftElementClassName:d,rightElementClassName:b,isSingleLine:x=!1,allowSingleLineScroll:l=!1,isInputValid:f,onChange:p,onFocus:w,onBlur:v,onElementCreate:T,onLeftElementClick:L,onRightElementClick:M}=e,[E,Q]=h.useState(!0),I=h.useRef(),B=h.useRef(),$=h.useRef(),ne=h.useRef(!1);h.useEffect(()=>(document.addEventListener("mouseup",q),()=>{var D;(D=$.current)==null||D.dispose(),document.removeEventListener("mouseup",q)}),[]),h.useEffect(()=>{var D;(D=$.current)==null||D.inputValuePassed(r)},[r]),h.useEffect(()=>{var D,C,z;(D=$.current)==null||D.dispose(),n&&($.current=new pp(n,r),B.current&&((C=$.current)==null||C.inputElementCreated(B.current)),(z=$.current)==null||z.registerFormatChangeEvent(oe))},[n]);const oe=h.useCallback(D=>{f?f(D)?(Q(!0),p==null||p(D)):Q(!1):p==null||p(D)},[p]),H=h.useCallback(D=>{var C;(C=$.current)==null||C.inputFocused(),w==null||w(D)},[w]),A=h.useCallback(D=>{var C;(C=$.current)==null||C.inputBlurred(),v==null||v(D)},[v]),N=h.useCallback(()=>{ne.current=!0},[]),F=h.useCallback(()=>{var D;if(ne.current)ne.current=!1,(D=$.current)==null||D.mouseUpHandler();else{const C=new MouseEvent("mouseup");document.dispatchEvent(C)}},[]),q=h.useCallback(()=>{var D;ne.current&&(ne.current=!1,(D=$.current)==null||D.mouseUpHandler())},[]),U=h.useCallback(D=>{var C;(C=$.current)==null||C.keyDownHandler(D)},[]),Y=h.useCallback(D=>{var z,ee;D.preventDefault(),D.stopPropagation();const C=(z=D.clipboardData)==null?void 0:z.getData("text/plain");C&&((ee=$.current)==null||ee.pastedValue(C))},[]),ce=h.useCallback(D=>{var C,z,ee,W,K,G,re,O,ae,R,_e,Be,Me,He,nt,Ze,Ve;(z=(C=I.current)==null?void 0:C.inputElement)==null||z.removeEventListener("keydown",U),(W=(ee=I.current)==null?void 0:ee.inputElement)==null||W.removeEventListener("mousedown",N),(G=(K=I.current)==null?void 0:K.inputElement)==null||G.removeEventListener("mouseup",F),(O=(re=I.current)==null?void 0:re.inputElement)==null||O.removeEventListener("paste",Y),I.current=D,(R=(ae=I.current)==null?void 0:ae.inputElement)==null||R.addEventListener("keydown",U),(Be=(_e=I.current)==null?void 0:_e.inputElement)==null||Be.addEventListener("mousedown",N),(He=(Me=I.current)==null?void 0:Me.inputElement)==null||He.addEventListener("mouseup",F),(Ze=(nt=I.current)==null?void 0:nt.inputElement)==null||Ze.addEventListener("paste",Y),B.current=(Ve=I.current)==null?void 0:Ve.inputElement},[]),k=h.useCallback(()=>{var D;(D=I.current)==null||D.focus()},[]);h.useImperativeHandle(t,()=>({focus:k}));const j=de(m,{"bsc:border-error!":!E});return y.jsx(Vr,{ref:D=>D&&ce(D),readOnly:s,debounceTime:o,fillContainer:i,leftElement:c,rightElement:u,className:j,leftElementClassName:d,rightElementClassName:b,isSingleLine:x,allowSingleLineScroll:l,onFocus:H,onBlur:A,onElementCreate:T,onLeftElementClick:L,onRightElementClick:M})},xi=h.forwardRef(mp),Zn=h.createContext(void 0);function wi(e,t,r=!0){var x,l;const n=$o(e),s=Io(e),o=ld(e);let i=Nn(s)-(((x=t.options)==null?void 0:x.weekStartsOn)||0);i=i===-1?6:i;const c=Nn(o)-(((l=t.options)==null?void 0:l.weekStartsOn)||0),u=vf({start:s,end:o}),m=n+i>35?6:5,d=Si(m,7,{dayValue:null,isCurrent:!0});let b=1;for(let f=0,p=m;f<p;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=ah(s,i-f),d[0][f].isCurrent=!1;if(c>-1&&r)for(let f=6;f>c;f--)d[m-1][f].dayValue=Ut(o,f-c),d[m-1][f].isCurrent=!1;return d}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 m=gp(r)?r:{...r};i.push(m)}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=ch(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:pt(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=xf({start:r,end:Pr(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 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()}function Dr(e,t){const r=uh(e);if(isNaN(r.valueOf())){let n=tt(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=tt(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=tt(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function Qn(e,t){const r=e.split("-");if(r.length!==2)return;const n=Dr(r[0].trim(),t);if(!n)return;const s=Dr(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||{}),Ie=(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))(Ie||{}),Qt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Qt||{}),_r=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(_r||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),gt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(gt||{}),Qr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(Qr||{}),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 Sp=(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:Ie.DaySelector}}};function Pp(e){return e?Array.isArray(e)?e[0]:e:new Date}const Gn=(e,t,r)=>{const n=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:pt(t,u)})},[t]),s=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Rn(t,u)})},[t]),o=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Pr(t,u)})},[t]),i=h.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Ln(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}},Gr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=gt.Normal,locale:o,onDateSelected:i,selectableDate:c,isValidDate:u,dispatcher:m})=>{var N;const[d,b]=h.useState(!1),[x,l]=h.useState(),[f,p]=h.useState(),[w,v]=h.useState(),[T,L]=h.useState(),M=h.useRef(),E=h.useRef(),Q=h.useContext(Zn),I=h.useMemo(()=>Q.calendarTemplate,[Q.calendarTemplate]);h.useEffect(()=>{M.current=o,E.current=bp(M.current),b(!0)},[]),h.useEffect(()=>{e&&M.current&&v(wi(e,M.current,s===gt.Normal))},[e,d]),h.useEffect(()=>{L(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),p(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),h.useEffect(()=>{M.current&&o&&(M.current=o,v(wi(e,M.current,s===gt.Normal)))},[o]);const B=F=>{if(s===gt.Normal)m==null||m({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||fd(F,r)?i(F):r&&!n?i(F,{setEndDate:!0}):r&&n&&i(F)}},$=F=>(T==null?void 0:T.toLocaleDateString())===F.toLocaleDateString(),ne=F=>{if(x&&f){const q=F.getTime();return q>=x&&q<=f}return!1},oe=Gn({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:E.current,monthMatrix:w,selectableDate:c,isValidDate:u,onDateClicked:B,isSelectedDate:$,isInSelectedDateRange:ne},e,m),A=I||((F,q)=>y.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:q}));return y.jsx(Et,{props:oe,template:A,children:y.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[(N=E.current)==null?void 0:N.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((U,Y)=>{var j,D;const ce=U.dayValue!==null&&(c===void 0||c(U.dayValue)),k=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":!U.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":U&&U.dayValue&&(T&&$(U.dayValue)||x&&!f&&jo(x,U.dayValue)||x&&f&&ne(U.dayValue)),"bsc:cursor-pointer":ce,"bsc:text-error bsc:cursor-not-allowed":!ce,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":U.dayValue&&ih(U.dayValue)&&!($(U.dayValue)||ne(U.dayValue))},"bc-dt-date-cell");return y.jsx("div",{className:k,onClick:()=>U&&U.dayValue&&ce&&(u===void 0||u(U.dayValue))&&B(U.dayValue),children:(D=U.dayValue)==null?void 0:D.getDate().toLocaleString((j=M.current)==null?void 0:j.code)},q.toString()+Y.toString())}))]})})},Xr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=h.useContext(Zn).dateScrollerTemplate,m=Gn({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(Et,{props:m,template:x,children:[y.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:y.jsx(Xe,{className:d,onClick:n,children:y.jsx(ze,{icon:"chevronLeft",size:Ye.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(Xe,{className:d,onClick:s,children:y.jsx(ze,{icon:"chevronRight",size:Ye.Regular})})})]})},Tp=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:c})=>{const u=()=>{t&&c({type:fe.SetViewDate,viewDate:Rn(t,1)})},m=()=>{t&&c({type:fe.SetViewDate,viewDate:pt(t,1)})},d=()=>{c({type:fe.SetDateSelector,dateSelector:Ie.MonthSelector})},b=()=>{c({type:fe.SetDateSelector,dateSelector:Ie.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(Xr,{title:x(),scrollerType:Qt.Day,onTitleClicked:d,onMovePrevious:u,onMoveNext:m,viewDate:t,dispatcher:c}),y.jsx(Gr,{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)})})]})},Ep=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const s=h.useRef(yp(t)),o=()=>{const d=Ln(e,1);n({type:fe.SetViewDate,viewDate:d})},i=()=>{const d=Pr(e,1);n({type:fe.SetViewDate,viewDate:d})},c=d=>{n({type:fe.SetDateSelector,dateSelector:r!==we.DateRange?Ie.DaySelector:Ie.DateRangeSelector,viewDate:Eh(e,d)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),m=()=>{n({type:fe.SetDateSelector,dateSelector:Ie.YearSelector})};return y.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[y.jsx(Xr,{title:u(),scrollerType:Qt.Month,onTitleClicked:m,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())))})]})},kp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=qr("screen and (max-device-width: 40rem)"),c=pt(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]))},m=()=>{o({type:fe.SetDateSelector,dateSelector:Ie.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:Rn(e,1)})},x=()=>{e&&o({type:fe.SetViewDate,viewDate:pt(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(Xr,{title:d(),scrollerType:Qt.Range,onTitleClicked:m,onMovePrevious:b,onMoveNext:x,viewDate:e,dispatcher:o})}),y.jsx("div",{className:"bsc-flex-grow",children:y.jsx(Fn,{mobileMarkup:y.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:y.jsx(Gr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:gt.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(Gr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:gt.Range,onDateSelected:u,locale:n,dispatcher:o})}),y.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:y.jsx(Gr,{viewDate:c,selectedStartDate:t,selectedEndDate:r,selectionMode:gt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},Cp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=De.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const c=h.useRef(n===De.TwelveHour?11:23),u=h.useRef(n===De.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"]),m=h.useRef(Oh(0,59,N=>N.toString().padStart(2,"0"))),d=h.useRef(["AM","PM"]),b=h.useRef(af(e)),x=N=>N>11?N-12:N,[l,f]=h.useState(x(e.getHours())),[p,w]=h.useState(e.getMinutes()),[v,T]=h.useState(e.getHours()<=12?0:1),L=h.useRef(e.toLocaleDateString(r.code));h.useEffect(()=>{const N=e.getHours(),F=e.getMinutes();if(N!==l&&f(n===De.TwelveHour?x(N):N),F!==p&&w(F),n===De.TwelveHour){const q=N<=11?0:1;q!==v&&T(q)}},[e]);const M=()=>{var q;const N=((q=s==null?void 0:s.hours)==null?void 0:q.step)||1,F=l<c.current?l+N:0;f(F),$(F,p,v)},E=()=>{var q;const N=((q=s==null?void 0:s.hours)==null?void 0:q.step)||1,F=l>0?l-N:c.current;f(F),$(F,p,v)},Q=()=>{var q,U,Y;const N=((q=s==null?void 0:s.minutes)==null?void 0:q.step)||1,F=p+N<(((U=s==null?void 0:s.minutes)==null?void 0:U.max)||59)?p+N:((Y=s==null?void 0:s.minutes)==null?void 0:Y.min)||0;w(F),$(l,F,v)},I=()=>{var q,U,Y;const N=((q=s==null?void 0:s.minutes)==null?void 0:q.step)||1,F=p-N>=(((U=s==null?void 0:s.minutes)==null?void 0:U.min)||0)?p-N:(((Y=s==null?void 0:s.minutes)==null?void 0:Y.max)||60)-N;w(F),$(l,F,v)},B=()=>{const N=v===0?1:0;T(N),$(l,p,N)},$=(N,F,q)=>{const U=n===De.TwelveHour&&q===1?N+12:N;b.current.setHours(U,F),i({type:fe.SetSelectedDate,selectedDate:b.current,viewDate:b.current}),o==null||o(b.current)},ne=()=>{i({type:fe.SetDateSelector,dateSelector:Ie.DaySelector})},oe=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===De.TwelveHour,"bsc:grid-cols-3":n===De.TwentyFourHour}),H=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===De.TwelveHour,"bsc:col-span-3":n===De.TwentyFourHour}),A="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===De.TwelveHour?"15rem":"11rem"},children:y.jsxs("div",{className:oe,children:[t&&y.jsx("div",{className:H,onClick:ne,children:L.current}),y.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:y.jsx(Xe,{className:A,onClick:M,children:y.jsx(ze,{icon:"chevronUp",size:Ye.Regular})})}),y.jsx("div",{}),y.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:y.jsx(Xe,{className:A,onClick:Q,children:y.jsx(ze,{icon:"chevronUp",size:Ye.Regular})})}),n===De.TwelveHour&&y.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:y.jsx(Xe,{className:A,onClick:B,children:y.jsx(ze,{icon:"chevronUp",size:Ye.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:m.current[p]}),n===De.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(Xe,{className:A,onClick:E,children:y.jsx(ze,{icon:"chevronDown",size:Ye.Regular})})}),y.jsx("div",{}),y.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:y.jsx(Xe,{className:A,onClick:I,children:y.jsx(ze,{icon:"chevronDown",size:Ye.Regular})})}),n===De.TwelveHour&&y.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:y.jsx(Xe,{className:A,onClick:B,children:y.jsx(ze,{icon:"chevronDown",size:Ye.Regular})})})]})})},Op=({viewDate:e,locale:t,dispatcher:r})=>{const n=vp(e,t),s=()=>{const u=Ln(e,10);r({type:fe.SetViewDate,viewDate:u})},o=()=>{const u=Pr(e,10);r({type:fe.SetViewDate,viewDate:u})},i=u=>{const m=parseInt(u);r({type:fe.SetDateSelector,dateSelector:Ie.MonthSelector,viewDate:kh(e,m)})},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(Xr,{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,m)=>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},m.toString()+b.toString()):y.jsx("div",{},m.toString()+b.toString())))})})]})};class Dp{constructor(t,r){P(this,"dateFormat");P(this,"timeFormat");P(this,"use24HourTime");P(this,"monthPart");P(this,"dayPart");P(this,"yearPart");P(this,"twelveHourPart");P(this,"twentyFourHourPart");P(this,"minutePart");P(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,m=18,d=24,b=37,x=317;u.setHours(m,d,b,x);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?m:"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:rt.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:rt.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:rt.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:rt.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:rt.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:rt.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:rt.Text,possibleValues:["AM","PM"]}}}const _p=(e,t)=>{var o;const[r,n]=h.useState(),s=h.useRef();return h.useEffect(()=>{t&&!r&&(s.current=new Dp(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},Np=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:c,className:u,dateSelection:m=we.DateTime,dateFormat:d,timeConstraints:b,icon:x,iconPosition:l=Qr.Right,inputElement:f,selectableDate:p,isValidDate:w,onChange:v,calendarTemplate:T,dateScrollerTemplate:L,inputTemplate:M,wrapperTemplate:E})=>{const[Q,I]=h.useState(!1),[B,$]=h.useState(),[ne,oe]=h.useState(),[H,A,N]=Sa(m),F=h.useRef(),q=h.useRef(!1),U=h.useRef(c||Ch()),Y=h.useRef(),ce=h.useRef(),k=h.useRef(),j=h.useRef(null),D=h.useRef(null),[C,z]=_p(m,B),ee=jt.useDateLocale(U.current),W=h.useRef({calendarTemplate:T,dateScrollerTemplate:L});h.useEffect(()=>{$(ee.code),Y.current=ee;const J=G();ae(e||n?{type:fe.InitializeDates,initialDate:Array.isArray(J)?J[0]:J}:{type:fe.SetViewDate,viewDate:Array.isArray(J)?J[0]:J})},[ee]),h.useEffect(()=>{if(e){const J=G();ae({type:fe.InitializeDates,initialDate:J})}else ae({type:fe.ClearDates})},[e,Y.current]),h.useEffect(()=>{z&&ae({type:fe.SetTimeFormat,timeFormat:z?De.TwentyFourHour:De.TwelveHour})},[z]),h.useEffect(()=>{f&&(ce.current=f)},[f]),h.useEffect(()=>{ae({type:fe.SetDateSelector,dateSelector:K()})},[H]);const K=h.useCallback(()=>N.current===we.TimeOnly?Ie.TimeSelector:N.current===we.DateTime||N.current===we.DateOnly?Ie.DaySelector:Ie.DateRangeSelector,[]),G=()=>{const J=new Date;return J.setHours(0,0,0,0),e?typeof e=="string"?N.current!==we.DateRange?Dr(e,Y.current):Qn(e,Y.current):e:J},re={currentSelector:K(),currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[O,ae]=h.useReducer(Sp,re),R=()=>{Jt(),I(!0)},_e=h.useMemo(()=>wr(()=>{I(!1)},250),[]),Be=h.useMemo(()=>wr(()=>{_e.cancel()},5),[_e]),Me=J=>{const he=J.target.innerText;Ze(he)},He=J=>{if(J){const he=N.current!==we.DateRange?Dr(J,Y.current):Qn(J,Y.current);return he?w?Array.isArray(he)?he.every(Re=>w(Re)):w(he):!0:!1}else return!0},nt=J=>{Ze(J||"")},Ze=J=>{const he=N.current!==we.DateRange?Dr(J,Y.current):Qn(J,Y.current);he?(Array.isArray(he)?(wp(he[0],Io(O.currentViewDate),yf(pt(O.currentViewDate,1)))||ae({type:fe.SetViewDate,viewDate:he[0]}),ae({type:fe.SetSelectedDateRange,selectedStartDate:he[0],selectedEndDate:he[1]})):ae({type:fe.SetSelectedDate,selectedDate:he,viewDate:he}),v==null||v(he)):J===""&&(ae({type:fe.ClearDates}),v==null||v())},Ve=J=>{N.current===we.DateOnly&&i===!0&&I(!1),v==null||v(J)},Gt=()=>{Jt(),I(!Q),D.current?D.current.focus():j.current&&j.current.focus()},Xt=()=>{ae({type:fe.ClearDates}),I(!1),v==null||v()},Qe=(J,he)=>{(!ce.current||F.current!==he)&&(ce.current=J,F.current=he,q.current=!0)},Jt=()=>{(!k.current||q.current)&&ce.current&&(k.current=ce.current,oe(ce.current),q.current=!1)},er=()=>{I(!1),ae({type:fe.SetDateSelector,dateSelector:K()})},Ot=()=>{switch(d){case _r.Short:return"short";case _r.Medium:return"medium";case _r.Long:return"long";default:return}},st=()=>{var he,Re,it,at,bt,sr,yt,or,vt,xt,ir,ar;const J=Ot();switch(N.current){case we.DateTime:return O.selectedDate?J?O.selectedDate.toLocaleString((he=Y.current)==null?void 0:he.code,{dateStyle:J,timeStyle:J}):O.selectedDate.toLocaleString((Re=Y.current)==null?void 0:Re.code):"";case we.DateOnly:return O.selectedDate?J?O.selectedDate.toLocaleDateString((it=Y.current)==null?void 0:it.code,{dateStyle:J}):O.selectedDate.toLocaleDateString((at=Y.current)==null?void 0:at.code):"";case we.TimeOnly:return O.selectedDate?J?O.selectedDate.toLocaleTimeString((bt=Y.current)==null?void 0:bt.code,{timeStyle:J,hour12:O.timeFormat===De.TwelveHour,hourCycle:O.timeFormat===De.TwentyFourHour?"h23":void 0}):O.selectedDate.toLocaleTimeString((sr=Y.current)==null?void 0:sr.code,{hour12:O.timeFormat===De.TwelveHour,hourCycle:O.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return O.selectedStartDate&&O.selectedEndDate?J?`${O.selectedStartDate.toLocaleDateString((yt=Y.current)==null?void 0:yt.code,{dateStyle:J})} - ${O.selectedEndDate.toLocaleDateString((or=Y.current)==null?void 0:or.code,{dateStyle:J})}`:`${O.selectedStartDate.toLocaleDateString((vt=Y.current)==null?void 0:vt.code)} - ${O.selectedEndDate.toLocaleDateString((xt=Y.current)==null?void 0:xt.code)}`:"";default:return O.selectedDate?J?O.selectedDate.toLocaleString((ir=Y.current)==null?void 0:ir.code,{dateStyle:J,timeStyle:J}):O.selectedDate.toLocaleString((ar=Y.current)==null?void 0:ar.code):""}},ot=H===we.DateTime||H===we.DateOnly||H===we.DateRange,Nr=H===we.DateTime||H===we.TimeOnly,Ge=l===Qr.None?{}:l===Qr.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(ze,{icon:"close",size:Ye.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(ze,{icon:"calendar",size:Ye.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(ze,{icon:"calendar",size:Ye.Small,className:t?void 0:"bsc:cursor-pointer"})}),o&&!t&&y.jsx("div",{children:y.jsx(ze,{icon:"close",size:Ye.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Xt})})]}),leftElementClassName:"bsc:justify-center"},Dt={setDateSelector:J=>A(J)},jr=E||((J,he)=>y.jsx(y.Fragment,{children:he})),tr=()=>y.jsx(Et,{props:Dt,template:jr,children:y.jsxs(y.Fragment,{children:[O.currentSelector===Ie.DaySelector&&ot&&O.dateInitialized&&Y.current&&y.jsx(Tp,{selectedDate:O.selectedDate,viewDate:O.currentViewDate,locale:Y.current,showTimeSelector:N.current===we.DateTime,selectableDate:p,isValidDate:w,dispatcher:ae,onChange:Ve}),O.currentSelector===Ie.MonthSelector&&ot&&O.dateInitialized&&Y.current&&y.jsx(Ep,{viewDate:O.currentViewDate,locale:Y.current,dateSelection:N.current,dispatcher:ae}),O.currentSelector===Ie.YearSelector&&ot&&O.dateInitialized&&Y.current&&y.jsx(Op,{viewDate:O.currentViewDate,locale:Y.current,dispatcher:ae}),O.currentSelector===Ie.TimeSelector&&Nr&&O.dateInitialized&&Y.current&&y.jsx(Cp,{viewDate:O.currentViewDate,showDateSelector:N.current===we.DateTime,locale:Y.current,timeFormat:O.timeFormat,timeConstraints:b,onChange:v,dispatcher:ae}),O.currentSelector===Ie.DateRangeSelector&&ot&&O.dateInitialized&&Y.current&&y.jsx(kp,{viewDate:O.currentViewDate,selectedStartDate:O.selectedStartDate,selectedEndDate:O.selectedEndDate,locale:Y.current,onChange:v,dispatcher:ae})]})}),rr=Gn({label:r,readOnly:t,allowClear:o,getValue:st,onFocus:R,onInput:Me,iconPosition:l,iconElement:Ge.rightElement||Ge.leftElement},O.currentViewDate,ae),nr=M||((J,he)=>y.jsx(y.Fragment,{children:he})),_t=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 y.jsx(Zn.Provider,{value:W.current,children:y.jsxs("div",{className:"bc-date-time",children:[r&&y.jsx(ct,{label:r,readOnly:t,className:"bc-dt-label"}),y.jsx(Fn,{mobileMarkup:y.jsxs(y.Fragment,{children:[y.jsx(Et,{props:rr,template:nr,children:y.jsx(Vr,{ref:j,value:st(),readOnly:t,inputMode:"none",className:_t,onFocus:R,onElementCreate:J=>Qe(J,!1),...Ge})}),y.jsx(hi,{visible:Q,target:ne,hidden:er,unmountWhenHidden:!0,children:tr()})]}),aboveMobileMarkup:y.jsxs(y.Fragment,{children:[y.jsx(Et,{props:rr,template:nr,children:s===!1?y.jsx(Vr,{ref:j,value:st(),readOnly:t,className:_t,onFocus:R,onBlur:_e,onInput:Me,onElementCreate:J=>Qe(J,!1),...Ge}):y.jsx(xi,{ref:D,value:st(),readOnly:t,className:_t,format:C,isInputValid:He,onFocus:R,onBlur:_e,onChange:nt,onElementCreate:J=>Qe(J,!0),...Ge})}),y.jsx(gi,{visible:Q,target:ne,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:er,isClickedWithin:Be,unmountWhenHidden:!0,children:tr()})]})})]})})};var Xn,Pi;function jp(){if(Pi)return Xn;Pi=1;function e(l,f){var p,w;if(typeof f=="function")w=f(l),w!==void 0&&(l=w);else if(Array.isArray(f))for(p=0;p<f.length;p++)w=f[p](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 p=l.split(f),w=p.filter(c);if(w.length!==p.length)throw Error("Refusing to update blacklisted property "+l);return p}var m=Object.prototype.hasOwnProperty;function d(l,f,p,w){if(!(this instanceof d))return new d(l,f,p,w);typeof f>"u"&&(f=!1),typeof p>"u"&&(p=!0),typeof w>"u"&&(w=!0),this.separator=l||".",this.override=f,this.useArray=p,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,p,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(p)&&o(p)))throw new Error("Trying to redefine `"+v+"` which is a "+typeof f[v]);return}this._fill(l,f[v],p,w)}else{if(!this.override&&s(f[v])&&!o(f[v])){if(!(s(p)&&o(p)))throw new Error("Trying to redefine non-empty obj['"+v+"']");return}f[v]=e(p,w)}},d.prototype.object=function(l,f){var p=this;return Object.keys(l).forEach(function(w){var v=f===void 0?null:f[w],T=u(w,p.separator).join(p.separator);T.indexOf(p.separator)!==-1?(p._fill(T.split(p.separator),l,l[w],v),delete l[w]):l[w]=e(l[w],v)}),l},d.prototype.str=function(l,f,p,w){var v=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(v.split(this.separator),p,f,w):p[l]=e(f,w),p},d.prototype.pick=function(l,f,p,w){var v,T,L,M,E;for(T=u(l,this.separator),v=0;v<T.length;v++)if(M=t(T[v],f),f&&typeof f=="object"&&M in f){if(v===T.length-1)return p?(L=f[M],w&&Array.isArray(f)?f.splice(M,1):delete f[M],Array.isArray(f)&&(E=T.slice(0,-1).join("."),this.cleanup.indexOf(E)===-1&&this.cleanup.push(E)),L):f[M];f=f[M]}else return;return p&&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,p){var w;if(this.cleanup=[],Array.isArray(l)){for(w=0;w<l.length;w++)this.pick(l[w],f,!0,p);return p||this._cleanup(f),f}else return this.pick(l,f,!0,p)},d.prototype._cleanup=function(l){var f,p,w,v;if(this.cleanup.length){for(p=0;p<this.cleanup.length;p++)w=this.cleanup[p].split("."),v=w.splice(0,-1).join("."),f=v?this.pick(v,l):l,f=f[w[0]].filter(function(T){return T!==void 0}),this.set(this.cleanup[p],f,l);this.cleanup=[]}},d.prototype.del=d.prototype.remove,d.prototype.move=function(l,f,p,w,v){return typeof w=="function"||Array.isArray(w)?this.set(f,e(this.pick(l,p,!0),w),p,v):(v=w,this.set(f,this.pick(l,p,!0),p,v)),p},d.prototype.transfer=function(l,f,p,w,v,T){return typeof v=="function"||Array.isArray(v)?this.set(f,e(this.pick(l,p,!0),v),w,T):(T=v,this.set(f,this.pick(l,p,!0),w,T)),w},d.prototype.copy=function(l,f,p,w,v,T){return typeof v=="function"||Array.isArray(v)?this.set(f,e(JSON.parse(JSON.stringify(this.pick(l,p,!1))),v),w,T):(T=v,this.set(f,this.pick(l,p,!1),w,T)),w},d.prototype.set=function(l,f,p,w){var v,T,L,M;if(typeof f>"u")return p;for(L=u(l,this.separator),v=0;v<L.length;v++){if(M=L[v],v===L.length-1)if(w&&n(f)&&n(p[M]))for(T in f)m.call(f,T)&&(p[M][T]=f[T]);else if(w&&Array.isArray(p[M])&&Array.isArray(f))for(var E=0;E<f.length;E++)p[L[v]].push(f[E]);else p[M]=f;else(!m.call(p,M)||!n(p[M])&&!Array.isArray(p[M]))&&(/^\d+$/.test(L[v+1])?p[M]=[]:p[M]={});p=p[M]}return p},d.prototype.transform=function(l,f,p){return f=f||{},p=p||{},Object.keys(l).forEach((function(w){this.set(l[w],this.pick(w,f),p)}).bind(this)),p},d.prototype.dot=function(l,f,p){f=f||{},p=p||[];var w=Array.isArray(l);return Object.keys(l).forEach((function(v){var T=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 L=p[p.length-1]||"";return this.dot(l[v],f,p.slice(0,-1).concat(L+T))}else return this.dot(l[v],f,p.concat(T));else w&&this.useBrackets?f[p.join(this.separator).concat("["+v+"]")]=l[v]:f[p.concat(T).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,Xn=d,Xn}var Ip=jp();const Ti=tn(Ip),Mp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=Ae.Horizontal,isMultiSelect:u=!1,className:m,onChange:d,itemTemplate:b})=>{const[x,l]=h.useState(),[f,p]=h.useState([]),w=bn(()=>n,[n]),v=h.useId();h.useEffect(()=>{if(u){const H=Array.isArray(r)?r.map(A=>A.toString()):r?[String(r)]:void 0;p(H??[])}else r&&l(r.toString())},[r]);const T=H=>u?f.findIndex(A=>A===H)>-1:x===H,L=H=>{const A=H.toString();if(u){const N=T(A);let F;N?F=f.filter(q=>q!=A):F=[...f,A],p(F),d==null||d({name:e,value:F})}else A!==x&&(l(A),d==null||d({name:e,value:A}))},M=H=>{Array.isArray(H==null?void 0:H.value)?p((H==null?void 0:H.value)??[]):l(H==null?void 0:H.value),d==null||d(H)},E=dr(It.FocusWithin),Q=h.useCallback((H,A)=>y.jsx(y.Fragment,{children:A}),[]),I=b||Q,B=(H,A,N)=>{const F=`element_${v}_${A}`,q=Ti.pick(s,H),U=String(Ti.pick(o,H)),Y=A===0,ce=A===N.length-1,k=de("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":Y&&c===Ae.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":ce&&c===Ae.Horizontal,"bsc:border-t bsc:border-b":!Y&&!ce&&c===Ae.Horizontal,"bsc:border-l":!Y&&c===Ae.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":Y&&c===Ae.Vertical,"bsc:border bsc:rounded-b-md":ce&&c===Ae.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!Y&&!ce&&c===Ae.Vertical},E),j={itemId:F,selectedValue:u?f:x,itemText:q,itemValue:U,itemData:H,itemStyles:k,isSelected:T(U),isFirstItem:Y,isLastItem:ce,onItemChanged:L};return u?y.jsx(Et,{props:j,template:I,children:y.jsx(Ft,{className:k,children:y.jsx(js,{value:U,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:q})})},F):y.jsx(Et,{props:j,template:I,children:y.jsx(Ft,{className:k,children:y.jsx($s,{value:U,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:q})})},F)},$=de("bsc:flex bsc:flex-col bsc:gap-2",m),ne=de("bsc:flex",{"bsc:flex-col bsc:w-max":c===Ae.Vertical}),oe=H=>u?y.jsx(Rs,{name:e,value:f,readOnly:i,onChange:M,className:ne,children:H.map(B)}):y.jsx(Fs,{name:e,value:x,readOnly:i,onChange:M,className:ne,children:H.map(B)});return y.jsxs(Ft,{className:$,children:[t&&y.jsx(ct,{label:t,readOnly:i}),w&&oe(w)]})},Rp=h.memo(Mp),Lp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:c=qe.Right,orientation:u=Ae.Vertical,className:m,useAnimation:d,onChange:b})=>{const x=bn(()=>n,[n]),l=h.useId(),f=pn(d),p=dr(It.FocusWithin),w=de("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",m),v=de("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===Ae.Vertical,"bsc:*:pr-2":u===Ae.Horizontal}),T=de("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),L=de("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":c===qe.Left,"bsc:mr-2":c===qe.Right,"bc-read-only":i},p),M=de("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=de("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=de("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}),I=(B,$)=>{const ne=B[s],oe=B[o];return y.jsxs(Ft,{className:T,children:[c===qe.Left&&y.jsx(ct,{label:ne,readOnly:i}),y.jsx($s,{value:oe,className:L,children:y.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:M,children:[y.jsx("circle",{cx:15,cy:15,r:15,className:E}),y.jsx("circle",{cx:"50%",cy:"50%",r:7,className:Q})]})}),c===qe.Right&&y.jsx(ct,{label:ne,readOnly:i})]},`radio_${l}_item${$}`)};return y.jsxs("div",{className:w,children:[t&&y.jsx(ct,{label:t,readOnly:i}),y.jsx(Fs,{name:e,value:r,readOnly:i,onChange:b,className:v,children:x&&x.map(I)})]})},Ap=h.memo(Lp),Fp=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:c})=>{const u=pn(o),m=de("bc-toggle-wrapper bsc:flex bsc:flex-col",i),d=dr(It.FocusWithin),b=de("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=de("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:m,children:[t&&y.jsx(ct,{label:t,readOnly:s}),y.jsx(ma,{name:e,value:r,toggled:n,onChange:c,className:b,children:y.jsx("div",{className:x})})]})},$p=h.memo(Fp);se.BeeSoftProvider=Di,se.Button=Xe,se.Checkbox=Ys,se.CheckboxGroup=Ta,se.ContentEditableInput=Vr,se.DateFormatType=_r,se.DateScrollerType=Qt,se.DateSelectionType=we,se.DateTime=Np,se.FormGroupItemOrientation=Ae,se.FormattedInput=xi,se.GroupButton=Rp,se.MediaQuery=Fn,se.MobileOverlayPanel=hi,se.OverlayPanel=gi,se.RadioButton=Ap,se.SelectionLabelLocation=qe,se.Toggle=$p,se.applyBeeSoftTheme=Ih,se.createBeeSoftTheme=Mh,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});