@vlrc-fe/components 1.0.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 +193 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +42 -0
- package/dist/index10.cjs +1 -0
- package/dist/index10.js +85 -0
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +65 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +48 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +67 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +151 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +23 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +27 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +53 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +161 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +16 -0
- package/dist/index109.cjs +1 -0
- package/dist/index11.cjs +1 -0
- package/dist/index11.js +86 -0
- package/dist/index12.cjs +1 -0
- package/dist/index12.js +122 -0
- package/dist/index13.cjs +1 -0
- package/dist/index13.js +14 -0
- package/dist/index14.cjs +1 -0
- package/dist/index14.js +16 -0
- package/dist/index15.cjs +1 -0
- package/dist/index15.js +115 -0
- package/dist/index16.cjs +1 -0
- package/dist/index16.js +727 -0
- package/dist/index17.cjs +1 -0
- package/dist/index17.js +348 -0
- package/dist/index18.cjs +1 -0
- package/dist/index18.js +76 -0
- package/dist/index19.cjs +1 -0
- package/dist/index19.js +14 -0
- package/dist/index2.cjs +1 -0
- package/dist/index2.js +122 -0
- package/dist/index20.cjs +1 -0
- package/dist/index20.js +116 -0
- package/dist/index21.cjs +1 -0
- package/dist/index21.js +35 -0
- package/dist/index22.cjs +1 -0
- package/dist/index22.js +18 -0
- package/dist/index23.cjs +1 -0
- package/dist/index23.js +27 -0
- package/dist/index24.cjs +1 -0
- package/dist/index24.js +35 -0
- package/dist/index25.cjs +1 -0
- package/dist/index25.js +97 -0
- package/dist/index26.cjs +1 -0
- package/dist/index26.js +28 -0
- package/dist/index27.cjs +1 -0
- package/dist/index27.js +14 -0
- package/dist/index28.cjs +1 -0
- package/dist/index28.js +67 -0
- package/dist/index29.cjs +1 -0
- package/dist/index29.js +13 -0
- package/dist/index3.cjs +1 -0
- package/dist/index3.js +8 -0
- package/dist/index30.cjs +1 -0
- package/dist/index30.js +35 -0
- package/dist/index31.cjs +1 -0
- package/dist/index31.js +43 -0
- package/dist/index32.cjs +1 -0
- package/dist/index32.js +14 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +64 -0
- package/dist/index34.cjs +1 -0
- package/dist/index34.js +23 -0
- package/dist/index35.cjs +1 -0
- package/dist/index35.js +34 -0
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +27 -0
- package/dist/index37.cjs +1 -0
- package/dist/index37.js +26 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +157 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +34 -0
- package/dist/index4.cjs +1 -0
- package/dist/index4.js +43 -0
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +46 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +118 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +125 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +26 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +88 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +221 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +166 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +126 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +15 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +9 -0
- package/dist/index5.cjs +1 -0
- package/dist/index5.js +24 -0
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +17 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +22 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +18 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +6 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +7 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +8 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +7 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +7 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +9 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +69 -0
- package/dist/index6.cjs +1 -0
- package/dist/index6.js +51 -0
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +11 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +202 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +124 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +32 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +20 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +69 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +32 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +11 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +280 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +157 -0
- package/dist/index7.cjs +1 -0
- package/dist/index7.js +88 -0
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +20 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +10 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +14 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +8 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +8 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +11 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +10 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +6 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +8 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +8 -0
- package/dist/index8.cjs +1 -0
- package/dist/index8.js +68 -0
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +10 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +11 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +15 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +11 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +11 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +6 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +43 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +382 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +40 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +23 -0
- package/dist/index9.cjs +1 -0
- package/dist/index9.js +20 -0
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +59 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +55 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +54 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +57 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +57 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +88 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +66 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +594 -0
- package/dist/index98.cjs +9 -0
- package/dist/index98.js +30 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +50 -0
- package/package.json +82 -0
package/dist/index78.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./index57.js";
|
|
2
|
+
import t from "./index77.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js
|
|
4
|
+
function n(n) {
|
|
5
|
+
return !(!t(n) && typeof n != "number" || isNaN(+e(n)));
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n as default };
|
package/dist/index79.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index58.cjs"),t=require("./index78.cjs");function n(n){return!(!t.default(n)&&typeof n!=`number`||isNaN(+e.default(n)))}exports.default=n;
|
package/dist/index79.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./index57.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
let r = e(t, n?.in);
|
|
5
|
+
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
package/dist/index8.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index7.cjs");let r=require("lucide-react"),i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("react-day-picker");function s({className:e,classNames:i,showOutsideDays:s=!0,captionLayout:l=`label`,buttonVariant:u=`ghost`,formatters:d,components:f,...p}){let m=(0,o.getDefaultClassNames)();return(0,a.jsx)(o.DayPicker,{showOutsideDays:s,className:t.cn(`bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:l,formatters:{formatMonthDropdown:e=>e.toLocaleString(`default`,{month:`short`}),...d},classNames:{root:t.cn(`w-fit`,m.root),months:t.cn(`flex gap-4 flex-col md:flex-row relative`,m.months),month:t.cn(`flex flex-col w-full gap-4`,m.month),nav:t.cn(`flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between`,m.nav),button_previous:t.cn(n.buttonVariants({variant:u}),`size-(--cell-size) aria-disabled:opacity-50 p-0 select-none`,m.button_previous),button_next:t.cn(n.buttonVariants({variant:u}),`size-(--cell-size) aria-disabled:opacity-50 p-0 select-none`,m.button_next),month_caption:t.cn(`flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)`,m.month_caption),dropdowns:t.cn(`w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5`,m.dropdowns),dropdown_root:t.cn(`relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md`,m.dropdown_root),dropdown:t.cn(`absolute bg-popover inset-0 opacity-0`,m.dropdown),caption_label:t.cn(`select-none font-medium`,l===`label`?`text-sm`:`rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5`,m.caption_label),weekdays:t.cn(`flex`,m.weekdays),weekday:t.cn(`text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none`,m.weekday),week:t.cn(`flex w-full mt-2`,m.week),week_number_header:t.cn(`select-none w-(--cell-size)`,m.week_number_header),week_number:t.cn(`text-[0.8rem] select-none text-muted-foreground`,m.week_number),day:t.cn(`relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none`,p.showWeekNumber?`[&:nth-child(2)[data-selected=true]_button]:rounded-l-md`:`[&:first-child[data-selected=true]_button]:rounded-l-md`,m.day),range_start:t.cn(`rounded-l-md bg-accent`,m.range_start),range_middle:t.cn(`rounded-none`,m.range_middle),range_end:t.cn(`rounded-r-md bg-accent`,m.range_end),today:t.cn(`bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none`,m.today),outside:t.cn(`text-muted-foreground aria-selected:text-muted-foreground`,m.outside),disabled:t.cn(`text-muted-foreground opacity-50`,m.disabled),hidden:t.cn(`invisible`,m.hidden),...i},components:{Root:({className:e,rootRef:n,...r})=>(0,a.jsx)(`div`,{"data-slot":`calendar`,ref:n,className:t.cn(e),...r}),Chevron:({className:e,orientation:n,...i})=>n===`left`?(0,a.jsx)(r.ChevronLeftIcon,{className:t.cn(`size-4`,e),...i}):n===`right`?(0,a.jsx)(r.ChevronRightIcon,{className:t.cn(`size-4`,e),...i}):(0,a.jsx)(r.ChevronDownIcon,{className:t.cn(`size-4`,e),...i}),DayButton:c,WeekNumber:({children:e,...t})=>(0,a.jsx)(`td`,{...t,children:(0,a.jsx)(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})}),...f},...p})}function c({className:e,day:r,modifiers:s,...c}){let l=(0,o.getDefaultClassNames)(),u=i.useRef(null);return i.useEffect(()=>{s.focused&&u.current?.focus()},[s.focused]),(0,a.jsx)(n.Button,{ref:u,variant:`ghost`,size:`icon`,"data-day":r.date.toLocaleDateString(),"data-selected-single":s.selected&&!s.range_start&&!s.range_end&&!s.range_middle,"data-range-start":s.range_start,"data-range-end":s.range_end,"data-range-middle":s.range_middle,className:t.cn(`data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70`,l.day,e),...c})}exports.Calendar=s,exports.CalendarDayButton=c;
|
package/dist/index8.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
//#region src/ui/card.tsx
|
|
6
|
+
var r = n("bg-card text-card-foreground flex flex-col rounded-xl border shadow-sm", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: "gap-6 py-6",
|
|
9
|
+
glass: "gap-6 py-6 bg-card/80 backdrop-blur-sm dark:bg-card/40 dark:border-white/10",
|
|
10
|
+
"glass-strong": "gap-6 py-6 bg-card/60 backdrop-blur-md dark:bg-card/60 dark:backdrop-blur-md dark:border dark:border-white/10",
|
|
11
|
+
elevated: "gap-6 py-6 border-0 shadow-lg hover:-translate-y-1 hover:shadow-xl transition-all",
|
|
12
|
+
"elevated-glass": "gap-6 py-6 border-0 shadow-lg hover:-translate-y-2 hover:shadow-xl transition-all dark:bg-card/60 dark:backdrop-blur-md dark:border dark:border-white/10",
|
|
13
|
+
auth: "w-full max-w-md mx-auto bg-card/80 dark:bg-card/60 backdrop-blur-xl backdrop-saturate-150 border-border/60 dark:border-white/10 rounded-2xl shadow-2xl shadow-primary/10 dark:shadow-black/30"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { variant: "default" }
|
|
16
|
+
});
|
|
17
|
+
function i({ className: n, variant: i, ...a }) {
|
|
18
|
+
return /* @__PURE__ */ t("div", {
|
|
19
|
+
"data-slot": "card",
|
|
20
|
+
"data-variant": i,
|
|
21
|
+
className: e(r({ variant: i }), n),
|
|
22
|
+
...a
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function a({ className: n, ...r }) {
|
|
26
|
+
return /* @__PURE__ */ t("div", {
|
|
27
|
+
"data-slot": "card-header",
|
|
28
|
+
className: e("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", n),
|
|
29
|
+
...r
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function o({ className: n, ...r }) {
|
|
33
|
+
return /* @__PURE__ */ t("div", {
|
|
34
|
+
"data-slot": "card-title",
|
|
35
|
+
className: e("leading-none font-semibold", n),
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function s({ className: n, ...r }) {
|
|
40
|
+
return /* @__PURE__ */ t("div", {
|
|
41
|
+
"data-slot": "card-description",
|
|
42
|
+
className: e("text-muted-foreground text-sm", n),
|
|
43
|
+
...r
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function c({ className: n, ...r }) {
|
|
47
|
+
return /* @__PURE__ */ t("div", {
|
|
48
|
+
"data-slot": "card-action",
|
|
49
|
+
className: e("col-start-2 row-span-2 row-start-1 self-start justify-self-end", n),
|
|
50
|
+
...r
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function l({ className: n, ...r }) {
|
|
54
|
+
return /* @__PURE__ */ t("div", {
|
|
55
|
+
"data-slot": "card-content",
|
|
56
|
+
className: e("px-6", n),
|
|
57
|
+
...r
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function u({ className: n, ...r }) {
|
|
61
|
+
return /* @__PURE__ */ t("div", {
|
|
62
|
+
"data-slot": "card-footer",
|
|
63
|
+
className: e("flex items-center px-6 [.border-t]:pt-6", n),
|
|
64
|
+
...r
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { i as Card, c as CardAction, l as CardContent, s as CardDescription, u as CardFooter, a as CardHeader, o as CardTitle, r as cardVariants };
|
package/dist/index80.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index58.cjs");function t(t,n){let r=e.default(t,n?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}exports.default=t;
|
package/dist/index80.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./index57.js";
|
|
2
|
+
import t from "./index75.js";
|
|
3
|
+
import n from "./index79.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js
|
|
5
|
+
function r(r, i) {
|
|
6
|
+
let a = e(r, i?.in);
|
|
7
|
+
return t(a, n(a)) + 1;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as default };
|
package/dist/index81.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index58.cjs"),t=require("./index76.cjs"),n=require("./index80.cjs");function r(r,i){let a=e.default(r,i?.in);return t.default(a,n.default(a))+1}exports.default=r;
|
package/dist/index81.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { millisecondsInWeek as e } from "./index53.js";
|
|
2
|
+
import t from "./index57.js";
|
|
3
|
+
import n from "./index71.js";
|
|
4
|
+
import r from "./index76.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js
|
|
6
|
+
function i(i, a) {
|
|
7
|
+
let o = t(i, a?.in), s = n(o) - +r(o);
|
|
8
|
+
return Math.round(s / e) + 1;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as default };
|
package/dist/index82.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index54.cjs"),t=require("./index58.cjs"),n=require("./index72.cjs"),r=require("./index77.cjs");function i(i,a){let o=t.default(i,a?.in),s=n.default(o)-+r.default(o);return Math.round(s/e.millisecondsInWeek)+1}exports.default=i;
|
package/dist/index82.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import e from "./index54.js";
|
|
2
|
+
import { getDefaultOptions as t } from "./index56.js";
|
|
3
|
+
import n from "./index57.js";
|
|
4
|
+
import r from "./index58.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js
|
|
6
|
+
function i(i, a) {
|
|
7
|
+
let o = n(i, a?.in), s = o.getFullYear(), c = t(), l = a?.firstWeekContainsDate ?? a?.locale?.options?.firstWeekContainsDate ?? c.firstWeekContainsDate ?? c.locale?.options?.firstWeekContainsDate ?? 1, u = e(a?.in || i, 0);
|
|
8
|
+
u.setFullYear(s + 1, 0, l), u.setHours(0, 0, 0, 0);
|
|
9
|
+
let d = r(u, a), f = e(a?.in || i, 0);
|
|
10
|
+
f.setFullYear(s, 0, l), f.setHours(0, 0, 0, 0);
|
|
11
|
+
let p = r(f, a);
|
|
12
|
+
return +o >= +d ? s + 1 : +o >= +p ? s : s - 1;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as default };
|
package/dist/index83.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index55.cjs"),t=require("./index57.cjs"),n=require("./index58.cjs"),r=require("./index59.cjs");function i(i,a){let o=n.default(i,a?.in),s=o.getFullYear(),c=t.getDefaultOptions(),l=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??c.firstWeekContainsDate??c.locale?.options?.firstWeekContainsDate??1,u=e.default(a?.in||i,0);u.setFullYear(s+1,0,l),u.setHours(0,0,0,0);let d=r.default(u,a),f=e.default(a?.in||i,0);f.setFullYear(s,0,l),f.setHours(0,0,0,0);let p=r.default(f,a);return+o>=+d?s+1:+o>=+p?s:s-1}exports.default=i;
|
package/dist/index83.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import e from "./index54.js";
|
|
2
|
+
import { getDefaultOptions as t } from "./index56.js";
|
|
3
|
+
import n from "./index58.js";
|
|
4
|
+
import r from "./index82.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js
|
|
6
|
+
function i(i, a) {
|
|
7
|
+
let o = t(), s = a?.firstWeekContainsDate ?? a?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, c = r(i, a), l = e(a?.in || i, 0);
|
|
8
|
+
return l.setFullYear(c, 0, s), l.setHours(0, 0, 0, 0), n(l, a);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as default };
|
package/dist/index84.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index55.cjs"),t=require("./index57.cjs"),n=require("./index59.cjs"),r=require("./index83.cjs");function i(i,a){let o=t.getDefaultOptions(),s=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,c=r.default(i,a),l=e.default(a?.in||i,0);return l.setFullYear(c,0,s),l.setHours(0,0,0,0),n.default(l,a)}exports.default=i;
|
package/dist/index84.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { millisecondsInWeek as e } from "./index53.js";
|
|
2
|
+
import t from "./index57.js";
|
|
3
|
+
import n from "./index58.js";
|
|
4
|
+
import r from "./index83.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js
|
|
6
|
+
function i(i, a) {
|
|
7
|
+
let o = t(i, a?.in), s = n(o, a) - +r(o, a);
|
|
8
|
+
return Math.round(s / e) + 1;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as default };
|
package/dist/index85.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index54.cjs"),t=require("./index58.cjs"),n=require("./index59.cjs"),r=require("./index84.cjs");function i(i,a){let o=t.default(i,a?.in),s=n.default(o,a)-+r.default(o,a);return Math.round(s/e.millisecondsInWeek)+1}exports.default=i;
|
package/dist/index85.js
ADDED
package/dist/index86.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}exports.addLeadingZeros=e;
|
package/dist/index86.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { addLeadingZeros as e } from "./index85.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js
|
|
3
|
+
var t = {
|
|
4
|
+
y(t, n) {
|
|
5
|
+
let r = t.getFullYear(), i = r > 0 ? r : 1 - r;
|
|
6
|
+
return e(n === "yy" ? i % 100 : i, n.length);
|
|
7
|
+
},
|
|
8
|
+
M(t, n) {
|
|
9
|
+
let r = t.getMonth();
|
|
10
|
+
return n === "M" ? String(r + 1) : e(r + 1, 2);
|
|
11
|
+
},
|
|
12
|
+
d(t, n) {
|
|
13
|
+
return e(t.getDate(), n.length);
|
|
14
|
+
},
|
|
15
|
+
a(e, t) {
|
|
16
|
+
let n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
17
|
+
switch (t) {
|
|
18
|
+
case "a":
|
|
19
|
+
case "aa": return n.toUpperCase();
|
|
20
|
+
case "aaa": return n;
|
|
21
|
+
case "aaaaa": return n[0];
|
|
22
|
+
default: return n === "am" ? "a.m." : "p.m.";
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
h(t, n) {
|
|
26
|
+
return e(t.getHours() % 12 || 12, n.length);
|
|
27
|
+
},
|
|
28
|
+
H(t, n) {
|
|
29
|
+
return e(t.getHours(), n.length);
|
|
30
|
+
},
|
|
31
|
+
m(t, n) {
|
|
32
|
+
return e(t.getMinutes(), n.length);
|
|
33
|
+
},
|
|
34
|
+
s(t, n) {
|
|
35
|
+
return e(t.getSeconds(), n.length);
|
|
36
|
+
},
|
|
37
|
+
S(t, n) {
|
|
38
|
+
let r = n.length, i = t.getMilliseconds();
|
|
39
|
+
return e(Math.trunc(i * 10 ** (r - 3)), n.length);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { t as lightFormatters };
|
package/dist/index87.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index86.cjs");var t={y(t,n){let r=t.getFullYear(),i=r>0?r:1-r;return e.addLeadingZeros(n===`yy`?i%100:i,n.length)},M(t,n){let r=t.getMonth();return n===`M`?String(r+1):e.addLeadingZeros(r+1,2)},d(t,n){return e.addLeadingZeros(t.getDate(),n.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(t,n){return e.addLeadingZeros(t.getHours()%12||12,n.length)},H(t,n){return e.addLeadingZeros(t.getHours(),n.length)},m(t,n){return e.addLeadingZeros(t.getMinutes(),n.length)},s(t,n){return e.addLeadingZeros(t.getSeconds(),n.length)},S(t,n){let r=n.length,i=t.getMilliseconds();return e.addLeadingZeros(Math.trunc(i*10**(r-3)),n.length)}};exports.lightFormatters=t;
|
package/dist/index87.js
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import e from "./index72.js";
|
|
2
|
+
import t from "./index80.js";
|
|
3
|
+
import n from "./index81.js";
|
|
4
|
+
import r from "./index82.js";
|
|
5
|
+
import i from "./index84.js";
|
|
6
|
+
import { addLeadingZeros as a } from "./index85.js";
|
|
7
|
+
import { lightFormatters as o } from "./index86.js";
|
|
8
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js
|
|
9
|
+
var s = {
|
|
10
|
+
am: "am",
|
|
11
|
+
pm: "pm",
|
|
12
|
+
midnight: "midnight",
|
|
13
|
+
noon: "noon",
|
|
14
|
+
morning: "morning",
|
|
15
|
+
afternoon: "afternoon",
|
|
16
|
+
evening: "evening",
|
|
17
|
+
night: "night"
|
|
18
|
+
}, c = {
|
|
19
|
+
G: function(e, t, n) {
|
|
20
|
+
let r = +(e.getFullYear() > 0);
|
|
21
|
+
switch (t) {
|
|
22
|
+
case "G":
|
|
23
|
+
case "GG":
|
|
24
|
+
case "GGG": return n.era(r, { width: "abbreviated" });
|
|
25
|
+
case "GGGGG": return n.era(r, { width: "narrow" });
|
|
26
|
+
default: return n.era(r, { width: "wide" });
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
y: function(e, t, n) {
|
|
30
|
+
if (t === "yo") {
|
|
31
|
+
let t = e.getFullYear(), r = t > 0 ? t : 1 - t;
|
|
32
|
+
return n.ordinalNumber(r, { unit: "year" });
|
|
33
|
+
}
|
|
34
|
+
return o.y(e, t);
|
|
35
|
+
},
|
|
36
|
+
Y: function(e, t, n, i) {
|
|
37
|
+
let o = r(e, i), s = o > 0 ? o : 1 - o;
|
|
38
|
+
return t === "YY" ? a(s % 100, 2) : t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : a(s, t.length);
|
|
39
|
+
},
|
|
40
|
+
R: function(t, n) {
|
|
41
|
+
return a(e(t), n.length);
|
|
42
|
+
},
|
|
43
|
+
u: function(e, t) {
|
|
44
|
+
return a(e.getFullYear(), t.length);
|
|
45
|
+
},
|
|
46
|
+
Q: function(e, t, n) {
|
|
47
|
+
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
48
|
+
switch (t) {
|
|
49
|
+
case "Q": return String(r);
|
|
50
|
+
case "QQ": return a(r, 2);
|
|
51
|
+
case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
52
|
+
case "QQQ": return n.quarter(r, {
|
|
53
|
+
width: "abbreviated",
|
|
54
|
+
context: "formatting"
|
|
55
|
+
});
|
|
56
|
+
case "QQQQQ": return n.quarter(r, {
|
|
57
|
+
width: "narrow",
|
|
58
|
+
context: "formatting"
|
|
59
|
+
});
|
|
60
|
+
default: return n.quarter(r, {
|
|
61
|
+
width: "wide",
|
|
62
|
+
context: "formatting"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
q: function(e, t, n) {
|
|
67
|
+
let r = Math.ceil((e.getMonth() + 1) / 3);
|
|
68
|
+
switch (t) {
|
|
69
|
+
case "q": return String(r);
|
|
70
|
+
case "qq": return a(r, 2);
|
|
71
|
+
case "qo": return n.ordinalNumber(r, { unit: "quarter" });
|
|
72
|
+
case "qqq": return n.quarter(r, {
|
|
73
|
+
width: "abbreviated",
|
|
74
|
+
context: "standalone"
|
|
75
|
+
});
|
|
76
|
+
case "qqqqq": return n.quarter(r, {
|
|
77
|
+
width: "narrow",
|
|
78
|
+
context: "standalone"
|
|
79
|
+
});
|
|
80
|
+
default: return n.quarter(r, {
|
|
81
|
+
width: "wide",
|
|
82
|
+
context: "standalone"
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
M: function(e, t, n) {
|
|
87
|
+
let r = e.getMonth();
|
|
88
|
+
switch (t) {
|
|
89
|
+
case "M":
|
|
90
|
+
case "MM": return o.M(e, t);
|
|
91
|
+
case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
92
|
+
case "MMM": return n.month(r, {
|
|
93
|
+
width: "abbreviated",
|
|
94
|
+
context: "formatting"
|
|
95
|
+
});
|
|
96
|
+
case "MMMMM": return n.month(r, {
|
|
97
|
+
width: "narrow",
|
|
98
|
+
context: "formatting"
|
|
99
|
+
});
|
|
100
|
+
default: return n.month(r, {
|
|
101
|
+
width: "wide",
|
|
102
|
+
context: "formatting"
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
L: function(e, t, n) {
|
|
107
|
+
let r = e.getMonth();
|
|
108
|
+
switch (t) {
|
|
109
|
+
case "L": return String(r + 1);
|
|
110
|
+
case "LL": return a(r + 1, 2);
|
|
111
|
+
case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
|
|
112
|
+
case "LLL": return n.month(r, {
|
|
113
|
+
width: "abbreviated",
|
|
114
|
+
context: "standalone"
|
|
115
|
+
});
|
|
116
|
+
case "LLLLL": return n.month(r, {
|
|
117
|
+
width: "narrow",
|
|
118
|
+
context: "standalone"
|
|
119
|
+
});
|
|
120
|
+
default: return n.month(r, {
|
|
121
|
+
width: "wide",
|
|
122
|
+
context: "standalone"
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
w: function(e, t, n, r) {
|
|
127
|
+
let o = i(e, r);
|
|
128
|
+
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : a(o, t.length);
|
|
129
|
+
},
|
|
130
|
+
I: function(e, t, r) {
|
|
131
|
+
let i = n(e);
|
|
132
|
+
return t === "Io" ? r.ordinalNumber(i, { unit: "week" }) : a(i, t.length);
|
|
133
|
+
},
|
|
134
|
+
d: function(e, t, n) {
|
|
135
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : o.d(e, t);
|
|
136
|
+
},
|
|
137
|
+
D: function(e, n, r) {
|
|
138
|
+
let i = t(e);
|
|
139
|
+
return n === "Do" ? r.ordinalNumber(i, { unit: "dayOfYear" }) : a(i, n.length);
|
|
140
|
+
},
|
|
141
|
+
E: function(e, t, n) {
|
|
142
|
+
let r = e.getDay();
|
|
143
|
+
switch (t) {
|
|
144
|
+
case "E":
|
|
145
|
+
case "EE":
|
|
146
|
+
case "EEE": return n.day(r, {
|
|
147
|
+
width: "abbreviated",
|
|
148
|
+
context: "formatting"
|
|
149
|
+
});
|
|
150
|
+
case "EEEEE": return n.day(r, {
|
|
151
|
+
width: "narrow",
|
|
152
|
+
context: "formatting"
|
|
153
|
+
});
|
|
154
|
+
case "EEEEEE": return n.day(r, {
|
|
155
|
+
width: "short",
|
|
156
|
+
context: "formatting"
|
|
157
|
+
});
|
|
158
|
+
default: return n.day(r, {
|
|
159
|
+
width: "wide",
|
|
160
|
+
context: "formatting"
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
e: function(e, t, n, r) {
|
|
165
|
+
let i = e.getDay(), o = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
166
|
+
switch (t) {
|
|
167
|
+
case "e": return String(o);
|
|
168
|
+
case "ee": return a(o, 2);
|
|
169
|
+
case "eo": return n.ordinalNumber(o, { unit: "day" });
|
|
170
|
+
case "eee": return n.day(i, {
|
|
171
|
+
width: "abbreviated",
|
|
172
|
+
context: "formatting"
|
|
173
|
+
});
|
|
174
|
+
case "eeeee": return n.day(i, {
|
|
175
|
+
width: "narrow",
|
|
176
|
+
context: "formatting"
|
|
177
|
+
});
|
|
178
|
+
case "eeeeee": return n.day(i, {
|
|
179
|
+
width: "short",
|
|
180
|
+
context: "formatting"
|
|
181
|
+
});
|
|
182
|
+
default: return n.day(i, {
|
|
183
|
+
width: "wide",
|
|
184
|
+
context: "formatting"
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
c: function(e, t, n, r) {
|
|
189
|
+
let i = e.getDay(), o = (i - r.weekStartsOn + 8) % 7 || 7;
|
|
190
|
+
switch (t) {
|
|
191
|
+
case "c": return String(o);
|
|
192
|
+
case "cc": return a(o, t.length);
|
|
193
|
+
case "co": return n.ordinalNumber(o, { unit: "day" });
|
|
194
|
+
case "ccc": return n.day(i, {
|
|
195
|
+
width: "abbreviated",
|
|
196
|
+
context: "standalone"
|
|
197
|
+
});
|
|
198
|
+
case "ccccc": return n.day(i, {
|
|
199
|
+
width: "narrow",
|
|
200
|
+
context: "standalone"
|
|
201
|
+
});
|
|
202
|
+
case "cccccc": return n.day(i, {
|
|
203
|
+
width: "short",
|
|
204
|
+
context: "standalone"
|
|
205
|
+
});
|
|
206
|
+
default: return n.day(i, {
|
|
207
|
+
width: "wide",
|
|
208
|
+
context: "standalone"
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
i: function(e, t, n) {
|
|
213
|
+
let r = e.getDay(), i = r === 0 ? 7 : r;
|
|
214
|
+
switch (t) {
|
|
215
|
+
case "i": return String(i);
|
|
216
|
+
case "ii": return a(i, t.length);
|
|
217
|
+
case "io": return n.ordinalNumber(i, { unit: "day" });
|
|
218
|
+
case "iii": return n.day(r, {
|
|
219
|
+
width: "abbreviated",
|
|
220
|
+
context: "formatting"
|
|
221
|
+
});
|
|
222
|
+
case "iiiii": return n.day(r, {
|
|
223
|
+
width: "narrow",
|
|
224
|
+
context: "formatting"
|
|
225
|
+
});
|
|
226
|
+
case "iiiiii": return n.day(r, {
|
|
227
|
+
width: "short",
|
|
228
|
+
context: "formatting"
|
|
229
|
+
});
|
|
230
|
+
default: return n.day(r, {
|
|
231
|
+
width: "wide",
|
|
232
|
+
context: "formatting"
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
a: function(e, t, n) {
|
|
237
|
+
let r = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
238
|
+
switch (t) {
|
|
239
|
+
case "a":
|
|
240
|
+
case "aa": return n.dayPeriod(r, {
|
|
241
|
+
width: "abbreviated",
|
|
242
|
+
context: "formatting"
|
|
243
|
+
});
|
|
244
|
+
case "aaa": return n.dayPeriod(r, {
|
|
245
|
+
width: "abbreviated",
|
|
246
|
+
context: "formatting"
|
|
247
|
+
}).toLowerCase();
|
|
248
|
+
case "aaaaa": return n.dayPeriod(r, {
|
|
249
|
+
width: "narrow",
|
|
250
|
+
context: "formatting"
|
|
251
|
+
});
|
|
252
|
+
default: return n.dayPeriod(r, {
|
|
253
|
+
width: "wide",
|
|
254
|
+
context: "formatting"
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
b: function(e, t, n) {
|
|
259
|
+
let r = e.getHours(), i;
|
|
260
|
+
switch (i = r === 12 ? s.noon : r === 0 ? s.midnight : r / 12 >= 1 ? "pm" : "am", t) {
|
|
261
|
+
case "b":
|
|
262
|
+
case "bb": return n.dayPeriod(i, {
|
|
263
|
+
width: "abbreviated",
|
|
264
|
+
context: "formatting"
|
|
265
|
+
});
|
|
266
|
+
case "bbb": return n.dayPeriod(i, {
|
|
267
|
+
width: "abbreviated",
|
|
268
|
+
context: "formatting"
|
|
269
|
+
}).toLowerCase();
|
|
270
|
+
case "bbbbb": return n.dayPeriod(i, {
|
|
271
|
+
width: "narrow",
|
|
272
|
+
context: "formatting"
|
|
273
|
+
});
|
|
274
|
+
default: return n.dayPeriod(i, {
|
|
275
|
+
width: "wide",
|
|
276
|
+
context: "formatting"
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
B: function(e, t, n) {
|
|
281
|
+
let r = e.getHours(), i;
|
|
282
|
+
switch (i = r >= 17 ? s.evening : r >= 12 ? s.afternoon : r >= 4 ? s.morning : s.night, t) {
|
|
283
|
+
case "B":
|
|
284
|
+
case "BB":
|
|
285
|
+
case "BBB": return n.dayPeriod(i, {
|
|
286
|
+
width: "abbreviated",
|
|
287
|
+
context: "formatting"
|
|
288
|
+
});
|
|
289
|
+
case "BBBBB": return n.dayPeriod(i, {
|
|
290
|
+
width: "narrow",
|
|
291
|
+
context: "formatting"
|
|
292
|
+
});
|
|
293
|
+
default: return n.dayPeriod(i, {
|
|
294
|
+
width: "wide",
|
|
295
|
+
context: "formatting"
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
h: function(e, t, n) {
|
|
300
|
+
if (t === "ho") {
|
|
301
|
+
let t = e.getHours() % 12;
|
|
302
|
+
return t === 0 && (t = 12), n.ordinalNumber(t, { unit: "hour" });
|
|
303
|
+
}
|
|
304
|
+
return o.h(e, t);
|
|
305
|
+
},
|
|
306
|
+
H: function(e, t, n) {
|
|
307
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : o.H(e, t);
|
|
308
|
+
},
|
|
309
|
+
K: function(e, t, n) {
|
|
310
|
+
let r = e.getHours() % 12;
|
|
311
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
|
|
312
|
+
},
|
|
313
|
+
k: function(e, t, n) {
|
|
314
|
+
let r = e.getHours();
|
|
315
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
|
|
316
|
+
},
|
|
317
|
+
m: function(e, t, n) {
|
|
318
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : o.m(e, t);
|
|
319
|
+
},
|
|
320
|
+
s: function(e, t, n) {
|
|
321
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : o.s(e, t);
|
|
322
|
+
},
|
|
323
|
+
S: function(e, t) {
|
|
324
|
+
return o.S(e, t);
|
|
325
|
+
},
|
|
326
|
+
X: function(e, t, n) {
|
|
327
|
+
let r = e.getTimezoneOffset();
|
|
328
|
+
if (r === 0) return "Z";
|
|
329
|
+
switch (t) {
|
|
330
|
+
case "X": return u(r);
|
|
331
|
+
case "XXXX":
|
|
332
|
+
case "XX": return d(r);
|
|
333
|
+
default: return d(r, ":");
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
x: function(e, t, n) {
|
|
337
|
+
let r = e.getTimezoneOffset();
|
|
338
|
+
switch (t) {
|
|
339
|
+
case "x": return u(r);
|
|
340
|
+
case "xxxx":
|
|
341
|
+
case "xx": return d(r);
|
|
342
|
+
default: return d(r, ":");
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
O: function(e, t, n) {
|
|
346
|
+
let r = e.getTimezoneOffset();
|
|
347
|
+
switch (t) {
|
|
348
|
+
case "O":
|
|
349
|
+
case "OO":
|
|
350
|
+
case "OOO": return "GMT" + l(r, ":");
|
|
351
|
+
default: return "GMT" + d(r, ":");
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
z: function(e, t, n) {
|
|
355
|
+
let r = e.getTimezoneOffset();
|
|
356
|
+
switch (t) {
|
|
357
|
+
case "z":
|
|
358
|
+
case "zz":
|
|
359
|
+
case "zzz": return "GMT" + l(r, ":");
|
|
360
|
+
default: return "GMT" + d(r, ":");
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
t: function(e, t, n) {
|
|
364
|
+
return a(Math.trunc(e / 1e3), t.length);
|
|
365
|
+
},
|
|
366
|
+
T: function(e, t, n) {
|
|
367
|
+
return a(+e, t.length);
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
function l(e, t = "") {
|
|
371
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.trunc(r / 60), o = r % 60;
|
|
372
|
+
return o === 0 ? n + String(i) : n + String(i) + t + a(o, 2);
|
|
373
|
+
}
|
|
374
|
+
function u(e, t) {
|
|
375
|
+
return e % 60 == 0 ? (e > 0 ? "-" : "+") + a(Math.abs(e) / 60, 2) : d(e, t);
|
|
376
|
+
}
|
|
377
|
+
function d(e, t = "") {
|
|
378
|
+
let n = e > 0 ? "-" : "+", r = Math.abs(e), i = a(Math.trunc(r / 60), 2), o = a(r % 60, 2);
|
|
379
|
+
return n + i + t + o;
|
|
380
|
+
}
|
|
381
|
+
//#endregion
|
|
382
|
+
export { c as formatters };
|
package/dist/index88.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index73.cjs"),t=require("./index81.cjs"),n=require("./index82.cjs"),r=require("./index83.cjs"),i=require("./index85.cjs"),a=require("./index86.cjs"),o=require("./index87.cjs");var s={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},c={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return o.lightFormatters.y(e,t)},Y:function(e,t,n,i){let o=r.default(e,i),s=o>0?o:1-o;return t===`YY`?a.addLeadingZeros(s%100,2):t===`Yo`?n.ordinalNumber(s,{unit:`year`}):a.addLeadingZeros(s,t.length)},R:function(t,n){return a.addLeadingZeros(e.default(t),n.length)},u:function(e,t){return a.addLeadingZeros(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return a.addLeadingZeros(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return a.addLeadingZeros(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return o.lightFormatters.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return a.addLeadingZeros(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let o=i.default(e,r);return t===`wo`?n.ordinalNumber(o,{unit:`week`}):a.addLeadingZeros(o,t.length)},I:function(e,t,r){let i=n.default(e);return t===`Io`?r.ordinalNumber(i,{unit:`week`}):a.addLeadingZeros(i,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):o.lightFormatters.d(e,t)},D:function(e,n,r){let i=t.default(e);return n===`Do`?r.ordinalNumber(i,{unit:`dayOfYear`}):a.addLeadingZeros(i,n.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(o);case`ee`:return a.addLeadingZeros(o,2);case`eo`:return n.ordinalNumber(o,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(o);case`cc`:return a.addLeadingZeros(o,t.length);case`co`:return n.ordinalNumber(o,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return a.addLeadingZeros(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?s.noon:r===0?s.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?s.evening:r>=12?s.afternoon:r>=4?s.morning:s.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return o.lightFormatters.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):o.lightFormatters.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):a.addLeadingZeros(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):a.addLeadingZeros(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):o.lightFormatters.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):o.lightFormatters.s(e,t)},S:function(e,t){return o.lightFormatters.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return u(r);case`XXXX`:case`XX`:return d(r);default:return d(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return u(r);case`xxxx`:case`xx`:return d(r);default:return d(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+l(r,`:`);default:return`GMT`+d(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+l(r,`:`);default:return`GMT`+d(r,`:`)}},t:function(e,t,n){return a.addLeadingZeros(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return a.addLeadingZeros(+e,t.length)}};function l(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+a.addLeadingZeros(o,2)}function u(e,t){return e%60==0?(e>0?`-`:`+`)+a.addLeadingZeros(Math.abs(e)/60,2):d(e,t)}function d(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=a.addLeadingZeros(Math.trunc(r/60),2),o=a.addLeadingZeros(r%60,2);return n+i+t+o}exports.formatters=c;
|