beesoft-components 0.10.4 → 0.11.0
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/beesoft-components.css +1 -1
- package/dist/beesoft-components.css.gz +0 -0
- package/dist/index.es.js +5361 -6319
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +4 -94
- package/dist/index.umd.js.gz +0 -0
- package/package.json +15 -15
- package/types/index.d.ts +4 -3
package/dist/index.umd.js
CHANGED
|
@@ -1,102 +1,12 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var 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
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var 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
|
-
|
|
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
|
-
|
|
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:
|
|
1
|
+
(function(K,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("@beesoft/locale"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@beesoft/locale","react-dom"],f):(K=typeof globalThis<"u"?globalThis:K||self,f(K.BeeSoftComponents={},K.React,K["beesoft-locale"],K.ReactDOM))})(this,(function(K,f,$o,ht){"use strict";function Ho(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const pt=Ho(f);function or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ft={exports:{}},mt={};var sn;function Yo(){if(sn)return mt;sn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:t,type:n,key:i,ref:s!==void 0?s:null,props:o}}return mt.Fragment=e,mt.jsx=r,mt.jsxs=r,mt}var bt={};var on;function Vo(){return on||(on=1,process.env.NODE_ENV!=="production"&&(function(){function t(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===X?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case g:return"Fragment";case k:return"Profiler";case v:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case G:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case h:return"Portal";case D:return c.displayName||"Context";case j:return(c._context.displayName||"Context")+".Consumer";case T:var w=c.render;return c=c.displayName,c||(c=w.displayName||w.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case B:return w=c.displayName||null,w!==null?w:t(c.type)||"Memo";case L:w=c._payload,c=c._init;try{return t(c(w))}catch{}}return null}function e(c){return""+c}function r(c){try{e(c);var w=!1}catch{w=!0}if(w){w=console;var S=w.error,C=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return S.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),e(c)}}function n(c){if(c===g)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===L)return"<...>";try{var w=t(c);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function s(){var c=F.A;return c===null?null:c.getOwner()}function o(){return Error("react-stack-top-frame")}function i(c){if(I.call(c,"key")){var w=Object.getOwnPropertyDescriptor(c,"key").get;if(w&&w.isReactWarning)return!1}return c.key!==void 0}function a(c,w){function S(){A||(A=!0,console.error("%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://react.dev/link/special-props)",w))}S.isReactWarning=!0,Object.defineProperty(c,"key",{get:S,configurable:!0})}function u(){var c=t(this.type);return U[c]||(U[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function b(c,w,S,C,W,M){var E=S.ref;return c={$$typeof:d,type:c,key:w,props:S,_owner:C},(E!==void 0?E:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:u}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function p(c,w,S,C,W,M){var E=w.children;if(E!==void 0)if(C)if(N(E)){for(C=0;C<E.length;C++)y(E[C]);Object.freeze&&Object.freeze(E)}else console.error("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 y(E);if(I.call(w,"key")){E=t(c);var $=Object.keys(w).filter(function(Z){return Z!=="key"});C=0<$.length?"{key: someKey, "+$.join(": ..., ")+": ...}":"{key: someKey}",P[E+C]||($=0<$.length?"{"+$.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
26
2
|
let props = %s;
|
|
27
3
|
<%s {...props} />
|
|
28
4
|
React keys must be passed directly to JSX without using spread:
|
|
29
5
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
31
|
-
Copyright (c) 2018 Jed Watson.
|
|
32
|
-
Licensed under the MIT License (MIT), see
|
|
33
|
-
http://jedwatson.github.io/classnames
|
|
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
|
-
* @license React
|
|
36
|
-
* react-jsx-runtime.production.min.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
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
|
-
* @license React
|
|
44
|
-
* react-jsx-runtime.development.js
|
|
45
|
-
*
|
|
46
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE file in the root directory of this source tree.
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
6
|
+
<%s key={someKey} {...props} />`,C,E,$,E),P[E+C]=!0)}if(E=null,S!==void 0&&(r(S),E=""+S),i(w)&&(r(w.key),E=""+w.key),"key"in w){S={};for(var q in w)q!=="key"&&(S[q]=w[q])}else S=w;return E&&a(S,typeof c=="function"?c.displayName||c.name||"Unknown":c),b(c,E,S,s(),W,M)}function y(c){x(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===L&&(c._payload.status==="fulfilled"?x(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function x(c){return typeof c=="object"&&c!==null&&c.$$typeof===d}var l=f,d=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),D=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),F=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,N=Array.isArray,_=console.createTask?console.createTask:function(){return null};l={react_stack_bottom_frame:function(c){return c()}};var A,U={},Q=l.react_stack_bottom_frame.bind(l,o)(),Y=_(n(o)),P={};bt.Fragment=g,bt.jsx=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!1,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)},bt.jsxs=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!0,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)}})()),bt}var an;function Wo(){return an||(an=1,process.env.NODE_ENV==="production"?Ft.exports=Yo():Ft.exports=Vo()),Ft.exports}var m=Wo();const cn=f.createContext(void 0),un=()=>f.useContext(cn),Bo=({overlayKeepOnScreen:t=!0,useAnimations:e=!0,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o,children:i})=>{const a={overlayKeepOnScreen:t,useAnimations:e,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o};return m.jsx(cn.Provider,{value:a,children:i})};var xe=(t=>(t[t.Vertical=0]="Vertical",t[t.Horizontal=1]="Horizontal",t))(xe||{}),Ee=(t=>(t[t.Right=0]="Right",t[t.Left=1]="Left",t))(Ee||{}),ir={exports:{}};var ln;function zo(){return ln||(ln=1,(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}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 a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(ir)),ir.exports}var Uo=zo();const te=or(Uo);var Ze=(t=>(t[t.Focus=0]="Focus",t[t.FocusWithin=1]="FocusWithin",t))(Ze||{});const gt=(t=1)=>f.useMemo(()=>te("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":t===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":t===0}),[t]),qo=(t,e)=>{const r=f.useRef(null),{buttonType:n,buttonStyle:s="curved",type:o="button",disabled:i=!1,form:a,fullWidth:u=!1,onClick:b,className:p,children:y}=t,x=()=>{r.current?.click()};f.useImperativeHandle(e,()=>({click:x}));const l=gt(Ze.Focus),d=te("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"},p);return m.jsx("button",{ref:r,type:o,onClick:b,disabled:i,form:a,className:d,children:y})},Oe=f.forwardRef(qo);var ar={exports:{}},yt={},fn;function Go(){if(fn)return yt;fn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:t,type:n,key:i,ref:s!==void 0?s:null,props:o}}return yt.Fragment=e,yt.jsx=r,yt.jsxs=r,yt}var $t={},dn;function Qo(){return dn||(dn=1,process.env.NODE_ENV!=="production"&&(function(){function t(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===X?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case g:return"Fragment";case k:return"Profiler";case v:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case G:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case h:return"Portal";case D:return c.displayName||"Context";case j:return(c._context.displayName||"Context")+".Consumer";case T:var w=c.render;return c=c.displayName,c||(c=w.displayName||w.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case B:return w=c.displayName||null,w!==null?w:t(c.type)||"Memo";case L:w=c._payload,c=c._init;try{return t(c(w))}catch{}}return null}function e(c){return""+c}function r(c){try{e(c);var w=!1}catch{w=!0}if(w){w=console;var S=w.error,C=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return S.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),e(c)}}function n(c){if(c===g)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===L)return"<...>";try{var w=t(c);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function s(){var c=F.A;return c===null?null:c.getOwner()}function o(){return Error("react-stack-top-frame")}function i(c){if(I.call(c,"key")){var w=Object.getOwnPropertyDescriptor(c,"key").get;if(w&&w.isReactWarning)return!1}return c.key!==void 0}function a(c,w){function S(){A||(A=!0,console.error("%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://react.dev/link/special-props)",w))}S.isReactWarning=!0,Object.defineProperty(c,"key",{get:S,configurable:!0})}function u(){var c=t(this.type);return U[c]||(U[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function b(c,w,S,C,W,M){var E=S.ref;return c={$$typeof:d,type:c,key:w,props:S,_owner:C},(E!==void 0?E:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:u}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function p(c,w,S,C,W,M){var E=w.children;if(E!==void 0)if(C)if(N(E)){for(C=0;C<E.length;C++)y(E[C]);Object.freeze&&Object.freeze(E)}else console.error("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 y(E);if(I.call(w,"key")){E=t(c);var $=Object.keys(w).filter(function(Z){return Z!=="key"});C=0<$.length?"{key: someKey, "+$.join(": ..., ")+": ...}":"{key: someKey}",P[E+C]||($=0<$.length?"{"+$.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
59
7
|
let props = %s;
|
|
60
8
|
<%s {...props} />
|
|
61
9
|
React keys must be passed directly to JSX without using spread:
|
|
62
10
|
let props = %s;
|
|
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
|
-
* @license React
|
|
65
|
-
* use-sync-external-store-shim.production.js
|
|
66
|
-
*
|
|
67
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the MIT license found in the
|
|
70
|
-
* LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/var 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
|
-
* @license React
|
|
73
|
-
* use-sync-external-store-shim.development.js
|
|
74
|
-
*
|
|
75
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
76
|
-
*
|
|
77
|
-
* This source code is licensed under the MIT license found in the
|
|
78
|
-
* LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/var Ts;function Ki(){return Ts||(Ts=1,process.env.NODE_ENV!=="production"&&function(){function e(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}function t(l,f){d||s.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var 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
|
-
Copyright (c) 2018 Jed Watson.
|
|
81
|
-
Licensed under the MIT License (MIT), see
|
|
82
|
-
http://jedwatson.github.io/classnames
|
|
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&<(new Pn(new ArrayBuffer(1)))!=xo||xr&<(new xr)!=go||Tn&<(Tn.resolve())!=bo||En&<(new En)!=yo||xn&<(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)&<(e)==Dl}var To=Wt&&Wt.isMap,Nl=To?wn(To):_l,jl="[object Set]";function Il(e){return Ht(e)&<(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
|
-
* react-is.production.min.js
|
|
85
|
-
*
|
|
86
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the MIT license found in the
|
|
89
|
-
* LICENSE file in the root directory of this source tree.
|
|
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
|
-
* react-is.development.js
|
|
92
|
-
*
|
|
93
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the MIT license found in the
|
|
96
|
-
* LICENSE file in the root directory of this source tree.
|
|
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
|
-
object-assign
|
|
99
|
-
(c) Sindre Sorhus
|
|
100
|
-
@license MIT
|
|
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"})});
|
|
11
|
+
<%s key={someKey} {...props} />`,C,E,$,E),P[E+C]=!0)}if(E=null,S!==void 0&&(r(S),E=""+S),i(w)&&(r(w.key),E=""+w.key),"key"in w){S={};for(var q in w)q!=="key"&&(S[q]=w[q])}else S=w;return E&&a(S,typeof c=="function"?c.displayName||c.name||"Unknown":c),b(c,E,S,s(),W,M)}function y(c){x(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===L&&(c._payload.status==="fulfilled"?x(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function x(c){return typeof c=="object"&&c!==null&&c.$$typeof===d}var l=f,d=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),D=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),F=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,N=Array.isArray,_=console.createTask?console.createTask:function(){return null};l={react_stack_bottom_frame:function(c){return c()}};var A,U={},Q=l.react_stack_bottom_frame.bind(l,o)(),Y=_(n(o)),P={};$t.Fragment=g,$t.jsx=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!1,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)},$t.jsxs=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!0,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)}})()),$t}var hn;function Zo(){return hn||(hn=1,process.env.NODE_ENV==="production"?ar.exports=Go():ar.exports=Qo()),ar.exports}var we=Zo();function Ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pn,mn;function Xo(){return mn||(mn=1,pn=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),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(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}),pn}var Jo=Xo();const ei=Ko(Jo),ti=()=>{throw new Error("useEvent should not be called before the component is mounted")},vt=t=>{const e=f.useRef(ti);f.useInsertionEffect(()=>{e.current=t},[t]);const r=f.useRef(null);return r.current||(r.current=function(){return e.current?.apply(this,arguments)}),r.current},bn=t=>{const e=f.useRef(void 0);let r=!1;e.current!==void 0&&(r=!ei(e.current,t));const n={changed:r,previousValue:e.current};return e.current=t,n},ri=t=>typeof t=="function",ni=t=>{const[e,r]=f.useState({value:t,initial:!0}),n=f.useRef(t);return[e,s=>{if(!ri(s))r({value:s,initial:!1});else{const o=s(n.current);n.current=o,r({value:o,initial:!1})}}]},si=t=>{const[e,r]=ni(t),n=f.useRef({value:t,initial:!0});return n.current!==e&&(n.current=e),[e,r,n]},gn=f.createContext(void 0),Ht=()=>f.useContext(gn),cr=({id:t,name:e,value:r,type:n,checked:s,readOnly:o,onChange:i})=>we.jsx("input",{id:t,name:e,value:r,type:n,checked:s,onChange:i,readOnly:o,disabled:o,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function oi(t){const e=Object.keys(t),r={};for(let n=0,s=e.length;n<s;n++){const o=e[n];if(o){const i=t[o],a=o.replace(/([A-Z])/g,u=>`-${u.toLowerCase()}`);typeof i=="boolean"?i&&(r[`data-${a}`]=!0):r[`data-${a}`]=t[o]}}return r}const xt=({wrapperElement:t,renderProps:e,elementProps:r,innerWrapperElement:n,className:s,children:o})=>{if(typeof o=="function")return n?we.jsxs(we.Fragment,{children:[n,o(e)]}):o(e);{const i=n?we.jsxs(we.Fragment,{children:[n,o]}):o;return f.createElement(t,Object.assign({},e?oi(e):{},r,{className:s}),i)}};var ii=Symbol.for("preact-signals");function ur(){if(Ke>1)Ke--;else{for(var t,e=!1;wt!==void 0;){var r=wt;for(wt=void 0,lr++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&xn(r))try{r.c()}catch(s){e||(t=s,e=!0)}r=n}}if(lr=0,Ke--,e)throw t}}var se=void 0;function yn(t){var e=se;se=void 0;try{return t()}finally{se=e}}var wt=void 0,Ke=0,lr=0,Yt=0;function vn(t){if(se!==void 0){var e=t.n;if(e===void 0||e.t!==se)return e={i:0,S:t,p:se.s,n:void 0,t:se,e:void 0,x:void 0,r:e},se.s!==void 0&&(se.s.n=e),se.s=e,t.n=e,32&se.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=se.s,e.n=void 0,se.s.n=e,se.s=e),e}}function Se(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Se.prototype.brand=ii,Se.prototype.h=function(){return!0},Se.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:yn(function(){var n;(n=e.W)==null||n.call(e)}))},Se.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&yn(function(){var s;(s=e.Z)==null||s.call(e)}))}},Se.prototype.subscribe=function(t){var e=this;return dr(function(){var r=e.value,n=se;se=void 0;try{t(r)}finally{se=n}},{name:"sub"})},Se.prototype.valueOf=function(){return this.value},Se.prototype.toString=function(){return this.value+""},Se.prototype.toJSON=function(){return this.value},Se.prototype.peek=function(){var t=se;se=void 0;try{return this.value}finally{se=t}},Object.defineProperty(Se.prototype,"value",{get:function(){var t=vn(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(lr>100)throw new Error("Cycle detected");this.v=t,this.i++,Yt++,Ke++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ur()}}}});function ai(t,e){return new Se(t,e)}function xn(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function wn(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Sn(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Xe(t,e){Se.call(this,void 0),this.x=t,this.s=void 0,this.g=Yt-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Xe.prototype=new Se,Xe.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yt))return!0;if(this.g=Yt,this.f|=1,this.i>0&&!xn(this))return this.f&=-2,!0;var t=se;try{wn(this),se=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return se=t,Sn(this),this.f&=-2,!0},Xe.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}Se.prototype.S.call(this,t)},Xe.prototype.U=function(t){if(this.t!==void 0&&(Se.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Xe.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(Xe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=vn(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Tn(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Ke++;var r=se;se=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,fr(t),n}finally{se=r,ur()}}}function fr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Tn(t)}function ci(t){if(se!==this)throw new Error("Out-of-order effect");Sn(this),se=t,this.f&=-2,8&this.f&&fr(this),ur()}function Je(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}Je.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Je.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Tn(this),wn(this),Ke++;var t=se;return se=this,ci.bind(this,t)},Je.prototype.N=function(){2&this.f||(this.f|=2,this.o=wt,wt=this)},Je.prototype.d=function(){this.f|=8,1&this.f||fr(this)},Je.prototype.dispose=function(){this.d()};function dr(t,e){var r=new Je(t,e);try{r.c()}catch(s){throw r.d(),s}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}var hr={exports:{}},pr={},Pn;function ui(){if(Pn)return pr;Pn=1;var t=f;function e(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,s=t.useEffect,o=t.useLayoutEffect,i=t.useDebugValue;function a(y,x){var l=x(),d=n({inst:{value:l,getSnapshot:x}}),h=d[0].inst,g=d[1];return o(function(){h.value=l,h.getSnapshot=x,u(h)&&g({inst:h})},[y,l,x]),s(function(){return u(h)&&g({inst:h}),y(function(){u(h)&&g({inst:h})})},[y]),i(l),l}function u(y){var x=y.getSnapshot;y=y.value;try{var l=x();return!r(y,l)}catch{return!0}}function b(y,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b:a;return pr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,pr}var En={},Cn;function li(){return Cn||(Cn=1,process.env.NODE_ENV!=="production"&&(function(){function t(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}function e(l,d){p||s.startTransition===void 0||(p=!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 h=d();if(!y){var g=d();o(h,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),y=!0)}g=i({inst:{value:h,getSnapshot:d}});var v=g[0].inst,k=g[1];return u(function(){v.value=h,v.getSnapshot=d,r(v)&&k({inst:v})},[l,h,d]),a(function(){return r(v)&&k({inst:v}),l(function(){r(v)&&k({inst:v})})},[l]),b(h),h}function r(l){var d=l.getSnapshot;l=l.value;try{var h=d();return!o(l,h)}catch{return!0}}function n(l,d){return d()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=f,o=typeof Object.is=="function"?Object.is:t,i=s.useState,a=s.useEffect,u=s.useLayoutEffect,b=s.useDebugValue,p=!1,y=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;En.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())})()),En}var kn;function fi(){return kn||(kn=1,process.env.NODE_ENV==="production"?hr.exports=ui():hr.exports=li()),hr.exports}var di=fi(),hi=f.version.split(".").map(Number)[0],On=[],pi=Symbol.for(hi>=19?"react.transitional.element":"react.element"),We,Dn=Symbol.dispose||Symbol.for("Symbol.dispose");function mr(t,e){var r=e.effect.S();return We=e,mi.bind(e,t,r)}function mi(t,e){e(),We=t}var Nn,br,_n=function(){},bi=((Nn={o:0,effect:{s:void 0,c:function(){},S:function(){return _n},d:function(){}},subscribe:function(){return _n},getSnapshot:function(){return 0},S:function(){},f:function(){}})[Dn]=function(){},Nn),gi=Promise.prototype.then.bind(Promise.resolve());function yi(){br||(br=gi(vi))}function vi(){var t;br=void 0,(t=We)==null||t.f()}function xi(t){yi();var e=f.useRef();e.current==null&&(typeof window>"u"?e.current=bi:e.current=(function(n){var s,o,i,a,u=0,b=dr(function(){o=this});return o.c=function(){u=u+1|0,a&&a()},(s={o:n,effect:o,subscribe:function(p){return a=p,function(){u=u+1|0,a=void 0,b()}},getSnapshot:function(){return u},S:function(){if(We!=null){var p=We.o,y=this.o;p==0&&y==0||p==0&&y==1?(We.f(),i=mr(void 0,this)):p==1&&y==0||p==2&&y==0||(i=mr(We,this))}else i=mr(void 0,this)},f:function(){var p=i;i=void 0,p?.()}})[Dn]=function(){this.f()},s})(t));var r=e.current;return di.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot),r.S(),r}Object.defineProperties(Se.prototype,{$$typeof:{configurable:!0,value:pi},type:{configurable:!0,value:function(t){var e=t.data,r=xi(1);try{return e.value}finally{r.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function Fe(t,e){return f.useMemo(function(){return ai(t,e)},On)}function et(t,e){var r=f.useRef(t);r.current=t,f.useEffect(function(){return dr(function(){return r.current()},e)},On)}const jn=f.createContext(void 0),In=()=>f.useContext(jn),wi=(t,e)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,readOnly:i=!1,onChange:a,children:u,className:b}=t,[p,y]=f.useState(r),[x,l]=f.useState(i),d=f.useRef(void 0),h=f.useRef(void 0),g=f.useRef(void 0),v=f.useRef(void 0),k=f.useRef(void 0),j=f.useRef(void 0),D=In(),T=Ht(),H=f.useId(),V=f.useMemo(()=>T?.sharedId||t.id||H,[T?.sharedId,t.id,H]),[B,L,G]=si({checked:!1,partial:!1}),X=bn(s),F=bn(o);f.useEffect(()=>{if(B.initial)L({checked:o?!1:s,partial:o});else{const U=X.changed?s:B.value.checked,Q=F.changed?o:B.value.partial;L({checked:Q?!1:U,partial:Q})}},[s,o]),f.useEffect(()=>{l(i)},[i]),f.useEffect(()=>{D&&(d.current=D.nameSignal,h.current=D.valueSignal,g.current=D.readOnlySignal,v.current=D.useComparator,k.current=D.compare,j.current=D.onCheckboxChange)},[D]),et(()=>{if(h.current)if(v.current?.value&&k.current){const U=k.current,Q=h.current.value?.some(Y=>U(n,Y))??!1;L(Y=>({...Y,checked:Q}))}else{const U=h.current.value?.some(Q=>n===Q)??!1;L(Q=>({...Q,checked:U}))}}),et(()=>{d.current&&y(d.current.value)}),et(()=>{g.current&&l(g.current.value??!1)});const I=vt(U=>{const Q=G.current?.value.partial===!0?!0:U.target.checked;L({checked:Q,partial:!1}),j.current?j.current({originalEvent:U,name:p,value:n,checked:Q}):a?.({originalEvent:U,name:p,value:n,checked:Q})}),N=U=>{const Q={checked:U?!1:G.current?.value.checked??!1,partial:U};L(Q)},_=U=>{L({checked:U,partial:!1})};f.useImperativeHandle(e,()=>({setPartiallyChecked:N,setChecked:_}));const A=p&&we.jsx(cr,{id:V,name:p,type:"checkbox",checked:B.value.checked,readOnly:x,onChange:I});return xt({wrapperElement:"label",renderProps:{...B.value,readOnly:x},elementProps:{htmlFor:V},className:b,innerWrapperElement:A,children:u})},Mn=f.memo(f.forwardRef(wi)),Si=(t,e)=>t&&e&&typeof t=="object"&&typeof e=="object"&&"value"in t&&"value"in e?t.value===e.value:t===e,Ln=(t=Si)=>vt((e,r)=>{if(typeof t=="string"){const n=t;return e?.[n]===r?.[n]}return t(e,r)}),An=({props:t,children:e})=>we.jsx(jn.Provider,{value:t,children:e}),Ti=({name:t,value:e,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const a=Fe(),u=Fe(),b=Fe(),p=Fe(),y=Ln(r),x=vt(d=>{if(d){const{checked:h}=d,g=d.value;if(u.value)if(r)if(h)u.value.findIndex(v=>y(g,v))===-1&&u.value.push(g);else{const v=u.value.filter(k=>!y(g,k));u.value=[...v]}else if(h)u.value.indexOf(g)===-1&&u.value.push(g);else{const v=u.value.filter(k=>k!==g);u.value=[...v]}else h&&(u.value=[g])}s?.({originalEvent:d?.originalEvent,name:t,value:u.value})}),l=f.useMemo(()=>({nameSignal:a,valueSignal:u,readOnlySignal:b,useComparator:p,compare:y,onCheckboxChange:x}),[]);return f.useEffect(()=>{a.value=t},[t]),f.useEffect(()=>{u.value=e},[e]),f.useEffect(()=>{b.value=n},[n]),f.useEffect(()=>{p.value=r!==void 0},[r]),we.jsx("div",{className:o,children:we.jsx(An,{props:l,children:i})})},Rn=f.memo(Ti),tt=({className:t,children:e})=>{const r=f.useId(),n=f.useMemo(()=>({sharedId:r}),[r]),s=we.jsx(gn.Provider,{value:n,children:e});return xt({wrapperElement:"div",className:t,children:s})},Pi=({htmlFor:t,className:e,children:r})=>{const n=Ht(),s=f.useMemo(()=>n?.sharedId||t,[n?.sharedId,t]);return xt({wrapperElement:"label",elementProps:{htmlFor:s},className:e,children:r})};var Fn={exports:{}},$n;function Ei(){return $n||($n=1,(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}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 a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Fn)),Fn.exports}Ei();const Ci=({intersectionObserver:t,resizeObserver:e,page:r,height:n,children:s})=>{const o=f.useRef(void 0);f.useEffect(()=>()=>{o.current&&(t?.unobserve(o.current),e?.unobserve(o.current))},[]),f.useEffect(()=>(o.current&&t?.observe(o.current),()=>{o.current&&t&&t.unobserve(o.current)}),[t]);const i=u=>{o.current&&(t?.unobserve(o.current),e?.unobserve(o.current)),t?.observe(u),e?.observe(u),o.current=u},a=n?{height:`${n}px`}:{};return we.jsx("div",{"data-page":r,"data-name":"page",style:a,ref:u=>{u&&i(u)},children:s})};f.memo(Ci);const ki=({intersectionObserver:t,page:e})=>{const r=f.useRef(void 0);f.useEffect(()=>()=>{r.current&&t?.unobserve(r.current)},[]);const n=s=>{r.current&&t?.unobserve(r.current),t?.observe(s),r.current=s};return we.jsx("div",{"data-page":e,"data-name":"marker",ref:s=>{s&&n(s)}})};f.memo(ki);const Oi=({name:t,value:e,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const a=Fe(),u=Fe(),b=Fe(),p=Fe(),y=Ln(r),x=f.useMemo(()=>({nameSignal:a,valueSignal:u,readOnlySignal:b,useComparator:p,compare:y}),[]);f.useEffect(()=>{a.value=t},[t]),f.useEffect(()=>{u.value=e},[e]),f.useEffect(()=>{b.value=n},[n]),f.useEffect(()=>{p.value=r!==void 0},[r]);const l=vt(d=>{s?.({originalEvent:d,name:t,value:u.value})});return we.jsx("div",{className:o,onChange:l,children:we.jsx(An,{props:x,children:i})})},Hn=f.memo(Oi),Di=({value:t,className:e,children:r})=>{const[n,s]=f.useState(),[o,i]=f.useState(!1),[a,u]=f.useState(!1),b=f.useRef(void 0),p=f.useRef(void 0),y=f.useRef(void 0),x=f.useRef(void 0),l=f.useRef(void 0),d=In(),h=Ht(),g=f.useId(),v=f.useMemo(()=>h?.sharedId||g,[h?.sharedId,g]);f.useEffect(()=>{d&&(b.current=d.nameSignal,p.current=d.valueSignal,y.current=d.readOnlySignal,x.current=d.useComparator,l.current=d.compare)},[d]),et(()=>{x&&p.current&&l.current?i(l.current(t,p.current.value)):i(t===p.current?.value)}),et(()=>{s(b.current?.value)}),et(()=>{u(y.current?.value??!1)});const k=vt(j=>{j.target.checked&&p.current&&(p.current.value=t)});return xt({wrapperElement:"label",renderProps:{checked:o,readOnly:a},elementProps:{htmlFor:v},className:e,innerWrapperElement:n?we.jsx(cr,{id:v,name:n,type:"radio",value:t,checked:o,readOnly:a,onChange:k}):null,children:r})},Yn=f.memo(Di),Ni=(t,e)=>{const{id:r,name:n,value:s,toggled:o=!1,readOnly:i,onChange:a,children:u,className:b}=t,[p,y]=f.useState(o),x=Ht(),l=f.useId(),d=f.useMemo(()=>x?.sharedId||r||l,[x?.sharedId,r,l]);f.useEffect(()=>{y(o)},[o]);const h=v=>{y(v.target.checked),a?.({originalEvent:v,name:n,value:s,checked:v.target.checked})},g=v=>{y(v)};return f.useImperativeHandle(e,()=>({setToggled:g})),xt({wrapperElement:"label",renderProps:{toggled:p,readOnly:i},elementProps:{htmlFor:d},className:b,innerWrapperElement:we.jsx(cr,{id:d,name:n,type:"checkbox",checked:p,readOnly:i,onChange:h}),children:u})},_i=f.memo(f.forwardRef(Ni)),gr=t=>{const[e,r]=f.useState(!0),n=un();return f.useEffect(()=>{n&&n.useAnimations!==void 0?r(n.useAnimations):t!==void 0&&r(t)},[n,t]),e},Ie=({label:t,htmlFor:e,readOnly:r=!1,className:n})=>{const s=te("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 m.jsx(Pi,{htmlFor:e,className:s,children:t})},ji=(t,e)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:a=!1,labelLocation:u=Ee.Right,className:b,useAnimation:p,onChange:y}=t,x=gr(p),l=te("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",b),d=te("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===Ee.Right,"bsc:mr-2":u===Ee.Left}),h=gt(Ze.FocusWithin),g=te("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]",h),v=te("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 m.jsxs(tt,{className:l,children:[n&&u===Ee.Left&&m.jsx(Ie,{label:n,readOnly:o,className:d}),m.jsx(Mn,{ref:e,name:r,value:s,checked:i,partial:a,readOnly:o,className:g,onChange:y,children:m.jsxs("svg",{viewBox:"0 0 21 21",className:v,children:[m.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),m.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),n&&u===Ee.Right&&m.jsx(Ie,{label:n,readOnly:o,className:d})]})},Vn=f.memo(f.forwardRef(ji)),Vt=t=>t==null?!1:typeof t=="object",Wn=t=>t instanceof Date,Bn=t=>typeof t=="function",zn=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"},yr=t=>{if(!Vt(t))return t;const e={},r=Object.keys(t);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=t[o];zn(i)||Bn(i)?e[o]=i:Wn(i)?e[o]=new Date(i.getTime()):Array.isArray(i)?e[o]=vr(i):Vt(i)&&(e[o]=yr(i))}return e},vr=t=>{let e=t.length;const r=new Array(e);for(;e--!==0;){const n=t[e];zn(n)||Bn(n)?r[e]=n:Wn(n)?r[e]=new Date(n.getTime()):Vt(n)&&!Array.isArray(n)?r[e]=yr(n):Array.isArray(n)?r[e]=vr(n):r[e]=n}return r},Ii=t=>Vt(t)?Array.isArray(t)?vr(t):yr(t):t;function Mi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Un,qn;function Li(){return qn||(qn=1,Un=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),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(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}),Un}var Ai=Li();const Ri=Mi(Ai);function Fi(t,e){for(let r=t.length;r--!==0;)if(!Ri(t[r],e[r]))return!0;return!1}const xr=(t,e)=>{const r=f.useRef([]),n=r.current.length>0&&r.current[0]&&Fi(r.current[0],e);return(r.current.length===0||n)&&(r.current=[Ii(e),t()]),r.current[1]},$i=t=>{const[e,r]=f.useState(t),n=f.useRef(t);return n.current!==e&&(n.current=e),[e,r,n]},Hi=({name:t,label:e,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:a=xe.Vertical,className:u,onChange:b})=>{const[p,y]=f.useState([]),x=xr(()=>n,[n]);f.useEffect(()=>{y(r??[])},[r]);const l=k=>{if(k){const{value:j}=k;y(j??[]),b?.({name:t,value:j})}},d=(k,j)=>m.jsx(Vn,{label:k[s],value:k[o],className:"bsc:mr-3"},`${t}_checkbox_${j}`),h=te("bsc:flex bsc:flex-col bsc:gap-1",u),g=te("bsc:flex bsc:gap-1",{"bsc:flex-col":a===xe.Vertical}),v=k=>m.jsx(Rn,{name:t,value:p,readOnly:i,onChange:l,className:g,children:k.map(d)});return m.jsxs("div",{className:h,children:[e&&m.jsx(Ie,{label:e,readOnly:i}),x&&v(x)]})},Yi=f.memo(Hi);var Gn=typeof global=="object"&&global&&global.Object===Object&&global,Vi=typeof self=="object"&&self&&self.Object===Object&&self,ke=Gn||Vi||Function("return this")(),rt=ke.Symbol,Qn=Object.prototype,Wi=Qn.hasOwnProperty,Bi=Qn.toString,St=rt?rt.toStringTag:void 0;function zi(t){var e=Wi.call(t,St),r=t[St];try{t[St]=void 0;var n=!0}catch{}var s=Bi.call(t);return n&&(e?t[St]=r:delete t[St]),s}var Ui=Object.prototype,qi=Ui.toString;function Gi(t){return qi.call(t)}var Qi="[object Null]",Zi="[object Undefined]",Zn=rt?rt.toStringTag:void 0;function nt(t){return t==null?t===void 0?Zi:Qi:Zn&&Zn in Object(t)?zi(t):Gi(t)}function st(t){return t!=null&&typeof t=="object"}var Ki="[object Symbol]";function Xi(t){return typeof t=="symbol"||st(t)&&nt(t)==Ki}var wr=Array.isArray,Ji=/\s/;function ea(t){for(var e=t.length;e--&&Ji.test(t.charAt(e)););return e}var ta=/^\s+/;function ra(t){return t&&t.slice(0,ea(t)+1).replace(ta,"")}function $e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Kn=NaN,na=/^[-+]0x[0-9a-f]+$/i,sa=/^0b[01]+$/i,oa=/^0o[0-7]+$/i,ia=parseInt;function Xn(t){if(typeof t=="number")return t;if(Xi(t))return Kn;if($e(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$e(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ra(t);var r=sa.test(t);return r||oa.test(t)?ia(t.slice(2),r?2:8):na.test(t)?Kn:+t}var aa="[object AsyncFunction]",ca="[object Function]",ua="[object GeneratorFunction]",la="[object Proxy]";function Jn(t){if(!$e(t))return!1;var e=nt(t);return e==ca||e==ua||e==aa||e==la}var Sr=ke["__core-js_shared__"],es=(function(){var t=/[^.]+$/.exec(Sr&&Sr.keys&&Sr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function fa(t){return!!es&&es in t}var da=Function.prototype,ha=da.toString;function Be(t){if(t!=null){try{return ha.call(t)}catch{}try{return t+""}catch{}}return""}var pa=/[\\^$.*+?()[\]{}|]/g,ma=/^\[object .+?Constructor\]$/,ba=Function.prototype,ga=Object.prototype,ya=ba.toString,va=ga.hasOwnProperty,xa=RegExp("^"+ya.call(va).replace(pa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wa(t){if(!$e(t)||fa(t))return!1;var e=Jn(t)?xa:ma;return e.test(Be(t))}function Sa(t,e){return t?.[e]}function ze(t,e){var r=Sa(t,e);return wa(r)?r:void 0}var Tr=ze(ke,"WeakMap"),ts=Object.create,Ta=(function(){function t(){}return function(e){if(!$e(e))return{};if(ts)return ts(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),rs=(function(){try{var t=ze(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Pa(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Ea=9007199254740991,Ca=/^(?:0|[1-9]\d*)$/;function ka(t,e){var r=typeof t;return e=e??Ea,!!e&&(r=="number"||r!="symbol"&&Ca.test(t))&&t>-1&&t%1==0&&t<e}function Oa(t,e,r){e=="__proto__"&&rs?rs(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ns(t,e){return t===e||t!==t&&e!==e}var Da=Object.prototype,Na=Da.hasOwnProperty;function _a(t,e,r){var n=t[e];(!(Na.call(t,e)&&ns(n,r))||r===void 0&&!(e in t))&&Oa(t,e,r)}var ja=9007199254740991;function ss(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ja}function Ia(t){return t!=null&&ss(t.length)&&!Jn(t)}var Ma=Object.prototype;function os(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ma;return t===r}function La(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Aa="[object Arguments]";function is(t){return st(t)&&nt(t)==Aa}var as=Object.prototype,Ra=as.hasOwnProperty,Fa=as.propertyIsEnumerable,$a=is((function(){return arguments})())?is:function(t){return st(t)&&Ra.call(t,"callee")&&!Fa.call(t,"callee")};function Ha(){return!1}var cs=typeof K=="object"&&K&&!K.nodeType&&K,us=cs&&typeof module=="object"&&module&&!module.nodeType&&module,Ya=us&&us.exports===cs,ls=Ya?ke.Buffer:void 0,Va=ls?ls.isBuffer:void 0,fs=Va||Ha,Wa="[object Arguments]",Ba="[object Array]",za="[object Boolean]",Ua="[object Date]",qa="[object Error]",Ga="[object Function]",Qa="[object Map]",Za="[object Number]",Ka="[object Object]",Xa="[object RegExp]",Ja="[object Set]",ec="[object String]",tc="[object WeakMap]",rc="[object ArrayBuffer]",nc="[object DataView]",sc="[object Float32Array]",oc="[object Float64Array]",ic="[object Int8Array]",ac="[object Int16Array]",cc="[object Int32Array]",uc="[object Uint8Array]",lc="[object Uint8ClampedArray]",fc="[object Uint16Array]",dc="[object Uint32Array]",le={};le[sc]=le[oc]=le[ic]=le[ac]=le[cc]=le[uc]=le[lc]=le[fc]=le[dc]=!0,le[Wa]=le[Ba]=le[rc]=le[za]=le[nc]=le[Ua]=le[qa]=le[Ga]=le[Qa]=le[Za]=le[Ka]=le[Xa]=le[Ja]=le[ec]=le[tc]=!1;function hc(t){return st(t)&&ss(t.length)&&!!le[nt(t)]}function Pr(t){return function(e){return t(e)}}var ds=typeof K=="object"&&K&&!K.nodeType&&K,Tt=ds&&typeof module=="object"&&module&&!module.nodeType&&module,pc=Tt&&Tt.exports===ds,Er=pc&&Gn.process,ot=(function(){try{var t=Tt&&Tt.require&&Tt.require("util").types;return t||Er&&Er.binding&&Er.binding("util")}catch{}})(),hs=ot&&ot.isTypedArray,mc=hs?Pr(hs):hc,bc=Object.prototype,gc=bc.hasOwnProperty;function yc(t,e){var r=wr(t),n=!r&&$a(t),s=!r&&!n&&fs(t),o=!r&&!n&&!s&&mc(t),i=r||n||s||o,a=i?La(t.length,String):[],u=a.length;for(var b in t)gc.call(t,b)&&!(i&&(b=="length"||s&&(b=="offset"||b=="parent")||o&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||ka(b,u)))&&a.push(b);return a}function ps(t,e){return function(r){return t(e(r))}}var vc=ps(Object.keys,Object),xc=Object.prototype,wc=xc.hasOwnProperty;function Sc(t){if(!os(t))return vc(t);var e=[];for(var r in Object(t))wc.call(t,r)&&r!="constructor"&&e.push(r);return e}function Tc(t){return Ia(t)?yc(t):Sc(t)}var Pt=ze(Object,"create");function Pc(){this.__data__=Pt?Pt(null):{},this.size=0}function Ec(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Cc="__lodash_hash_undefined__",kc=Object.prototype,Oc=kc.hasOwnProperty;function Dc(t){var e=this.__data__;if(Pt){var r=e[t];return r===Cc?void 0:r}return Oc.call(e,t)?e[t]:void 0}var Nc=Object.prototype,_c=Nc.hasOwnProperty;function jc(t){var e=this.__data__;return Pt?e[t]!==void 0:_c.call(e,t)}var Ic="__lodash_hash_undefined__";function Mc(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Pt&&e===void 0?Ic:e,this}function Ue(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ue.prototype.clear=Pc,Ue.prototype.delete=Ec,Ue.prototype.get=Dc,Ue.prototype.has=jc,Ue.prototype.set=Mc;function Lc(){this.__data__=[],this.size=0}function Wt(t,e){for(var r=t.length;r--;)if(ns(t[r][0],e))return r;return-1}var Ac=Array.prototype,Rc=Ac.splice;function Fc(t){var e=this.__data__,r=Wt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Rc.call(e,r,1),--this.size,!0}function $c(t){var e=this.__data__,r=Wt(e,t);return r<0?void 0:e[r][1]}function Hc(t){return Wt(this.__data__,t)>-1}function Yc(t,e){var r=this.__data__,n=Wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Me(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Me.prototype.clear=Lc,Me.prototype.delete=Fc,Me.prototype.get=$c,Me.prototype.has=Hc,Me.prototype.set=Yc;var Et=ze(ke,"Map");function Vc(){this.size=0,this.__data__={hash:new Ue,map:new(Et||Me),string:new Ue}}function Wc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Bt(t,e){var r=t.__data__;return Wc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Bc(t){var e=Bt(this,t).delete(t);return this.size-=e?1:0,e}function zc(t){return Bt(this,t).get(t)}function Uc(t){return Bt(this,t).has(t)}function qc(t,e){var r=Bt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function it(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}it.prototype.clear=Vc,it.prototype.delete=Bc,it.prototype.get=zc,it.prototype.has=Uc,it.prototype.set=qc;function Gc(t,e){for(var r=-1,n=e.length,s=t.length;++r<n;)t[s+r]=e[r];return t}var Qc=ps(Object.getPrototypeOf,Object);function Zc(){this.__data__=new Me,this.size=0}function Kc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Xc(t){return this.__data__.get(t)}function Jc(t){return this.__data__.has(t)}var eu=200;function tu(t,e){var r=this.__data__;if(r instanceof Me){var n=r.__data__;if(!Et||n.length<eu-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new it(n)}return r.set(t,e),this.size=r.size,this}function at(t){var e=this.__data__=new Me(t);this.size=e.size}at.prototype.clear=Zc,at.prototype.delete=Kc,at.prototype.get=Xc,at.prototype.has=Jc,at.prototype.set=tu;var ms=typeof K=="object"&&K&&!K.nodeType&&K,bs=ms&&typeof module=="object"&&module&&!module.nodeType&&module,ru=bs&&bs.exports===ms,gs=ru?ke.Buffer:void 0;gs&&gs.allocUnsafe;function nu(t,e){return t.slice()}function su(t,e){for(var r=-1,n=t==null?0:t.length,s=0,o=[];++r<n;){var i=t[r];e(i,r,t)&&(o[s++]=i)}return o}function ou(){return[]}var iu=Object.prototype,au=iu.propertyIsEnumerable,ys=Object.getOwnPropertySymbols,cu=ys?function(t){return t==null?[]:(t=Object(t),su(ys(t),function(e){return au.call(t,e)}))}:ou;function uu(t,e,r){var n=e(t);return wr(t)?n:Gc(n,r(t))}function lu(t){return uu(t,Tc,cu)}var Cr=ze(ke,"DataView"),kr=ze(ke,"Promise"),Or=ze(ke,"Set"),vs="[object Map]",fu="[object Object]",xs="[object Promise]",ws="[object Set]",Ss="[object WeakMap]",Ts="[object DataView]",du=Be(Cr),hu=Be(Et),pu=Be(kr),mu=Be(Or),bu=Be(Tr),Le=nt;(Cr&&Le(new Cr(new ArrayBuffer(1)))!=Ts||Et&&Le(new Et)!=vs||kr&&Le(kr.resolve())!=xs||Or&&Le(new Or)!=ws||Tr&&Le(new Tr)!=Ss)&&(Le=function(t){var e=nt(t),r=e==fu?t.constructor:void 0,n=r?Be(r):"";if(n)switch(n){case du:return Ts;case hu:return vs;case pu:return xs;case mu:return ws;case bu:return Ss}return e});var gu=Object.prototype,yu=gu.hasOwnProperty;function vu(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&yu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Ps=ke.Uint8Array;function Dr(t){var e=new t.constructor(t.byteLength);return new Ps(e).set(new Ps(t)),e}function xu(t,e){var r=Dr(t.buffer);return new t.constructor(r,t.byteOffset,t.byteLength)}var wu=/\w*$/;function Su(t){var e=new t.constructor(t.source,wu.exec(t));return e.lastIndex=t.lastIndex,e}var Es=rt?rt.prototype:void 0,Cs=Es?Es.valueOf:void 0;function Tu(t){return Cs?Object(Cs.call(t)):{}}function Pu(t,e){var r=Dr(t.buffer);return new t.constructor(r,t.byteOffset,t.length)}var Eu="[object Boolean]",Cu="[object Date]",ku="[object Map]",Ou="[object Number]",Du="[object RegExp]",Nu="[object Set]",_u="[object String]",ju="[object Symbol]",Iu="[object ArrayBuffer]",Mu="[object DataView]",Lu="[object Float32Array]",Au="[object Float64Array]",Ru="[object Int8Array]",Fu="[object Int16Array]",$u="[object Int32Array]",Hu="[object Uint8Array]",Yu="[object Uint8ClampedArray]",Vu="[object Uint16Array]",Wu="[object Uint32Array]";function Bu(t,e,r){var n=t.constructor;switch(e){case Iu:return Dr(t);case Eu:case Cu:return new n(+t);case Mu:return xu(t);case Lu:case Au:case Ru:case Fu:case $u:case Hu:case Yu:case Vu:case Wu:return Pu(t);case ku:return new n;case Ou:case _u:return new n(t);case Du:return Su(t);case Nu:return new n;case ju:return Tu(t)}}function zu(t){return typeof t.constructor=="function"&&!os(t)?Ta(Qc(t)):{}}var Uu="[object Map]";function qu(t){return st(t)&&Le(t)==Uu}var ks=ot&&ot.isMap,Gu=ks?Pr(ks):qu,Qu="[object Set]";function Zu(t){return st(t)&&Le(t)==Qu}var Os=ot&&ot.isSet,Ku=Os?Pr(Os):Zu,Ds="[object Arguments]",Xu="[object Array]",Ju="[object Boolean]",el="[object Date]",tl="[object Error]",Ns="[object Function]",rl="[object GeneratorFunction]",nl="[object Map]",sl="[object Number]",_s="[object Object]",ol="[object RegExp]",il="[object Set]",al="[object String]",cl="[object Symbol]",ul="[object WeakMap]",ll="[object ArrayBuffer]",fl="[object DataView]",dl="[object Float32Array]",hl="[object Float64Array]",pl="[object Int8Array]",ml="[object Int16Array]",bl="[object Int32Array]",gl="[object Uint8Array]",yl="[object Uint8ClampedArray]",vl="[object Uint16Array]",xl="[object Uint32Array]",ce={};ce[Ds]=ce[Xu]=ce[ll]=ce[fl]=ce[Ju]=ce[el]=ce[dl]=ce[hl]=ce[pl]=ce[ml]=ce[bl]=ce[nl]=ce[sl]=ce[_s]=ce[ol]=ce[il]=ce[al]=ce[cl]=ce[gl]=ce[yl]=ce[vl]=ce[xl]=!0,ce[tl]=ce[Ns]=ce[ul]=!1;function zt(t,e,r,n,s,o){var i;if(i!==void 0)return i;if(!$e(t))return t;var a=wr(t);if(a)i=vu(t);else{var u=Le(t),b=u==Ns||u==rl;if(fs(t))return nu(t);if(u==_s||u==Ds||b&&!s)i=b?{}:zu(t);else{if(!ce[u])return s?t:{};i=Bu(t,u)}}o||(o=new at);var p=o.get(t);if(p)return p;o.set(t,i),Ku(t)?t.forEach(function(l){i.add(zt(l,e,r,l,t,o))}):Gu(t)&&t.forEach(function(l,d){i.set(d,zt(l,e,r,d,t,o))});var y=lu,x=a?void 0:y(t);return Pa(x||t,function(l,d){x&&(d=l,l=t[d]),_a(i,d,zt(l,e,r,d,t,o))}),i}var wl=1,Sl=4;function Tl(t){return zt(t,wl|Sl)}var Nr=function(){return ke.Date.now()},Pl="Expected a function",El=Math.max,Cl=Math.min;function Ct(t,e,r){var n,s,o,i,a,u,b=0,p=!1,y=!1,x=!0;if(typeof t!="function")throw new TypeError(Pl);e=Xn(e)||0,$e(r)&&(p=!!r.leading,y="maxWait"in r,o=y?El(Xn(r.maxWait)||0,e):o,x="trailing"in r?!!r.trailing:x);function l(H){var V=n,B=s;return n=s=void 0,b=H,i=t.apply(B,V),i}function d(H){return b=H,a=setTimeout(v,e),p?l(H):i}function h(H){var V=H-u,B=H-b,L=e-V;return y?Cl(L,o-B):L}function g(H){var V=H-u,B=H-b;return u===void 0||V>=e||V<0||y&&B>=o}function v(){var H=Nr();if(g(H))return k(H);a=setTimeout(v,h(H))}function k(H){return a=void 0,x&&n?l(H):(n=s=void 0,i)}function j(){a!==void 0&&clearTimeout(a),b=0,n=u=s=a=void 0}function D(){return a===void 0?i:k(Nr())}function T(){var H=Nr(),V=g(H);if(n=arguments,s=this,u=H,V){if(a===void 0)return d(u);if(y)return clearTimeout(a),a=setTimeout(v,e),l(u)}return a===void 0&&(a=setTimeout(v,e)),i}return T.cancel=j,T.flush=D,T}var kl="Expected a function";function Ol(t,e,r){var n=!0,s=!0;if(typeof t!="function")throw new TypeError(kl);return $e(r)&&(n="leading"in r?!0:n,s="trailing"in r?!!r.trailing:s),Ct(t,e,{leading:n,maxWait:e,trailing:s})}const Dl=(t,e)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:a,className:u,leftElementClassName:b,rightElementClassName:p,isSingleLine:y=!0,allowSingleLineScroll:x=!1,inputMode:l,placeholder:d,onFocus:h,onBlur:g,onInput:v,onInnerTextChange:k,onInnerHTMLChange:j,onElementCreate:D,onLeftElementClick:T,onRightElementClick:H}=t,V=f.useRef("bsc:grow bsc:focus:outline-hidden"),B=f.useRef("bsc:text-gray-4"),L=f.useRef(void 0),G=f.useCallback(S=>{const C=S.target,W=C.innerHTML;C.className=`${V.current}`,d&&W===d&&(C.innerHTML=""),h?.(S)},[d,h]),X=f.useCallback(S=>{const C=S.target.innerHTML;if(d&&C===""){const W=S.target;W.innerHTML=d,W.className=`${V.current} ${B.current}`}g?.(S)},[d,g]),F=f.useCallback(S=>{L.current?.removeEventListener("focus",G),L.current?.removeEventListener("blur",X),d&&S&&S!==document.activeElement&&S.innerHTML===""&&(S.innerHTML=d,S.className=`${V.current} ${B.current}`),S.addEventListener("focus",G),S.addEventListener("blur",X),L.current=S},[d]),I=f.useCallback(S=>{D?.(S)},[D]),N=S=>{T?.(S)},_=S=>{H?.(S)},A=Ct(S=>{v?.(S),k?.(S.target.innerText),j?.(S.target.innerHTML)},s),U=f.useCallback(S=>{L.current&&(L.current.innerText=S)},[]),Q=f.useCallback(S=>{L.current&&(L.current.innerHTML=S)},[]),Y=f.useCallback(()=>{L.current?.focus()},[]);f.useImperativeHandle(e,()=>({inputElement:L.current,setInnerText:U,setInnerHTML:Q,focus:Y}));const P=te({"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":y&&x,"bsc:overflow-hidden bsc:whitespace-pre":y&&!x},u),c=te("bsc:shrink",{"bsc:mr-2":i},b),w=te("bsc:shrink",{"bsc:ml-2":a},p);return m.jsxs("div",{className:P,ref:S=>{S&&I(S)},children:[i&&m.jsx("div",{className:c,onClick:N,children:i}),m.jsx("div",{ref:S=>{S&&F(S)},className:V.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:l,onInput:A,children:r}),a&&m.jsx("div",{className:w,onClick:_,children:a})]})},Ut=f.forwardRef(Dl);function re(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function ue(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ct(t,e){const r=re(t);return isNaN(e)?ue(t,NaN):(e&&r.setDate(r.getDate()+e),r)}function He(t,e){const r=re(t);if(isNaN(e))return ue(t,NaN);if(!e)return r;const n=r.getDate(),s=ue(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);const o=s.getDate();return n>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const js=6048e5,_r=6e4,jr=36e5,Nl=1e3;let _l={};function kt(){return _l}function Ye(t,e){const r=kt(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=re(t),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function ut(t){return Ye(t,{weekStartsOn:1})}function jl(t){const e=re(t),r=e.getFullYear(),n=ue(t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=ut(n),o=ue(t,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=ut(o);return e.getTime()>=s.getTime()?r+1:e.getTime()>=i.getTime()?r:r-1}function Is(t){const e=re(t);return e.setHours(0,0,0,0),e}function Ms(t){const e=re(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function Il(t){const e=jl(t),r=ue(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),ut(r)}function Ot(t,e){return He(t,e*12)}function Ls(t,e){const r=Is(t),n=Is(e);return+r==+n}function Ml(t){const e=re(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function Ll(t,e){const r=re(t.start),n=re(t.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0);let a=1;const u=[];for(;+i<=o;)u.push(re(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return s?u.reverse():u}function As(t){const e=re(t);return e.setDate(1),e.setHours(0,0,0,0),e}function Al(t,e){const r=re(t.start),n=re(t.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 a=1;const u=[];for(;+i<=o;)u.push(re(i)),i.setFullYear(i.getFullYear()+a);return s?u.reverse():u}const Rl={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"}},Fl=(t,e,r)=>{let n;const s=Rl[t];return typeof s=="string"?n=s:e===1?n=s.one:n=s.other.replace("{{count}}",e.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Ir(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const $l={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Hl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vl={date:Ir({formats:$l,defaultWidth:"full"}),time:Ir({formats:Hl,defaultWidth:"full"}),dateTime:Ir({formats:Yl,defaultWidth:"full"})},Wl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Bl=(t,e,r,n)=>Wl[t];function Dt(t){return(e,r)=>{const n=r?.context?String(r.context):"standalone";let s;if(n==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=r?.width?String(r.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=r?.width?String(r.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const zl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ul={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ql={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"]},Gl={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"]},Ql={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"}},Zl={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"}},Kl={ordinalNumber:(t,e)=>{const r=Number(t),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:Dt({values:zl,defaultWidth:"wide"}),quarter:Dt({values:Ul,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dt({values:ql,defaultWidth:"wide"}),day:Dt({values:Gl,defaultWidth:"wide"}),dayPeriod:Dt({values:Ql,defaultWidth:"wide",formattingValues:Zl,defaultFormattingWidth:"wide"})};function Nt(t){return(e,r={})=>{const n=r.width,s=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(a)?Jl(a,y=>y.test(i)):Xl(a,y=>y.test(i));let b;b=t.valueCallback?t.valueCallback(u):u,b=r.valueCallback?r.valueCallback(b):b;const p=e.slice(i.length);return{value:b,rest:p}}}function Xl(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function Jl(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function ef(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const s=n[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const tf=/^(\d+)(th|st|nd|rd)?/i,rf=/\d+/i,nf={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},sf={any:[/^b/i,/^(a|c)/i]},of={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},af={any:[/1/i,/2/i,/3/i,/4/i]},cf={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},uf={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]},lf={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},ff={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]},df={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},hf={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}},pf={ordinalNumber:ef({matchPattern:tf,parsePattern:rf,valueCallback:t=>parseInt(t,10)}),era:Nt({matchPatterns:nf,defaultMatchWidth:"wide",parsePatterns:sf,defaultParseWidth:"any"}),quarter:Nt({matchPatterns:of,defaultMatchWidth:"wide",parsePatterns:af,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nt({matchPatterns:cf,defaultMatchWidth:"wide",parsePatterns:uf,defaultParseWidth:"any"}),day:Nt({matchPatterns:lf,defaultMatchWidth:"wide",parsePatterns:ff,defaultParseWidth:"any"}),dayPeriod:Nt({matchPatterns:df,defaultMatchWidth:"any",parsePatterns:hf,defaultParseWidth:"any"})},mf={code:"en-US",formatDistance:Fl,formatLong:Vl,formatRelative:Bl,localize:Kl,match:pf,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bf(t){const e=re(t),r=+ut(e)-+Il(e);return Math.round(r/js)+1}function Rs(t,e){const r=re(t),n=r.getFullYear(),s=kt(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=ue(t,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const a=Ye(i,e),u=ue(t,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const b=Ye(u,e);return r.getTime()>=a.getTime()?n+1:r.getTime()>=b.getTime()?n:n-1}function gf(t,e){const r=kt(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=Rs(t,e),o=ue(t,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),Ye(o,e)}function yf(t,e){const r=re(t),n=+Ye(r,e)-+gf(r,e);return Math.round(n/js)+1}const Fs=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},$s=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Hs={p:$s,P:(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Fs(t,e);let o;switch(n){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",Fs(n,e)).replace("{{time}}",$s(s,e))}},vf=/^D+$/,xf=/^Y+$/,wf=["D","DD","YY","YYYY"];function Sf(t){return vf.test(t)}function Tf(t){return xf.test(t)}function Ys(t,e,r){const n=Pf(t,e,r);if(console.warn(n),wf.includes(t))throw new RangeError(n)}function Pf(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Mr(t){return re(t).getDay()}function Vs(t){const e=re(t),r=e.getFullYear(),n=e.getMonth(),s=ue(t,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function Ef(){return Object.assign({},kt())}function Cf(t){let r=re(t).getDay();return r===0&&(r=7),r}function kf(t){const e=re(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(0,0,0,0),e}function Of(t,e){const r=re(t),n=re(e);return+r<+n}function Df(t,e){const r=e instanceof Date?ue(e,0):new e(0);return r.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r}const Nf=10;class Ws{subPriority=0;validate(e,r){return!0}}class _f extends Ws{constructor(e,r,n,s,o){super(),this.value=e,this.validateValue=r,this.setValue=n,this.priority=s,o&&(this.subPriority=o)}validate(e,r){return this.validateValue(e,this.value,r)}set(e,r,n){return this.setValue(e,r,this.value,n)}}class jf extends Ws{priority=Nf;subPriority=-1;set(e,r){return r.timestampIsSet?e:ue(e,Df(e,Date))}}class ne{run(e,r,n,s){const o=this.parse(e,r,n,s);return o?{setter:new _f(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,r,n){return!0}}class If extends ne{priority=140;parse(e,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,r,n){return r.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const be={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}/},De={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 ge(t,e){return t&&{value:e(t.value),rest:t.rest}}function he(t,e){const r=e.match(t);return r?{value:parseInt(r[0],10),rest:e.slice(r[0].length)}:null}function Ne(t,e){const r=e.match(t);if(!r)return null;if(r[0]==="Z")return{value:0,rest:e.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*jr+o*_r+i*Nl),rest:e.slice(r[0].length)}}function Bs(t){return he(be.anyDigitsSigned,t)}function pe(t,e){switch(t){case 1:return he(be.singleDigit,e);case 2:return he(be.twoDigits,e);case 3:return he(be.threeDigits,e);case 4:return he(be.fourDigits,e);default:return he(new RegExp("^\\d{1,"+t+"}"),e)}}function qt(t,e){switch(t){case 1:return he(be.singleDigitSigned,e);case 2:return he(be.twoDigitsSigned,e);case 3:return he(be.threeDigitsSigned,e);case 4:return he(be.fourDigitsSigned,e);default:return he(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Lr(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function zs(t,e){const r=e>0,n=r?e:1-e;let s;if(n<=50)s=t||100;else{const o=n+50,i=Math.trunc(o/100)*100,a=t>=o%100;s=t+i-(a?100:0)}return r?s:1-s}function Us(t){return t%400===0||t%4===0&&t%100!==0}class Mf extends ne{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,r,n){const s=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return ge(pe(4,e),s);case"yo":return ge(n.ordinalNumber(e,{unit:"year"}),s);default:return ge(pe(r.length,e),s)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n){const s=e.getFullYear();if(n.isTwoDigitYear){const i=zs(n.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Lf extends ne{priority=130;parse(e,r,n){const s=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ge(pe(4,e),s);case"Yo":return ge(n.ordinalNumber(e,{unit:"year"}),s);default:return ge(pe(r.length,e),s)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n,s){const o=Rs(e,s);if(n.isTwoDigitYear){const a=zs(n.year,o);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ye(e,s)}const i=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ye(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Af extends ne{priority=130;parse(e,r){return qt(r==="R"?4:r.length,e)}set(e,r,n){const s=ue(e,0);return s.setFullYear(n,0,4),s.setHours(0,0,0,0),ut(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Rf extends ne{priority=130;parse(e,r){return qt(r==="u"?4:r.length,e)}set(e,r,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Ff extends ne{priority=120;parse(e,r,n){switch(r){case"Q":case"QQ":return pe(r.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class $f extends ne{priority=120;parse(e,r,n){switch(r){case"q":case"qq":return pe(r.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Hf extends ne{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,r,n){const s=o=>o-1;switch(r){case"M":return ge(he(be.month,e),s);case"MM":return ge(pe(2,e),s);case"Mo":return ge(n.ordinalNumber(e,{unit:"month"}),s);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}}class Yf extends ne{priority=110;parse(e,r,n){const s=o=>o-1;switch(r){case"L":return ge(he(be.month,e),s);case"LL":return ge(pe(2,e),s);case"Lo":return ge(n.ordinalNumber(e,{unit:"month"}),s);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Vf(t,e,r){const n=re(t),s=yf(n,r)-e;return n.setDate(n.getDate()-s*7),n}class Wf extends ne{priority=100;parse(e,r,n){switch(r){case"w":return he(be.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n,s){return Ye(Vf(e,n,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Bf(t,e){const r=re(t),n=bf(r)-e;return r.setDate(r.getDate()-n*7),r}class zf extends ne{priority=100;parse(e,r,n){switch(r){case"I":return he(be.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n){return ut(Bf(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Uf=[31,28,31,30,31,30,31,31,30,31,30,31],qf=[31,29,31,30,31,30,31,31,30,31,30,31];class Gf extends ne{priority=90;subPriority=1;parse(e,r,n){switch(r){case"d":return he(be.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return pe(r.length,e)}}validate(e,r){const n=e.getFullYear(),s=Us(n),o=e.getMonth();return s?r>=1&&r<=qf[o]:r>=1&&r<=Uf[o]}set(e,r,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Qf extends ne{priority=90;subpriority=1;parse(e,r,n){switch(r){case"D":case"DD":return he(be.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return pe(r.length,e)}}validate(e,r){const n=e.getFullYear();return Us(n)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Ar(t,e,r){const n=kt(),s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=re(t),i=o.getDay(),u=(e%7+7)%7,b=7-s,p=e<0||e>6?e-(i+b)%7:(u+b)%7-(i+b)%7;return ct(o,p)}class Zf extends ne{priority=90;parse(e,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,s){return e=Ar(e,n,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class Kf extends ne{priority=90;parse(e,r,n,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(r){case"e":case"ee":return ge(pe(r.length,e),o);case"eo":return ge(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,s){return e=Ar(e,n,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Xf extends ne{priority=90;parse(e,r,n,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(r){case"c":case"cc":return ge(pe(r.length,e),o);case"co":return ge(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,s){return e=Ar(e,n,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Jf(t,e){const r=re(t),n=Cf(r),s=e-n;return ct(r,s)}class ed extends ne{priority=90;parse(e,r,n){const s=o=>o===0?7:o;switch(r){case"i":case"ii":return pe(r.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return ge(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return ge(n.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ge(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),s);default:return ge(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,r){return r>=1&&r<=7}set(e,r,n){return e=Jf(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class td extends ne{priority=80;parse(e,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(Lr(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class rd extends ne{priority=80;parse(e,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(Lr(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class nd extends ne{priority=80;parse(e,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(Lr(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class sd extends ne{priority=70;parse(e,r,n){switch(r){case"h":return he(be.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,n){const s=e.getHours()>=12;return s&&n<12?e.setHours(n+12,0,0,0):!s&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class od extends ne{priority=70;parse(e,r,n){switch(r){case"H":return he(be.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class id extends ne{priority=70;parse(e,r,n){switch(r){case"K":return he(be.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class ad extends ne{priority=70;parse(e,r,n){switch(r){case"k":return he(be.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,n){const s=n<=24?n%24:n;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class cd extends ne{priority=60;parse(e,r,n){switch(r){case"m":return he(be.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]}class ud extends ne{priority=50;parse(e,r,n){switch(r){case"s":return he(be.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]}class ld extends ne{priority=30;parse(e,r){const n=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ge(pe(r.length,e),n)}set(e,r,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]}class fd extends ne{priority=10;parse(e,r){switch(r){case"X":return Ne(De.basicOptionalMinutes,e);case"XX":return Ne(De.basic,e);case"XXXX":return Ne(De.basicOptionalSeconds,e);case"XXXXX":return Ne(De.extendedOptionalSeconds,e);default:return Ne(De.extended,e)}}set(e,r,n){return r.timestampIsSet?e:ue(e,e.getTime()-Ms(e)-n)}incompatibleTokens=["t","T","x"]}class dd extends ne{priority=10;parse(e,r){switch(r){case"x":return Ne(De.basicOptionalMinutes,e);case"xx":return Ne(De.basic,e);case"xxxx":return Ne(De.basicOptionalSeconds,e);case"xxxxx":return Ne(De.extendedOptionalSeconds,e);default:return Ne(De.extended,e)}}set(e,r,n){return r.timestampIsSet?e:ue(e,e.getTime()-Ms(e)-n)}incompatibleTokens=["t","T","X"]}class hd extends ne{priority=40;parse(e){return Bs(e)}set(e,r,n){return[ue(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class pd extends ne{priority=20;parse(e){return Bs(e)}set(e,r,n){return[ue(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const md={G:new If,y:new Mf,Y:new Lf,R:new Af,u:new Rf,Q:new Ff,q:new $f,M:new Hf,L:new Yf,w:new Wf,I:new zf,d:new Gf,D:new Qf,E:new Zf,e:new Kf,c:new Xf,i:new ed,a:new td,b:new rd,B:new nd,h:new sd,H:new od,K:new id,k:new ad,m:new cd,s:new ud,S:new ld,X:new fd,x:new dd,t:new hd,T:new pd},bd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yd=/^'([^]*?)'?$/,vd=/''/g,xd=/\S/,wd=/[a-zA-Z]/;function _e(t,e,r,n){const s=Ef(),o=n?.locale??s.locale??mf,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(e==="")return t===""?re(r):ue(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o},b=[new jf],p=e.match(gd).map(h=>{const g=h[0];if(g in Hs){const v=Hs[g];return v(h,o.formatLong)}return h}).join("").match(bd),y=[];for(let h of p){!n?.useAdditionalWeekYearTokens&&Tf(h)&&Ys(h,e,t),!n?.useAdditionalDayOfYearTokens&&Sf(h)&&Ys(h,e,t);const g=h[0],v=md[g];if(v){const{incompatibleTokens:k}=v;if(Array.isArray(k)){const D=y.find(T=>k.includes(T.token)||T.token===g);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${h}\` at the same time`)}else if(v.incompatibleTokens==="*"&&y.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);y.push({token:g,fullToken:h});const j=v.run(t,h,o.match,u);if(!j)return ue(r,NaN);b.push(j.setter),t=j.rest}else{if(g.match(wd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");if(h==="''"?h="'":g==="'"&&(h=Sd(h)),t.indexOf(h)===0)t=t.slice(h.length);else return ue(r,NaN)}}if(t.length>0&&xd.test(t))return ue(r,NaN);const x=b.map(h=>h.priority).sort((h,g)=>g-h).filter((h,g,v)=>v.indexOf(h)===g).map(h=>b.filter(g=>g.priority===h).sort((g,v)=>v.subPriority-g.subPriority)).map(h=>h[0]);let l=re(r);if(isNaN(l.getTime()))return ue(r,NaN);const d={};for(const h of x){if(!h.validate(l,u))return ue(r,NaN);const g=h.set(l,d,u);Array.isArray(g)?(l=g[0],Object.assign(d,g[1])):l=g}return ue(r,l)}function Sd(t){return t.match(yd)[1].replace(vd,"'")}function Td(t){return Ls(t,Date.now())}function Pd(t,e){return ct(t,-e)}function Ed(t,e){let r=e-Mr(t);return r<=0&&(r+=7),ct(t,r)}function Cd(t,e){const n=Nd(t);let s;if(n.date){const u=_d(n.date,2);s=jd(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let i=0,a;if(n.time&&(i=Id(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(a=Md(n.timezone),isNaN(a))return new Date(NaN)}else{const u=new Date(o+i),b=new Date(0);return b.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),b.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),b}return new Date(o+i+a)}const Gt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},kd=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Od=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nd(t){const e={},r=t.split(Gt.dateTimeDelimiter);let n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],Gt.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Gt.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){const s=Gt.timezone.exec(n);s?(e.time=n.replace(s[1],""),e.timezone=s[1]):e.time=n}return e}function _d(t,e){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.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:t.slice((n[1]||n[2]).length)}}function jd(t,e){if(e===null)return new Date(NaN);const r=t.match(kd);if(!r)return new Date(NaN);const n=!!r[4],s=_t(r[1]),o=_t(r[2])-1,i=_t(r[3]),a=_t(r[4]),u=_t(r[5])-1;if(n)return $d(e,a,u)?Ld(e,a,u):new Date(NaN);{const b=new Date(0);return!Rd(e,o,i)||!Fd(e,s)?new Date(NaN):(b.setUTCFullYear(e,o,Math.max(s,i)),b)}}function _t(t){return t?parseInt(t):1}function Id(t){const e=t.match(Od);if(!e)return NaN;const r=Rr(e[1]),n=Rr(e[2]),s=Rr(e[3]);return Hd(r,n,s)?r*jr+n*_r+s*1e3:NaN}function Rr(t){return t&&parseFloat(t.replace(",","."))||0}function Md(t){if(t==="Z")return 0;const e=t.match(Dd);if(!e)return 0;const r=e[1]==="+"?-1:1,n=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return Yd(n,s)?r*(n*jr+s*_r):NaN}function Ld(t,e,r){const n=new Date(0);n.setUTCFullYear(t,0,4);const s=n.getUTCDay()||7,o=(e-1)*7+r+1-s;return n.setUTCDate(n.getUTCDate()+o),n}const Ad=[31,null,31,30,31,30,31,31,30,31,30,31];function qs(t){return t%400===0||t%4===0&&t%100!==0}function Rd(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(Ad[e]||(qs(t)?29:28))}function Fd(t,e){return e>=1&&e<=(qs(t)?366:365)}function $d(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function Hd(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function Yd(t,e){return e>=0&&e<=59}function Vd(t,e){const r=re(t),n=r.getFullYear(),s=r.getDate(),o=ue(t,0);o.setFullYear(n,e,15),o.setHours(0,0,0,0);const i=Vs(o);return r.setMonth(e,Math.min(s,i)),r}function Wd(t,e){const r=re(t);return isNaN(+r)?ue(t,NaN):(r.setFullYear(e),r)}function Fr(t,e){return He(t,-e)}function $r(t,e){return Ot(t,-e)}function Bd(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function zd(t,e,r){const n=[];for(let s=t;s<=e;s++)n.push(r?r(s):s);return n}function Ud(t,e){const r=t.target;return r?!e.isSameNode(r)&&!e.contains(r):!1}function qd(t,e){return t.isSameNode(e)||t.contains(e)}function Gd(t,e){const r=Object.entries(e),n=getComputedStyle(t);for(let s=0,o=r.length;s<o;s++){const[i,a]=r[s];if(typeof a=="string"&&a.indexOf(",")>-1){if(!a.split(",").map(b=>b.trim()).includes(n[i]))return!1}else if(n[i]!==a)return!1}return!0}function Qd(t,e){const r=Object.entries(e),n=getComputedStyle(t);for(let s=0,o=r.length;s<o;s++){const[i,a]=r[s];if(typeof a=="string"&&a.indexOf(",")>-1){if(a.split(",").map(b=>b.trim()).includes(n[i]))return!0}else if(n[i]===a)return!0}return!1}function Gs(t,e,r=!1,n){if(r&&Gd(t,e)){if(!n||n?.(t)===!0)return t}else if(!r&&Qd(t,e)&&(!n||n?.(t)===!0))return t;return t.parentElement?Gs(t.parentElement,e,r,n):t}function Qs(t,e){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,o=r.length;s<o;s++){const i=getComputedStyle(r[s]);i[t]&&e(i[t])&&n.push(i[t])}return n}function hp(t){return t}function Zd(t){const e=document.documentElement;Object.keys(t).forEach(r=>{e.style.setProperty(r,t[r])})}function Kd(t){return{"--theme-bsc-primary-1":t.primary1,"--theme-bsc-primary-2":t.primary2,"--theme-bsc-primary-3":t.primary3,"--theme-bsc-primary-4":t.primary4,"--theme-bsc-primary-5":t.primary5,"--theme-bsc-gray-1":t.gray1||"#303030","--theme-bsc-gray-2":t.gray2||"#5f5f5f","--theme-bsc-gray-3":t.gray3||"#8f8f8f","--theme-bsc-gray-4":t.gray4||"#bebebe","--theme-bsc-gray-5":t.gray5||"#eee","--theme-bsc-black":t.black||"#000","--theme-bsc-white":t.white||"#fff","--theme-bsc-mono-dark-1":t.monoDark1||"#222","--theme-bsc-mono-dark-2":t.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":t.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":t.monoLight1||"#fefefe","--theme-bsc-mono-light-2":t.monoLight2||"#eee","--theme-bsc-mono-light-3":t.monoLight3||"#ccc","--theme-bsc-info":t.info||"#2e7ff8","--theme-bsc-success":t.success||"#53ae0c","--theme-bsc-warning":t.warning||"#ff6914","--theme-bsc-error":t.error||"#f01616"}}var Te=(t=>(t[t.Regular=24]="Regular",t[t.Small=20]="Small",t))(Te||{});const Zs=({className:t})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:m.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"})}),Xd=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Jd=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},eh=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},th=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},rh=({className:t})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ce=({icon:t,size:e=Te.Regular,onClick:r,className:n})=>{const s=f.useRef({calendar:Zs,chevronDown:Xd,chevronLeft:Jd,chevronRight:eh,chevronUp:th,close:rh}),o=f.useMemo(()=>s.current[t]||Zs,[t]),i=te({"bsc:h-[24px] bsc:w-[24px]":e===Te.Regular,"bsc:h-[20px] bsc:w-[20px]":e===Te.Small},n);return m.jsx("div",{onClick:r,children:m.jsx(o,{className:i})})},qe=({template:t,props:e,children:r})=>t(e,r);function nh(t,e){if(e===t)return!1;const r=Object.values(e),n=Object.values(t);if(r.length!==n.length||r.some((o,i)=>o!==n[i]))return!0;const s=Object.keys(t);return Object.keys(e).some((o,i)=>o!==s[i])}function sh(t,e){return t.matches[e]=!1,t.mediaQueries[e]={},t}function Ks(t){const e=Object.keys(t);return typeof window>"u"?e.reduce(sh,{mediaQueries:{},matches:{}}):e.reduce((r,n)=>{const s=window.matchMedia(t[n]);return r.mediaQueries[n]=s,r.matches[n]=s.matches,r},{mediaQueries:{},matches:{}})}function oh(t,e){function r(n,s){return n[s]=t.mediaQueries[s].matches,n}switch(e.type){case"updateMatches":return{matches:Object.keys(t.mediaQueries).reduce(r,{}),mediaQueries:t.mediaQueries};case"setQueries":return Ks(e.queries)}}function ih(t){const e=pt.useRef(t),[r,n]=pt.useReducer(oh,t,Ks);pt.useEffect(()=>{nh(t,e.current)&&(n({type:"setQueries",queries:t}),e.current=t)},[t]);function s(){return n({type:"updateMatches"})}function o(u){const b=s;return typeof u.addListener<"u"?u.addListener(b):u.addEventListener("change",b),b}pt.useEffect(()=>{const u=Object.values(r.mediaQueries),b=u.map(o);function p(y,x){typeof y.addListener<"u"?y.removeListener(b[x]):y.removeEventListener("change",b[x])}return()=>{u.forEach(p)}},[r.mediaQueries]);const{matches:i}=r,a=pt.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:a.some(Boolean),matchesAll:a.length>0&&a.every(Boolean)}}function Qt(t){return ih(ah(t)).matchesAll}const Hr={};function ah(t){return Hr[t]===void 0&&(Hr[t]={default:t}),Hr[t]}const Yr=({mobileQuery:t="screen and (max-device-width: 40rem)",tabletQuery:e="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 a=Qt(t),u=Qt(e),b=Qt(r);return a&&n?n:!a&&s?s:u&&o?o:b&&i?i:(console.error("Invalid media settings"),null)};function Xs(t,e,r){const n=o=>{const i=o.target,a=t.style.display!=="hidden";t&&a&&!qd(t,i)&&!s(r,i)&&e(!1),e(!0)},s=(o,i)=>{if(!o)return!1;for(let a=0,u=o.length;a<u;a++)if(o[a].isSameNode(i)||o[a].contains(i))return!0;return!1};return document.addEventListener("mousedown",n),n}function Js(t){document.removeEventListener("mousedown",t)}function ch(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Vr(t,e){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Vr(t,e)}function uh(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Vr(t,e)}var Zt={exports:{}},Kt={exports:{}},oe={};var eo;function lh(){if(eo)return oe;eo=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,b=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,y=t?Symbol.for("react.suspense"):60113,x=t?Symbol.for("react.suspense_list"):60120,l=t?Symbol.for("react.memo"):60115,d=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function j(T){if(typeof T=="object"&&T!==null){var H=T.$$typeof;switch(H){case e:switch(T=T.type,T){case u:case b:case n:case o:case s:case y:return T;default:switch(T=T&&T.$$typeof,T){case a:case p:case d:case l:case i:return T;default:return H}}case r:return H}}}function D(T){return j(T)===b}return oe.AsyncMode=u,oe.ConcurrentMode=b,oe.ContextConsumer=a,oe.ContextProvider=i,oe.Element=e,oe.ForwardRef=p,oe.Fragment=n,oe.Lazy=d,oe.Memo=l,oe.Portal=r,oe.Profiler=o,oe.StrictMode=s,oe.Suspense=y,oe.isAsyncMode=function(T){return D(T)||j(T)===u},oe.isConcurrentMode=D,oe.isContextConsumer=function(T){return j(T)===a},oe.isContextProvider=function(T){return j(T)===i},oe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},oe.isForwardRef=function(T){return j(T)===p},oe.isFragment=function(T){return j(T)===n},oe.isLazy=function(T){return j(T)===d},oe.isMemo=function(T){return j(T)===l},oe.isPortal=function(T){return j(T)===r},oe.isProfiler=function(T){return j(T)===o},oe.isStrictMode=function(T){return j(T)===s},oe.isSuspense=function(T){return j(T)===y},oe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===b||T===o||T===s||T===y||T===x||typeof T=="object"&&T!==null&&(T.$$typeof===d||T.$$typeof===l||T.$$typeof===i||T.$$typeof===a||T.$$typeof===p||T.$$typeof===g||T.$$typeof===v||T.$$typeof===k||T.$$typeof===h)},oe.typeOf=j,oe}var ie={};var to;function fh(){return to||(to=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,b=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,y=t?Symbol.for("react.suspense"):60113,x=t?Symbol.for("react.suspense_list"):60120,l=t?Symbol.for("react.memo"):60115,d=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function j(O){return typeof O=="string"||typeof O=="function"||O===n||O===b||O===o||O===s||O===y||O===x||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===l||O.$$typeof===i||O.$$typeof===a||O.$$typeof===p||O.$$typeof===g||O.$$typeof===v||O.$$typeof===k||O.$$typeof===h)}function D(O){if(typeof O=="object"&&O!==null){var Pe=O.$$typeof;switch(Pe){case e:var Re=O.type;switch(Re){case u:case b:case n:case o:case s:case y:return Re;default:var rr=Re&&Re.$$typeof;switch(rr){case a:case p:case d:case l:case i:return rr;default:return Pe}}case r:return Pe}}}var T=u,H=b,V=a,B=i,L=e,G=p,X=n,F=d,I=l,N=r,_=o,A=s,U=y,Q=!1;function Y(O){return Q||(Q=!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.")),P(O)||D(O)===u}function P(O){return D(O)===b}function c(O){return D(O)===a}function w(O){return D(O)===i}function S(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function C(O){return D(O)===p}function W(O){return D(O)===n}function M(O){return D(O)===d}function E(O){return D(O)===l}function $(O){return D(O)===r}function q(O){return D(O)===o}function Z(O){return D(O)===s}function R(O){return D(O)===y}ie.AsyncMode=T,ie.ConcurrentMode=H,ie.ContextConsumer=V,ie.ContextProvider=B,ie.Element=L,ie.ForwardRef=G,ie.Fragment=X,ie.Lazy=F,ie.Memo=I,ie.Portal=N,ie.Profiler=_,ie.StrictMode=A,ie.Suspense=U,ie.isAsyncMode=Y,ie.isConcurrentMode=P,ie.isContextConsumer=c,ie.isContextProvider=w,ie.isElement=S,ie.isForwardRef=C,ie.isFragment=W,ie.isLazy=M,ie.isMemo=E,ie.isPortal=$,ie.isProfiler=q,ie.isStrictMode=Z,ie.isSuspense=R,ie.isValidElementType=j,ie.typeOf=D})()),ie}var ro;function no(){return ro||(ro=1,process.env.NODE_ENV==="production"?Kt.exports=lh():Kt.exports=fh()),Kt.exports}var Wr,so;function dh(){if(so)return Wr;so=1;var t=Object.getOwnPropertySymbols,e=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={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(i).map(function(p){return i[p]});if(u.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(p){b[p]=p}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wr=s()?Object.assign:function(o,i){for(var a,u=n(o),b,p=1;p<arguments.length;p++){a=Object(arguments[p]);for(var y in a)e.call(a,y)&&(u[y]=a[y]);if(t){b=t(a);for(var x=0;x<b.length;x++)r.call(a,b[x])&&(u[b[x]]=a[b[x]])}}return u},Wr}var Br,oo;function zr(){if(oo)return Br;oo=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Br=t,Br}var Ur,io;function ao(){return io||(io=1,Ur=Function.call.bind(Object.prototype.hasOwnProperty)),Ur}var qr,co;function hh(){if(co)return qr;co=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=zr(),r={},n=ao();t=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,a,u,b){if(process.env.NODE_ENV!=="production"){for(var p in o)if(n(o,p)){var y;try{if(typeof o[p]!="function"){var x=Error((u||"React class")+": "+a+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}y=o[p](i,p,u,a,null,e)}catch(d){y=d}if(y&&!(y instanceof Error)&&t((u||"React class")+": type specification of "+a+" `"+p+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in r)){r[y.message]=!0;var l=b?b():"";t("Failed "+a+" type: "+y.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},qr=s,qr}var Gr,uo;function ph(){if(uo)return Gr;uo=1;var t=no(),e=dh(),r=zr(),n=ao(),s=hh(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Gr=function(a,u){var b=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function y(P){var c=P&&(b&&P[b]||P[p]);if(typeof c=="function")return c}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:k(),arrayOf:j,element:D(),elementType:T(),instanceOf:H,node:G(),objectOf:B,oneOf:V,oneOfType:L,shape:F,exact:I};function d(P,c){return P===c?P!==0||1/P===1/c:P!==P&&c!==c}function h(P,c){this.message=P,this.data=c&&typeof c=="object"?c:{},this.stack=""}h.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var c={},w=0;function S(W,M,E,$,q,Z,R){if($=$||x,Z=Z||E,R!==r){if(u){var O=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 O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=$+":"+E;!c[Pe]&&w<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+$+"`. 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."),c[Pe]=!0,w++)}}return M[E]==null?W?M[E]===null?new h("The "+q+" `"+Z+"` is marked as required "+("in `"+$+"`, but its value is `null`.")):new h("The "+q+" `"+Z+"` is marked as required in "+("`"+$+"`, but its value is `undefined`.")):null:P(M,E,$,q,Z)}var C=S.bind(null,!1);return C.isRequired=S.bind(null,!0),C}function v(P){function c(w,S,C,W,M,E){var $=w[S],q=A($);if(q!==P){var Z=U($);return new h("Invalid "+W+" `"+M+"` of type "+("`"+Z+"` supplied to `"+C+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(c)}function k(){return g(i)}function j(P){function c(w,S,C,W,M){if(typeof P!="function")return new h("Property `"+M+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var E=w[S];if(!Array.isArray(E)){var $=A(E);return new h("Invalid "+W+" `"+M+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an array."))}for(var q=0;q<E.length;q++){var Z=P(E,q,C,W,M+"["+q+"]",r);if(Z instanceof Error)return Z}return null}return g(c)}function D(){function P(c,w,S,C,W){var M=c[w];if(!a(M)){var E=A(M);return new h("Invalid "+C+" `"+W+"` of type "+("`"+E+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return g(P)}function T(){function P(c,w,S,C,W){var M=c[w];if(!t.isValidElementType(M)){var E=A(M);return new h("Invalid "+C+" `"+W+"` of type "+("`"+E+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return g(P)}function H(P){function c(w,S,C,W,M){if(!(w[S]instanceof P)){var E=P.name||x,$=Y(w[S]);return new h("Invalid "+W+" `"+M+"` of type "+("`"+$+"` supplied to `"+C+"`, expected ")+("instance of `"+E+"`."))}return null}return g(c)}function V(P){if(!Array.isArray(P))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 c(w,S,C,W,M){for(var E=w[S],$=0;$<P.length;$++)if(d(E,P[$]))return null;var q=JSON.stringify(P,function(R,O){var Pe=U(O);return Pe==="symbol"?String(O):O});return new h("Invalid "+W+" `"+M+"` of value `"+String(E)+"` "+("supplied to `"+C+"`, expected one of "+q+"."))}return g(c)}function B(P){function c(w,S,C,W,M){if(typeof P!="function")return new h("Property `"+M+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var E=w[S],$=A(E);if($!=="object")return new h("Invalid "+W+" `"+M+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an object."));for(var q in E)if(n(E,q)){var Z=P(E,q,C,W,M+"."+q,r);if(Z instanceof Error)return Z}return null}return g(c)}function L(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var c=0;c<P.length;c++){var w=P[c];if(typeof w!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(w)+" at index "+c+"."),i}function S(C,W,M,E,$){for(var q=[],Z=0;Z<P.length;Z++){var R=P[Z],O=R(C,W,M,E,$,r);if(O==null)return null;O.data&&n(O.data,"expectedType")&&q.push(O.data.expectedType)}var Pe=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new h("Invalid "+E+" `"+$+"` supplied to "+("`"+M+"`"+Pe+"."))}return g(S)}function G(){function P(c,w,S,C,W){return N(c[w])?null:new h("Invalid "+C+" `"+W+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return g(P)}function X(P,c,w,S,C){return new h((P||"React class")+": "+c+" type `"+w+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function F(P){function c(w,S,C,W,M){var E=w[S],$=A(E);if($!=="object")return new h("Invalid "+W+" `"+M+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));for(var q in P){var Z=P[q];if(typeof Z!="function")return X(C,W,M,q,U(Z));var R=Z(E,q,C,W,M+"."+q,r);if(R)return R}return null}return g(c)}function I(P){function c(w,S,C,W,M){var E=w[S],$=A(E);if($!=="object")return new h("Invalid "+W+" `"+M+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));var q=e({},w[S],P);for(var Z in q){var R=P[Z];if(n(P,Z)&&typeof R!="function")return X(C,W,M,Z,U(R));if(!R)return new h("Invalid "+W+" `"+M+"` key `"+Z+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(w[S],null," ")+`
|
|
12
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var O=R(E,Z,C,W,M+"."+Z,r);if(O)return O}return null}return g(c)}function N(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(N);if(P===null||a(P))return!0;var c=y(P);if(c){var w=c.call(P),S;if(c!==P.entries){for(;!(S=w.next()).done;)if(!N(S.value))return!1}else for(;!(S=w.next()).done;){var C=S.value;if(C&&!N(C[1]))return!1}}else return!1;return!0;default:return!1}}function _(P,c){return P==="symbol"?!0:c?c["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&c instanceof Symbol:!1}function A(P){var c=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":_(c,P)?"symbol":c}function U(P){if(typeof P>"u"||P===null)return""+P;var c=A(P);if(c==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return c}function Q(P){var c=U(P);switch(c){case"array":case"object":return"an "+c;case"boolean":case"date":case"regexp":return"a "+c;default:return c}}function Y(P){return!P.constructor||!P.constructor.name?x:P.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Gr}var Qr,lo;function mh(){if(lo)return Qr;lo=1;var t=zr();function e(){}function r(){}return r.resetWarningCache=e,Qr=function(){function n(i,a,u,b,p,y){if(y!==t){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:e};return o.PropTypes=o,o},Qr}var fo;function bh(){if(fo)return Zt.exports;if(fo=1,process.env.NODE_ENV!=="production"){var t=no(),e=!0;Zt.exports=ph()(t.isElement,e)}else Zt.exports=mh()();return Zt.exports}var gh=bh();const J=or(gh),ho={disabled:!1};var yh=process.env.NODE_ENV!=="production"?J.oneOfType([J.number,J.shape({enter:J.number,exit:J.number,appear:J.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&J.oneOfType([J.string,J.shape({enter:J.string,exit:J.string,active:J.string}),J.shape({enter:J.string,enterDone:J.string,enterActive:J.string,exit:J.string,exitDone:J.string,exitActive:J.string})]);const po=f.createContext(null);var vh=function(e){return e.scrollTop},jt="unmounted",Ge="exited",Qe="entering",lt="entered",Zr="exiting",Ae=(function(t){uh(e,t);function e(n,s){var o;o=t.call(this,n,s)||this;var i=s,a=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?a?(u=Ge,o.appearStatus=Qe):u=lt:n.unmountOnExit||n.mountOnEnter?u=jt:u=Ge,o.state={status:u},o.nextCallback=null,o}e.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===jt?{status:Ge}:null};var r=e.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!==Qe&&i!==lt&&(o=Qe):(i===Qe||i===lt)&&(o=Zr)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,a;return o=i=a=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,a=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:a}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Qe){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:ht.findDOMNode(this);i&&vh(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ge&&this.setState({status:jt})},r.performEnter=function(s){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:s,u=this.props.nodeRef?[a]:[ht.findDOMNode(this),a],b=u[0],p=u[1],y=this.getTimeouts(),x=a?y.appear:y.enter;if(!s&&!i||ho.disabled){this.safeSetState({status:lt},function(){o.props.onEntered(b)});return}this.props.onEnter(b,p),this.safeSetState({status:Qe},function(){o.props.onEntering(b,p),o.onTransitionEnd(x,function(){o.safeSetState({status:lt},function(){o.props.onEntered(b,p)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:ht.findDOMNode(this);if(!o||ho.disabled){this.safeSetState({status:Ge},function(){s.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Zr},function(){s.props.onExiting(a),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ge},function(){s.props.onExited(a)})})})},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(a){i&&(i=!1,o.nextCallback=null,s(a))},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:ht.findDOMNode(this),a=s==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],b=u[0],p=u[1];this.props.addEndListener(b,p)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===jt)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 a=ch(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return f.createElement(po.Provider,{value:null},typeof i=="function"?i(s,a):f.cloneElement(f.Children.only(i),a))},e})(f.Component);Ae.contextType=po,Ae.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:J.shape({current:typeof Element>"u"?J.any:function(t,e,r,n,s,o){var i=t[e];return J.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(t,e,r,n,s,o)}}),children:J.oneOfType([J.func.isRequired,J.element.isRequired]).isRequired,in:J.bool,mountOnEnter:J.bool,unmountOnExit:J.bool,appear:J.bool,enter:J.bool,exit:J.bool,timeout:function(e){var r=yh;e.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,[e].concat(s))},addEndListener:J.func,onEnter:J.func,onEntering:J.func,onEntered:J.func,onExit:J.func,onExiting:J.func,onExited:J.func}:{};function ft(){}Ae.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ft,onEntering:ft,onEntered:ft,onExit:ft,onExiting:ft,onExited:ft},Ae.UNMOUNTED=jt,Ae.EXITED=Ge,Ae.ENTERING=Qe,Ae.ENTERED=lt,Ae.EXITING=Zr;const mo=({start:t,timeout:e=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:a,onEntered:u,onExit:b,onExited:p,children:y})=>{const x=r||{transition:`opacity ${e}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${e}ms ${o}`,opacity:0},exited:{transition:`opacity ${e}ms ${o}`,opacity:0},unmounted:{}};return m.jsx(Ae,{in:t,timeout:e,onEntering:a,onEntered:u,onExit:b,onExited:p,unmountOnExit:i,children:d=>y({state:d,defaultStyle:x,transitionStyles:l})})};function bo(t){return t.target?t.target:t}const go=({visible:t,target:e,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:a="DONE",shown:u,hidden:b,isClickedWithin:p,children:y})=>{const[x,l]=f.useState(-1),[d,h]=f.useState(-1),[g,v]=f.useState(t),k=f.useRef(100),j=f.useRef(101),D=f.useRef(void 0),T=f.useRef(void 0),H=f.useRef(void 0);f.useEffect(()=>{e&&(D.current=bo(e));const I=Qs("zIndex",N=>N==="auto"||N==="-1"?!1:parseInt(N)>100).map(N=>parseInt(N,10));I.length>0&&(k.current=Math.max(...I)+1,j.current=Math.max(...I)+2),v(t)},[t,e]);const V=I=>{T.current=I},B=()=>{h(k.current),l(j.current)},L=()=>{if(!T.current)return;u?.();let I;D.current&&(I=[D.current]);const N=_=>{_?p?.():v(!1)};H.current=Xs(T.current,N,I)},G=()=>{H.current&&Js(H.current)},X=()=>{h(-1),l(-1),b?.()},F={entering:{opacity:.5},entered:{opacity:.5}};return ht.createPortal(m.jsx(mo,{start:g,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:B,onEntered:L,onExit:G,onExited:X,unmountOnExit:n,children:({state:I,defaultStyle:N,transitionStyles:_})=>m.jsxs("div",{ref:A=>{A&&V(A)},children:[m.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:d,..._[I],...F[I]}}),m.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,..._[I]},children:[m.jsx("div",{className:"bsc:w-full",children:y}),m.jsx(m.Fragment,{children:m.jsx(Oe,{buttonType:"primary",fullWidth:!0,onClick:()=>v(!1),className:"bsc:text-xs bsc:font-bold",children:a})})]})]})}),r)};var yo=(t=>(t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomLeft=2]="BottomLeft",t[t.BottomRight=3]="BottomRight",t))(yo||{}),vo=(t=>(t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomLeft=2]="BottomLeft",t[t.BottomRight=3]="BottomRight",t))(vo||{});class fe{static positionToTarget(e,r=2){const n=e.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(e,r,n=0,s=2){let{left:o,top:i}=fe.positionToTarget(r,s);const a=e.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-a.width;break;case 2:i=i-a.height;break;case 3:i=i-a.height,o=o-a.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(e,r){const n=fe.getScreenDimensions(),s=e.getBoundingClientRect(),o=fe.positionElementToTarget(e,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||fe.positionElementToTarget(e,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const a=fe.positionElementToTarget(e,r,2,0);if(a.left+s.width<n.width&&a.top>=0)return!0;const u=fe.positionElementToTarget(e,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(e){const r=fe.getScreenDimensions(),n=e.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(e,r,n=0,s=2){const{left:o,top:i}=fe.positionElementToTarget(e,r,n,s),a=e.getBoundingClientRect(),u=fe.determineOffScreenLocation(a);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return fe.positionElementToTarget(e,r,1,3);if(u.bottom&&!u.right)return fe.positionElementToTarget(e,r,2,0);if(u.right&&u.bottom)return fe.positionElementToTarget(e,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return fe.positionElementToTarget(e,r,0,2);if(u.bottom&&!u.left)return fe.positionElementToTarget(e,r,3,1);if(u.left&&u.bottom)return fe.positionElementToTarget(e,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(e){const r=fe.getScreenDimensions(),n={left:e.left<0,top:e.top<0,right:e.left+e.width>r.width,bottom:e.top+e.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 xo=({visible:t,target:e,targetPosition:r=yo.BottomLeft,elementAlignment:n=vo.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:a=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:b=!1,transitionDuration:p=400,showTransitionOptions:y="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:l,hidden:d,isClickedWithin:h,markupCreated:g,children:v})=>{const[k,j]=f.useState(-1),[D,T]=f.useState(t),[H,V]=f.useState(!1),B=f.useRef(!1),L=f.useRef(100),G=f.useRef({left:0,top:0,width:0}),X=f.useRef(void 0),F=f.useRef(void 0),I=f.useRef(void 0),N=f.useRef(void 0),_=f.useRef(void 0),A=f.useRef(void 0),U=un();f.useEffect(()=>(u===!0&&(A.current=new ResizeObserver(Q)),()=>{u===!0&&(F.current&&A.current?.unobserve(F.current),A.current?.disconnect())}),[]),f.useEffect(()=>{if(e&&(X.current=bo(e),i)){const M=U?.isValidScrollableElement;I.current=Gs(X.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,M),I.current.tagName.toLowerCase()==="html"&&(I.current=document)}if(a){const M=Qs("zIndex",E=>parseInt(E)>=100).map(E=>parseInt(E));M.length>0&&(L.current=Math.max(...M)+1)}t!==void 0&&T(t)},[e,t,i,a]);const Q=M=>{if(F.current){const E=fe.getScreenDimensions(),$=M[M.length-1].target,q=$.getBoundingClientRect(),Z=fe.determineOffScreenLocation(q);if(Z){if(X.current&&fe.canPositionElementOnScreenWithTarget($,X.current)){const R=fe.positionElementToTargetOnScreen(F.current,X.current,n,r);G.current={...G.current,...R}}else Z.right?G.current.left=E.width-q.width:Z.left&&(G.current.left=0),Z.bottom?G.current.top=E.height-q.height:Z.top&&(G.current.top=0);Y()}}},Y=Ct(()=>{B.current=!B.current,V(B.current)},20),P=()=>{j(L.current)},c=()=>{if(!F.current)return;l?.();let M;!s&&X.current&&(M=[X.current]);const E=$=>{$?h?.():T(!1)};N.current=Xs(F.current,E,M),i&&(_.current=Ol($=>F.current&&Ud($,F.current)&&T(!1),100,{leading:!0}),I.current&&I.current.addEventListener("scroll",_.current))},w=()=>{I.current&&_.current&&(I.current.removeEventListener("scroll",_.current),_.current=void 0),N.current&&Js(N.current)},S=()=>{j(-1),d?.()},C=M=>{if(u===!0&&F.current&&A.current?.unobserve(F.current),F.current=M,g?.(M),X.current){const E=fe.positionElementToTarget(F.current,X.current,n,r);G.current={...E,width:X.current.offsetWidth},u===!0&&(fe.canPositionElementOnScreenWithTarget(F.current,X.current)||fe.canPositionElementOnScreen(F.current))&&A.current?.observe(F.current)}},W=f.useMemo(()=>{const M={top:`${G.current.top}px`,left:`${G.current.left}px`,zIndex:k};return o&&(M.width=`${G.current.width}px`),M},[H,k,o]);return m.jsx(mo,{start:D,timeout:p,showTransitionOptions:y,hideTransitionOptions:x,onEntering:P,onEntered:c,onExit:w,onExited:S,unmountOnExit:b,children:({state:M,defaultStyle:E,transitionStyles:$})=>m.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:{...W,...E,...$[M]},ref:q=>{q&&C(q)},children:v})})};let Xt;const xh=new Uint8Array(16);function wh(){if(!Xt&&(Xt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xt(xh)}const ve=[];for(let t=0;t<256;++t)ve.push((t+256).toString(16).slice(1));function Sh(t,e=0){return ve[t[e+0]]+ve[t[e+1]]+ve[t[e+2]]+ve[t[e+3]]+"-"+ve[t[e+4]]+ve[t[e+5]]+"-"+ve[t[e+6]]+ve[t[e+7]]+"-"+ve[t[e+8]]+ve[t[e+9]]+"-"+ve[t[e+10]]+ve[t[e+11]]+ve[t[e+12]]+ve[t[e+13]]+ve[t[e+14]]+ve[t[e+15]]}const wo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Th(t,e,r){if(wo.randomUUID&&!t)return wo.randomUUID();t=t||{};const n=t.random||(t.rng||wh)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Sh(n)}class It{static create(e){const r=[];let n=0;for(let s=0,o=e.formatParts.length;s<o;s++){const i=e.formatParts[s],a=n,u=a+i.characterCount;r.push({startPosition:a,endPosition:u,...i}),n=u}return r}}class Ph{instanceCollection;formatPartList;inputSlotCollection;currentPartIndex=0;currentPartIndices=[];currentCursorPosition=0;highlightCursorPosition=0;currentCursorStartPosition=-1;currentCursorEndPosition=-1;inputElement;inputSelection=null;inputRange;textNode;constructor(e,r){this.instanceCollection=Mt.getInstance(),this.formatPartList=It.create(e),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,e)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){const e=this.inputSlotCollection.getLastSlot();return this.isSelection&&this.inputRange?.startOffset===0&&this.inputRange.endOffset===e.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(e){this.inputElement=e}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(e){this.setCursorSelection(e)}setCursorSelection(e,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=e,s=e):e<r?(n=e,s=r):(o=!1,n=r,s=e),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(){const e=window.getSelection(),r=e?.getRangeAt(0);if(this.inputElement&&e&&r){const n=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,a=>{const u=document.createRange();return u.selectNodeContents(a),u.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let s=0;for(;n.nextNode();)s+=n.currentNode.textContent?.length||0;r.startContainer.nodeType===Node.TEXT_NODE&&(s+=r.startOffset);const o=this.inputSlotCollection.getLastSlotWithData(),i=o.startPosition+o.partText.length;e.anchorOffset===e.focusOffset?this.setCursorSelection(s>i?i:s):this.setCursorSelection(e.anchorOffset,e.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const e=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(e.startPosition)}moveEnd(){const e=this.inputSlotCollection.getLastSlotWithData(),r=e.startPosition+e.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const e=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(e>=r.startPosition&&e<=r.endPosition)this.setCursorSelection(e);else for(let n=this.currentPartIndex-1;n>=0;n--)if(r=this.formatPartList[n],e>=r.startPosition&&e<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(e);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const e=this.inputSlotCollection.getLastSlotWithData(),r=e.startPosition+e.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 e=this.findNextEditablePart();e&&(this.currentPartIndex=e.partIndex,this.setCursorSelection(e.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const e=this.findPreviousEditablePart();e&&(this.currentPartIndex=e.partIndex,this.setCursorSelection(e.endPosition))}}highlightAll(){const e=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,e)}moveHighlightLeft(){this.updateHighlightPositions();const e=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||e){let r=e?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=e?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||e&&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||e&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(e?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 e=this.inputSlotCollection.getLastSlotWithData(),r=e.startPosition+e.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 a=this.currentPartIndex+1,u=this.formatPartList.length;a<u;a++)if(i=this.formatPartList[a],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[a+1].startPosition:o=this.formatPartList[a+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(e=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(e?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 e=0;e<this.formatPartList.length;e++){const r=this.formatPartList[e];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[e+1].startPosition,this.currentPartIndex=e+1;break}this.currentPartIndex=e;break}}}setPartIndexByHighlightPosition(){for(let e=0;e<this.formatPartList.length;e++){const r=this.formatPartList[e];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[e+1].startPosition,this.currentPartIndex=e+1;break}this.currentPartIndex=e;break}}}setPartIndicesByCursorPositions(){for(let e=0,r=this.formatPartList.length;e<r;e++){const n=this.formatPartList[e];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(e)}}createInputRangeSelection(){this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),this.inputSelection?.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),this.inputSelection?.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class Eh{static create(e){const r=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class Ch{inputSlots;constructor(e){this.inputSlots=Eh.create(It.create(e))}clearAllSlots(){for(let e=0,r=this.inputSlots.length;e<r;e++)this.inputSlots[e].partText=""}getSlot(e){return this.inputSlots.find(r=>r.partIndex===e)}getSlots(e){return this.inputSlots.filter(r=>e.includes(r.partIndex))}getSlotsFromCursorPosition(e){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(e>=o.startPosition&&e<=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(e){const r=this.inputSlots.findIndex(n=>n.partIndex===e);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(e){const r=this.inputSlots.findIndex(n=>n.partIndex===e);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const e=this.inputSlots.findIndex(n=>!n.isComplete);let r=e;for(let n=e+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(e=>e.isComplete)}allSlotsEmpty(){return this.inputSlots.every(e=>e.partText.length===0)}}class Mt{static instance;static getInstance(){return this.instance||(this.instance=new kh),this.instance}}class kh{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(e,r){return this.navigatorInstances[e]||(this.navigatorInstances[e]=new Ph(r,e)),this.navigatorInstances[e]}getInputSlotInstance(e,r){return this.inputSlotInstances[e]||(this.inputSlotInstances[e]=new Ch(r)),this.inputSlotInstances[e]}removeInstances(e){this.navigatorInstances[e]&&delete this.navigatorInstances[e],this.inputSlotInstances[e]&&delete this.inputSlotInstances[e]}}class Kr{instanceCollection;formatPartList;inputSlotCollection;inputElement;constructor(e,r){this.instanceCollection=Mt.getInstance(),this.formatPartList=It.create(e),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,e)}setInputElement(e){this.inputElement=e}render(){let e="";for(let r=0,n=this.formatPartList.length;r<n;r++){const s=this.formatPartList[r];if(s.isSeparator)e+=s.inputText;else{const o=this.inputSlotCollection.getSlot(r);o&&(e+=o.partText+o.inputText?.repeat(o.characterCount-o.partText.length))}}this.inputElement&&(this.inputElement.innerHTML=e)}}var je=(t=>(t[t.Text=0]="Text",t[t.Numeric=1]="Numeric",t))(je||{});class So{numberKeys=["0","1","2","3","4","5","6","7","8","9"];movementKeys=["ArrowLeft","ArrowRight","Home","End","a"];editingKeys=["Backspace","Delete"];ignoreKeys=["Shift","Alt","Control","Fn","Meta"];isNumberKey(e){return this.numberKeys.includes(e)}isMovementKey(e){return this.movementKeys.includes(e.key)}isEditingKey(e){return this.editingKeys.includes(e.key)}isIgnoreKey(e){return this.ignoreKeys.includes(e.key)}}class Oh{_currentIndex=0;index=0;formatParts;get currentIndex(){return this._currentIndex}constructor(e){this.formatParts=It.create(e)}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 Dh{formatParts;constructor(e){this.formatParts=It.create(e)}getUniqueSeparators(){const e=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!e.includes(o.inputText)&&e.push(o.inputText)}return e}}class To{constructor(e,r){this.format=e,this.instanceCollection=Mt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,e),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,e),this.keyTypeChecker=new So,this.formatRenderer=new Kr(e,r),this.formatPartList=new Oh(e),this.partEntryList=new Dh(e)}instanceCollection;inputSlotCollection;formatNavigator;keyTypeChecker;formatRenderer;formatPartList;partEntryList;setInputElement(e){this.formatRenderer.setInputElement(e)}processKeyPress(e){if(this.keyTypeChecker.isEditingKey(e)){this.processEditRules(e);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(e))):this.processInputRules(e)}processInputValue(e){this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const n=this.formatPartList.next();if(n&&!n.isSeparator)if(this.formatPartList.peek()?.isSeparator===!0){const s=this.formatPartList.currentIndex,o=this.formatPartList.next();if(o&&o.inputText){const i=e.indexOf(o.inputText,r),a=this.inputSlotCollection.getSlot(s);if(a&&i>-1){const u=i-r>a.characterCount?r+a.characterCount:i;a.partText=e.substring(r,u),this.processSlotRules(a),r=i+o.characterCount}}}else{const s=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);s&&(s.partText=e.substring(r,r+s.characterCount),this.processSlotRules(s))}}}processPastedValue(e,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 a=s[0].partText.substring(o);s[0].partText="";for(let y=1,x=s.length;y<x;y++)a+=s[y].partText,s[y].partText="";const u=this.removeSeparatorsFromValue(e),b=i+u+a;let p=0;for(let y=0,x=s.length;y<x;y++){const l=s[y];l.partText=b.substring(p,l.characterCount+p),p+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(e){let r=e;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(e){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(e)}processNonSelectionEditRules(e){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(e.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 a=this.inputSlotCollection.getPreviousSlot(r.partIndex);a&&(a.partText=a.partText.substring(0,a.partText.length-1),o&&this.shiftFormatParts(a),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(a.startPosition+a.partText.length),this.processSlotRules(a,!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 e=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(e.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=e.length;s<o;s++){const i=e[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=e.length;s<o;s++)this.processSlotRules(e[s])}shiftFormatParts(e){let r=e,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(e){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=e,s=r.characterCount,o=r.partText;if(r.valueType===je.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,a=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,b=parseInt(this.createNewValue(r,n));if(i&&b>i)if(a){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const p=this.inputSlotCollection.getNextSlot(r.partIndex);p&&!p.isComplete&&(p.partText=n),this.formatRenderer.render(),p&&this.formatNavigator.setCursorPosition(p.isComplete?p.startPosition:p.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(e){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,e))}createNewValue(e,r){const n=e.partText,s=this.formatNavigator.getCursorPosition();if(s>=e.startPosition+e.partText.length)return n+r;{const o=s-e.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(e,r=!1){const n=e.characterCount,s=e.allCharactersRequired||!1;if(e.valueType===je.Numeric){const o=e.minimumValue,i=e.maximumValue;if(s)e.isComplete=e.partText.length===n;else if(o!==void 0&&i!==void 0){const a=e.padWithZeros||!1,u=parseInt(e.partText);e.isComplete=u>=o&&u<=i,e.isComplete&&a&&!r&&(e.partText=e.partText.padStart(n,"0"))}else e.isComplete=e.partText.length>0}else s?e.isComplete=e.partText.length===n:e.isComplete=e.partText.length>0}}class Nh{constructor(e,r){this.format=e,this.instanceCollection=Mt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,e),this.ruleProcessor=new To(e,r),this.keyTypeChecker=new So,this.formatRenderer=new Kr(e,r)}instanceCollection;formatNavigator;ruleProcessor;keyTypeChecker;formatRenderer;setInputElement(e){this.ruleProcessor.setInputElement(e),this.formatRenderer.setInputElement(e)}processMovementKey(e){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=e;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(e){return this.keyTypeChecker.isIgnoreKey(e)?!1:this.keyTypeChecker.isMovementKey(e)?(this.processMovementKey(e),!1):(this.ruleProcessor.processKeyPress(e),!0)}}class _h{constructor(e,r=""){this.inputValue=r,this.instanceId=Th(),this.instanceCollection=Mt.getInstance(),this.keyProcessor=new Nh(e,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,e),this.formatRenderer=new Kr(e,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,e),this.inputRuleProcessor=new To(e,this.instanceId)}instanceId;instanceCollection;keyProcessor;formatNavigator;formatRenderer;inputSlotCollection;inputRuleProcessor;previousOutputValue="";inputElementSet=!1;isInputFocused=!1;inputElement;onFormatChange;inputElementCreated(e){this.keyProcessor.setInputElement(e),this.formatNavigator.setInputElement(e),this.formatRenderer.setInputElement(e),this.inputElement=e,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(e){this.inputValue=e,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(e):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(e){e.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(e):this.inputRuleProcessor.processPastedValue(e,!0):this.inputValue.length===0?this.inputValuePassed(e):this.inputRuleProcessor.processPastedValue(e),this.renderFormat(!0))}registerFormatChangeEvent(e){this.onFormatChange=e}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(e){if(e.key!=="Tab"){if(!(e.key==="c"&&(e.ctrlKey||e.metaKey))&&!(e.key==="x"&&(e.ctrlKey||e.metaKey))&&!(e.key==="v"&&(e.ctrlKey||e.metaKey)))e.preventDefault(),e.stopPropagation();else return;this.keyProcessor.processKeyPress(e)&&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(e=!1){setTimeout(()=>{this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=this.inputElement?.innerHTML),e&&this.inputElement?.innerHTML&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const jh=(t,e)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:a,rightElement:u,className:b,leftElementClassName:p,rightElementClassName:y,isSingleLine:x=!1,allowSingleLineScroll:l=!1,isInputValid:d,onChange:h,onFocus:g,onBlur:v,onElementCreate:k,onLeftElementClick:j,onRightElementClick:D}=t,[T,H]=f.useState(!0),V=f.useRef(void 0),B=f.useRef(void 0),L=f.useRef(void 0),G=f.useRef(!1);f.useEffect(()=>(document.addEventListener("mouseup",A),()=>{L.current?.dispose(),document.removeEventListener("mouseup",A)}),[]),f.useEffect(()=>{L.current?.inputValuePassed(r)},[r]),f.useEffect(()=>{L.current?.dispose(),n&&(L.current=new _h(n,r),B.current&&L.current?.inputElementCreated(B.current),L.current?.registerFormatChangeEvent(X))},[n]);const X=f.useCallback(w=>{d?d(w)?(H(!0),h?.(w)):H(!1):h?.(w)},[h]),F=f.useCallback(w=>{L.current?.inputFocused(),g?.(w)},[g]),I=f.useCallback(w=>{L.current?.inputBlurred(),v?.(w)},[v]),N=f.useCallback(()=>{G.current=!0},[]),_=f.useCallback(()=>{if(G.current)G.current=!1,L.current?.mouseUpHandler();else{const w=new MouseEvent("mouseup");document.dispatchEvent(w)}},[]),A=f.useCallback(()=>{G.current&&(G.current=!1,L.current?.mouseUpHandler())},[]),U=f.useCallback(w=>{L.current?.keyDownHandler(w)},[]),Q=f.useCallback(w=>{w.preventDefault(),w.stopPropagation();const S=w.clipboardData?.getData("text/plain");S&&L.current?.pastedValue(S)},[]),Y=f.useCallback(w=>{V.current?.inputElement?.removeEventListener("keydown",U),V.current?.inputElement?.removeEventListener("mousedown",N),V.current?.inputElement?.removeEventListener("mouseup",_),V.current?.inputElement?.removeEventListener("paste",Q),V.current=w,V.current?.inputElement?.addEventListener("keydown",U),V.current?.inputElement?.addEventListener("mousedown",N),V.current?.inputElement?.addEventListener("mouseup",_),V.current?.inputElement?.addEventListener("paste",Q),B.current=V.current?.inputElement},[]),P=f.useCallback(()=>{V.current?.focus()},[]);f.useImperativeHandle(e,()=>({focus:P}));const c=te(b,{"bsc:border-error!":!T});return m.jsx(Ut,{ref:w=>{w&&Y(w)},readOnly:s,debounceTime:o,fillContainer:i,leftElement:a,rightElement:u,className:c,leftElementClassName:p,rightElementClassName:y,isSingleLine:x,allowSingleLineScroll:l,onFocus:F,onBlur:I,onElementCreate:k,onLeftElementClick:j,onRightElementClick:D})},Po=f.forwardRef(jh),Xr=f.createContext(void 0);function Eo(t,e,r=!0){const n=Vs(t),s=As(t),o=kf(t);let i=Mr(s)-(e.options?.weekStartsOn||0);i=i===-1?6:i;const a=Mr(o)-(e.options?.weekStartsOn||0),u=Ll({start:s,end:o}),b=n+i>35?6:5,p=Co(b,7,{dayValue:null,isCurrent:!0});let y=1;for(let x=0,l=b;x<l;x++){for(let d=x>0?0:i;d<7;d++){const h=u[y-1];if(h.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),p[x][d].dayValue=h,++y>n)break}if(y>n)break}if(i>0&&r)for(let x=0;x<i;x++)p[0][x].dayValue=Pd(s,i-x),p[0][x].isCurrent=!1;if(a>-1&&r)for(let x=6;x>a;x--)p[b-1][x].dayValue=ct(o,x-a),p[b-1][x].isCurrent=!1;return p}function Co(t,e,r){const n=[];for(let s=0,o=t;s<o;s++){const i=[];for(let a=0,u=e;a<u;a++){const b=Ih(r)?r:{...r};i.push(b)}n.push(i)}return n}function Ih(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"||t instanceof Date}function Mh(t){const e=Ed(new Date,t.options?.weekStartsOn||0),r=[];for(let n=0;n<7;n++)r.push(ct(e,n).toLocaleDateString(t.code,{weekday:"short"}));return r}function Lh(t){const e=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:He(e,n++).toLocaleDateString(t.code,{month:"short"})};return r}function Ah(t,e){const r=new Date(t.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=Al({start:r,end:Ot(r,9)}),o=Co(3,4,"");let i=0;for(let a=0;a<3;a++)for(let u=0;u<4&&(o[a][u]=s[i++].toLocaleDateString(e.code,{year:"numeric"}),i!==s.length);u++);return o}function Rh(t){const e=new Date;return e.setHours(0,0,0,0),e.toLocaleTimeString(t.code)}function Fh(t,e,r){return t.getTime()>=e.getTime()&&t.getTime()<=r.getTime()}function Lt(t,e){const r=Cd(t);if(isNaN(r.valueOf())){let n=_e(t,"P pp",new Date,{locale:e});return!isNaN(n.valueOf())||(n=_e(t,"Pp",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P HH:mm",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P hh:mm a..aaa",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P HH:mm:ss",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P hh:mm:ss a..aaa",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P p",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"pp",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"p",new Date,{locale:e}),!isNaN(n.valueOf()))?n:void 0}return r}function Jr(t,e){const r=t.split("-");if(r.length!==2)return;const n=Lt(r[0].trim(),e);if(!n)return;const s=Lt(r[1].trim(),e);if(s)return[n,s]}var ae=(t=>(t[t.DateTime=0]="DateTime",t[t.DateOnly=1]="DateOnly",t[t.TimeOnly=2]="TimeOnly",t[t.DateRange=3]="DateRange",t))(ae||{}),ye=(t=>(t[t.DaySelector=0]="DaySelector",t[t.MonthSelector=1]="MonthSelector",t[t.YearSelector=2]="YearSelector",t[t.TimeSelector=3]="TimeSelector",t[t.DateRangeSelector=4]="DateRangeSelector",t))(ye||{}),dt=(t=>(t[t.Day=0]="Day",t[t.Month=1]="Month",t[t.Year=2]="Year",t[t.Range=3]="Range",t))(dt||{}),At=(t=>(t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t))(At||{}),me=(t=>(t[t.TwelveHour=0]="TwelveHour",t[t.TwentyFourHour=1]="TwentyFourHour",t))(me||{}),Ve=(t=>(t[t.Normal=0]="Normal",t[t.Range=1]="Range",t))(Ve||{}),Jt=(t=>(t[t.Right=0]="Right",t[t.Left=1]="Left",t[t.None=2]="None",t))(Jt||{}),ee=(t=>(t[t.SetDateSelector=0]="SetDateSelector",t[t.SetViewDate=1]="SetViewDate",t[t.SetSelectedDate=2]="SetSelectedDate",t[t.SetSelectedDateRange=3]="SetSelectedDateRange",t[t.SetSelectedStartDate=4]="SetSelectedStartDate",t[t.SetSelectedEndDate=5]="SetSelectedEndDate",t[t.SetTimeFormat=6]="SetTimeFormat",t[t.ClearDates=7]="ClearDates",t[t.InitializeDates=8]="InitializeDates",t))(ee||{});const $h=(t,e)=>{switch(e.type){case 0:return e.dateSelector!==void 0?{...t,currentSelector:e.dateSelector,currentViewDate:e.viewDate||t.currentViewDate}:{...t};case 1:return{...t,currentViewDate:e.viewDate||new Date,dateInitialized:!0};case 2:return{...t,selectedDate:e.selectedDate||t.selectedDate,currentViewDate:e.viewDate||t.currentViewDate};case 3:return{...t,selectedStartDate:e.selectedStartDate||t.selectedStartDate,selectedEndDate:e.selectedEndDate||t.selectedEndDate};case 4:return{...t,selectedStartDate:e.selectedStartDate,selectedEndDate:void 0};case 5:return{...t,selectedEndDate:e.selectedEndDate};case 6:return{...t,timeFormat:e.timeFormat||t.timeFormat};case 7:return{currentSelector:t.currentSelector,currentViewDate:t.currentViewDate,timeFormat:t.timeFormat,dateInitialized:!0};case 8:{const r={...t,currentViewDate:Hh(e.initialDate),dateInitialized:!0};return Array.isArray(e.initialDate)?{...r,selectedStartDate:e.initialDate[0],selectedEndDate:e.initialDate[1]}:{...r,selectedDate:e.initialDate}}default:return{...t,currentSelector:ye.DaySelector}}};function Hh(t){return t?Array.isArray(t)?t[0]:t:new Date}const en=(t,e,r)=>{const n=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:He(e,u)})},[e]),s=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:Fr(e,u)})},[e]),o=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:Ot(e,u)})},[e]),i=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:$r(e,u)})},[e]),a=f.useCallback(u=>{r({type:ee.SetDateSelector,dateSelector:u})},[]);return{...t,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:a}},er=({viewDate:t,selectedDate:e,selectedStartDate:r,selectedEndDate:n,selectionMode:s=Ve.Normal,locale:o,onDateSelected:i,selectableDate:a,isValidDate:u,dispatcher:b})=>{const[p,y]=f.useState(!1),[x,l]=f.useState(),[d,h]=f.useState(),[g,v]=f.useState(),[k,j]=f.useState(),D=f.useRef(void 0),T=f.useRef(void 0),H=f.useContext(Xr),V=f.useMemo(()=>H.calendarTemplate,[H.calendarTemplate]);f.useEffect(()=>{D.current=o,T.current=Mh(D.current),y(!0)},[]),f.useEffect(()=>{t&&D.current&&v(Eo(t,D.current,s===Ve.Normal))},[t,p]),f.useEffect(()=>{j(e?new Date(e.getFullYear(),e.getMonth(),e.getDate()):void 0)},[e]),f.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),h(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),f.useEffect(()=>{D.current&&o&&(D.current=o,v(Eo(t,D.current,s===Ve.Normal)))},[o]);const B=N=>{if(s===Ve.Normal)b?.({type:ee.SetSelectedDate,selectedDate:N,viewDate:N}),i?.(N);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||Of(N,r)?i(N):r&&!n?i(N,{setEndDate:!0}):r&&n&&i(N)}},L=N=>k?.toLocaleDateString()===N.toLocaleDateString(),G=N=>{if(x&&d){const _=N.getTime();return _>=x&&_<=d}return!1},X=en({viewDate:t,selectedDate:e,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:T.current,monthMatrix:g,selectableDate:a,isValidDate:u,onDateClicked:B,isSelectedDate:L,isInSelectedDateRange:G},t,b),I=V||((N,_)=>m.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:_}));return m.jsx(qe,{props:X,template:I,children:m.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[T.current?.map((N,_)=>m.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:N},_)),g?.map((N,_)=>N.map((A,U)=>{const Q=A.dayValue!==null&&(a===void 0||a(A.dayValue)),Y=te("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":!A.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":A&&A.dayValue&&(k&&L(A.dayValue)||x&&!d&&Ls(x,A.dayValue)||x&&d&&G(A.dayValue)),"bsc:cursor-pointer":Q,"bsc:text-error bsc:cursor-not-allowed":!Q,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":A.dayValue&&Td(A.dayValue)&&!(L(A.dayValue)||G(A.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:Y,onClick:()=>A&&A.dayValue&&Q&&(u===void 0||u(A.dayValue))&&B(A.dayValue),children:A.dayValue?.getDate().toLocaleString(D.current?.code)},_.toString()+U.toString())}))]})})},tr=({title:t,scrollerType:e,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=f.useContext(Xr).dateScrollerTemplate,b=en({title:t,scrollerType:e,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),p="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,d)=>m.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:d}));return m.jsxs(qe,{props:b,template:x,children:[m.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:m.jsx(Oe,{className:p,onClick:n,children:m.jsx(Ce,{icon:"chevronLeft",size:Te.Regular})})}),m.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:t}),m.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:m.jsx(Oe,{className:p,onClick:s,children:m.jsx(Ce,{icon:"chevronRight",size:Te.Regular})})})]})},Yh=({selectedDate:t,viewDate:e,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:a})=>{const u=()=>{e&&a({type:ee.SetViewDate,viewDate:Fr(e,1)})},b=()=>{e&&a({type:ee.SetViewDate,viewDate:He(e,1)})},p=()=>{a({type:ee.SetDateSelector,dateSelector:ye.MonthSelector})},y=()=>{a({type:ee.SetDateSelector,dateSelector:ye.TimeSelector})},x=()=>e?e.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[m.jsx(tr,{title:x(),scrollerType:dt.Day,onTitleClicked:p,onMovePrevious:u,onMoveNext:b,viewDate:e,dispatcher:a}),m.jsx(er,{viewDate:e,selectedDate:t,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:a}),n&&m.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:m.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:y,children:t?.toLocaleTimeString(r.code)||Rh(r)})})]})},Vh=({viewDate:t,locale:e,dateSelection:r=ae.DateTime,dispatcher:n})=>{const s=f.useRef(Lh(e)),o=()=>{const p=$r(t,1);n({type:ee.SetViewDate,viewDate:p})},i=()=>{const p=Ot(t,1);n({type:ee.SetViewDate,viewDate:p})},a=p=>{n({type:ee.SetDateSelector,dateSelector:r!==ae.DateRange?ye.DaySelector:ye.DateRangeSelector,viewDate:Vd(t,p)})},u=()=>t.toLocaleDateString(e.code,{year:"numeric"}),b=()=>{n({type:ee.SetDateSelector,dateSelector:ye.YearSelector})};return m.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[m.jsx(tr,{title:u(),scrollerType:dt.Month,onTitleClicked:b,onMovePrevious:o,onMoveNext:i,viewDate:t,dispatcher:n}),m.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((p,y)=>p.map((x,l)=>m.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:()=>a(x.monthNumber),children:x.monthName},y.toString()+l.toString())))})]})},Wh=({viewDate:t,selectedStartDate:e,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=Qt("screen and (max-device-width: 40rem)"),a=He(t,1),u=(l,d)=>{!d||!d.setEndDate?o({type:ee.SetSelectedStartDate,selectedStartDate:l}):(o({type:ee.SetSelectedEndDate,selectedEndDate:l}),e&&s&&s([e,l]))},b=()=>{o({type:ee.SetDateSelector,dateSelector:ye.MonthSelector})},p=()=>i?`${t.toLocaleDateString(n.code,{month:"long"})} ${t.toLocaleDateString(n.code,{year:"numeric"})}`:`${t.toLocaleDateString(n.code,{month:"long"})} ${t.toLocaleDateString(n.code,{year:"numeric"})} - ${a.toLocaleDateString(n.code,{month:"long"})} ${a.toLocaleDateString(n.code,{year:"numeric"})}`,y=()=>{t&&o({type:ee.SetViewDate,viewDate:Fr(t,1)})},x=()=>{t&&o({type:ee.SetViewDate,viewDate:He(t,1)})};return m.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[m.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:m.jsx(tr,{title:p(),scrollerType:dt.Range,onTitleClicked:b,onMovePrevious:y,onMoveNext:x,viewDate:t,dispatcher:o})}),m.jsx("div",{className:"bsc-flex-grow",children:m.jsx(Yr,{mobileMarkup:m.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:m.jsx(er,{viewDate:t,selectedStartDate:e,selectedEndDate:r,selectionMode:Ve.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:m.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[m.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:m.jsx(er,{viewDate:t,selectedStartDate:e,selectedEndDate:r,selectionMode:Ve.Range,onDateSelected:u,locale:n,dispatcher:o})}),m.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:m.jsx(er,{viewDate:a,selectedStartDate:e,selectedEndDate:r,selectionMode:Ve.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},Bh=({viewDate:t,showDateSelector:e,locale:r,timeFormat:n=me.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const a=f.useRef(n===me.TwelveHour?11:23),u=f.useRef(n===me.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"]),b=f.useRef(zd(0,59,N=>N.toString().padStart(2,"0"))),p=f.useRef(["AM","PM"]),y=f.useRef(Tl(t)),x=N=>N>11?N-12:N,[l,d]=f.useState(x(t.getHours())),[h,g]=f.useState(t.getMinutes()),[v,k]=f.useState(t.getHours()<=12?0:1),j=f.useRef(t.toLocaleDateString(r.code));f.useEffect(()=>{const N=t.getHours(),_=t.getMinutes();if(N!==l&&d(n===me.TwelveHour?x(N):N),_!==h&&g(_),n===me.TwelveHour){const A=N<=11?0:1;A!==v&&k(A)}},[t]);const D=()=>{const N=s?.hours?.step||1,_=l<a.current?l+N:0;d(_),L(_,h,v)},T=()=>{const N=s?.hours?.step||1,_=l>0?l-N:a.current;d(_),L(_,h,v)},H=()=>{const N=s?.minutes?.step||1,_=h+N<(s?.minutes?.max||59)?h+N:s?.minutes?.min||0;g(_),L(l,_,v)},V=()=>{const N=s?.minutes?.step||1,_=h-N>=(s?.minutes?.min||0)?h-N:(s?.minutes?.max||60)-N;g(_),L(l,_,v)},B=()=>{const N=v===0?1:0;k(N),L(l,h,N)},L=(N,_,A)=>{const U=n===me.TwelveHour&&A===1?N+12:N;y.current.setHours(U,_),i({type:ee.SetSelectedDate,selectedDate:y.current,viewDate:y.current}),o?.(y.current)},G=()=>{i({type:ee.SetDateSelector,dateSelector:ye.DaySelector})},X=te("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===me.TwelveHour,"bsc:grid-cols-3":n===me.TwentyFourHour}),F=te("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===me.TwelveHour,"bsc:col-span-3":n===me.TwentyFourHour}),I="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 m.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===me.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:X,children:[e&&m.jsx("div",{className:F,onClick:G,children:j.current}),m.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:D,children:m.jsx(Ce,{icon:"chevronUp",size:Te.Regular})})}),m.jsx("div",{}),m.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:H,children:m.jsx(Ce,{icon:"chevronUp",size:Te.Regular})})}),n===me.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:B,children:m.jsx(Ce,{icon:"chevronUp",size:Te.Regular})})}),m.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),m.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),m.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:b.current[h]}),n===me.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:p.current[v]}),m.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:T,children:m.jsx(Ce,{icon:"chevronDown",size:Te.Regular})})}),m.jsx("div",{}),m.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:V,children:m.jsx(Ce,{icon:"chevronDown",size:Te.Regular})})}),n===me.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:B,children:m.jsx(Ce,{icon:"chevronDown",size:Te.Regular})})})]})})},zh=({viewDate:t,locale:e,dispatcher:r})=>{const n=Ah(t,e),s=()=>{const u=$r(t,10);r({type:ee.SetViewDate,viewDate:u})},o=()=>{const u=Ot(t,10);r({type:ee.SetViewDate,viewDate:u})},i=u=>{const b=parseInt(u);r({type:ee.SetDateSelector,dateSelector:ye.MonthSelector,viewDate:Wd(t,b)})},a=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return m.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[m.jsx(tr,{title:a(),scrollerType:dt.Year,onMovePrevious:s,onMoveNext:o,viewDate:t,dispatcher:r}),m.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:m.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,b)=>u.map((p,y)=>p.length>0?m.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(p),children:p},b.toString()+y.toString()):m.jsx("div",{},b.toString()+y.toString())))})})]})};class Uh{constructor(e,r){this.dateSelection=e;const n=2023,s=12,o=20,a=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=a.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,b=18,p=24,y=37,x=317;u.setHours(b,p,y,x);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?b:"6"}`,"HH").replace(`${p}`,"MM").replace(`${y}`,"SS").replace(`${x}`,"LLL"),this.createDateParts()}dateFormat;timeFormat;use24HourTime;monthPart;dayPart;yearPart;twelveHourPart;twentyFourHourPart;minutePart;meridianPart;get is24HourTime(){return this.use24HourTime}createInputFormat(){const e={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case ae.DateOnly:return this.createDateFormat(e);case ae.TimeOnly:return this.createTimeFormat(e);case ae.DateRange:return this.createDateRangeFormat(e);case ae.DateTime:return this.createDateTimeFormat(e)}}createDateFormat(e){return this.dateFormat.startsWith("MM")?e.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?e.formatParts.push(...this.createDayMonthYearFormatParts()):e.formatParts.push(...this.createYearMonthDayFormatParts()),e}createTimeFormat(e){return this.use24HourTime?e.formatParts.push(...this.createTwentyFourHourFormatParts()):e.formatParts.push(...this.createTwelveHourFormatParts()),e}createDateRangeFormat(e){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 e.formatParts.push(...r,n,...r),e}createDateTimeFormat(e){this.dateFormat.startsWith("MM")?e.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?e.formatParts.push(...this.createDayMonthYearFormatParts()):e.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return e.formatParts.push(r),this.use24HourTime?e.formatParts.push(...this.createTwentyFourHourFormatParts()):e.formatParts.push(...this.createTwelveHourFormatParts()),e}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let e=this.dateFormat.replace("MM",""),r=e.indexOf("DD"),n=e.substring(0,r);e=e.replace(n,"").replace("DD","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=e.indexOf("YYYY"),n=e.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 e=this.dateFormat.replace("DD",""),r=e.indexOf("MM"),n=e.substring(0,r);e=e.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=e.indexOf("YYYY"),n=e.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 e=this.dateFormat.replace("YYYY",""),r=e.indexOf("MM"),n=e.substring(0,r);e=e.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=e.indexOf("DD"),n=e.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 e=this.timeFormat.replace("HH",""),r=e.indexOf("MM"),n=e.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 e=this.timeFormat.replace("HH",""),r=e.indexOf("MM"),n=e.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:je.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:je.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:je.Text,possibleValues:["AM","PM"]}}}const qh=(t,e)=>{const[r,n]=f.useState(),s=f.useRef(void 0);return f.useEffect(()=>{e&&!r&&(s.current=new Uh(t,e),n(s.current.createInputFormat()))},[e]),[r,s.current?.is24HourTime]},Gh=({value:t,readOnly:e=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:a,className:u,dateSelection:b=ae.DateTime,dateFormat:p,timeConstraints:y,icon:x,iconPosition:l=Jt.Right,inputElement:d,selectableDate:h,isValidDate:g,onChange:v,onError:k,calendarTemplate:j,dateScrollerTemplate:D,inputTemplate:T,wrapperTemplate:H})=>{const[V,B]=f.useState(!1),[L,G]=f.useState(),[X,F]=f.useState(),[I,N,_]=$i(b),A=f.useRef(void 0),U=f.useRef(!1),Q=f.useRef(a||Bd()),Y=f.useRef(void 0),P=f.useRef(void 0),c=f.useRef(void 0),w=f.useRef(null),S=f.useRef(null),[C,W]=qh(b,L),M=$o.useDateLocale(Q.current),E=f.useRef({calendarTemplate:j,dateScrollerTemplate:D});f.useEffect(()=>{G(M.code),Y.current=M;const z=q();O(t||n?{type:ee.InitializeDates,initialDate:Array.isArray(z)?z[0]:z}:{type:ee.SetViewDate,viewDate:Array.isArray(z)?z[0]:z})},[M]),f.useEffect(()=>{if(t){const z=q();O({type:ee.InitializeDates,initialDate:z})}else O({type:ee.ClearDates})},[t,Y.current]),f.useEffect(()=>{W&&O({type:ee.SetTimeFormat,timeFormat:W?me.TwentyFourHour:me.TwelveHour})},[W]),f.useEffect(()=>{d&&(P.current=d)},[d]),f.useEffect(()=>{O({type:ee.SetDateSelector,dateSelector:$()})},[I]);const $=f.useCallback(()=>_.current===ae.TimeOnly?ye.TimeSelector:_.current===ae.DateTime||_.current===ae.DateOnly?ye.DaySelector:ye.DateRangeSelector,[]),q=()=>{const z=new Date;return z.setHours(0,0,0,0),t?typeof t=="string"?_.current!==ae.DateRange?Lt(t,Y.current):Jr(t,Y.current):t:z},Z={currentSelector:$(),currentViewDate:new Date,timeFormat:me.TwelveHour,dateInitialized:!1},[R,O]=f.useReducer($h,Z),Pe=()=>{Io(),B(!0)},Re=f.useMemo(()=>Ct(()=>{B(!1)},250),[]),rr=f.useMemo(()=>Ct(()=>{Re.cancel()},5),[Re]),Do=z=>{const de=z.target.innerText;No(de)},np=z=>{if(z){const de=_.current!==ae.DateRange?Lt(z,Y.current):Jr(z,Y.current);if(de)if(g){const Fo=Array.isArray(de)?de.every(lp=>g(lp)):g(de);return!Fo&&k&&k(de),Fo}else return!0;else return!1}else return!0},sp=z=>{No(z||"")},No=z=>{const de=_.current!==ae.DateRange?Lt(z,Y.current):Jr(z,Y.current);de?(Array.isArray(de)?(Fh(de[0],As(R.currentViewDate),Ml(He(R.currentViewDate,1)))||O({type:ee.SetViewDate,viewDate:de[0]}),O({type:ee.SetSelectedDateRange,selectedStartDate:de[0],selectedEndDate:de[1]})):O({type:ee.SetSelectedDate,selectedDate:de,viewDate:de}),v?.(de)):z===""&&(O({type:ee.ClearDates}),v?.())},op=z=>{_.current===ae.DateOnly&&i===!0&&B(!1),v?.(z)},_o=()=>{Io(),B(!V),S.current?S.current.focus():w.current&&w.current.focus()},jo=()=>{O({type:ee.ClearDates}),B(!1),v?.()},rn=(z,de)=>{(!P.current||A.current!==de)&&(P.current=z,A.current=de,U.current=!0)},Io=()=>{(!c.current||U.current)&&P.current&&(c.current=P.current,F(P.current),U.current=!1)},Mo=()=>{B(!1),O({type:ee.SetDateSelector,dateSelector:$()})},ip=()=>{switch(p){case At.Short:return"short";case At.Medium:return"medium";case At.Long:return"long";default:return}},nr=()=>{const z=ip();switch(_.current){case ae.DateTime:return R.selectedDate?z?R.selectedDate.toLocaleString(Y.current?.code,{dateStyle:z,timeStyle:z}):R.selectedDate.toLocaleString(Y.current?.code):"";case ae.DateOnly:return R.selectedDate?z?R.selectedDate.toLocaleDateString(Y.current?.code,{dateStyle:z}):R.selectedDate.toLocaleDateString(Y.current?.code):"";case ae.TimeOnly:return R.selectedDate?z?R.selectedDate.toLocaleTimeString(Y.current?.code,{timeStyle:z,hour12:R.timeFormat===me.TwelveHour,hourCycle:R.timeFormat===me.TwentyFourHour?"h23":void 0}):R.selectedDate.toLocaleTimeString(Y.current?.code,{hour12:R.timeFormat===me.TwelveHour,hourCycle:R.timeFormat===me.TwentyFourHour?"h23":void 0}):"";case ae.DateRange:return R.selectedStartDate&&R.selectedEndDate?z?`${R.selectedStartDate.toLocaleDateString(Y.current?.code,{dateStyle:z})} - ${R.selectedEndDate.toLocaleDateString(Y.current?.code,{dateStyle:z})}`:`${R.selectedStartDate.toLocaleDateString(Y.current?.code)} - ${R.selectedEndDate.toLocaleDateString(Y.current?.code)}`:"";default:return R.selectedDate?z?R.selectedDate.toLocaleString(Y.current?.code,{dateStyle:z,timeStyle:z}):R.selectedDate.toLocaleString(Y.current?.code):""}},sr=I===ae.DateTime||I===ae.DateOnly||I===ae.DateRange,ap=I===ae.DateTime||I===ae.TimeOnly,Rt=l===Jt.None?{}:l===Jt.Right?{rightElement:m.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!e&&m.jsx("div",{children:m.jsx(Ce,{icon:"close",size:Te.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:jo})}),m.jsx("div",{className:"bsc:ml-2",onClick:e?void 0:_o,children:x||m.jsx(Ce,{icon:"calendar",size:Te.Small,className:e?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:m.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[m.jsx("div",{className:"bsc:mr-2",onClick:e?void 0:_o,children:x||m.jsx(Ce,{icon:"calendar",size:Te.Small,className:e?void 0:"bsc:cursor-pointer"})}),o&&!e&&m.jsx("div",{children:m.jsx(Ce,{icon:"close",size:Te.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:jo})})]}),leftElementClassName:"bsc:justify-center"},cp={setDateSelector:z=>N(z)},up=H||((z,de)=>m.jsx(m.Fragment,{children:de})),Lo=()=>m.jsx(qe,{props:cp,template:up,children:m.jsxs(m.Fragment,{children:[R.currentSelector===ye.DaySelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(Yh,{selectedDate:R.selectedDate,viewDate:R.currentViewDate,locale:Y.current,showTimeSelector:_.current===ae.DateTime,selectableDate:h,isValidDate:g,dispatcher:O,onChange:op}),R.currentSelector===ye.MonthSelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(Vh,{viewDate:R.currentViewDate,locale:Y.current,dateSelection:_.current,dispatcher:O}),R.currentSelector===ye.YearSelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(zh,{viewDate:R.currentViewDate,locale:Y.current,dispatcher:O}),R.currentSelector===ye.TimeSelector&&ap&&R.dateInitialized&&Y.current&&m.jsx(Bh,{viewDate:R.currentViewDate,showDateSelector:_.current===ae.DateTime,locale:Y.current,timeFormat:R.timeFormat,timeConstraints:y,onChange:v,dispatcher:O}),R.currentSelector===ye.DateRangeSelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(Wh,{viewDate:R.currentViewDate,selectedStartDate:R.selectedStartDate,selectedEndDate:R.selectedEndDate,locale:Y.current,onChange:v,dispatcher:O})]})}),Ao=en({label:r,readOnly:e,allowClear:o,getValue:nr,onFocus:Pe,onInput:Do,iconPosition:l,iconElement:Rt.rightElement||Rt.leftElement},R.currentViewDate,O),Ro=T||((z,de)=>m.jsx(m.Fragment,{children:de})),nn=te("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":e,"bsc:bg-white bsc:dark:bg-mono-dark-1":!e},"bc-dt-input",u);return m.jsx(Xr.Provider,{value:E.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx(Ie,{label:r,readOnly:e,className:"bc-dt-label"}),m.jsx(Yr,{mobileMarkup:m.jsxs(m.Fragment,{children:[m.jsx(qe,{props:Ao,template:Ro,children:m.jsx(Ut,{ref:w,value:nr(),readOnly:e,inputMode:"none",className:nn,onFocus:Pe,onElementCreate:z=>rn(z,!1),...Rt})}),m.jsx(go,{visible:V,target:X,hidden:Mo,unmountWhenHidden:!0,children:Lo()})]}),aboveMobileMarkup:m.jsxs(m.Fragment,{children:[m.jsx(qe,{props:Ao,template:Ro,children:s===!1?m.jsx(Ut,{ref:w,value:nr(),readOnly:e,className:nn,onFocus:Pe,onBlur:Re,onInput:Do,onElementCreate:z=>rn(z,!1),...Rt}):m.jsx(Po,{ref:S,value:nr(),readOnly:e,className:nn,format:C,isInputValid:np,onFocus:Pe,onBlur:Re,onChange:sp,onElementCreate:z=>rn(z,!0),...Rt})}),m.jsx(xo,{visible:V,target:X,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Mo,isClickedWithin:rr,unmountWhenHidden:!0,children:Lo()})]})})]})})};var tn,ko;function Qh(){if(ko)return tn;ko=1;function t(l,d){var h,g;if(typeof d=="function")g=d(l),g!==void 0&&(l=g);else if(Array.isArray(d))for(h=0;h<d.length;h++)g=d[h](l),g!==void 0&&(l=g);return l}function e(l,d){return l[0]==="-"&&Array.isArray(d)&&/^-\d+$/.test(l)?d.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],a=function(l){return i.indexOf(l)===-1};function u(l,d){l.indexOf("[")>=0&&(l=l.replace(/\[/g,d).replace(/]/g,""));var h=l.split(d),g=h.filter(a);if(g.length!==h.length)throw Error("Refusing to update blacklisted property "+l);return h}var b=Object.prototype.hasOwnProperty;function p(l,d,h,g){if(!(this instanceof p))return new p(l,d,h,g);typeof d>"u"&&(d=!1),typeof h>"u"&&(h=!0),typeof g>"u"&&(g=!0),this.separator=l||".",this.override=d,this.useArray=h,this.useBrackets=g,this.keepArray=!1,this.cleanup=[]}var y=new p(".",!1,!0,!0);function x(l){return function(){return y[l].apply(y,arguments)}}return p.prototype._fill=function(l,d,h,g){var v=l.shift();if(l.length>0){if(d[v]=d[v]||(this.useArray&&r(l[0])?[]:{}),!s(d[v]))if(this.override)d[v]={};else{if(!(s(h)&&o(h)))throw new Error("Trying to redefine `"+v+"` which is a "+typeof d[v]);return}this._fill(l,d[v],h,g)}else{if(!this.override&&s(d[v])&&!o(d[v])){if(!(s(h)&&o(h)))throw new Error("Trying to redefine non-empty obj['"+v+"']");return}d[v]=t(h,g)}},p.prototype.object=function(l,d){var h=this;return Object.keys(l).forEach(function(g){var v=d===void 0?null:d[g],k=u(g,h.separator).join(h.separator);k.indexOf(h.separator)!==-1?(h._fill(k.split(h.separator),l,l[g],v),delete l[g]):l[g]=t(l[g],v)}),l},p.prototype.str=function(l,d,h,g){var v=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(v.split(this.separator),h,d,g):h[l]=t(d,g),h},p.prototype.pick=function(l,d,h,g){var v,k,j,D,T;for(k=u(l,this.separator),v=0;v<k.length;v++)if(D=e(k[v],d),d&&typeof d=="object"&&D in d){if(v===k.length-1)return h?(j=d[D],g&&Array.isArray(d)?d.splice(D,1):delete d[D],Array.isArray(d)&&(T=k.slice(0,-1).join("."),this.cleanup.indexOf(T)===-1&&this.cleanup.push(T)),j):d[D];d=d[D]}else return;return h&&Array.isArray(d)&&(d=d.filter(function(H){return H!==void 0})),d},p.prototype.delete=function(l,d){return this.remove(l,d,!0)},p.prototype.remove=function(l,d,h){var g;if(this.cleanup=[],Array.isArray(l)){for(g=0;g<l.length;g++)this.pick(l[g],d,!0,h);return h||this._cleanup(d),d}else return this.pick(l,d,!0,h)},p.prototype._cleanup=function(l){var d,h,g,v;if(this.cleanup.length){for(h=0;h<this.cleanup.length;h++)g=this.cleanup[h].split("."),v=g.splice(0,-1).join("."),d=v?this.pick(v,l):l,d=d[g[0]].filter(function(k){return k!==void 0}),this.set(this.cleanup[h],d,l);this.cleanup=[]}},p.prototype.del=p.prototype.remove,p.prototype.move=function(l,d,h,g,v){return typeof g=="function"||Array.isArray(g)?this.set(d,t(this.pick(l,h,!0),g),h,v):(v=g,this.set(d,this.pick(l,h,!0),h,v)),h},p.prototype.transfer=function(l,d,h,g,v,k){return typeof v=="function"||Array.isArray(v)?this.set(d,t(this.pick(l,h,!0),v),g,k):(k=v,this.set(d,this.pick(l,h,!0),g,k)),g},p.prototype.copy=function(l,d,h,g,v,k){return typeof v=="function"||Array.isArray(v)?this.set(d,t(JSON.parse(JSON.stringify(this.pick(l,h,!1))),v),g,k):(k=v,this.set(d,this.pick(l,h,!1),g,k)),g},p.prototype.set=function(l,d,h,g){var v,k,j,D;if(typeof d>"u")return h;for(j=u(l,this.separator),v=0;v<j.length;v++){if(D=j[v],v===j.length-1)if(g&&n(d)&&n(h[D]))for(k in d)b.call(d,k)&&(h[D][k]=d[k]);else if(g&&Array.isArray(h[D])&&Array.isArray(d))for(var T=0;T<d.length;T++)h[j[v]].push(d[T]);else h[D]=d;else(!b.call(h,D)||!n(h[D])&&!Array.isArray(h[D]))&&(/^\d+$/.test(j[v+1])?h[D]=[]:h[D]={});h=h[D]}return h},p.prototype.transform=function(l,d,h){return d=d||{},h=h||{},Object.keys(l).forEach((function(g){this.set(l[g],this.pick(g,d),h)}).bind(this)),h},p.prototype.dot=function(l,d,h){d=d||{},h=h||[];var g=Array.isArray(l);return Object.keys(l).forEach((function(v){var k=g&&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(g&&this.useBrackets){var j=h[h.length-1]||"";return this.dot(l[v],d,h.slice(0,-1).concat(j+k))}else return this.dot(l[v],d,h.concat(k));else g&&this.useBrackets?d[h.join(this.separator).concat("["+v+"]")]=l[v]:d[h.concat(k).join(this.separator)]=l[v]}).bind(this)),d},p.pick=x("pick"),p.move=x("move"),p.transfer=x("transfer"),p.transform=x("transform"),p.copy=x("copy"),p.object=x("object"),p.str=x("str"),p.set=x("set"),p.delete=x("delete"),p.del=p.remove=x("remove"),p.dot=x("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(p,l,{get:function(){return y.override},set:function(d){y.override=!!d}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(p,l,{get:function(){return y[l]},set:function(d){y[l]=d}})}),p._process=t,tn=p,tn}var Zh=Qh();const Oo=or(Zh),Kh=({name:t,label:e,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:a=xe.Horizontal,isMultiSelect:u=!1,className:b,onChange:p,itemTemplate:y})=>{const[x,l]=f.useState(),[d,h]=f.useState([]),g=xr(()=>n,[n]),v=f.useId();f.useEffect(()=>{if(u){const F=Array.isArray(r)?r.map(I=>I.toString()):r?[String(r)]:void 0;h(F??[])}else r&&l(r.toString())},[r]);const k=F=>u?d.findIndex(I=>I===F)>-1:x===F,j=F=>{const I=F.toString();if(u){const N=k(I);let _;N?_=d.filter(A=>A!=I):_=[...d,I],h(_),p?.({name:t,value:_})}else I!==x&&(l(I),p?.({name:t,value:I}))},D=F=>{Array.isArray(F?.value)?h(F?.value??[]):l(F?.value),p?.(F)},T=gt(Ze.FocusWithin),H=f.useCallback((F,I)=>m.jsx(m.Fragment,{children:I}),[]),V=y||H,B=(F,I,N)=>{const _=`element_${v}_${I}`,A=Oo.pick(s,F),U=String(Oo.pick(o,F)),Q=I===0,Y=I===N.length-1,P=te("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":Q&&a===xe.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":Y&&a===xe.Horizontal,"bsc:border-t bsc:border-b":!Q&&!Y&&a===xe.Horizontal,"bsc:border-l":!Q&&a===xe.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":Q&&a===xe.Vertical,"bsc:border bsc:rounded-b-md":Y&&a===xe.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!Q&&!Y&&a===xe.Vertical},T),c={itemId:_,selectedValue:u?d:x,itemText:A,itemValue:U,itemData:F,itemStyles:P,isSelected:k(U),isFirstItem:Q,isLastItem:Y,onItemChanged:j};return u?m.jsx(qe,{props:c,template:V,children:m.jsx(tt,{className:P,children:m.jsx(Mn,{value:U,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:A})})},_):m.jsx(qe,{props:c,template:V,children:m.jsx(tt,{className:P,children:m.jsx(Yn,{value:U,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:A})})},_)},L=te("bsc:flex bsc:flex-col bsc:gap-2",b),G=te("bsc:flex",{"bsc:flex-col bsc:w-max":a===xe.Vertical}),X=F=>u?m.jsx(Rn,{name:t,value:d,readOnly:i,onChange:D,className:G,children:F.map(B)}):m.jsx(Hn,{name:t,value:x,readOnly:i,onChange:D,className:G,children:F.map(B)});return m.jsxs(tt,{className:L,children:[e&&m.jsx(Ie,{label:e,readOnly:i}),g&&X(g)]})},Xh=f.memo(Kh),Jh=({name:t,label:e,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:a=Ee.Right,orientation:u=xe.Vertical,className:b,useAnimation:p,onChange:y})=>{const x=xr(()=>n,[n]),l=f.useId(),d=gr(p),h=gt(Ze.FocusWithin),g=te("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",b),v=te("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===xe.Vertical,"bsc:*:pr-2":u===xe.Horizontal}),k=te("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),j=te("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":a===Ee.Left,"bsc:mr-2":a===Ee.Right,"bc-read-only":i},h),D=te("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"),T=te("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&&d}),H=te("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&&d}),V=(B,L)=>{const G=B[s],X=B[o];return m.jsxs(tt,{className:k,children:[a===Ee.Left&&m.jsx(Ie,{label:G,readOnly:i}),m.jsx(Yn,{value:X,className:j,children:m.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:D,children:[m.jsx("circle",{cx:15,cy:15,r:15,className:T}),m.jsx("circle",{cx:"50%",cy:"50%",r:7,className:H})]})}),a===Ee.Right&&m.jsx(Ie,{label:G,readOnly:i})]},`radio_${l}_item${L}`)};return m.jsxs("div",{className:g,children:[e&&m.jsx(Ie,{label:e,readOnly:i}),m.jsx(Hn,{name:t,value:r,readOnly:i,onChange:y,className:v,children:x&&x.map(V)})]})},ep=f.memo(Jh),tp=({name:t,label:e,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:a})=>{const u=gr(o),b=te("bc-toggle-wrapper bsc:flex bsc:flex-col",i),p=gt(Ze.FocusWithin),y=te("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},p),x=te("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 m.jsxs(tt,{className:b,children:[e&&m.jsx(Ie,{label:e,readOnly:s}),m.jsx(_i,{name:t,value:r,toggled:n,onChange:a,className:y,children:m.jsx("div",{className:x})})]})},rp=f.memo(tp);K.BeeSoftProvider=Bo,K.Button=Oe,K.Checkbox=Vn,K.CheckboxGroup=Yi,K.ContentEditableInput=Ut,K.DateFormatType=At,K.DateScrollerType=dt,K.DateSelectionType=ae,K.DateTime=Gh,K.FormGroupItemOrientation=xe,K.FormattedInput=Po,K.GroupButton=Xh,K.MediaQuery=Yr,K.MobileOverlayPanel=go,K.OverlayPanel=xo,K.RadioButton=ep,K.SelectionLabelLocation=Ee,K.Toggle=rp,K.applyBeeSoftTheme=Zd,K.createBeeSoftTheme=Kd,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));
|