bs-ad-calendar-react 1.1.0 → 1.2.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/README.md +165 -86
- package/dist/bs-ad-calendar.css +1 -1
- package/dist/bs-ad-calendar.js +1261 -1120
- package/dist/bs-ad-calendar.umd.cjs +8 -8
- package/dist/vite.svg +1 -1
- package/package.json +4 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`+de+n}}var
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
5
|
-
`+D[
|
|
1
|
+
(function(C,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],j):(C=typeof globalThis<"u"?globalThis:C||self,j(C.BSADCalendar={},C.React))})(this,(function(C,j){"use strict";var Oe={exports:{}},Ye={};var st;function pn(){if(st)return Ye;st=1;var t=j,e=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(l,c,d){var h,m={},y=null,R=null;d!==void 0&&(y=""+d),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(R=c.ref);for(h in c)s.call(c,h)&&!o.hasOwnProperty(h)&&(m[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)m[h]===void 0&&(m[h]=c[h]);return{$$typeof:e,type:l,key:y,ref:R,props:m,_owner:r.current}}return Ye.Fragment=a,Ye.jsx=i,Ye.jsxs=i,Ye}var Re={};var ot;function vn(){return ot||(ot=1,process.env.NODE_ENV!=="production"&&(function(){var t=j,e=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b=Symbol.iterator,$="@@iterator";function W(n){if(n===null||typeof n!="object")return null;var u=b&&n[b]||n[$];return typeof u=="function"?u:null}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(n){{for(var u=arguments.length,f=new Array(u>1?u-1:0),p=1;p<u;p++)f[p-1]=arguments[p];Y("error",n,f)}}function Y(n,u,f){{var p=T.ReactDebugCurrentFrame,E=p.getStackAddendum();E!==""&&(u+="%s",f=f.concat([E]));var w=f.map(function(S){return String(S)});w.unshift("Warning: "+u),Function.prototype.apply.call(console[n],console,w)}}var N=!1,Me=!1,k=!1,F=!1,L=!1,B;B=Symbol.for("react.module.reference");function V(n){return!!(typeof n=="string"||typeof n=="function"||n===s||n===o||L||n===r||n===d||n===h||F||n===R||N||Me||k||typeof n=="object"&&n!==null&&(n.$$typeof===y||n.$$typeof===m||n.$$typeof===i||n.$$typeof===l||n.$$typeof===c||n.$$typeof===B||n.getModuleId!==void 0))}function H(n,u,f){var p=n.displayName;if(p)return p;var E=u.displayName||u.name||"";return E!==""?f+"("+E+")":f}function z(n){return n.displayName||"Context"}function Z(n){if(n==null)return null;if(typeof n.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case s:return"Fragment";case a:return"Portal";case o:return"Profiler";case r:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case l:var u=n;return z(u)+".Consumer";case i:var f=n;return z(f._context)+".Provider";case c:return H(n,n.render,"ForwardRef");case m:var p=n.displayName||null;return p!==null?p:Z(n.type)||"Memo";case y:{var E=n,w=E._payload,S=E._init;try{return Z(S(w))}catch{return null}}}return null}var Q=Object.assign,ne=0,ue,ce,U,ge,me,ye,pe;function _e(){}_e.__reactDisabledLog=!0;function ke(){{if(ne===0){ue=console.log,ce=console.info,U=console.warn,ge=console.error,me=console.group,ye=console.groupCollapsed,pe=console.groupEnd;var n={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}ne++}}function ve(){{if(ne--,ne===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},n,{value:ue}),info:Q({},n,{value:ce}),warn:Q({},n,{value:U}),error:Q({},n,{value:ge}),group:Q({},n,{value:me}),groupCollapsed:Q({},n,{value:ye}),groupEnd:Q({},n,{value:pe})})}ne<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=T.ReactCurrentDispatcher,de;function xe(n,u,f){{if(de===void 0)try{throw Error()}catch(E){var p=E.stack.trim().match(/\n( *(at )?)/);de=p&&p[1]||""}return`
|
|
2
|
+
`+de+n}}var he=!1,we;{var nn=typeof WeakMap=="function"?WeakMap:Map;we=new nn}function Ue(n,u){if(!n||he)return"";{var f=we.get(n);if(f!==void 0)return f}var p;he=!0;var E=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=le.current,le.current=null,ke();try{if(u){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(X){p=X}Reflect.construct(n,[],S)}else{try{S.call()}catch(X){p=X}n.call(S.prototype)}}else{try{throw Error()}catch(X){p=X}n()}}catch(X){if(X&&p&&typeof X.stack=="string"){for(var D=X.stack.split(`
|
|
3
|
+
`),G=p.stack.split(`
|
|
4
|
+
`),A=D.length-1,P=G.length-1;A>=1&&P>=0&&D[A]!==G[P];)P--;for(;A>=1&&P>=0;A--,P--)if(D[A]!==G[P]){if(A!==1||P!==1)do if(A--,P--,P<0||D[A]!==G[P]){var ee=`
|
|
5
|
+
`+D[A].replace(" at new "," at ");return n.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",n.displayName)),typeof n=="function"&&we.set(n,ee),ee}while(A>=1&&P>=0);break}}}finally{he=!1,le.current=w,ve(),Error.prepareStackTrace=E}var Te=n?n.displayName||n.name:"",De=Te?xe(Te):"";return typeof n=="function"&&we.set(n,De),De}function v(n,u,f){return Ue(n,!1)}function x(n){var u=n.prototype;return!!(u&&u.isReactComponent)}function re(n,u,f){if(n==null)return"";if(typeof n=="function")return Ue(n,x(n));if(typeof n=="string")return xe(n);switch(n){case d:return xe("Suspense");case h:return xe("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case c:return v(n.render);case m:return re(n.type,u,f);case y:{var p=n,E=p._payload,w=p._init;try{return re(w(E),u,f)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,qe={},rn=T.ReactDebugCurrentFrame;function Ge(n){if(n){var u=n._owner,f=re(n.type,n._source,u?u.type:null);rn.setExtraStackFrame(f)}else rn.setExtraStackFrame(null)}function br(n,u,f,p,E){{var w=Function.call.bind(q);for(var S in n)if(w(n,S)){var D=void 0;try{if(typeof n[S]!="function"){var G=Error((p||"React class")+": "+f+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw G.name="Invariant Violation",G}D=n[S](u,S,p,f,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(A){D=A}D&&!(D instanceof Error)&&(Ge(E),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",p||"React class",f,S,typeof D),Ge(null)),D instanceof Error&&!(D.message in qe)&&(qe[D.message]=!0,Ge(E),_("Failed %s type: %s",f,D.message),Ge(null))}}}var Er=Array.isArray;function et(n){return Er(n)}function Mr(n){{var u=typeof Symbol=="function"&&Symbol.toStringTag,f=u&&n[Symbol.toStringTag]||n.constructor.name||"Object";return f}}function _r(n){try{return an(n),!1}catch{return!0}}function an(n){return""+n}function sn(n){if(_r(n))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Mr(n)),an(n)}var on=T.ReactCurrentOwner,kr={key:!0,ref:!0,__self:!0,__source:!0},un,cn;function xr(n){if(q.call(n,"ref")){var u=Object.getOwnPropertyDescriptor(n,"ref").get;if(u&&u.isReactWarning)return!1}return n.ref!==void 0}function wr(n){if(q.call(n,"key")){var u=Object.getOwnPropertyDescriptor(n,"key").get;if(u&&u.isReactWarning)return!1}return n.key!==void 0}function Cr(n,u){typeof n.ref=="string"&&on.current}function Tr(n,u){{var f=function(){un||(un=!0,_("%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)",u))};f.isReactWarning=!0,Object.defineProperty(n,"key",{get:f,configurable:!0})}}function Yr(n,u){{var f=function(){cn||(cn=!0,_("%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)",u))};f.isReactWarning=!0,Object.defineProperty(n,"ref",{get:f,configurable:!0})}}var Rr=function(n,u,f,p,E,w,S){var D={$$typeof:e,type:n,key:u,ref:f,props:S,_owner:w};return D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(D,"_self",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.defineProperty(D,"_source",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D};function jr(n,u,f,p,E){{var w,S={},D=null,G=null;f!==void 0&&(sn(f),D=""+f),wr(u)&&(sn(u.key),D=""+u.key),xr(u)&&(G=u.ref,Cr(u,E));for(w in u)q.call(u,w)&&!kr.hasOwnProperty(w)&&(S[w]=u[w]);if(n&&n.defaultProps){var A=n.defaultProps;for(w in A)S[w]===void 0&&(S[w]=A[w])}if(D||G){var P=typeof n=="function"?n.displayName||n.name||"Unknown":n;D&&Tr(S,P),G&&Yr(S,P)}return Rr(n,D,G,E,p,on.current,S)}}var tt=T.ReactCurrentOwner,ln=T.ReactDebugCurrentFrame;function Ce(n){if(n){var u=n._owner,f=re(n.type,n._source,u?u.type:null);ln.setExtraStackFrame(f)}else ln.setExtraStackFrame(null)}var nt;nt=!1;function rt(n){return typeof n=="object"&&n!==null&&n.$$typeof===e}function dn(){{if(tt.current){var n=Z(tt.current.type);if(n)return`
|
|
6
6
|
|
|
7
|
-
Check the render method of \``+n+"`."}return""}}function
|
|
7
|
+
Check the render method of \``+n+"`."}return""}}function Or(n){return""}var hn={};function Ar(n){{var u=dn();if(!u){var f=typeof n=="string"?n:n.displayName||n.name;f&&(u=`
|
|
8
8
|
|
|
9
|
-
Check the top-level render call using <`+f+">.")}return
|
|
9
|
+
Check the top-level render call using <`+f+">.")}return u}}function fn(n,u){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var f=Ar(u);if(hn[f])return;hn[f]=!0;var p="";n&&n._owner&&n._owner!==tt.current&&(p=" It was passed a child from "+Z(n._owner.type)+"."),Ce(n),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',f,p),Ce(null)}}function gn(n,u){{if(typeof n!="object")return;if(et(n))for(var f=0;f<n.length;f++){var p=n[f];rt(p)&&fn(p,u)}else if(rt(n))n._store&&(n._store.validated=!0);else if(n){var E=W(n);if(typeof E=="function"&&E!==n.entries)for(var w=E.call(n),S;!(S=w.next()).done;)rt(S.value)&&fn(S.value,u)}}}function Fr(n){{var u=n.type;if(u==null||typeof u=="string")return;var f;if(typeof u=="function")f=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===c||u.$$typeof===m))f=u.propTypes;else return;if(f){var p=Z(u);br(f,n.props,"prop",p,n)}else if(u.PropTypes!==void 0&&!nt){nt=!0;var E=Z(u);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",E||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pr(n){{for(var u=Object.keys(n.props),f=0;f<u.length;f++){var p=u[f];if(p!=="children"&&p!=="key"){Ce(n),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",p),Ce(null);break}}n.ref!==null&&(Ce(n),_("Invalid attribute `ref` supplied to `React.Fragment`."),Ce(null))}}var mn={};function yn(n,u,f,p,E,w){{var S=V(n);if(!S){var D="";(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).length===0)&&(D+=" 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 G=Or();G?D+=G:D+=dn();var A;n===null?A="null":et(n)?A="array":n!==void 0&&n.$$typeof===e?(A="<"+(Z(n.type)||"Unknown")+" />",D=" Did you accidentally export a JSX literal instead of a component?"):A=typeof n,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",A,D)}var P=jr(n,u,f,E,w);if(P==null)return P;if(S){var ee=u.children;if(ee!==void 0)if(p)if(et(ee)){for(var Te=0;Te<ee.length;Te++)gn(ee[Te],n);Object.freeze&&Object.freeze(ee)}else _("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 gn(ee,n)}if(q.call(u,"key")){var De=Z(n),X=Object.keys(u).filter(function($r){return $r!=="key"}),at=X.length>0?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}";if(!mn[De+at]){var Lr=X.length>0?"{"+X.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
|
|
10
10
|
let props = %s;
|
|
11
11
|
<%s {...props} />
|
|
12
12
|
React keys must be passed directly to JSX without using spread:
|
|
13
13
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,tt,fe,Fr,fe),hn[fe+tt]=!0}}return n===a?jr(F):Tr(F),F}}function Or(n,i,f){return fn(n,i,f,!0)}function Yr(n,i,f){return fn(n,i,f,!1)}var Ar=Yr,Pr=Or;we.Fragment=a,we.jsx=Ar,we.jsxs=Pr})()),we}var at;function pn(){return at||(at=1,process.env.NODE_ENV==="production"?Ce.exports=gn():Ce.exports=mn()),Ce.exports}var g=pn();const ge=[1943,4,14],st=[31,28,31,30,31,30,31,31,30,31,30,31],yn=[31,29,31,30,31,30,31,31,30,31,30,31],ee=[[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,31,32,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,31,32,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,31,29,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365]];let ot=class extends Error{constructor(e){super(e),this.name="DateOutOfRangeError"}};const it=()=>ge[0]+1,ut=()=>ge[0]+ee.length-1,ct=()=>2e3,lt=()=>2e3+ee.length-1,Re=t=>t%400===0||t%4===0&&t%100!==0,Be=t=>Re(t)?yn:st,vn=(t,e,r)=>!(t<it()||t>ut()||e<1||e>12||r<1||r>Be(t)[e-1]),dt=(t,e,r)=>{let a=t*365+r;for(let s=0;s<e-1;s++)a+=st[s];return e<=2&&(t-=1),a+=Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400),a};function bn(t,e,r){const a=e+1;if(!vn(t,a,r))throw new ot("Date out of range");let s=2e3,o=1,c=1,l=Math.abs(dt(t,a,r)-dt(...ge)),u=0;for(;l>=ee[u][1];)l-=ee[u][1],s+=1,u+=1;let d=0;for(;l>=ee[u][0][d];)l-=ee[u][0][d],o+=1,d+=1;return c+=l,[s,o-1,c]}const Dn=(t,e,r)=>!(t<ct()||t>lt()||e<1||e>12||r<1||r>ee[t-2e3][0][e-1]),Sn=(t,e,r)=>{let a=r-1;const s=t-2e3;for(let o=0;o<e-1;o++)a+=ee[s][0][o];for(let o=0;o<s;o++)a+=ee[o][1];return a},En=(t,e,r)=>{const a=e+1;if(!Dn(t,a,r))throw new ot("Date out of range");let[s,o,c]=[ge[0],1,1];const l=Be(s).slice(0,ge[1]-1).reduce((y,m)=>y+m,0)+ge[2]-1;let u=Math.abs(Sn(t,a,r)+l);for(;u>=366&&Re(s)||u>=365&&!Re(s);)u-=Re(s)?366:365,s+=1;const d=Be(s);let h=0;for(;u>=d[h];)u-=d[h],o+=1,h+=1;return c+=u,[s,o-1,c]},re={enMinYear:it,enMaxYear:ut,npMinYear:ct,npMaxYear:lt,englishToNepali:bn,nepaliToEnglish:En},ht="en",X="ne",ft=207e5,gt=198e5,Mn=5049018e5,_n=new Date(1986,0,1,0,15),Te=["Baisakh","Jestha","Asar","Shrawan","Bhadra","Aswin","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],He=["Bai","Jes","Asa","Shr","Bhd","Asw","Kar","Man","Pou","Mag","Fal","Cha"],mt=["बैशाख","जेठ","असार","श्रावण","भाद्र","आश्विन","कार्तिक","मंसिर","पौष","माघ","फाल्गुण","चैत्र"],wn=["बै","जे","अ","श्रा","भा","आ","का","मं","पौ","मा","फा","चै"],$e=["January","February","March","April","May","June","July","August","September","October","November","December"],Le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],kn=["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जुन","जुलाई","अगस्ट","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर"],xn=["जन","फेब","मार","अप्रि","मे","जुन","जुला","अग","सेप","अक्टो","नोभे","डिसे"],pt=["०","१","२","३","४","५","६","७","८","९"],me=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],je=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],yt=["आइत","सोम","मंगल","बुध","बिहि","शुक्र","शनि"],vt=["आइतबार","सोमबार","मंगलबार","बुधबार","बिहिबार","शुक्रबार","शनिबार"],Cn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DD?|ddd?d?|do?|YYYY|YY|y{2,4}|yo?|a|A|hh?|HH?|mm?|ss?|SSS|x|X|.)/g,Rn=t=>{const e=t.getTime(),r=e<Mn?gt:ft,a=new Date(e+r),s=a.getUTCFullYear(),o=a.getUTCMonth(),c=a.getUTCDate(),l=a.getUTCHours(),u=a.getUTCMinutes(),d=a.getUTCSeconds(),h=a.getUTCMilliseconds(),y=a.getUTCDay();return{year:s,month0:o,day:c,hour:l,minute:u,second:d,ms:h,weekDay:y}},bt=(t,e,r,a,s,o,c)=>{const l=new Date(t,e,r,a,s,o,c);let u=l<_n?gt:ft;const d=-1*l.getTimezoneOffset()*60*1e3;return new Date(l.getTime()-u+d)},Oe=t=>{const e=t.match(Cn);return e?e.map(r=>r.startsWith("[")&&r.endsWith("]")?r.slice(1,-1):r):[]},te=t=>{if(t.length===0)return new RegExp("");let e=[...t];if(e=e.sort((a,s)=>s.length-a.length),e[0]==="")return new RegExp("");const r=`(${e.join("|")})`;return new RegExp(r)},W=t=>t.toString().padStart(2,"0"),Dt=t=>t.toString().padStart(3,"0"),Tn=t=>t.split("").map(e=>pt[e.charCodeAt(0)-48]).join(""),Y=(t,e)=>{const r=typeof t=="string"?t:String(t);return e!==X?r:Tn(r)},jn=(t,e)=>Y(t.getYear(),e).substring(2),On=(t,e)=>Y(t.getYear(),e),Yn=(t,e)=>Y(t.getEnglishYear(),e).substring(2),An=(t,e)=>Y(t.getEnglishYear(),e),Pn=(t,e)=>Y(t.getMonth()+1,e),Fn=(t,e)=>Y(W(t.getMonth()+1),e),In=(t,e)=>e===X?wn[t.getMonth()]:He[t.getMonth()],Nn=(t,e)=>e===X?mt[t.getMonth()]:Te[t.getMonth()],Bn=(t,e)=>Y(t.getEnglishMonth()+1,e),Hn=(t,e)=>Y(W(t.getEnglishMonth()+1),e),$n=(t,e)=>e===X?xn[t.getEnglishMonth()]:Le[t.getEnglishMonth()],Ln=(t,e)=>e===X?kn[t.getEnglishMonth()]:$e[t.getEnglishMonth()],Wn=(t,e)=>Y(t.getDate(),e),Un=(t,e)=>Y(W(t.getDate()),e),Vn=(t,e)=>Y(t.getEnglishDate(),e),Gn=(t,e)=>Y(W(t.getEnglishDate()),e),St=(t,e)=>Y(t.getDay(),e),Ye=(t,e)=>e===X?yt[t.getDay()]:me[t.getDay()],Et=(t,e)=>e===X?vt[t.getDay()]:je[t.getDay()],Mt=(t,e)=>Y(t.getHours(),e),_t=(t,e)=>Y(W(t.getHours()),e),wt=(t,e)=>{const r=t.getHours(),a=r>12?r-12:r;return Y(a,e)},kt=(t,e)=>{const r=t.getHours(),a=r>12?r-12:r;return Y(W(a),e)},xt=(t,e)=>Y(t.getMinutes(),e),Ct=(t,e)=>Y(W(t.getMinutes()),e),Rt=(t,e)=>Y(t.getSeconds(),e),Tt=(t,e)=>Y(W(t.getSeconds()),e),jt=(t,e)=>Y(Dt(t.getMilliseconds()),e),Ot=(t,e)=>e===X?t.getHours()>=12?"पिम":"एम":t.getHours()>=12?"PM":"AM",Yt=(t,e)=>e===X?t.getHours()>=12?"पिम":"एम":t.getHours()>=12?"pm":"am",At={YY:jn,YYYY:On,M:Pn,MM:Fn,MMM:In,MMMM:Nn,D:Wn,DD:Un,d:St,dd:Ye,ddd:Ye,dddd:Et,H:Mt,HH:_t,h:wt,hh:kt,m:xt,mm:Ct,s:Rt,ss:Tt,SSS:jt,A:Ot,a:Yt},Pt=(t,e,r)=>{const a=Oe(e),s=o=>o in At?At[o](t,r):o;return a.map(s).join("")},Jn=(t,e)=>Pt(t,e,ht),qn=(t,e)=>Pt(t,e,X),Kn=t=>{const e=W(t.getYear()),r=W(t.getMonth()+1),a=W(t.getDate()),s=W(t.getHours()),o=W(t.getMinutes()),c=W(t.getSeconds()),l=t.getMilliseconds(),u=l===0?"":`.${Dt(l)}`;return`${e}-${r}-${a} ${s}:${o}:${c}${u}`},Ft={YY:Yn,YYYY:An,M:Bn,MM:Hn,MMM:$n,MMMM:Ln,D:Vn,DD:Gn,d:St,dd:Ye,ddd:Ye,dddd:Et,H:Mt,HH:_t,h:wt,hh:kt,m:xt,mm:Ct,s:Rt,ss:Tt,SSS:jt,A:Ot,a:Yt},It=(t,e,r)=>{const a=Oe(e),s=o=>o in Ft?Ft[o](t,r):o;return a.map(s).join("")},zn=(t,e)=>It(t,e,ht),Xn=(t,e)=>It(t,e,X);function Zn(t){const e=t.split(/[-./]/,3),[r,a=1,s=1]=e.map(o=>{const c=parseInt(o,10);if(Number.isNaN(c))throw new Error("Invalid date");return c});return[r,a-1,s]}function Qn(t){if(!t)return[0,0,0,0];const[e,r="0"]=t.split(".",2),a=e.split(":",3),[s,o=0,c=0]=a.map(u=>{const d=parseInt(u,10);if(Number.isNaN(d))throw new Error("Invalid time");return d});let l=parseInt(r,10);return Number.isNaN(l)&&(l=0),[s,o,c,l]}function er(t){const[e,r]=t.split(" ",2),[a,s,o]=Zn(e),[c,l,u,d]=Qn(r);return[a,s,o,c,l,u,d]}const Nt={YY:/(\d\d)/,YYYY:/(\d\d\d\d)/,M:/(1[0-2]|0[1-9]|[1-9])/,MM:/(1[0-2]|0[1-9]|[1-9])/,D:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,DD:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,H:/(2[0-3]|[0-1]\d|\d)/,HH:/(2[0-3]|[0-1]\d|\d)/,hh:/(1[0-2]|0[1-9]|[1-9])/,mm:/([0-5]\d|\d)/,ss:/([0-5]\d|\d)/,SSS:/(\d\d\d)/,A:/(AM|PM)/,a:/(am|pm)/,MMMM:te(Te),MMM:te(He),dddd:te(je),ddd:te(me),dd:te(me),d:/([0-6])/};function tr(t){const e=[],r=[];for(const s of t)s in Nt?(e.push(s),r.push(Nt[s].source)):r.push(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));const a=r.join("");return{dateTokens:e,regex:new RegExp(`^${a}$`)}}function nr(t,e){let[r,a,s,o,c,l,u,d]=[0,1,1,0,0,0,0,0],h=!1,y=!1;for(let m=0;m<t.length;m++){const T=t[m],v=parseInt(e[m+1]);switch(T){case"YYYY":r=v;break;case"YY":r=2e3+parseInt(e[m]);break;case"MM":case"M":a=v;break;case"MMMM":a=Te.indexOf(e[m+1])+1;break;case"MMM":a=He.indexOf(e[m+1])+1;break;case"DD":case"D":s=v;break;case"HH":case"H":o=v;break;case"hh":case"h":c=v,y=!0;break;case"mm":case"m":l=v;break;case"ss":case"s":u=v;break;case"SSS":d=v;break;case"A":case"a":h=e[m+1].toLowerCase()==="pm"}}return y&&(o=c+(h?12:0)),{year:r,month0:a-1,day:s,hour:o,minute:l,second:u,ms:d}}function Bt(t,e){const r=Oe(e),{dateTokens:a,regex:s}=tr(r),o=RegExp(s).exec(t);if(!o)throw new Error("Invalid date format");const{year:c,month0:l,day:u,hour:d,minute:h,second:y,ms:m}=nr(a,o);return[c,l,u,d,h,y,m]}const Ht={YY:/(\d\d)/,YYYY:/(\d\d\d\d)/,M:/(1[0-2]|0[1-9]|[1-9])/,MM:/(1[0-2]|0[1-9]|[1-9])/,D:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,DD:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,H:/(2[0-3]|[0-1]\d|\d)/,HH:/(2[0-3]|[0-1]\d|\d)/,hh:/(1[0-2]|0[1-9]|[1-9])/,mm:/([0-5]\d|\d)/,ss:/([0-5]\d|\d)/,SSS:/(\d\d\d)/,A:/(AM|PM)/,a:/(am|pm)/,MMMM:te($e),MMM:te(Le),dddd:te(je),ddd:te(me),dd:te(me),d:/([0-6])/};function rr(t){const e=[],r=[];for(const s of t)s in Ht?(e.push(s),r.push(Ht[s].source)):r.push(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));const a=r.join("");return{dateTokens:e,regex:new RegExp(`^${a}$`)}}function ar(t,e){let[r,a,s,o,c,l,u,d]=[0,1,1,0,0,0,0,0],h=!1,y=!1;for(let m=0;m<t.length;m++){const T=t[m],v=parseInt(e[m+1]);switch(T){case"YYYY":r=v;break;case"YY":r=2e3+parseInt(e[m]);break;case"MM":case"M":a=v;break;case"MMMM":a=$e.indexOf(e[m+1])+1;break;case"MMM":a=Le.indexOf(e[m+1])+1;break;case"DD":case"D":s=v;break;case"HH":case"H":o=v;break;case"hh":case"h":c=v,y=!0;break;case"mm":case"m":l=v;break;case"ss":case"s":u=v;break;case"SSS":d=v;break;case"A":case"a":h=e[m+1].toLowerCase()==="pm"}}return y&&(o=c+(h?12:0)),{year:r,month0:a-1,day:s,hour:o,minute:l,second:u,ms:d}}function sr(t,e){const r=Oe(e),{dateTokens:a,regex:s}=rr(r),o=RegExp(s).exec(t);if(!o)throw new Error("Invalid date format");const{year:c,month0:l,day:u,hour:d,minute:h,second:y,ms:m}=ar(a,o);return[c,l,u,d,h,y,m]}function or(t){const e={एम:"AM",पिम:"PM"};mt.forEach((a,s)=>e[a]=Te[s]),vt.forEach((a,s)=>e[a]=je[s]),yt.forEach((a,s)=>e[a]=me[s]),pt.forEach((a,s)=>e[a]=String(s));const r=new RegExp(Object.keys(e).join("|"),"g");return t.replace(r,a=>e[a])}function ir(t,e){const r=or(t);return Bt(r,e)}class Ae extends Error{constructor(e){super(e),this.name="ValidationError"}}const ur=t=>{if(t<0||t>23)throw new Ae("Hour should be in the range 0-23")},cr=t=>{if(t<0||t>59)throw new Ae("Minute should be in the range 0-59")},lr=t=>{if(t<0||t>59)throw new Ae("Second should be in the range 0-59")},dr=t=>{if(t<0||t>999)throw new Ae("Millisecond should be in the range 0-999")},hr=(t,e,r,a)=>{ur(t),cr(e),lr(r),dr(a)};class H{timestamp;year;yearEn;month;monthEn;day;dayEn;hour;minute;weekDay;constructor(...e){if(e.length===0)this.initFromCurrentDate();else if(e.length===1&&e[0]instanceof Date)this.initFromEnglishDate(e[0]);else if(e.length===1&&e[0]instanceof H)this.initFromNepaliDate(e[0]);else if(e.length===1&&typeof e[0]=="string")this.parseFromString(e[0]);else if(e.length===1&&typeof e[0]=="number")this.initFromTimestamp(e[0]);else if(e.length===2&&typeof e[0]=="string"&&typeof e[1]=="string")this.parseFromStringWithFormat(e[0],e[1]);else if(e.length>=2&&e.length<=8&&e.every(r=>typeof r=="number"))this.initFromComponents(e);else throw new Error("Invalid date argument")}initFromCurrentDate(){this._setDateObject(new Date)}initFromEnglishDate(e){this._setDateObject(e)}initFromNepaliDate(e){this.set(e.year,e.month,e.day,e.hour,e.minute,e.getSeconds(),e.getMilliseconds())}parseFromString(e){const r=er(e);this.set(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}initFromTimestamp(e){this._setDateObject(new Date(e))}parseFromStringWithFormat(e,r){const a=Bt(e,r);this.set(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}initFromComponents(e){this.set(e[0],e[1],e[2]??1,e[3]??0,e[4]??0,e[5]??0,e[6]??0)}_setDateObject(e,r=!0){this.timestamp=e;const{year:a,month0:s,day:o,hour:c,minute:l,weekDay:u}=Rn(e);if(this.yearEn=a,this.monthEn=s,this.dayEn=o,this.hour=c,this.minute=l,this.weekDay=u,r){const[d,h,y]=re.englishToNepali(a,s,o);this.year=d,this.month=h,this.day=y}}getDateObject(){return this.timestamp}getYear(){return this.year}getEnglishYear(){return this.yearEn}getMonth(){return this.month}getEnglishMonth(){return this.monthEn}getDate(){return this.day}getEnglishDate(){return this.dayEn}getDay(){return this.weekDay}getHours(){return this.hour}getMinutes(){return this.minute}getSeconds(){return this.timestamp.getSeconds()}getMilliseconds(){return this.timestamp.getMilliseconds()}getTime(){return this.timestamp.getTime()}setYear(e){this.set(e,this.month,this.day,this.hour,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setMonth(e){this.set(this.year,e,this.day,this.hour,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setDate(e){this.set(this.year,this.month,e,this.hour,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setHours(e){this.set(this.year,this.month,this.day,e,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setMinutes(e){this.set(this.year,this.month,this.day,this.hour,e,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setSeconds(e){this.set(this.year,this.month,this.day,this.hour,this.minute,e,this.timestamp.getMilliseconds())}setMilliseconds(e){this.set(this.year,this.month,this.day,this.hour,this.minute,this.timestamp.getSeconds(),e)}setTime(e){this._setDateObject(new Date(e))}set(e,r,a,s,o,c,l){hr(s,o,c,l);const[u,d,h]=re.nepaliToEnglish(e,r,a);this.year=e,this.month=r,this.day=a,this._setDateObject(bt(u,d,h,s,o,c,l),!1)}setDateObject(e){this._setDateObject(e,!0)}format(e){return Jn(this,e)}formatNepali(e){return qn(this,e)}toString(){return Kn(this)}formatEnglishDate(e){return zn(this,e)}formatEnglishDateInNepali(e){return Xn(this,e)}static fromEnglishDate(e,r,a,s=0,o=0,c=0,l=0){const u=bt(e,r,a,s,o,c,l);return new H(u)}static parseNepaliFormat(e,r){const[a,s,o,c,l,u,d]=ir(e,r);return new H(a,s,o,c,l,u,d)}static parseEnglishDate(e,r){const[a,s,o,c,l,u,d]=sr(e,r);return H.fromEnglishDate(a,s,o,c,l,u,d)}static getDaysOfMonth(e,r){if(e<re.npMinYear()||e>re.npMaxYear())throw new Error("Year out of range");if(r<0||r>11)throw new Error("Month out of range");return ee[e-re.npMinYear()][0][r]}static minSupportedDate(){return H.fromEnglishDate(re.enMinYear(),0,1).getDateObject()}static maxSupportedDate(){return H.fromEnglishDate(re.enMaxYear(),11,31).getDateObject()}static minSupportedNepaliDate(){return new H(re.npMinYear(),0,1)}static maxSupportedNepaliDate(){const e=re.npMaxYear();return new H(e,11,this.getDaysOfMonth(e,11))}static minimum(){return console.warn("`NepaliDate.minimum()` is deprecated and will be removed in a future version. Please use `NepaliDate.minSupportedDate()` instead."),this.minSupportedDate()}static maximum(){return console.warn("`NepaliDate.maximum()` is deprecated and will be removed in a future version. Please use `NepaliDate.maxSupportedDate()` instead."),this.maxSupportedDate()}}const $t=["बैशाख","जेठ","आषाढ","श्रावण","भाद्र","आश्विन","कार्तिक","मंसिर","पौष","माघ","फाल्गुन","चैत्र"],We=["Baishakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],Lt=["January","February","March","April","May","June","July","August","September","October","November","December"],Wt=["आइत","सोम","मंगल","बुध","बिहि","शुक्र","शनि"],Ut=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Vt=["०","१","२","३","४","५","६","७","८","९"],fr={light:{primary:"#3b82f6",background:"#ffffff",text:"#1f2937",border:"#e5e7eb",hover:"#f3f4f6",selected:"#3b82f6",today:"#dbeafe",disabled:"#d1d5db"},dark:{primary:"#60a5fa",background:"#1f2937",text:"#f9fafb",border:"#374151",hover:"#374151",selected:"#3b82f6",today:"#1e40af",disabled:"#6b7280"}},ce=t=>t.toString().split("").map(e=>Vt[parseInt(e)]).join(""),Gt=(t,e,r)=>{if(t==="BS")try{const a=r===11?new H(e+1,0,1):new H(e,r+1,1);return new H(a.getTime()-1440*60*1e3).getDate()}catch{return 30}return new Date(e,r+1,0).getDate()},Jt=(t,e,r)=>{if(t==="BS")try{return new H(e,r,1).getDay()||0}catch{return 0}return new Date(e,r,1).getDay()},ne=t=>{const e=new Date;if(t==="BS")try{const r=H.fromEnglishDate(e.getFullYear(),e.getMonth(),e.getDate());return{year:r.getYear(),month:r.getMonth(),day:r.getDate()}}catch{return{year:2081,month:0,day:1}}return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},qt=(t,e,r,a,s)=>{if(t==="BS")try{const o=new H(e,r,a),l=new Date(o.getEnglishYear(),o.getEnglishMonth(),o.getEnglishDate()).toISOString().split("T")[0];return{bs:`${e}-${String(r+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`,ad:l,formatted:{bs:`${s[r]} ${a}, ${e}`,ad:new Date(o.getEnglishYear(),o.getEnglishMonth(),o.getEnglishDate()).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}}}catch{const o=`${e}-${String(r+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`;return{bs:o,ad:o,formatted:{bs:`${s[r]} ${a}, ${e}`,ad:`${s[r]} ${a}, ${e}`}}}else{const o=new Date(e,r,a),c=o.toISOString().split("T")[0];try{const l=H.fromEnglishDate(e,r,a),u=`${l.getYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`;return{ad:c,bs:u,formatted:{ad:o.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),bs:`${We[l.getMonth()]} ${l.getDate()}, ${l.getYear()}`}}}catch{return{ad:c,bs:c,formatted:{ad:o.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),bs:o.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}}}}},gr=(t,e,r)=>{const a=new Date(t.year,t.month,t.day).getTime(),s=new Date(e.year,e.month,e.day).getTime(),o=new Date(r.year,r.month,r.day).getTime();return a>=s&&a<=o},Kt=t=>{try{const[e,r,a]=t.split("-").map(Number);return!e||!r||!a?null:{year:e,month:r-1,day:a}}catch{return null}},Pe=(t,e,r,a="AD")=>{if(!e&&!r)return!1;const s=new Date(t.year,t.month,t.day).getTime();if(e){const o=Kt(e);if(o){const c=new Date(o.year,o.month,o.day).getTime();if(s<c)return!0}}if(r){const o=Kt(r);if(o){const c=new Date(o.year,o.month,o.day).getTime();if(s>c)return!0}}return!1},zt=(t="AD")=>{const e=O.useMemo(()=>ne(t),[t]),[r,a]=O.useState(e.year),[s,o]=O.useState(e.month),[c,l]=O.useState(null),[u,d]=O.useState(null),[h,y]=O.useState(null);O.useEffect(()=>{a(e.year),o(e.month)},[e.year,e.month]);const m=O.useMemo(()=>{const _=Gt(t,r,s),k=Jt(t,r,s),I=[];for(let A=0;A<k;A++)I.push(null);for(let A=1;A<=_;A++)I.push(A);return I},[r,s,t]);return{currentYear:r,currentMonth:s,selectedDate:c,rangeStart:u,rangeEnd:h,today:e,calendarDays:m,setCurrentYear:a,setCurrentMonth:o,setSelectedDate:l,setRangeStart:d,setRangeEnd:y,navigateMonth:_=>{let I=s+_,A=r;for(;I>11;)I-=12,A+=1;for(;I<0;)I+=12,A-=1;o(I),a(A)},isToday:_=>r===e.year&&s===e.month&&_===e.day,isSelected:(_,k="single")=>k==="range"?!!(u&&u.year===r&&u.month===s&&u.day===_)||!!(h&&h.year===r&&h.month===s&&h.day===_):!!(c&&c.year===r&&c.month===s&&c.day===_),isInRange:_=>{if(!u||!h)return!1;const k=new Date(r,s,_).getTime(),I=new Date(u.year,u.month,u.day).getTime(),A=new Date(h.year,h.month,h.day).getTime();return k>=I&&k<=A}}},Xt=()=>[{key:"today",label:"Today",getValue:t=>{const e=ne(t);return{start:e,end:e}}},{key:"yesterday",label:"Yesterday",getValue:t=>{const e=ne(t),r={...e,day:e.day-1};return{start:r,end:r}}},{key:"last7days",label:"Last 7 Days",getValue:t=>{const e=ne(t);return{start:{...e,day:e.day-6},end:e}}},{key:"last30days",label:"Last 30 Days",getValue:t=>{const e=ne(t);return{start:{...e,day:e.day-29},end:e}}},{key:"thisMonth",label:"This Month",getValue:t=>{const e=ne(t);return{start:{...e,day:1},end:e}}},{key:"lastMonth",label:"Last Month",getValue:t=>{const e=ne(t),r=e.month===0?11:e.month-1,a=e.month===0?e.year-1:e.year;return{start:{year:a,month:r,day:1},end:{year:a,month:r,day:30}}}},{key:"last3months",label:"Last 3 Months",getValue:t=>{const e=ne(t);return{start:{year:e.month<3?e.year-1:e.year,month:e.month<3?e.month+9:e.month-3,day:1},end:e}}},{key:"last180days",label:"Last 180 Days",getValue:t=>{const e=ne(t);return{start:{...e,day:e.day-179},end:e}}}],w={calendar:"_calendar_1qlbw_1",grid:"_grid_1qlbw_11",header:"_header_1qlbw_22",navButton:"_navButton_1qlbw_29",monthYear:"_monthYear_1qlbw_55",pickerOverlay:"_pickerOverlay_1qlbw_75",pickerContent:"_pickerContent_1qlbw_85",pickerHeader:"_pickerHeader_1qlbw_95",closeButton:"_closeButton_1qlbw_109",pickerBody:"_pickerBody_1qlbw_128",pickerSection:"_pickerSection_1qlbw_132",pickerSectionHeader:"_pickerSectionHeader_1qlbw_148",yearNav:"_yearNav_1qlbw_159",yearGrid:"_yearGrid_1qlbw_191",selected:"_selected_1qlbw_211",monthGrid:"_monthGrid_1qlbw_217",dayHeader:"_dayHeader_1qlbw_249",day:"_day_1qlbw_249",dayDisabled:"_dayDisabled_1qlbw_270",dayOtherMonth:"_dayOtherMonth_1qlbw_270",daySelected:"_daySelected_1qlbw_274",dayToday:"_dayToday_1qlbw_279",dayInRange:"_dayInRange_1qlbw_285"},mr=({currentYear:t,currentMonth:e,months:r,onYearChange:a,onMonthChange:s,onClose:o,showNepaliNumbers:c=!1,convertToNepaliNumber:l=d=>d.toString(),calendarType:u})=>{const[d,h]=O.useState(Math.floor(t/12)*12),y=u==="BS"?2e3:1944,m=u==="BS"?2100:2043;return g.jsx("div",{className:w.pickerOverlay,onClick:o,children:g.jsxs("div",{className:w.pickerContent,onClick:T=>T.stopPropagation(),children:[g.jsxs("div",{className:w.pickerHeader,children:[g.jsx("h3",{children:"Select Month & Year"}),g.jsx("button",{onClick:o,className:w.closeButton,children:"×"})]}),g.jsxs("div",{className:w.pickerBody,children:[g.jsxs("div",{className:w.pickerSection,children:[g.jsxs("div",{className:w.pickerSectionHeader,children:[g.jsx("label",{children:"Year"}),g.jsxs("div",{className:w.yearNav,children:[g.jsx("button",{onClick:()=>h(Math.max(y,d-12)),disabled:d<=y,children:"«"}),g.jsxs("span",{children:[c?l(d):d," - ",c?l(d+11):d+11]}),g.jsx("button",{onClick:()=>h(Math.min(m-11,d+12)),disabled:d+11>=m,children:"»"})]})]}),g.jsx("div",{className:w.yearGrid,children:Array.from({length:12},(T,v)=>{const $=d+v;return $>m?null:g.jsx("button",{onClick:()=>a($),className:$===t?w.selected:"",children:c?l($):$},$)})})]}),g.jsxs("div",{className:w.pickerSection,children:[g.jsx("label",{children:"Month"}),g.jsx("div",{className:w.monthGrid,children:r.map((T,v)=>g.jsx("button",{onClick:()=>{s(v),o()},className:v===e?w.selected:"",children:T},v))})]})]})]})})},Ue=({currentMonth:t,currentYear:e,months:r,onNavigateMonth:a,onYearChange:s,onMonthChange:o,disabled:c=!1,showNepaliNumbers:l=!1,convertToNepaliNumber:u,calendarType:d})=>{const[h,y]=O.useState(!1);return g.jsxs("div",{className:w.header,children:[g.jsx("button",{className:w.navButton,onClick:()=>a(-12),disabled:c,"aria-label":"Previous year",title:"Previous year",children:"«"}),g.jsx("button",{className:w.navButton,onClick:()=>a(-1),disabled:c,"aria-label":"Previous month",children:"‹"}),g.jsxs("button",{className:w.monthYear,onClick:()=>y(!0),disabled:c,children:[r[t]," ",l?u(e):e]}),g.jsx("button",{className:w.navButton,onClick:()=>a(1),disabled:c,"aria-label":"Next month",children:"›"}),g.jsx("button",{className:w.navButton,onClick:()=>a(12),disabled:c,"aria-label":"Next year",title:"Next year",children:"»"}),h&&g.jsx(mr,{currentYear:e,currentMonth:t,months:r,onYearChange:s,onMonthChange:o,onClose:()=>y(!1),showNepaliNumbers:l,convertToNepaliNumber:u,calendarType:d})]})},Ve=({calendarDays:t,days:e,onDateSelect:r,isSelected:a,isInRange:s,isToday:o,isDisabled:c,disabled:l=!1,showNepaliNumbers:u=!1,convertToNepaliNumber:d})=>g.jsxs("div",{className:w.grid,children:[e.map(h=>g.jsx("div",{className:w.dayHeader,children:h},h)),t.map((h,y)=>{const m=h?c?.(h)||l:!1;return g.jsx("div",{className:`${w.day} ${h===null?w.dayOtherMonth:m?w.dayDisabled:a(h)?w.daySelected:s(h)?w.dayInRange:o(h)?w.dayToday:""}`,onClick:()=>h&&!m&&r(h),children:h?u?d(h):h:""},y)})]}),Zt=({presets:t,calendarType:e,onPresetSelect:r,activePreset:a,position:s="top"})=>{const o=c=>{const l=c.getValue(e);r(c,l)};return g.jsx("div",{style:{display:"flex",flexDirection:s==="left"?"column":"row",flexWrap:s==="top"?"wrap":"nowrap",gap:"8px",marginBottom:s==="top"?"16px":0,padding:"12px",backgroundColor:"#f8f9fa",borderRadius:"6px",border:"1px solid #e9ecef",minWidth:s==="left"?"150px":"auto",maxWidth:s==="left"?"180px":"none",flexShrink:0},children:t.map(c=>g.jsx("button",{onClick:()=>o(c),style:{padding:"6px 12px",fontSize:"12px",border:"1px solid #dee2e6",borderRadius:"4px",backgroundColor:a===c.key?"#007bff":"#ffffff",color:a===c.key?"#ffffff":"#495057",cursor:"pointer",transition:"all 0.2s"},children:c.label},c.key))})},Qt=({calendarType:t="AD",value:e,onChange:r,className:a="",showToday:s=!0,disabled:o=!1,outputFormat:c="both",onDateSelect:l,mode:u="single",onRangeSelect:d,showRangePresets:h=!1,rangePresetsPosition:y="top",predefinedRanges:m,onPresetSelect:T,renderPresets:v,showNepaliMonths:$=!1,showNepaliDays:Z=!1,showNepaliNumbers:_=!1,theme:k="light",colors:I,minDate:A,maxDate:se})=>{const{currentYear:E,currentMonth:j,selectedDate:le,rangeStart:B,rangeEnd:oe,today:N,calendarDays:G,setSelectedDate:J,setRangeStart:q,setRangeEnd:Q,setCurrentYear:pe,setCurrentMonth:ye,navigateMonth:U,isToday:ve,isSelected:be,isInRange:De}=zt(t),[ke,Se]=O.useState(),Ge=Xt(),Ie=m||Ge,ie=t==="BS"&&$?$t:t==="BS"?We:Lt,de=t==="BS"&&Z?Wt:Ut,he=(b,x)=>{x.start&&x.end&&(q(x.start),Q(x.end),Se(b.key),T?.(b,x),d?.(x))},xe=(b,x)=>{q(b),Q(x),Se(void 0),d?.({start:b,end:x})},ue=b=>{if(o)return;const x={year:E,month:j,day:b};if(Pe(x,A,se,t))return;if(u==="range"){if(Se(void 0),!B||B&&oe)q(x),Q(null);else{const ae=new Date(B.year,B.month,B.day).getTime();new Date(x.year,x.month,x.day).getTime()<ae?(q(x),Q(B),d?.({start:x,end:B})):(Q(x),d?.({start:B,end:x}))}return}J(x);const K=qt(t,E,j,b,ie);if(l?.(K),r){let ae;switch(c){case"iso":ae=K.ad;break;case"object":ae=JSON.stringify(K);break;default:ae=JSON.stringify(K);break}r(ae)}},Je=b=>{if(!o){switch(b.key){case"ArrowLeft":U(-1);break;case"ArrowRight":U(1);break;case"ArrowUp":U(-12);break;case"ArrowDown":U(12);break;case"PageUp":b.shiftKey?U(-12):U(-1);break;case"PageDown":b.shiftKey?U(12):U(1);break;default:return}b.preventDefault()}},Ke={...I?Object.entries(I).reduce((b,[x,K])=>(b[`--calendar-${x}`]=K,b),{}):{}};return g.jsxs("div",{className:`${w.calendar} ${a}`,style:Ke,"data-theme":k,onKeyDown:Je,tabIndex:0,role:"application","aria-label":"Calendar",children:[u==="range"&&v&&g.jsxs("div",{style:{display:"flex",gap:"16px"},children:[g.jsx("div",{children:v({onRangeChange:xe})}),g.jsxs("div",{style:{flex:1},children:[g.jsx(Ue,{currentMonth:j,currentYear:E,months:ie,onNavigateMonth:U,onYearChange:pe,onMonthChange:ye,disabled:o,showNepaliNumbers:_,convertToNepaliNumber:ce,calendarType:t}),g.jsx(Ve,{calendarDays:G,days:de,onDateSelect:ue,isSelected:b=>be(b,u),isInRange:De,isToday:b=>s&&ve(b),isDisabled:b=>Pe({year:E,month:j,day:b},A,se,t),disabled:o,showNepaliNumbers:_,convertToNepaliNumber:ce})]})]}),u==="range"&&h&&y==="left"&&!v&&g.jsxs("div",{style:{display:"flex",gap:"16px",flexWrap:"nowrap",overflow:"auto"},children:[g.jsx(Zt,{presets:Ie,calendarType:t,onPresetSelect:he,activePreset:ke,position:"left"}),g.jsxs("div",{style:{flex:"0 0 auto",minWidth:"280px"},children:[g.jsx(Ue,{currentMonth:j,currentYear:E,months:ie,onNavigateMonth:U,onYearChange:pe,onMonthChange:ye,disabled:o,showNepaliNumbers:_,convertToNepaliNumber:ce,calendarType:t}),g.jsx(Ve,{calendarDays:G,days:de,onDateSelect:ue,isSelected:b=>be(b,u),isInRange:De,isToday:b=>s&&ve(b),isDisabled:b=>Pe({year:E,month:j,day:b},A,se,t),disabled:o,showNepaliNumbers:_,convertToNepaliNumber:ce})]})]}),(!u||u==="single"||!h&&!v||y==="top")&&g.jsxs(g.Fragment,{children:[u==="range"&&h&&g.jsx(Zt,{presets:Ie,calendarType:t,onPresetSelect:he,activePreset:ke,position:"top"}),g.jsx(Ue,{currentMonth:j,currentYear:E,months:ie,onNavigateMonth:U,onYearChange:pe,onMonthChange:ye,disabled:o,showNepaliNumbers:_,convertToNepaliNumber:ce,calendarType:t}),g.jsx(Ve,{calendarDays:G,days:de,onDateSelect:ue,isSelected:b=>be(b,u),isInRange:De,isToday:b=>s&&ve(b),isDisabled:b=>Pe({year:E,month:j,day:b},A,se,t),disabled:o,showNepaliNumbers:_,convertToNepaliNumber:ce})]})]})},Fe={datePicker:"_datePicker_pdqgs_1",input:"_input_pdqgs_7",iconButton:"_iconButton_pdqgs_36",popup:"_popup_pdqgs_62"},en=({placeholder:t="Select date",format:e="YYYY-MM-DD",onDateSelect:r,inputClassName:a="",popupClassName:s="",style:o,inputStyle:c,icon:l,showIcon:u=!0,calendarType:d="AD",...h})=>{const[y,m]=O.useState(!1),[T,v]=O.useState(null),[$,Z]=O.useState(""),_=O.useRef(null);O.useEffect(()=>{const E=j=>{_.current&&!_.current.contains(j.target)&&m(!1)};return y&&document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[y]);const k=E=>{v(E);const j=d==="BS"?E.bs:E.ad;Z(j),m(!1),r?.(E)},I=E=>{const j=E.target.value,le=E.target.selectionStart||0,B=$.length;if(j===""){Z("");return}if(le===j.length&&j.length>B){const N=j.replace(/[^0-9]/g,"");let G=N;N.length>4&&N.length<=6?G=N.slice(0,4)+"-"+N.slice(4):N.length>6&&(G=N.slice(0,4)+"-"+N.slice(4,6)+"-"+N.slice(6,8)),Z(G)}else{const N=j.replace(/[^0-9-]/g,"");N.length<=10&&Z(N)}},A=()=>{const E=$.trim();if(!E){v(null);return}const j=E.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(j){const[,le,B,oe]=j,N=parseInt(B),G=parseInt(oe);if(N<1||N>12||G<1||G>32){Z(T?d==="BS"?T.formatted.bs:T.formatted.ad:"");return}const J={bs:d==="BS"?`${le}-${B}-${oe}`:"",ad:d==="AD"?`${le}-${B}-${oe}`:"",formatted:{bs:d==="BS"?E:"",ad:d==="AD"?E:""}};v(J),r?.(J)}else E.length<10&&Z(T?d==="BS"?T.formatted.bs:T.formatted.ad:"")},se=E=>{E.key==="Enter"?(A(),m(!1)):E.key==="Escape"&&m(!1)};return g.jsxs("div",{className:`${Fe.datePicker} ${a}`,ref:_,style:o,children:[g.jsx("input",{type:"text",value:$,placeholder:t||"YYYY-MM-DD",onChange:I,onBlur:A,onKeyDown:se,className:Fe.input,style:c,"aria-label":"Date picker input","aria-haspopup":"dialog","aria-expanded":y,maxLength:10}),g.jsx("button",{type:"button",className:Fe.iconButton,onClick:()=>m(!y),"aria-label":"Toggle calendar",style:{display:u?"flex":"none"},children:l||g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),g.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),g.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),g.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}),y&&g.jsx("div",{className:`${Fe.popup} ${s}`,children:g.jsx(Qt,{calendarType:d,onDateSelect:k,...h})})]})};R.Calendar=Qt,R.CalendarInput=en,R.DEFAULT_COLORS=fr,R.DatePicker=en,R.ENGLISH_DAYS=Ut,R.ENGLISH_MONTHS_AD=Lt,R.ENGLISH_MONTHS_BS=We,R.NEPALI_DAYS=Wt,R.NEPALI_DIGITS=Vt,R.NEPALI_MONTHS=$t,R.convertToNepaliNumber=ce,R.createDateOutput=qt,R.createPredefinedRanges=Xt,R.getDaysInMonth=Gt,R.getFirstDayOfMonth=Jt,R.getTodayDate=ne,R.isDateInRange=gr,R.useCalendar=zt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
|
|
14
|
+
<%s key={someKey} {...props} />`,at,De,Lr,De),mn[De+at]=!0}}return n===s?Pr(P):Fr(P),P}}function Ir(n,u,f){return yn(n,u,f,!0)}function Nr(n,u,f){return yn(n,u,f,!1)}var Br=Nr,Hr=Ir;Re.Fragment=s,Re.jsx=Br,Re.jsxs=Hr})()),Re}var it;function Dn(){return it||(it=1,process.env.NODE_ENV==="production"?Oe.exports=pn():Oe.exports=vn()),Oe.exports}var g=Dn();const Se=[1943,4,14],ut=[31,28,31,30,31,30,31,31,30,31,30,31],Sn=[31,29,31,30,31,30,31,31,30,31,30,31],ae=[[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,31,32,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,31,32,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,31,29,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,31,32,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,30],365],[[31,32,31,32,31,30,30,30,29,30,29,31],366],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[30,32,31,32,31,30,30,30,29,30,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,29,31],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365],[[31,32,31,32,31,30,30,30,29,29,30,31],366],[[31,31,31,32,31,31,29,30,30,29,30,30],365],[[31,31,32,31,31,31,30,29,30,29,30,30],365],[[31,31,32,32,31,30,30,29,30,29,30,30],365]];let ct=class extends Error{constructor(e){super(e),this.name="DateOutOfRangeError"}};const lt=()=>Se[0]+1,dt=()=>Se[0]+ae.length-1,ht=()=>2e3,ft=()=>2e3+ae.length-1,Ae=t=>t%400===0||t%4===0&&t%100!==0,Je=t=>Ae(t)?Sn:ut,bn=(t,e,a)=>!(t<lt()||t>dt()||e<1||e>12||a<1||a>Je(t)[e-1]),gt=(t,e,a)=>{let s=t*365+a;for(let r=0;r<e-1;r++)s+=ut[r];return e<=2&&(t-=1),s+=Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400),s};function En(t,e,a){const s=e+1;if(!bn(t,s,a))throw new ct("Date out of range");let r=2e3,o=1,i=1,l=Math.abs(gt(t,s,a)-gt(...Se)),c=0;for(;l>=ae[c][1];)l-=ae[c][1],r+=1,c+=1;let d=0;for(;l>=ae[c][0][d];)l-=ae[c][0][d],o+=1,d+=1;return i+=l,[r,o-1,i]}const Mn=(t,e,a)=>!(t<ht()||t>ft()||e<1||e>12||a<1||a>ae[t-2e3][0][e-1]),_n=(t,e,a)=>{let s=a-1;const r=t-2e3;for(let o=0;o<e-1;o++)s+=ae[r][0][o];for(let o=0;o<r;o++)s+=ae[o][1];return s},kn=(t,e,a)=>{const s=e+1;if(!Mn(t,s,a))throw new ct("Date out of range");let[r,o,i]=[Se[0],1,1];const l=Je(r).slice(0,Se[1]-1).reduce((m,y)=>m+y,0)+Se[2]-1;let c=Math.abs(_n(t,s,a)+l);for(;c>=366&&Ae(r)||c>=365&&!Ae(r);)c-=Ae(r)?366:365,r+=1;const d=Je(r);let h=0;for(;c>=d[h];)c-=d[h],o+=1,h+=1;return i+=c,[r,o-1,i]},oe={enMinYear:lt,enMaxYear:dt,npMinYear:ht,npMaxYear:ft,englishToNepali:En,nepaliToEnglish:kn},mt="en",te="ne",yt=207e5,pt=198e5,xn=5049018e5,wn=new Date(1986,0,1,0,15),Fe=["Baisakh","Jestha","Asar","Shrawan","Bhadra","Aswin","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],Ke=["Bai","Jes","Asa","Shr","Bhd","Asw","Kar","Man","Pou","Mag","Fal","Cha"],vt=["बैशाख","जेठ","असार","श्रावण","भाद्र","आश्विन","कार्तिक","मंसिर","पौष","माघ","फाल्गुण","चैत्र"],Cn=["बै","जे","अ","श्रा","भा","आ","का","मं","पौ","मा","फा","चै"],ze=["January","February","March","April","May","June","July","August","September","October","November","December"],Xe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Tn=["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जुन","जुलाई","अगस्ट","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर"],Yn=["जन","फेब","मार","अप्रि","मे","जुन","जुला","अग","सेप","अक्टो","नोभे","डिसे"],Dt=["०","१","२","३","४","५","६","७","८","९"],be=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Pe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],St=["आइत","सोम","मंगल","बुध","बिहि","शुक्र","शनि"],bt=["आइतबार","सोमबार","मंगलबार","बुधबार","बिहिबार","शुक्रबार","शनिबार"],Rn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DD?|ddd?d?|do?|YYYY|YY|y{2,4}|yo?|a|A|hh?|HH?|mm?|ss?|SSS|x|X|.)/g,jn=t=>{const e=t.getTime(),a=e<xn?pt:yt,s=new Date(e+a),r=s.getUTCFullYear(),o=s.getUTCMonth(),i=s.getUTCDate(),l=s.getUTCHours(),c=s.getUTCMinutes(),d=s.getUTCSeconds(),h=s.getUTCMilliseconds(),m=s.getUTCDay();return{year:r,month0:o,day:i,hour:l,minute:c,second:d,ms:h,weekDay:m}},Et=(t,e,a,s,r,o,i)=>{const l=new Date(t,e,a,s,r,o,i);let c=l<wn?pt:yt;const d=-1*l.getTimezoneOffset()*60*1e3;return new Date(l.getTime()-c+d)},Ie=t=>{const e=t.match(Rn);return e?e.map(a=>a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a):[]},se=t=>{if(t.length===0)return new RegExp("");let e=[...t];if(e=e.sort((s,r)=>r.length-s.length),e[0]==="")return new RegExp("");const a=`(${e.join("|")})`;return new RegExp(a)},J=t=>t.toString().padStart(2,"0"),Mt=t=>t.toString().padStart(3,"0"),On=t=>t.split("").map(e=>Dt[e.charCodeAt(0)-48]).join(""),O=(t,e)=>{const a=typeof t=="string"?t:String(t);return e!==te?a:On(a)},An=(t,e)=>O(t.getYear(),e).substring(2),Fn=(t,e)=>O(t.getYear(),e),Pn=(t,e)=>O(t.getEnglishYear(),e).substring(2),In=(t,e)=>O(t.getEnglishYear(),e),Nn=(t,e)=>O(t.getMonth()+1,e),Bn=(t,e)=>O(J(t.getMonth()+1),e),Hn=(t,e)=>e===te?Cn[t.getMonth()]:Ke[t.getMonth()],Ln=(t,e)=>e===te?vt[t.getMonth()]:Fe[t.getMonth()],$n=(t,e)=>O(t.getEnglishMonth()+1,e),Wn=(t,e)=>O(J(t.getEnglishMonth()+1),e),Vn=(t,e)=>e===te?Yn[t.getEnglishMonth()]:Xe[t.getEnglishMonth()],Un=(t,e)=>e===te?Tn[t.getEnglishMonth()]:ze[t.getEnglishMonth()],Gn=(t,e)=>O(t.getDate(),e),Jn=(t,e)=>O(J(t.getDate()),e),Kn=(t,e)=>O(t.getEnglishDate(),e),zn=(t,e)=>O(J(t.getEnglishDate()),e),_t=(t,e)=>O(t.getDay(),e),Ne=(t,e)=>e===te?St[t.getDay()]:be[t.getDay()],kt=(t,e)=>e===te?bt[t.getDay()]:Pe[t.getDay()],xt=(t,e)=>O(t.getHours(),e),wt=(t,e)=>O(J(t.getHours()),e),Ct=(t,e)=>{const a=t.getHours(),s=a>12?a-12:a;return O(s,e)},Tt=(t,e)=>{const a=t.getHours(),s=a>12?a-12:a;return O(J(s),e)},Yt=(t,e)=>O(t.getMinutes(),e),Rt=(t,e)=>O(J(t.getMinutes()),e),jt=(t,e)=>O(t.getSeconds(),e),Ot=(t,e)=>O(J(t.getSeconds()),e),At=(t,e)=>O(Mt(t.getMilliseconds()),e),Ft=(t,e)=>e===te?t.getHours()>=12?"पिम":"एम":t.getHours()>=12?"PM":"AM",Pt=(t,e)=>e===te?t.getHours()>=12?"पिम":"एम":t.getHours()>=12?"pm":"am",It={YY:An,YYYY:Fn,M:Nn,MM:Bn,MMM:Hn,MMMM:Ln,D:Gn,DD:Jn,d:_t,dd:Ne,ddd:Ne,dddd:kt,H:xt,HH:wt,h:Ct,hh:Tt,m:Yt,mm:Rt,s:jt,ss:Ot,SSS:At,A:Ft,a:Pt},Nt=(t,e,a)=>{const s=Ie(e),r=o=>o in It?It[o](t,a):o;return s.map(r).join("")},Xn=(t,e)=>Nt(t,e,mt),Zn=(t,e)=>Nt(t,e,te),Qn=t=>{const e=J(t.getYear()),a=J(t.getMonth()+1),s=J(t.getDate()),r=J(t.getHours()),o=J(t.getMinutes()),i=J(t.getSeconds()),l=t.getMilliseconds(),c=l===0?"":`.${Mt(l)}`;return`${e}-${a}-${s} ${r}:${o}:${i}${c}`},Bt={YY:Pn,YYYY:In,M:$n,MM:Wn,MMM:Vn,MMMM:Un,D:Kn,DD:zn,d:_t,dd:Ne,ddd:Ne,dddd:kt,H:xt,HH:wt,h:Ct,hh:Tt,m:Yt,mm:Rt,s:jt,ss:Ot,SSS:At,A:Ft,a:Pt},Ht=(t,e,a)=>{const s=Ie(e),r=o=>o in Bt?Bt[o](t,a):o;return s.map(r).join("")},qn=(t,e)=>Ht(t,e,mt),er=(t,e)=>Ht(t,e,te);function tr(t){const e=t.split(/[-./]/,3),[a,s=1,r=1]=e.map(o=>{const i=parseInt(o,10);if(Number.isNaN(i))throw new Error("Invalid date");return i});return[a,s-1,r]}function nr(t){if(!t)return[0,0,0,0];const[e,a="0"]=t.split(".",2),s=e.split(":",3),[r,o=0,i=0]=s.map(c=>{const d=parseInt(c,10);if(Number.isNaN(d))throw new Error("Invalid time");return d});let l=parseInt(a,10);return Number.isNaN(l)&&(l=0),[r,o,i,l]}function rr(t){const[e,a]=t.split(" ",2),[s,r,o]=tr(e),[i,l,c,d]=nr(a);return[s,r,o,i,l,c,d]}const Lt={YY:/(\d\d)/,YYYY:/(\d\d\d\d)/,M:/(1[0-2]|0[1-9]|[1-9])/,MM:/(1[0-2]|0[1-9]|[1-9])/,D:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,DD:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,H:/(2[0-3]|[0-1]\d|\d)/,HH:/(2[0-3]|[0-1]\d|\d)/,hh:/(1[0-2]|0[1-9]|[1-9])/,mm:/([0-5]\d|\d)/,ss:/([0-5]\d|\d)/,SSS:/(\d\d\d)/,A:/(AM|PM)/,a:/(am|pm)/,MMMM:se(Fe),MMM:se(Ke),dddd:se(Pe),ddd:se(be),dd:se(be),d:/([0-6])/};function ar(t){const e=[],a=[];for(const r of t)r in Lt?(e.push(r),a.push(Lt[r].source)):a.push(r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));const s=a.join("");return{dateTokens:e,regex:new RegExp(`^${s}$`)}}function sr(t,e){let[a,s,r,o,i,l,c,d]=[0,1,1,0,0,0,0,0],h=!1,m=!1;for(let y=0;y<t.length;y++){const R=t[y],b=parseInt(e[y+1]);switch(R){case"YYYY":a=b;break;case"YY":a=2e3+parseInt(e[y]);break;case"MM":case"M":s=b;break;case"MMMM":s=Fe.indexOf(e[y+1])+1;break;case"MMM":s=Ke.indexOf(e[y+1])+1;break;case"DD":case"D":r=b;break;case"HH":case"H":o=b;break;case"hh":case"h":i=b,m=!0;break;case"mm":case"m":l=b;break;case"ss":case"s":c=b;break;case"SSS":d=b;break;case"A":case"a":h=e[y+1].toLowerCase()==="pm"}}return m&&(o=i+(h?12:0)),{year:a,month0:s-1,day:r,hour:o,minute:l,second:c,ms:d}}function $t(t,e){const a=Ie(e),{dateTokens:s,regex:r}=ar(a),o=RegExp(r).exec(t);if(!o)throw new Error("Invalid date format");const{year:i,month0:l,day:c,hour:d,minute:h,second:m,ms:y}=sr(s,o);return[i,l,c,d,h,m,y]}const Wt={YY:/(\d\d)/,YYYY:/(\d\d\d\d)/,M:/(1[0-2]|0[1-9]|[1-9])/,MM:/(1[0-2]|0[1-9]|[1-9])/,D:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,DD:/(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/,H:/(2[0-3]|[0-1]\d|\d)/,HH:/(2[0-3]|[0-1]\d|\d)/,hh:/(1[0-2]|0[1-9]|[1-9])/,mm:/([0-5]\d|\d)/,ss:/([0-5]\d|\d)/,SSS:/(\d\d\d)/,A:/(AM|PM)/,a:/(am|pm)/,MMMM:se(ze),MMM:se(Xe),dddd:se(Pe),ddd:se(be),dd:se(be),d:/([0-6])/};function or(t){const e=[],a=[];for(const r of t)r in Wt?(e.push(r),a.push(Wt[r].source)):a.push(r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));const s=a.join("");return{dateTokens:e,regex:new RegExp(`^${s}$`)}}function ir(t,e){let[a,s,r,o,i,l,c,d]=[0,1,1,0,0,0,0,0],h=!1,m=!1;for(let y=0;y<t.length;y++){const R=t[y],b=parseInt(e[y+1]);switch(R){case"YYYY":a=b;break;case"YY":a=2e3+parseInt(e[y]);break;case"MM":case"M":s=b;break;case"MMMM":s=ze.indexOf(e[y+1])+1;break;case"MMM":s=Xe.indexOf(e[y+1])+1;break;case"DD":case"D":r=b;break;case"HH":case"H":o=b;break;case"hh":case"h":i=b,m=!0;break;case"mm":case"m":l=b;break;case"ss":case"s":c=b;break;case"SSS":d=b;break;case"A":case"a":h=e[y+1].toLowerCase()==="pm"}}return m&&(o=i+(h?12:0)),{year:a,month0:s-1,day:r,hour:o,minute:l,second:c,ms:d}}function ur(t,e){const a=Ie(e),{dateTokens:s,regex:r}=or(a),o=RegExp(r).exec(t);if(!o)throw new Error("Invalid date format");const{year:i,month0:l,day:c,hour:d,minute:h,second:m,ms:y}=ir(s,o);return[i,l,c,d,h,m,y]}function cr(t){const e={एम:"AM",पिम:"PM"};vt.forEach((s,r)=>e[s]=Fe[r]),bt.forEach((s,r)=>e[s]=Pe[r]),St.forEach((s,r)=>e[s]=be[r]),Dt.forEach((s,r)=>e[s]=String(r));const a=new RegExp(Object.keys(e).join("|"),"g");return t.replace(a,s=>e[s])}function lr(t,e){const a=cr(t);return $t(a,e)}class Be extends Error{constructor(e){super(e),this.name="ValidationError"}}const dr=t=>{if(t<0||t>23)throw new Be("Hour should be in the range 0-23")},hr=t=>{if(t<0||t>59)throw new Be("Minute should be in the range 0-59")},fr=t=>{if(t<0||t>59)throw new Be("Second should be in the range 0-59")},gr=t=>{if(t<0||t>999)throw new Be("Millisecond should be in the range 0-999")},mr=(t,e,a,s)=>{dr(t),hr(e),fr(a),gr(s)};class I{timestamp;year;yearEn;month;monthEn;day;dayEn;hour;minute;weekDay;constructor(...e){if(e.length===0)this.initFromCurrentDate();else if(e.length===1&&e[0]instanceof Date)this.initFromEnglishDate(e[0]);else if(e.length===1&&e[0]instanceof I)this.initFromNepaliDate(e[0]);else if(e.length===1&&typeof e[0]=="string")this.parseFromString(e[0]);else if(e.length===1&&typeof e[0]=="number")this.initFromTimestamp(e[0]);else if(e.length===2&&typeof e[0]=="string"&&typeof e[1]=="string")this.parseFromStringWithFormat(e[0],e[1]);else if(e.length>=2&&e.length<=8&&e.every(a=>typeof a=="number"))this.initFromComponents(e);else throw new Error("Invalid date argument")}initFromCurrentDate(){this._setDateObject(new Date)}initFromEnglishDate(e){this._setDateObject(e)}initFromNepaliDate(e){this.set(e.year,e.month,e.day,e.hour,e.minute,e.getSeconds(),e.getMilliseconds())}parseFromString(e){const a=rr(e);this.set(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}initFromTimestamp(e){this._setDateObject(new Date(e))}parseFromStringWithFormat(e,a){const s=$t(e,a);this.set(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}initFromComponents(e){this.set(e[0],e[1],e[2]??1,e[3]??0,e[4]??0,e[5]??0,e[6]??0)}_setDateObject(e,a=!0){this.timestamp=e;const{year:s,month0:r,day:o,hour:i,minute:l,weekDay:c}=jn(e);if(this.yearEn=s,this.monthEn=r,this.dayEn=o,this.hour=i,this.minute=l,this.weekDay=c,a){const[d,h,m]=oe.englishToNepali(s,r,o);this.year=d,this.month=h,this.day=m}}getDateObject(){return this.timestamp}getYear(){return this.year}getEnglishYear(){return this.yearEn}getMonth(){return this.month}getEnglishMonth(){return this.monthEn}getDate(){return this.day}getEnglishDate(){return this.dayEn}getDay(){return this.weekDay}getHours(){return this.hour}getMinutes(){return this.minute}getSeconds(){return this.timestamp.getSeconds()}getMilliseconds(){return this.timestamp.getMilliseconds()}getTime(){return this.timestamp.getTime()}setYear(e){this.set(e,this.month,this.day,this.hour,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setMonth(e){this.set(this.year,e,this.day,this.hour,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setDate(e){this.set(this.year,this.month,e,this.hour,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setHours(e){this.set(this.year,this.month,this.day,e,this.minute,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setMinutes(e){this.set(this.year,this.month,this.day,this.hour,e,this.timestamp.getSeconds(),this.timestamp.getMilliseconds())}setSeconds(e){this.set(this.year,this.month,this.day,this.hour,this.minute,e,this.timestamp.getMilliseconds())}setMilliseconds(e){this.set(this.year,this.month,this.day,this.hour,this.minute,this.timestamp.getSeconds(),e)}setTime(e){this._setDateObject(new Date(e))}set(e,a,s,r,o,i,l){mr(r,o,i,l);const[c,d,h]=oe.nepaliToEnglish(e,a,s);this.year=e,this.month=a,this.day=s,this._setDateObject(Et(c,d,h,r,o,i,l),!1)}setDateObject(e){this._setDateObject(e,!0)}format(e){return Xn(this,e)}formatNepali(e){return Zn(this,e)}toString(){return Qn(this)}formatEnglishDate(e){return qn(this,e)}formatEnglishDateInNepali(e){return er(this,e)}static fromEnglishDate(e,a,s,r=0,o=0,i=0,l=0){const c=Et(e,a,s,r,o,i,l);return new I(c)}static parseNepaliFormat(e,a){const[s,r,o,i,l,c,d]=lr(e,a);return new I(s,r,o,i,l,c,d)}static parseEnglishDate(e,a){const[s,r,o,i,l,c,d]=ur(e,a);return I.fromEnglishDate(s,r,o,i,l,c,d)}static getDaysOfMonth(e,a){if(e<oe.npMinYear()||e>oe.npMaxYear())throw new Error("Year out of range");if(a<0||a>11)throw new Error("Month out of range");return ae[e-oe.npMinYear()][0][a]}static minSupportedDate(){return I.fromEnglishDate(oe.enMinYear(),0,1).getDateObject()}static maxSupportedDate(){return I.fromEnglishDate(oe.enMaxYear(),11,31).getDateObject()}static minSupportedNepaliDate(){return new I(oe.npMinYear(),0,1)}static maxSupportedNepaliDate(){const e=oe.npMaxYear();return new I(e,11,this.getDaysOfMonth(e,11))}static minimum(){return console.warn("`NepaliDate.minimum()` is deprecated and will be removed in a future version. Please use `NepaliDate.minSupportedDate()` instead."),this.minSupportedDate()}static maximum(){return console.warn("`NepaliDate.maximum()` is deprecated and will be removed in a future version. Please use `NepaliDate.maxSupportedDate()` instead."),this.maxSupportedDate()}}const Vt=["बैशाख","जेठ","आषाढ","श्रावण","भाद्र","आश्विन","कार्तिक","मंसिर","पौष","माघ","फाल्गुन","चैत्र"],Ze=["Baishakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],Ut=["January","February","March","April","May","June","July","August","September","October","November","December"],Gt=["आइत","सोम","मंगल","बुध","बिहि","शुक्र","शनि"],Jt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Kt=["०","१","२","३","४","५","६","७","८","९"],yr={light:{primary:"#3b82f6",background:"#ffffff",text:"#1f2937",border:"#e5e7eb",hover:"#f3f4f6",selected:"#3b82f6",today:"#dbeafe",disabled:"#d1d5db"},dark:{primary:"#60a5fa",background:"#1f2937",text:"#f9fafb",border:"#374151",hover:"#374151",selected:"#3b82f6",today:"#1e40af",disabled:"#6b7280"}},ie=t=>t.toString().split("").map(e=>Kt[parseInt(e)]).join(""),Qe=(t,e,a)=>{if(t==="BS")try{const s=a===11?new I(e+1,0,1):new I(e,a+1,1);return new I(s.getTime()-1440*60*1e3).getDate()}catch{return 30}return new Date(e,a+1,0).getDate()},zt=(t,e,a)=>{if(t==="BS")try{return new I(e,a,1).getDay()||0}catch{return 0}return new Date(e,a,1).getDay()},K=t=>{const e=new Date;if(t==="BS")try{const a=I.fromEnglishDate(e.getFullYear(),e.getMonth(),e.getDate());return{year:a.getYear(),month:a.getMonth(),day:a.getDate()}}catch{return{year:2081,month:0,day:1}}return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},Xt=(t,e,a,s,r)=>{if(t==="BS")try{const o=new I(e,a,s),l=new Date(o.getEnglishYear(),o.getEnglishMonth(),o.getEnglishDate()).toISOString().split("T")[0];return{bs:`${e}-${String(a+1).padStart(2,"0")}-${String(s).padStart(2,"0")}`,ad:l,formatted:{bs:`${r[a]} ${s}, ${e}`,ad:new Date(o.getEnglishYear(),o.getEnglishMonth(),o.getEnglishDate()).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}}}catch{const o=`${e}-${String(a+1).padStart(2,"0")}-${String(s).padStart(2,"0")}`;return{bs:o,ad:o,formatted:{bs:`${r[a]} ${s}, ${e}`,ad:`${r[a]} ${s}, ${e}`}}}else{const o=new Date(e,a,s),i=o.toISOString().split("T")[0];try{const l=I.fromEnglishDate(e,a,s),c=`${l.getYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`;return{ad:i,bs:c,formatted:{ad:o.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),bs:`${Ze[l.getMonth()]} ${l.getDate()}, ${l.getYear()}`}}}catch{return{ad:i,bs:i,formatted:{ad:o.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),bs:o.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}}}}},pr=(t,e,a)=>{const s=new Date(t.year,t.month,t.day).getTime(),r=new Date(e.year,e.month,e.day).getTime(),o=new Date(a.year,a.month,a.day).getTime();return s>=r&&s<=o},Zt=t=>{try{const[e,a,s]=t.split("-").map(Number);return!e||!a||!s?null:{year:e,month:a-1,day:s}}catch{return null}},je=(t,e,a)=>{if(!e&&!a)return!1;const s=new Date(t.year,t.month,t.day).getTime();if(e){const r=Zt(e);if(r){const o=new Date(r.year,r.month,r.day).getTime();if(s<o)return!0}}if(a){const r=Zt(a);if(r){const o=new Date(r.year,r.month,r.day).getTime();if(s>o)return!0}}return!1},Qt=(t="AD")=>{const e=j.useMemo(()=>K(t),[t]),[a,s]=j.useState(e.year),[r,o]=j.useState(e.month),[i,l]=j.useState(null),[c,d]=j.useState(null),[h,m]=j.useState(null);j.useEffect(()=>{s(e.year),o(e.month)},[e.year,e.month]);const y=j.useMemo(()=>{const T=Qe(t,a,r),_=zt(t,a,r),Y=[];for(let N=0;N<_;N++)Y.push(null);for(let N=1;N<=T;N++)Y.push(N);return Y},[a,r,t]);return{currentYear:a,currentMonth:r,selectedDate:i,rangeStart:c,rangeEnd:h,today:e,calendarDays:y,setCurrentYear:s,setCurrentMonth:o,setSelectedDate:l,setRangeStart:d,setRangeEnd:m,navigateMonth:T=>{let Y=r+T,N=a;for(;Y>11;)Y-=12,N+=1;for(;Y<0;)Y+=12,N-=1;o(Y),s(N)},isToday:T=>a===e.year&&r===e.month&&T===e.day,isSelected:(T,_="single")=>_==="range"?!!(c&&c.year===a&&c.month===r&&c.day===T)||!!(h&&h.year===a&&h.month===r&&h.day===T):!!(i&&i.year===a&&i.month===r&&i.day===T),isInRange:T=>{if(!c||!h)return!1;const _=new Date(a,r,T).getTime(),Y=new Date(c.year,c.month,c.day).getTime(),N=new Date(h.year,h.month,h.day).getTime();return _>=Y&&_<=N}}},Ee=(t,e,a)=>{if(a==="BS")try{const s=new I(t.year,t.month,t.day),r=new Date(s.getEnglishYear(),s.getEnglishMonth(),s.getEnglishDate());r.setDate(r.getDate()+e);const o=I.fromEnglishDate(r.getFullYear(),r.getMonth(),r.getDate());return{year:o.getYear(),month:o.getMonth(),day:o.getDate()}}catch{return t}else{const s=new Date(t.year,t.month,t.day);return s.setDate(s.getDate()+e),{year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}}},He=(t,e,a)=>{if(a==="BS")try{let s=t.year,r=t.month+e;for(;r<0;)s-=1,r+=12;for(;r>=12;)s+=1,r-=12;const o=Qe("BS",s,r),i=Math.min(t.day,o);return{year:s,month:r,day:i}}catch{return t}else{const s=new Date(t.year,t.month,t.day);return s.setMonth(s.getMonth()+e),{year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}}},fe=t=>({year:t.year,month:t.month,day:1}),vr=(t,e)=>{if(e==="BS")try{const s=new I(t.year,t.month,t.day).getDay();return Ee(t,-s,"BS")}catch{return t}else{const a=new Date(t.year,t.month,t.day),s=a.getDay();return a.setDate(a.getDate()-s),{year:a.getFullYear(),month:a.getMonth(),day:a.getDate()}}},Dr={TODAY:"today",YESTERDAY:"yesterday",THIS_WEEK:"thisWeek",LAST_7_DAYS:"last7days",LAST_30_DAYS:"last30days",THIS_MONTH:"thisMonth",LAST_MONTH:"lastMonth",LAST_3_MONTHS:"last3months",LAST_6_MONTHS:"last6months",LAST_180_DAYS:"last180days",LAST_9_MONTHS:"last9months",LAST_YEAR:"lastYear"},qt=(t,e)=>{const a=[{key:"today",label:"Today",getValue:r=>{const o=K(r);return{start:o,end:o}}},{key:"yesterday",label:"Yesterday",getValue:r=>{const o=K(r),i=Ee(o,-1,r);return{start:i,end:i}}},{key:"thisWeek",label:"This Week",getValue:r=>{const o=K(r);return{start:vr(o,r),end:o}}},{key:"last7days",label:"Last 7 Days",getValue:r=>{const o=K(r);return{start:Ee(o,-6,r),end:o}}},{key:"last30days",label:"Last 30 Days",getValue:r=>{const o=K(r);return{start:Ee(o,-29,r),end:o}}},{key:"thisMonth",label:"This Month",getValue:r=>{const o=K(r);return{start:fe(o),end:o}}},{key:"lastMonth",label:"Last Month",getValue:r=>{const o=K(r),i=Ee(fe(o),-1,r);return{start:fe(i),end:i}}},{key:"last3months",label:"Last 3 Months",getValue:r=>{const o=K(r),i=He(o,-2,r);return{start:fe(i),end:o}}},{key:"last6months",label:"Last 6 Months",getValue:r=>{const o=K(r),i=He(o,-5,r);return{start:fe(i),end:o}}},{key:"last180days",label:"Last 180 Days",getValue:r=>{const o=K(r);return{start:Ee(o,-179,r),end:o}}},{key:"last9months",label:"Last 9 Months",getValue:r=>{const o=K(r),i=He(o,-8,r);return{start:fe(i),end:o}}},{key:"lastYear",label:"Last Year",getValue:r=>{const o=K(r),i=He(o,-11,r);return{start:fe(i),end:o}}}],s=t?a.filter(r=>t.includes(r.key)):a;return e?s.map(r=>({...r,label:e[r.key]||r.label})):s},M={calendar:"_calendar_lve6c_1",grid:"_grid_lve6c_14",header:"_header_lve6c_25",navButton:"_navButton_lve6c_32",monthYear:"_monthYear_lve6c_58",pickerOverlay:"_pickerOverlay_lve6c_78",pickerContent:"_pickerContent_lve6c_88",pickerHeader:"_pickerHeader_lve6c_98",closeButton:"_closeButton_lve6c_112",pickerBody:"_pickerBody_lve6c_131",pickerSection:"_pickerSection_lve6c_135",pickerSectionHeader:"_pickerSectionHeader_lve6c_151",yearNav:"_yearNav_lve6c_162",yearGrid:"_yearGrid_lve6c_194",selected:"_selected_lve6c_214",monthGrid:"_monthGrid_lve6c_220",dayHeader:"_dayHeader_lve6c_252",day:"_day_lve6c_252",dayDisabled:"_dayDisabled_lve6c_273",dayOtherMonth:"_dayOtherMonth_lve6c_273",daySelected:"_daySelected_lve6c_277",dayToday:"_dayToday_lve6c_282",dayInRange:"_dayInRange_lve6c_288"},Sr=({currentYear:t,currentMonth:e,months:a,onYearChange:s,onMonthChange:r,onClose:o,showNepaliNumbers:i=!1,convertToNepaliNumber:l=d=>d.toString(),calendarType:c})=>{const[d,h]=j.useState(Math.floor(t/12)*12),m=c==="BS"?2e3:1944,y=c==="BS"?2100:2043;return g.jsx("div",{className:M.pickerOverlay,onClick:o,children:g.jsxs("div",{className:M.pickerContent,onClick:R=>R.stopPropagation(),children:[g.jsxs("div",{className:M.pickerHeader,children:[g.jsx("h3",{children:"Select Month & Year"}),g.jsx("button",{onClick:o,className:M.closeButton,children:"×"})]}),g.jsxs("div",{className:M.pickerBody,children:[g.jsxs("div",{className:M.pickerSection,children:[g.jsxs("div",{className:M.pickerSectionHeader,children:[g.jsx("label",{children:"Year"}),g.jsxs("div",{className:M.yearNav,children:[g.jsx("button",{onClick:()=>h(Math.max(m,d-12)),disabled:d<=m,children:"«"}),g.jsxs("span",{children:[i?l(d):d," -"," ",i?l(d+11):d+11]}),g.jsx("button",{onClick:()=>h(Math.min(y-11,d+12)),disabled:d+11>=y,children:"»"})]})]}),g.jsx("div",{className:M.yearGrid,children:Array.from({length:12},(R,b)=>{const $=d+b;return $>y?null:g.jsx("button",{onClick:()=>s($),className:$===t?M.selected:"",children:i?l($):$},$)})})]}),g.jsxs("div",{className:M.pickerSection,children:[g.jsx("label",{children:"Month"}),g.jsx("div",{className:M.monthGrid,children:a.map((R,b)=>g.jsx("button",{onClick:()=>{r(b),o()},className:b===e?M.selected:"",children:R},b))})]})]})]})})},Le=({currentMonth:t,currentYear:e,months:a,onNavigateMonth:s,onYearChange:r,onMonthChange:o,disabled:i=!1,showNepaliNumbers:l=!1,convertToNepaliNumber:c,calendarType:d})=>{const[h,m]=j.useState(!1);return g.jsxs("div",{className:M.header,children:[g.jsx("button",{className:M.navButton,onClick:()=>s(-12),disabled:i,"aria-label":"Previous year",title:"Previous year",children:"«"}),g.jsx("button",{className:M.navButton,onClick:()=>s(-1),disabled:i,"aria-label":"Previous month",children:"‹"}),g.jsxs("button",{className:M.monthYear,onClick:()=>m(!0),disabled:i,children:[a[t]," ",l?c(e):e]}),g.jsx("button",{className:M.navButton,onClick:()=>s(1),disabled:i,"aria-label":"Next month",children:"›"}),g.jsx("button",{className:M.navButton,onClick:()=>s(12),disabled:i,"aria-label":"Next year",title:"Next year",children:"»"}),h&&g.jsx(Sr,{currentYear:e,currentMonth:t,months:a,onYearChange:r,onMonthChange:o,onClose:()=>m(!1),showNepaliNumbers:l,convertToNepaliNumber:c,calendarType:d})]})},$e=({calendarDays:t,days:e,onDateSelect:a,isSelected:s,isInRange:r,isToday:o,isDisabled:i,disabled:l=!1,showNepaliNumbers:c=!1,convertToNepaliNumber:d})=>g.jsxs("div",{className:M.grid,children:[e.map(h=>g.jsx("div",{className:M.dayHeader,children:h},h)),t.map((h,m)=>{const y=h?i?.(h)||l:!1;return g.jsx("div",{className:`${M.day} ${h===null?M.dayOtherMonth:y?M.dayDisabled:s(h)?M.daySelected:r(h)?M.dayInRange:o(h)?M.dayToday:""}`,onClick:()=>h&&!y&&a(h),children:h?c?d(h):h:""},m)})]}),We=({presets:t,calendarType:e,onPresetSelect:a,activePreset:s,position:r="top"})=>{const o=i=>{const l=i.getValue(e);a(i,l)};return g.jsx("div",{style:{display:"flex",flexDirection:r==="left"||r==="right"?"column":"row",flexWrap:r==="top"||r==="bottom"?"wrap":"nowrap",gap:"8px",marginBottom:r==="top"?"16px":0,marginTop:r==="bottom"?"16px":0,padding:"12px",backgroundColor:"#f8f9fa",borderRadius:"6px",border:"1px solid #e9ecef",minWidth:r==="left"||r==="right"?"150px":"auto",maxWidth:r==="left"||r==="right"?"180px":"none",flexShrink:0},children:t.map(i=>g.jsx("button",{onClick:()=>o(i),style:{padding:"6px 12px",fontSize:"12px",border:"1px solid #dee2e6",borderRadius:"4px",backgroundColor:s===i.key?"#007bff":"#ffffff",color:s===i.key?"#ffffff":"#495057",cursor:"pointer",transition:"all 0.2s"},children:i.label},i.key))})},en=({calendarType:t="AD",value:e,onChange:a,className:s="",showToday:r=!0,disabled:o=!1,outputFormat:i="both",onDateSelect:l,mode:c="single",onRangeSelect:d,showRangePresets:h=!1,rangePresetsPosition:m="top",predefinedRanges:y,presetKeys:R,presetLabels:b,onPresetSelect:$,renderPresets:W,showNepaliMonths:T=!1,showNepaliDays:_=!1,showNepaliNumbers:Y=!1,theme:N="light",colors:Me,minDate:k,maxDate:F})=>{const{currentYear:L,currentMonth:B,rangeStart:V,rangeEnd:H,calendarDays:z,setSelectedDate:Z,setRangeStart:Q,setRangeEnd:ne,setCurrentYear:ue,setCurrentMonth:ce,navigateMonth:U,isToday:ge,isSelected:me,isInRange:ye}=Qt(t),[pe,_e]=j.useState(),ke=y||qt(R,b),ve=t==="BS"&&T?Vt:t==="BS"?Ze:Ut,le=t==="BS"&&_?Gt:Jt,de=(v,x)=>{x.start&&x.end&&(Q(x.start),ne(x.end),ue(x.start.year),ce(x.start.month),_e(v.key),$?.(v,x),d?.({start:x.start,end:x.end}))},xe=(v,x)=>{Q(v),ne(x),_e(void 0),d?.({start:v,end:x})},he=v=>{if(o)return;const x={year:L,month:B,day:v};if(je(x,k,F))return;if(c==="range"){if(_e(void 0),!V||V&&H)Q(x),ne(null);else{const q=new Date(V.year,V.month,V.day).getTime();new Date(x.year,x.month,x.day).getTime()<q?(Q(x),ne(V),d?.({start:x,end:V})):(ne(x),d?.({start:V,end:x}))}return}Z(x);const re=Xt(t,L,B,v,ve);if(l?.(re),a){let q;switch(i){case"iso":q=re.ad;break;case"object":q=JSON.stringify(re);break;default:q=JSON.stringify(re);break}a(q)}},we=v=>{if(!o){switch(v.key){case"ArrowLeft":U(-1);break;case"ArrowRight":U(1);break;case"ArrowUp":U(-12);break;case"ArrowDown":U(12);break;case"PageUp":v.shiftKey?U(-12):U(-1);break;case"PageDown":v.shiftKey?U(12):U(1);break;default:return}v.preventDefault()}},Ue={...Me?Object.entries(Me).reduce((v,[x,re])=>(v[`--calendar-${x}`]=re,v),{}):{}};return g.jsxs("div",{className:`${M.calendar} ${s}`,style:Ue,"data-theme":N,onKeyDown:we,tabIndex:0,role:"application","aria-label":"Calendar",children:[c==="range"&&W&&g.jsxs("div",{style:{display:"flex",gap:"16px"},children:[g.jsx("div",{children:W({onRangeChange:xe})}),g.jsxs("div",{style:{flex:1},children:[g.jsx(Le,{currentMonth:B,currentYear:L,months:ve,onNavigateMonth:U,onYearChange:ue,onMonthChange:ce,disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie,calendarType:t}),g.jsx($e,{calendarDays:z,days:le,onDateSelect:he,isSelected:v=>me(v,c),isInRange:ye,isToday:v=>r&&ge(v),isDisabled:v=>je({year:L,month:B,day:v},k,F),disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie})]})]}),c==="range"&&h&&m==="left"&&!W&&g.jsxs("div",{style:{display:"flex",gap:"16px",flexWrap:"nowrap"},children:[g.jsx(We,{presets:ke,calendarType:t,onPresetSelect:de,activePreset:pe,position:"left"}),g.jsxs("div",{children:[g.jsx(Le,{currentMonth:B,currentYear:L,months:ve,onNavigateMonth:U,onYearChange:ue,onMonthChange:ce,disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie,calendarType:t}),g.jsx($e,{calendarDays:z,days:le,onDateSelect:he,isSelected:v=>me(v,c),isInRange:ye,isToday:v=>r&&ge(v),isDisabled:v=>je({year:L,month:B,day:v},k,F),disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie})]})]}),c==="range"&&h&&m==="right"&&!W&&g.jsxs("div",{style:{display:"flex",gap:"16px",flexWrap:"nowrap"},children:[g.jsxs("div",{children:[g.jsx(Le,{currentMonth:B,currentYear:L,months:ve,onNavigateMonth:U,onYearChange:ue,onMonthChange:ce,disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie,calendarType:t}),g.jsx($e,{calendarDays:z,days:le,onDateSelect:he,isSelected:v=>me(v,c),isInRange:ye,isToday:v=>r&&ge(v),isDisabled:v=>je({year:L,month:B,day:v},k,F),disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie})]}),g.jsx(We,{presets:ke,calendarType:t,onPresetSelect:de,activePreset:pe,position:"right"})]}),(!c||c==="single"||!h&&!W||m==="top"||m==="bottom")&&g.jsxs(g.Fragment,{children:[c==="range"&&h&&m==="top"&&g.jsx(We,{presets:ke,calendarType:t,onPresetSelect:de,activePreset:pe,position:"top"}),g.jsx(Le,{currentMonth:B,currentYear:L,months:ve,onNavigateMonth:U,onYearChange:ue,onMonthChange:ce,disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie,calendarType:t}),g.jsx($e,{calendarDays:z,days:le,onDateSelect:he,isSelected:v=>me(v,c),isInRange:ye,isToday:v=>r&&ge(v),isDisabled:v=>je({year:L,month:B,day:v},k,F),disabled:o,showNepaliNumbers:Y,convertToNepaliNumber:ie}),c==="range"&&h&&m==="bottom"&&g.jsx(We,{presets:ke,calendarType:t,onPresetSelect:de,activePreset:pe,position:"bottom"})]})]})},Ve={datePicker:"_datePicker_z7mc2_1",input:"_input_z7mc2_7",iconButton:"_iconButton_z7mc2_38",popup:"_popup_z7mc2_64"},tn=({placeholder:t="Select date",format:e="YYYY-MM-DD",onDateSelect:a,inputClassName:s="",popupClassName:r="",style:o,inputStyle:i,icon:l,showIcon:c=!0,calendarType:d="AD",...h})=>{const[m,y]=j.useState(!1),[R,b]=j.useState(null),[$,W]=j.useState(""),T=j.useRef(null);j.useEffect(()=>{const k=F=>{T.current&&!T.current.contains(F.target)&&y(!1)};return m&&document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[m]);const _=k=>{b(k);const F=d==="BS"?k.bs:k.ad;W(F),y(!1),a?.(k)},Y=k=>{const F=k.target.value,L=k.target.selectionStart||0,B=$.length;if(F===""){W("");return}if(L===F.length&&F.length>B){const H=F.replace(/[^0-9]/g,"");let z=H;H.length>4&&H.length<=6?z=H.slice(0,4)+"-"+H.slice(4):H.length>6&&(z=H.slice(0,4)+"-"+H.slice(4,6)+"-"+H.slice(6,8)),W(z)}else{const H=F.replace(/[^0-9-]/g,"");H.length<=10&&W(H)}},N=()=>{const k=$.trim();if(!k){b(null);return}const F=k.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(F){const[,L,B,V]=F,H=parseInt(B),z=parseInt(V);if(H<1||H>12||z<1||z>32){W(R?d==="BS"?R.formatted.bs:R.formatted.ad:"");return}const Z={bs:d==="BS"?`${L}-${B}-${V}`:"",ad:d==="AD"?`${L}-${B}-${V}`:"",formatted:{bs:d==="BS"?k:"",ad:d==="AD"?k:""}};b(Z),a?.(Z)}else k.length<10&&W(R?d==="BS"?R.formatted.bs:R.formatted.ad:"")},Me=k=>{k.key==="Enter"?(N(),y(!1)):k.key==="Escape"&&y(!1)};return g.jsxs("div",{className:`${Ve.datePicker} ${s}`,ref:T,style:o,children:[g.jsx("input",{type:"text",value:$,placeholder:t||"YYYY-MM-DD",onChange:Y,onBlur:N,onKeyDown:Me,className:Ve.input,style:i,"aria-label":"Date picker input","aria-haspopup":"dialog","aria-expanded":m,maxLength:10}),g.jsx("button",{type:"button",className:Ve.iconButton,onClick:()=>y(!m),"aria-label":"Toggle calendar",style:{display:c?"flex":"none"},children:l||g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),g.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),g.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),g.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}),m&&g.jsx("div",{className:`${Ve.popup} ${r}`,children:g.jsx(en,{calendarType:d,onDateSelect:_,...h})})]})};C.Calendar=en,C.CalendarInput=tn,C.DEFAULT_COLORS=yr,C.DatePicker=tn,C.ENGLISH_DAYS=Jt,C.ENGLISH_MONTHS_AD=Ut,C.ENGLISH_MONTHS_BS=Ze,C.NEPALI_DAYS=Gt,C.NEPALI_DIGITS=Kt,C.NEPALI_MONTHS=Vt,C.PRESET_KEYS=Dr,C.convertToNepaliNumber=ie,C.createDateOutput=Xt,C.createPredefinedRanges=qt,C.getDaysInMonth=Qe,C.getFirstDayOfMonth=zt,C.getTodayDate=K,C.isDateInRange=pr,C.useCalendar=Qt,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/vite.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearlinear id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearlinear><linearlinear id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearlinear></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bs-ad-calendar-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A modern React calendar component supporting both Bikram Sambat (BS) and Gregorian (AD) calendars",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"build:lib": "tsc -p tsconfig.lib.json && vite build",
|
|
23
23
|
"build:demo": "vite build --mode demo",
|
|
24
24
|
"lint": "eslint .",
|
|
25
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
26
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
25
27
|
"preview": "vite preview",
|
|
26
28
|
"predeploy": "npm run build:demo",
|
|
27
29
|
"deploy": "gh-pages -d dist",
|
|
@@ -63,6 +65,7 @@
|
|
|
63
65
|
"gh-pages": "^6.3.0",
|
|
64
66
|
"globals": "^16.5.0",
|
|
65
67
|
"postcss": "^8.5.6",
|
|
68
|
+
"prettier": "^3.8.1",
|
|
66
69
|
"react": "^18.0.0",
|
|
67
70
|
"react-dom": "^18.0.0",
|
|
68
71
|
"typescript": "~5.9.3",
|