@farris/ui-vue 1.2.8 → 1.3.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/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,107 +1,108 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var p = (t, n, e) =>
|
|
4
|
-
import { ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var kt = (t, n, e) => n in t ? Ct(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var p = (t, n, e) => kt(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { ref as v, defineComponent as re, watch as $, computed as B, onMounted as fe, createVNode as b, createTextVNode as ve, mergeProps as Pe, Teleport as Tt, createApp as Pt, onUnmounted as Ot, inject as me, nextTick as Se, withDirectives as Dt, vShow as Ht, Fragment as Bt, resolveComponent as Et } from "vue";
|
|
5
|
+
import { isPlainObject as Le, cloneDeep as je } from "lodash-es";
|
|
6
|
+
import Vt from "../button-edit/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { resolveAppearance as Ft, getSchemaByType as Ie } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import Nt from "../tags/index.esm.js";
|
|
10
|
+
import St from "../popover/index.esm.js";
|
|
11
11
|
import { useDesignerComponent as Lt } from "../designer-canvas/index.esm.js";
|
|
12
|
-
import { withInstall as
|
|
13
|
-
|
|
12
|
+
import { withInstall as It } from "../common/index.esm.js";
|
|
13
|
+
import { useResponseLayoutEditorSetting as Yt } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
14
|
+
const Ge = {}, Qe = {};
|
|
14
15
|
function Oe(t) {
|
|
15
|
-
const { properties: n, title: e } = t, r = Object.keys(n).reduce((
|
|
16
|
-
return r.id = `${e}-${Date.now()}
|
|
16
|
+
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((i, s) => ((!o || !r.find((d) => d == s)) && (i[s] = n[s].type === "object" && n[s].properties ? Oe(n[s]) : je(n[s].default)), i), {});
|
|
17
|
+
return (!o || !r.find((i) => i == "id")) && (a.id = `${e}-${Date.now()}`), a;
|
|
17
18
|
}
|
|
18
|
-
function Me(t, n = {}) {
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
let
|
|
22
|
-
const
|
|
23
|
-
return
|
|
19
|
+
function Me(t, n = {}, e) {
|
|
20
|
+
const r = Ge[t];
|
|
21
|
+
if (r) {
|
|
22
|
+
let o = Oe(r);
|
|
23
|
+
const a = Qe[t];
|
|
24
|
+
return o = a ? a({ getSchemaByType: Me }, o, n, e) : o, o;
|
|
24
25
|
}
|
|
25
26
|
return null;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function At(t, n) {
|
|
28
29
|
const e = Oe(n);
|
|
29
|
-
return Object.keys(t).reduce((r, o) => (r[o] &&
|
|
30
|
+
return Object.keys(t).reduce((r, o) => (r[o] && Le(r[o]) && Le(t[o]) ? Object.assign(r[o], t[o]) : r[o] = t[o], r), e), e;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function qt(t, n) {
|
|
32
33
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
33
34
|
if (n.has(o)) {
|
|
34
35
|
const a = n.get(o);
|
|
35
36
|
if (typeof a == "string")
|
|
36
37
|
r[a] = t[o];
|
|
37
38
|
else {
|
|
38
|
-
const
|
|
39
|
-
Object.assign(r,
|
|
39
|
+
const i = a(o, t[o], t);
|
|
40
|
+
Object.assign(r, i);
|
|
40
41
|
}
|
|
41
42
|
} else
|
|
42
43
|
r[o] = t[o];
|
|
43
44
|
return r;
|
|
44
45
|
}, {});
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
-
const r =
|
|
48
|
-
return
|
|
47
|
+
function Wt(t, n, e = /* @__PURE__ */ new Map()) {
|
|
48
|
+
const r = At(t, n);
|
|
49
|
+
return qt(r, e);
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
function n(
|
|
52
|
-
if (typeof
|
|
53
|
-
return
|
|
54
|
-
if (typeof
|
|
55
|
-
const m = Object.keys(
|
|
51
|
+
function _t(t = {}) {
|
|
52
|
+
function n(u, f, l, c) {
|
|
53
|
+
if (typeof l == "number")
|
|
54
|
+
return c[u].length === l;
|
|
55
|
+
if (typeof l == "object") {
|
|
56
|
+
const m = Object.keys(l)[0], y = l[m];
|
|
56
57
|
if (m === "not")
|
|
57
|
-
return Number(
|
|
58
|
+
return Number(c[u].length) !== Number(y);
|
|
58
59
|
if (m === "moreThan")
|
|
59
|
-
return Number(
|
|
60
|
+
return Number(c[u].length) >= Number(y);
|
|
60
61
|
if (m === "lessThan")
|
|
61
|
-
return Number(
|
|
62
|
+
return Number(c[u].length) <= Number(y);
|
|
62
63
|
}
|
|
63
64
|
return !1;
|
|
64
65
|
}
|
|
65
|
-
function e(
|
|
66
|
-
return
|
|
66
|
+
function e(u, f, l, c) {
|
|
67
|
+
return c[u] && c[u].propertyValue && String(c[u].propertyValue.value) === String(l);
|
|
67
68
|
}
|
|
68
69
|
const r = /* @__PURE__ */ new Map([
|
|
69
70
|
["length", n],
|
|
70
71
|
["getProperty", e]
|
|
71
72
|
]);
|
|
72
|
-
Object.keys(t).reduce((
|
|
73
|
-
function o(
|
|
74
|
-
const
|
|
75
|
-
return typeof
|
|
76
|
-
if (
|
|
77
|
-
return { target:
|
|
78
|
-
const m =
|
|
79
|
-
return { target:
|
|
73
|
+
Object.keys(t).reduce((u, f) => (u.set(f, t[f]), u), r);
|
|
74
|
+
function o(u, f) {
|
|
75
|
+
const l = u;
|
|
76
|
+
return typeof f == "number" ? [{ target: l, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: l, operator: "getProperty", param: u, value: !!f }] : typeof f == "object" ? Object.keys(f).map((c) => {
|
|
77
|
+
if (c === "length")
|
|
78
|
+
return { target: l, operator: "length", param: null, value: f[c] };
|
|
79
|
+
const m = c, y = f[c];
|
|
80
|
+
return { target: l, operator: "getProperty", param: m, value: y };
|
|
80
81
|
}) : [];
|
|
81
82
|
}
|
|
82
|
-
function a(
|
|
83
|
-
return Object.keys(
|
|
84
|
-
const m = o(
|
|
85
|
-
return
|
|
83
|
+
function a(u) {
|
|
84
|
+
return Object.keys(u).reduce((l, c) => {
|
|
85
|
+
const m = o(c, u[c]);
|
|
86
|
+
return l.push(...m), l;
|
|
86
87
|
}, []);
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
if (r.has(
|
|
90
|
-
const
|
|
91
|
-
return
|
|
89
|
+
function i(u, f) {
|
|
90
|
+
if (r.has(u.operator)) {
|
|
91
|
+
const l = r.get(u.operator);
|
|
92
|
+
return l && l(u.target, u.param, u.value, f) || !1;
|
|
92
93
|
}
|
|
93
94
|
return !1;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
return a(
|
|
96
|
+
function s(u, f) {
|
|
97
|
+
return a(u).reduce((m, y) => m && i(y, f), !0);
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
-
const
|
|
100
|
-
return
|
|
99
|
+
function d(u, f) {
|
|
100
|
+
const l = Object.keys(u), c = l.includes("allOf"), m = l.includes("anyOf"), y = c || m, W = (y ? u[y ? c ? "allOf" : "anyOf" : "allOf"] : [u]).map((w) => s(w, f));
|
|
101
|
+
return c ? !W.includes(!1) : W.includes(!0);
|
|
101
102
|
}
|
|
102
|
-
return { parseValueSchema:
|
|
103
|
+
return { parseValueSchema: d };
|
|
103
104
|
}
|
|
104
|
-
const
|
|
105
|
+
const C = {
|
|
105
106
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
106
107
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
107
108
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -138,21 +139,22 @@ const k = {
|
|
|
138
139
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
139
140
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
140
141
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
141
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
142
|
-
|
|
143
|
-
$t
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
143
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
144
|
+
}, Rt = {}, $t = {};
|
|
145
|
+
_t();
|
|
146
|
+
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i, s, d) => s, o = {}, a = (i) => i) {
|
|
147
|
+
return Ge[n.title] = n, Qe[n.title] = r, Rt[n.title] = o, $t[n.title] = a, (i = {}) => {
|
|
148
|
+
const s = Wt(i, n, e), d = Object.keys(t).reduce((u, f) => (u[f] = t[f].default, u), {});
|
|
149
|
+
return Object.assign(d, s);
|
|
148
150
|
};
|
|
149
151
|
}
|
|
150
|
-
function
|
|
152
|
+
function jt(t, n) {
|
|
151
153
|
return { customClass: n.class, customStyle: n.style };
|
|
152
154
|
}
|
|
153
|
-
const
|
|
154
|
-
["appearance",
|
|
155
|
-
]),
|
|
155
|
+
const Gt = /* @__PURE__ */ new Map([
|
|
156
|
+
["appearance", jt]
|
|
157
|
+
]), Qt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/time-picker.schema.json", Xt = "time-picker", zt = "A Farris Input Component", Jt = "object", Zt = {
|
|
156
158
|
id: {
|
|
157
159
|
description: "The unique identifier for a time picker",
|
|
158
160
|
type: "string"
|
|
@@ -180,7 +182,7 @@ const Ut = /* @__PURE__ */ new Map([
|
|
|
180
182
|
type: "object",
|
|
181
183
|
default: {}
|
|
182
184
|
},
|
|
183
|
-
|
|
185
|
+
disabled: {
|
|
184
186
|
type: "string",
|
|
185
187
|
default: !1
|
|
186
188
|
},
|
|
@@ -229,19 +231,24 @@ const Ut = /* @__PURE__ */ new Map([
|
|
|
229
231
|
type: "boolean",
|
|
230
232
|
default: !1
|
|
231
233
|
}
|
|
232
|
-
},
|
|
234
|
+
}, Kt = [
|
|
233
235
|
"id",
|
|
234
236
|
"type"
|
|
235
|
-
],
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
], en = [
|
|
238
|
+
"id",
|
|
239
|
+
"appearance",
|
|
240
|
+
"binding"
|
|
241
|
+
], tn = {
|
|
242
|
+
$schema: Qt,
|
|
243
|
+
$id: Ut,
|
|
244
|
+
title: Xt,
|
|
245
|
+
description: zt,
|
|
246
|
+
type: Jt,
|
|
247
|
+
properties: Zt,
|
|
248
|
+
required: Kt,
|
|
249
|
+
ignore: en
|
|
243
250
|
};
|
|
244
|
-
function
|
|
251
|
+
function nn(t, n, e) {
|
|
245
252
|
return n;
|
|
246
253
|
}
|
|
247
254
|
const De = {
|
|
@@ -269,10 +276,10 @@ const De = {
|
|
|
269
276
|
* 是否隐藏禁用的元素
|
|
270
277
|
*/
|
|
271
278
|
hideDisabledElements: { type: Boolean, default: !1 },
|
|
272
|
-
|
|
279
|
+
disabled: { type: Boolean, default: !1 },
|
|
273
280
|
readonly: { type: Boolean, default: !1 },
|
|
274
281
|
editable: { type: Boolean, default: !0 }
|
|
275
|
-
},
|
|
282
|
+
}, Xe = Ue(De, tn, Gt, nn), rn = {
|
|
276
283
|
modelValue: {
|
|
277
284
|
type: String,
|
|
278
285
|
default: ""
|
|
@@ -326,44 +333,44 @@ const De = {
|
|
|
326
333
|
default: !1
|
|
327
334
|
}
|
|
328
335
|
};
|
|
329
|
-
function
|
|
336
|
+
function q(t) {
|
|
330
337
|
const n = Object.prototype.toString.call(t);
|
|
331
338
|
return t instanceof Date || typeof t == "object" && n === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || n === "[object Number]" || typeof t == "string" || n === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
332
339
|
}
|
|
333
|
-
function
|
|
340
|
+
function L(t, n) {
|
|
334
341
|
return t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
335
342
|
}
|
|
336
|
-
function
|
|
337
|
-
const e =
|
|
338
|
-
return isNaN(n) ?
|
|
343
|
+
function ze(t, n) {
|
|
344
|
+
const e = q(t);
|
|
345
|
+
return isNaN(n) ? L(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
339
346
|
}
|
|
340
|
-
const
|
|
341
|
-
let
|
|
347
|
+
const Je = 6048e5, on = 864e5, an = 6e4, sn = 36e5, un = 1e3;
|
|
348
|
+
let ln = {};
|
|
342
349
|
function oe() {
|
|
343
|
-
return
|
|
350
|
+
return ln;
|
|
344
351
|
}
|
|
345
352
|
function z(t, n) {
|
|
346
|
-
var
|
|
347
|
-
const e = oe(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((
|
|
348
|
-
return o.setDate(o.getDate() -
|
|
353
|
+
var s, d, u, f;
|
|
354
|
+
const e = oe(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((d = (s = n == null ? void 0 : n.locale) == null ? void 0 : s.options) == null ? void 0 : d.weekStartsOn) ?? e.weekStartsOn ?? ((f = (u = e.locale) == null ? void 0 : u.options) == null ? void 0 : f.weekStartsOn) ?? 0, o = q(t), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
355
|
+
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
349
356
|
}
|
|
350
357
|
function ne(t) {
|
|
351
358
|
return z(t, { weekStartsOn: 1 });
|
|
352
359
|
}
|
|
353
|
-
function
|
|
354
|
-
const n =
|
|
360
|
+
function Ze(t) {
|
|
361
|
+
const n = q(t), e = n.getFullYear(), r = L(t, 0);
|
|
355
362
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
356
|
-
const o = ne(r), a =
|
|
363
|
+
const o = ne(r), a = L(t, 0);
|
|
357
364
|
a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0);
|
|
358
|
-
const
|
|
359
|
-
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >=
|
|
365
|
+
const i = ne(a);
|
|
366
|
+
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1;
|
|
360
367
|
}
|
|
361
|
-
function
|
|
362
|
-
const n =
|
|
368
|
+
function Ye(t) {
|
|
369
|
+
const n = q(t);
|
|
363
370
|
return n.setHours(0, 0, 0, 0), n;
|
|
364
371
|
}
|
|
365
372
|
function he(t) {
|
|
366
|
-
const n =
|
|
373
|
+
const n = q(t), e = new Date(
|
|
367
374
|
Date.UTC(
|
|
368
375
|
n.getFullYear(),
|
|
369
376
|
n.getMonth(),
|
|
@@ -376,28 +383,28 @@ function he(t) {
|
|
|
376
383
|
);
|
|
377
384
|
return e.setUTCFullYear(n.getFullYear()), +t - +e;
|
|
378
385
|
}
|
|
379
|
-
function
|
|
380
|
-
const e =
|
|
381
|
-
return Math.round((o - a) /
|
|
386
|
+
function cn(t, n) {
|
|
387
|
+
const e = Ye(t), r = Ye(n), o = +e - he(e), a = +r - he(r);
|
|
388
|
+
return Math.round((o - a) / on);
|
|
382
389
|
}
|
|
383
|
-
function
|
|
384
|
-
const n =
|
|
390
|
+
function dn(t) {
|
|
391
|
+
const n = Ze(t), e = L(t, 0);
|
|
385
392
|
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), ne(e);
|
|
386
393
|
}
|
|
387
|
-
function
|
|
394
|
+
function fn(t) {
|
|
388
395
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
389
396
|
}
|
|
390
|
-
function
|
|
391
|
-
if (!
|
|
397
|
+
function Ke(t) {
|
|
398
|
+
if (!fn(t) && typeof t != "number")
|
|
392
399
|
return !1;
|
|
393
|
-
const n =
|
|
400
|
+
const n = q(t);
|
|
394
401
|
return !isNaN(Number(n));
|
|
395
402
|
}
|
|
396
|
-
function
|
|
397
|
-
const n =
|
|
403
|
+
function pn(t) {
|
|
404
|
+
const n = q(t), e = L(t, 0);
|
|
398
405
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
399
406
|
}
|
|
400
|
-
const
|
|
407
|
+
const mn = {
|
|
401
408
|
lessThanXSeconds: {
|
|
402
409
|
one: "less than a second",
|
|
403
410
|
other: "less than {{count}} seconds"
|
|
@@ -459,9 +466,9 @@ const yn = {
|
|
|
459
466
|
one: "almost 1 year",
|
|
460
467
|
other: "almost {{count}} years"
|
|
461
468
|
}
|
|
462
|
-
},
|
|
469
|
+
}, hn = (t, n, e) => {
|
|
463
470
|
let r;
|
|
464
|
-
const o =
|
|
471
|
+
const o = mn[t];
|
|
465
472
|
return typeof o == "string" ? r = o : n === 1 ? r = o.one : r = o.other.replace("{{count}}", n.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
466
473
|
};
|
|
467
474
|
function xe(t) {
|
|
@@ -470,58 +477,58 @@ function xe(t) {
|
|
|
470
477
|
return t.formats[e] || t.formats[t.defaultWidth];
|
|
471
478
|
};
|
|
472
479
|
}
|
|
473
|
-
const
|
|
480
|
+
const yn = {
|
|
474
481
|
full: "EEEE, MMMM do, y",
|
|
475
482
|
long: "MMMM do, y",
|
|
476
483
|
medium: "MMM d, y",
|
|
477
484
|
short: "MM/dd/yyyy"
|
|
478
|
-
},
|
|
485
|
+
}, gn = {
|
|
479
486
|
full: "h:mm:ss a zzzz",
|
|
480
487
|
long: "h:mm:ss a z",
|
|
481
488
|
medium: "h:mm:ss a",
|
|
482
489
|
short: "h:mm a"
|
|
483
|
-
},
|
|
490
|
+
}, bn = {
|
|
484
491
|
full: "{{date}} 'at' {{time}}",
|
|
485
492
|
long: "{{date}} 'at' {{time}}",
|
|
486
493
|
medium: "{{date}}, {{time}}",
|
|
487
494
|
short: "{{date}}, {{time}}"
|
|
488
|
-
},
|
|
495
|
+
}, wn = {
|
|
489
496
|
date: xe({
|
|
490
|
-
formats:
|
|
497
|
+
formats: yn,
|
|
491
498
|
defaultWidth: "full"
|
|
492
499
|
}),
|
|
493
500
|
time: xe({
|
|
494
|
-
formats:
|
|
501
|
+
formats: gn,
|
|
495
502
|
defaultWidth: "full"
|
|
496
503
|
}),
|
|
497
504
|
dateTime: xe({
|
|
498
|
-
formats:
|
|
505
|
+
formats: bn,
|
|
499
506
|
defaultWidth: "full"
|
|
500
507
|
})
|
|
501
|
-
},
|
|
508
|
+
}, vn = {
|
|
502
509
|
lastWeek: "'last' eeee 'at' p",
|
|
503
510
|
yesterday: "'yesterday at' p",
|
|
504
511
|
today: "'today at' p",
|
|
505
512
|
tomorrow: "'tomorrow at' p",
|
|
506
513
|
nextWeek: "eeee 'at' p",
|
|
507
514
|
other: "P"
|
|
508
|
-
},
|
|
515
|
+
}, xn = (t, n, e, r) => vn[t];
|
|
509
516
|
function le(t) {
|
|
510
517
|
return (n, e) => {
|
|
511
518
|
const r = e != null && e.context ? String(e.context) : "standalone";
|
|
512
519
|
let o;
|
|
513
520
|
if (r === "formatting" && t.formattingValues) {
|
|
514
|
-
const
|
|
515
|
-
o = t.formattingValues[
|
|
521
|
+
const i = t.defaultFormattingWidth || t.defaultWidth, s = e != null && e.width ? String(e.width) : i;
|
|
522
|
+
o = t.formattingValues[s] || t.formattingValues[i];
|
|
516
523
|
} else {
|
|
517
|
-
const
|
|
518
|
-
o = t.values[
|
|
524
|
+
const i = t.defaultWidth, s = e != null && e.width ? String(e.width) : t.defaultWidth;
|
|
525
|
+
o = t.values[s] || t.values[i];
|
|
519
526
|
}
|
|
520
527
|
const a = t.argumentCallback ? t.argumentCallback(n) : n;
|
|
521
528
|
return o[a];
|
|
522
529
|
};
|
|
523
530
|
}
|
|
524
|
-
const
|
|
531
|
+
const Mn = {
|
|
525
532
|
narrow: ["B", "A"],
|
|
526
533
|
abbreviated: ["BC", "AD"],
|
|
527
534
|
wide: ["Before Christ", "Anno Domini"]
|
|
@@ -529,7 +536,7 @@ const kn = {
|
|
|
529
536
|
narrow: ["1", "2", "3", "4"],
|
|
530
537
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
531
538
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
532
|
-
},
|
|
539
|
+
}, kn = {
|
|
533
540
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
534
541
|
abbreviated: [
|
|
535
542
|
"Jan",
|
|
@@ -559,7 +566,7 @@ const kn = {
|
|
|
559
566
|
"November",
|
|
560
567
|
"December"
|
|
561
568
|
]
|
|
562
|
-
},
|
|
569
|
+
}, Tn = {
|
|
563
570
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
564
571
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
565
572
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -572,7 +579,7 @@ const kn = {
|
|
|
572
579
|
"Friday",
|
|
573
580
|
"Saturday"
|
|
574
581
|
]
|
|
575
|
-
},
|
|
582
|
+
}, Pn = {
|
|
576
583
|
narrow: {
|
|
577
584
|
am: "a",
|
|
578
585
|
pm: "p",
|
|
@@ -603,7 +610,7 @@ const kn = {
|
|
|
603
610
|
evening: "evening",
|
|
604
611
|
night: "night"
|
|
605
612
|
}
|
|
606
|
-
},
|
|
613
|
+
}, On = {
|
|
607
614
|
narrow: {
|
|
608
615
|
am: "a",
|
|
609
616
|
pm: "p",
|
|
@@ -634,7 +641,7 @@ const kn = {
|
|
|
634
641
|
evening: "in the evening",
|
|
635
642
|
night: "at night"
|
|
636
643
|
}
|
|
637
|
-
},
|
|
644
|
+
}, Dn = (t, n) => {
|
|
638
645
|
const e = Number(t), r = e % 100;
|
|
639
646
|
if (r > 20 || r < 10)
|
|
640
647
|
switch (r % 10) {
|
|
@@ -646,10 +653,10 @@ const kn = {
|
|
|
646
653
|
return e + "rd";
|
|
647
654
|
}
|
|
648
655
|
return e + "th";
|
|
649
|
-
},
|
|
650
|
-
ordinalNumber:
|
|
656
|
+
}, Hn = {
|
|
657
|
+
ordinalNumber: Dn,
|
|
651
658
|
era: le({
|
|
652
|
-
values:
|
|
659
|
+
values: Mn,
|
|
653
660
|
defaultWidth: "wide"
|
|
654
661
|
}),
|
|
655
662
|
quarter: le({
|
|
@@ -658,17 +665,17 @@ const kn = {
|
|
|
658
665
|
argumentCallback: (t) => t - 1
|
|
659
666
|
}),
|
|
660
667
|
month: le({
|
|
661
|
-
values:
|
|
668
|
+
values: kn,
|
|
662
669
|
defaultWidth: "wide"
|
|
663
670
|
}),
|
|
664
671
|
day: le({
|
|
665
|
-
values:
|
|
672
|
+
values: Tn,
|
|
666
673
|
defaultWidth: "wide"
|
|
667
674
|
}),
|
|
668
675
|
dayPeriod: le({
|
|
669
|
-
values:
|
|
676
|
+
values: Pn,
|
|
670
677
|
defaultWidth: "wide",
|
|
671
|
-
formattingValues:
|
|
678
|
+
formattingValues: On,
|
|
672
679
|
defaultFormattingWidth: "wide"
|
|
673
680
|
})
|
|
674
681
|
};
|
|
@@ -677,58 +684,58 @@ function ce(t) {
|
|
|
677
684
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
678
685
|
if (!a)
|
|
679
686
|
return null;
|
|
680
|
-
const
|
|
687
|
+
const i = a[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(s) ? En(s, (l) => l.test(i)) : (
|
|
681
688
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
682
|
-
|
|
689
|
+
Bn(s, (l) => l.test(i))
|
|
683
690
|
);
|
|
684
|
-
let
|
|
685
|
-
|
|
691
|
+
let u;
|
|
692
|
+
u = t.valueCallback ? t.valueCallback(d) : d, u = e.valueCallback ? (
|
|
686
693
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
687
|
-
e.valueCallback(
|
|
688
|
-
) :
|
|
689
|
-
const
|
|
690
|
-
return { value:
|
|
694
|
+
e.valueCallback(u)
|
|
695
|
+
) : u;
|
|
696
|
+
const f = n.slice(i.length);
|
|
697
|
+
return { value: u, rest: f };
|
|
691
698
|
};
|
|
692
699
|
}
|
|
693
|
-
function
|
|
700
|
+
function Bn(t, n) {
|
|
694
701
|
for (const e in t)
|
|
695
702
|
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
696
703
|
return e;
|
|
697
704
|
}
|
|
698
|
-
function
|
|
705
|
+
function En(t, n) {
|
|
699
706
|
for (let e = 0; e < t.length; e++)
|
|
700
707
|
if (n(t[e]))
|
|
701
708
|
return e;
|
|
702
709
|
}
|
|
703
|
-
function
|
|
710
|
+
function Vn(t) {
|
|
704
711
|
return (n, e = {}) => {
|
|
705
712
|
const r = n.match(t.matchPattern);
|
|
706
713
|
if (!r) return null;
|
|
707
714
|
const o = r[0], a = n.match(t.parsePattern);
|
|
708
715
|
if (!a) return null;
|
|
709
|
-
let
|
|
710
|
-
|
|
711
|
-
const
|
|
712
|
-
return { value:
|
|
716
|
+
let i = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
717
|
+
i = e.valueCallback ? e.valueCallback(i) : i;
|
|
718
|
+
const s = n.slice(o.length);
|
|
719
|
+
return { value: i, rest: s };
|
|
713
720
|
};
|
|
714
721
|
}
|
|
715
|
-
const
|
|
722
|
+
const Fn = /^(\d+)(th|st|nd|rd)?/i, Nn = /\d+/i, Sn = {
|
|
716
723
|
narrow: /^(b|a)/i,
|
|
717
724
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
718
725
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
719
|
-
},
|
|
726
|
+
}, Ln = {
|
|
720
727
|
any: [/^b/i, /^(a|c)/i]
|
|
721
|
-
},
|
|
728
|
+
}, In = {
|
|
722
729
|
narrow: /^[1234]/i,
|
|
723
730
|
abbreviated: /^q[1234]/i,
|
|
724
731
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
725
|
-
},
|
|
732
|
+
}, Yn = {
|
|
726
733
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
727
|
-
},
|
|
734
|
+
}, An = {
|
|
728
735
|
narrow: /^[jfmasond]/i,
|
|
729
736
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
730
737
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
731
|
-
},
|
|
738
|
+
}, qn = {
|
|
732
739
|
narrow: [
|
|
733
740
|
/^j/i,
|
|
734
741
|
/^f/i,
|
|
@@ -757,18 +764,18 @@ const Sn = /^(\d+)(th|st|nd|rd)?/i, Yn = /\d+/i, Wn = {
|
|
|
757
764
|
/^n/i,
|
|
758
765
|
/^d/i
|
|
759
766
|
]
|
|
760
|
-
},
|
|
767
|
+
}, Wn = {
|
|
761
768
|
narrow: /^[smtwf]/i,
|
|
762
769
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
763
770
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
764
771
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
765
|
-
},
|
|
772
|
+
}, _n = {
|
|
766
773
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
767
774
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
768
|
-
},
|
|
775
|
+
}, Rn = {
|
|
769
776
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
770
777
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
771
|
-
},
|
|
778
|
+
}, $n = {
|
|
772
779
|
any: {
|
|
773
780
|
am: /^a/i,
|
|
774
781
|
pm: /^p/i,
|
|
@@ -779,86 +786,86 @@ const Sn = /^(\d+)(th|st|nd|rd)?/i, Yn = /\d+/i, Wn = {
|
|
|
779
786
|
evening: /evening/i,
|
|
780
787
|
night: /night/i
|
|
781
788
|
}
|
|
782
|
-
},
|
|
783
|
-
ordinalNumber:
|
|
784
|
-
matchPattern:
|
|
785
|
-
parsePattern:
|
|
789
|
+
}, jn = {
|
|
790
|
+
ordinalNumber: Vn({
|
|
791
|
+
matchPattern: Fn,
|
|
792
|
+
parsePattern: Nn,
|
|
786
793
|
valueCallback: (t) => parseInt(t, 10)
|
|
787
794
|
}),
|
|
788
795
|
era: ce({
|
|
789
|
-
matchPatterns:
|
|
796
|
+
matchPatterns: Sn,
|
|
790
797
|
defaultMatchWidth: "wide",
|
|
791
|
-
parsePatterns:
|
|
798
|
+
parsePatterns: Ln,
|
|
792
799
|
defaultParseWidth: "any"
|
|
793
800
|
}),
|
|
794
801
|
quarter: ce({
|
|
795
|
-
matchPatterns:
|
|
802
|
+
matchPatterns: In,
|
|
796
803
|
defaultMatchWidth: "wide",
|
|
797
|
-
parsePatterns:
|
|
804
|
+
parsePatterns: Yn,
|
|
798
805
|
defaultParseWidth: "any",
|
|
799
806
|
valueCallback: (t) => t + 1
|
|
800
807
|
}),
|
|
801
808
|
month: ce({
|
|
802
|
-
matchPatterns:
|
|
809
|
+
matchPatterns: An,
|
|
803
810
|
defaultMatchWidth: "wide",
|
|
804
|
-
parsePatterns:
|
|
811
|
+
parsePatterns: qn,
|
|
805
812
|
defaultParseWidth: "any"
|
|
806
813
|
}),
|
|
807
814
|
day: ce({
|
|
808
|
-
matchPatterns:
|
|
815
|
+
matchPatterns: Wn,
|
|
809
816
|
defaultMatchWidth: "wide",
|
|
810
|
-
parsePatterns:
|
|
817
|
+
parsePatterns: _n,
|
|
811
818
|
defaultParseWidth: "any"
|
|
812
819
|
}),
|
|
813
820
|
dayPeriod: ce({
|
|
814
|
-
matchPatterns:
|
|
821
|
+
matchPatterns: Rn,
|
|
815
822
|
defaultMatchWidth: "any",
|
|
816
|
-
parsePatterns:
|
|
823
|
+
parsePatterns: $n,
|
|
817
824
|
defaultParseWidth: "any"
|
|
818
825
|
})
|
|
819
|
-
},
|
|
826
|
+
}, et = {
|
|
820
827
|
code: "en-US",
|
|
821
|
-
formatDistance:
|
|
822
|
-
formatLong:
|
|
823
|
-
formatRelative:
|
|
824
|
-
localize:
|
|
825
|
-
match:
|
|
828
|
+
formatDistance: hn,
|
|
829
|
+
formatLong: wn,
|
|
830
|
+
formatRelative: xn,
|
|
831
|
+
localize: Hn,
|
|
832
|
+
match: jn,
|
|
826
833
|
options: {
|
|
827
834
|
weekStartsOn: 0,
|
|
828
835
|
firstWeekContainsDate: 1
|
|
829
836
|
}
|
|
830
837
|
};
|
|
831
|
-
function
|
|
832
|
-
const n =
|
|
833
|
-
return
|
|
838
|
+
function Gn(t) {
|
|
839
|
+
const n = q(t);
|
|
840
|
+
return cn(n, pn(n)) + 1;
|
|
834
841
|
}
|
|
835
|
-
function
|
|
836
|
-
const n =
|
|
837
|
-
return Math.round(e /
|
|
842
|
+
function tt(t) {
|
|
843
|
+
const n = q(t), e = +ne(n) - +dn(n);
|
|
844
|
+
return Math.round(e / Je) + 1;
|
|
838
845
|
}
|
|
839
846
|
function He(t, n) {
|
|
840
|
-
var
|
|
841
|
-
const e =
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
const
|
|
846
|
-
return e.getTime() >=
|
|
847
|
+
var f, l, c, m;
|
|
848
|
+
const e = q(t), r = e.getFullYear(), o = oe(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((l = (f = n == null ? void 0 : n.locale) == null ? void 0 : f.options) == null ? void 0 : l.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (c = o.locale) == null ? void 0 : c.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = L(t, 0);
|
|
849
|
+
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
850
|
+
const s = z(i, n), d = L(t, 0);
|
|
851
|
+
d.setFullYear(r, 0, a), d.setHours(0, 0, 0, 0);
|
|
852
|
+
const u = z(d, n);
|
|
853
|
+
return e.getTime() >= s.getTime() ? r + 1 : e.getTime() >= u.getTime() ? r : r - 1;
|
|
847
854
|
}
|
|
848
|
-
function
|
|
849
|
-
var
|
|
850
|
-
const e = oe(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((
|
|
855
|
+
function Qn(t, n) {
|
|
856
|
+
var s, d, u, f;
|
|
857
|
+
const e = oe(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((d = (s = n == null ? void 0 : n.locale) == null ? void 0 : s.options) == null ? void 0 : d.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((f = (u = e.locale) == null ? void 0 : u.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, o = He(t, n), a = L(t, 0);
|
|
851
858
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), z(a, n);
|
|
852
859
|
}
|
|
853
|
-
function
|
|
854
|
-
const e =
|
|
855
|
-
return Math.round(r /
|
|
860
|
+
function nt(t, n) {
|
|
861
|
+
const e = q(t), r = +z(e, n) - +Qn(e, n);
|
|
862
|
+
return Math.round(r / Je) + 1;
|
|
856
863
|
}
|
|
857
864
|
function O(t, n) {
|
|
858
865
|
const e = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(n, "0");
|
|
859
866
|
return e + r;
|
|
860
867
|
}
|
|
861
|
-
const
|
|
868
|
+
const X = {
|
|
862
869
|
// Year
|
|
863
870
|
y(t, n) {
|
|
864
871
|
const e = t.getFullYear(), r = e > 0 ? e : 1 - e;
|
|
@@ -921,7 +928,7 @@ const U = {
|
|
|
921
928
|
afternoon: "afternoon",
|
|
922
929
|
evening: "evening",
|
|
923
930
|
night: "night"
|
|
924
|
-
},
|
|
931
|
+
}, Ae = {
|
|
925
932
|
// Era
|
|
926
933
|
G: function(t, n, e) {
|
|
927
934
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -943,20 +950,20 @@ const U = {
|
|
|
943
950
|
const r = t.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
944
951
|
return e.ordinalNumber(o, { unit: "year" });
|
|
945
952
|
}
|
|
946
|
-
return
|
|
953
|
+
return X.y(t, n);
|
|
947
954
|
},
|
|
948
955
|
// Local week-numbering year
|
|
949
956
|
Y: function(t, n, e, r) {
|
|
950
957
|
const o = He(t, r), a = o > 0 ? o : 1 - o;
|
|
951
958
|
if (n === "YY") {
|
|
952
|
-
const
|
|
953
|
-
return O(
|
|
959
|
+
const i = a % 100;
|
|
960
|
+
return O(i, 2);
|
|
954
961
|
}
|
|
955
962
|
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : O(a, n.length);
|
|
956
963
|
},
|
|
957
964
|
// ISO week-numbering year
|
|
958
965
|
R: function(t, n) {
|
|
959
|
-
const e =
|
|
966
|
+
const e = Ze(t);
|
|
960
967
|
return O(e, n.length);
|
|
961
968
|
},
|
|
962
969
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1034,7 +1041,7 @@ const U = {
|
|
|
1034
1041
|
switch (n) {
|
|
1035
1042
|
case "M":
|
|
1036
1043
|
case "MM":
|
|
1037
|
-
return
|
|
1044
|
+
return X.M(t, n);
|
|
1038
1045
|
case "Mo":
|
|
1039
1046
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1040
1047
|
case "MMM":
|
|
@@ -1079,21 +1086,21 @@ const U = {
|
|
|
1079
1086
|
},
|
|
1080
1087
|
// Local week of year
|
|
1081
1088
|
w: function(t, n, e, r) {
|
|
1082
|
-
const o =
|
|
1089
|
+
const o = nt(t, r);
|
|
1083
1090
|
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) : O(o, n.length);
|
|
1084
1091
|
},
|
|
1085
1092
|
// ISO week of year
|
|
1086
1093
|
I: function(t, n, e) {
|
|
1087
|
-
const r =
|
|
1094
|
+
const r = tt(t);
|
|
1088
1095
|
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) : O(r, n.length);
|
|
1089
1096
|
},
|
|
1090
1097
|
// Day of the month
|
|
1091
1098
|
d: function(t, n, e) {
|
|
1092
|
-
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1099
|
+
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : X.d(t, n);
|
|
1093
1100
|
},
|
|
1094
1101
|
// Day of year
|
|
1095
1102
|
D: function(t, n, e) {
|
|
1096
|
-
const r =
|
|
1103
|
+
const r = Gn(t);
|
|
1097
1104
|
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : O(r, n.length);
|
|
1098
1105
|
},
|
|
1099
1106
|
// Day of week
|
|
@@ -1312,11 +1319,11 @@ const U = {
|
|
|
1312
1319
|
let r = t.getHours() % 12;
|
|
1313
1320
|
return r === 0 && (r = 12), e.ordinalNumber(r, { unit: "hour" });
|
|
1314
1321
|
}
|
|
1315
|
-
return
|
|
1322
|
+
return X.h(t, n);
|
|
1316
1323
|
},
|
|
1317
1324
|
// Hour [0-23]
|
|
1318
1325
|
H: function(t, n, e) {
|
|
1319
|
-
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1326
|
+
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : X.H(t, n);
|
|
1320
1327
|
},
|
|
1321
1328
|
// Hour [0-11]
|
|
1322
1329
|
K: function(t, n, e) {
|
|
@@ -1330,15 +1337,15 @@ const U = {
|
|
|
1330
1337
|
},
|
|
1331
1338
|
// Minute
|
|
1332
1339
|
m: function(t, n, e) {
|
|
1333
|
-
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1340
|
+
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : X.m(t, n);
|
|
1334
1341
|
},
|
|
1335
1342
|
// Second
|
|
1336
1343
|
s: function(t, n, e) {
|
|
1337
|
-
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1344
|
+
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : X.s(t, n);
|
|
1338
1345
|
},
|
|
1339
1346
|
// Fraction of second
|
|
1340
1347
|
S: function(t, n) {
|
|
1341
|
-
return
|
|
1348
|
+
return X.S(t, n);
|
|
1342
1349
|
},
|
|
1343
1350
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1344
1351
|
X: function(t, n, e) {
|
|
@@ -1347,7 +1354,7 @@ const U = {
|
|
|
1347
1354
|
return "Z";
|
|
1348
1355
|
switch (n) {
|
|
1349
1356
|
case "X":
|
|
1350
|
-
return
|
|
1357
|
+
return We(r);
|
|
1351
1358
|
case "XXXX":
|
|
1352
1359
|
case "XX":
|
|
1353
1360
|
return J(r);
|
|
@@ -1362,7 +1369,7 @@ const U = {
|
|
|
1362
1369
|
const r = t.getTimezoneOffset();
|
|
1363
1370
|
switch (n) {
|
|
1364
1371
|
case "x":
|
|
1365
|
-
return
|
|
1372
|
+
return We(r);
|
|
1366
1373
|
case "xxxx":
|
|
1367
1374
|
case "xx":
|
|
1368
1375
|
return J(r);
|
|
@@ -1379,7 +1386,7 @@ const U = {
|
|
|
1379
1386
|
case "O":
|
|
1380
1387
|
case "OO":
|
|
1381
1388
|
case "OOO":
|
|
1382
|
-
return "GMT" +
|
|
1389
|
+
return "GMT" + qe(r, ":");
|
|
1383
1390
|
case "OOOO":
|
|
1384
1391
|
default:
|
|
1385
1392
|
return "GMT" + J(r, ":");
|
|
@@ -1392,7 +1399,7 @@ const U = {
|
|
|
1392
1399
|
case "z":
|
|
1393
1400
|
case "zz":
|
|
1394
1401
|
case "zzz":
|
|
1395
|
-
return "GMT" +
|
|
1402
|
+
return "GMT" + qe(r, ":");
|
|
1396
1403
|
case "zzzz":
|
|
1397
1404
|
default:
|
|
1398
1405
|
return "GMT" + J(r, ":");
|
|
@@ -1409,11 +1416,11 @@ const U = {
|
|
|
1409
1416
|
return O(r, n.length);
|
|
1410
1417
|
}
|
|
1411
1418
|
};
|
|
1412
|
-
function
|
|
1419
|
+
function qe(t, n = "") {
|
|
1413
1420
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1414
1421
|
return a === 0 ? e + String(o) : e + String(o) + n + O(a, 2);
|
|
1415
1422
|
}
|
|
1416
|
-
function
|
|
1423
|
+
function We(t, n) {
|
|
1417
1424
|
return t % 60 === 0 ? (t > 0 ? "-" : "+") + O(Math.abs(t) / 60, 2) : J(t, n);
|
|
1418
1425
|
}
|
|
1419
1426
|
function J(t, n = "") {
|
|
@@ -1432,7 +1439,7 @@ const _e = (t, n) => {
|
|
|
1432
1439
|
default:
|
|
1433
1440
|
return n.date({ width: "full" });
|
|
1434
1441
|
}
|
|
1435
|
-
},
|
|
1442
|
+
}, rt = (t, n) => {
|
|
1436
1443
|
switch (t) {
|
|
1437
1444
|
case "p":
|
|
1438
1445
|
return n.time({ width: "short" });
|
|
@@ -1444,7 +1451,7 @@ const _e = (t, n) => {
|
|
|
1444
1451
|
default:
|
|
1445
1452
|
return n.time({ width: "full" });
|
|
1446
1453
|
}
|
|
1447
|
-
},
|
|
1454
|
+
}, Un = (t, n) => {
|
|
1448
1455
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1449
1456
|
if (!o)
|
|
1450
1457
|
return _e(t, n);
|
|
@@ -1464,79 +1471,79 @@ const _e = (t, n) => {
|
|
|
1464
1471
|
a = n.dateTime({ width: "full" });
|
|
1465
1472
|
break;
|
|
1466
1473
|
}
|
|
1467
|
-
return a.replace("{{date}}", _e(r, n)).replace("{{time}}",
|
|
1468
|
-
},
|
|
1469
|
-
p:
|
|
1470
|
-
P:
|
|
1471
|
-
},
|
|
1472
|
-
function
|
|
1473
|
-
return
|
|
1474
|
+
return a.replace("{{date}}", _e(r, n)).replace("{{time}}", rt(o, n));
|
|
1475
|
+
}, Ce = {
|
|
1476
|
+
p: rt,
|
|
1477
|
+
P: Un
|
|
1478
|
+
}, Xn = /^D+$/, zn = /^Y+$/, Jn = ["D", "DD", "YY", "YYYY"];
|
|
1479
|
+
function ot(t) {
|
|
1480
|
+
return Xn.test(t);
|
|
1474
1481
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return
|
|
1482
|
+
function at(t) {
|
|
1483
|
+
return zn.test(t);
|
|
1477
1484
|
}
|
|
1478
1485
|
function ke(t, n, e) {
|
|
1479
|
-
const r =
|
|
1480
|
-
if (console.warn(r),
|
|
1486
|
+
const r = Zn(t, n, e);
|
|
1487
|
+
if (console.warn(r), Jn.includes(t)) throw new RangeError(r);
|
|
1481
1488
|
}
|
|
1482
|
-
function
|
|
1489
|
+
function Zn(t, n, e) {
|
|
1483
1490
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1484
1491
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1485
1492
|
}
|
|
1486
|
-
const
|
|
1487
|
-
function
|
|
1488
|
-
var
|
|
1489
|
-
const r = oe(), o = r.locale ??
|
|
1490
|
-
if (!
|
|
1493
|
+
const Kn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, er = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, tr = /^'([^]*?)'?$/, nr = /''/g, rr = /[a-zA-Z]/;
|
|
1494
|
+
function Re(t, n, e) {
|
|
1495
|
+
var f, l, c, m;
|
|
1496
|
+
const r = oe(), o = r.locale ?? et, a = r.firstWeekContainsDate ?? ((l = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((m = (c = r.locale) == null ? void 0 : c.options) == null ? void 0 : m.weekStartsOn) ?? 0, s = q(t);
|
|
1497
|
+
if (!Ke(s))
|
|
1491
1498
|
throw new RangeError("Invalid time value");
|
|
1492
|
-
let
|
|
1499
|
+
let d = n.match(er).map((y) => {
|
|
1493
1500
|
const M = y[0];
|
|
1494
1501
|
if (M === "p" || M === "P") {
|
|
1495
|
-
const
|
|
1496
|
-
return
|
|
1502
|
+
const E = Ce[M];
|
|
1503
|
+
return E(y, o.formatLong);
|
|
1497
1504
|
}
|
|
1498
1505
|
return y;
|
|
1499
|
-
}).join("").match(
|
|
1506
|
+
}).join("").match(Kn).map((y) => {
|
|
1500
1507
|
if (y === "''")
|
|
1501
1508
|
return { isToken: !1, value: "'" };
|
|
1502
1509
|
const M = y[0];
|
|
1503
1510
|
if (M === "'")
|
|
1504
|
-
return { isToken: !1, value:
|
|
1505
|
-
if (
|
|
1511
|
+
return { isToken: !1, value: or(y) };
|
|
1512
|
+
if (Ae[M])
|
|
1506
1513
|
return { isToken: !0, value: y };
|
|
1507
|
-
if (M.match(
|
|
1514
|
+
if (M.match(rr))
|
|
1508
1515
|
throw new RangeError(
|
|
1509
1516
|
"Format string contains an unescaped latin alphabet character `" + M + "`"
|
|
1510
1517
|
);
|
|
1511
1518
|
return { isToken: !1, value: y };
|
|
1512
1519
|
});
|
|
1513
|
-
o.localize.preprocessor && (
|
|
1514
|
-
const
|
|
1520
|
+
o.localize.preprocessor && (d = o.localize.preprocessor(s, d));
|
|
1521
|
+
const u = {
|
|
1515
1522
|
firstWeekContainsDate: a,
|
|
1516
|
-
weekStartsOn:
|
|
1523
|
+
weekStartsOn: i,
|
|
1517
1524
|
locale: o
|
|
1518
1525
|
};
|
|
1519
|
-
return
|
|
1526
|
+
return d.map((y) => {
|
|
1520
1527
|
if (!y.isToken) return y.value;
|
|
1521
1528
|
const M = y.value;
|
|
1522
|
-
(
|
|
1523
|
-
const
|
|
1524
|
-
return
|
|
1529
|
+
(at(M) || ot(M)) && ke(M, n, String(t));
|
|
1530
|
+
const E = Ae[M[0]];
|
|
1531
|
+
return E(s, M, o.localize, u);
|
|
1525
1532
|
}).join("");
|
|
1526
1533
|
}
|
|
1527
|
-
function
|
|
1528
|
-
const n = t.match(
|
|
1529
|
-
return n ? n[1].replace(
|
|
1534
|
+
function or(t) {
|
|
1535
|
+
const n = t.match(tr);
|
|
1536
|
+
return n ? n[1].replace(nr, "'") : t;
|
|
1530
1537
|
}
|
|
1531
|
-
function
|
|
1538
|
+
function ar() {
|
|
1532
1539
|
return Object.assign({}, oe());
|
|
1533
1540
|
}
|
|
1534
|
-
function
|
|
1535
|
-
let e =
|
|
1541
|
+
function ir(t) {
|
|
1542
|
+
let e = q(t).getDay();
|
|
1536
1543
|
return e === 0 && (e = 7), e;
|
|
1537
1544
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const e = n instanceof Date ?
|
|
1545
|
+
function sr(t, n) {
|
|
1546
|
+
const e = n instanceof Date ? L(n, 0) : new n(0);
|
|
1540
1547
|
return e.setFullYear(
|
|
1541
1548
|
t.getFullYear(),
|
|
1542
1549
|
t.getMonth(),
|
|
@@ -1548,8 +1555,8 @@ function lr(t, n) {
|
|
|
1548
1555
|
t.getMilliseconds()
|
|
1549
1556
|
), e;
|
|
1550
1557
|
}
|
|
1551
|
-
const
|
|
1552
|
-
class
|
|
1558
|
+
const ur = 10;
|
|
1559
|
+
class it {
|
|
1553
1560
|
constructor() {
|
|
1554
1561
|
p(this, "subPriority", 0);
|
|
1555
1562
|
}
|
|
@@ -1557,7 +1564,7 @@ class ot {
|
|
|
1557
1564
|
return !0;
|
|
1558
1565
|
}
|
|
1559
1566
|
}
|
|
1560
|
-
class
|
|
1567
|
+
class lr extends it {
|
|
1561
1568
|
constructor(n, e, r, o, a) {
|
|
1562
1569
|
super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = o, a && (this.subPriority = a);
|
|
1563
1570
|
}
|
|
@@ -1568,21 +1575,21 @@ class dr extends ot {
|
|
|
1568
1575
|
return this.setValue(n, e, this.value, r);
|
|
1569
1576
|
}
|
|
1570
1577
|
}
|
|
1571
|
-
class
|
|
1578
|
+
class cr extends it {
|
|
1572
1579
|
constructor() {
|
|
1573
1580
|
super(...arguments);
|
|
1574
|
-
p(this, "priority",
|
|
1581
|
+
p(this, "priority", ur);
|
|
1575
1582
|
p(this, "subPriority", -1);
|
|
1576
1583
|
}
|
|
1577
1584
|
set(e, r) {
|
|
1578
|
-
return r.timestampIsSet ? e :
|
|
1585
|
+
return r.timestampIsSet ? e : L(e, sr(e, Date));
|
|
1579
1586
|
}
|
|
1580
1587
|
}
|
|
1581
1588
|
class P {
|
|
1582
1589
|
run(n, e, r, o) {
|
|
1583
1590
|
const a = this.parse(n, e, r, o);
|
|
1584
1591
|
return a ? {
|
|
1585
|
-
setter: new
|
|
1592
|
+
setter: new lr(
|
|
1586
1593
|
a.value,
|
|
1587
1594
|
this.validate,
|
|
1588
1595
|
this.set,
|
|
@@ -1596,7 +1603,7 @@ class P {
|
|
|
1596
1603
|
return !0;
|
|
1597
1604
|
}
|
|
1598
1605
|
}
|
|
1599
|
-
class
|
|
1606
|
+
class dr extends P {
|
|
1600
1607
|
constructor() {
|
|
1601
1608
|
super(...arguments);
|
|
1602
1609
|
p(this, "priority", 140);
|
|
@@ -1619,7 +1626,7 @@ class pr extends P {
|
|
|
1619
1626
|
return r.era = o, e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1620
1627
|
}
|
|
1621
1628
|
}
|
|
1622
|
-
const
|
|
1629
|
+
const Y = {
|
|
1623
1630
|
month: /^(1[0-2]|0?\d)/,
|
|
1624
1631
|
// 0 to 12
|
|
1625
1632
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1657,7 +1664,7 @@ const q = {
|
|
|
1657
1664
|
// 0 to 999, -0 to -999
|
|
1658
1665
|
fourDigitsSigned: /^-?\d{1,4}/
|
|
1659
1666
|
// 0 to 9999, -0 to -9999
|
|
1660
|
-
},
|
|
1667
|
+
}, Q = {
|
|
1661
1668
|
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
1662
1669
|
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
1663
1670
|
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
@@ -1670,14 +1677,14 @@ function A(t, n) {
|
|
|
1670
1677
|
rest: t.rest
|
|
1671
1678
|
};
|
|
1672
1679
|
}
|
|
1673
|
-
function
|
|
1680
|
+
function F(t, n) {
|
|
1674
1681
|
const e = n.match(t);
|
|
1675
1682
|
return e ? {
|
|
1676
1683
|
value: parseInt(e[0], 10),
|
|
1677
1684
|
rest: n.slice(e[0].length)
|
|
1678
1685
|
} : null;
|
|
1679
1686
|
}
|
|
1680
|
-
function
|
|
1687
|
+
function U(t, n) {
|
|
1681
1688
|
const e = n.match(t);
|
|
1682
1689
|
if (!e)
|
|
1683
1690
|
return null;
|
|
@@ -1686,41 +1693,41 @@ function X(t, n) {
|
|
|
1686
1693
|
value: 0,
|
|
1687
1694
|
rest: n.slice(1)
|
|
1688
1695
|
};
|
|
1689
|
-
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0,
|
|
1696
|
+
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, i = e[5] ? parseInt(e[5], 10) : 0;
|
|
1690
1697
|
return {
|
|
1691
|
-
value: r * (o *
|
|
1698
|
+
value: r * (o * sn + a * an + i * un),
|
|
1692
1699
|
rest: n.slice(e[0].length)
|
|
1693
1700
|
};
|
|
1694
1701
|
}
|
|
1695
|
-
function
|
|
1696
|
-
return
|
|
1702
|
+
function st(t) {
|
|
1703
|
+
return F(Y.anyDigitsSigned, t);
|
|
1697
1704
|
}
|
|
1698
|
-
function
|
|
1705
|
+
function I(t, n) {
|
|
1699
1706
|
switch (t) {
|
|
1700
1707
|
case 1:
|
|
1701
|
-
return
|
|
1708
|
+
return F(Y.singleDigit, n);
|
|
1702
1709
|
case 2:
|
|
1703
|
-
return
|
|
1710
|
+
return F(Y.twoDigits, n);
|
|
1704
1711
|
case 3:
|
|
1705
|
-
return
|
|
1712
|
+
return F(Y.threeDigits, n);
|
|
1706
1713
|
case 4:
|
|
1707
|
-
return
|
|
1714
|
+
return F(Y.fourDigits, n);
|
|
1708
1715
|
default:
|
|
1709
|
-
return
|
|
1716
|
+
return F(new RegExp("^\\d{1," + t + "}"), n);
|
|
1710
1717
|
}
|
|
1711
1718
|
}
|
|
1712
1719
|
function ye(t, n) {
|
|
1713
1720
|
switch (t) {
|
|
1714
1721
|
case 1:
|
|
1715
|
-
return
|
|
1722
|
+
return F(Y.singleDigitSigned, n);
|
|
1716
1723
|
case 2:
|
|
1717
|
-
return
|
|
1724
|
+
return F(Y.twoDigitsSigned, n);
|
|
1718
1725
|
case 3:
|
|
1719
|
-
return
|
|
1726
|
+
return F(Y.threeDigitsSigned, n);
|
|
1720
1727
|
case 4:
|
|
1721
|
-
return
|
|
1728
|
+
return F(Y.fourDigitsSigned, n);
|
|
1722
1729
|
default:
|
|
1723
|
-
return
|
|
1730
|
+
return F(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1724
1731
|
}
|
|
1725
1732
|
}
|
|
1726
1733
|
function Be(t) {
|
|
@@ -1740,34 +1747,34 @@ function Be(t) {
|
|
|
1740
1747
|
return 0;
|
|
1741
1748
|
}
|
|
1742
1749
|
}
|
|
1743
|
-
function
|
|
1750
|
+
function ut(t, n) {
|
|
1744
1751
|
const e = n > 0, r = e ? n : 1 - n;
|
|
1745
1752
|
let o;
|
|
1746
1753
|
if (r <= 50)
|
|
1747
1754
|
o = t || 100;
|
|
1748
1755
|
else {
|
|
1749
|
-
const a = r + 50,
|
|
1750
|
-
o = t +
|
|
1756
|
+
const a = r + 50, i = Math.trunc(a / 100) * 100, s = t >= a % 100;
|
|
1757
|
+
o = t + i - (s ? 100 : 0);
|
|
1751
1758
|
}
|
|
1752
1759
|
return e ? o : 1 - o;
|
|
1753
1760
|
}
|
|
1754
|
-
function
|
|
1761
|
+
function lt(t) {
|
|
1755
1762
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1756
1763
|
}
|
|
1757
|
-
class
|
|
1764
|
+
class fr extends P {
|
|
1758
1765
|
constructor() {
|
|
1759
1766
|
super(...arguments);
|
|
1760
1767
|
p(this, "priority", 130);
|
|
1761
1768
|
p(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1762
1769
|
}
|
|
1763
1770
|
parse(e, r, o) {
|
|
1764
|
-
const a = (
|
|
1765
|
-
year:
|
|
1771
|
+
const a = (i) => ({
|
|
1772
|
+
year: i,
|
|
1766
1773
|
isTwoDigitYear: r === "yy"
|
|
1767
1774
|
});
|
|
1768
1775
|
switch (r) {
|
|
1769
1776
|
case "y":
|
|
1770
|
-
return A(
|
|
1777
|
+
return A(I(4, e), a);
|
|
1771
1778
|
case "yo":
|
|
1772
1779
|
return A(
|
|
1773
1780
|
o.ordinalNumber(e, {
|
|
@@ -1776,7 +1783,7 @@ class mr extends P {
|
|
|
1776
1783
|
a
|
|
1777
1784
|
);
|
|
1778
1785
|
default:
|
|
1779
|
-
return A(
|
|
1786
|
+
return A(I(r.length, e), a);
|
|
1780
1787
|
}
|
|
1781
1788
|
}
|
|
1782
1789
|
validate(e, r) {
|
|
@@ -1785,17 +1792,17 @@ class mr extends P {
|
|
|
1785
1792
|
set(e, r, o) {
|
|
1786
1793
|
const a = e.getFullYear();
|
|
1787
1794
|
if (o.isTwoDigitYear) {
|
|
1788
|
-
const
|
|
1795
|
+
const s = ut(
|
|
1789
1796
|
o.year,
|
|
1790
1797
|
a
|
|
1791
1798
|
);
|
|
1792
|
-
return e.setFullYear(
|
|
1799
|
+
return e.setFullYear(s, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1793
1800
|
}
|
|
1794
|
-
const
|
|
1795
|
-
return e.setFullYear(
|
|
1801
|
+
const i = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1802
|
+
return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1796
1803
|
}
|
|
1797
1804
|
}
|
|
1798
|
-
class
|
|
1805
|
+
class pr extends P {
|
|
1799
1806
|
constructor() {
|
|
1800
1807
|
super(...arguments);
|
|
1801
1808
|
p(this, "priority", 130);
|
|
@@ -1816,13 +1823,13 @@ class hr extends P {
|
|
|
1816
1823
|
]);
|
|
1817
1824
|
}
|
|
1818
1825
|
parse(e, r, o) {
|
|
1819
|
-
const a = (
|
|
1820
|
-
year:
|
|
1826
|
+
const a = (i) => ({
|
|
1827
|
+
year: i,
|
|
1821
1828
|
isTwoDigitYear: r === "YY"
|
|
1822
1829
|
});
|
|
1823
1830
|
switch (r) {
|
|
1824
1831
|
case "Y":
|
|
1825
|
-
return A(
|
|
1832
|
+
return A(I(4, e), a);
|
|
1826
1833
|
case "Yo":
|
|
1827
1834
|
return A(
|
|
1828
1835
|
o.ordinalNumber(e, {
|
|
@@ -1831,30 +1838,30 @@ class hr extends P {
|
|
|
1831
1838
|
a
|
|
1832
1839
|
);
|
|
1833
1840
|
default:
|
|
1834
|
-
return A(
|
|
1841
|
+
return A(I(r.length, e), a);
|
|
1835
1842
|
}
|
|
1836
1843
|
}
|
|
1837
1844
|
validate(e, r) {
|
|
1838
1845
|
return r.isTwoDigitYear || r.year > 0;
|
|
1839
1846
|
}
|
|
1840
1847
|
set(e, r, o, a) {
|
|
1841
|
-
const
|
|
1848
|
+
const i = He(e, a);
|
|
1842
1849
|
if (o.isTwoDigitYear) {
|
|
1843
|
-
const
|
|
1850
|
+
const d = ut(
|
|
1844
1851
|
o.year,
|
|
1845
|
-
|
|
1852
|
+
i
|
|
1846
1853
|
);
|
|
1847
1854
|
return e.setFullYear(
|
|
1848
|
-
|
|
1855
|
+
d,
|
|
1849
1856
|
0,
|
|
1850
1857
|
a.firstWeekContainsDate
|
|
1851
1858
|
), e.setHours(0, 0, 0, 0), z(e, a);
|
|
1852
1859
|
}
|
|
1853
|
-
const
|
|
1854
|
-
return e.setFullYear(
|
|
1860
|
+
const s = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1861
|
+
return e.setFullYear(s, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), z(e, a);
|
|
1855
1862
|
}
|
|
1856
1863
|
}
|
|
1857
|
-
class
|
|
1864
|
+
class mr extends P {
|
|
1858
1865
|
constructor() {
|
|
1859
1866
|
super(...arguments);
|
|
1860
1867
|
p(this, "priority", 130);
|
|
@@ -1880,11 +1887,11 @@ class yr extends P {
|
|
|
1880
1887
|
return ye(r === "R" ? 4 : r.length, e);
|
|
1881
1888
|
}
|
|
1882
1889
|
set(e, r, o) {
|
|
1883
|
-
const a =
|
|
1890
|
+
const a = L(e, 0);
|
|
1884
1891
|
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), ne(a);
|
|
1885
1892
|
}
|
|
1886
1893
|
}
|
|
1887
|
-
class
|
|
1894
|
+
class hr extends P {
|
|
1888
1895
|
constructor() {
|
|
1889
1896
|
super(...arguments);
|
|
1890
1897
|
p(this, "priority", 130);
|
|
@@ -1897,7 +1904,7 @@ class gr extends P {
|
|
|
1897
1904
|
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1898
1905
|
}
|
|
1899
1906
|
}
|
|
1900
|
-
class
|
|
1907
|
+
class yr extends P {
|
|
1901
1908
|
constructor() {
|
|
1902
1909
|
super(...arguments);
|
|
1903
1910
|
p(this, "priority", 120);
|
|
@@ -1922,7 +1929,7 @@ class br extends P {
|
|
|
1922
1929
|
switch (r) {
|
|
1923
1930
|
case "Q":
|
|
1924
1931
|
case "QQ":
|
|
1925
|
-
return
|
|
1932
|
+
return I(r.length, e);
|
|
1926
1933
|
case "Qo":
|
|
1927
1934
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1928
1935
|
case "QQQ":
|
|
@@ -1959,7 +1966,7 @@ class br extends P {
|
|
|
1959
1966
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1960
1967
|
}
|
|
1961
1968
|
}
|
|
1962
|
-
class
|
|
1969
|
+
class gr extends P {
|
|
1963
1970
|
constructor() {
|
|
1964
1971
|
super(...arguments);
|
|
1965
1972
|
p(this, "priority", 120);
|
|
@@ -1984,7 +1991,7 @@ class wr extends P {
|
|
|
1984
1991
|
switch (r) {
|
|
1985
1992
|
case "q":
|
|
1986
1993
|
case "qq":
|
|
1987
|
-
return
|
|
1994
|
+
return I(r.length, e);
|
|
1988
1995
|
case "qo":
|
|
1989
1996
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1990
1997
|
case "qqq":
|
|
@@ -2021,7 +2028,7 @@ class wr extends P {
|
|
|
2021
2028
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2022
2029
|
}
|
|
2023
2030
|
}
|
|
2024
|
-
class
|
|
2031
|
+
class br extends P {
|
|
2025
2032
|
constructor() {
|
|
2026
2033
|
super(...arguments);
|
|
2027
2034
|
p(this, "incompatibleTokens", [
|
|
@@ -2042,15 +2049,15 @@ class vr extends P {
|
|
|
2042
2049
|
p(this, "priority", 110);
|
|
2043
2050
|
}
|
|
2044
2051
|
parse(e, r, o) {
|
|
2045
|
-
const a = (
|
|
2052
|
+
const a = (i) => i - 1;
|
|
2046
2053
|
switch (r) {
|
|
2047
2054
|
case "M":
|
|
2048
2055
|
return A(
|
|
2049
|
-
|
|
2056
|
+
F(Y.month, e),
|
|
2050
2057
|
a
|
|
2051
2058
|
);
|
|
2052
2059
|
case "MM":
|
|
2053
|
-
return A(
|
|
2060
|
+
return A(I(2, e), a);
|
|
2054
2061
|
case "Mo":
|
|
2055
2062
|
return A(
|
|
2056
2063
|
o.ordinalNumber(e, {
|
|
@@ -2083,7 +2090,7 @@ class vr extends P {
|
|
|
2083
2090
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2084
2091
|
}
|
|
2085
2092
|
}
|
|
2086
|
-
class
|
|
2093
|
+
class wr extends P {
|
|
2087
2094
|
constructor() {
|
|
2088
2095
|
super(...arguments);
|
|
2089
2096
|
p(this, "priority", 110);
|
|
@@ -2104,15 +2111,15 @@ class xr extends P {
|
|
|
2104
2111
|
]);
|
|
2105
2112
|
}
|
|
2106
2113
|
parse(e, r, o) {
|
|
2107
|
-
const a = (
|
|
2114
|
+
const a = (i) => i - 1;
|
|
2108
2115
|
switch (r) {
|
|
2109
2116
|
case "L":
|
|
2110
2117
|
return A(
|
|
2111
|
-
|
|
2118
|
+
F(Y.month, e),
|
|
2112
2119
|
a
|
|
2113
2120
|
);
|
|
2114
2121
|
case "LL":
|
|
2115
|
-
return A(
|
|
2122
|
+
return A(I(2, e), a);
|
|
2116
2123
|
case "Lo":
|
|
2117
2124
|
return A(
|
|
2118
2125
|
o.ordinalNumber(e, {
|
|
@@ -2145,11 +2152,11 @@ class xr extends P {
|
|
|
2145
2152
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2146
2153
|
}
|
|
2147
2154
|
}
|
|
2148
|
-
function
|
|
2149
|
-
const r =
|
|
2155
|
+
function vr(t, n, e) {
|
|
2156
|
+
const r = q(t), o = nt(r, e) - n;
|
|
2150
2157
|
return r.setDate(r.getDate() - o * 7), r;
|
|
2151
2158
|
}
|
|
2152
|
-
class
|
|
2159
|
+
class xr extends P {
|
|
2153
2160
|
constructor() {
|
|
2154
2161
|
super(...arguments);
|
|
2155
2162
|
p(this, "priority", 100);
|
|
@@ -2172,22 +2179,22 @@ class Tr extends P {
|
|
|
2172
2179
|
parse(e, r, o) {
|
|
2173
2180
|
switch (r) {
|
|
2174
2181
|
case "w":
|
|
2175
|
-
return
|
|
2182
|
+
return F(Y.week, e);
|
|
2176
2183
|
case "wo":
|
|
2177
2184
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2178
2185
|
default:
|
|
2179
|
-
return
|
|
2186
|
+
return I(r.length, e);
|
|
2180
2187
|
}
|
|
2181
2188
|
}
|
|
2182
2189
|
validate(e, r) {
|
|
2183
2190
|
return r >= 1 && r <= 53;
|
|
2184
2191
|
}
|
|
2185
2192
|
set(e, r, o, a) {
|
|
2186
|
-
return z(
|
|
2193
|
+
return z(vr(e, o, a), a);
|
|
2187
2194
|
}
|
|
2188
2195
|
}
|
|
2189
|
-
function
|
|
2190
|
-
const e =
|
|
2196
|
+
function Mr(t, n) {
|
|
2197
|
+
const e = q(t), r = tt(e) - n;
|
|
2191
2198
|
return e.setDate(e.getDate() - r * 7), e;
|
|
2192
2199
|
}
|
|
2193
2200
|
class Cr extends P {
|
|
@@ -2214,21 +2221,21 @@ class Cr extends P {
|
|
|
2214
2221
|
parse(e, r, o) {
|
|
2215
2222
|
switch (r) {
|
|
2216
2223
|
case "I":
|
|
2217
|
-
return
|
|
2224
|
+
return F(Y.week, e);
|
|
2218
2225
|
case "Io":
|
|
2219
2226
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2220
2227
|
default:
|
|
2221
|
-
return
|
|
2228
|
+
return I(r.length, e);
|
|
2222
2229
|
}
|
|
2223
2230
|
}
|
|
2224
2231
|
validate(e, r) {
|
|
2225
2232
|
return r >= 1 && r <= 53;
|
|
2226
2233
|
}
|
|
2227
2234
|
set(e, r, o) {
|
|
2228
|
-
return ne(
|
|
2235
|
+
return ne(Mr(e, o));
|
|
2229
2236
|
}
|
|
2230
2237
|
}
|
|
2231
|
-
const
|
|
2238
|
+
const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Tr = [
|
|
2232
2239
|
31,
|
|
2233
2240
|
29,
|
|
2234
2241
|
31,
|
|
@@ -2242,7 +2249,7 @@ const Pr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Or = [
|
|
|
2242
2249
|
30,
|
|
2243
2250
|
31
|
|
2244
2251
|
];
|
|
2245
|
-
class
|
|
2252
|
+
class Pr extends P {
|
|
2246
2253
|
constructor() {
|
|
2247
2254
|
super(...arguments);
|
|
2248
2255
|
p(this, "priority", 90);
|
|
@@ -2265,22 +2272,22 @@ class Dr extends P {
|
|
|
2265
2272
|
parse(e, r, o) {
|
|
2266
2273
|
switch (r) {
|
|
2267
2274
|
case "d":
|
|
2268
|
-
return
|
|
2275
|
+
return F(Y.date, e);
|
|
2269
2276
|
case "do":
|
|
2270
2277
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2271
2278
|
default:
|
|
2272
|
-
return
|
|
2279
|
+
return I(r.length, e);
|
|
2273
2280
|
}
|
|
2274
2281
|
}
|
|
2275
2282
|
validate(e, r) {
|
|
2276
|
-
const o = e.getFullYear(), a =
|
|
2277
|
-
return a ? r >= 1 && r <=
|
|
2283
|
+
const o = e.getFullYear(), a = lt(o), i = e.getMonth();
|
|
2284
|
+
return a ? r >= 1 && r <= Tr[i] : r >= 1 && r <= kr[i];
|
|
2278
2285
|
}
|
|
2279
2286
|
set(e, r, o) {
|
|
2280
2287
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
2281
2288
|
}
|
|
2282
2289
|
}
|
|
2283
|
-
class
|
|
2290
|
+
class Or extends P {
|
|
2284
2291
|
constructor() {
|
|
2285
2292
|
super(...arguments);
|
|
2286
2293
|
p(this, "priority", 90);
|
|
@@ -2307,27 +2314,27 @@ class Hr extends P {
|
|
|
2307
2314
|
switch (r) {
|
|
2308
2315
|
case "D":
|
|
2309
2316
|
case "DD":
|
|
2310
|
-
return
|
|
2317
|
+
return F(Y.dayOfYear, e);
|
|
2311
2318
|
case "Do":
|
|
2312
2319
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2313
2320
|
default:
|
|
2314
|
-
return
|
|
2321
|
+
return I(r.length, e);
|
|
2315
2322
|
}
|
|
2316
2323
|
}
|
|
2317
2324
|
validate(e, r) {
|
|
2318
2325
|
const o = e.getFullYear();
|
|
2319
|
-
return
|
|
2326
|
+
return lt(o) ? r >= 1 && r <= 366 : r >= 1 && r <= 365;
|
|
2320
2327
|
}
|
|
2321
2328
|
set(e, r, o) {
|
|
2322
2329
|
return e.setMonth(0, o), e.setHours(0, 0, 0, 0), e;
|
|
2323
2330
|
}
|
|
2324
2331
|
}
|
|
2325
2332
|
function Ee(t, n, e) {
|
|
2326
|
-
var
|
|
2327
|
-
const r = oe(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((
|
|
2328
|
-
return
|
|
2333
|
+
var l, c, m, y;
|
|
2334
|
+
const r = oe(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (l = e == null ? void 0 : e.locale) == null ? void 0 : l.options) == null ? void 0 : c.weekStartsOn) ?? r.weekStartsOn ?? ((y = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : y.weekStartsOn) ?? 0, a = q(t), i = a.getDay(), d = (n % 7 + 7) % 7, u = 7 - o, f = n < 0 || n > 6 ? n - (i + u) % 7 : (d + u) % 7 - (i + u) % 7;
|
|
2335
|
+
return ze(a, f);
|
|
2329
2336
|
}
|
|
2330
|
-
class
|
|
2337
|
+
class Dr extends P {
|
|
2331
2338
|
constructor() {
|
|
2332
2339
|
super(...arguments);
|
|
2333
2340
|
p(this, "priority", 90);
|
|
@@ -2364,7 +2371,7 @@ class Br extends P {
|
|
|
2364
2371
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2365
2372
|
}
|
|
2366
2373
|
}
|
|
2367
|
-
class
|
|
2374
|
+
class Hr extends P {
|
|
2368
2375
|
constructor() {
|
|
2369
2376
|
super(...arguments);
|
|
2370
2377
|
p(this, "priority", 90);
|
|
@@ -2387,20 +2394,20 @@ class Er extends P {
|
|
|
2387
2394
|
]);
|
|
2388
2395
|
}
|
|
2389
2396
|
parse(e, r, o, a) {
|
|
2390
|
-
const
|
|
2391
|
-
const
|
|
2392
|
-
return (
|
|
2397
|
+
const i = (s) => {
|
|
2398
|
+
const d = Math.floor((s - 1) / 7) * 7;
|
|
2399
|
+
return (s + a.weekStartsOn + 6) % 7 + d;
|
|
2393
2400
|
};
|
|
2394
2401
|
switch (r) {
|
|
2395
2402
|
case "e":
|
|
2396
2403
|
case "ee":
|
|
2397
|
-
return A(
|
|
2404
|
+
return A(I(r.length, e), i);
|
|
2398
2405
|
case "eo":
|
|
2399
2406
|
return A(
|
|
2400
2407
|
o.ordinalNumber(e, {
|
|
2401
2408
|
unit: "day"
|
|
2402
2409
|
}),
|
|
2403
|
-
|
|
2410
|
+
i
|
|
2404
2411
|
);
|
|
2405
2412
|
case "eee":
|
|
2406
2413
|
return o.day(e, {
|
|
@@ -2429,7 +2436,7 @@ class Er extends P {
|
|
|
2429
2436
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2430
2437
|
}
|
|
2431
2438
|
}
|
|
2432
|
-
class
|
|
2439
|
+
class Br extends P {
|
|
2433
2440
|
constructor() {
|
|
2434
2441
|
super(...arguments);
|
|
2435
2442
|
p(this, "priority", 90);
|
|
@@ -2452,20 +2459,20 @@ class Vr extends P {
|
|
|
2452
2459
|
]);
|
|
2453
2460
|
}
|
|
2454
2461
|
parse(e, r, o, a) {
|
|
2455
|
-
const
|
|
2456
|
-
const
|
|
2457
|
-
return (
|
|
2462
|
+
const i = (s) => {
|
|
2463
|
+
const d = Math.floor((s - 1) / 7) * 7;
|
|
2464
|
+
return (s + a.weekStartsOn + 6) % 7 + d;
|
|
2458
2465
|
};
|
|
2459
2466
|
switch (r) {
|
|
2460
2467
|
case "c":
|
|
2461
2468
|
case "cc":
|
|
2462
|
-
return A(
|
|
2469
|
+
return A(I(r.length, e), i);
|
|
2463
2470
|
case "co":
|
|
2464
2471
|
return A(
|
|
2465
2472
|
o.ordinalNumber(e, {
|
|
2466
2473
|
unit: "day"
|
|
2467
2474
|
}),
|
|
2468
|
-
|
|
2475
|
+
i
|
|
2469
2476
|
);
|
|
2470
2477
|
case "ccc":
|
|
2471
2478
|
return o.day(e, {
|
|
@@ -2494,11 +2501,11 @@ class Vr extends P {
|
|
|
2494
2501
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2495
2502
|
}
|
|
2496
2503
|
}
|
|
2497
|
-
function
|
|
2498
|
-
const e =
|
|
2499
|
-
return
|
|
2504
|
+
function Er(t, n) {
|
|
2505
|
+
const e = q(t), r = ir(e), o = n - r;
|
|
2506
|
+
return ze(e, o);
|
|
2500
2507
|
}
|
|
2501
|
-
class
|
|
2508
|
+
class Vr extends P {
|
|
2502
2509
|
constructor() {
|
|
2503
2510
|
super(...arguments);
|
|
2504
2511
|
p(this, "priority", 90);
|
|
@@ -2521,11 +2528,11 @@ class Nr extends P {
|
|
|
2521
2528
|
]);
|
|
2522
2529
|
}
|
|
2523
2530
|
parse(e, r, o) {
|
|
2524
|
-
const a = (
|
|
2531
|
+
const a = (i) => i === 0 ? 7 : i;
|
|
2525
2532
|
switch (r) {
|
|
2526
2533
|
case "i":
|
|
2527
2534
|
case "ii":
|
|
2528
|
-
return
|
|
2535
|
+
return I(r.length, e);
|
|
2529
2536
|
case "io":
|
|
2530
2537
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2531
2538
|
case "iii":
|
|
@@ -2585,10 +2592,10 @@ class Nr extends P {
|
|
|
2585
2592
|
return r >= 1 && r <= 7;
|
|
2586
2593
|
}
|
|
2587
2594
|
set(e, r, o) {
|
|
2588
|
-
return e =
|
|
2595
|
+
return e = Er(e, o), e.setHours(0, 0, 0, 0), e;
|
|
2589
2596
|
}
|
|
2590
2597
|
}
|
|
2591
|
-
class
|
|
2598
|
+
class Fr extends P {
|
|
2592
2599
|
constructor() {
|
|
2593
2600
|
super(...arguments);
|
|
2594
2601
|
p(this, "priority", 80);
|
|
@@ -2629,7 +2636,7 @@ class Sr extends P {
|
|
|
2629
2636
|
return e.setHours(Be(o), 0, 0, 0), e;
|
|
2630
2637
|
}
|
|
2631
2638
|
}
|
|
2632
|
-
class
|
|
2639
|
+
class Nr extends P {
|
|
2633
2640
|
constructor() {
|
|
2634
2641
|
super(...arguments);
|
|
2635
2642
|
p(this, "priority", 80);
|
|
@@ -2670,7 +2677,7 @@ class Yr extends P {
|
|
|
2670
2677
|
return e.setHours(Be(o), 0, 0, 0), e;
|
|
2671
2678
|
}
|
|
2672
2679
|
}
|
|
2673
|
-
class
|
|
2680
|
+
class Sr extends P {
|
|
2674
2681
|
constructor() {
|
|
2675
2682
|
super(...arguments);
|
|
2676
2683
|
p(this, "priority", 80);
|
|
@@ -2711,7 +2718,7 @@ class Wr extends P {
|
|
|
2711
2718
|
return e.setHours(Be(o), 0, 0, 0), e;
|
|
2712
2719
|
}
|
|
2713
2720
|
}
|
|
2714
|
-
class
|
|
2721
|
+
class Lr extends P {
|
|
2715
2722
|
constructor() {
|
|
2716
2723
|
super(...arguments);
|
|
2717
2724
|
p(this, "priority", 70);
|
|
@@ -2720,11 +2727,11 @@ class qr extends P {
|
|
|
2720
2727
|
parse(e, r, o) {
|
|
2721
2728
|
switch (r) {
|
|
2722
2729
|
case "h":
|
|
2723
|
-
return
|
|
2730
|
+
return F(Y.hour12h, e);
|
|
2724
2731
|
case "ho":
|
|
2725
2732
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2726
2733
|
default:
|
|
2727
|
-
return
|
|
2734
|
+
return I(r.length, e);
|
|
2728
2735
|
}
|
|
2729
2736
|
}
|
|
2730
2737
|
validate(e, r) {
|
|
@@ -2735,7 +2742,7 @@ class qr extends P {
|
|
|
2735
2742
|
return a && o < 12 ? e.setHours(o + 12, 0, 0, 0) : !a && o === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2736
2743
|
}
|
|
2737
2744
|
}
|
|
2738
|
-
class
|
|
2745
|
+
class Ir extends P {
|
|
2739
2746
|
constructor() {
|
|
2740
2747
|
super(...arguments);
|
|
2741
2748
|
p(this, "priority", 70);
|
|
@@ -2744,11 +2751,11 @@ class Ar extends P {
|
|
|
2744
2751
|
parse(e, r, o) {
|
|
2745
2752
|
switch (r) {
|
|
2746
2753
|
case "H":
|
|
2747
|
-
return
|
|
2754
|
+
return F(Y.hour23h, e);
|
|
2748
2755
|
case "Ho":
|
|
2749
2756
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2750
2757
|
default:
|
|
2751
|
-
return
|
|
2758
|
+
return I(r.length, e);
|
|
2752
2759
|
}
|
|
2753
2760
|
}
|
|
2754
2761
|
validate(e, r) {
|
|
@@ -2758,7 +2765,7 @@ class Ar extends P {
|
|
|
2758
2765
|
return e.setHours(o, 0, 0, 0), e;
|
|
2759
2766
|
}
|
|
2760
2767
|
}
|
|
2761
|
-
class
|
|
2768
|
+
class Yr extends P {
|
|
2762
2769
|
constructor() {
|
|
2763
2770
|
super(...arguments);
|
|
2764
2771
|
p(this, "priority", 70);
|
|
@@ -2767,11 +2774,11 @@ class Lr extends P {
|
|
|
2767
2774
|
parse(e, r, o) {
|
|
2768
2775
|
switch (r) {
|
|
2769
2776
|
case "K":
|
|
2770
|
-
return
|
|
2777
|
+
return F(Y.hour11h, e);
|
|
2771
2778
|
case "Ko":
|
|
2772
2779
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2773
2780
|
default:
|
|
2774
|
-
return
|
|
2781
|
+
return I(r.length, e);
|
|
2775
2782
|
}
|
|
2776
2783
|
}
|
|
2777
2784
|
validate(e, r) {
|
|
@@ -2781,7 +2788,7 @@ class Lr extends P {
|
|
|
2781
2788
|
return e.getHours() >= 12 && o < 12 ? e.setHours(o + 12, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2782
2789
|
}
|
|
2783
2790
|
}
|
|
2784
|
-
class
|
|
2791
|
+
class Ar extends P {
|
|
2785
2792
|
constructor() {
|
|
2786
2793
|
super(...arguments);
|
|
2787
2794
|
p(this, "priority", 70);
|
|
@@ -2790,11 +2797,11 @@ class _r extends P {
|
|
|
2790
2797
|
parse(e, r, o) {
|
|
2791
2798
|
switch (r) {
|
|
2792
2799
|
case "k":
|
|
2793
|
-
return
|
|
2800
|
+
return F(Y.hour24h, e);
|
|
2794
2801
|
case "ko":
|
|
2795
2802
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2796
2803
|
default:
|
|
2797
|
-
return
|
|
2804
|
+
return I(r.length, e);
|
|
2798
2805
|
}
|
|
2799
2806
|
}
|
|
2800
2807
|
validate(e, r) {
|
|
@@ -2805,7 +2812,7 @@ class _r extends P {
|
|
|
2805
2812
|
return e.setHours(a, 0, 0, 0), e;
|
|
2806
2813
|
}
|
|
2807
2814
|
}
|
|
2808
|
-
class
|
|
2815
|
+
class qr extends P {
|
|
2809
2816
|
constructor() {
|
|
2810
2817
|
super(...arguments);
|
|
2811
2818
|
p(this, "priority", 60);
|
|
@@ -2814,11 +2821,11 @@ class Ir extends P {
|
|
|
2814
2821
|
parse(e, r, o) {
|
|
2815
2822
|
switch (r) {
|
|
2816
2823
|
case "m":
|
|
2817
|
-
return
|
|
2824
|
+
return F(Y.minute, e);
|
|
2818
2825
|
case "mo":
|
|
2819
2826
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2820
2827
|
default:
|
|
2821
|
-
return
|
|
2828
|
+
return I(r.length, e);
|
|
2822
2829
|
}
|
|
2823
2830
|
}
|
|
2824
2831
|
validate(e, r) {
|
|
@@ -2828,7 +2835,7 @@ class Ir extends P {
|
|
|
2828
2835
|
return e.setMinutes(o, 0, 0), e;
|
|
2829
2836
|
}
|
|
2830
2837
|
}
|
|
2831
|
-
class
|
|
2838
|
+
class Wr extends P {
|
|
2832
2839
|
constructor() {
|
|
2833
2840
|
super(...arguments);
|
|
2834
2841
|
p(this, "priority", 50);
|
|
@@ -2837,11 +2844,11 @@ class jr extends P {
|
|
|
2837
2844
|
parse(e, r, o) {
|
|
2838
2845
|
switch (r) {
|
|
2839
2846
|
case "s":
|
|
2840
|
-
return
|
|
2847
|
+
return F(Y.second, e);
|
|
2841
2848
|
case "so":
|
|
2842
2849
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2843
2850
|
default:
|
|
2844
|
-
return
|
|
2851
|
+
return I(r.length, e);
|
|
2845
2852
|
}
|
|
2846
2853
|
}
|
|
2847
2854
|
validate(e, r) {
|
|
@@ -2851,7 +2858,7 @@ class jr extends P {
|
|
|
2851
2858
|
return e.setSeconds(o, 0), e;
|
|
2852
2859
|
}
|
|
2853
2860
|
}
|
|
2854
|
-
class
|
|
2861
|
+
class _r extends P {
|
|
2855
2862
|
constructor() {
|
|
2856
2863
|
super(...arguments);
|
|
2857
2864
|
p(this, "priority", 30);
|
|
@@ -2859,13 +2866,13 @@ class Rr extends P {
|
|
|
2859
2866
|
}
|
|
2860
2867
|
parse(e, r) {
|
|
2861
2868
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2862
|
-
return A(
|
|
2869
|
+
return A(I(r.length, e), o);
|
|
2863
2870
|
}
|
|
2864
2871
|
set(e, r, o) {
|
|
2865
2872
|
return e.setMilliseconds(o), e;
|
|
2866
2873
|
}
|
|
2867
2874
|
}
|
|
2868
|
-
class
|
|
2875
|
+
class Rr extends P {
|
|
2869
2876
|
constructor() {
|
|
2870
2877
|
super(...arguments);
|
|
2871
2878
|
p(this, "priority", 10);
|
|
@@ -2874,35 +2881,35 @@ class $r extends P {
|
|
|
2874
2881
|
parse(e, r) {
|
|
2875
2882
|
switch (r) {
|
|
2876
2883
|
case "X":
|
|
2877
|
-
return
|
|
2878
|
-
|
|
2884
|
+
return U(
|
|
2885
|
+
Q.basicOptionalMinutes,
|
|
2879
2886
|
e
|
|
2880
2887
|
);
|
|
2881
2888
|
case "XX":
|
|
2882
|
-
return
|
|
2889
|
+
return U(Q.basic, e);
|
|
2883
2890
|
case "XXXX":
|
|
2884
|
-
return
|
|
2885
|
-
|
|
2891
|
+
return U(
|
|
2892
|
+
Q.basicOptionalSeconds,
|
|
2886
2893
|
e
|
|
2887
2894
|
);
|
|
2888
2895
|
case "XXXXX":
|
|
2889
|
-
return
|
|
2890
|
-
|
|
2896
|
+
return U(
|
|
2897
|
+
Q.extendedOptionalSeconds,
|
|
2891
2898
|
e
|
|
2892
2899
|
);
|
|
2893
2900
|
case "XXX":
|
|
2894
2901
|
default:
|
|
2895
|
-
return
|
|
2902
|
+
return U(Q.extended, e);
|
|
2896
2903
|
}
|
|
2897
2904
|
}
|
|
2898
2905
|
set(e, r, o) {
|
|
2899
|
-
return r.timestampIsSet ? e :
|
|
2906
|
+
return r.timestampIsSet ? e : L(
|
|
2900
2907
|
e,
|
|
2901
2908
|
e.getTime() - he(e) - o
|
|
2902
2909
|
);
|
|
2903
2910
|
}
|
|
2904
2911
|
}
|
|
2905
|
-
class
|
|
2912
|
+
class $r extends P {
|
|
2906
2913
|
constructor() {
|
|
2907
2914
|
super(...arguments);
|
|
2908
2915
|
p(this, "priority", 10);
|
|
@@ -2911,189 +2918,189 @@ class Qr extends P {
|
|
|
2911
2918
|
parse(e, r) {
|
|
2912
2919
|
switch (r) {
|
|
2913
2920
|
case "x":
|
|
2914
|
-
return
|
|
2915
|
-
|
|
2921
|
+
return U(
|
|
2922
|
+
Q.basicOptionalMinutes,
|
|
2916
2923
|
e
|
|
2917
2924
|
);
|
|
2918
2925
|
case "xx":
|
|
2919
|
-
return
|
|
2926
|
+
return U(Q.basic, e);
|
|
2920
2927
|
case "xxxx":
|
|
2921
|
-
return
|
|
2922
|
-
|
|
2928
|
+
return U(
|
|
2929
|
+
Q.basicOptionalSeconds,
|
|
2923
2930
|
e
|
|
2924
2931
|
);
|
|
2925
2932
|
case "xxxxx":
|
|
2926
|
-
return
|
|
2927
|
-
|
|
2933
|
+
return U(
|
|
2934
|
+
Q.extendedOptionalSeconds,
|
|
2928
2935
|
e
|
|
2929
2936
|
);
|
|
2930
2937
|
case "xxx":
|
|
2931
2938
|
default:
|
|
2932
|
-
return
|
|
2939
|
+
return U(Q.extended, e);
|
|
2933
2940
|
}
|
|
2934
2941
|
}
|
|
2935
2942
|
set(e, r, o) {
|
|
2936
|
-
return r.timestampIsSet ? e :
|
|
2943
|
+
return r.timestampIsSet ? e : L(
|
|
2937
2944
|
e,
|
|
2938
2945
|
e.getTime() - he(e) - o
|
|
2939
2946
|
);
|
|
2940
2947
|
}
|
|
2941
2948
|
}
|
|
2942
|
-
class
|
|
2949
|
+
class jr extends P {
|
|
2943
2950
|
constructor() {
|
|
2944
2951
|
super(...arguments);
|
|
2945
2952
|
p(this, "priority", 40);
|
|
2946
2953
|
p(this, "incompatibleTokens", "*");
|
|
2947
2954
|
}
|
|
2948
2955
|
parse(e) {
|
|
2949
|
-
return
|
|
2956
|
+
return st(e);
|
|
2950
2957
|
}
|
|
2951
2958
|
set(e, r, o) {
|
|
2952
|
-
return [
|
|
2959
|
+
return [L(e, o * 1e3), { timestampIsSet: !0 }];
|
|
2953
2960
|
}
|
|
2954
2961
|
}
|
|
2955
|
-
class
|
|
2962
|
+
class Gr extends P {
|
|
2956
2963
|
constructor() {
|
|
2957
2964
|
super(...arguments);
|
|
2958
2965
|
p(this, "priority", 20);
|
|
2959
2966
|
p(this, "incompatibleTokens", "*");
|
|
2960
2967
|
}
|
|
2961
2968
|
parse(e) {
|
|
2962
|
-
return
|
|
2969
|
+
return st(e);
|
|
2963
2970
|
}
|
|
2964
2971
|
set(e, r, o) {
|
|
2965
|
-
return [
|
|
2972
|
+
return [L(e, o), { timestampIsSet: !0 }];
|
|
2966
2973
|
}
|
|
2967
2974
|
}
|
|
2968
|
-
const
|
|
2969
|
-
G: new
|
|
2970
|
-
y: new
|
|
2971
|
-
Y: new
|
|
2972
|
-
R: new
|
|
2973
|
-
u: new
|
|
2974
|
-
Q: new
|
|
2975
|
-
q: new
|
|
2976
|
-
M: new
|
|
2977
|
-
L: new
|
|
2978
|
-
w: new
|
|
2975
|
+
const Qr = {
|
|
2976
|
+
G: new dr(),
|
|
2977
|
+
y: new fr(),
|
|
2978
|
+
Y: new pr(),
|
|
2979
|
+
R: new mr(),
|
|
2980
|
+
u: new hr(),
|
|
2981
|
+
Q: new yr(),
|
|
2982
|
+
q: new gr(),
|
|
2983
|
+
M: new br(),
|
|
2984
|
+
L: new wr(),
|
|
2985
|
+
w: new xr(),
|
|
2979
2986
|
I: new Cr(),
|
|
2980
|
-
d: new
|
|
2981
|
-
D: new
|
|
2982
|
-
E: new
|
|
2983
|
-
e: new
|
|
2984
|
-
c: new
|
|
2985
|
-
i: new
|
|
2986
|
-
a: new
|
|
2987
|
-
b: new
|
|
2988
|
-
B: new
|
|
2989
|
-
h: new
|
|
2990
|
-
H: new
|
|
2991
|
-
K: new
|
|
2992
|
-
k: new
|
|
2993
|
-
m: new
|
|
2994
|
-
s: new
|
|
2995
|
-
S: new
|
|
2996
|
-
X: new
|
|
2997
|
-
x: new
|
|
2998
|
-
t: new
|
|
2999
|
-
T: new
|
|
3000
|
-
},
|
|
3001
|
-
function
|
|
3002
|
-
var M,
|
|
3003
|
-
const o =
|
|
2987
|
+
d: new Pr(),
|
|
2988
|
+
D: new Or(),
|
|
2989
|
+
E: new Dr(),
|
|
2990
|
+
e: new Hr(),
|
|
2991
|
+
c: new Br(),
|
|
2992
|
+
i: new Vr(),
|
|
2993
|
+
a: new Fr(),
|
|
2994
|
+
b: new Nr(),
|
|
2995
|
+
B: new Sr(),
|
|
2996
|
+
h: new Lr(),
|
|
2997
|
+
H: new Ir(),
|
|
2998
|
+
K: new Yr(),
|
|
2999
|
+
k: new Ar(),
|
|
3000
|
+
m: new qr(),
|
|
3001
|
+
s: new Wr(),
|
|
3002
|
+
S: new _r(),
|
|
3003
|
+
X: new Rr(),
|
|
3004
|
+
x: new $r(),
|
|
3005
|
+
t: new jr(),
|
|
3006
|
+
T: new Gr()
|
|
3007
|
+
}, Ur = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Xr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, zr = /^'([^]*?)'?$/, Jr = /''/g, Zr = /\S/, Kr = /[a-zA-Z]/;
|
|
3008
|
+
function $e(t, n, e, r) {
|
|
3009
|
+
var M, E, W, R;
|
|
3010
|
+
const o = ar(), a = o.locale ?? et, i = o.firstWeekContainsDate ?? ((E = (M = o.locale) == null ? void 0 : M.options) == null ? void 0 : E.firstWeekContainsDate) ?? 1, s = o.weekStartsOn ?? ((R = (W = o.locale) == null ? void 0 : W.options) == null ? void 0 : R.weekStartsOn) ?? 0;
|
|
3004
3011
|
if (n === "")
|
|
3005
|
-
return t === "" ?
|
|
3006
|
-
const
|
|
3007
|
-
firstWeekContainsDate:
|
|
3008
|
-
weekStartsOn:
|
|
3012
|
+
return t === "" ? q(e) : L(e, NaN);
|
|
3013
|
+
const d = {
|
|
3014
|
+
firstWeekContainsDate: i,
|
|
3015
|
+
weekStartsOn: s,
|
|
3009
3016
|
locale: a
|
|
3010
|
-
},
|
|
3011
|
-
const
|
|
3012
|
-
if (
|
|
3013
|
-
const
|
|
3014
|
-
return
|
|
3017
|
+
}, u = [new cr()], f = n.match(Xr).map((w) => {
|
|
3018
|
+
const k = w[0];
|
|
3019
|
+
if (k in Ce) {
|
|
3020
|
+
const N = Ce[k];
|
|
3021
|
+
return N(w, a.formatLong);
|
|
3015
3022
|
}
|
|
3016
|
-
return
|
|
3017
|
-
}).join("").match(
|
|
3018
|
-
for (let
|
|
3019
|
-
|
|
3020
|
-
const
|
|
3021
|
-
if (
|
|
3022
|
-
const { incompatibleTokens:
|
|
3023
|
-
if (Array.isArray(
|
|
3024
|
-
const
|
|
3025
|
-
(
|
|
3023
|
+
return w;
|
|
3024
|
+
}).join("").match(Ur), l = [];
|
|
3025
|
+
for (let w of f) {
|
|
3026
|
+
at(w) && ke(w, n, t), ot(w) && ke(w, n, t);
|
|
3027
|
+
const k = w[0], N = Qr[k];
|
|
3028
|
+
if (N) {
|
|
3029
|
+
const { incompatibleTokens: T } = N;
|
|
3030
|
+
if (Array.isArray(T)) {
|
|
3031
|
+
const S = l.find(
|
|
3032
|
+
(g) => T.includes(g.token) || g.token === k
|
|
3026
3033
|
);
|
|
3027
|
-
if (
|
|
3034
|
+
if (S)
|
|
3028
3035
|
throw new RangeError(
|
|
3029
|
-
`The format string mustn't contain \`${
|
|
3036
|
+
`The format string mustn't contain \`${S.fullToken}\` and \`${w}\` at the same time`
|
|
3030
3037
|
);
|
|
3031
|
-
} else if (
|
|
3038
|
+
} else if (N.incompatibleTokens === "*" && l.length > 0)
|
|
3032
3039
|
throw new RangeError(
|
|
3033
|
-
`The format string mustn't contain \`${
|
|
3040
|
+
`The format string mustn't contain \`${w}\` and any other token at the same time`
|
|
3034
3041
|
);
|
|
3035
|
-
|
|
3036
|
-
const
|
|
3042
|
+
l.push({ token: k, fullToken: w });
|
|
3043
|
+
const V = N.run(
|
|
3037
3044
|
t,
|
|
3038
|
-
|
|
3045
|
+
w,
|
|
3039
3046
|
a.match,
|
|
3040
|
-
|
|
3047
|
+
d
|
|
3041
3048
|
);
|
|
3042
|
-
if (!
|
|
3043
|
-
return
|
|
3044
|
-
|
|
3049
|
+
if (!V)
|
|
3050
|
+
return L(e, NaN);
|
|
3051
|
+
u.push(V.setter), t = V.rest;
|
|
3045
3052
|
} else {
|
|
3046
|
-
if (
|
|
3053
|
+
if (k.match(Kr))
|
|
3047
3054
|
throw new RangeError(
|
|
3048
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
3055
|
+
"Format string contains an unescaped latin alphabet character `" + k + "`"
|
|
3049
3056
|
);
|
|
3050
|
-
if (
|
|
3051
|
-
t = t.slice(
|
|
3057
|
+
if (w === "''" ? w = "'" : k === "'" && (w = eo(w)), t.indexOf(w) === 0)
|
|
3058
|
+
t = t.slice(w.length);
|
|
3052
3059
|
else
|
|
3053
|
-
return
|
|
3060
|
+
return L(e, NaN);
|
|
3054
3061
|
}
|
|
3055
3062
|
}
|
|
3056
|
-
if (t.length > 0 &&
|
|
3057
|
-
return
|
|
3058
|
-
const
|
|
3059
|
-
(
|
|
3060
|
-
).map((
|
|
3061
|
-
let m =
|
|
3063
|
+
if (t.length > 0 && Zr.test(t))
|
|
3064
|
+
return L(e, NaN);
|
|
3065
|
+
const c = u.map((w) => w.priority).sort((w, k) => k - w).filter((w, k, N) => N.indexOf(w) === k).map(
|
|
3066
|
+
(w) => u.filter((k) => k.priority === w).sort((k, N) => N.subPriority - k.subPriority)
|
|
3067
|
+
).map((w) => w[0]);
|
|
3068
|
+
let m = q(e);
|
|
3062
3069
|
if (isNaN(m.getTime()))
|
|
3063
|
-
return
|
|
3070
|
+
return L(e, NaN);
|
|
3064
3071
|
const y = {};
|
|
3065
|
-
for (const
|
|
3066
|
-
if (!
|
|
3067
|
-
return
|
|
3068
|
-
const
|
|
3069
|
-
Array.isArray(
|
|
3072
|
+
for (const w of c) {
|
|
3073
|
+
if (!w.validate(m, d))
|
|
3074
|
+
return L(e, NaN);
|
|
3075
|
+
const k = w.set(m, y, d);
|
|
3076
|
+
Array.isArray(k) ? (m = k[0], Object.assign(y, k[1])) : m = k;
|
|
3070
3077
|
}
|
|
3071
|
-
return
|
|
3078
|
+
return L(e, m);
|
|
3072
3079
|
}
|
|
3073
|
-
function
|
|
3074
|
-
return t.match(
|
|
3080
|
+
function eo(t) {
|
|
3081
|
+
return t.match(zr)[1].replace(Jr, "'");
|
|
3075
3082
|
}
|
|
3076
|
-
function
|
|
3083
|
+
function D(t) {
|
|
3077
3084
|
return typeof t < "u" && t !== null;
|
|
3078
3085
|
}
|
|
3079
|
-
function
|
|
3086
|
+
function ct(t, n = "hh:mm:ss") {
|
|
3080
3087
|
if (!(!t || !n))
|
|
3081
|
-
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3088
|
+
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), $e(t.toLowerCase(), n, /* @__PURE__ */ new Date())) : $e(t, n, /* @__PURE__ */ new Date());
|
|
3082
3089
|
}
|
|
3083
|
-
function
|
|
3084
|
-
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3090
|
+
function dt(t, n = "hh:mm:ss", e = "AM") {
|
|
3091
|
+
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), Re(t, n).toUpperCase()) : Re(t, n);
|
|
3085
3092
|
}
|
|
3086
|
-
function
|
|
3093
|
+
function ft(t, n) {
|
|
3087
3094
|
let e = t || "hh:mm:ss";
|
|
3088
3095
|
return n ? (e = e ? e.replace(/H/g, "h") : "hh:mm:ss a", e.indexOf("a") === -1 && e.indexOf("A") === -1 && (e = e + " a")) : e = e ? e.replace(/h/g, "H") : "HH:mm:ss", e;
|
|
3089
3096
|
}
|
|
3090
|
-
class
|
|
3097
|
+
class to {
|
|
3091
3098
|
constructor() {
|
|
3092
3099
|
p(this, "hourStep", 1);
|
|
3093
3100
|
p(this, "minuteStep", 1);
|
|
3094
3101
|
p(this, "secondStep", 1);
|
|
3095
3102
|
p(this, "use12Hours", !1);
|
|
3096
|
-
p(this, "changedValue",
|
|
3103
|
+
p(this, "changedValue", v({ text: "", value: void 0 }));
|
|
3097
3104
|
p(this, "format", "HH:mm:ss");
|
|
3098
3105
|
p(this, "temporaryHours");
|
|
3099
3106
|
p(this, "temporaryMinutes");
|
|
@@ -3132,7 +3139,7 @@ class ro {
|
|
|
3132
3139
|
* Get viewHours which is selected in `time-picker-panel` and its range is [12, 1, 2, ..., 11]
|
|
3133
3140
|
*/
|
|
3134
3141
|
get viewHours() {
|
|
3135
|
-
return this.use12Hours &&
|
|
3142
|
+
return this.use12Hours && D(this.temporaryHours) ? this.calculateViewHour(this.temporaryHours) : this.temporaryHours;
|
|
3136
3143
|
}
|
|
3137
3144
|
get minutes() {
|
|
3138
3145
|
return this.temporaryMinutes;
|
|
@@ -3160,7 +3167,7 @@ class ro {
|
|
|
3160
3167
|
*/
|
|
3161
3168
|
get defaultViewHours() {
|
|
3162
3169
|
const n = this.defaultOpenValue.getHours();
|
|
3163
|
-
return this.use12Hours &&
|
|
3170
|
+
return this.use12Hours && D(n) ? this.calculateViewHour(n) : n;
|
|
3164
3171
|
}
|
|
3165
3172
|
/**
|
|
3166
3173
|
* @description
|
|
@@ -3189,7 +3196,7 @@ class ro {
|
|
|
3189
3196
|
return this.temporaryValue;
|
|
3190
3197
|
}
|
|
3191
3198
|
set value(n) {
|
|
3192
|
-
n !== this.temporaryValue && (this.temporaryValue = n,
|
|
3199
|
+
n !== this.temporaryValue && (this.temporaryValue = n, D(this.temporaryValue) && Ke(this.temporaryValue) ? (this.temporaryHours = this.temporaryValue.getHours(), this.temporaryMinutes = this.temporaryValue.getMinutes(), this.temporarySeconds = this.temporaryValue.getSeconds(), this.use12Hours && D(this.temporaryHours) && (this.temporarySelected12Hours = this.temporaryHours >= 12 ? "PM" : "AM")) : this.clearTimeValue());
|
|
3193
3200
|
}
|
|
3194
3201
|
get selected12Hours() {
|
|
3195
3202
|
return this.temporarySelected12Hours;
|
|
@@ -3204,7 +3211,7 @@ class ro {
|
|
|
3204
3211
|
this.temporaryDefaultOpenValue !== n && (this.temporaryDefaultOpenValue = n, this.update());
|
|
3205
3212
|
}
|
|
3206
3213
|
get isEmpty() {
|
|
3207
|
-
return !(
|
|
3214
|
+
return !(D(this.temporaryHours) || D(this.temporaryMinutes) || D(this.temporarySeconds));
|
|
3208
3215
|
}
|
|
3209
3216
|
setFormat(n) {
|
|
3210
3217
|
this.format = n;
|
|
@@ -3222,7 +3229,7 @@ class ro {
|
|
|
3222
3229
|
return e ? this : (this.setDefaultValueIfNil(), this.seconds = n, this);
|
|
3223
3230
|
}
|
|
3224
3231
|
setValue(n, e) {
|
|
3225
|
-
return
|
|
3232
|
+
return D(e) && (this.use12Hours = e), this.value = n, this;
|
|
3226
3233
|
}
|
|
3227
3234
|
setValueByStep(n, e) {
|
|
3228
3235
|
let r = Math.floor(n / e);
|
|
@@ -3233,10 +3240,10 @@ class ro {
|
|
|
3233
3240
|
return this.defaultOpenValue = n, this;
|
|
3234
3241
|
}
|
|
3235
3242
|
setDefaultValueIfNil() {
|
|
3236
|
-
|
|
3243
|
+
D(this.temporaryValue) || (this.temporaryValue = new Date(this.defaultOpenValue));
|
|
3237
3244
|
}
|
|
3238
3245
|
update() {
|
|
3239
|
-
this.isEmpty ? this.temporaryValue = void 0 : (
|
|
3246
|
+
this.isEmpty ? this.temporaryValue = void 0 : (D(this.temporaryHours) ? this.temporaryValue.setHours(this.hours) : this.temporaryHours = this.defaultHours, D(this.temporaryMinutes) ? this.temporaryValue.setMinutes(this.minutes) : this.temporaryMinutes = this.defaultMinutes, D(this.temporarySeconds) ? this.temporaryValue.setSeconds(this.seconds) : this.temporarySeconds = this.defaultSeconds, this.use12Hours && (D(this.temporarySelected12Hours) || (this.temporarySelected12Hours = this.default12Hours), this.selected12Hours === "PM" && this.temporaryHours < 12 && (this.temporaryHours += 12, this.temporaryValue.setHours(this.temporaryHours)), this.selected12Hours === "AM" && this.temporaryHours >= 12 && (this.temporaryHours -= 12, this.temporaryValue.setHours(this.temporaryHours))), this.temporaryValue = new Date(this.temporaryValue), this.text = dt(
|
|
3240
3247
|
this.temporaryValue,
|
|
3241
3248
|
this.format,
|
|
3242
3249
|
this.selected12Hours
|
|
@@ -3253,8 +3260,8 @@ class ro {
|
|
|
3253
3260
|
return e === "PM" && n > 12 ? n - 12 : e === "AM" && n === 0 ? 12 : n;
|
|
3254
3261
|
}
|
|
3255
3262
|
}
|
|
3256
|
-
const
|
|
3257
|
-
function
|
|
3263
|
+
const no = ["moz", "ms", "webkit"];
|
|
3264
|
+
function ro() {
|
|
3258
3265
|
let t = 0;
|
|
3259
3266
|
return (n) => {
|
|
3260
3267
|
const e = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (e - t)), o = setTimeout(() => {
|
|
@@ -3263,285 +3270,285 @@ function ao() {
|
|
|
3263
3270
|
return t = e + r, o;
|
|
3264
3271
|
};
|
|
3265
3272
|
}
|
|
3266
|
-
function
|
|
3273
|
+
function oo() {
|
|
3267
3274
|
if (typeof window > "u")
|
|
3268
3275
|
return () => 0;
|
|
3269
3276
|
if (window.requestAnimationFrame)
|
|
3270
3277
|
return window.requestAnimationFrame.bind(window);
|
|
3271
|
-
const t =
|
|
3272
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
3278
|
+
const t = no.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
3279
|
+
return t ? window[`${t}RequestAnimationFrame`] : ro();
|
|
3273
3280
|
}
|
|
3274
|
-
const
|
|
3275
|
-
function
|
|
3276
|
-
function
|
|
3277
|
-
const M =
|
|
3278
|
-
f
|
|
3279
|
-
}
|
|
3280
|
-
function
|
|
3281
|
-
if (
|
|
3281
|
+
const ao = oo();
|
|
3282
|
+
function io(t, n, e, r, o, a) {
|
|
3283
|
+
function i(f, l, c = 0, m, y) {
|
|
3284
|
+
const M = s(l, m, y), E = f.children[0].children[M] || f.children[0].children[0];
|
|
3285
|
+
d(f, E.offsetTop, c);
|
|
3286
|
+
}
|
|
3287
|
+
function s(f, l, c) {
|
|
3288
|
+
if (l === "hour") {
|
|
3282
3289
|
const m = t.disabledHours && t.disabledHours();
|
|
3283
|
-
return
|
|
3290
|
+
return u(
|
|
3284
3291
|
m,
|
|
3285
|
-
e.value.map((y) => y.index).indexOf(
|
|
3292
|
+
e.value.map((y) => y.index).indexOf(f)
|
|
3286
3293
|
);
|
|
3287
3294
|
}
|
|
3288
|
-
if (
|
|
3289
|
-
const m = t.disabledMinutes && t.disabledMinutes(
|
|
3290
|
-
return
|
|
3295
|
+
if (l === "minute") {
|
|
3296
|
+
const m = t.disabledMinutes && t.disabledMinutes(c.hours);
|
|
3297
|
+
return u(
|
|
3291
3298
|
m,
|
|
3292
|
-
r.value.map((y) => y.index).indexOf(
|
|
3299
|
+
r.value.map((y) => y.index).indexOf(f)
|
|
3293
3300
|
);
|
|
3294
3301
|
}
|
|
3295
|
-
if (
|
|
3296
|
-
const m = t.disabledSeconds && t.disabledSeconds(
|
|
3297
|
-
return
|
|
3302
|
+
if (l === "second") {
|
|
3303
|
+
const m = t.disabledSeconds && t.disabledSeconds(c.hours, c.minutes);
|
|
3304
|
+
return u(
|
|
3298
3305
|
m,
|
|
3299
|
-
o.value.map((y) => y.index).indexOf(
|
|
3306
|
+
o.value.map((y) => y.index).indexOf(f)
|
|
3300
3307
|
);
|
|
3301
3308
|
}
|
|
3302
|
-
return
|
|
3309
|
+
return u(
|
|
3303
3310
|
[],
|
|
3304
|
-
a.value.map((m) => m.index).indexOf(
|
|
3311
|
+
a.value.map((m) => m.index).indexOf(f)
|
|
3305
3312
|
);
|
|
3306
3313
|
}
|
|
3307
|
-
function f
|
|
3308
|
-
if (
|
|
3309
|
-
|
|
3314
|
+
function d(f, l, c) {
|
|
3315
|
+
if (c <= 0) {
|
|
3316
|
+
f.scrollTop = l;
|
|
3310
3317
|
return;
|
|
3311
3318
|
}
|
|
3312
|
-
const y = (
|
|
3313
|
-
|
|
3314
|
-
|
|
3319
|
+
const y = (l - f.scrollTop) / c * 10;
|
|
3320
|
+
ao(() => {
|
|
3321
|
+
f.scrollTop += y, f.scrollTop !== l && d(f, l, c - 10);
|
|
3315
3322
|
});
|
|
3316
3323
|
}
|
|
3317
|
-
function
|
|
3318
|
-
return
|
|
3324
|
+
function u(f, l) {
|
|
3325
|
+
return f && f.length && t.hideDisabledElements ? l - f.reduce((c, m) => c + (m < l ? 1 : 0), 0) : l;
|
|
3319
3326
|
}
|
|
3320
|
-
return { scrollToSelected:
|
|
3327
|
+
return { scrollToSelected: i };
|
|
3321
3328
|
}
|
|
3322
|
-
function
|
|
3323
|
-
function e(
|
|
3324
|
-
return
|
|
3329
|
+
function so(t, n) {
|
|
3330
|
+
function e(s) {
|
|
3331
|
+
return s.index === t.viewHours || !D(t.viewHours) && s.index === t.defaultViewHours;
|
|
3325
3332
|
}
|
|
3326
|
-
function r(
|
|
3327
|
-
return
|
|
3333
|
+
function r(s) {
|
|
3334
|
+
return s.index === t.minutes || !D(t.minutes) && s.index === t.defaultMinutes;
|
|
3328
3335
|
}
|
|
3329
|
-
function o(
|
|
3330
|
-
return
|
|
3336
|
+
function o(s) {
|
|
3337
|
+
return s.index === t.seconds || !D(t.seconds) && s.index === t.defaultSeconds;
|
|
3331
3338
|
}
|
|
3332
|
-
function a(
|
|
3333
|
-
return
|
|
3339
|
+
function a(s) {
|
|
3340
|
+
return s.value.toUpperCase() === t.selected12Hours || !D(t.selected12Hours) && s.value.toUpperCase() === t.default12Hours;
|
|
3334
3341
|
}
|
|
3335
|
-
function s
|
|
3336
|
-
let
|
|
3337
|
-
const
|
|
3338
|
-
let
|
|
3339
|
-
return
|
|
3342
|
+
function i(s, d) {
|
|
3343
|
+
let u = "";
|
|
3344
|
+
const f = ` ${n}-select-option-selected `, l = ` ${n}-select-option-disabled `;
|
|
3345
|
+
let c = !1;
|
|
3346
|
+
return d === "hour" ? c = e(s) : d === "minute" ? c = r(s) : d === "second" ? c = o(s) : c = a(s), c && (u += f), d === "12-hour" || s.disabled && (u += l), u;
|
|
3340
3347
|
}
|
|
3341
|
-
return { getSelectedClass:
|
|
3348
|
+
return { getSelectedClass: i };
|
|
3342
3349
|
}
|
|
3343
|
-
const
|
|
3350
|
+
const Te = /* @__PURE__ */ re({
|
|
3344
3351
|
name: "FTimePickerTimeView",
|
|
3345
|
-
props:
|
|
3352
|
+
props: rn,
|
|
3346
3353
|
emits: ["valueChange", "formatedValueChange"],
|
|
3347
3354
|
setup(t, n) {
|
|
3348
|
-
const e = "time-picker-panel", r =
|
|
3355
|
+
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]), i = v([]), s = v([]), d = v(), u = v(), f = v(), l = v(), c = new to(), {
|
|
3349
3356
|
scrollToSelected: m
|
|
3350
|
-
} =
|
|
3357
|
+
} = io(t, n, o, a, i, s), {
|
|
3351
3358
|
getSelectedClass: y
|
|
3352
|
-
} =
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
}),
|
|
3356
|
-
|
|
3357
|
-
}),
|
|
3359
|
+
} = so(c, e), M = v(t.hourStep), E = v(t.minuteStep), W = v(t.secondStep), R = v(), w = v(""), k = v(), N = v(t.hideDisabledElements), T = v(0);
|
|
3360
|
+
$(() => t.defaultOpenValue, (h) => {
|
|
3361
|
+
D(h) && (R.value = h);
|
|
3362
|
+
}), $(R, (h) => {
|
|
3363
|
+
D(h) && c.setDefaultOpenValue(h);
|
|
3364
|
+
}), R.value = t.defaultOpenValue, $(c.changedValue, (h) => {
|
|
3358
3365
|
n.emit("valueChange", h);
|
|
3359
|
-
}),
|
|
3360
|
-
|
|
3361
|
-
}),
|
|
3362
|
-
|
|
3363
|
-
}),
|
|
3364
|
-
|
|
3365
|
-
}),
|
|
3366
|
-
|
|
3367
|
-
}),
|
|
3368
|
-
|
|
3369
|
-
}),
|
|
3366
|
+
}), $(() => t.modelValue, (h) => {
|
|
3367
|
+
V(h);
|
|
3368
|
+
}), $(() => t.format, (h) => {
|
|
3369
|
+
D(h) ? w.value = h : w.value = "HH:mm:ss";
|
|
3370
|
+
}), $(w, (h) => {
|
|
3371
|
+
D(h) && (c.setFormat(w.value), T.value = 0, Z.value && T.value++, ae.value && T.value++, ie.value && T.value++, k.value && (T.value++, Fe()), r.value = T.value * 66);
|
|
3372
|
+
}), $(() => t.use12Hours, (h) => {
|
|
3373
|
+
k.value = h;
|
|
3374
|
+
}), $(k, (h) => {
|
|
3375
|
+
w.value = ft(w.value, h), c.setUse12Hours(h);
|
|
3376
|
+
}), $(() => t.disabledHours, () => {
|
|
3370
3377
|
we();
|
|
3371
|
-
}),
|
|
3378
|
+
}), $(() => t.disabledMinutes, () => {
|
|
3372
3379
|
pe();
|
|
3373
|
-
}),
|
|
3380
|
+
}), $(() => t.disabledSeconds, () => {
|
|
3374
3381
|
se();
|
|
3375
3382
|
});
|
|
3376
|
-
function
|
|
3377
|
-
if (
|
|
3378
|
-
|
|
3379
|
-
const
|
|
3380
|
-
|
|
3383
|
+
function V(h) {
|
|
3384
|
+
if (D(h)) {
|
|
3385
|
+
c.text = h;
|
|
3386
|
+
const x = ct(c.text, w.value);
|
|
3387
|
+
c.setValue(x, k.value), Ne();
|
|
3381
3388
|
} else
|
|
3382
|
-
|
|
3389
|
+
c.setUse12Hours(k.value);
|
|
3383
3390
|
}
|
|
3384
|
-
function
|
|
3391
|
+
function S() {
|
|
3385
3392
|
let h = [];
|
|
3386
|
-
return t.disabledHours && (h = t.disabledHours(),
|
|
3393
|
+
return t.disabledHours && (h = t.disabledHours(), k.value && (c.selected12Hours === "PM" ? h = h.filter((x) => x >= 12).map((x) => x > 12 ? x - 12 : x) : h = h.filter((x) => x < 12 || x === 24).map((x) => x === 24 || x === 0 ? 12 : x))), h;
|
|
3387
3394
|
}
|
|
3388
|
-
function
|
|
3389
|
-
return
|
|
3395
|
+
function g(h = "hour") {
|
|
3396
|
+
return w.value ? w.value.indexOf(h[0].toUpperCase()) > -1 || w.value.indexOf(h[0].toLowerCase()) > -1 : !1;
|
|
3390
3397
|
}
|
|
3391
|
-
const
|
|
3398
|
+
const _ = B(() => ({
|
|
3392
3399
|
"time-picker-panel": !0,
|
|
3393
3400
|
"time-picker-panel-column-3": !0,
|
|
3394
3401
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3395
3402
|
"f-area-show": !0
|
|
3396
|
-
})),
|
|
3397
|
-
width:
|
|
3398
|
-
})), Z =
|
|
3399
|
-
function be(h,
|
|
3400
|
-
return
|
|
3403
|
+
})), j = B(() => ({
|
|
3404
|
+
width: k.value ? `${r.value}px` : "100%"
|
|
3405
|
+
})), Z = B(() => g("hour")), ae = B(() => g("minute")), ie = B(() => g("second"));
|
|
3406
|
+
function be(h, x = 1, G = 0) {
|
|
3407
|
+
return x = Math.ceil(x), new Array(Math.ceil(h / x)).fill(0).map((H, ue) => (ue + G) * x);
|
|
3401
3408
|
}
|
|
3402
|
-
function
|
|
3403
|
-
if (Z.value &&
|
|
3404
|
-
const
|
|
3405
|
-
m(
|
|
3409
|
+
function gt() {
|
|
3410
|
+
if (Z.value && d.value && m(d.value, D(c.viewHours) ? c.viewHours : c.defaultViewHours, 0, "hour", c), ae.value && u.value && m(u.value, D(c.minutes) ? c.minutes : c.defaultMinutes, 0, "minute", c), ie.value && f.value && m(f.value, D(c.seconds) ? c.seconds : c.defaultSeconds, 0, "second", c), k.value && l.value) {
|
|
3411
|
+
const x = (D(c.selected12Hours) ? c.selected12Hours : c.default12Hours) === "AM" ? 0 : 1;
|
|
3412
|
+
m(l.value, x, 0, "12-hour", c);
|
|
3406
3413
|
}
|
|
3407
3414
|
}
|
|
3408
3415
|
function we() {
|
|
3409
|
-
let h = 24,
|
|
3410
|
-
|
|
3411
|
-
const
|
|
3412
|
-
if (o.value = be(h, M.value,
|
|
3413
|
-
index:
|
|
3414
|
-
disabled:
|
|
3415
|
-
})),
|
|
3416
|
-
const
|
|
3417
|
-
|
|
3416
|
+
let h = 24, x = 0;
|
|
3417
|
+
k.value && (h = 12, x = 1);
|
|
3418
|
+
const G = S();
|
|
3419
|
+
if (o.value = be(h, M.value, x).map((H) => ({
|
|
3420
|
+
index: H,
|
|
3421
|
+
disabled: G.length > 0 && G.indexOf(H) !== -1
|
|
3422
|
+
})), k.value && o.value[o.value.length - 1].index === 12) {
|
|
3423
|
+
const H = [...o.value];
|
|
3424
|
+
H.unshift(H[H.length - 1]), H.splice(H.length - 1, 1), o.value = H;
|
|
3418
3425
|
}
|
|
3419
|
-
o.value = o.value.filter((
|
|
3426
|
+
o.value = o.value.filter((H) => !(N.value && H.disabled));
|
|
3420
3427
|
}
|
|
3421
3428
|
function pe() {
|
|
3422
|
-
a.value = be(60,
|
|
3429
|
+
a.value = be(60, E.value).map((h) => ({
|
|
3423
3430
|
index: h,
|
|
3424
|
-
disabled: !!t.disabledMinutes && t.disabledMinutes(
|
|
3425
|
-
})), a.value = a.value.filter((h) => !(
|
|
3431
|
+
disabled: !!t.disabledMinutes && t.disabledMinutes(c.hours).indexOf(h) !== -1
|
|
3432
|
+
})), a.value = a.value.filter((h) => !(N.value && h.disabled));
|
|
3426
3433
|
}
|
|
3427
3434
|
function se() {
|
|
3428
|
-
|
|
3435
|
+
i.value = be(60, W.value).map((h) => ({
|
|
3429
3436
|
index: h,
|
|
3430
|
-
disabled: !!t.disabledSeconds && t.disabledSeconds(
|
|
3431
|
-
})),
|
|
3437
|
+
disabled: !!t.disabledSeconds && t.disabledSeconds(c.hours, c.minutes).indexOf(h) !== -1
|
|
3438
|
+
})), i.value = i.value.filter((h) => !(N.value && h.disabled));
|
|
3432
3439
|
}
|
|
3433
3440
|
function Fe() {
|
|
3434
|
-
const h =
|
|
3435
|
-
|
|
3441
|
+
const h = w.value.includes("A");
|
|
3442
|
+
s.value = [{
|
|
3436
3443
|
index: 0,
|
|
3437
3444
|
value: h ? "AM" : "am"
|
|
3438
3445
|
}, {
|
|
3439
3446
|
index: 1,
|
|
3440
3447
|
value: h ? "PM" : "pm"
|
|
3441
|
-
}],
|
|
3448
|
+
}], s.value = s.value.filter(() => !N.value);
|
|
3442
3449
|
}
|
|
3443
|
-
function
|
|
3444
|
-
if (h.stopPropagation(),
|
|
3445
|
-
if (m(
|
|
3450
|
+
function bt(h, x) {
|
|
3451
|
+
if (h.stopPropagation(), c.setHours(x.index, x.disabled), !x.disabled) {
|
|
3452
|
+
if (m(d.value, x.index, 120, "hour", c), t.disabledMinutes !== null) {
|
|
3446
3453
|
pe();
|
|
3447
|
-
const
|
|
3448
|
-
if (!
|
|
3454
|
+
const G = a.value.filter((H) => !H.disabled);
|
|
3455
|
+
if (!G.find((H) => H.index === c.minutes)) {
|
|
3449
3456
|
const {
|
|
3450
|
-
index:
|
|
3457
|
+
index: H,
|
|
3451
3458
|
disabled: ue
|
|
3452
|
-
} =
|
|
3453
|
-
|
|
3459
|
+
} = G[0];
|
|
3460
|
+
c.setMinutes(H, ue);
|
|
3454
3461
|
}
|
|
3455
3462
|
}
|
|
3456
3463
|
(t.disabledSeconds !== null || t.disabledMinutes !== null) && se();
|
|
3457
3464
|
}
|
|
3458
3465
|
}
|
|
3459
|
-
function
|
|
3460
|
-
h.stopPropagation(),
|
|
3466
|
+
function wt(h, x) {
|
|
3467
|
+
h.stopPropagation(), c.selected12Hours = x.value, we(), pe(), se(), m(l.value, x.index, 120, "12-hour", c);
|
|
3461
3468
|
}
|
|
3462
|
-
function
|
|
3463
|
-
if (h.stopPropagation(),
|
|
3469
|
+
function vt(h, x) {
|
|
3470
|
+
if (h.stopPropagation(), c.setMinutes(x.index, x.disabled), !x.disabled && (m(u.value, x.index, 120, "minute", c), t.disabledSeconds !== null)) {
|
|
3464
3471
|
se();
|
|
3465
|
-
const
|
|
3466
|
-
if (!
|
|
3472
|
+
const G = i.value.filter((H) => !H.disabled);
|
|
3473
|
+
if (!G.find((H) => H.index === c.seconds)) {
|
|
3467
3474
|
const {
|
|
3468
|
-
index:
|
|
3475
|
+
index: H,
|
|
3469
3476
|
disabled: ue
|
|
3470
|
-
} =
|
|
3471
|
-
|
|
3477
|
+
} = G[0];
|
|
3478
|
+
c.setSeconds(H, ue);
|
|
3472
3479
|
}
|
|
3473
3480
|
}
|
|
3474
3481
|
}
|
|
3475
|
-
function
|
|
3476
|
-
h.stopPropagation(),
|
|
3482
|
+
function xt(h, x) {
|
|
3483
|
+
h.stopPropagation(), c.setSeconds(x.index, x.disabled), !x.disabled && m(f.value, x.index, 120, "second", c);
|
|
3477
3484
|
}
|
|
3478
3485
|
function Ne() {
|
|
3479
3486
|
we(), pe(), se(), Fe();
|
|
3480
3487
|
}
|
|
3481
3488
|
fe(() => {
|
|
3482
|
-
|
|
3483
|
-
|
|
3489
|
+
w.value = t.format, k.value = t.use12Hours, V(t.modelValue), Ne(), setTimeout(() => {
|
|
3490
|
+
gt();
|
|
3484
3491
|
}, 10);
|
|
3485
3492
|
});
|
|
3486
|
-
function
|
|
3487
|
-
return t.showHeader ?
|
|
3493
|
+
function Mt() {
|
|
3494
|
+
return t.showHeader ? b("div", {
|
|
3488
3495
|
class: e + "-combobox time-picker-panel-header",
|
|
3489
|
-
style:
|
|
3490
|
-
}, [Z.value &&
|
|
3496
|
+
style: j.value
|
|
3497
|
+
}, [Z.value && b("div", {
|
|
3491
3498
|
class: e + "-select",
|
|
3492
3499
|
style: "height: 32px"
|
|
3493
|
-
}, [
|
|
3500
|
+
}, [b("ul", null, [b("li", {
|
|
3494
3501
|
class: "time-header" + ae.value ? "time-header-split" : ""
|
|
3495
|
-
}, [ve("时")])])]), ae.value &&
|
|
3502
|
+
}, [ve("时")])])]), ae.value && b("div", {
|
|
3496
3503
|
class: e + "-select",
|
|
3497
3504
|
style: "height: 32px"
|
|
3498
|
-
}, [
|
|
3505
|
+
}, [b("ul", null, [b("li", {
|
|
3499
3506
|
class: "time-header" + ie.value ? "time-header-split" : ""
|
|
3500
|
-
}, [ve("分")])])]), ie.value &&
|
|
3507
|
+
}, [ve("分")])])]), ie.value && b("div", {
|
|
3501
3508
|
class: e + "-select",
|
|
3502
3509
|
style: "height: 32px"
|
|
3503
|
-
}, [
|
|
3510
|
+
}, [b("ul", null, [b("li", {
|
|
3504
3511
|
class: "time-header"
|
|
3505
|
-
}, [ve("秒")])])]), t.use12Hours &&
|
|
3512
|
+
}, [ve("秒")])])]), t.use12Hours && b("div", {
|
|
3506
3513
|
class: e + "-select",
|
|
3507
3514
|
style: "height: 32px"
|
|
3508
|
-
}, [
|
|
3515
|
+
}, [b("ul", null, [b("li", {
|
|
3509
3516
|
class: "time-header"
|
|
3510
3517
|
}, null)])])]) : null;
|
|
3511
3518
|
}
|
|
3512
|
-
return () =>
|
|
3513
|
-
class:
|
|
3514
|
-
}, [
|
|
3519
|
+
return () => b("div", {
|
|
3520
|
+
class: _.value
|
|
3521
|
+
}, [b("div", {
|
|
3515
3522
|
class: "farris-timer-picker"
|
|
3516
|
-
}, [
|
|
3523
|
+
}, [b("div", {
|
|
3517
3524
|
class: e + "-inner"
|
|
3518
|
-
}, [
|
|
3525
|
+
}, [Mt(), b("div", {
|
|
3519
3526
|
class: e + "-combobox",
|
|
3520
|
-
style:
|
|
3521
|
-
}, [Z.value &&
|
|
3527
|
+
style: j.value
|
|
3528
|
+
}, [Z.value && b("div", {
|
|
3522
3529
|
class: e + "-select",
|
|
3523
|
-
ref:
|
|
3524
|
-
}, [
|
|
3530
|
+
ref: d
|
|
3531
|
+
}, [b("ul", null, [o.value.map((h) => b("li", {
|
|
3525
3532
|
class: y(h, "hour"),
|
|
3526
|
-
onClick: (
|
|
3527
|
-
}, [`${h.index}`]))])]), ae.value &&
|
|
3533
|
+
onClick: (x) => bt(x, h)
|
|
3534
|
+
}, [`${h.index}`]))])]), ae.value && b("div", {
|
|
3528
3535
|
class: e + "-select",
|
|
3529
|
-
ref:
|
|
3530
|
-
}, [
|
|
3536
|
+
ref: u
|
|
3537
|
+
}, [b("ul", null, [a.value.map((h) => b("li", {
|
|
3531
3538
|
class: y(h, "minute"),
|
|
3532
|
-
onClick: (
|
|
3533
|
-
}, [`${h.index}`]))])]), ie.value &&
|
|
3539
|
+
onClick: (x) => vt(x, h)
|
|
3540
|
+
}, [`${h.index}`]))])]), ie.value && b("div", {
|
|
3534
3541
|
class: e + "-select",
|
|
3535
|
-
ref:
|
|
3536
|
-
}, [
|
|
3542
|
+
ref: f
|
|
3543
|
+
}, [b("ul", null, [i.value.map((h) => b("li", {
|
|
3537
3544
|
class: y(h, "second"),
|
|
3538
|
-
onClick: (
|
|
3539
|
-
}, [`${h.index}`]))])]),
|
|
3545
|
+
onClick: (x) => xt(x, h)
|
|
3546
|
+
}, [`${h.index}`]))])]), k.value && b("div", {
|
|
3540
3547
|
class: e + "-select",
|
|
3541
|
-
ref:
|
|
3542
|
-
}, [
|
|
3548
|
+
ref: l
|
|
3549
|
+
}, [b("ul", null, [s.value.map((h) => b("li", {
|
|
3543
3550
|
class: y(h, "12-hour"),
|
|
3544
|
-
onClick: (
|
|
3551
|
+
onClick: (x) => wt(x, h)
|
|
3545
3552
|
}, [`${h.value}`]))])])])])])]);
|
|
3546
3553
|
}
|
|
3547
3554
|
}), te = /* @__PURE__ */ re({
|
|
@@ -3549,53 +3556,53 @@ const Ce = /* @__PURE__ */ re({
|
|
|
3549
3556
|
props: De,
|
|
3550
3557
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3551
3558
|
setup(t, n) {
|
|
3552
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r =
|
|
3553
|
-
function
|
|
3559
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(), i = B(() => ft(t.format, t.use12Hours));
|
|
3560
|
+
function s() {
|
|
3554
3561
|
r.value = "", n.emit("clear");
|
|
3555
3562
|
}
|
|
3556
|
-
function
|
|
3563
|
+
function d() {
|
|
3557
3564
|
if (r.value) {
|
|
3558
|
-
const
|
|
3559
|
-
r.value =
|
|
3565
|
+
const l = ct(r.value, i.value);
|
|
3566
|
+
r.value = dt(l, i.value);
|
|
3560
3567
|
}
|
|
3561
3568
|
}
|
|
3562
|
-
function
|
|
3563
|
-
|
|
3569
|
+
function u() {
|
|
3570
|
+
d();
|
|
3564
3571
|
}
|
|
3565
|
-
function
|
|
3566
|
-
r.value =
|
|
3572
|
+
function f(l) {
|
|
3573
|
+
r.value = l.text;
|
|
3567
3574
|
}
|
|
3568
|
-
return
|
|
3569
|
-
r.value =
|
|
3570
|
-
}),
|
|
3571
|
-
n.emit("valueChange",
|
|
3572
|
-
}), () =>
|
|
3575
|
+
return d(), $(() => t.modelValue, (l) => {
|
|
3576
|
+
r.value = l;
|
|
3577
|
+
}), $(r, (l) => {
|
|
3578
|
+
n.emit("valueChange", l), n.emit("update:modelValue", l);
|
|
3579
|
+
}), () => b(Vt, {
|
|
3573
3580
|
ref: o,
|
|
3574
3581
|
modelValue: r.value,
|
|
3575
|
-
"onUpdate:modelValue": (
|
|
3576
|
-
disable: t.
|
|
3582
|
+
"onUpdate:modelValue": (l) => r.value = l,
|
|
3583
|
+
disable: t.disabled,
|
|
3577
3584
|
readonly: t.readonly,
|
|
3578
3585
|
editable: t.editable,
|
|
3579
3586
|
buttonContent: e,
|
|
3580
3587
|
placeholder: t.placeholder,
|
|
3581
3588
|
enableClear: !0,
|
|
3582
|
-
onClear:
|
|
3583
|
-
onBlur:
|
|
3589
|
+
onClear: s,
|
|
3590
|
+
onBlur: u
|
|
3584
3591
|
}, {
|
|
3585
|
-
default: () => [
|
|
3592
|
+
default: () => [b(Te, Pe({
|
|
3586
3593
|
ref: a
|
|
3587
3594
|
}, t, {
|
|
3588
|
-
onValueChange:
|
|
3595
|
+
onValueChange: f
|
|
3589
3596
|
}), null)]
|
|
3590
3597
|
});
|
|
3591
3598
|
}
|
|
3592
|
-
}),
|
|
3593
|
-
["appearance",
|
|
3599
|
+
}), uo = /* @__PURE__ */ new Map([
|
|
3600
|
+
["appearance", Ft]
|
|
3594
3601
|
]);
|
|
3595
|
-
function
|
|
3602
|
+
function lo(t, n, e) {
|
|
3596
3603
|
return n;
|
|
3597
3604
|
}
|
|
3598
|
-
const
|
|
3605
|
+
const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-design.gitee.io/button-edit.schema.json", po = "button-edit", mo = "A Farris Input Component", ho = "object", yo = {
|
|
3599
3606
|
id: {
|
|
3600
3607
|
description: "The unique identifier for a Input Group",
|
|
3601
3608
|
type: "string"
|
|
@@ -3779,18 +3786,18 @@ const po = "https://json-schema.org/draft/2020-12/schema", mo = "https://farris-
|
|
|
3779
3786
|
type: "string",
|
|
3780
3787
|
default: ""
|
|
3781
3788
|
}
|
|
3782
|
-
},
|
|
3789
|
+
}, go = [
|
|
3783
3790
|
"id",
|
|
3784
3791
|
"type"
|
|
3785
|
-
],
|
|
3786
|
-
$schema:
|
|
3787
|
-
$id:
|
|
3788
|
-
title:
|
|
3789
|
-
description:
|
|
3790
|
-
type:
|
|
3791
|
-
properties:
|
|
3792
|
-
required:
|
|
3793
|
-
},
|
|
3792
|
+
], bo = {
|
|
3793
|
+
$schema: co,
|
|
3794
|
+
$id: fo,
|
|
3795
|
+
title: po,
|
|
3796
|
+
description: mo,
|
|
3797
|
+
type: ho,
|
|
3798
|
+
properties: yo,
|
|
3799
|
+
required: go
|
|
3800
|
+
}, wo = "buttonEdit", vo = "A Farris Component", xo = "object", Mo = {
|
|
3794
3801
|
basic: {
|
|
3795
3802
|
description: "Basic Infomation",
|
|
3796
3803
|
title: "基本信息",
|
|
@@ -3873,10 +3880,10 @@ const po = "https://json-schema.org/draft/2020-12/schema", mo = "https://farris-
|
|
|
3873
3880
|
}
|
|
3874
3881
|
}
|
|
3875
3882
|
}, Co = {
|
|
3876
|
-
title:
|
|
3877
|
-
description:
|
|
3878
|
-
type:
|
|
3879
|
-
categories:
|
|
3883
|
+
title: wo,
|
|
3884
|
+
description: vo,
|
|
3885
|
+
type: xo,
|
|
3886
|
+
categories: Mo
|
|
3880
3887
|
}, Ve = {
|
|
3881
3888
|
/**
|
|
3882
3889
|
* 组件标识
|
|
@@ -3982,66 +3989,68 @@ const po = "https://json-schema.org/draft/2020-12/schema", mo = "https://farris-
|
|
|
3982
3989
|
/**
|
|
3983
3990
|
* 打开前
|
|
3984
3991
|
*/
|
|
3985
|
-
beforeOpen: { type: Function, default: null }
|
|
3986
|
-
|
|
3992
|
+
beforeOpen: { type: Function, default: null },
|
|
3993
|
+
/** 更新方式 blur | change */
|
|
3994
|
+
updateOn: { type: String, default: "change" }
|
|
3995
|
+
}, pt = Ue(Ve, bo, uo, lo, Co), ko = {
|
|
3987
3996
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
3988
3997
|
host: { type: Object },
|
|
3989
3998
|
backgroundColor: { type: String, default: "" }
|
|
3990
|
-
},
|
|
3999
|
+
}, To = /* @__PURE__ */ re({
|
|
3991
4000
|
name: "FOverlay",
|
|
3992
|
-
props:
|
|
4001
|
+
props: ko,
|
|
3993
4002
|
emits: ["click"],
|
|
3994
4003
|
setup(t, n) {
|
|
3995
|
-
const e =
|
|
4004
|
+
const e = v(t.popupContentPosition), r = v(t.host), o = B(() => ({
|
|
3996
4005
|
backgroundColor: t.backgroundColor || "",
|
|
3997
4006
|
pointerEvents: "auto"
|
|
3998
4007
|
}));
|
|
3999
|
-
function a(
|
|
4000
|
-
n.emit("click"),
|
|
4008
|
+
function a(s) {
|
|
4009
|
+
n.emit("click"), s.preventDefault(), s.stopPropagation();
|
|
4001
4010
|
}
|
|
4002
|
-
|
|
4003
|
-
const
|
|
4004
|
-
if (
|
|
4005
|
-
const
|
|
4006
|
-
left:
|
|
4007
|
-
top:
|
|
4008
|
-
height:
|
|
4009
|
-
} =
|
|
4011
|
+
B(() => {
|
|
4012
|
+
const s = r.value;
|
|
4013
|
+
if (s) {
|
|
4014
|
+
const d = s.getBoundingClientRect(), {
|
|
4015
|
+
left: u,
|
|
4016
|
+
top: f,
|
|
4017
|
+
height: l
|
|
4018
|
+
} = d;
|
|
4010
4019
|
return {
|
|
4011
|
-
left:
|
|
4012
|
-
top:
|
|
4020
|
+
left: u,
|
|
4021
|
+
top: f + l
|
|
4013
4022
|
};
|
|
4014
4023
|
}
|
|
4015
4024
|
return e.value;
|
|
4016
4025
|
});
|
|
4017
|
-
const
|
|
4026
|
+
const i = B(() => ({
|
|
4018
4027
|
// position: 'relative',
|
|
4019
4028
|
// left: `${position.value.left}px`,
|
|
4020
4029
|
// top: `${position.value.top}px`
|
|
4021
4030
|
}));
|
|
4022
|
-
return () =>
|
|
4031
|
+
return () => b(Tt, {
|
|
4023
4032
|
to: "body"
|
|
4024
4033
|
}, {
|
|
4025
4034
|
default: () => {
|
|
4026
|
-
var
|
|
4027
|
-
return [
|
|
4035
|
+
var s, d;
|
|
4036
|
+
return [b("div", {
|
|
4028
4037
|
class: "overlay-container",
|
|
4029
|
-
onClick: (
|
|
4038
|
+
onClick: (u) => a(u),
|
|
4030
4039
|
style: o.value
|
|
4031
|
-
}, [
|
|
4032
|
-
style:
|
|
4033
|
-
}, [(
|
|
4040
|
+
}, [b("div", {
|
|
4041
|
+
style: i.value
|
|
4042
|
+
}, [(d = (s = n.slots).default) == null ? void 0 : d.call(s)])])];
|
|
4034
4043
|
}
|
|
4035
4044
|
});
|
|
4036
4045
|
}
|
|
4037
4046
|
});
|
|
4038
|
-
function
|
|
4047
|
+
function Po(t) {
|
|
4039
4048
|
if (t.content && t.content.render)
|
|
4040
4049
|
return t.content.render;
|
|
4041
4050
|
if (t.render && typeof t.render == "function")
|
|
4042
4051
|
return t.render;
|
|
4043
4052
|
}
|
|
4044
|
-
function
|
|
4053
|
+
function Oo(t) {
|
|
4045
4054
|
const n = document.createElement("div");
|
|
4046
4055
|
n.style.display = "contents";
|
|
4047
4056
|
let e;
|
|
@@ -4049,13 +4058,13 @@ function Ho(t) {
|
|
|
4049
4058
|
}), o = () => {
|
|
4050
4059
|
r(), e && e.unmount();
|
|
4051
4060
|
};
|
|
4052
|
-
return e =
|
|
4061
|
+
return e = Pt({
|
|
4053
4062
|
setup() {
|
|
4054
|
-
|
|
4063
|
+
Ot(() => {
|
|
4055
4064
|
document.body.removeChild(n);
|
|
4056
4065
|
});
|
|
4057
|
-
const a =
|
|
4058
|
-
return () =>
|
|
4066
|
+
const a = Po(t);
|
|
4067
|
+
return () => b(To, {
|
|
4059
4068
|
"popup-content-position": t.popupPosition,
|
|
4060
4069
|
host: t.host,
|
|
4061
4070
|
onClick: o,
|
|
@@ -4066,13 +4075,13 @@ function Ho(t) {
|
|
|
4066
4075
|
}
|
|
4067
4076
|
}), document.body.appendChild(n), e.mount(n), e;
|
|
4068
4077
|
}
|
|
4069
|
-
class
|
|
4078
|
+
class Do {
|
|
4070
4079
|
static show(n) {
|
|
4071
|
-
return
|
|
4080
|
+
return Oo(n);
|
|
4072
4081
|
}
|
|
4073
4082
|
}
|
|
4074
|
-
const
|
|
4075
|
-
function
|
|
4083
|
+
const Ho = Symbol("FModalService");
|
|
4084
|
+
function mt(t, n) {
|
|
4076
4085
|
function e() {
|
|
4077
4086
|
const r = t.beforeOpen || t.beforeClickButton || null;
|
|
4078
4087
|
let o = Promise.resolve(!0);
|
|
@@ -4086,27 +4095,27 @@ function ft(t, n) {
|
|
|
4086
4095
|
}
|
|
4087
4096
|
return { judgeCanOpen: e };
|
|
4088
4097
|
}
|
|
4089
|
-
function
|
|
4090
|
-
const a =
|
|
4098
|
+
function ht(t, n, e, r, o) {
|
|
4099
|
+
const a = v(t.buttonBehavior), i = v(t.popupOnInput), s = B(() => ({
|
|
4091
4100
|
"input-group-append": !0,
|
|
4092
4101
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4093
|
-
})), { judgeCanOpen:
|
|
4094
|
-
async function
|
|
4095
|
-
if (await
|
|
4096
|
-
const
|
|
4102
|
+
})), { judgeCanOpen: d } = mt(t, o), u = B(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), f = me(Ho, null), l = v();
|
|
4103
|
+
async function c(M) {
|
|
4104
|
+
if (await d() && u.value) {
|
|
4105
|
+
const E = !!n.slots.default;
|
|
4097
4106
|
if (a.value === "Modal") {
|
|
4098
|
-
const
|
|
4099
|
-
...
|
|
4107
|
+
const W = t.modalOptions, R = f == null ? void 0 : f.open({
|
|
4108
|
+
...W,
|
|
4100
4109
|
render: () => n.slots.default && n.slots.default()
|
|
4101
4110
|
});
|
|
4102
|
-
|
|
4111
|
+
l.value = R == null ? void 0 : R.modalRef;
|
|
4103
4112
|
}
|
|
4104
|
-
a.value === "Overlay" &&
|
|
4113
|
+
a.value === "Overlay" && Do.show({
|
|
4105
4114
|
// host: buttonEditRef.value,
|
|
4106
4115
|
host: document.body,
|
|
4107
4116
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
4108
4117
|
render: () => n.slots.default && n.slots.default()
|
|
4109
|
-
}),
|
|
4118
|
+
}), E && a.value === "Popup" && r.togglePopup(!0), E && i.value && r.hidePopup(), n.emit("clickButton", { origin: M, value: t.modelValue });
|
|
4110
4119
|
}
|
|
4111
4120
|
}
|
|
4112
4121
|
function m(M) {
|
|
@@ -4116,161 +4125,161 @@ function pt(t, n, e, r, o) {
|
|
|
4116
4125
|
n.emit("mouseLeaveIcon", M);
|
|
4117
4126
|
}
|
|
4118
4127
|
return {
|
|
4119
|
-
buttonGroupClass:
|
|
4120
|
-
onClickButton:
|
|
4128
|
+
buttonGroupClass: s,
|
|
4129
|
+
onClickButton: c,
|
|
4121
4130
|
onMouseEnterButton: m,
|
|
4122
4131
|
onMouseLeaveButton: y,
|
|
4123
|
-
modalRef:
|
|
4132
|
+
modalRef: l
|
|
4124
4133
|
};
|
|
4125
4134
|
}
|
|
4126
|
-
function
|
|
4127
|
-
const
|
|
4128
|
-
function
|
|
4129
|
-
|
|
4135
|
+
function Bo(t, n, e, r, o, a) {
|
|
4136
|
+
const i = v(!1), s = B(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: d } = a;
|
|
4137
|
+
function u(m) {
|
|
4138
|
+
i.value = m;
|
|
4130
4139
|
}
|
|
4131
|
-
|
|
4132
|
-
|
|
4140
|
+
$(o, () => {
|
|
4141
|
+
u(!!o.value);
|
|
4133
4142
|
});
|
|
4134
|
-
function
|
|
4143
|
+
function f(m) {
|
|
4135
4144
|
const y = !t.readonly && !t.disable && t.editable, M = !t.editable;
|
|
4136
|
-
m.stopPropagation(), (y || M) && (
|
|
4145
|
+
m.stopPropagation(), (y || M) && (d("", !1), u(!i.value), n.emit("clear"));
|
|
4137
4146
|
}
|
|
4138
|
-
function
|
|
4139
|
-
if (
|
|
4147
|
+
function l(m) {
|
|
4148
|
+
if (s.value) {
|
|
4140
4149
|
if (!e.value) {
|
|
4141
|
-
|
|
4150
|
+
u(!1);
|
|
4142
4151
|
return;
|
|
4143
4152
|
}
|
|
4144
|
-
!t.disable && !t.readonly &&
|
|
4153
|
+
!t.disable && !t.readonly && u(!0);
|
|
4145
4154
|
}
|
|
4146
4155
|
}
|
|
4147
|
-
function
|
|
4148
|
-
|
|
4156
|
+
function c(m) {
|
|
4157
|
+
s.value && u(!1);
|
|
4149
4158
|
}
|
|
4150
4159
|
return {
|
|
4151
|
-
enableClearButton:
|
|
4152
|
-
showClearButton:
|
|
4153
|
-
onClearValue:
|
|
4154
|
-
onMouseEnterTextBox:
|
|
4155
|
-
onMouseLeaveTextBox:
|
|
4160
|
+
enableClearButton: s,
|
|
4161
|
+
showClearButton: i,
|
|
4162
|
+
onClearValue: f,
|
|
4163
|
+
onMouseEnterTextBox: l,
|
|
4164
|
+
onMouseLeaveTextBox: c
|
|
4156
4165
|
};
|
|
4157
4166
|
}
|
|
4158
|
-
function
|
|
4159
|
-
const a =
|
|
4167
|
+
function Eo(t, n, e, r, o) {
|
|
4168
|
+
const a = B(() => t.popupOnInput), i = B(() => t.popupOnFocus), { shouldPopupContent: s } = o, d = B(() => t.enableTitle ? e.value : ""), u = B(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), f = B(() => t.readonly || !t.editable), l = v(!1), c = B(() => !t.disable && l.value), m = B(() => ({
|
|
4160
4169
|
"text-left": t.textAlign === "left",
|
|
4161
4170
|
"text-center": t.textAlign === "center",
|
|
4162
4171
|
"text-right": t.textAlign === "right",
|
|
4163
4172
|
"form-control": !0,
|
|
4164
4173
|
"f-utils-fill": !0
|
|
4165
|
-
})), y =
|
|
4174
|
+
})), y = B(() => ({
|
|
4166
4175
|
"input-group": !0,
|
|
4167
4176
|
"f-state-disable": t.disable,
|
|
4168
4177
|
"f-state-editable": t.editable && !t.disable && !t.readonly,
|
|
4169
4178
|
"f-state-readonly": t.readonly && !t.disable,
|
|
4170
|
-
"f-state-focus":
|
|
4179
|
+
"f-state-focus": c.value
|
|
4171
4180
|
}));
|
|
4172
|
-
function M(
|
|
4173
|
-
e.value !==
|
|
4181
|
+
function M(g, _ = !0) {
|
|
4182
|
+
e.value !== g && (e.value = g, _ && (n.emit("change", g), n.emit("update:modelValue", g)));
|
|
4174
4183
|
}
|
|
4175
|
-
function
|
|
4176
|
-
|
|
4184
|
+
function E(g) {
|
|
4185
|
+
s.value = !1, M(g, !0);
|
|
4177
4186
|
}
|
|
4178
|
-
|
|
4187
|
+
$(
|
|
4179
4188
|
() => t.modelValue,
|
|
4180
|
-
(
|
|
4181
|
-
e.value =
|
|
4189
|
+
(g) => {
|
|
4190
|
+
e.value = g;
|
|
4182
4191
|
}
|
|
4183
4192
|
);
|
|
4184
|
-
function
|
|
4185
|
-
|
|
4193
|
+
function W(g) {
|
|
4194
|
+
l.value = !1, n.emit("blur", g), g.stopPropagation();
|
|
4186
4195
|
}
|
|
4187
|
-
function
|
|
4188
|
-
n.emit("click",
|
|
4196
|
+
function R(g) {
|
|
4197
|
+
n.emit("click", g);
|
|
4189
4198
|
}
|
|
4190
|
-
function g
|
|
4191
|
-
t.disable || (
|
|
4199
|
+
function w(g) {
|
|
4200
|
+
t.disable || (l.value = !0, f.value || (n.emit("focus", g), i.value && !s.value && o.popup()));
|
|
4192
4201
|
}
|
|
4193
|
-
function
|
|
4194
|
-
n.emit("input",
|
|
4195
|
-
const
|
|
4196
|
-
r.value =
|
|
4202
|
+
function k(g) {
|
|
4203
|
+
n.emit("input", g.target.value);
|
|
4204
|
+
const _ = g.target.value;
|
|
4205
|
+
r.value = _, e.value !== _ && M(_, t.updateOn === "change"), a.value && !s.value && o.popup();
|
|
4197
4206
|
}
|
|
4198
|
-
function
|
|
4199
|
-
|
|
4207
|
+
function N(g) {
|
|
4208
|
+
g.target.tagName !== "INPUT" && g.preventDefault(), g.stopPropagation();
|
|
4200
4209
|
}
|
|
4201
|
-
function
|
|
4202
|
-
n.emit("keydown",
|
|
4210
|
+
function T(g) {
|
|
4211
|
+
n.emit("keydown", g);
|
|
4203
4212
|
}
|
|
4204
|
-
function
|
|
4205
|
-
|
|
4213
|
+
function V(g) {
|
|
4214
|
+
g.key === "Enter" && (a.value || i.value) && o.hidePopup(), n.emit("keyup", g);
|
|
4206
4215
|
}
|
|
4207
|
-
function
|
|
4208
|
-
const
|
|
4209
|
-
|
|
4216
|
+
function S(g) {
|
|
4217
|
+
const _ = g.target.value;
|
|
4218
|
+
g.stopPropagation(), M(_);
|
|
4210
4219
|
}
|
|
4211
4220
|
return {
|
|
4212
|
-
hasFocusedTextBox:
|
|
4213
|
-
isTextBoxReadonly:
|
|
4221
|
+
hasFocusedTextBox: c,
|
|
4222
|
+
isTextBoxReadonly: f,
|
|
4214
4223
|
textBoxClass: m,
|
|
4215
|
-
textBoxPlaceholder:
|
|
4216
|
-
textBoxTitle:
|
|
4224
|
+
textBoxPlaceholder: u,
|
|
4225
|
+
textBoxTitle: d,
|
|
4217
4226
|
inputGroupClass: y,
|
|
4218
4227
|
changeTextBoxValue: M,
|
|
4219
|
-
commitValue:
|
|
4220
|
-
onBlurTextBox:
|
|
4221
|
-
onClickTextBox:
|
|
4222
|
-
onFocusTextBox:
|
|
4223
|
-
onInput:
|
|
4224
|
-
onKeyDownTextBox:
|
|
4225
|
-
onKeyUpTextBox:
|
|
4226
|
-
onMouseDownTextBox:
|
|
4227
|
-
onTextBoxValueChange:
|
|
4228
|
+
commitValue: E,
|
|
4229
|
+
onBlurTextBox: W,
|
|
4230
|
+
onClickTextBox: R,
|
|
4231
|
+
onFocusTextBox: w,
|
|
4232
|
+
onInput: k,
|
|
4233
|
+
onKeyDownTextBox: T,
|
|
4234
|
+
onKeyUpTextBox: V,
|
|
4235
|
+
onMouseDownTextBox: N,
|
|
4236
|
+
onTextBoxValueChange: S
|
|
4228
4237
|
};
|
|
4229
4238
|
}
|
|
4230
4239
|
function yt(t, n, e, r) {
|
|
4231
|
-
const o =
|
|
4232
|
-
function
|
|
4233
|
-
const
|
|
4234
|
-
|
|
4240
|
+
const o = v(), a = v(!1), { judgeCanOpen: i } = mt(t, r);
|
|
4241
|
+
function s() {
|
|
4242
|
+
const l = o.value;
|
|
4243
|
+
l && l.show(e.value);
|
|
4235
4244
|
}
|
|
4236
|
-
async function
|
|
4245
|
+
async function d(l = !1) {
|
|
4237
4246
|
if (!!n.slots.default) {
|
|
4238
|
-
if (!
|
|
4247
|
+
if (!l && !a.value && !await i())
|
|
4239
4248
|
return;
|
|
4240
|
-
a.value = !a.value, await Se(),
|
|
4249
|
+
a.value = !a.value, await Se(), s();
|
|
4241
4250
|
}
|
|
4242
4251
|
}
|
|
4243
|
-
async function
|
|
4252
|
+
async function u(l = !1) {
|
|
4244
4253
|
if (!!n.slots.default) {
|
|
4245
|
-
if (!
|
|
4254
|
+
if (!l && !await i())
|
|
4246
4255
|
return;
|
|
4247
|
-
a.value = !0, await Se(),
|
|
4256
|
+
a.value = !0, await Se(), s();
|
|
4248
4257
|
}
|
|
4249
4258
|
}
|
|
4250
|
-
function
|
|
4259
|
+
function f() {
|
|
4251
4260
|
a.value = !1;
|
|
4252
4261
|
}
|
|
4253
|
-
return { hidePopup:
|
|
4262
|
+
return { hidePopup: f, popup: u, shouldPopupContent: a, togglePopup: d, popoverRef: o };
|
|
4254
4263
|
}
|
|
4255
|
-
function
|
|
4256
|
-
const r =
|
|
4264
|
+
function Vo(t, n, e) {
|
|
4265
|
+
const r = v(), {
|
|
4257
4266
|
isTextBoxReadonly: o,
|
|
4258
4267
|
textBoxClass: a,
|
|
4259
|
-
textBoxPlaceholder:
|
|
4260
|
-
textBoxTitle:
|
|
4261
|
-
onBlurTextBox:
|
|
4262
|
-
onClickTextBox:
|
|
4263
|
-
onFocusTextBox:
|
|
4264
|
-
onInput:
|
|
4265
|
-
onKeyDownTextBox:
|
|
4268
|
+
textBoxPlaceholder: i,
|
|
4269
|
+
textBoxTitle: s,
|
|
4270
|
+
onBlurTextBox: d,
|
|
4271
|
+
onClickTextBox: u,
|
|
4272
|
+
onFocusTextBox: f,
|
|
4273
|
+
onInput: l,
|
|
4274
|
+
onKeyDownTextBox: c,
|
|
4266
4275
|
onKeyUpTextBox: m,
|
|
4267
4276
|
onMouseDownTextBox: y,
|
|
4268
4277
|
onTextBoxValueChange: M
|
|
4269
4278
|
} = e;
|
|
4270
4279
|
return fe(() => {
|
|
4271
|
-
var
|
|
4272
|
-
t.selectOnCreated && ((
|
|
4273
|
-
}), () =>
|
|
4280
|
+
var E, W;
|
|
4281
|
+
t.selectOnCreated && ((E = r.value) == null || E.select()), t.focusOnCreated && ((W = r.value) == null || W.focus());
|
|
4282
|
+
}), () => b("input", {
|
|
4274
4283
|
ref: r,
|
|
4275
4284
|
name: "input-group-value",
|
|
4276
4285
|
autocomplete: t.autoComplete ? "on" : "off",
|
|
@@ -4278,83 +4287,83 @@ function gt(t, n, e) {
|
|
|
4278
4287
|
disabled: t.disable,
|
|
4279
4288
|
maxlength: t.maxLength,
|
|
4280
4289
|
minlength: t.minLength,
|
|
4281
|
-
placeholder:
|
|
4290
|
+
placeholder: i.value,
|
|
4282
4291
|
readonly: o.value,
|
|
4283
4292
|
tabindex: t.tabIndex,
|
|
4284
|
-
title:
|
|
4293
|
+
title: s.value,
|
|
4285
4294
|
type: t.inputType,
|
|
4286
4295
|
value: n.value,
|
|
4287
|
-
onBlur:
|
|
4296
|
+
onBlur: d,
|
|
4288
4297
|
onChange: M,
|
|
4289
|
-
onClick:
|
|
4290
|
-
onFocus:
|
|
4291
|
-
onInput:
|
|
4292
|
-
onKeydown:
|
|
4298
|
+
onClick: u,
|
|
4299
|
+
onFocus: f,
|
|
4300
|
+
onInput: l,
|
|
4301
|
+
onKeydown: c,
|
|
4293
4302
|
onKeyup: m,
|
|
4294
4303
|
onMousedown: y
|
|
4295
4304
|
}, null);
|
|
4296
4305
|
}
|
|
4297
|
-
function
|
|
4298
|
-
const r =
|
|
4306
|
+
function Fo(t, n, e) {
|
|
4307
|
+
const r = v(t.separator), {
|
|
4299
4308
|
changeTextBoxValue: o
|
|
4300
|
-
} = e, a =
|
|
4301
|
-
name:
|
|
4309
|
+
} = e, a = B(() => n.value ? n.value.split(r.value).map((s) => ({
|
|
4310
|
+
name: s,
|
|
4302
4311
|
selectable: !0
|
|
4303
4312
|
})) : []);
|
|
4304
|
-
function s
|
|
4305
|
-
o(
|
|
4313
|
+
function i(s) {
|
|
4314
|
+
o(s.map((d) => d.name).join(r.value), !0);
|
|
4306
4315
|
}
|
|
4307
|
-
return () =>
|
|
4316
|
+
return () => b(Nt, {
|
|
4308
4317
|
id: `${t.id}-tag-editor`,
|
|
4309
4318
|
class: "form-control",
|
|
4310
4319
|
data: a.value,
|
|
4311
4320
|
showClose: !0,
|
|
4312
4321
|
showInput: !0,
|
|
4313
|
-
onChange:
|
|
4322
|
+
onChange: i
|
|
4314
4323
|
}, null);
|
|
4315
4324
|
}
|
|
4316
|
-
function
|
|
4325
|
+
function No(t, n, e, r) {
|
|
4317
4326
|
const {
|
|
4318
4327
|
buttonGroupClass: o,
|
|
4319
4328
|
onClickButton: a,
|
|
4320
|
-
onMouseEnterButton:
|
|
4321
|
-
onMouseLeaveButton:
|
|
4329
|
+
onMouseEnterButton: i,
|
|
4330
|
+
onMouseLeaveButton: s
|
|
4322
4331
|
} = e, {
|
|
4323
|
-
enableClearButton:
|
|
4324
|
-
showClearButton:
|
|
4325
|
-
onClearValue:
|
|
4326
|
-
} = r,
|
|
4332
|
+
enableClearButton: d,
|
|
4333
|
+
showClearButton: u,
|
|
4334
|
+
onClearValue: f
|
|
4335
|
+
} = r, l = v();
|
|
4327
4336
|
return {
|
|
4328
|
-
renderButtonGroup: () =>
|
|
4337
|
+
renderButtonGroup: () => b("div", {
|
|
4329
4338
|
id: `${t.id}-button-group`,
|
|
4330
4339
|
class: o.value
|
|
4331
|
-
}, [
|
|
4340
|
+
}, [d.value && Dt(b("span", {
|
|
4332
4341
|
class: "input-group-text input-group-clear",
|
|
4333
|
-
onClick:
|
|
4334
|
-
}, [
|
|
4342
|
+
onClick: f
|
|
4343
|
+
}, [b("i", {
|
|
4335
4344
|
class: "f-icon modal_close"
|
|
4336
|
-
}, null)]), [[
|
|
4345
|
+
}, null)]), [[Ht, u.value]]), n.slots.buttonContent ? b("span", {
|
|
4337
4346
|
class: "input-group-text input-group-append-button",
|
|
4338
4347
|
onClick: a,
|
|
4339
|
-
onMouseenter:
|
|
4340
|
-
onMouseleave:
|
|
4341
|
-
}, [n.slots.buttonContent()]) : t.buttonContent ?
|
|
4348
|
+
onMouseenter: i,
|
|
4349
|
+
onMouseleave: s
|
|
4350
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? b("span", {
|
|
4342
4351
|
class: "input-group-text input-group-append-button",
|
|
4343
4352
|
innerHTML: t.buttonContent,
|
|
4344
|
-
ref:
|
|
4353
|
+
ref: l,
|
|
4345
4354
|
onClick: a,
|
|
4346
|
-
onMouseenter:
|
|
4347
|
-
onMouseleave:
|
|
4355
|
+
onMouseenter: i,
|
|
4356
|
+
onMouseleave: s
|
|
4348
4357
|
}, null) : null]),
|
|
4349
|
-
buttonHandleElement:
|
|
4358
|
+
buttonHandleElement: l
|
|
4350
4359
|
};
|
|
4351
4360
|
}
|
|
4352
|
-
function
|
|
4353
|
-
const r =
|
|
4361
|
+
function So(t, n, e) {
|
|
4362
|
+
const r = v(t.popupMinWidth), {
|
|
4354
4363
|
hidePopup: o,
|
|
4355
4364
|
popoverRef: a
|
|
4356
4365
|
} = e;
|
|
4357
|
-
return () =>
|
|
4366
|
+
return () => b(St, {
|
|
4358
4367
|
id: `${t.id}-popover`,
|
|
4359
4368
|
ref: a,
|
|
4360
4369
|
visible: !0,
|
|
@@ -4368,8 +4377,8 @@ function Vo(t, n, e) {
|
|
|
4368
4377
|
onHidden: o
|
|
4369
4378
|
}, {
|
|
4370
4379
|
default: () => {
|
|
4371
|
-
var
|
|
4372
|
-
return [(
|
|
4380
|
+
var i, s;
|
|
4381
|
+
return [(s = (i = n.slots).default) == null ? void 0 : s.call(i)];
|
|
4373
4382
|
}
|
|
4374
4383
|
});
|
|
4375
4384
|
}
|
|
@@ -4378,201 +4387,219 @@ const de = /* @__PURE__ */ re({
|
|
|
4378
4387
|
props: Ve,
|
|
4379
4388
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4380
4389
|
setup(t, n) {
|
|
4381
|
-
const e =
|
|
4382
|
-
shouldPopupContent:
|
|
4383
|
-
hidePopup:
|
|
4384
|
-
togglePopup:
|
|
4385
|
-
} = a,
|
|
4386
|
-
hasFocusedTextBox:
|
|
4390
|
+
const e = v(), r = v(t.customClass), o = v(t.modelValue), a = yt(t, n, e, o), {
|
|
4391
|
+
shouldPopupContent: i,
|
|
4392
|
+
hidePopup: s,
|
|
4393
|
+
togglePopup: d
|
|
4394
|
+
} = a, u = ht(t, n, e, a, o), f = v(""), l = Eo(t, n, o, f, a), {
|
|
4395
|
+
hasFocusedTextBox: c,
|
|
4387
4396
|
commitValue: m,
|
|
4388
4397
|
inputGroupClass: y
|
|
4389
|
-
} =
|
|
4390
|
-
onMouseEnterTextBox:
|
|
4391
|
-
onMouseLeaveTextBox:
|
|
4392
|
-
} = M,
|
|
4393
|
-
const
|
|
4398
|
+
} = l, M = Bo(t, n, o, c, f, l), {
|
|
4399
|
+
onMouseEnterTextBox: E,
|
|
4400
|
+
onMouseLeaveTextBox: W
|
|
4401
|
+
} = M, R = B(() => {
|
|
4402
|
+
const g = {
|
|
4394
4403
|
"f-button-edit": !0,
|
|
4395
4404
|
"f-cmp-inputgroup": !0,
|
|
4396
4405
|
"f-button-edit-nowrap": !t.wrapText
|
|
4397
4406
|
};
|
|
4398
|
-
return r.value && r.value.split(" ").reduce((
|
|
4407
|
+
return r.value && r.value.split(" ").reduce((_, j) => (_[j] = !0, _), g), g;
|
|
4399
4408
|
});
|
|
4400
|
-
function
|
|
4401
|
-
return t.multiSelect && t.inputType === "tag" ?
|
|
4409
|
+
function w() {
|
|
4410
|
+
return t.multiSelect && t.inputType === "tag" ? Fo(t, o, l) : Vo(t, o, l);
|
|
4402
4411
|
}
|
|
4403
|
-
let
|
|
4404
|
-
|
|
4405
|
-
|
|
4412
|
+
let k = w();
|
|
4413
|
+
$([() => t.multiSelect, () => t.inputType], () => {
|
|
4414
|
+
k = w();
|
|
4406
4415
|
});
|
|
4407
4416
|
const {
|
|
4408
|
-
renderButtonGroup:
|
|
4409
|
-
buttonHandleElement:
|
|
4410
|
-
} =
|
|
4417
|
+
renderButtonGroup: N,
|
|
4418
|
+
buttonHandleElement: T
|
|
4419
|
+
} = No(t, n, u, M), V = So(t, n, a), S = {
|
|
4411
4420
|
commitValue: m,
|
|
4412
4421
|
elementRef: e,
|
|
4413
|
-
hidePopup:
|
|
4414
|
-
shouldPopupContent:
|
|
4415
|
-
togglePopup:
|
|
4422
|
+
hidePopup: s,
|
|
4423
|
+
shouldPopupContent: i,
|
|
4424
|
+
togglePopup: d,
|
|
4416
4425
|
openDialog: () => {
|
|
4417
|
-
|
|
4426
|
+
T.value && t.buttonBehavior === "Modal" && T.value.click();
|
|
4418
4427
|
},
|
|
4419
4428
|
getModal: () => {
|
|
4420
|
-
var
|
|
4421
|
-
return t.buttonBehavior === "Modal" ? (
|
|
4429
|
+
var g;
|
|
4430
|
+
return t.buttonBehavior === "Modal" ? (g = u.modalRef.value) == null ? void 0 : g.value : null;
|
|
4422
4431
|
}
|
|
4423
4432
|
};
|
|
4424
4433
|
return fe(() => {
|
|
4425
|
-
e.value.componentInstance =
|
|
4434
|
+
e.value.componentInstance = S, window.onresize = () => {
|
|
4426
4435
|
document.body.click();
|
|
4427
4436
|
};
|
|
4428
|
-
}), n.expose(
|
|
4437
|
+
}), n.expose(S), () => b(Bt, null, [b("div", Pe(n.attrs, {
|
|
4429
4438
|
ref: e,
|
|
4430
|
-
class:
|
|
4439
|
+
class: R.value,
|
|
4431
4440
|
id: t.id
|
|
4432
|
-
}), [
|
|
4441
|
+
}), [b("div", {
|
|
4433
4442
|
id: `${t.id}-input-group`,
|
|
4434
4443
|
class: y.value,
|
|
4435
|
-
onMouseenter:
|
|
4436
|
-
onMouseleave:
|
|
4437
|
-
}, [
|
|
4444
|
+
onMouseenter: E,
|
|
4445
|
+
onMouseleave: W
|
|
4446
|
+
}, [k(), N()])]), i.value && V()]);
|
|
4438
4447
|
}
|
|
4439
|
-
})
|
|
4448
|
+
});
|
|
4449
|
+
function Lo(t, n, e) {
|
|
4450
|
+
const {
|
|
4451
|
+
buttonGroupClass: r
|
|
4452
|
+
} = e, o = v();
|
|
4453
|
+
return {
|
|
4454
|
+
renderButtonGroup: () => b("div", {
|
|
4455
|
+
id: `${t.id}-button-group`,
|
|
4456
|
+
class: r.value
|
|
4457
|
+
}, [n.slots.buttonContent ? b("span", {
|
|
4458
|
+
class: "input-group-text input-group-append-button"
|
|
4459
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? b("span", {
|
|
4460
|
+
class: "input-group-text input-group-append-button",
|
|
4461
|
+
innerHTML: t.buttonContent,
|
|
4462
|
+
ref: o
|
|
4463
|
+
}, null) : null]),
|
|
4464
|
+
buttonHandleElement: o
|
|
4465
|
+
};
|
|
4466
|
+
}
|
|
4467
|
+
const Io = /* @__PURE__ */ re({
|
|
4440
4468
|
name: "FButtonEdit",
|
|
4441
4469
|
props: Ve,
|
|
4442
4470
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4443
4471
|
setup(t, n) {
|
|
4444
|
-
const e =
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4472
|
+
const e = v(), r = me("design-item-context"), o = Lt(e, r), a = v(t.customClass), i = v(t.modelValue), s = yt(t, n, e, i), d = ht(t, n, e, s, i), u = v(), f = B(() => ({
|
|
4473
|
+
"f-cmp-inputgroup": !0,
|
|
4474
|
+
"input-group": !0,
|
|
4475
|
+
"f-state-disable": !0,
|
|
4476
|
+
"f-state-editable": !1,
|
|
4477
|
+
"f-state-readonly": !0
|
|
4478
|
+
}));
|
|
4448
4479
|
fe(() => {
|
|
4449
4480
|
e.value.componentInstance = o;
|
|
4450
4481
|
}), n.expose(o.value);
|
|
4451
|
-
const
|
|
4452
|
-
const
|
|
4482
|
+
const l = B(() => {
|
|
4483
|
+
const m = {
|
|
4453
4484
|
"f-button-edit": !0,
|
|
4454
4485
|
"f-cmp-inputgroup": !0,
|
|
4455
4486
|
"f-button-edit-nowrap": !t.wrapText
|
|
4456
4487
|
};
|
|
4457
|
-
return a.value && a.value.split(" ").reduce((
|
|
4458
|
-
})
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
let D = M();
|
|
4463
|
-
j([() => t.multiSelect, () => t.inputType], () => {
|
|
4464
|
-
D = M();
|
|
4465
|
-
});
|
|
4466
|
-
const {
|
|
4467
|
-
renderButtonGroup: L,
|
|
4468
|
-
buttonHandleElement: I
|
|
4469
|
-
} = wt(t, n, f, m);
|
|
4470
|
-
return () => w("div", Pe(n.attrs, {
|
|
4488
|
+
return a.value && a.value.split(" ").reduce((y, M) => (y[M] = !0, y), m), m;
|
|
4489
|
+
}), {
|
|
4490
|
+
renderButtonGroup: c
|
|
4491
|
+
} = Lo(t, n, d);
|
|
4492
|
+
return () => b("div", Pe(n.attrs, {
|
|
4471
4493
|
ref: e,
|
|
4472
|
-
class:
|
|
4494
|
+
class: l.value,
|
|
4473
4495
|
id: t.id
|
|
4474
|
-
}), [
|
|
4475
|
-
class:
|
|
4476
|
-
}, [
|
|
4496
|
+
}), [b("div", {
|
|
4497
|
+
class: f.value
|
|
4498
|
+
}, [b("input", {
|
|
4499
|
+
ref: u,
|
|
4500
|
+
class: "form-control",
|
|
4501
|
+
readonly: !0,
|
|
4502
|
+
placeholder: t.placeholder
|
|
4503
|
+
}, null), c()])]);
|
|
4477
4504
|
}
|
|
4478
4505
|
});
|
|
4479
4506
|
de.register = (t, n, e, r) => {
|
|
4480
|
-
t["button-edit"] = de, n["button-edit"] =
|
|
4507
|
+
t["button-edit"] = de, n["button-edit"] = pt;
|
|
4481
4508
|
};
|
|
4482
4509
|
de.registerDesigner = (t, n, e) => {
|
|
4483
|
-
t["button-edit"] =
|
|
4510
|
+
t["button-edit"] = Io, n["button-edit"] = pt;
|
|
4484
4511
|
};
|
|
4485
|
-
|
|
4486
|
-
function
|
|
4487
|
-
var
|
|
4512
|
+
It(de);
|
|
4513
|
+
function Yo(t, n, e) {
|
|
4514
|
+
var N;
|
|
4488
4515
|
function r() {
|
|
4489
4516
|
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
4490
4517
|
}
|
|
4491
4518
|
r();
|
|
4492
|
-
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "",
|
|
4493
|
-
function
|
|
4519
|
+
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", i = v();
|
|
4520
|
+
function s() {
|
|
4494
4521
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
4495
4522
|
}
|
|
4496
|
-
function
|
|
4523
|
+
function d() {
|
|
4497
4524
|
return !1;
|
|
4498
4525
|
}
|
|
4499
|
-
function
|
|
4526
|
+
function u() {
|
|
4500
4527
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
4501
4528
|
}
|
|
4502
|
-
function
|
|
4529
|
+
function f() {
|
|
4503
4530
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
4504
4531
|
}
|
|
4505
|
-
function
|
|
4506
|
-
if (!
|
|
4532
|
+
function l(T) {
|
|
4533
|
+
if (!T || !T.value)
|
|
4507
4534
|
return null;
|
|
4508
|
-
if (
|
|
4509
|
-
return
|
|
4510
|
-
const
|
|
4511
|
-
return
|
|
4535
|
+
if (T.value.schema && T.value.schema.type === "component")
|
|
4536
|
+
return T.value;
|
|
4537
|
+
const V = v(T == null ? void 0 : T.value.parent), S = l(V);
|
|
4538
|
+
return S || null;
|
|
4512
4539
|
}
|
|
4513
|
-
function
|
|
4514
|
-
const { componentInstance:
|
|
4515
|
-
return !
|
|
4540
|
+
function c(T = n) {
|
|
4541
|
+
const { componentInstance: V, designerItemElementRef: S } = T;
|
|
4542
|
+
return !V || !V.value ? null : V.value.canMove ? S : c(T.parent);
|
|
4516
4543
|
}
|
|
4517
|
-
function m(
|
|
4518
|
-
return !!e && e.canAccepts(
|
|
4544
|
+
function m(T) {
|
|
4545
|
+
return !!e && e.canAccepts(T);
|
|
4519
4546
|
}
|
|
4520
4547
|
function y() {
|
|
4521
4548
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
4522
4549
|
}
|
|
4523
4550
|
function M() {
|
|
4524
4551
|
}
|
|
4525
|
-
function
|
|
4526
|
-
|
|
4552
|
+
function E(T, V) {
|
|
4553
|
+
V && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(V);
|
|
4527
4554
|
}
|
|
4528
|
-
function
|
|
4529
|
-
const { componentType:
|
|
4530
|
-
let
|
|
4531
|
-
e && e.onResolveNewComponentSchema && (
|
|
4532
|
-
const
|
|
4533
|
-
return
|
|
4555
|
+
function W(T, V) {
|
|
4556
|
+
const { componentType: S } = T;
|
|
4557
|
+
let g = Me(S, T, V);
|
|
4558
|
+
e && e.onResolveNewComponentSchema && (g = e.onResolveNewComponentSchema(T, g));
|
|
4559
|
+
const _ = S.toLowerCase().replace("-", "_");
|
|
4560
|
+
return g && !g.id && g.type === S && (g.id = `${_}_${Math.random().toString().slice(2, 6)}`), g;
|
|
4534
4561
|
}
|
|
4535
|
-
function
|
|
4536
|
-
const
|
|
4537
|
-
|
|
4538
|
-
let
|
|
4539
|
-
e && e.onAcceptNewChildElement && (
|
|
4540
|
-
const Z =
|
|
4541
|
-
return
|
|
4562
|
+
function R(T, V) {
|
|
4563
|
+
const S = String(T.getAttribute("data-controltype")), g = T.getAttribute("data-feature"), _ = g ? JSON.parse(g) : {};
|
|
4564
|
+
_.parentComponentInstance = i.value;
|
|
4565
|
+
let j = Me(S, _);
|
|
4566
|
+
e && e.onAcceptNewChildElement && (j = e.onAcceptNewChildElement(T, V, j));
|
|
4567
|
+
const Z = S.toLowerCase().replace("-", "_");
|
|
4568
|
+
return j && !j.id && j.type === S && (j.id = `${Z}_${Math.random().toString().slice(2, 6)}`), j;
|
|
4542
4569
|
}
|
|
4543
|
-
function
|
|
4570
|
+
function w(T) {
|
|
4544
4571
|
}
|
|
4545
|
-
function
|
|
4572
|
+
function k(...T) {
|
|
4546
4573
|
if (e && e.getPropsConfig)
|
|
4547
|
-
return e.getPropsConfig(...
|
|
4574
|
+
return e.getPropsConfig(...T);
|
|
4548
4575
|
}
|
|
4549
|
-
return
|
|
4550
|
-
canMove:
|
|
4551
|
-
canSelectParent:
|
|
4552
|
-
canDelete:
|
|
4553
|
-
canNested: !
|
|
4576
|
+
return i.value = {
|
|
4577
|
+
canMove: s(),
|
|
4578
|
+
canSelectParent: d(),
|
|
4579
|
+
canDelete: u(),
|
|
4580
|
+
canNested: !f(),
|
|
4554
4581
|
contents: n == null ? void 0 : n.schema.contents,
|
|
4555
4582
|
elementRef: t,
|
|
4556
|
-
parent: (
|
|
4583
|
+
parent: (N = n == null ? void 0 : n.parent) == null ? void 0 : N.componentInstance,
|
|
4557
4584
|
schema: n == null ? void 0 : n.schema,
|
|
4558
4585
|
styles: o,
|
|
4559
4586
|
designerClass: a,
|
|
4560
4587
|
canAccepts: m,
|
|
4561
|
-
getBelongedComponentInstance:
|
|
4562
|
-
getDraggableDesignItemElement:
|
|
4588
|
+
getBelongedComponentInstance: l,
|
|
4589
|
+
getDraggableDesignItemElement: c,
|
|
4563
4590
|
getDraggingDisplayText: y,
|
|
4564
|
-
getPropConfig:
|
|
4591
|
+
getPropConfig: k,
|
|
4565
4592
|
getDragScopeElement: M,
|
|
4566
|
-
onAcceptMovedChildElement:
|
|
4567
|
-
onAcceptNewChildElement:
|
|
4568
|
-
onChildElementMovedOut:
|
|
4569
|
-
addNewChildComponentSchema:
|
|
4593
|
+
onAcceptMovedChildElement: E,
|
|
4594
|
+
onAcceptNewChildElement: R,
|
|
4595
|
+
onChildElementMovedOut: w,
|
|
4596
|
+
addNewChildComponentSchema: W,
|
|
4570
4597
|
updateDragAndDropRules: r,
|
|
4571
|
-
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved ||
|
|
4572
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
4573
|
-
},
|
|
4598
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || v(!1),
|
|
4599
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
|
|
4600
|
+
}, i;
|
|
4574
4601
|
}
|
|
4575
|
-
class
|
|
4602
|
+
class Ao {
|
|
4576
4603
|
constructor(n, e) {
|
|
4577
4604
|
p(this, "componentId");
|
|
4578
4605
|
p(this, "viewModelId");
|
|
@@ -4627,7 +4654,7 @@ class So {
|
|
|
4627
4654
|
type: "combo-list",
|
|
4628
4655
|
textField: "name",
|
|
4629
4656
|
valueField: "value",
|
|
4630
|
-
data: [{ value: n.type, name:
|
|
4657
|
+
data: [{ value: n.type, name: C[n.type].name }]
|
|
4631
4658
|
}
|
|
4632
4659
|
}
|
|
4633
4660
|
}
|
|
@@ -4653,6 +4680,19 @@ class So {
|
|
|
4653
4680
|
}
|
|
4654
4681
|
};
|
|
4655
4682
|
}
|
|
4683
|
+
/**
|
|
4684
|
+
*
|
|
4685
|
+
* @param propertyId
|
|
4686
|
+
* @param componentInstance
|
|
4687
|
+
* @returns
|
|
4688
|
+
*/
|
|
4689
|
+
updateElementByParentContainer(n, e) {
|
|
4690
|
+
const r = e && e.parent && e.parent.schema;
|
|
4691
|
+
if (!r)
|
|
4692
|
+
return;
|
|
4693
|
+
const o = r.contents.findIndex((i) => i.id === n), a = je(r.contents[o]);
|
|
4694
|
+
r.contents.splice(o, 1), r.contents.splice(o, 0, a);
|
|
4695
|
+
}
|
|
4656
4696
|
}
|
|
4657
4697
|
const ee = class ee {
|
|
4658
4698
|
/**
|
|
@@ -4679,64 +4719,66 @@ const ee = class ee {
|
|
|
4679
4719
|
*/
|
|
4680
4720
|
p(ee, "fieldControlTypeMapping", {
|
|
4681
4721
|
String: [
|
|
4682
|
-
{ key:
|
|
4683
|
-
{ key:
|
|
4684
|
-
{ key:
|
|
4685
|
-
{ key:
|
|
4686
|
-
{ key:
|
|
4687
|
-
{ key:
|
|
4688
|
-
{ key:
|
|
4722
|
+
{ key: C["input-group"].type, value: C["input-group"].name },
|
|
4723
|
+
{ key: C.lookup.type, value: C.lookup.name },
|
|
4724
|
+
{ key: C["date-picker"].type, value: C["date-picker"].name },
|
|
4725
|
+
{ key: C["check-box"].type, value: C["check-box"].name },
|
|
4726
|
+
{ key: C["radio-group"].type, value: C["radio-group"].name },
|
|
4727
|
+
{ key: C["combo-list"].type, value: C["combo-list"].name },
|
|
4728
|
+
{ key: C.textarea.type, value: C.textarea.name }
|
|
4689
4729
|
],
|
|
4690
4730
|
Text: [
|
|
4691
|
-
{ key:
|
|
4692
|
-
{ key:
|
|
4731
|
+
{ key: C.textarea.type, value: C.textarea.name },
|
|
4732
|
+
{ key: C.lookup.type, value: C.lookup.name }
|
|
4693
4733
|
],
|
|
4694
4734
|
Decimal: [
|
|
4695
|
-
{ key:
|
|
4735
|
+
{ key: C["number-spinner"].type, value: C["number-spinner"].name }
|
|
4696
4736
|
],
|
|
4697
4737
|
Integer: [
|
|
4698
|
-
{ key:
|
|
4738
|
+
{ key: C["number-spinner"].type, value: C["number-spinner"].name }
|
|
4699
4739
|
],
|
|
4700
4740
|
Number: [
|
|
4701
|
-
{ key:
|
|
4741
|
+
{ key: C["number-spinner"].type, value: C["number-spinner"].name }
|
|
4702
4742
|
],
|
|
4703
4743
|
BigNumber: [
|
|
4704
|
-
{ key:
|
|
4744
|
+
{ key: C["number-spinner"].type, value: C["number-spinner"].name }
|
|
4705
4745
|
],
|
|
4706
4746
|
Date: [
|
|
4707
|
-
{ key:
|
|
4747
|
+
{ key: C["date-picker"].type, value: C["date-picker"].name }
|
|
4708
4748
|
],
|
|
4709
4749
|
DateTime: [
|
|
4710
|
-
{ key:
|
|
4750
|
+
{ key: C["date-picker"].type, value: C["date-picker"].name }
|
|
4711
4751
|
],
|
|
4712
4752
|
Boolean: [
|
|
4713
|
-
{ key:
|
|
4714
|
-
{ key:
|
|
4753
|
+
{ key: C.switch.type, value: C.switch.name },
|
|
4754
|
+
{ key: C["check-box"].type, value: C["check-box"].name }
|
|
4715
4755
|
],
|
|
4716
4756
|
Enum: [
|
|
4717
|
-
{ key:
|
|
4718
|
-
{ key:
|
|
4757
|
+
{ key: C["combo-list"].type, value: C["combo-list"].name },
|
|
4758
|
+
{ key: C["radio-group"].type, value: C["radio-group"].name }
|
|
4719
4759
|
],
|
|
4720
4760
|
Object: [
|
|
4721
|
-
{ key:
|
|
4722
|
-
{ key:
|
|
4723
|
-
{ key:
|
|
4761
|
+
{ key: C.lookup.type, value: C.lookup.name },
|
|
4762
|
+
{ key: C["combo-list"].type, value: C["combo-list"].name },
|
|
4763
|
+
{ key: C["radio-group"].type, value: C["radio-group"].name }
|
|
4724
4764
|
]
|
|
4725
4765
|
});
|
|
4726
4766
|
let ge = ee;
|
|
4727
|
-
const
|
|
4728
|
-
class Wo extends
|
|
4729
|
-
constructor(
|
|
4730
|
-
super(
|
|
4767
|
+
const qo = v(0);
|
|
4768
|
+
class Wo extends Ao {
|
|
4769
|
+
constructor(e, r) {
|
|
4770
|
+
super(e, r);
|
|
4771
|
+
p(this, "responseLayoutEditorFunction");
|
|
4772
|
+
this.responseLayoutEditorFunction = Yt(this.formSchemaUtils);
|
|
4731
4773
|
}
|
|
4732
|
-
getPropertyConfig(
|
|
4733
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(
|
|
4774
|
+
getPropertyConfig(e, r) {
|
|
4775
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
4734
4776
|
}
|
|
4735
|
-
getBasicProperties(
|
|
4777
|
+
getBasicProperties(e, r) {
|
|
4736
4778
|
var s;
|
|
4737
|
-
var
|
|
4738
|
-
this.setDesignViewModelField(
|
|
4739
|
-
const
|
|
4779
|
+
var o = this;
|
|
4780
|
+
this.setDesignViewModelField(e);
|
|
4781
|
+
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
4740
4782
|
return {
|
|
4741
4783
|
description: "Basic Information",
|
|
4742
4784
|
title: "基本信息",
|
|
@@ -4748,8 +4790,8 @@ class Wo extends So {
|
|
|
4748
4790
|
readonly: !0
|
|
4749
4791
|
},
|
|
4750
4792
|
type: {
|
|
4751
|
-
description: "
|
|
4752
|
-
title: "
|
|
4793
|
+
description: "编辑器类型",
|
|
4794
|
+
title: "编辑器类型",
|
|
4753
4795
|
type: "string",
|
|
4754
4796
|
refreshPanelAfterChanged: !0,
|
|
4755
4797
|
$converter: "/converter/change-editor.converter",
|
|
@@ -4758,7 +4800,7 @@ class Wo extends So {
|
|
|
4758
4800
|
textField: "value",
|
|
4759
4801
|
valueField: "key",
|
|
4760
4802
|
editable: !1,
|
|
4761
|
-
data:
|
|
4803
|
+
data: o.designViewModelField ? ge.getEditorTypesByMDataType((s = o.designViewModelField.type) == null ? void 0 : s.name) : ge.getAllInputTypes()
|
|
4762
4804
|
}
|
|
4763
4805
|
},
|
|
4764
4806
|
label: {
|
|
@@ -4774,8 +4816,8 @@ class Wo extends So {
|
|
|
4774
4816
|
type: "field-selector",
|
|
4775
4817
|
bindingType: { enable: !1 },
|
|
4776
4818
|
editorParams: {
|
|
4777
|
-
propertyData:
|
|
4778
|
-
formBasicInfo:
|
|
4819
|
+
propertyData: e,
|
|
4820
|
+
formBasicInfo: a
|
|
4779
4821
|
},
|
|
4780
4822
|
columns: [
|
|
4781
4823
|
{ field: "name", title: "字段名称" },
|
|
@@ -4783,22 +4825,27 @@ class Wo extends So {
|
|
|
4783
4825
|
{ field: "fieldType", title: "字段类型" }
|
|
4784
4826
|
],
|
|
4785
4827
|
textField: "bindingField",
|
|
4786
|
-
data:
|
|
4828
|
+
data: i
|
|
4787
4829
|
}
|
|
4788
4830
|
}
|
|
4789
4831
|
},
|
|
4790
|
-
setPropertyRelates(
|
|
4791
|
-
if (
|
|
4792
|
-
switch (
|
|
4832
|
+
setPropertyRelates(d, u) {
|
|
4833
|
+
if (d)
|
|
4834
|
+
switch (d && d.propertyID) {
|
|
4793
4835
|
case "type": {
|
|
4794
|
-
|
|
4836
|
+
o.changeControlType(e, d, r);
|
|
4837
|
+
break;
|
|
4838
|
+
}
|
|
4839
|
+
case "label": {
|
|
4840
|
+
d.needRefreshControlTree = !0;
|
|
4795
4841
|
break;
|
|
4796
4842
|
}
|
|
4797
4843
|
}
|
|
4798
4844
|
}
|
|
4799
4845
|
};
|
|
4800
4846
|
}
|
|
4801
|
-
getAppearanceProperties(
|
|
4847
|
+
getAppearanceProperties(e, r) {
|
|
4848
|
+
var o = this;
|
|
4802
4849
|
return {
|
|
4803
4850
|
title: "样式",
|
|
4804
4851
|
description: "Appearance",
|
|
@@ -4819,61 +4866,74 @@ class Wo extends So {
|
|
|
4819
4866
|
description: "响应式列宽",
|
|
4820
4867
|
title: "响应式列宽",
|
|
4821
4868
|
type: "boolean",
|
|
4822
|
-
visible: !
|
|
4869
|
+
visible: !0,
|
|
4870
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
4871
|
+
refreshPanelAfterChanged: !0,
|
|
4823
4872
|
editor: {
|
|
4824
|
-
type: "response-layout-editor-setting"
|
|
4825
|
-
|
|
4826
|
-
|
|
4873
|
+
type: "response-layout-editor-setting",
|
|
4874
|
+
initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
|
|
4875
|
+
}
|
|
4827
4876
|
}
|
|
4877
|
+
},
|
|
4878
|
+
setPropertyRelates(a, i) {
|
|
4879
|
+
if (a)
|
|
4880
|
+
switch (a && a.propertyID) {
|
|
4881
|
+
case "responseLayout":
|
|
4882
|
+
o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, r), delete e.responseLayout;
|
|
4883
|
+
break;
|
|
4884
|
+
case "class":
|
|
4885
|
+
o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, r);
|
|
4886
|
+
break;
|
|
4887
|
+
}
|
|
4828
4888
|
}
|
|
4829
4889
|
};
|
|
4830
4890
|
}
|
|
4831
|
-
getEditorProperties(
|
|
4832
|
-
return this.getComponentConfig(
|
|
4891
|
+
getEditorProperties(e) {
|
|
4892
|
+
return this.getComponentConfig(e);
|
|
4833
4893
|
}
|
|
4834
4894
|
/**
|
|
4835
4895
|
* 卡片控件:切换控件类型后事件
|
|
4836
4896
|
* @param propertyData 控件DOM属性
|
|
4837
4897
|
* @param newControlType 新控件类型
|
|
4838
4898
|
*/
|
|
4839
|
-
changeControlType(
|
|
4840
|
-
var
|
|
4841
|
-
const
|
|
4842
|
-
if (!
|
|
4899
|
+
changeControlType(e, r, o) {
|
|
4900
|
+
var f, l, c, m;
|
|
4901
|
+
const a = r.propertyValue, i = o && o.parent && o.parent.schema;
|
|
4902
|
+
if (!i)
|
|
4843
4903
|
return;
|
|
4844
|
-
const s =
|
|
4845
|
-
let
|
|
4904
|
+
const s = i.contents.findIndex((y) => y.id === e.id), d = i.contents[s];
|
|
4905
|
+
let u;
|
|
4846
4906
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
4847
4907
|
editor: {
|
|
4848
|
-
$type:
|
|
4908
|
+
$type: a
|
|
4849
4909
|
},
|
|
4850
4910
|
name: this.designViewModelField.name,
|
|
4851
4911
|
require: this.designViewModelField.require,
|
|
4852
4912
|
readonly: this.designViewModelField.readonly
|
|
4853
|
-
}, !1),
|
|
4854
|
-
id:
|
|
4855
|
-
appearance:
|
|
4856
|
-
size:
|
|
4857
|
-
label:
|
|
4858
|
-
binding:
|
|
4859
|
-
visible:
|
|
4860
|
-
}), Object.assign(
|
|
4861
|
-
isTextArea:
|
|
4862
|
-
placeholder: (
|
|
4863
|
-
holdPlace: (
|
|
4864
|
-
readonly: (
|
|
4865
|
-
require: (
|
|
4866
|
-
}),
|
|
4867
|
-
(
|
|
4868
|
-
),
|
|
4869
|
-
}
|
|
4870
|
-
getComponentConfig(
|
|
4871
|
-
const
|
|
4872
|
-
description: "
|
|
4873
|
-
title: "
|
|
4913
|
+
}, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), u || (u = Ie("form-group") || {}, u.editor = Ie(a) || {}, delete u.editor.id, delete u.editor.binding, delete u.editor.appearance), Object.assign(u, {
|
|
4914
|
+
id: d.id,
|
|
4915
|
+
appearance: d.appearance,
|
|
4916
|
+
size: d.size,
|
|
4917
|
+
label: d.label,
|
|
4918
|
+
binding: d.binding,
|
|
4919
|
+
visible: d.visible
|
|
4920
|
+
}), Object.assign(u.editor, {
|
|
4921
|
+
isTextArea: u.isTextArea && d.isTextArea,
|
|
4922
|
+
placeholder: (f = d.editor) == null ? void 0 : f.placeholder,
|
|
4923
|
+
holdPlace: (l = d.editor) == null ? void 0 : l.holdPlace,
|
|
4924
|
+
readonly: (c = d.editor) == null ? void 0 : c.readonly,
|
|
4925
|
+
require: (m = d.editor) == null ? void 0 : m.require
|
|
4926
|
+
}), i.contents.splice(s, 1), i.contents.splice(s, 0, u), o.schema = Object.assign(d, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
4927
|
+
(y) => y.classList.remove("dgComponentSelected")
|
|
4928
|
+
), qo.value++;
|
|
4929
|
+
}
|
|
4930
|
+
getComponentConfig(e, r = {}, o = {}) {
|
|
4931
|
+
const a = Object.assign({
|
|
4932
|
+
description: "编辑器",
|
|
4933
|
+
title: "编辑器",
|
|
4874
4934
|
type: "input-group",
|
|
4875
4935
|
$converter: "/converter/property-editor.converter"
|
|
4876
|
-
},
|
|
4936
|
+
}, r), i = Object.assign({
|
|
4877
4937
|
readonly: {
|
|
4878
4938
|
description: "",
|
|
4879
4939
|
title: "只读",
|
|
@@ -4894,11 +4954,59 @@ class Wo extends So {
|
|
|
4894
4954
|
title: "提示文本",
|
|
4895
4955
|
type: "string"
|
|
4896
4956
|
}
|
|
4897
|
-
},
|
|
4898
|
-
return { ...
|
|
4957
|
+
}, o);
|
|
4958
|
+
return { ...a, properties: { ...i } };
|
|
4959
|
+
}
|
|
4960
|
+
/**
|
|
4961
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
4962
|
+
* @param controlClass 控件样式
|
|
4963
|
+
* @param controlId 控件Id
|
|
4964
|
+
* @param componentId 控件所在组件id
|
|
4965
|
+
*/
|
|
4966
|
+
updateUnifiedLayoutAfterControlChanged(e, r, o) {
|
|
4967
|
+
const a = e.split(" ");
|
|
4968
|
+
let i = a.find((l) => /^col-([1-9]|10|11|12)$/.test(l)), s = a.find((l) => /^col-md-([1-9]|10|11|12)$/.test(l)), d = a.find((l) => /^col-xl-([1-9]|10|11|12)$/.test(l)), u = a.find((l) => /^col-el-([1-9]|10|11|12)$/.test(l));
|
|
4969
|
+
i = i || "col-12", s = s || "col-md-" + i.replace("col-", ""), d = d || "col-xl-" + s.replace("col-md-", ""), u = u || "col-el-" + d.replace("col-xl-", "");
|
|
4970
|
+
const f = {
|
|
4971
|
+
id: r,
|
|
4972
|
+
columnInSM: parseInt(i.replace("col-", ""), 10),
|
|
4973
|
+
columnInMD: parseInt(s.replace("col-md-", ""), 10),
|
|
4974
|
+
columnInLG: parseInt(d.replace("col-xl-", ""), 10),
|
|
4975
|
+
columnInEL: parseInt(u.replace("col-el-", ""), 10)
|
|
4976
|
+
};
|
|
4977
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, f);
|
|
4978
|
+
}
|
|
4979
|
+
/**
|
|
4980
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
4981
|
+
* @param componentId 组件Id
|
|
4982
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
4983
|
+
*/
|
|
4984
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
|
|
4985
|
+
const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
4986
|
+
if (!o || !o.unifiedLayout)
|
|
4987
|
+
return;
|
|
4988
|
+
const a = [];
|
|
4989
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), r) {
|
|
4990
|
+
const y = a.find((M) => M.id === r.id);
|
|
4991
|
+
Object.assign(y || {}, r);
|
|
4992
|
+
}
|
|
4993
|
+
const i = a.map((y) => y.columnInSM), s = a.map((y) => y.columnInMD), d = a.map((y) => y.columnInLG), u = a.map((y) => y.columnInEL), f = this.checkIsUniqueColumn(i) ? i[0] : null, l = this.checkIsUniqueColumn(s) ? s[0] : null, c = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(u) ? u[0] : null;
|
|
4994
|
+
Object.assign(o.unifiedLayout, {
|
|
4995
|
+
uniqueColClassInSM: f,
|
|
4996
|
+
uniqueColClassInMD: l,
|
|
4997
|
+
uniqueColClassInLG: c,
|
|
4998
|
+
uniqueColClassInEL: m
|
|
4999
|
+
});
|
|
5000
|
+
}
|
|
5001
|
+
/**
|
|
5002
|
+
* 校验宽度样式值是否一致
|
|
5003
|
+
*/
|
|
5004
|
+
checkIsUniqueColumn(e) {
|
|
5005
|
+
const r = new Set(e);
|
|
5006
|
+
return Array.from(r).length === 1;
|
|
4899
5007
|
}
|
|
4900
5008
|
}
|
|
4901
|
-
class
|
|
5009
|
+
class _o extends Wo {
|
|
4902
5010
|
constructor(n, e) {
|
|
4903
5011
|
super(n, e);
|
|
4904
5012
|
}
|
|
@@ -4938,105 +5046,105 @@ class qo extends Wo {
|
|
|
4938
5046
|
});
|
|
4939
5047
|
}
|
|
4940
5048
|
}
|
|
4941
|
-
function
|
|
5049
|
+
function Ro(t, n) {
|
|
4942
5050
|
t.schema;
|
|
4943
|
-
const e =
|
|
4944
|
-
function o(
|
|
5051
|
+
const e = v(!0), r = v(!0);
|
|
5052
|
+
function o(l) {
|
|
4945
5053
|
return !1;
|
|
4946
5054
|
}
|
|
4947
5055
|
function a() {
|
|
4948
5056
|
return !1;
|
|
4949
5057
|
}
|
|
4950
|
-
function
|
|
5058
|
+
function i() {
|
|
4951
5059
|
return !1;
|
|
4952
5060
|
}
|
|
4953
|
-
function
|
|
5061
|
+
function s() {
|
|
4954
5062
|
return !0;
|
|
4955
5063
|
}
|
|
4956
|
-
function
|
|
5064
|
+
function d(l) {
|
|
4957
5065
|
}
|
|
4958
|
-
function
|
|
5066
|
+
function u() {
|
|
4959
5067
|
}
|
|
4960
|
-
function
|
|
5068
|
+
function f(l) {
|
|
4961
5069
|
return null;
|
|
4962
5070
|
}
|
|
4963
5071
|
return {
|
|
4964
5072
|
canAccepts: o,
|
|
4965
5073
|
checkCanDeleteComponent: a,
|
|
4966
|
-
checkCanMoveComponent:
|
|
4967
|
-
hideNestedPaddingInDesginerView:
|
|
4968
|
-
onAcceptMovedChildElement:
|
|
4969
|
-
resolveComponentContext:
|
|
5074
|
+
checkCanMoveComponent: i,
|
|
5075
|
+
hideNestedPaddingInDesginerView: s,
|
|
5076
|
+
onAcceptMovedChildElement: d,
|
|
5077
|
+
resolveComponentContext: u,
|
|
4970
5078
|
triggerBelongedComponentToMoveWhenMoved: e,
|
|
4971
5079
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
4972
|
-
getPropsConfig:
|
|
5080
|
+
getPropsConfig: f
|
|
4973
5081
|
};
|
|
4974
5082
|
}
|
|
4975
|
-
function
|
|
5083
|
+
function $o(t, n) {
|
|
4976
5084
|
const {
|
|
4977
5085
|
canAccepts: e,
|
|
4978
5086
|
checkCanDeleteComponent: r,
|
|
4979
5087
|
checkCanMoveComponent: o,
|
|
4980
5088
|
hideNestedPaddingInDesginerView: a,
|
|
4981
|
-
onAcceptMovedChildElement:
|
|
4982
|
-
resolveComponentContext:
|
|
4983
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
4984
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
4985
|
-
} =
|
|
4986
|
-
function
|
|
4987
|
-
return new
|
|
5089
|
+
onAcceptMovedChildElement: i,
|
|
5090
|
+
resolveComponentContext: s,
|
|
5091
|
+
triggerBelongedComponentToMoveWhenMoved: d,
|
|
5092
|
+
triggerBelongedComponentToDeleteWhenDeleted: u
|
|
5093
|
+
} = Ro(t), f = t.schema;
|
|
5094
|
+
function l(c, m) {
|
|
5095
|
+
return new _o(c, n).getPropertyConfig(f, m);
|
|
4988
5096
|
}
|
|
4989
5097
|
return {
|
|
4990
5098
|
canAccepts: e,
|
|
4991
5099
|
checkCanDeleteComponent: r,
|
|
4992
5100
|
checkCanMoveComponent: o,
|
|
4993
5101
|
hideNestedPaddingInDesginerView: a,
|
|
4994
|
-
onAcceptMovedChildElement:
|
|
4995
|
-
resolveComponentContext:
|
|
4996
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
4997
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
4998
|
-
getPropsConfig:
|
|
5102
|
+
onAcceptMovedChildElement: i,
|
|
5103
|
+
resolveComponentContext: s,
|
|
5104
|
+
triggerBelongedComponentToMoveWhenMoved: d,
|
|
5105
|
+
triggerBelongedComponentToDeleteWhenDeleted: u,
|
|
5106
|
+
getPropsConfig: l
|
|
4999
5107
|
};
|
|
5000
5108
|
}
|
|
5001
|
-
const
|
|
5109
|
+
const jo = /* @__PURE__ */ re({
|
|
5002
5110
|
name: "FTimePickerDesign",
|
|
5003
5111
|
props: De,
|
|
5004
5112
|
emits: ["datePicked", "update:modelValue"],
|
|
5005
5113
|
setup(t, n) {
|
|
5006
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r =
|
|
5114
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(), i = me("designer-host-service"), s = me("design-item-context"), d = $o(s, i), u = Yo(a, s, d);
|
|
5007
5115
|
fe(() => {
|
|
5008
|
-
a.value.componentInstance =
|
|
5009
|
-
}), n.expose(
|
|
5010
|
-
function
|
|
5116
|
+
a.value.componentInstance = u;
|
|
5117
|
+
}), n.expose(u.value);
|
|
5118
|
+
function f() {
|
|
5011
5119
|
}
|
|
5012
|
-
return () =>
|
|
5120
|
+
return () => b("div", {
|
|
5013
5121
|
ref: a
|
|
5014
|
-
}, [
|
|
5122
|
+
}, [b(de, {
|
|
5015
5123
|
ref: o,
|
|
5016
5124
|
modelValue: r.value,
|
|
5017
|
-
"onUpdate:modelValue": (
|
|
5125
|
+
"onUpdate:modelValue": (l) => r.value = l,
|
|
5018
5126
|
buttonContent: e,
|
|
5019
5127
|
enableClear: !0,
|
|
5020
5128
|
onClickButton: () => void 0
|
|
5021
5129
|
}, {
|
|
5022
|
-
default: () => [
|
|
5130
|
+
default: () => [b(Et("f-time-picker-time-view"), null, null)]
|
|
5023
5131
|
})]);
|
|
5024
5132
|
}
|
|
5025
5133
|
});
|
|
5026
5134
|
te.install = (t) => {
|
|
5027
|
-
t.component(te.name, te).component(
|
|
5135
|
+
t.component(te.name, te).component(Te.name, Te);
|
|
5028
5136
|
};
|
|
5029
5137
|
te.register = (t, n, e, r) => {
|
|
5030
|
-
t["time-picker"] = te, n["time-picker"] =
|
|
5138
|
+
t["time-picker"] = te, n["time-picker"] = Xe;
|
|
5031
5139
|
};
|
|
5032
5140
|
te.registerDesigner = (t, n, e) => {
|
|
5033
|
-
t["time-picker"] =
|
|
5141
|
+
t["time-picker"] = jo, n["time-picker"] = Xe;
|
|
5034
5142
|
};
|
|
5035
5143
|
export {
|
|
5036
5144
|
te as FTimePicker,
|
|
5037
|
-
|
|
5145
|
+
Te as FTimePickerTimeView,
|
|
5038
5146
|
te as default,
|
|
5039
|
-
|
|
5147
|
+
Xe as propsResolver,
|
|
5040
5148
|
De as timePickerProps,
|
|
5041
|
-
|
|
5149
|
+
rn as timeProps
|
|
5042
5150
|
};
|