@pivotfinancialtechnologies/admin-frontend-blueprint-template 0.0.2-dev.8 → 0.0.3-dev.10

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.
Files changed (85) hide show
  1. package/README.md +56 -60
  2. package/dist/PermissionVisibility-CXHamZv5.cjs +1 -0
  3. package/dist/PermissionVisibility-DhDN-Z93.js +24 -0
  4. package/dist/SettingsSectionBase-CfT9p06Q.js +475 -0
  5. package/dist/SettingsSectionBase-PZs1Wgw1.cjs +1 -0
  6. package/dist/TopBarNavLayout-C0qRr2Lo.js +62 -0
  7. package/dist/TopBarNavLayout-CVxxYLc9.cjs +1 -0
  8. package/dist/{index.css → admin-frontend-blueprint-template.css} +1 -1
  9. package/dist/api-CzCTYMlh.js +81 -0
  10. package/dist/api-nTm6UPd6.cjs +1 -0
  11. package/dist/{utils → clipboard}/copy.d.ts +1 -1
  12. package/dist/clipboard/index.d.ts +1 -0
  13. package/dist/components/Data/BooleanTag/BooleanTag.d.ts +1 -1
  14. package/dist/components/Data/Datatable/Datatable.d.ts +1 -1
  15. package/dist/components/Data/Settings/SettingGroup.d.ts +7 -0
  16. package/dist/components/Data/Settings/SettingsSectionBase.d.ts +14 -0
  17. package/dist/components/index.d.ts +4 -6
  18. package/dist/components.cjs +1 -0
  19. package/dist/components.d.ts +2 -0
  20. package/dist/components.js +14 -0
  21. package/dist/date-1EP6oPlF.cjs +1 -0
  22. package/dist/date-BEtsfEKV.js +389 -0
  23. package/dist/feedback/index.d.ts +1 -0
  24. package/dist/formatters/duration.d.ts +1 -0
  25. package/dist/formatters/index.d.ts +4 -0
  26. package/dist/formatters/money.d.ts +3 -0
  27. package/dist/formatters/phone.d.ts +1 -0
  28. package/dist/formatters.cjs +1 -0
  29. package/dist/formatters.d.ts +2 -0
  30. package/dist/formatters.js +12 -0
  31. package/dist/hooks/index.d.ts +2 -0
  32. package/dist/hooks/useSize.d.ts +5 -0
  33. package/dist/hooks/useUrlForm.d.ts +5 -0
  34. package/dist/hooks.cjs +1 -0
  35. package/dist/hooks.d.ts +2 -0
  36. package/dist/hooks.js +6 -0
  37. package/dist/http/api.d.ts +49 -0
  38. package/dist/http/index.d.ts +2 -0
  39. package/dist/http/query.d.ts +5 -0
  40. package/dist/http.cjs +1 -0
  41. package/dist/http.d.ts +2 -0
  42. package/dist/http.js +11 -0
  43. package/dist/index.cjs +1 -0
  44. package/dist/index.d.ts +8 -2
  45. package/dist/index.js +49 -4535
  46. package/dist/jsx-runtime-DMhOxOJN.cjs +14 -0
  47. package/dist/jsx-runtime-gfdvceKf.js +615 -0
  48. package/dist/layout/index.d.ts +4 -0
  49. package/dist/layout.cjs +1 -0
  50. package/dist/layout.d.ts +2 -0
  51. package/dist/layout.js +7 -0
  52. package/dist/phone-DmQ5SK-X.cjs +1 -0
  53. package/dist/phone-DtDgQ5qk.js +27 -0
  54. package/dist/query-Br3l_kxt.cjs +1 -0
  55. package/dist/query-CherHJOV.js +17 -0
  56. package/dist/{components/Security → security}/PermissionVisibility.d.ts +4 -2
  57. package/dist/security/index.d.ts +3 -0
  58. package/dist/security.cjs +1 -0
  59. package/dist/security.d.ts +2 -0
  60. package/dist/security.js +6 -0
  61. package/dist/toast-B3QUItIK.js +10 -0
  62. package/dist/toast-CCrs9yfw.cjs +1 -0
  63. package/dist/types/index.d.ts +1 -0
  64. package/dist/{components/Data/Pagination.d.ts → types/pagination.d.ts} +2 -2
  65. package/dist/useSize-Ci0PbN9W.js +15 -0
  66. package/dist/useSize-Dk1SOOLH.cjs +1 -0
  67. package/dist/useUrlForm-BYTOPBsx.js +26 -0
  68. package/dist/useUrlForm-KA9CehKJ.cjs +1 -0
  69. package/package.json +60 -8
  70. package/dist/components/Data/utils.d.ts +0 -5
  71. package/dist/index.umd.cjs +0 -14
  72. package/dist/layouts/index.d.ts +0 -3
  73. package/dist/utils/http.d.ts +0 -4
  74. package/dist/utils/index.d.ts +0 -6
  75. package/dist/utils/useUrlForm.d.ts +0 -4
  76. /package/dist/components/{Select → Data/Select}/SelectItem.d.ts +0 -0
  77. /package/dist/components/{Select → Data/Select}/SelectMultipleItems.d.ts +0 -0
  78. /package/dist/{utils → feedback}/toast.d.ts +0 -0
  79. /package/dist/{utils/formatters.d.ts → formatters/date.d.ts} +0 -0
  80. /package/dist/{layouts → layout}/ThemeSwitch/ThemeSwitch.d.ts +0 -0
  81. /package/dist/{layouts → layout}/TopBarNavLayout/TopBarNavLayout.d.ts +0 -0
  82. /package/dist/{layouts → layout}/Topbar/Topbar.d.ts +0 -0
  83. /package/dist/{utils → layout}/theme.d.ts +0 -0
  84. /package/dist/{components/Security → security}/AuthRoute.d.ts +0 -0
  85. /package/dist/{components/Security → security}/UnAuthRoute.d.ts +0 -0
@@ -0,0 +1,62 @@
1
+ import { j as e } from "./jsx-runtime-gfdvceKf.js";
2
+ import { useState as d, useEffect as m } from "react";
3
+ import { Classes as a, Colors as c, Switch as u, Navbar as h, NavbarGroup as r, NavbarHeading as x, PopoverNext as b, Button as j, Menu as g, MenuItem as i, MenuDivider as p } from "@blueprintjs/core";
4
+ const f = () => {
5
+ const [s, n] = d(() => {
6
+ if (typeof window > "u")
7
+ return !1;
8
+ try {
9
+ return window.localStorage.getItem("theme") === "dark";
10
+ } catch {
11
+ return !1;
12
+ }
13
+ }), o = (t) => {
14
+ document.body.classList.toggle(a.DARK, t), document.body.style.backgroundColor = t ? c.DARK_GRAY3 : c.LIGHT_GRAY5;
15
+ try {
16
+ window.localStorage.setItem("theme", t ? "dark" : "light");
17
+ } catch {
18
+ }
19
+ n(t);
20
+ };
21
+ return m(() => {
22
+ o(s);
23
+ const t = new MutationObserver(() => {
24
+ const l = document.body.classList.contains(a.DARK);
25
+ n(l);
26
+ });
27
+ return t.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), () => t.disconnect();
28
+ }, [s]), {
29
+ isDarkTheme: s,
30
+ setTheme: o
31
+ };
32
+ }, v = (s) => {
33
+ const { isDarkTheme: n, setTheme: o } = f(), t = () => o(!n);
34
+ return /* @__PURE__ */ e.jsx(u, { ...s, checked: n, label: "Dark Mode", onChange: t, alignIndicator: "right" });
35
+ }, y = ({ title: s, navigation: n, onProfileClick: o, onLogoutClick: t }) => /* @__PURE__ */ e.jsxs(h, { className: "bp6-fixed-top custom-navbar", children: [
36
+ /* @__PURE__ */ e.jsx(r, { align: "left", children: /* @__PURE__ */ e.jsx(x, { children: s }) }),
37
+ /* @__PURE__ */ e.jsx(r, { children: n }),
38
+ /* @__PURE__ */ e.jsxs(r, { align: "end", children: [
39
+ /* @__PURE__ */ e.jsx(v, { className: "mr-2 mb-0!" }),
40
+ /* @__PURE__ */ e.jsx(
41
+ b,
42
+ {
43
+ placement: "bottom-end",
44
+ content: /* @__PURE__ */ e.jsxs(g, { children: [
45
+ /* @__PURE__ */ e.jsx(i, { icon: "id-number", text: "My profile", onClick: o }),
46
+ /* @__PURE__ */ e.jsx(p, {}),
47
+ /* @__PURE__ */ e.jsx(i, { intent: "danger", icon: "log-out", text: "Sign out", onClick: t })
48
+ ] }),
49
+ children: /* @__PURE__ */ e.jsx(j, { icon: "user" })
50
+ }
51
+ )
52
+ ] })
53
+ ] }), D = ({ children: s, ...n }) => /* @__PURE__ */ e.jsxs("div", { className: "main-layout", children: [
54
+ /* @__PURE__ */ e.jsx("div", { className: "topbar", children: /* @__PURE__ */ e.jsx(y, { ...n }) }),
55
+ /* @__PURE__ */ e.jsx("div", { className: "body", children: s })
56
+ ] });
57
+ export {
58
+ v as T,
59
+ D as a,
60
+ y as b,
61
+ f as u
62
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./jsx-runtime-DMhOxOJN.cjs"),i=require("react"),t=require("@blueprintjs/core"),a=()=>{const[r,n]=i.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem("theme")==="dark"}catch{return!1}}),o=s=>{document.body.classList.toggle(t.Classes.DARK,s),document.body.style.backgroundColor=s?t.Colors.DARK_GRAY3:t.Colors.LIGHT_GRAY5;try{window.localStorage.setItem("theme",s?"dark":"light")}catch{}n(s)};return i.useEffect(()=>{o(r);const s=new MutationObserver(()=>{const x=document.body.classList.contains(t.Classes.DARK);n(x)});return s.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>s.disconnect()},[r]),{isDarkTheme:r,setTheme:o}},c=r=>{const{isDarkTheme:n,setTheme:o}=a(),s=()=>o(!n);return e.jsxRuntimeExports.jsx(t.Switch,{...r,checked:n,label:"Dark Mode",onChange:s,alignIndicator:"right"})},u=({title:r,navigation:n,onProfileClick:o,onLogoutClick:s})=>e.jsxRuntimeExports.jsxs(t.Navbar,{className:"bp6-fixed-top custom-navbar",children:[e.jsxRuntimeExports.jsx(t.NavbarGroup,{align:"left",children:e.jsxRuntimeExports.jsx(t.NavbarHeading,{children:r})}),e.jsxRuntimeExports.jsx(t.NavbarGroup,{children:n}),e.jsxRuntimeExports.jsxs(t.NavbarGroup,{align:"end",children:[e.jsxRuntimeExports.jsx(c,{className:"mr-2 mb-0!"}),e.jsxRuntimeExports.jsx(t.PopoverNext,{placement:"bottom-end",content:e.jsxRuntimeExports.jsxs(t.Menu,{children:[e.jsxRuntimeExports.jsx(t.MenuItem,{icon:"id-number",text:"My profile",onClick:o}),e.jsxRuntimeExports.jsx(t.MenuDivider,{}),e.jsxRuntimeExports.jsx(t.MenuItem,{intent:"danger",icon:"log-out",text:"Sign out",onClick:s})]}),children:e.jsxRuntimeExports.jsx(t.Button,{icon:"user"})})]})]}),m=({children:r,...n})=>e.jsxRuntimeExports.jsxs("div",{className:"main-layout",children:[e.jsxRuntimeExports.jsx("div",{className:"topbar",children:e.jsxRuntimeExports.jsx(u,{...n})}),e.jsxRuntimeExports.jsx("div",{className:"body",children:r})]});exports.ThemeSwitch=c;exports.TopBarNavLayout=m;exports.Topbar=u;exports.useTheme=a;
@@ -1 +1 @@
1
- .table-form-actions{display:flex}.table-actions{flex-shrink:0;align-self:flex-end;align-items:center;padding:10px 0;gap:10px;display:flex}.columns-visibility-menu{gap:10px;display:flex}.table-form{flex:1}.table-content{height:520px;overflow-y:auto;overflow-x:hidden}.table-pagination{display:flex;justify-content:space-between;align-items:center;margin:10px;padding-top:20px}.rows-select-container{display:flex;align-items:center}.rows-select-container span{margin-right:10px}.pagination-page-info{margin:0 10px}.simple-html-datatable{--table-border-color: rgba(129, 129, 129, .45);font-size:12px;border-collapse:collapse;border:1px solid var(--table-border-color)}.simple-html-datatable th,.simple-html-datatable td{padding:4px 8px;border-bottom:1px solid var(--table-border-color);border-right:1px solid var(--table-border-color)}.bp5-intent-primary{background-color:#2d72d21a;color:#2d72d2}.bp5-intent-warning{background-color:#ffe5641a;color:#d9822b}.bp5-intent-danger{background-color:#ff4d4f1a;color:#f45e5e}.custom-navbar{display:flex;width:100%;justify-content:space-between}.nav-button{box-shadow:none!important}.nav-button:hover{background:#ffffff1a!important}
1
+ .table-form-actions{display:flex}.table-actions{flex-shrink:0;align-self:flex-end;align-items:center;padding:10px 0;gap:10px;display:flex}.columns-visibility-menu{gap:10px;display:flex}.table-form{flex:1}.table-content{height:520px;overflow-y:auto;overflow-x:hidden}.table-pagination{display:flex;justify-content:space-between;align-items:center;margin:10px;padding-top:20px}.rows-select-container{display:flex;align-items:center}.rows-select-container span{margin-right:10px}.pagination-page-info{margin:0 10px}.simple-html-datatable{--table-border-color: rgba(129, 129, 129, .45);font-size:12px;border-collapse:collapse;border:1px solid var(--table-border-color)}.simple-html-datatable th,.simple-html-datatable td{padding:4px 8px;border-bottom:1px solid var(--table-border-color);border-right:1px solid var(--table-border-color)}.bp6-intent-primary{background-color:#2d72d21a;color:#2d72d2}.bp6-intent-warning{background-color:#ffe5641a;color:#d9822b}.bp6-intent-danger{background-color:#ff4d4f1a;color:#f45e5e}.custom-navbar{display:flex;width:100%;justify-content:space-between}.nav-button{box-shadow:none!important}.nav-button:hover{background:#ffffff1a!important}
@@ -0,0 +1,81 @@
1
+ import { s as U } from "./toast-B3QUItIK.js";
2
+ const h = (t) => typeof t == "object" && t !== null, s = (t, r) => typeof t[r] == "string" ? t[r] : void 0, f = (t, r) => {
3
+ if (typeof t == "string")
4
+ return { status: r, error: t, message: t };
5
+ const e = h(t) ? t : {}, n = s(e, "type"), o = s(e, "title"), i = s(e, "detail"), u = s(e, "error"), p = i ?? o ?? s(e, "message") ?? u ?? `Request failed with status code ${r}`;
6
+ return {
7
+ status: r,
8
+ message: p,
9
+ error: i ?? u ?? o,
10
+ type: n,
11
+ title: o,
12
+ detail: i,
13
+ instance: s(e, "instance"),
14
+ field: s(e, "field"),
15
+ code: s(e, "code") ?? s(e, "statusCode") ?? s(e, "status"),
16
+ entity: s(e, "entity")
17
+ };
18
+ }, R = (t) => {
19
+ if (!h(t))
20
+ return t instanceof Error ? { status: 0, message: t.message, error: t.message } : void 0;
21
+ if (typeof t.status == "number" && typeof t.message == "string")
22
+ return {
23
+ ...f(t, t.status),
24
+ error: s(t, "error") ?? s(t, "detail")
25
+ };
26
+ if ("data" in t) {
27
+ const r = typeof t.status == "number" ? t.status : 0;
28
+ return f(t.data, r);
29
+ }
30
+ }, B = async (t, r, e) => {
31
+ try {
32
+ const n = await t();
33
+ await r?.(n);
34
+ } catch (n) {
35
+ e?.(R(n));
36
+ }
37
+ }, S = (t) => {
38
+ U({ intent: "danger", message: t.message });
39
+ }, q = (t) => {
40
+ if (t)
41
+ try {
42
+ return JSON.parse(t);
43
+ } catch {
44
+ return t;
45
+ }
46
+ }, C = (t = {}) => async (r) => {
47
+ const { url: e, method: n, data: o, params: i, headers: u, responseType: p } = r, g = t.onError ?? S;
48
+ try {
49
+ const a = t.getBaseUrl?.() ?? "", d = /^[a-z][a-z\d+.-]*:/i.test(e) ? new URL(e) : new URL(`${a.replace(/\/+$/, "")}/${e.replace(/^\/+/, "")}`, window.location.origin);
50
+ i && i.forEach((E, v) => d.searchParams.append(v, E));
51
+ const l = new Headers(u), m = o === void 0 ? void 0 : JSON.stringify(o);
52
+ m !== void 0 && !l.has("Content-Type") && l.set("Content-Type", "application/json");
53
+ const c = await fetch(d, {
54
+ method: n,
55
+ headers: l,
56
+ body: m,
57
+ credentials: "include"
58
+ });
59
+ if (c.ok && p === "blob")
60
+ return { data: await c.blob() };
61
+ const b = await c.text(), y = q(b);
62
+ if (c.ok)
63
+ return { data: y };
64
+ c.status === 401 && t.onUnauthorized?.();
65
+ const w = f(y, c.status);
66
+ return g(w), { error: w };
67
+ } catch (a) {
68
+ const d = {
69
+ status: 0,
70
+ message: a instanceof Error ? a.message : String(a),
71
+ error: a instanceof Error ? a.message : String(a)
72
+ };
73
+ return g(d), { error: d };
74
+ }
75
+ };
76
+ export {
77
+ C as c,
78
+ R as g,
79
+ f as m,
80
+ B as w
81
+ };
@@ -0,0 +1 @@
1
+ "use strict";const U=require("./toast-CCrs9yfw.cjs"),h=t=>typeof t=="object"&&t!==null,s=(t,r)=>typeof t[r]=="string"?t[r]:void 0,l=(t,r)=>{if(typeof t=="string")return{status:r,error:t,message:t};const e=h(t)?t:{},n=s(e,"type"),o=s(e,"title"),i=s(e,"detail"),u=s(e,"error"),p=i??o??s(e,"message")??u??`Request failed with status code ${r}`;return{status:r,message:p,error:i??u??o,type:n,title:o,detail:i,instance:s(e,"instance"),field:s(e,"field"),code:s(e,"code")??s(e,"statusCode")??s(e,"status"),entity:s(e,"entity")}},b=t=>{if(!h(t))return t instanceof Error?{status:0,message:t.message,error:t.message}:void 0;if(typeof t.status=="number"&&typeof t.message=="string")return{...l(t,t.status),error:s(t,"error")??s(t,"detail")};if("data"in t){const r=typeof t.status=="number"?t.status:0;return l(t.data,r)}},q=async(t,r,e)=>{try{const n=await t();await r?.(n)}catch(n){e?.(b(n))}},B=t=>{U.showToast({intent:"danger",message:t.message})},C=t=>{if(t)try{return JSON.parse(t)}catch{return t}},R=(t={})=>async r=>{const{url:e,method:n,data:o,params:i,headers:u,responseType:p}=r,g=t.onError??B;try{const a=t.getBaseUrl?.()??"",d=/^[a-z][a-z\d+.-]*:/i.test(e)?new URL(e):new URL(`${a.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,window.location.origin);i&&i.forEach((A,v)=>d.searchParams.append(v,A));const f=new Headers(u),y=o===void 0?void 0:JSON.stringify(o);y!==void 0&&!f.has("Content-Type")&&f.set("Content-Type","application/json");const c=await fetch(d,{method:n,headers:f,body:y,credentials:"include"});if(c.ok&&p==="blob")return{data:await c.blob()};const E=await c.text(),m=C(E);if(c.ok)return{data:m};c.status===401&&t.onUnauthorized?.();const w=l(m,c.status);return g(w),{error:w}}catch(a){const d={status:0,message:a instanceof Error?a.message:String(a),error:a instanceof Error?a.message:String(a)};return g(d),{error:d}}};exports.createApiBaseQuery=R;exports.getApiError=b;exports.mapProblemDetails=l;exports.wrapApiCall=q;
@@ -1,2 +1,2 @@
1
- export declare const createCopyableText: (value: any) => string;
1
+ export declare const createCopyableText: (value: unknown) => string;
2
2
  export declare const copyTextToClipboard: (text: string) => Promise<void>;
@@ -0,0 +1 @@
1
+ export * from './copy.ts';
@@ -3,5 +3,5 @@ interface BooleanTagProps {
3
3
  trueLabel?: string;
4
4
  falseLabel?: string;
5
5
  }
6
- export declare const BooleanTag: ({ value, trueLabel, falseLabel, }: BooleanTagProps) => import("react").JSX.Element;
6
+ export declare const BooleanTag: ({ value, trueLabel, falseLabel }: BooleanTagProps) => import("react").JSX.Element;
7
7
  export {};
@@ -1,4 +1,4 @@
1
- import { Page, PageRequest } from '../Pagination.ts';
1
+ import { Page, PageRequest } from '../../../types/pagination.ts';
2
2
  import { default as React } from 'react';
3
3
  import { Intent } from '@blueprintjs/core';
4
4
  import { ColumnProps } from '@blueprintjs/table';
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SettingGroupProps {
3
+ label: string;
4
+ helpText?: string | ReactNode;
5
+ children?: ReactNode;
6
+ }
7
+ export declare const SettingGroup: ({ label, helpText, children }: SettingGroupProps) => import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
+ export interface SettingsSectionProps<T> {
3
+ settings: T;
4
+ updatedAt: Date;
5
+ onSave: (next: T) => void;
6
+ }
7
+ export interface BaseSectionProps<T> {
8
+ title: string;
9
+ settings: T;
10
+ updatedAt: Date;
11
+ onChange: (next: T) => void;
12
+ getContent?: (value: T, setField: <K extends keyof T>(k: K, v: T[K]) => void, setValue: Dispatch<SetStateAction<T>>) => ReactNode;
13
+ }
14
+ export declare const SettingsSectionBase: <T>(props: BaseSectionProps<T>) => import("react").JSX.Element;
@@ -1,4 +1,3 @@
1
- export * from './Data/Pagination.ts';
2
1
  export * from './Data/BooleanTag/BooleanTag';
3
2
  export * from './Data/Datatable/Datatable.tsx';
4
3
  export * from './Data/Datatable/TableCellTag.tsx';
@@ -6,8 +5,7 @@ export * from './Data/Datatable/TableCopyMenu.tsx';
6
5
  export * from './Data/SimpleDatatable/SimpleDatatable.tsx';
7
6
  export * from './Data/SimpleHTMLDatatable/SimpleHTMLDatatable.tsx';
8
7
  export * from './Dialog/ConfirmationDialog.tsx';
9
- export * from './Select/SelectItem.tsx';
10
- export * from './Select/SelectMultipleItems.tsx';
11
- export * from './Security/AuthRoute.tsx';
12
- export * from './Security/UnAuthRoute.tsx';
13
- export * from './Security/PermissionVisibility.tsx';
8
+ export * from './Data/Select/SelectItem.tsx';
9
+ export * from './Data/Select/SelectMultipleItems.tsx';
10
+ export * from './Data/Settings/SettingGroup.tsx';
11
+ export * from './Data/Settings/SettingsSectionBase.tsx';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./SettingsSectionBase-PZs1Wgw1.cjs");exports.BooleanTag=e.BooleanTag;exports.Datatable=e.Datatable;exports.SelectItem=e.SelectItem;exports.SelectMultipleItems=e.SelectMultipleItems;exports.SettingGroup=e.SettingGroup;exports.SettingsSectionBase=e.SettingsSectionBase;exports.SimpleDatatable=e.SimpleDatatable;exports.SimpleHTMLDatatable=e.SimpleHTMLDatatable;exports.TableCellTag=e.TableCellTag;exports.createTableCopyMenu=e.createTableCopyMenu;exports.useConfirmDialog=e.useConfirmDialog;
@@ -0,0 +1,2 @@
1
+ export * from './components/index'
2
+ export {}
@@ -0,0 +1,14 @@
1
+ import { B as t, D as l, S as s, a as o, b as i, c as S, d as b, e as m, T as n, f as p, u as T } from "./SettingsSectionBase-CfT9p06Q.js";
2
+ export {
3
+ t as BooleanTag,
4
+ l as Datatable,
5
+ s as SelectItem,
6
+ o as SelectMultipleItems,
7
+ i as SettingGroup,
8
+ S as SettingsSectionBase,
9
+ b as SimpleDatatable,
10
+ m as SimpleHTMLDatatable,
11
+ n as TableCellTag,
12
+ p as createTableCopyMenu,
13
+ T as useConfirmDialog
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";const y=require("date-fns-tz");function c(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}function s(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",r;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=t!=null&&t.width?String(t.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var u=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;r=e.values[l]||e.values[u]}var d=e.argumentCallback?e.argumentCallback(a):a;return r[d]}}function m(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=a.match(r);if(!i)return null;var o=i[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(u)?w(u,function(h){return h.test(o)}):b(u,function(h){return h.test(o)}),d;d=e.valueCallback?e.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var g=a.slice(o.length);return{value:d,rest:g}}}function b(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function w(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function P(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var r=n[0],i=a.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var u=a.slice(r.length);return{value:o,rest:u}}}var p={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},M=function(a,t,n){var r,i=p[a];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},W={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},D={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},S={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k={date:c({formats:W,defaultWidth:"full"}),time:c({formats:D,defaultWidth:"full"}),dateTime:c({formats:S,defaultWidth:"full"})},C={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},F=function(a,t,n,r){return C[a]},A={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},T={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},x={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},j={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},V={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},q={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},z=function(a,t){var n=Number(a),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},L={ordinalNumber:z,era:s({values:A,defaultWidth:"wide"}),quarter:s({values:T,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:s({values:x,defaultWidth:"wide"}),day:s({values:j,defaultWidth:"wide"}),dayPeriod:s({values:V,defaultWidth:"wide",formattingValues:q,defaultFormattingWidth:"wide"})},N=/^(\d+)(th|st|nd|rd)?/i,O=/\d+/i,J={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},X={any:[/^b/i,/^(a|c)/i]},R={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},E={any:[/1/i,/2/i,/3/i,/4/i]},Q={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},U={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Z={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},H={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Y={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},B={ordinalNumber:P({matchPattern:N,parsePattern:O,valueCallback:function(a){return parseInt(a,10)}}),era:m({matchPatterns:J,defaultMatchWidth:"wide",parsePatterns:X,defaultParseWidth:"any"}),quarter:m({matchPatterns:R,defaultMatchWidth:"wide",parsePatterns:E,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:m({matchPatterns:Q,defaultMatchWidth:"wide",parsePatterns:U,defaultParseWidth:"any"}),day:m({matchPatterns:Z,defaultMatchWidth:"wide",parsePatterns:_,defaultParseWidth:"any"}),dayPeriod:m({matchPatterns:H,defaultMatchWidth:"any",parsePatterns:Y,defaultParseWidth:"any"})},v={code:"en-US",formatDistance:M,formatLong:k,formatRelative:F,localize:L,match:B,options:{weekStartsOn:0,firstWeekContainsDate:1}};const f={enUS:v},I=()=>Promise.resolve(v),K=(e,a="yyyy-MM-dd HH:mm:ss z",t="enUS",n="America/Los_Angeles")=>{if(!e)return"";const r=f[t]||f.enUS,i=typeof e=="string"?e.endsWith("Z")||e.includes("+")?new Date(e):new Date(e+"Z"):new Date(e);return y.formatInTimeZone(i,n,a,{locale:r})},G=(e,a="en-US")=>e?(typeof e=="string"?e.endsWith("Z")||e.includes("+")?new Date(e):new Date(e+"Z"):new Date(e)).toLocaleDateString(a):"";exports.formatDateOnly=G;exports.formatDateTime=K;exports.localeLoader=I;
@@ -0,0 +1,389 @@
1
+ import { formatInTimeZone as y } from "date-fns-tz";
2
+ function c(e) {
3
+ return function() {
4
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = t.width ? String(t.width) : e.defaultWidth, n = e.formats[a] || e.formats[e.defaultWidth];
5
+ return n;
6
+ };
7
+ }
8
+ function s(e) {
9
+ return function(t, a) {
10
+ var n = a != null && a.context ? String(a.context) : "standalone", r;
11
+ if (n === "formatting" && e.formattingValues) {
12
+ var i = e.defaultFormattingWidth || e.defaultWidth, o = a != null && a.width ? String(a.width) : i;
13
+ r = e.formattingValues[o] || e.formattingValues[i];
14
+ } else {
15
+ var u = e.defaultWidth, l = a != null && a.width ? String(a.width) : e.defaultWidth;
16
+ r = e.values[l] || e.values[u];
17
+ }
18
+ var d = e.argumentCallback ? e.argumentCallback(t) : t;
19
+ return r[d];
20
+ };
21
+ }
22
+ function m(e) {
23
+ return function(t) {
24
+ var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = a.width, r = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], i = t.match(r);
25
+ if (!i)
26
+ return null;
27
+ var o = i[0], u = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(u) ? w(u, function(h) {
28
+ return h.test(o);
29
+ }) : b(u, function(h) {
30
+ return h.test(o);
31
+ }), d;
32
+ d = e.valueCallback ? e.valueCallback(l) : l, d = a.valueCallback ? a.valueCallback(d) : d;
33
+ var g = t.slice(o.length);
34
+ return {
35
+ value: d,
36
+ rest: g
37
+ };
38
+ };
39
+ }
40
+ function b(e, t) {
41
+ for (var a in e)
42
+ if (e.hasOwnProperty(a) && t(e[a]))
43
+ return a;
44
+ }
45
+ function w(e, t) {
46
+ for (var a = 0; a < e.length; a++)
47
+ if (t(e[a]))
48
+ return a;
49
+ }
50
+ function P(e) {
51
+ return function(t) {
52
+ var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.match(e.matchPattern);
53
+ if (!n) return null;
54
+ var r = n[0], i = t.match(e.parsePattern);
55
+ if (!i) return null;
56
+ var o = e.valueCallback ? e.valueCallback(i[0]) : i[0];
57
+ o = a.valueCallback ? a.valueCallback(o) : o;
58
+ var u = t.slice(r.length);
59
+ return {
60
+ value: o,
61
+ rest: u
62
+ };
63
+ };
64
+ }
65
+ var p = {
66
+ lessThanXSeconds: {
67
+ one: "less than a second",
68
+ other: "less than {{count}} seconds"
69
+ },
70
+ xSeconds: {
71
+ one: "1 second",
72
+ other: "{{count}} seconds"
73
+ },
74
+ halfAMinute: "half a minute",
75
+ lessThanXMinutes: {
76
+ one: "less than a minute",
77
+ other: "less than {{count}} minutes"
78
+ },
79
+ xMinutes: {
80
+ one: "1 minute",
81
+ other: "{{count}} minutes"
82
+ },
83
+ aboutXHours: {
84
+ one: "about 1 hour",
85
+ other: "about {{count}} hours"
86
+ },
87
+ xHours: {
88
+ one: "1 hour",
89
+ other: "{{count}} hours"
90
+ },
91
+ xDays: {
92
+ one: "1 day",
93
+ other: "{{count}} days"
94
+ },
95
+ aboutXWeeks: {
96
+ one: "about 1 week",
97
+ other: "about {{count}} weeks"
98
+ },
99
+ xWeeks: {
100
+ one: "1 week",
101
+ other: "{{count}} weeks"
102
+ },
103
+ aboutXMonths: {
104
+ one: "about 1 month",
105
+ other: "about {{count}} months"
106
+ },
107
+ xMonths: {
108
+ one: "1 month",
109
+ other: "{{count}} months"
110
+ },
111
+ aboutXYears: {
112
+ one: "about 1 year",
113
+ other: "about {{count}} years"
114
+ },
115
+ xYears: {
116
+ one: "1 year",
117
+ other: "{{count}} years"
118
+ },
119
+ overXYears: {
120
+ one: "over 1 year",
121
+ other: "over {{count}} years"
122
+ },
123
+ almostXYears: {
124
+ one: "almost 1 year",
125
+ other: "almost {{count}} years"
126
+ }
127
+ }, M = function(t, a, n) {
128
+ var r, i = p[t];
129
+ return typeof i == "string" ? r = i : a === 1 ? r = i.one : r = i.other.replace("{{count}}", a.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
130
+ }, W = {
131
+ full: "EEEE, MMMM do, y",
132
+ long: "MMMM do, y",
133
+ medium: "MMM d, y",
134
+ short: "MM/dd/yyyy"
135
+ }, D = {
136
+ full: "h:mm:ss a zzzz",
137
+ long: "h:mm:ss a z",
138
+ medium: "h:mm:ss a",
139
+ short: "h:mm a"
140
+ }, S = {
141
+ full: "{{date}} 'at' {{time}}",
142
+ long: "{{date}} 'at' {{time}}",
143
+ medium: "{{date}}, {{time}}",
144
+ short: "{{date}}, {{time}}"
145
+ }, k = {
146
+ date: c({
147
+ formats: W,
148
+ defaultWidth: "full"
149
+ }),
150
+ time: c({
151
+ formats: D,
152
+ defaultWidth: "full"
153
+ }),
154
+ dateTime: c({
155
+ formats: S,
156
+ defaultWidth: "full"
157
+ })
158
+ }, C = {
159
+ lastWeek: "'last' eeee 'at' p",
160
+ yesterday: "'yesterday at' p",
161
+ today: "'today at' p",
162
+ tomorrow: "'tomorrow at' p",
163
+ nextWeek: "eeee 'at' p",
164
+ other: "P"
165
+ }, A = function(t, a, n, r) {
166
+ return C[t];
167
+ }, F = {
168
+ narrow: ["B", "A"],
169
+ abbreviated: ["BC", "AD"],
170
+ wide: ["Before Christ", "Anno Domini"]
171
+ }, x = {
172
+ narrow: ["1", "2", "3", "4"],
173
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
174
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
175
+ }, T = {
176
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
177
+ abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
178
+ wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
179
+ }, j = {
180
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
181
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
182
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
183
+ wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
184
+ }, V = {
185
+ narrow: {
186
+ am: "a",
187
+ pm: "p",
188
+ midnight: "mi",
189
+ noon: "n",
190
+ morning: "morning",
191
+ afternoon: "afternoon",
192
+ evening: "evening",
193
+ night: "night"
194
+ },
195
+ abbreviated: {
196
+ am: "AM",
197
+ pm: "PM",
198
+ midnight: "midnight",
199
+ noon: "noon",
200
+ morning: "morning",
201
+ afternoon: "afternoon",
202
+ evening: "evening",
203
+ night: "night"
204
+ },
205
+ wide: {
206
+ am: "a.m.",
207
+ pm: "p.m.",
208
+ midnight: "midnight",
209
+ noon: "noon",
210
+ morning: "morning",
211
+ afternoon: "afternoon",
212
+ evening: "evening",
213
+ night: "night"
214
+ }
215
+ }, N = {
216
+ narrow: {
217
+ am: "a",
218
+ pm: "p",
219
+ midnight: "mi",
220
+ noon: "n",
221
+ morning: "in the morning",
222
+ afternoon: "in the afternoon",
223
+ evening: "in the evening",
224
+ night: "at night"
225
+ },
226
+ abbreviated: {
227
+ am: "AM",
228
+ pm: "PM",
229
+ midnight: "midnight",
230
+ noon: "noon",
231
+ morning: "in the morning",
232
+ afternoon: "in the afternoon",
233
+ evening: "in the evening",
234
+ night: "at night"
235
+ },
236
+ wide: {
237
+ am: "a.m.",
238
+ pm: "p.m.",
239
+ midnight: "midnight",
240
+ noon: "noon",
241
+ morning: "in the morning",
242
+ afternoon: "in the afternoon",
243
+ evening: "in the evening",
244
+ night: "at night"
245
+ }
246
+ }, q = function(t, a) {
247
+ var n = Number(t), r = n % 100;
248
+ if (r > 20 || r < 10)
249
+ switch (r % 10) {
250
+ case 1:
251
+ return n + "st";
252
+ case 2:
253
+ return n + "nd";
254
+ case 3:
255
+ return n + "rd";
256
+ }
257
+ return n + "th";
258
+ }, z = {
259
+ ordinalNumber: q,
260
+ era: s({
261
+ values: F,
262
+ defaultWidth: "wide"
263
+ }),
264
+ quarter: s({
265
+ values: x,
266
+ defaultWidth: "wide",
267
+ argumentCallback: function(t) {
268
+ return t - 1;
269
+ }
270
+ }),
271
+ month: s({
272
+ values: T,
273
+ defaultWidth: "wide"
274
+ }),
275
+ day: s({
276
+ values: j,
277
+ defaultWidth: "wide"
278
+ }),
279
+ dayPeriod: s({
280
+ values: V,
281
+ defaultWidth: "wide",
282
+ formattingValues: N,
283
+ defaultFormattingWidth: "wide"
284
+ })
285
+ }, J = /^(\d+)(th|st|nd|rd)?/i, L = /\d+/i, O = {
286
+ narrow: /^(b|a)/i,
287
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
288
+ wide: /^(before christ|before common era|anno domini|common era)/i
289
+ }, X = {
290
+ any: [/^b/i, /^(a|c)/i]
291
+ }, R = {
292
+ narrow: /^[1234]/i,
293
+ abbreviated: /^q[1234]/i,
294
+ wide: /^[1234](th|st|nd|rd)? quarter/i
295
+ }, E = {
296
+ any: [/1/i, /2/i, /3/i, /4/i]
297
+ }, Q = {
298
+ narrow: /^[jfmasond]/i,
299
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
300
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
301
+ }, U = {
302
+ narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
303
+ any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
304
+ }, Z = {
305
+ narrow: /^[smtwf]/i,
306
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
307
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
308
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
309
+ }, _ = {
310
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
311
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
312
+ }, H = {
313
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
314
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
315
+ }, Y = {
316
+ any: {
317
+ am: /^a/i,
318
+ pm: /^p/i,
319
+ midnight: /^mi/i,
320
+ noon: /^no/i,
321
+ morning: /morning/i,
322
+ afternoon: /afternoon/i,
323
+ evening: /evening/i,
324
+ night: /night/i
325
+ }
326
+ }, B = {
327
+ ordinalNumber: P({
328
+ matchPattern: J,
329
+ parsePattern: L,
330
+ valueCallback: function(t) {
331
+ return parseInt(t, 10);
332
+ }
333
+ }),
334
+ era: m({
335
+ matchPatterns: O,
336
+ defaultMatchWidth: "wide",
337
+ parsePatterns: X,
338
+ defaultParseWidth: "any"
339
+ }),
340
+ quarter: m({
341
+ matchPatterns: R,
342
+ defaultMatchWidth: "wide",
343
+ parsePatterns: E,
344
+ defaultParseWidth: "any",
345
+ valueCallback: function(t) {
346
+ return t + 1;
347
+ }
348
+ }),
349
+ month: m({
350
+ matchPatterns: Q,
351
+ defaultMatchWidth: "wide",
352
+ parsePatterns: U,
353
+ defaultParseWidth: "any"
354
+ }),
355
+ day: m({
356
+ matchPatterns: Z,
357
+ defaultMatchWidth: "wide",
358
+ parsePatterns: _,
359
+ defaultParseWidth: "any"
360
+ }),
361
+ dayPeriod: m({
362
+ matchPatterns: H,
363
+ defaultMatchWidth: "any",
364
+ parsePatterns: Y,
365
+ defaultParseWidth: "any"
366
+ })
367
+ }, v = {
368
+ code: "en-US",
369
+ formatDistance: M,
370
+ formatLong: k,
371
+ formatRelative: A,
372
+ localize: z,
373
+ match: B,
374
+ options: {
375
+ weekStartsOn: 0,
376
+ firstWeekContainsDate: 1
377
+ }
378
+ };
379
+ const f = { enUS: v }, K = () => Promise.resolve(v), G = (e, t = "yyyy-MM-dd HH:mm:ss z", a = "enUS", n = "America/Los_Angeles") => {
380
+ if (!e)
381
+ return "";
382
+ const r = f[a] || f.enUS, i = typeof e == "string" ? e.endsWith("Z") || e.includes("+") ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : new Date(e);
383
+ return y(i, n, t, { locale: r });
384
+ }, $ = (e, t = "en-US") => e ? (typeof e == "string" ? e.endsWith("Z") || e.includes("+") ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : new Date(e)).toLocaleDateString(t) : "";
385
+ export {
386
+ G as a,
387
+ $ as f,
388
+ K as l
389
+ };
@@ -0,0 +1 @@
1
+ export * from './toast.ts';