@farris/ui-vue 1.3.0 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +454 -398
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +479 -476
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +255 -252
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +652 -567
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +518 -521
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +659 -553
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +162 -155
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +866 -747
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +371 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1174 -1280
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +340 -991
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +6066 -5847
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3400 -3486
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2328 -2446
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9551 -1200
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +234 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1996 -2630
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +138 -123
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +548 -586
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2871 -3736
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3380 -3645
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10543 -3207
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9775 -1312
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +442 -438
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +587 -807
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +415 -381
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +361 -1024
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2265 -2371
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6425 -6257
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +6164 -5946
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +524 -1474
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +547 -502
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +646 -574
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1181 -2028
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1185 -2027
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +442 -1368
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +238 -235
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1635 -1713
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +791 -716
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12203 -5274
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1873 -520
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +299 -300
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +176 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +715 -659
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1032 -1883
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4767 -5693
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +169 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +490 -1167
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +154 -151
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +575 -1204
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +279 -276
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +478 -428
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2591 -3326
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +442 -439
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +309 -307
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +500 -430
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1391 -1341
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +574 -575
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3422 -3536
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2661 -2764
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +675 -674
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +300 -297
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +454 -1089
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +709 -706
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +54780 -52757
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +5 -4
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +9 -11
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +3 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -41
- package/types/designer-canvas/src/types.d.ts +10 -21
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +3 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
1
|
+
var kt = Object.defineProperty;
|
|
2
|
+
var Ct = (t, n, e) => n in t ? kt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var f = (t, n, e) => Ct(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { ref as x, defineComponent as te, watch as G, computed as I, onMounted as ce, createVNode as w, createTextVNode as ve, mergeProps as Te, Teleport as Tt, createApp as Pt, onUnmounted as Ot, inject as me, nextTick as Se, withDirectives as Dt, vShow as Ht, Fragment as Et, resolveComponent as Bt } from "vue";
|
|
5
|
+
import { isPlainObject as Ie, cloneDeep as $e } from "lodash-es";
|
|
6
|
+
import Ft from "../button-edit/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
import { withInstall as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
import { resolveAppearance as Vt } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import St from "../tags/index.esm.js";
|
|
10
|
+
import It from "../popover/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as Nt, DgControl as Ne } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { withInstall as Lt } from "../common/index.esm.js";
|
|
13
|
+
const je = {}, Re = {};
|
|
14
|
+
function Pe(t) {
|
|
15
|
+
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((i, u) => ((!o || !r.find((p) => p === u)) && (i[u] = n[u].type === "object" && n[u].properties ? Pe(n[u]) : $e(n[u].default)), i), {});
|
|
16
|
+
if (e && (!o || !r.find((i) => i === "id"))) {
|
|
17
|
+
const i = e.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
a.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
18
21
|
}
|
|
19
|
-
function
|
|
20
|
-
const r =
|
|
22
|
+
function Qe(t, n = {}, e) {
|
|
23
|
+
const r = je[t];
|
|
21
24
|
if (r) {
|
|
22
|
-
let o =
|
|
23
|
-
const a =
|
|
24
|
-
return o = a ? a({ getSchemaByType:
|
|
25
|
+
let o = Pe(r);
|
|
26
|
+
const a = Re[t];
|
|
27
|
+
return o = a ? a({ getSchemaByType: Qe }, o, n, e) : o, o;
|
|
25
28
|
}
|
|
26
29
|
return null;
|
|
27
30
|
}
|
|
28
|
-
function
|
|
29
|
-
const e =
|
|
30
|
-
return Object.keys(
|
|
31
|
+
function Wt(t, n) {
|
|
32
|
+
const e = Pe(n);
|
|
33
|
+
return Object.keys(e).reduce((r, o) => (r[o] && Ie(r[o]) && Ie(t[o] || !t[o]) ? Object.assign(r[o], t[o] || {}) : r[o] = t[o], r), e), e;
|
|
31
34
|
}
|
|
32
|
-
function
|
|
35
|
+
function Yt(t, n) {
|
|
33
36
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
34
37
|
if (n.has(o)) {
|
|
35
38
|
const a = n.get(o);
|
|
@@ -44,65 +47,65 @@ function qt(t, n) {
|
|
|
44
47
|
return r;
|
|
45
48
|
}, {});
|
|
46
49
|
}
|
|
47
|
-
function
|
|
48
|
-
const r =
|
|
49
|
-
return
|
|
50
|
+
function qt(t, n, e = /* @__PURE__ */ new Map()) {
|
|
51
|
+
const r = Wt(t, n);
|
|
52
|
+
return Yt(r, e);
|
|
50
53
|
}
|
|
51
|
-
function
|
|
52
|
-
function n(
|
|
53
|
-
if (typeof
|
|
54
|
-
return c
|
|
55
|
-
if (typeof
|
|
56
|
-
const m = Object.keys(
|
|
54
|
+
function At(t = {}) {
|
|
55
|
+
function n(c, d, s, l) {
|
|
56
|
+
if (typeof s == "number")
|
|
57
|
+
return l[c].length === s;
|
|
58
|
+
if (typeof s == "object") {
|
|
59
|
+
const m = Object.keys(s)[0], h = s[m];
|
|
57
60
|
if (m === "not")
|
|
58
|
-
return Number(c
|
|
61
|
+
return Number(l[c].length) !== Number(h);
|
|
59
62
|
if (m === "moreThan")
|
|
60
|
-
return Number(c
|
|
63
|
+
return Number(l[c].length) >= Number(h);
|
|
61
64
|
if (m === "lessThan")
|
|
62
|
-
return Number(c
|
|
65
|
+
return Number(l[c].length) <= Number(h);
|
|
63
66
|
}
|
|
64
67
|
return !1;
|
|
65
68
|
}
|
|
66
|
-
function e(
|
|
67
|
-
return c
|
|
69
|
+
function e(c, d, s, l) {
|
|
70
|
+
return l[c] && l[c].propertyValue && String(l[c].propertyValue.value) === String(s);
|
|
68
71
|
}
|
|
69
72
|
const r = /* @__PURE__ */ new Map([
|
|
70
73
|
["length", n],
|
|
71
74
|
["getProperty", e]
|
|
72
75
|
]);
|
|
73
|
-
Object.keys(t).reduce((
|
|
74
|
-
function o(
|
|
75
|
-
const
|
|
76
|
-
return typeof
|
|
77
|
-
if (
|
|
78
|
-
return { target:
|
|
79
|
-
const m =
|
|
80
|
-
return { target:
|
|
76
|
+
Object.keys(t).reduce((c, d) => (c.set(d, t[d]), c), r);
|
|
77
|
+
function o(c, d) {
|
|
78
|
+
const s = c;
|
|
79
|
+
return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: c, value: !!d }] : typeof d == "object" ? Object.keys(d).map((l) => {
|
|
80
|
+
if (l === "length")
|
|
81
|
+
return { target: s, operator: "length", param: null, value: d[l] };
|
|
82
|
+
const m = l, h = d[l];
|
|
83
|
+
return { target: s, operator: "getProperty", param: m, value: h };
|
|
81
84
|
}) : [];
|
|
82
85
|
}
|
|
83
|
-
function a(
|
|
84
|
-
return Object.keys(
|
|
85
|
-
const m = o(
|
|
86
|
-
return
|
|
86
|
+
function a(c) {
|
|
87
|
+
return Object.keys(c).reduce((s, l) => {
|
|
88
|
+
const m = o(l, c[l]);
|
|
89
|
+
return s.push(...m), s;
|
|
87
90
|
}, []);
|
|
88
91
|
}
|
|
89
|
-
function i(
|
|
90
|
-
if (r.has(
|
|
91
|
-
const
|
|
92
|
-
return
|
|
92
|
+
function i(c, d) {
|
|
93
|
+
if (r.has(c.operator)) {
|
|
94
|
+
const s = r.get(c.operator);
|
|
95
|
+
return s && s(c.target, c.param, c.value, d) || !1;
|
|
93
96
|
}
|
|
94
97
|
return !1;
|
|
95
98
|
}
|
|
96
|
-
function
|
|
97
|
-
return a(
|
|
99
|
+
function u(c, d) {
|
|
100
|
+
return a(c).reduce((m, h) => m && i(h, d), !0);
|
|
98
101
|
}
|
|
99
|
-
function
|
|
100
|
-
const
|
|
101
|
-
return
|
|
102
|
+
function p(c, d) {
|
|
103
|
+
const s = Object.keys(c), l = s.includes("allOf"), m = s.includes("anyOf"), h = l || m, O = (h ? c[h ? l ? "allOf" : "anyOf" : "allOf"] : [c]).map((b) => u(b, d));
|
|
104
|
+
return l ? !O.includes(!1) : O.includes(!0);
|
|
102
105
|
}
|
|
103
|
-
return { parseValueSchema:
|
|
106
|
+
return { parseValueSchema: p };
|
|
104
107
|
}
|
|
105
|
-
const
|
|
108
|
+
const T = {
|
|
106
109
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
107
110
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
108
111
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -140,21 +143,22 @@ const C = {
|
|
|
140
143
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
141
144
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
142
145
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
143
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
144
|
-
|
|
145
|
-
_t
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
147
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
148
|
+
}, _t = {}, Gt = {};
|
|
149
|
+
At();
|
|
150
|
+
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i, u, p, c) => u, o = {}, a = (i) => i) {
|
|
151
|
+
return je[n.title] = n, Re[n.title] = r, _t[n.title] = o, Gt[n.title] = a, (i = {}) => {
|
|
152
|
+
const u = qt(i, n, e), p = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
153
|
+
return Object.assign(p, u);
|
|
150
154
|
};
|
|
151
155
|
}
|
|
152
|
-
function
|
|
156
|
+
function $t(t, n) {
|
|
153
157
|
return { customClass: n.class, customStyle: n.style };
|
|
154
158
|
}
|
|
155
|
-
const
|
|
156
|
-
["appearance",
|
|
157
|
-
]),
|
|
159
|
+
const jt = /* @__PURE__ */ new Map([
|
|
160
|
+
["appearance", $t]
|
|
161
|
+
]), Rt = "https://json-schema.org/draft/2020-12/schema", Qt = "https://farris-design.gitee.io/time-picker.schema.json", Ut = "time-picker", Xt = "A Farris Input Component", zt = "object", Jt = {
|
|
158
162
|
id: {
|
|
159
163
|
description: "The unique identifier for a time picker",
|
|
160
164
|
type: "string"
|
|
@@ -231,27 +235,28 @@ const Gt = /* @__PURE__ */ new Map([
|
|
|
231
235
|
type: "boolean",
|
|
232
236
|
default: !1
|
|
233
237
|
}
|
|
234
|
-
},
|
|
238
|
+
}, Zt = [
|
|
235
239
|
"id",
|
|
236
240
|
"type"
|
|
237
|
-
],
|
|
241
|
+
], Kt = [
|
|
238
242
|
"id",
|
|
239
243
|
"appearance",
|
|
240
|
-
"binding"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
$
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
244
|
+
"binding",
|
|
245
|
+
"visible"
|
|
246
|
+
], en = {
|
|
247
|
+
$schema: Rt,
|
|
248
|
+
$id: Qt,
|
|
249
|
+
title: Ut,
|
|
250
|
+
description: Xt,
|
|
251
|
+
type: zt,
|
|
252
|
+
properties: Jt,
|
|
253
|
+
required: Zt,
|
|
254
|
+
ignore: Kt
|
|
250
255
|
};
|
|
251
|
-
function
|
|
256
|
+
function tn(t, n, e) {
|
|
252
257
|
return n;
|
|
253
258
|
}
|
|
254
|
-
const
|
|
259
|
+
const Oe = {
|
|
255
260
|
/**
|
|
256
261
|
* 组件值,这个是与指定的format格式相对应的值
|
|
257
262
|
*/
|
|
@@ -279,7 +284,7 @@ const De = {
|
|
|
279
284
|
disabled: { type: Boolean, default: !1 },
|
|
280
285
|
readonly: { type: Boolean, default: !1 },
|
|
281
286
|
editable: { type: Boolean, default: !0 }
|
|
282
|
-
}, Xe = Ue(
|
|
287
|
+
}, Xe = Ue(Oe, en, jt, tn), nn = {
|
|
283
288
|
modelValue: {
|
|
284
289
|
type: String,
|
|
285
290
|
default: ""
|
|
@@ -333,44 +338,44 @@ const De = {
|
|
|
333
338
|
default: !1
|
|
334
339
|
}
|
|
335
340
|
};
|
|
336
|
-
function
|
|
341
|
+
function _(t) {
|
|
337
342
|
const n = Object.prototype.toString.call(t);
|
|
338
343
|
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);
|
|
339
344
|
}
|
|
340
|
-
function
|
|
345
|
+
function W(t, n) {
|
|
341
346
|
return t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
342
347
|
}
|
|
343
348
|
function ze(t, n) {
|
|
344
|
-
const e =
|
|
345
|
-
return isNaN(n) ?
|
|
349
|
+
const e = _(t);
|
|
350
|
+
return isNaN(n) ? W(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
346
351
|
}
|
|
347
|
-
const Je = 6048e5,
|
|
348
|
-
let
|
|
349
|
-
function
|
|
350
|
-
return
|
|
352
|
+
const Je = 6048e5, rn = 864e5, on = 6e4, an = 36e5, sn = 1e3;
|
|
353
|
+
let un = {};
|
|
354
|
+
function ne() {
|
|
355
|
+
return un;
|
|
351
356
|
}
|
|
352
|
-
function
|
|
353
|
-
var
|
|
354
|
-
const e =
|
|
357
|
+
function X(t, n) {
|
|
358
|
+
var u, p, c, d;
|
|
359
|
+
const e = ne(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((p = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : p.weekStartsOn) ?? e.weekStartsOn ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = _(t), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
355
360
|
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
356
361
|
}
|
|
357
|
-
function
|
|
358
|
-
return
|
|
362
|
+
function ee(t) {
|
|
363
|
+
return X(t, { weekStartsOn: 1 });
|
|
359
364
|
}
|
|
360
365
|
function Ze(t) {
|
|
361
|
-
const n =
|
|
366
|
+
const n = _(t), e = n.getFullYear(), r = W(t, 0);
|
|
362
367
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
363
|
-
const o =
|
|
368
|
+
const o = ee(r), a = W(t, 0);
|
|
364
369
|
a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0);
|
|
365
|
-
const i =
|
|
370
|
+
const i = ee(a);
|
|
366
371
|
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1;
|
|
367
372
|
}
|
|
368
|
-
function
|
|
369
|
-
const n =
|
|
373
|
+
function Le(t) {
|
|
374
|
+
const n = _(t);
|
|
370
375
|
return n.setHours(0, 0, 0, 0), n;
|
|
371
376
|
}
|
|
372
377
|
function he(t) {
|
|
373
|
-
const n =
|
|
378
|
+
const n = _(t), e = new Date(
|
|
374
379
|
Date.UTC(
|
|
375
380
|
n.getFullYear(),
|
|
376
381
|
n.getMonth(),
|
|
@@ -383,28 +388,28 @@ function he(t) {
|
|
|
383
388
|
);
|
|
384
389
|
return e.setUTCFullYear(n.getFullYear()), +t - +e;
|
|
385
390
|
}
|
|
386
|
-
function
|
|
387
|
-
const e =
|
|
388
|
-
return Math.round((o - a) /
|
|
391
|
+
function ln(t, n) {
|
|
392
|
+
const e = Le(t), r = Le(n), o = +e - he(e), a = +r - he(r);
|
|
393
|
+
return Math.round((o - a) / rn);
|
|
389
394
|
}
|
|
390
|
-
function
|
|
391
|
-
const n = Ze(t), e =
|
|
392
|
-
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0),
|
|
395
|
+
function cn(t) {
|
|
396
|
+
const n = Ze(t), e = W(t, 0);
|
|
397
|
+
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), ee(e);
|
|
393
398
|
}
|
|
394
|
-
function
|
|
399
|
+
function dn(t) {
|
|
395
400
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
396
401
|
}
|
|
397
402
|
function Ke(t) {
|
|
398
|
-
if (!
|
|
403
|
+
if (!dn(t) && typeof t != "number")
|
|
399
404
|
return !1;
|
|
400
|
-
const n =
|
|
405
|
+
const n = _(t);
|
|
401
406
|
return !isNaN(Number(n));
|
|
402
407
|
}
|
|
403
|
-
function
|
|
404
|
-
const n =
|
|
408
|
+
function fn(t) {
|
|
409
|
+
const n = _(t), e = W(t, 0);
|
|
405
410
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
406
411
|
}
|
|
407
|
-
const
|
|
412
|
+
const pn = {
|
|
408
413
|
lessThanXSeconds: {
|
|
409
414
|
one: "less than a second",
|
|
410
415
|
other: "less than {{count}} seconds"
|
|
@@ -466,9 +471,9 @@ const mn = {
|
|
|
466
471
|
one: "almost 1 year",
|
|
467
472
|
other: "almost {{count}} years"
|
|
468
473
|
}
|
|
469
|
-
},
|
|
474
|
+
}, mn = (t, n, e) => {
|
|
470
475
|
let r;
|
|
471
|
-
const o =
|
|
476
|
+
const o = pn[t];
|
|
472
477
|
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;
|
|
473
478
|
};
|
|
474
479
|
function xe(t) {
|
|
@@ -477,62 +482,62 @@ function xe(t) {
|
|
|
477
482
|
return t.formats[e] || t.formats[t.defaultWidth];
|
|
478
483
|
};
|
|
479
484
|
}
|
|
480
|
-
const
|
|
485
|
+
const hn = {
|
|
481
486
|
full: "EEEE, MMMM do, y",
|
|
482
487
|
long: "MMMM do, y",
|
|
483
488
|
medium: "MMM d, y",
|
|
484
489
|
short: "MM/dd/yyyy"
|
|
485
|
-
},
|
|
490
|
+
}, yn = {
|
|
486
491
|
full: "h:mm:ss a zzzz",
|
|
487
492
|
long: "h:mm:ss a z",
|
|
488
493
|
medium: "h:mm:ss a",
|
|
489
494
|
short: "h:mm a"
|
|
490
|
-
},
|
|
495
|
+
}, gn = {
|
|
491
496
|
full: "{{date}} 'at' {{time}}",
|
|
492
497
|
long: "{{date}} 'at' {{time}}",
|
|
493
498
|
medium: "{{date}}, {{time}}",
|
|
494
499
|
short: "{{date}}, {{time}}"
|
|
495
|
-
},
|
|
500
|
+
}, bn = {
|
|
496
501
|
date: xe({
|
|
497
|
-
formats:
|
|
502
|
+
formats: hn,
|
|
498
503
|
defaultWidth: "full"
|
|
499
504
|
}),
|
|
500
505
|
time: xe({
|
|
501
|
-
formats:
|
|
506
|
+
formats: yn,
|
|
502
507
|
defaultWidth: "full"
|
|
503
508
|
}),
|
|
504
509
|
dateTime: xe({
|
|
505
|
-
formats:
|
|
510
|
+
formats: gn,
|
|
506
511
|
defaultWidth: "full"
|
|
507
512
|
})
|
|
508
|
-
},
|
|
513
|
+
}, wn = {
|
|
509
514
|
lastWeek: "'last' eeee 'at' p",
|
|
510
515
|
yesterday: "'yesterday at' p",
|
|
511
516
|
today: "'today at' p",
|
|
512
517
|
tomorrow: "'tomorrow at' p",
|
|
513
518
|
nextWeek: "eeee 'at' p",
|
|
514
519
|
other: "P"
|
|
515
|
-
},
|
|
516
|
-
function
|
|
520
|
+
}, vn = (t, n, e, r) => wn[t];
|
|
521
|
+
function ie(t) {
|
|
517
522
|
return (n, e) => {
|
|
518
523
|
const r = e != null && e.context ? String(e.context) : "standalone";
|
|
519
524
|
let o;
|
|
520
525
|
if (r === "formatting" && t.formattingValues) {
|
|
521
|
-
const i = t.defaultFormattingWidth || t.defaultWidth,
|
|
522
|
-
o = t.formattingValues[
|
|
526
|
+
const i = t.defaultFormattingWidth || t.defaultWidth, u = e != null && e.width ? String(e.width) : i;
|
|
527
|
+
o = t.formattingValues[u] || t.formattingValues[i];
|
|
523
528
|
} else {
|
|
524
|
-
const i = t.defaultWidth,
|
|
525
|
-
o = t.values[
|
|
529
|
+
const i = t.defaultWidth, u = e != null && e.width ? String(e.width) : t.defaultWidth;
|
|
530
|
+
o = t.values[u] || t.values[i];
|
|
526
531
|
}
|
|
527
532
|
const a = t.argumentCallback ? t.argumentCallback(n) : n;
|
|
528
533
|
return o[a];
|
|
529
534
|
};
|
|
530
535
|
}
|
|
531
|
-
const
|
|
536
|
+
const xn = {
|
|
532
537
|
narrow: ["B", "A"],
|
|
533
538
|
abbreviated: ["BC", "AD"],
|
|
534
539
|
wide: ["Before Christ", "Anno Domini"]
|
|
535
|
-
},
|
|
540
|
+
}, Mn = {
|
|
536
541
|
narrow: ["1", "2", "3", "4"],
|
|
537
542
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
538
543
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
@@ -566,7 +571,7 @@ const Mn = {
|
|
|
566
571
|
"November",
|
|
567
572
|
"December"
|
|
568
573
|
]
|
|
569
|
-
},
|
|
574
|
+
}, Cn = {
|
|
570
575
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
571
576
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
572
577
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -579,7 +584,7 @@ const Mn = {
|
|
|
579
584
|
"Friday",
|
|
580
585
|
"Saturday"
|
|
581
586
|
]
|
|
582
|
-
},
|
|
587
|
+
}, Tn = {
|
|
583
588
|
narrow: {
|
|
584
589
|
am: "a",
|
|
585
590
|
pm: "p",
|
|
@@ -610,7 +615,7 @@ const Mn = {
|
|
|
610
615
|
evening: "evening",
|
|
611
616
|
night: "night"
|
|
612
617
|
}
|
|
613
|
-
},
|
|
618
|
+
}, Pn = {
|
|
614
619
|
narrow: {
|
|
615
620
|
am: "a",
|
|
616
621
|
pm: "p",
|
|
@@ -641,7 +646,7 @@ const Mn = {
|
|
|
641
646
|
evening: "in the evening",
|
|
642
647
|
night: "at night"
|
|
643
648
|
}
|
|
644
|
-
},
|
|
649
|
+
}, On = (t, n) => {
|
|
645
650
|
const e = Number(t), r = e % 100;
|
|
646
651
|
if (r > 20 || r < 10)
|
|
647
652
|
switch (r % 10) {
|
|
@@ -653,51 +658,51 @@ const Mn = {
|
|
|
653
658
|
return e + "rd";
|
|
654
659
|
}
|
|
655
660
|
return e + "th";
|
|
656
|
-
},
|
|
657
|
-
ordinalNumber:
|
|
658
|
-
era:
|
|
659
|
-
values:
|
|
661
|
+
}, Dn = {
|
|
662
|
+
ordinalNumber: On,
|
|
663
|
+
era: ie({
|
|
664
|
+
values: xn,
|
|
660
665
|
defaultWidth: "wide"
|
|
661
666
|
}),
|
|
662
|
-
quarter:
|
|
663
|
-
values:
|
|
667
|
+
quarter: ie({
|
|
668
|
+
values: Mn,
|
|
664
669
|
defaultWidth: "wide",
|
|
665
670
|
argumentCallback: (t) => t - 1
|
|
666
671
|
}),
|
|
667
|
-
month:
|
|
672
|
+
month: ie({
|
|
668
673
|
values: kn,
|
|
669
674
|
defaultWidth: "wide"
|
|
670
675
|
}),
|
|
671
|
-
day:
|
|
672
|
-
values:
|
|
676
|
+
day: ie({
|
|
677
|
+
values: Cn,
|
|
673
678
|
defaultWidth: "wide"
|
|
674
679
|
}),
|
|
675
|
-
dayPeriod:
|
|
676
|
-
values:
|
|
680
|
+
dayPeriod: ie({
|
|
681
|
+
values: Tn,
|
|
677
682
|
defaultWidth: "wide",
|
|
678
|
-
formattingValues:
|
|
683
|
+
formattingValues: Pn,
|
|
679
684
|
defaultFormattingWidth: "wide"
|
|
680
685
|
})
|
|
681
686
|
};
|
|
682
|
-
function
|
|
687
|
+
function ue(t) {
|
|
683
688
|
return (n, e = {}) => {
|
|
684
689
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
685
690
|
if (!a)
|
|
686
691
|
return null;
|
|
687
|
-
const i = a[0],
|
|
692
|
+
const i = a[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], p = Array.isArray(u) ? En(u, (s) => s.test(i)) : (
|
|
688
693
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
689
|
-
|
|
694
|
+
Hn(u, (s) => s.test(i))
|
|
690
695
|
);
|
|
691
|
-
let
|
|
692
|
-
|
|
696
|
+
let c;
|
|
697
|
+
c = t.valueCallback ? t.valueCallback(p) : p, c = e.valueCallback ? (
|
|
693
698
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
694
|
-
e.valueCallback(
|
|
695
|
-
) :
|
|
696
|
-
const
|
|
697
|
-
return { value:
|
|
699
|
+
e.valueCallback(c)
|
|
700
|
+
) : c;
|
|
701
|
+
const d = n.slice(i.length);
|
|
702
|
+
return { value: c, rest: d };
|
|
698
703
|
};
|
|
699
704
|
}
|
|
700
|
-
function
|
|
705
|
+
function Hn(t, n) {
|
|
701
706
|
for (const e in t)
|
|
702
707
|
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
703
708
|
return e;
|
|
@@ -707,7 +712,7 @@ function En(t, n) {
|
|
|
707
712
|
if (n(t[e]))
|
|
708
713
|
return e;
|
|
709
714
|
}
|
|
710
|
-
function
|
|
715
|
+
function Bn(t) {
|
|
711
716
|
return (n, e = {}) => {
|
|
712
717
|
const r = n.match(t.matchPattern);
|
|
713
718
|
if (!r) return null;
|
|
@@ -715,27 +720,27 @@ function Vn(t) {
|
|
|
715
720
|
if (!a) return null;
|
|
716
721
|
let i = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
717
722
|
i = e.valueCallback ? e.valueCallback(i) : i;
|
|
718
|
-
const
|
|
719
|
-
return { value: i, rest:
|
|
723
|
+
const u = n.slice(o.length);
|
|
724
|
+
return { value: i, rest: u };
|
|
720
725
|
};
|
|
721
726
|
}
|
|
722
|
-
const Fn = /^(\d+)(th|st|nd|rd)?/i,
|
|
727
|
+
const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Sn = {
|
|
723
728
|
narrow: /^(b|a)/i,
|
|
724
729
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
725
730
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
726
|
-
}, Ln = {
|
|
727
|
-
any: [/^b/i, /^(a|c)/i]
|
|
728
731
|
}, In = {
|
|
732
|
+
any: [/^b/i, /^(a|c)/i]
|
|
733
|
+
}, Nn = {
|
|
729
734
|
narrow: /^[1234]/i,
|
|
730
735
|
abbreviated: /^q[1234]/i,
|
|
731
736
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
732
|
-
},
|
|
737
|
+
}, Ln = {
|
|
733
738
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
734
|
-
},
|
|
739
|
+
}, Wn = {
|
|
735
740
|
narrow: /^[jfmasond]/i,
|
|
736
741
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
737
742
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
738
|
-
},
|
|
743
|
+
}, Yn = {
|
|
739
744
|
narrow: [
|
|
740
745
|
/^j/i,
|
|
741
746
|
/^f/i,
|
|
@@ -764,18 +769,18 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Nn = /\d+/i, Sn = {
|
|
|
764
769
|
/^n/i,
|
|
765
770
|
/^d/i
|
|
766
771
|
]
|
|
767
|
-
},
|
|
772
|
+
}, qn = {
|
|
768
773
|
narrow: /^[smtwf]/i,
|
|
769
774
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
770
775
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
771
776
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
772
|
-
},
|
|
777
|
+
}, An = {
|
|
773
778
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
774
779
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
775
|
-
},
|
|
780
|
+
}, _n = {
|
|
776
781
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
777
782
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
778
|
-
},
|
|
783
|
+
}, Gn = {
|
|
779
784
|
any: {
|
|
780
785
|
am: /^a/i,
|
|
781
786
|
pm: /^p/i,
|
|
@@ -786,99 +791,99 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Nn = /\d+/i, Sn = {
|
|
|
786
791
|
evening: /evening/i,
|
|
787
792
|
night: /night/i
|
|
788
793
|
}
|
|
789
|
-
},
|
|
790
|
-
ordinalNumber:
|
|
794
|
+
}, $n = {
|
|
795
|
+
ordinalNumber: Bn({
|
|
791
796
|
matchPattern: Fn,
|
|
792
|
-
parsePattern:
|
|
797
|
+
parsePattern: Vn,
|
|
793
798
|
valueCallback: (t) => parseInt(t, 10)
|
|
794
799
|
}),
|
|
795
|
-
era:
|
|
800
|
+
era: ue({
|
|
796
801
|
matchPatterns: Sn,
|
|
797
802
|
defaultMatchWidth: "wide",
|
|
798
|
-
parsePatterns:
|
|
803
|
+
parsePatterns: In,
|
|
799
804
|
defaultParseWidth: "any"
|
|
800
805
|
}),
|
|
801
|
-
quarter:
|
|
802
|
-
matchPatterns:
|
|
806
|
+
quarter: ue({
|
|
807
|
+
matchPatterns: Nn,
|
|
803
808
|
defaultMatchWidth: "wide",
|
|
804
|
-
parsePatterns:
|
|
809
|
+
parsePatterns: Ln,
|
|
805
810
|
defaultParseWidth: "any",
|
|
806
811
|
valueCallback: (t) => t + 1
|
|
807
812
|
}),
|
|
808
|
-
month:
|
|
809
|
-
matchPatterns:
|
|
813
|
+
month: ue({
|
|
814
|
+
matchPatterns: Wn,
|
|
810
815
|
defaultMatchWidth: "wide",
|
|
811
|
-
parsePatterns:
|
|
816
|
+
parsePatterns: Yn,
|
|
812
817
|
defaultParseWidth: "any"
|
|
813
818
|
}),
|
|
814
|
-
day:
|
|
815
|
-
matchPatterns:
|
|
819
|
+
day: ue({
|
|
820
|
+
matchPatterns: qn,
|
|
816
821
|
defaultMatchWidth: "wide",
|
|
817
|
-
parsePatterns:
|
|
822
|
+
parsePatterns: An,
|
|
818
823
|
defaultParseWidth: "any"
|
|
819
824
|
}),
|
|
820
|
-
dayPeriod:
|
|
821
|
-
matchPatterns:
|
|
825
|
+
dayPeriod: ue({
|
|
826
|
+
matchPatterns: _n,
|
|
822
827
|
defaultMatchWidth: "any",
|
|
823
|
-
parsePatterns:
|
|
828
|
+
parsePatterns: Gn,
|
|
824
829
|
defaultParseWidth: "any"
|
|
825
830
|
})
|
|
826
831
|
}, et = {
|
|
827
832
|
code: "en-US",
|
|
828
|
-
formatDistance:
|
|
829
|
-
formatLong:
|
|
830
|
-
formatRelative:
|
|
831
|
-
localize:
|
|
832
|
-
match:
|
|
833
|
+
formatDistance: mn,
|
|
834
|
+
formatLong: bn,
|
|
835
|
+
formatRelative: vn,
|
|
836
|
+
localize: Dn,
|
|
837
|
+
match: $n,
|
|
833
838
|
options: {
|
|
834
839
|
weekStartsOn: 0,
|
|
835
840
|
firstWeekContainsDate: 1
|
|
836
841
|
}
|
|
837
842
|
};
|
|
838
|
-
function
|
|
839
|
-
const n =
|
|
840
|
-
return
|
|
843
|
+
function jn(t) {
|
|
844
|
+
const n = _(t);
|
|
845
|
+
return ln(n, fn(n)) + 1;
|
|
841
846
|
}
|
|
842
847
|
function tt(t) {
|
|
843
|
-
const n =
|
|
848
|
+
const n = _(t), e = +ee(n) - +cn(n);
|
|
844
849
|
return Math.round(e / Je) + 1;
|
|
845
850
|
}
|
|
846
|
-
function
|
|
847
|
-
var
|
|
848
|
-
const e =
|
|
851
|
+
function De(t, n) {
|
|
852
|
+
var d, s, l, m;
|
|
853
|
+
const e = _(t), r = e.getFullYear(), o = ne(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((s = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : s.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (l = o.locale) == null ? void 0 : l.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = W(t, 0);
|
|
849
854
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
const
|
|
853
|
-
return e.getTime() >=
|
|
855
|
+
const u = X(i, n), p = W(t, 0);
|
|
856
|
+
p.setFullYear(r, 0, a), p.setHours(0, 0, 0, 0);
|
|
857
|
+
const c = X(p, n);
|
|
858
|
+
return e.getTime() >= u.getTime() ? r + 1 : e.getTime() >= c.getTime() ? r : r - 1;
|
|
854
859
|
}
|
|
855
|
-
function
|
|
856
|
-
var
|
|
857
|
-
const e =
|
|
858
|
-
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0),
|
|
860
|
+
function Rn(t, n) {
|
|
861
|
+
var u, p, c, d;
|
|
862
|
+
const e = ne(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((p = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : p.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = De(t, n), a = W(t, 0);
|
|
863
|
+
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), X(a, n);
|
|
859
864
|
}
|
|
860
865
|
function nt(t, n) {
|
|
861
|
-
const e =
|
|
866
|
+
const e = _(t), r = +X(e, n) - +Rn(e, n);
|
|
862
867
|
return Math.round(r / Je) + 1;
|
|
863
868
|
}
|
|
864
|
-
function
|
|
869
|
+
function B(t, n) {
|
|
865
870
|
const e = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(n, "0");
|
|
866
871
|
return e + r;
|
|
867
872
|
}
|
|
868
|
-
const
|
|
873
|
+
const U = {
|
|
869
874
|
// Year
|
|
870
875
|
y(t, n) {
|
|
871
876
|
const e = t.getFullYear(), r = e > 0 ? e : 1 - e;
|
|
872
|
-
return
|
|
877
|
+
return B(n === "yy" ? r % 100 : r, n.length);
|
|
873
878
|
},
|
|
874
879
|
// Month
|
|
875
880
|
M(t, n) {
|
|
876
881
|
const e = t.getMonth();
|
|
877
|
-
return n === "M" ? String(e + 1) :
|
|
882
|
+
return n === "M" ? String(e + 1) : B(e + 1, 2);
|
|
878
883
|
},
|
|
879
884
|
// Day of the month
|
|
880
885
|
d(t, n) {
|
|
881
|
-
return
|
|
886
|
+
return B(t.getDate(), n.length);
|
|
882
887
|
},
|
|
883
888
|
// AM or PM
|
|
884
889
|
a(t, n) {
|
|
@@ -898,28 +903,28 @@ const X = {
|
|
|
898
903
|
},
|
|
899
904
|
// Hour [1-12]
|
|
900
905
|
h(t, n) {
|
|
901
|
-
return
|
|
906
|
+
return B(t.getHours() % 12 || 12, n.length);
|
|
902
907
|
},
|
|
903
908
|
// Hour [0-23]
|
|
904
909
|
H(t, n) {
|
|
905
|
-
return
|
|
910
|
+
return B(t.getHours(), n.length);
|
|
906
911
|
},
|
|
907
912
|
// Minute
|
|
908
913
|
m(t, n) {
|
|
909
|
-
return
|
|
914
|
+
return B(t.getMinutes(), n.length);
|
|
910
915
|
},
|
|
911
916
|
// Second
|
|
912
917
|
s(t, n) {
|
|
913
|
-
return
|
|
918
|
+
return B(t.getSeconds(), n.length);
|
|
914
919
|
},
|
|
915
920
|
// Fraction of second
|
|
916
921
|
S(t, n) {
|
|
917
922
|
const e = n.length, r = t.getMilliseconds(), o = Math.trunc(
|
|
918
923
|
r * Math.pow(10, e - 3)
|
|
919
924
|
);
|
|
920
|
-
return
|
|
925
|
+
return B(o, n.length);
|
|
921
926
|
}
|
|
922
|
-
},
|
|
927
|
+
}, J = {
|
|
923
928
|
am: "am",
|
|
924
929
|
pm: "pm",
|
|
925
930
|
midnight: "midnight",
|
|
@@ -928,7 +933,7 @@ const X = {
|
|
|
928
933
|
afternoon: "afternoon",
|
|
929
934
|
evening: "evening",
|
|
930
935
|
night: "night"
|
|
931
|
-
},
|
|
936
|
+
}, We = {
|
|
932
937
|
// Era
|
|
933
938
|
G: function(t, n, e) {
|
|
934
939
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -950,21 +955,21 @@ const X = {
|
|
|
950
955
|
const r = t.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
951
956
|
return e.ordinalNumber(o, { unit: "year" });
|
|
952
957
|
}
|
|
953
|
-
return
|
|
958
|
+
return U.y(t, n);
|
|
954
959
|
},
|
|
955
960
|
// Local week-numbering year
|
|
956
961
|
Y: function(t, n, e, r) {
|
|
957
|
-
const o =
|
|
962
|
+
const o = De(t, r), a = o > 0 ? o : 1 - o;
|
|
958
963
|
if (n === "YY") {
|
|
959
964
|
const i = a % 100;
|
|
960
|
-
return
|
|
965
|
+
return B(i, 2);
|
|
961
966
|
}
|
|
962
|
-
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) :
|
|
967
|
+
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : B(a, n.length);
|
|
963
968
|
},
|
|
964
969
|
// ISO week-numbering year
|
|
965
970
|
R: function(t, n) {
|
|
966
971
|
const e = Ze(t);
|
|
967
|
-
return
|
|
972
|
+
return B(e, n.length);
|
|
968
973
|
},
|
|
969
974
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
970
975
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -977,7 +982,7 @@ const X = {
|
|
|
977
982
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
978
983
|
u: function(t, n) {
|
|
979
984
|
const e = t.getFullYear();
|
|
980
|
-
return
|
|
985
|
+
return B(e, n.length);
|
|
981
986
|
},
|
|
982
987
|
// Quarter
|
|
983
988
|
Q: function(t, n, e) {
|
|
@@ -986,7 +991,7 @@ const X = {
|
|
|
986
991
|
case "Q":
|
|
987
992
|
return String(r);
|
|
988
993
|
case "QQ":
|
|
989
|
-
return
|
|
994
|
+
return B(r, 2);
|
|
990
995
|
case "Qo":
|
|
991
996
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
992
997
|
case "QQQ":
|
|
@@ -1014,7 +1019,7 @@ const X = {
|
|
|
1014
1019
|
case "q":
|
|
1015
1020
|
return String(r);
|
|
1016
1021
|
case "qq":
|
|
1017
|
-
return
|
|
1022
|
+
return B(r, 2);
|
|
1018
1023
|
case "qo":
|
|
1019
1024
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
1020
1025
|
case "qqq":
|
|
@@ -1041,7 +1046,7 @@ const X = {
|
|
|
1041
1046
|
switch (n) {
|
|
1042
1047
|
case "M":
|
|
1043
1048
|
case "MM":
|
|
1044
|
-
return
|
|
1049
|
+
return U.M(t, n);
|
|
1045
1050
|
case "Mo":
|
|
1046
1051
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1047
1052
|
case "MMM":
|
|
@@ -1066,7 +1071,7 @@ const X = {
|
|
|
1066
1071
|
case "L":
|
|
1067
1072
|
return String(r + 1);
|
|
1068
1073
|
case "LL":
|
|
1069
|
-
return
|
|
1074
|
+
return B(r + 1, 2);
|
|
1070
1075
|
case "Lo":
|
|
1071
1076
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1072
1077
|
case "LLL":
|
|
@@ -1087,21 +1092,21 @@ const X = {
|
|
|
1087
1092
|
// Local week of year
|
|
1088
1093
|
w: function(t, n, e, r) {
|
|
1089
1094
|
const o = nt(t, r);
|
|
1090
|
-
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) :
|
|
1095
|
+
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) : B(o, n.length);
|
|
1091
1096
|
},
|
|
1092
1097
|
// ISO week of year
|
|
1093
1098
|
I: function(t, n, e) {
|
|
1094
1099
|
const r = tt(t);
|
|
1095
|
-
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) :
|
|
1100
|
+
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) : B(r, n.length);
|
|
1096
1101
|
},
|
|
1097
1102
|
// Day of the month
|
|
1098
1103
|
d: function(t, n, e) {
|
|
1099
|
-
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1104
|
+
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : U.d(t, n);
|
|
1100
1105
|
},
|
|
1101
1106
|
// Day of year
|
|
1102
1107
|
D: function(t, n, e) {
|
|
1103
|
-
const r =
|
|
1104
|
-
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
1108
|
+
const r = jn(t);
|
|
1109
|
+
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : B(r, n.length);
|
|
1105
1110
|
},
|
|
1106
1111
|
// Day of week
|
|
1107
1112
|
E: function(t, n, e) {
|
|
@@ -1139,7 +1144,7 @@ const X = {
|
|
|
1139
1144
|
case "e":
|
|
1140
1145
|
return String(a);
|
|
1141
1146
|
case "ee":
|
|
1142
|
-
return
|
|
1147
|
+
return B(a, 2);
|
|
1143
1148
|
case "eo":
|
|
1144
1149
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1145
1150
|
case "eee":
|
|
@@ -1172,7 +1177,7 @@ const X = {
|
|
|
1172
1177
|
case "c":
|
|
1173
1178
|
return String(a);
|
|
1174
1179
|
case "cc":
|
|
1175
|
-
return
|
|
1180
|
+
return B(a, n.length);
|
|
1176
1181
|
case "co":
|
|
1177
1182
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1178
1183
|
case "ccc":
|
|
@@ -1205,7 +1210,7 @@ const X = {
|
|
|
1205
1210
|
case "i":
|
|
1206
1211
|
return String(o);
|
|
1207
1212
|
case "ii":
|
|
1208
|
-
return
|
|
1213
|
+
return B(o, n.length);
|
|
1209
1214
|
case "io":
|
|
1210
1215
|
return e.ordinalNumber(o, { unit: "day" });
|
|
1211
1216
|
case "iii":
|
|
@@ -1263,7 +1268,7 @@ const X = {
|
|
|
1263
1268
|
b: function(t, n, e) {
|
|
1264
1269
|
const r = t.getHours();
|
|
1265
1270
|
let o;
|
|
1266
|
-
switch (r === 12 ? o =
|
|
1271
|
+
switch (r === 12 ? o = J.noon : r === 0 ? o = J.midnight : o = r / 12 >= 1 ? "pm" : "am", n) {
|
|
1267
1272
|
case "b":
|
|
1268
1273
|
case "bb":
|
|
1269
1274
|
return e.dayPeriod(o, {
|
|
@@ -1292,7 +1297,7 @@ const X = {
|
|
|
1292
1297
|
B: function(t, n, e) {
|
|
1293
1298
|
const r = t.getHours();
|
|
1294
1299
|
let o;
|
|
1295
|
-
switch (r >= 17 ? o =
|
|
1300
|
+
switch (r >= 17 ? o = J.evening : r >= 12 ? o = J.afternoon : r >= 4 ? o = J.morning : o = J.night, n) {
|
|
1296
1301
|
case "B":
|
|
1297
1302
|
case "BB":
|
|
1298
1303
|
case "BBB":
|
|
@@ -1319,33 +1324,33 @@ const X = {
|
|
|
1319
1324
|
let r = t.getHours() % 12;
|
|
1320
1325
|
return r === 0 && (r = 12), e.ordinalNumber(r, { unit: "hour" });
|
|
1321
1326
|
}
|
|
1322
|
-
return
|
|
1327
|
+
return U.h(t, n);
|
|
1323
1328
|
},
|
|
1324
1329
|
// Hour [0-23]
|
|
1325
1330
|
H: function(t, n, e) {
|
|
1326
|
-
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1331
|
+
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : U.H(t, n);
|
|
1327
1332
|
},
|
|
1328
1333
|
// Hour [0-11]
|
|
1329
1334
|
K: function(t, n, e) {
|
|
1330
1335
|
const r = t.getHours() % 12;
|
|
1331
|
-
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1336
|
+
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) : B(r, n.length);
|
|
1332
1337
|
},
|
|
1333
1338
|
// Hour [1-24]
|
|
1334
1339
|
k: function(t, n, e) {
|
|
1335
1340
|
let r = t.getHours();
|
|
1336
|
-
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1341
|
+
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) : B(r, n.length);
|
|
1337
1342
|
},
|
|
1338
1343
|
// Minute
|
|
1339
1344
|
m: function(t, n, e) {
|
|
1340
|
-
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1345
|
+
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : U.m(t, n);
|
|
1341
1346
|
},
|
|
1342
1347
|
// Second
|
|
1343
1348
|
s: function(t, n, e) {
|
|
1344
|
-
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1349
|
+
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : U.s(t, n);
|
|
1345
1350
|
},
|
|
1346
1351
|
// Fraction of second
|
|
1347
1352
|
S: function(t, n) {
|
|
1348
|
-
return
|
|
1353
|
+
return U.S(t, n);
|
|
1349
1354
|
},
|
|
1350
1355
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1351
1356
|
X: function(t, n, e) {
|
|
@@ -1354,14 +1359,14 @@ const X = {
|
|
|
1354
1359
|
return "Z";
|
|
1355
1360
|
switch (n) {
|
|
1356
1361
|
case "X":
|
|
1357
|
-
return
|
|
1362
|
+
return qe(r);
|
|
1358
1363
|
case "XXXX":
|
|
1359
1364
|
case "XX":
|
|
1360
|
-
return
|
|
1365
|
+
return z(r);
|
|
1361
1366
|
case "XXXXX":
|
|
1362
1367
|
case "XXX":
|
|
1363
1368
|
default:
|
|
1364
|
-
return
|
|
1369
|
+
return z(r, ":");
|
|
1365
1370
|
}
|
|
1366
1371
|
},
|
|
1367
1372
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1369,14 +1374,14 @@ const X = {
|
|
|
1369
1374
|
const r = t.getTimezoneOffset();
|
|
1370
1375
|
switch (n) {
|
|
1371
1376
|
case "x":
|
|
1372
|
-
return
|
|
1377
|
+
return qe(r);
|
|
1373
1378
|
case "xxxx":
|
|
1374
1379
|
case "xx":
|
|
1375
|
-
return
|
|
1380
|
+
return z(r);
|
|
1376
1381
|
case "xxxxx":
|
|
1377
1382
|
case "xxx":
|
|
1378
1383
|
default:
|
|
1379
|
-
return
|
|
1384
|
+
return z(r, ":");
|
|
1380
1385
|
}
|
|
1381
1386
|
},
|
|
1382
1387
|
// Timezone (GMT)
|
|
@@ -1386,10 +1391,10 @@ const X = {
|
|
|
1386
1391
|
case "O":
|
|
1387
1392
|
case "OO":
|
|
1388
1393
|
case "OOO":
|
|
1389
|
-
return "GMT" +
|
|
1394
|
+
return "GMT" + Ye(r, ":");
|
|
1390
1395
|
case "OOOO":
|
|
1391
1396
|
default:
|
|
1392
|
-
return "GMT" +
|
|
1397
|
+
return "GMT" + z(r, ":");
|
|
1393
1398
|
}
|
|
1394
1399
|
},
|
|
1395
1400
|
// Timezone (specific non-location)
|
|
@@ -1399,35 +1404,35 @@ const X = {
|
|
|
1399
1404
|
case "z":
|
|
1400
1405
|
case "zz":
|
|
1401
1406
|
case "zzz":
|
|
1402
|
-
return "GMT" +
|
|
1407
|
+
return "GMT" + Ye(r, ":");
|
|
1403
1408
|
case "zzzz":
|
|
1404
1409
|
default:
|
|
1405
|
-
return "GMT" +
|
|
1410
|
+
return "GMT" + z(r, ":");
|
|
1406
1411
|
}
|
|
1407
1412
|
},
|
|
1408
1413
|
// Seconds timestamp
|
|
1409
1414
|
t: function(t, n, e) {
|
|
1410
1415
|
const r = Math.trunc(t.getTime() / 1e3);
|
|
1411
|
-
return
|
|
1416
|
+
return B(r, n.length);
|
|
1412
1417
|
},
|
|
1413
1418
|
// Milliseconds timestamp
|
|
1414
1419
|
T: function(t, n, e) {
|
|
1415
1420
|
const r = t.getTime();
|
|
1416
|
-
return
|
|
1421
|
+
return B(r, n.length);
|
|
1417
1422
|
}
|
|
1418
1423
|
};
|
|
1419
|
-
function
|
|
1424
|
+
function Ye(t, n = "") {
|
|
1420
1425
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1421
|
-
return a === 0 ? e + String(o) : e + String(o) + n +
|
|
1426
|
+
return a === 0 ? e + String(o) : e + String(o) + n + B(a, 2);
|
|
1422
1427
|
}
|
|
1423
|
-
function
|
|
1424
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") +
|
|
1428
|
+
function qe(t, n) {
|
|
1429
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + B(Math.abs(t) / 60, 2) : z(t, n);
|
|
1425
1430
|
}
|
|
1426
|
-
function
|
|
1427
|
-
const e = t > 0 ? "-" : "+", r = Math.abs(t), o =
|
|
1431
|
+
function z(t, n = "") {
|
|
1432
|
+
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = B(Math.trunc(r / 60), 2), a = B(r % 60, 2);
|
|
1428
1433
|
return e + o + n + a;
|
|
1429
1434
|
}
|
|
1430
|
-
const
|
|
1435
|
+
const Ae = (t, n) => {
|
|
1431
1436
|
switch (t) {
|
|
1432
1437
|
case "P":
|
|
1433
1438
|
return n.date({ width: "short" });
|
|
@@ -1451,10 +1456,10 @@ const _e = (t, n) => {
|
|
|
1451
1456
|
default:
|
|
1452
1457
|
return n.time({ width: "full" });
|
|
1453
1458
|
}
|
|
1454
|
-
},
|
|
1459
|
+
}, Qn = (t, n) => {
|
|
1455
1460
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1456
1461
|
if (!o)
|
|
1457
|
-
return
|
|
1462
|
+
return Ae(t, n);
|
|
1458
1463
|
let a;
|
|
1459
1464
|
switch (r) {
|
|
1460
1465
|
case "P":
|
|
@@ -1471,79 +1476,79 @@ const _e = (t, n) => {
|
|
|
1471
1476
|
a = n.dateTime({ width: "full" });
|
|
1472
1477
|
break;
|
|
1473
1478
|
}
|
|
1474
|
-
return a.replace("{{date}}",
|
|
1475
|
-
},
|
|
1479
|
+
return a.replace("{{date}}", Ae(r, n)).replace("{{time}}", rt(o, n));
|
|
1480
|
+
}, Me = {
|
|
1476
1481
|
p: rt,
|
|
1477
|
-
P:
|
|
1478
|
-
},
|
|
1482
|
+
P: Qn
|
|
1483
|
+
}, Un = /^D+$/, Xn = /^Y+$/, zn = ["D", "DD", "YY", "YYYY"];
|
|
1479
1484
|
function ot(t) {
|
|
1480
|
-
return
|
|
1485
|
+
return Un.test(t);
|
|
1481
1486
|
}
|
|
1482
1487
|
function at(t) {
|
|
1483
|
-
return
|
|
1488
|
+
return Xn.test(t);
|
|
1484
1489
|
}
|
|
1485
1490
|
function ke(t, n, e) {
|
|
1486
|
-
const r =
|
|
1487
|
-
if (console.warn(r),
|
|
1491
|
+
const r = Jn(t, n, e);
|
|
1492
|
+
if (console.warn(r), zn.includes(t)) throw new RangeError(r);
|
|
1488
1493
|
}
|
|
1489
|
-
function
|
|
1494
|
+
function Jn(t, n, e) {
|
|
1490
1495
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1491
1496
|
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`;
|
|
1492
1497
|
}
|
|
1493
|
-
const
|
|
1494
|
-
function
|
|
1495
|
-
var
|
|
1496
|
-
const r =
|
|
1497
|
-
if (!Ke(
|
|
1498
|
+
const Zn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Kn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, er = /^'([^]*?)'?$/, tr = /''/g, nr = /[a-zA-Z]/;
|
|
1499
|
+
function _e(t, n, e) {
|
|
1500
|
+
var d, s, l, m;
|
|
1501
|
+
const r = ne(), o = r.locale ?? et, a = r.firstWeekContainsDate ?? ((s = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : s.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((m = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : m.weekStartsOn) ?? 0, u = _(t);
|
|
1502
|
+
if (!Ke(u))
|
|
1498
1503
|
throw new RangeError("Invalid time value");
|
|
1499
|
-
let
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
const
|
|
1503
|
-
return
|
|
1504
|
+
let p = n.match(Kn).map((h) => {
|
|
1505
|
+
const g = h[0];
|
|
1506
|
+
if (g === "p" || g === "P") {
|
|
1507
|
+
const P = Me[g];
|
|
1508
|
+
return P(h, o.formatLong);
|
|
1504
1509
|
}
|
|
1505
|
-
return
|
|
1506
|
-
}).join("").match(
|
|
1507
|
-
if (
|
|
1510
|
+
return h;
|
|
1511
|
+
}).join("").match(Zn).map((h) => {
|
|
1512
|
+
if (h === "''")
|
|
1508
1513
|
return { isToken: !1, value: "'" };
|
|
1509
|
-
const
|
|
1510
|
-
if (
|
|
1511
|
-
return { isToken: !1, value:
|
|
1512
|
-
if (
|
|
1513
|
-
return { isToken: !0, value:
|
|
1514
|
-
if (
|
|
1514
|
+
const g = h[0];
|
|
1515
|
+
if (g === "'")
|
|
1516
|
+
return { isToken: !1, value: rr(h) };
|
|
1517
|
+
if (We[g])
|
|
1518
|
+
return { isToken: !0, value: h };
|
|
1519
|
+
if (g.match(nr))
|
|
1515
1520
|
throw new RangeError(
|
|
1516
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1521
|
+
"Format string contains an unescaped latin alphabet character `" + g + "`"
|
|
1517
1522
|
);
|
|
1518
|
-
return { isToken: !1, value:
|
|
1523
|
+
return { isToken: !1, value: h };
|
|
1519
1524
|
});
|
|
1520
|
-
o.localize.preprocessor && (
|
|
1521
|
-
const
|
|
1525
|
+
o.localize.preprocessor && (p = o.localize.preprocessor(u, p));
|
|
1526
|
+
const c = {
|
|
1522
1527
|
firstWeekContainsDate: a,
|
|
1523
1528
|
weekStartsOn: i,
|
|
1524
1529
|
locale: o
|
|
1525
1530
|
};
|
|
1526
|
-
return
|
|
1527
|
-
if (!
|
|
1528
|
-
const
|
|
1529
|
-
(at(
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1531
|
+
return p.map((h) => {
|
|
1532
|
+
if (!h.isToken) return h.value;
|
|
1533
|
+
const g = h.value;
|
|
1534
|
+
(at(g) || ot(g)) && ke(g, n, String(t));
|
|
1535
|
+
const P = We[g[0]];
|
|
1536
|
+
return P(u, g, o.localize, c);
|
|
1532
1537
|
}).join("");
|
|
1533
1538
|
}
|
|
1534
|
-
function
|
|
1535
|
-
const n = t.match(
|
|
1536
|
-
return n ? n[1].replace(
|
|
1539
|
+
function rr(t) {
|
|
1540
|
+
const n = t.match(er);
|
|
1541
|
+
return n ? n[1].replace(tr, "'") : t;
|
|
1537
1542
|
}
|
|
1538
|
-
function
|
|
1539
|
-
return Object.assign({},
|
|
1543
|
+
function or() {
|
|
1544
|
+
return Object.assign({}, ne());
|
|
1540
1545
|
}
|
|
1541
|
-
function
|
|
1542
|
-
let e =
|
|
1546
|
+
function ar(t) {
|
|
1547
|
+
let e = _(t).getDay();
|
|
1543
1548
|
return e === 0 && (e = 7), e;
|
|
1544
1549
|
}
|
|
1545
1550
|
function sr(t, n) {
|
|
1546
|
-
const e = n instanceof Date ?
|
|
1551
|
+
const e = n instanceof Date ? W(n, 0) : new n(0);
|
|
1547
1552
|
return e.setFullYear(
|
|
1548
1553
|
t.getFullYear(),
|
|
1549
1554
|
t.getMonth(),
|
|
@@ -1555,16 +1560,16 @@ function sr(t, n) {
|
|
|
1555
1560
|
t.getMilliseconds()
|
|
1556
1561
|
), e;
|
|
1557
1562
|
}
|
|
1558
|
-
const
|
|
1559
|
-
class
|
|
1563
|
+
const ir = 10;
|
|
1564
|
+
class st {
|
|
1560
1565
|
constructor() {
|
|
1561
|
-
|
|
1566
|
+
f(this, "subPriority", 0);
|
|
1562
1567
|
}
|
|
1563
1568
|
validate(n, e) {
|
|
1564
1569
|
return !0;
|
|
1565
1570
|
}
|
|
1566
1571
|
}
|
|
1567
|
-
class
|
|
1572
|
+
class ur extends st {
|
|
1568
1573
|
constructor(n, e, r, o, a) {
|
|
1569
1574
|
super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = o, a && (this.subPriority = a);
|
|
1570
1575
|
}
|
|
@@ -1575,21 +1580,21 @@ class lr extends it {
|
|
|
1575
1580
|
return this.setValue(n, e, this.value, r);
|
|
1576
1581
|
}
|
|
1577
1582
|
}
|
|
1578
|
-
class
|
|
1583
|
+
class lr extends st {
|
|
1579
1584
|
constructor() {
|
|
1580
1585
|
super(...arguments);
|
|
1581
|
-
|
|
1582
|
-
|
|
1586
|
+
f(this, "priority", ir);
|
|
1587
|
+
f(this, "subPriority", -1);
|
|
1583
1588
|
}
|
|
1584
1589
|
set(e, r) {
|
|
1585
|
-
return r.timestampIsSet ? e :
|
|
1590
|
+
return r.timestampIsSet ? e : W(e, sr(e, Date));
|
|
1586
1591
|
}
|
|
1587
1592
|
}
|
|
1588
|
-
class
|
|
1593
|
+
class H {
|
|
1589
1594
|
run(n, e, r, o) {
|
|
1590
1595
|
const a = this.parse(n, e, r, o);
|
|
1591
1596
|
return a ? {
|
|
1592
|
-
setter: new
|
|
1597
|
+
setter: new ur(
|
|
1593
1598
|
a.value,
|
|
1594
1599
|
this.validate,
|
|
1595
1600
|
this.set,
|
|
@@ -1603,11 +1608,11 @@ class P {
|
|
|
1603
1608
|
return !0;
|
|
1604
1609
|
}
|
|
1605
1610
|
}
|
|
1606
|
-
class
|
|
1611
|
+
class cr extends H {
|
|
1607
1612
|
constructor() {
|
|
1608
1613
|
super(...arguments);
|
|
1609
|
-
|
|
1610
|
-
|
|
1614
|
+
f(this, "priority", 140);
|
|
1615
|
+
f(this, "incompatibleTokens", ["R", "u", "t", "T"]);
|
|
1611
1616
|
}
|
|
1612
1617
|
parse(e, r, o) {
|
|
1613
1618
|
switch (r) {
|
|
@@ -1626,7 +1631,7 @@ class dr extends P {
|
|
|
1626
1631
|
return r.era = o, e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1627
1632
|
}
|
|
1628
1633
|
}
|
|
1629
|
-
const
|
|
1634
|
+
const q = {
|
|
1630
1635
|
month: /^(1[0-2]|0?\d)/,
|
|
1631
1636
|
// 0 to 12
|
|
1632
1637
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1664,7 +1669,7 @@ const Y = {
|
|
|
1664
1669
|
// 0 to 999, -0 to -999
|
|
1665
1670
|
fourDigitsSigned: /^-?\d{1,4}/
|
|
1666
1671
|
// 0 to 9999, -0 to -9999
|
|
1667
|
-
},
|
|
1672
|
+
}, R = {
|
|
1668
1673
|
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
1669
1674
|
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
1670
1675
|
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
@@ -1677,14 +1682,14 @@ function A(t, n) {
|
|
|
1677
1682
|
rest: t.rest
|
|
1678
1683
|
};
|
|
1679
1684
|
}
|
|
1680
|
-
function
|
|
1685
|
+
function N(t, n) {
|
|
1681
1686
|
const e = n.match(t);
|
|
1682
1687
|
return e ? {
|
|
1683
1688
|
value: parseInt(e[0], 10),
|
|
1684
1689
|
rest: n.slice(e[0].length)
|
|
1685
1690
|
} : null;
|
|
1686
1691
|
}
|
|
1687
|
-
function
|
|
1692
|
+
function Q(t, n) {
|
|
1688
1693
|
const e = n.match(t);
|
|
1689
1694
|
if (!e)
|
|
1690
1695
|
return null;
|
|
@@ -1695,42 +1700,42 @@ function U(t, n) {
|
|
|
1695
1700
|
};
|
|
1696
1701
|
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;
|
|
1697
1702
|
return {
|
|
1698
|
-
value: r * (o *
|
|
1703
|
+
value: r * (o * an + a * on + i * sn),
|
|
1699
1704
|
rest: n.slice(e[0].length)
|
|
1700
1705
|
};
|
|
1701
1706
|
}
|
|
1702
|
-
function
|
|
1703
|
-
return
|
|
1707
|
+
function it(t) {
|
|
1708
|
+
return N(q.anyDigitsSigned, t);
|
|
1704
1709
|
}
|
|
1705
|
-
function
|
|
1710
|
+
function Y(t, n) {
|
|
1706
1711
|
switch (t) {
|
|
1707
1712
|
case 1:
|
|
1708
|
-
return
|
|
1713
|
+
return N(q.singleDigit, n);
|
|
1709
1714
|
case 2:
|
|
1710
|
-
return
|
|
1715
|
+
return N(q.twoDigits, n);
|
|
1711
1716
|
case 3:
|
|
1712
|
-
return
|
|
1717
|
+
return N(q.threeDigits, n);
|
|
1713
1718
|
case 4:
|
|
1714
|
-
return
|
|
1719
|
+
return N(q.fourDigits, n);
|
|
1715
1720
|
default:
|
|
1716
|
-
return
|
|
1721
|
+
return N(new RegExp("^\\d{1," + t + "}"), n);
|
|
1717
1722
|
}
|
|
1718
1723
|
}
|
|
1719
1724
|
function ye(t, n) {
|
|
1720
1725
|
switch (t) {
|
|
1721
1726
|
case 1:
|
|
1722
|
-
return
|
|
1727
|
+
return N(q.singleDigitSigned, n);
|
|
1723
1728
|
case 2:
|
|
1724
|
-
return
|
|
1729
|
+
return N(q.twoDigitsSigned, n);
|
|
1725
1730
|
case 3:
|
|
1726
|
-
return
|
|
1731
|
+
return N(q.threeDigitsSigned, n);
|
|
1727
1732
|
case 4:
|
|
1728
|
-
return
|
|
1733
|
+
return N(q.fourDigitsSigned, n);
|
|
1729
1734
|
default:
|
|
1730
|
-
return
|
|
1735
|
+
return N(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1731
1736
|
}
|
|
1732
1737
|
}
|
|
1733
|
-
function
|
|
1738
|
+
function He(t) {
|
|
1734
1739
|
switch (t) {
|
|
1735
1740
|
case "morning":
|
|
1736
1741
|
return 4;
|
|
@@ -1753,19 +1758,19 @@ function ut(t, n) {
|
|
|
1753
1758
|
if (r <= 50)
|
|
1754
1759
|
o = t || 100;
|
|
1755
1760
|
else {
|
|
1756
|
-
const a = r + 50, i = Math.trunc(a / 100) * 100,
|
|
1757
|
-
o = t + i - (
|
|
1761
|
+
const a = r + 50, i = Math.trunc(a / 100) * 100, u = t >= a % 100;
|
|
1762
|
+
o = t + i - (u ? 100 : 0);
|
|
1758
1763
|
}
|
|
1759
1764
|
return e ? o : 1 - o;
|
|
1760
1765
|
}
|
|
1761
1766
|
function lt(t) {
|
|
1762
1767
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1763
1768
|
}
|
|
1764
|
-
class
|
|
1769
|
+
class dr extends H {
|
|
1765
1770
|
constructor() {
|
|
1766
1771
|
super(...arguments);
|
|
1767
|
-
|
|
1768
|
-
|
|
1772
|
+
f(this, "priority", 130);
|
|
1773
|
+
f(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1769
1774
|
}
|
|
1770
1775
|
parse(e, r, o) {
|
|
1771
1776
|
const a = (i) => ({
|
|
@@ -1774,7 +1779,7 @@ class fr extends P {
|
|
|
1774
1779
|
});
|
|
1775
1780
|
switch (r) {
|
|
1776
1781
|
case "y":
|
|
1777
|
-
return A(
|
|
1782
|
+
return A(Y(4, e), a);
|
|
1778
1783
|
case "yo":
|
|
1779
1784
|
return A(
|
|
1780
1785
|
o.ordinalNumber(e, {
|
|
@@ -1783,7 +1788,7 @@ class fr extends P {
|
|
|
1783
1788
|
a
|
|
1784
1789
|
);
|
|
1785
1790
|
default:
|
|
1786
|
-
return A(
|
|
1791
|
+
return A(Y(r.length, e), a);
|
|
1787
1792
|
}
|
|
1788
1793
|
}
|
|
1789
1794
|
validate(e, r) {
|
|
@@ -1792,21 +1797,21 @@ class fr extends P {
|
|
|
1792
1797
|
set(e, r, o) {
|
|
1793
1798
|
const a = e.getFullYear();
|
|
1794
1799
|
if (o.isTwoDigitYear) {
|
|
1795
|
-
const
|
|
1800
|
+
const u = ut(
|
|
1796
1801
|
o.year,
|
|
1797
1802
|
a
|
|
1798
1803
|
);
|
|
1799
|
-
return e.setFullYear(
|
|
1804
|
+
return e.setFullYear(u, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1800
1805
|
}
|
|
1801
1806
|
const i = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1802
1807
|
return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1803
1808
|
}
|
|
1804
1809
|
}
|
|
1805
|
-
class
|
|
1810
|
+
class fr extends H {
|
|
1806
1811
|
constructor() {
|
|
1807
1812
|
super(...arguments);
|
|
1808
|
-
|
|
1809
|
-
|
|
1813
|
+
f(this, "priority", 130);
|
|
1814
|
+
f(this, "incompatibleTokens", [
|
|
1810
1815
|
"y",
|
|
1811
1816
|
"R",
|
|
1812
1817
|
"u",
|
|
@@ -1829,7 +1834,7 @@ class pr extends P {
|
|
|
1829
1834
|
});
|
|
1830
1835
|
switch (r) {
|
|
1831
1836
|
case "Y":
|
|
1832
|
-
return A(
|
|
1837
|
+
return A(Y(4, e), a);
|
|
1833
1838
|
case "Yo":
|
|
1834
1839
|
return A(
|
|
1835
1840
|
o.ordinalNumber(e, {
|
|
@@ -1838,34 +1843,34 @@ class pr extends P {
|
|
|
1838
1843
|
a
|
|
1839
1844
|
);
|
|
1840
1845
|
default:
|
|
1841
|
-
return A(
|
|
1846
|
+
return A(Y(r.length, e), a);
|
|
1842
1847
|
}
|
|
1843
1848
|
}
|
|
1844
1849
|
validate(e, r) {
|
|
1845
1850
|
return r.isTwoDigitYear || r.year > 0;
|
|
1846
1851
|
}
|
|
1847
1852
|
set(e, r, o, a) {
|
|
1848
|
-
const i =
|
|
1853
|
+
const i = De(e, a);
|
|
1849
1854
|
if (o.isTwoDigitYear) {
|
|
1850
|
-
const
|
|
1855
|
+
const p = ut(
|
|
1851
1856
|
o.year,
|
|
1852
1857
|
i
|
|
1853
1858
|
);
|
|
1854
1859
|
return e.setFullYear(
|
|
1855
|
-
|
|
1860
|
+
p,
|
|
1856
1861
|
0,
|
|
1857
1862
|
a.firstWeekContainsDate
|
|
1858
|
-
), e.setHours(0, 0, 0, 0),
|
|
1863
|
+
), e.setHours(0, 0, 0, 0), X(e, a);
|
|
1859
1864
|
}
|
|
1860
|
-
const
|
|
1861
|
-
return e.setFullYear(
|
|
1865
|
+
const u = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1866
|
+
return e.setFullYear(u, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), X(e, a);
|
|
1862
1867
|
}
|
|
1863
1868
|
}
|
|
1864
|
-
class
|
|
1869
|
+
class pr extends H {
|
|
1865
1870
|
constructor() {
|
|
1866
1871
|
super(...arguments);
|
|
1867
|
-
|
|
1868
|
-
|
|
1872
|
+
f(this, "priority", 130);
|
|
1873
|
+
f(this, "incompatibleTokens", [
|
|
1869
1874
|
"G",
|
|
1870
1875
|
"y",
|
|
1871
1876
|
"Y",
|
|
@@ -1887,15 +1892,15 @@ class mr extends P {
|
|
|
1887
1892
|
return ye(r === "R" ? 4 : r.length, e);
|
|
1888
1893
|
}
|
|
1889
1894
|
set(e, r, o) {
|
|
1890
|
-
const a =
|
|
1891
|
-
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0),
|
|
1895
|
+
const a = W(e, 0);
|
|
1896
|
+
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), ee(a);
|
|
1892
1897
|
}
|
|
1893
1898
|
}
|
|
1894
|
-
class
|
|
1899
|
+
class mr extends H {
|
|
1895
1900
|
constructor() {
|
|
1896
1901
|
super(...arguments);
|
|
1897
|
-
|
|
1898
|
-
|
|
1902
|
+
f(this, "priority", 130);
|
|
1903
|
+
f(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1899
1904
|
}
|
|
1900
1905
|
parse(e, r) {
|
|
1901
1906
|
return ye(r === "u" ? 4 : r.length, e);
|
|
@@ -1904,11 +1909,11 @@ class hr extends P {
|
|
|
1904
1909
|
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1905
1910
|
}
|
|
1906
1911
|
}
|
|
1907
|
-
class
|
|
1912
|
+
class hr extends H {
|
|
1908
1913
|
constructor() {
|
|
1909
1914
|
super(...arguments);
|
|
1910
|
-
|
|
1911
|
-
|
|
1915
|
+
f(this, "priority", 120);
|
|
1916
|
+
f(this, "incompatibleTokens", [
|
|
1912
1917
|
"Y",
|
|
1913
1918
|
"R",
|
|
1914
1919
|
"q",
|
|
@@ -1929,7 +1934,7 @@ class yr extends P {
|
|
|
1929
1934
|
switch (r) {
|
|
1930
1935
|
case "Q":
|
|
1931
1936
|
case "QQ":
|
|
1932
|
-
return
|
|
1937
|
+
return Y(r.length, e);
|
|
1933
1938
|
case "Qo":
|
|
1934
1939
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1935
1940
|
case "QQQ":
|
|
@@ -1966,11 +1971,11 @@ class yr extends P {
|
|
|
1966
1971
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1967
1972
|
}
|
|
1968
1973
|
}
|
|
1969
|
-
class
|
|
1974
|
+
class yr extends H {
|
|
1970
1975
|
constructor() {
|
|
1971
1976
|
super(...arguments);
|
|
1972
|
-
|
|
1973
|
-
|
|
1977
|
+
f(this, "priority", 120);
|
|
1978
|
+
f(this, "incompatibleTokens", [
|
|
1974
1979
|
"Y",
|
|
1975
1980
|
"R",
|
|
1976
1981
|
"Q",
|
|
@@ -1991,7 +1996,7 @@ class gr extends P {
|
|
|
1991
1996
|
switch (r) {
|
|
1992
1997
|
case "q":
|
|
1993
1998
|
case "qq":
|
|
1994
|
-
return
|
|
1999
|
+
return Y(r.length, e);
|
|
1995
2000
|
case "qo":
|
|
1996
2001
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1997
2002
|
case "qqq":
|
|
@@ -2028,10 +2033,10 @@ class gr extends P {
|
|
|
2028
2033
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2029
2034
|
}
|
|
2030
2035
|
}
|
|
2031
|
-
class
|
|
2036
|
+
class gr extends H {
|
|
2032
2037
|
constructor() {
|
|
2033
2038
|
super(...arguments);
|
|
2034
|
-
|
|
2039
|
+
f(this, "incompatibleTokens", [
|
|
2035
2040
|
"Y",
|
|
2036
2041
|
"R",
|
|
2037
2042
|
"q",
|
|
@@ -2046,18 +2051,18 @@ class br extends P {
|
|
|
2046
2051
|
"t",
|
|
2047
2052
|
"T"
|
|
2048
2053
|
]);
|
|
2049
|
-
|
|
2054
|
+
f(this, "priority", 110);
|
|
2050
2055
|
}
|
|
2051
2056
|
parse(e, r, o) {
|
|
2052
2057
|
const a = (i) => i - 1;
|
|
2053
2058
|
switch (r) {
|
|
2054
2059
|
case "M":
|
|
2055
2060
|
return A(
|
|
2056
|
-
|
|
2061
|
+
N(q.month, e),
|
|
2057
2062
|
a
|
|
2058
2063
|
);
|
|
2059
2064
|
case "MM":
|
|
2060
|
-
return A(
|
|
2065
|
+
return A(Y(2, e), a);
|
|
2061
2066
|
case "Mo":
|
|
2062
2067
|
return A(
|
|
2063
2068
|
o.ordinalNumber(e, {
|
|
@@ -2090,11 +2095,11 @@ class br extends P {
|
|
|
2090
2095
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2091
2096
|
}
|
|
2092
2097
|
}
|
|
2093
|
-
class
|
|
2098
|
+
class br extends H {
|
|
2094
2099
|
constructor() {
|
|
2095
2100
|
super(...arguments);
|
|
2096
|
-
|
|
2097
|
-
|
|
2101
|
+
f(this, "priority", 110);
|
|
2102
|
+
f(this, "incompatibleTokens", [
|
|
2098
2103
|
"Y",
|
|
2099
2104
|
"R",
|
|
2100
2105
|
"q",
|
|
@@ -2115,11 +2120,11 @@ class wr extends P {
|
|
|
2115
2120
|
switch (r) {
|
|
2116
2121
|
case "L":
|
|
2117
2122
|
return A(
|
|
2118
|
-
|
|
2123
|
+
N(q.month, e),
|
|
2119
2124
|
a
|
|
2120
2125
|
);
|
|
2121
2126
|
case "LL":
|
|
2122
|
-
return A(
|
|
2127
|
+
return A(Y(2, e), a);
|
|
2123
2128
|
case "Lo":
|
|
2124
2129
|
return A(
|
|
2125
2130
|
o.ordinalNumber(e, {
|
|
@@ -2152,15 +2157,15 @@ class wr extends P {
|
|
|
2152
2157
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2153
2158
|
}
|
|
2154
2159
|
}
|
|
2155
|
-
function
|
|
2156
|
-
const r =
|
|
2160
|
+
function wr(t, n, e) {
|
|
2161
|
+
const r = _(t), o = nt(r, e) - n;
|
|
2157
2162
|
return r.setDate(r.getDate() - o * 7), r;
|
|
2158
2163
|
}
|
|
2159
|
-
class
|
|
2164
|
+
class vr extends H {
|
|
2160
2165
|
constructor() {
|
|
2161
2166
|
super(...arguments);
|
|
2162
|
-
|
|
2163
|
-
|
|
2167
|
+
f(this, "priority", 100);
|
|
2168
|
+
f(this, "incompatibleTokens", [
|
|
2164
2169
|
"y",
|
|
2165
2170
|
"R",
|
|
2166
2171
|
"u",
|
|
@@ -2179,29 +2184,29 @@ class xr extends P {
|
|
|
2179
2184
|
parse(e, r, o) {
|
|
2180
2185
|
switch (r) {
|
|
2181
2186
|
case "w":
|
|
2182
|
-
return
|
|
2187
|
+
return N(q.week, e);
|
|
2183
2188
|
case "wo":
|
|
2184
2189
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2185
2190
|
default:
|
|
2186
|
-
return
|
|
2191
|
+
return Y(r.length, e);
|
|
2187
2192
|
}
|
|
2188
2193
|
}
|
|
2189
2194
|
validate(e, r) {
|
|
2190
2195
|
return r >= 1 && r <= 53;
|
|
2191
2196
|
}
|
|
2192
2197
|
set(e, r, o, a) {
|
|
2193
|
-
return
|
|
2198
|
+
return X(wr(e, o, a), a);
|
|
2194
2199
|
}
|
|
2195
2200
|
}
|
|
2196
|
-
function
|
|
2197
|
-
const e =
|
|
2201
|
+
function xr(t, n) {
|
|
2202
|
+
const e = _(t), r = tt(e) - n;
|
|
2198
2203
|
return e.setDate(e.getDate() - r * 7), e;
|
|
2199
2204
|
}
|
|
2200
|
-
class
|
|
2205
|
+
class Mr extends H {
|
|
2201
2206
|
constructor() {
|
|
2202
2207
|
super(...arguments);
|
|
2203
|
-
|
|
2204
|
-
|
|
2208
|
+
f(this, "priority", 100);
|
|
2209
|
+
f(this, "incompatibleTokens", [
|
|
2205
2210
|
"y",
|
|
2206
2211
|
"Y",
|
|
2207
2212
|
"u",
|
|
@@ -2221,21 +2226,21 @@ class Cr extends P {
|
|
|
2221
2226
|
parse(e, r, o) {
|
|
2222
2227
|
switch (r) {
|
|
2223
2228
|
case "I":
|
|
2224
|
-
return
|
|
2229
|
+
return N(q.week, e);
|
|
2225
2230
|
case "Io":
|
|
2226
2231
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2227
2232
|
default:
|
|
2228
|
-
return
|
|
2233
|
+
return Y(r.length, e);
|
|
2229
2234
|
}
|
|
2230
2235
|
}
|
|
2231
2236
|
validate(e, r) {
|
|
2232
2237
|
return r >= 1 && r <= 53;
|
|
2233
2238
|
}
|
|
2234
2239
|
set(e, r, o) {
|
|
2235
|
-
return
|
|
2240
|
+
return ee(xr(e, o));
|
|
2236
2241
|
}
|
|
2237
2242
|
}
|
|
2238
|
-
const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
2243
|
+
const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = [
|
|
2239
2244
|
31,
|
|
2240
2245
|
29,
|
|
2241
2246
|
31,
|
|
@@ -2249,12 +2254,12 @@ const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Tr = [
|
|
|
2249
2254
|
30,
|
|
2250
2255
|
31
|
|
2251
2256
|
];
|
|
2252
|
-
class
|
|
2257
|
+
class Tr extends H {
|
|
2253
2258
|
constructor() {
|
|
2254
2259
|
super(...arguments);
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2260
|
+
f(this, "priority", 90);
|
|
2261
|
+
f(this, "subPriority", 1);
|
|
2262
|
+
f(this, "incompatibleTokens", [
|
|
2258
2263
|
"Y",
|
|
2259
2264
|
"R",
|
|
2260
2265
|
"q",
|
|
@@ -2272,27 +2277,27 @@ class Pr extends P {
|
|
|
2272
2277
|
parse(e, r, o) {
|
|
2273
2278
|
switch (r) {
|
|
2274
2279
|
case "d":
|
|
2275
|
-
return
|
|
2280
|
+
return N(q.date, e);
|
|
2276
2281
|
case "do":
|
|
2277
2282
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2278
2283
|
default:
|
|
2279
|
-
return
|
|
2284
|
+
return Y(r.length, e);
|
|
2280
2285
|
}
|
|
2281
2286
|
}
|
|
2282
2287
|
validate(e, r) {
|
|
2283
2288
|
const o = e.getFullYear(), a = lt(o), i = e.getMonth();
|
|
2284
|
-
return a ? r >= 1 && r <=
|
|
2289
|
+
return a ? r >= 1 && r <= Cr[i] : r >= 1 && r <= kr[i];
|
|
2285
2290
|
}
|
|
2286
2291
|
set(e, r, o) {
|
|
2287
2292
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
2288
2293
|
}
|
|
2289
2294
|
}
|
|
2290
|
-
class
|
|
2295
|
+
class Pr extends H {
|
|
2291
2296
|
constructor() {
|
|
2292
2297
|
super(...arguments);
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2298
|
+
f(this, "priority", 90);
|
|
2299
|
+
f(this, "subpriority", 1);
|
|
2300
|
+
f(this, "incompatibleTokens", [
|
|
2296
2301
|
"Y",
|
|
2297
2302
|
"R",
|
|
2298
2303
|
"q",
|
|
@@ -2314,11 +2319,11 @@ class Or extends P {
|
|
|
2314
2319
|
switch (r) {
|
|
2315
2320
|
case "D":
|
|
2316
2321
|
case "DD":
|
|
2317
|
-
return
|
|
2322
|
+
return N(q.dayOfYear, e);
|
|
2318
2323
|
case "Do":
|
|
2319
2324
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2320
2325
|
default:
|
|
2321
|
-
return
|
|
2326
|
+
return Y(r.length, e);
|
|
2322
2327
|
}
|
|
2323
2328
|
}
|
|
2324
2329
|
validate(e, r) {
|
|
@@ -2330,15 +2335,15 @@ class Or extends P {
|
|
|
2330
2335
|
}
|
|
2331
2336
|
}
|
|
2332
2337
|
function Ee(t, n, e) {
|
|
2333
|
-
var
|
|
2334
|
-
const r =
|
|
2335
|
-
return ze(a,
|
|
2338
|
+
var s, l, m, h;
|
|
2339
|
+
const r = ne(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? r.weekStartsOn ?? ((h = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : h.weekStartsOn) ?? 0, a = _(t), i = a.getDay(), p = (n % 7 + 7) % 7, c = 7 - o, d = n < 0 || n > 6 ? n - (i + c) % 7 : (p + c) % 7 - (i + c) % 7;
|
|
2340
|
+
return ze(a, d);
|
|
2336
2341
|
}
|
|
2337
|
-
class
|
|
2342
|
+
class Or extends H {
|
|
2338
2343
|
constructor() {
|
|
2339
2344
|
super(...arguments);
|
|
2340
|
-
|
|
2341
|
-
|
|
2345
|
+
f(this, "priority", 90);
|
|
2346
|
+
f(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
|
|
2342
2347
|
}
|
|
2343
2348
|
parse(e, r, o) {
|
|
2344
2349
|
switch (r) {
|
|
@@ -2371,11 +2376,11 @@ class Dr extends P {
|
|
|
2371
2376
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2372
2377
|
}
|
|
2373
2378
|
}
|
|
2374
|
-
class
|
|
2379
|
+
class Dr extends H {
|
|
2375
2380
|
constructor() {
|
|
2376
2381
|
super(...arguments);
|
|
2377
|
-
|
|
2378
|
-
|
|
2382
|
+
f(this, "priority", 90);
|
|
2383
|
+
f(this, "incompatibleTokens", [
|
|
2379
2384
|
"y",
|
|
2380
2385
|
"R",
|
|
2381
2386
|
"u",
|
|
@@ -2394,14 +2399,14 @@ class Hr extends P {
|
|
|
2394
2399
|
]);
|
|
2395
2400
|
}
|
|
2396
2401
|
parse(e, r, o, a) {
|
|
2397
|
-
const i = (
|
|
2398
|
-
const
|
|
2399
|
-
return (
|
|
2402
|
+
const i = (u) => {
|
|
2403
|
+
const p = Math.floor((u - 1) / 7) * 7;
|
|
2404
|
+
return (u + a.weekStartsOn + 6) % 7 + p;
|
|
2400
2405
|
};
|
|
2401
2406
|
switch (r) {
|
|
2402
2407
|
case "e":
|
|
2403
2408
|
case "ee":
|
|
2404
|
-
return A(
|
|
2409
|
+
return A(Y(r.length, e), i);
|
|
2405
2410
|
case "eo":
|
|
2406
2411
|
return A(
|
|
2407
2412
|
o.ordinalNumber(e, {
|
|
@@ -2436,11 +2441,11 @@ class Hr extends P {
|
|
|
2436
2441
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2437
2442
|
}
|
|
2438
2443
|
}
|
|
2439
|
-
class
|
|
2444
|
+
class Hr extends H {
|
|
2440
2445
|
constructor() {
|
|
2441
2446
|
super(...arguments);
|
|
2442
|
-
|
|
2443
|
-
|
|
2447
|
+
f(this, "priority", 90);
|
|
2448
|
+
f(this, "incompatibleTokens", [
|
|
2444
2449
|
"y",
|
|
2445
2450
|
"R",
|
|
2446
2451
|
"u",
|
|
@@ -2459,14 +2464,14 @@ class Br extends P {
|
|
|
2459
2464
|
]);
|
|
2460
2465
|
}
|
|
2461
2466
|
parse(e, r, o, a) {
|
|
2462
|
-
const i = (
|
|
2463
|
-
const
|
|
2464
|
-
return (
|
|
2467
|
+
const i = (u) => {
|
|
2468
|
+
const p = Math.floor((u - 1) / 7) * 7;
|
|
2469
|
+
return (u + a.weekStartsOn + 6) % 7 + p;
|
|
2465
2470
|
};
|
|
2466
2471
|
switch (r) {
|
|
2467
2472
|
case "c":
|
|
2468
2473
|
case "cc":
|
|
2469
|
-
return A(
|
|
2474
|
+
return A(Y(r.length, e), i);
|
|
2470
2475
|
case "co":
|
|
2471
2476
|
return A(
|
|
2472
2477
|
o.ordinalNumber(e, {
|
|
@@ -2502,14 +2507,14 @@ class Br extends P {
|
|
|
2502
2507
|
}
|
|
2503
2508
|
}
|
|
2504
2509
|
function Er(t, n) {
|
|
2505
|
-
const e =
|
|
2510
|
+
const e = _(t), r = ar(e), o = n - r;
|
|
2506
2511
|
return ze(e, o);
|
|
2507
2512
|
}
|
|
2508
|
-
class
|
|
2513
|
+
class Br extends H {
|
|
2509
2514
|
constructor() {
|
|
2510
2515
|
super(...arguments);
|
|
2511
|
-
|
|
2512
|
-
|
|
2516
|
+
f(this, "priority", 90);
|
|
2517
|
+
f(this, "incompatibleTokens", [
|
|
2513
2518
|
"y",
|
|
2514
2519
|
"Y",
|
|
2515
2520
|
"u",
|
|
@@ -2532,7 +2537,7 @@ class Vr extends P {
|
|
|
2532
2537
|
switch (r) {
|
|
2533
2538
|
case "i":
|
|
2534
2539
|
case "ii":
|
|
2535
|
-
return
|
|
2540
|
+
return Y(r.length, e);
|
|
2536
2541
|
case "io":
|
|
2537
2542
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2538
2543
|
case "iii":
|
|
@@ -2595,11 +2600,11 @@ class Vr extends P {
|
|
|
2595
2600
|
return e = Er(e, o), e.setHours(0, 0, 0, 0), e;
|
|
2596
2601
|
}
|
|
2597
2602
|
}
|
|
2598
|
-
class Fr extends
|
|
2603
|
+
class Fr extends H {
|
|
2599
2604
|
constructor() {
|
|
2600
2605
|
super(...arguments);
|
|
2601
|
-
|
|
2602
|
-
|
|
2606
|
+
f(this, "priority", 80);
|
|
2607
|
+
f(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
|
|
2603
2608
|
}
|
|
2604
2609
|
parse(e, r, o) {
|
|
2605
2610
|
switch (r) {
|
|
@@ -2633,14 +2638,14 @@ class Fr extends P {
|
|
|
2633
2638
|
}
|
|
2634
2639
|
}
|
|
2635
2640
|
set(e, r, o) {
|
|
2636
|
-
return e.setHours(
|
|
2641
|
+
return e.setHours(He(o), 0, 0, 0), e;
|
|
2637
2642
|
}
|
|
2638
2643
|
}
|
|
2639
|
-
class
|
|
2644
|
+
class Vr extends H {
|
|
2640
2645
|
constructor() {
|
|
2641
2646
|
super(...arguments);
|
|
2642
|
-
|
|
2643
|
-
|
|
2647
|
+
f(this, "priority", 80);
|
|
2648
|
+
f(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
|
|
2644
2649
|
}
|
|
2645
2650
|
parse(e, r, o) {
|
|
2646
2651
|
switch (r) {
|
|
@@ -2674,14 +2679,14 @@ class Nr extends P {
|
|
|
2674
2679
|
}
|
|
2675
2680
|
}
|
|
2676
2681
|
set(e, r, o) {
|
|
2677
|
-
return e.setHours(
|
|
2682
|
+
return e.setHours(He(o), 0, 0, 0), e;
|
|
2678
2683
|
}
|
|
2679
2684
|
}
|
|
2680
|
-
class Sr extends
|
|
2685
|
+
class Sr extends H {
|
|
2681
2686
|
constructor() {
|
|
2682
2687
|
super(...arguments);
|
|
2683
|
-
|
|
2684
|
-
|
|
2688
|
+
f(this, "priority", 80);
|
|
2689
|
+
f(this, "incompatibleTokens", ["a", "b", "t", "T"]);
|
|
2685
2690
|
}
|
|
2686
2691
|
parse(e, r, o) {
|
|
2687
2692
|
switch (r) {
|
|
@@ -2715,23 +2720,23 @@ class Sr extends P {
|
|
|
2715
2720
|
}
|
|
2716
2721
|
}
|
|
2717
2722
|
set(e, r, o) {
|
|
2718
|
-
return e.setHours(
|
|
2723
|
+
return e.setHours(He(o), 0, 0, 0), e;
|
|
2719
2724
|
}
|
|
2720
2725
|
}
|
|
2721
|
-
class
|
|
2726
|
+
class Ir extends H {
|
|
2722
2727
|
constructor() {
|
|
2723
2728
|
super(...arguments);
|
|
2724
|
-
|
|
2725
|
-
|
|
2729
|
+
f(this, "priority", 70);
|
|
2730
|
+
f(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
|
|
2726
2731
|
}
|
|
2727
2732
|
parse(e, r, o) {
|
|
2728
2733
|
switch (r) {
|
|
2729
2734
|
case "h":
|
|
2730
|
-
return
|
|
2735
|
+
return N(q.hour12h, e);
|
|
2731
2736
|
case "ho":
|
|
2732
2737
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2733
2738
|
default:
|
|
2734
|
-
return
|
|
2739
|
+
return Y(r.length, e);
|
|
2735
2740
|
}
|
|
2736
2741
|
}
|
|
2737
2742
|
validate(e, r) {
|
|
@@ -2742,20 +2747,20 @@ class Lr extends P {
|
|
|
2742
2747
|
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;
|
|
2743
2748
|
}
|
|
2744
2749
|
}
|
|
2745
|
-
class
|
|
2750
|
+
class Nr extends H {
|
|
2746
2751
|
constructor() {
|
|
2747
2752
|
super(...arguments);
|
|
2748
|
-
|
|
2749
|
-
|
|
2753
|
+
f(this, "priority", 70);
|
|
2754
|
+
f(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
|
|
2750
2755
|
}
|
|
2751
2756
|
parse(e, r, o) {
|
|
2752
2757
|
switch (r) {
|
|
2753
2758
|
case "H":
|
|
2754
|
-
return
|
|
2759
|
+
return N(q.hour23h, e);
|
|
2755
2760
|
case "Ho":
|
|
2756
2761
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2757
2762
|
default:
|
|
2758
|
-
return
|
|
2763
|
+
return Y(r.length, e);
|
|
2759
2764
|
}
|
|
2760
2765
|
}
|
|
2761
2766
|
validate(e, r) {
|
|
@@ -2765,20 +2770,20 @@ class Ir extends P {
|
|
|
2765
2770
|
return e.setHours(o, 0, 0, 0), e;
|
|
2766
2771
|
}
|
|
2767
2772
|
}
|
|
2768
|
-
class
|
|
2773
|
+
class Lr extends H {
|
|
2769
2774
|
constructor() {
|
|
2770
2775
|
super(...arguments);
|
|
2771
|
-
|
|
2772
|
-
|
|
2776
|
+
f(this, "priority", 70);
|
|
2777
|
+
f(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
|
|
2773
2778
|
}
|
|
2774
2779
|
parse(e, r, o) {
|
|
2775
2780
|
switch (r) {
|
|
2776
2781
|
case "K":
|
|
2777
|
-
return
|
|
2782
|
+
return N(q.hour11h, e);
|
|
2778
2783
|
case "Ko":
|
|
2779
2784
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2780
2785
|
default:
|
|
2781
|
-
return
|
|
2786
|
+
return Y(r.length, e);
|
|
2782
2787
|
}
|
|
2783
2788
|
}
|
|
2784
2789
|
validate(e, r) {
|
|
@@ -2788,20 +2793,20 @@ class Yr extends P {
|
|
|
2788
2793
|
return e.getHours() >= 12 && o < 12 ? e.setHours(o + 12, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2789
2794
|
}
|
|
2790
2795
|
}
|
|
2791
|
-
class
|
|
2796
|
+
class Wr extends H {
|
|
2792
2797
|
constructor() {
|
|
2793
2798
|
super(...arguments);
|
|
2794
|
-
|
|
2795
|
-
|
|
2799
|
+
f(this, "priority", 70);
|
|
2800
|
+
f(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
|
|
2796
2801
|
}
|
|
2797
2802
|
parse(e, r, o) {
|
|
2798
2803
|
switch (r) {
|
|
2799
2804
|
case "k":
|
|
2800
|
-
return
|
|
2805
|
+
return N(q.hour24h, e);
|
|
2801
2806
|
case "ko":
|
|
2802
2807
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2803
2808
|
default:
|
|
2804
|
-
return
|
|
2809
|
+
return Y(r.length, e);
|
|
2805
2810
|
}
|
|
2806
2811
|
}
|
|
2807
2812
|
validate(e, r) {
|
|
@@ -2812,20 +2817,20 @@ class Ar extends P {
|
|
|
2812
2817
|
return e.setHours(a, 0, 0, 0), e;
|
|
2813
2818
|
}
|
|
2814
2819
|
}
|
|
2815
|
-
class
|
|
2820
|
+
class Yr extends H {
|
|
2816
2821
|
constructor() {
|
|
2817
2822
|
super(...arguments);
|
|
2818
|
-
|
|
2819
|
-
|
|
2823
|
+
f(this, "priority", 60);
|
|
2824
|
+
f(this, "incompatibleTokens", ["t", "T"]);
|
|
2820
2825
|
}
|
|
2821
2826
|
parse(e, r, o) {
|
|
2822
2827
|
switch (r) {
|
|
2823
2828
|
case "m":
|
|
2824
|
-
return
|
|
2829
|
+
return N(q.minute, e);
|
|
2825
2830
|
case "mo":
|
|
2826
2831
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2827
2832
|
default:
|
|
2828
|
-
return
|
|
2833
|
+
return Y(r.length, e);
|
|
2829
2834
|
}
|
|
2830
2835
|
}
|
|
2831
2836
|
validate(e, r) {
|
|
@@ -2835,20 +2840,20 @@ class qr extends P {
|
|
|
2835
2840
|
return e.setMinutes(o, 0, 0), e;
|
|
2836
2841
|
}
|
|
2837
2842
|
}
|
|
2838
|
-
class
|
|
2843
|
+
class qr extends H {
|
|
2839
2844
|
constructor() {
|
|
2840
2845
|
super(...arguments);
|
|
2841
|
-
|
|
2842
|
-
|
|
2846
|
+
f(this, "priority", 50);
|
|
2847
|
+
f(this, "incompatibleTokens", ["t", "T"]);
|
|
2843
2848
|
}
|
|
2844
2849
|
parse(e, r, o) {
|
|
2845
2850
|
switch (r) {
|
|
2846
2851
|
case "s":
|
|
2847
|
-
return
|
|
2852
|
+
return N(q.second, e);
|
|
2848
2853
|
case "so":
|
|
2849
2854
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2850
2855
|
default:
|
|
2851
|
-
return
|
|
2856
|
+
return Y(r.length, e);
|
|
2852
2857
|
}
|
|
2853
2858
|
}
|
|
2854
2859
|
validate(e, r) {
|
|
@@ -2858,257 +2863,257 @@ class Wr extends P {
|
|
|
2858
2863
|
return e.setSeconds(o, 0), e;
|
|
2859
2864
|
}
|
|
2860
2865
|
}
|
|
2861
|
-
class
|
|
2866
|
+
class Ar extends H {
|
|
2862
2867
|
constructor() {
|
|
2863
2868
|
super(...arguments);
|
|
2864
|
-
|
|
2865
|
-
|
|
2869
|
+
f(this, "priority", 30);
|
|
2870
|
+
f(this, "incompatibleTokens", ["t", "T"]);
|
|
2866
2871
|
}
|
|
2867
2872
|
parse(e, r) {
|
|
2868
2873
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2869
|
-
return A(
|
|
2874
|
+
return A(Y(r.length, e), o);
|
|
2870
2875
|
}
|
|
2871
2876
|
set(e, r, o) {
|
|
2872
2877
|
return e.setMilliseconds(o), e;
|
|
2873
2878
|
}
|
|
2874
2879
|
}
|
|
2875
|
-
class
|
|
2880
|
+
class _r extends H {
|
|
2876
2881
|
constructor() {
|
|
2877
2882
|
super(...arguments);
|
|
2878
|
-
|
|
2879
|
-
|
|
2883
|
+
f(this, "priority", 10);
|
|
2884
|
+
f(this, "incompatibleTokens", ["t", "T", "x"]);
|
|
2880
2885
|
}
|
|
2881
2886
|
parse(e, r) {
|
|
2882
2887
|
switch (r) {
|
|
2883
2888
|
case "X":
|
|
2884
|
-
return
|
|
2885
|
-
|
|
2889
|
+
return Q(
|
|
2890
|
+
R.basicOptionalMinutes,
|
|
2886
2891
|
e
|
|
2887
2892
|
);
|
|
2888
2893
|
case "XX":
|
|
2889
|
-
return
|
|
2894
|
+
return Q(R.basic, e);
|
|
2890
2895
|
case "XXXX":
|
|
2891
|
-
return
|
|
2892
|
-
|
|
2896
|
+
return Q(
|
|
2897
|
+
R.basicOptionalSeconds,
|
|
2893
2898
|
e
|
|
2894
2899
|
);
|
|
2895
2900
|
case "XXXXX":
|
|
2896
|
-
return
|
|
2897
|
-
|
|
2901
|
+
return Q(
|
|
2902
|
+
R.extendedOptionalSeconds,
|
|
2898
2903
|
e
|
|
2899
2904
|
);
|
|
2900
2905
|
case "XXX":
|
|
2901
2906
|
default:
|
|
2902
|
-
return
|
|
2907
|
+
return Q(R.extended, e);
|
|
2903
2908
|
}
|
|
2904
2909
|
}
|
|
2905
2910
|
set(e, r, o) {
|
|
2906
|
-
return r.timestampIsSet ? e :
|
|
2911
|
+
return r.timestampIsSet ? e : W(
|
|
2907
2912
|
e,
|
|
2908
2913
|
e.getTime() - he(e) - o
|
|
2909
2914
|
);
|
|
2910
2915
|
}
|
|
2911
2916
|
}
|
|
2912
|
-
class
|
|
2917
|
+
class Gr extends H {
|
|
2913
2918
|
constructor() {
|
|
2914
2919
|
super(...arguments);
|
|
2915
|
-
|
|
2916
|
-
|
|
2920
|
+
f(this, "priority", 10);
|
|
2921
|
+
f(this, "incompatibleTokens", ["t", "T", "X"]);
|
|
2917
2922
|
}
|
|
2918
2923
|
parse(e, r) {
|
|
2919
2924
|
switch (r) {
|
|
2920
2925
|
case "x":
|
|
2921
|
-
return
|
|
2922
|
-
|
|
2926
|
+
return Q(
|
|
2927
|
+
R.basicOptionalMinutes,
|
|
2923
2928
|
e
|
|
2924
2929
|
);
|
|
2925
2930
|
case "xx":
|
|
2926
|
-
return
|
|
2931
|
+
return Q(R.basic, e);
|
|
2927
2932
|
case "xxxx":
|
|
2928
|
-
return
|
|
2929
|
-
|
|
2933
|
+
return Q(
|
|
2934
|
+
R.basicOptionalSeconds,
|
|
2930
2935
|
e
|
|
2931
2936
|
);
|
|
2932
2937
|
case "xxxxx":
|
|
2933
|
-
return
|
|
2934
|
-
|
|
2938
|
+
return Q(
|
|
2939
|
+
R.extendedOptionalSeconds,
|
|
2935
2940
|
e
|
|
2936
2941
|
);
|
|
2937
2942
|
case "xxx":
|
|
2938
2943
|
default:
|
|
2939
|
-
return
|
|
2944
|
+
return Q(R.extended, e);
|
|
2940
2945
|
}
|
|
2941
2946
|
}
|
|
2942
2947
|
set(e, r, o) {
|
|
2943
|
-
return r.timestampIsSet ? e :
|
|
2948
|
+
return r.timestampIsSet ? e : W(
|
|
2944
2949
|
e,
|
|
2945
2950
|
e.getTime() - he(e) - o
|
|
2946
2951
|
);
|
|
2947
2952
|
}
|
|
2948
2953
|
}
|
|
2949
|
-
class
|
|
2954
|
+
class $r extends H {
|
|
2950
2955
|
constructor() {
|
|
2951
2956
|
super(...arguments);
|
|
2952
|
-
|
|
2953
|
-
|
|
2957
|
+
f(this, "priority", 40);
|
|
2958
|
+
f(this, "incompatibleTokens", "*");
|
|
2954
2959
|
}
|
|
2955
2960
|
parse(e) {
|
|
2956
|
-
return
|
|
2961
|
+
return it(e);
|
|
2957
2962
|
}
|
|
2958
2963
|
set(e, r, o) {
|
|
2959
|
-
return [
|
|
2964
|
+
return [W(e, o * 1e3), { timestampIsSet: !0 }];
|
|
2960
2965
|
}
|
|
2961
2966
|
}
|
|
2962
|
-
class
|
|
2967
|
+
class jr extends H {
|
|
2963
2968
|
constructor() {
|
|
2964
2969
|
super(...arguments);
|
|
2965
|
-
|
|
2966
|
-
|
|
2970
|
+
f(this, "priority", 20);
|
|
2971
|
+
f(this, "incompatibleTokens", "*");
|
|
2967
2972
|
}
|
|
2968
2973
|
parse(e) {
|
|
2969
|
-
return
|
|
2974
|
+
return it(e);
|
|
2970
2975
|
}
|
|
2971
2976
|
set(e, r, o) {
|
|
2972
|
-
return [
|
|
2977
|
+
return [W(e, o), { timestampIsSet: !0 }];
|
|
2973
2978
|
}
|
|
2974
2979
|
}
|
|
2975
|
-
const
|
|
2976
|
-
G: new
|
|
2977
|
-
y: new
|
|
2978
|
-
Y: new
|
|
2979
|
-
R: new
|
|
2980
|
-
u: new
|
|
2981
|
-
Q: new
|
|
2982
|
-
q: new
|
|
2983
|
-
M: new
|
|
2984
|
-
L: new
|
|
2985
|
-
w: new
|
|
2986
|
-
I: new
|
|
2987
|
-
d: new
|
|
2988
|
-
D: new
|
|
2989
|
-
E: new
|
|
2990
|
-
e: new
|
|
2991
|
-
c: new
|
|
2992
|
-
i: new
|
|
2980
|
+
const Rr = {
|
|
2981
|
+
G: new cr(),
|
|
2982
|
+
y: new dr(),
|
|
2983
|
+
Y: new fr(),
|
|
2984
|
+
R: new pr(),
|
|
2985
|
+
u: new mr(),
|
|
2986
|
+
Q: new hr(),
|
|
2987
|
+
q: new yr(),
|
|
2988
|
+
M: new gr(),
|
|
2989
|
+
L: new br(),
|
|
2990
|
+
w: new vr(),
|
|
2991
|
+
I: new Mr(),
|
|
2992
|
+
d: new Tr(),
|
|
2993
|
+
D: new Pr(),
|
|
2994
|
+
E: new Or(),
|
|
2995
|
+
e: new Dr(),
|
|
2996
|
+
c: new Hr(),
|
|
2997
|
+
i: new Br(),
|
|
2993
2998
|
a: new Fr(),
|
|
2994
|
-
b: new
|
|
2999
|
+
b: new Vr(),
|
|
2995
3000
|
B: new Sr(),
|
|
2996
|
-
h: new
|
|
2997
|
-
H: new
|
|
2998
|
-
K: new
|
|
2999
|
-
k: new
|
|
3000
|
-
m: new
|
|
3001
|
-
s: new
|
|
3002
|
-
S: new
|
|
3003
|
-
X: new
|
|
3004
|
-
x: new
|
|
3005
|
-
t: new
|
|
3006
|
-
T: new
|
|
3007
|
-
},
|
|
3008
|
-
function
|
|
3009
|
-
var
|
|
3010
|
-
const o =
|
|
3001
|
+
h: new Ir(),
|
|
3002
|
+
H: new Nr(),
|
|
3003
|
+
K: new Lr(),
|
|
3004
|
+
k: new Wr(),
|
|
3005
|
+
m: new Yr(),
|
|
3006
|
+
s: new qr(),
|
|
3007
|
+
S: new Ar(),
|
|
3008
|
+
X: new _r(),
|
|
3009
|
+
x: new Gr(),
|
|
3010
|
+
t: new $r(),
|
|
3011
|
+
T: new jr()
|
|
3012
|
+
}, Qr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ur = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xr = /^'([^]*?)'?$/, zr = /''/g, Jr = /\S/, Zr = /[a-zA-Z]/;
|
|
3013
|
+
function Ge(t, n, e, r) {
|
|
3014
|
+
var g, P, O, D;
|
|
3015
|
+
const o = or(), a = o.locale ?? et, i = o.firstWeekContainsDate ?? ((P = (g = o.locale) == null ? void 0 : g.options) == null ? void 0 : P.firstWeekContainsDate) ?? 1, u = o.weekStartsOn ?? ((D = (O = o.locale) == null ? void 0 : O.options) == null ? void 0 : D.weekStartsOn) ?? 0;
|
|
3011
3016
|
if (n === "")
|
|
3012
|
-
return t === "" ?
|
|
3013
|
-
const
|
|
3017
|
+
return t === "" ? _(e) : W(e, NaN);
|
|
3018
|
+
const p = {
|
|
3014
3019
|
firstWeekContainsDate: i,
|
|
3015
|
-
weekStartsOn:
|
|
3020
|
+
weekStartsOn: u,
|
|
3016
3021
|
locale: a
|
|
3017
|
-
},
|
|
3018
|
-
const k =
|
|
3019
|
-
if (k in
|
|
3020
|
-
const
|
|
3021
|
-
return
|
|
3022
|
+
}, c = [new lr()], d = n.match(Ur).map((b) => {
|
|
3023
|
+
const k = b[0];
|
|
3024
|
+
if (k in Me) {
|
|
3025
|
+
const v = Me[k];
|
|
3026
|
+
return v(b, a.formatLong);
|
|
3022
3027
|
}
|
|
3023
|
-
return
|
|
3024
|
-
}).join("").match(
|
|
3025
|
-
for (let
|
|
3026
|
-
at(
|
|
3027
|
-
const k =
|
|
3028
|
-
if (
|
|
3029
|
-
const { incompatibleTokens:
|
|
3030
|
-
if (Array.isArray(
|
|
3031
|
-
const
|
|
3032
|
-
(
|
|
3028
|
+
return b;
|
|
3029
|
+
}).join("").match(Qr), s = [];
|
|
3030
|
+
for (let b of d) {
|
|
3031
|
+
at(b) && ke(b, n, t), ot(b) && ke(b, n, t);
|
|
3032
|
+
const k = b[0], v = Rr[k];
|
|
3033
|
+
if (v) {
|
|
3034
|
+
const { incompatibleTokens: E } = v;
|
|
3035
|
+
if (Array.isArray(E)) {
|
|
3036
|
+
const L = s.find(
|
|
3037
|
+
(C) => E.includes(C.token) || C.token === k
|
|
3033
3038
|
);
|
|
3034
|
-
if (
|
|
3039
|
+
if (L)
|
|
3035
3040
|
throw new RangeError(
|
|
3036
|
-
`The format string mustn't contain \`${
|
|
3041
|
+
`The format string mustn't contain \`${L.fullToken}\` and \`${b}\` at the same time`
|
|
3037
3042
|
);
|
|
3038
|
-
} else if (
|
|
3043
|
+
} else if (v.incompatibleTokens === "*" && s.length > 0)
|
|
3039
3044
|
throw new RangeError(
|
|
3040
|
-
`The format string mustn't contain \`${
|
|
3045
|
+
`The format string mustn't contain \`${b}\` and any other token at the same time`
|
|
3041
3046
|
);
|
|
3042
|
-
|
|
3043
|
-
const
|
|
3047
|
+
s.push({ token: k, fullToken: b });
|
|
3048
|
+
const F = v.run(
|
|
3044
3049
|
t,
|
|
3045
|
-
|
|
3050
|
+
b,
|
|
3046
3051
|
a.match,
|
|
3047
|
-
|
|
3052
|
+
p
|
|
3048
3053
|
);
|
|
3049
|
-
if (!
|
|
3050
|
-
return
|
|
3051
|
-
|
|
3054
|
+
if (!F)
|
|
3055
|
+
return W(e, NaN);
|
|
3056
|
+
c.push(F.setter), t = F.rest;
|
|
3052
3057
|
} else {
|
|
3053
|
-
if (k.match(
|
|
3058
|
+
if (k.match(Zr))
|
|
3054
3059
|
throw new RangeError(
|
|
3055
3060
|
"Format string contains an unescaped latin alphabet character `" + k + "`"
|
|
3056
3061
|
);
|
|
3057
|
-
if (
|
|
3058
|
-
t = t.slice(
|
|
3062
|
+
if (b === "''" ? b = "'" : k === "'" && (b = Kr(b)), t.indexOf(b) === 0)
|
|
3063
|
+
t = t.slice(b.length);
|
|
3059
3064
|
else
|
|
3060
|
-
return
|
|
3065
|
+
return W(e, NaN);
|
|
3061
3066
|
}
|
|
3062
3067
|
}
|
|
3063
|
-
if (t.length > 0 &&
|
|
3064
|
-
return
|
|
3065
|
-
const
|
|
3066
|
-
(
|
|
3067
|
-
).map((
|
|
3068
|
-
let m =
|
|
3068
|
+
if (t.length > 0 && Jr.test(t))
|
|
3069
|
+
return W(e, NaN);
|
|
3070
|
+
const l = c.map((b) => b.priority).sort((b, k) => k - b).filter((b, k, v) => v.indexOf(b) === k).map(
|
|
3071
|
+
(b) => c.filter((k) => k.priority === b).sort((k, v) => v.subPriority - k.subPriority)
|
|
3072
|
+
).map((b) => b[0]);
|
|
3073
|
+
let m = _(e);
|
|
3069
3074
|
if (isNaN(m.getTime()))
|
|
3070
|
-
return
|
|
3071
|
-
const
|
|
3072
|
-
for (const
|
|
3073
|
-
if (!
|
|
3074
|
-
return
|
|
3075
|
-
const k =
|
|
3076
|
-
Array.isArray(k) ? (m = k[0], Object.assign(
|
|
3077
|
-
}
|
|
3078
|
-
return
|
|
3075
|
+
return W(e, NaN);
|
|
3076
|
+
const h = {};
|
|
3077
|
+
for (const b of l) {
|
|
3078
|
+
if (!b.validate(m, p))
|
|
3079
|
+
return W(e, NaN);
|
|
3080
|
+
const k = b.set(m, h, p);
|
|
3081
|
+
Array.isArray(k) ? (m = k[0], Object.assign(h, k[1])) : m = k;
|
|
3082
|
+
}
|
|
3083
|
+
return W(e, m);
|
|
3079
3084
|
}
|
|
3080
|
-
function
|
|
3081
|
-
return t.match(
|
|
3085
|
+
function Kr(t) {
|
|
3086
|
+
return t.match(Xr)[1].replace(zr, "'");
|
|
3082
3087
|
}
|
|
3083
|
-
function
|
|
3088
|
+
function V(t) {
|
|
3084
3089
|
return typeof t < "u" && t !== null;
|
|
3085
3090
|
}
|
|
3086
3091
|
function ct(t, n = "hh:mm:ss") {
|
|
3087
3092
|
if (!(!t || !n))
|
|
3088
|
-
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3093
|
+
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), Ge(t.toLowerCase(), n, /* @__PURE__ */ new Date())) : Ge(t, n, /* @__PURE__ */ new Date());
|
|
3089
3094
|
}
|
|
3090
3095
|
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"),
|
|
3096
|
+
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), _e(t, n).toUpperCase()) : _e(t, n);
|
|
3092
3097
|
}
|
|
3093
3098
|
function ft(t, n) {
|
|
3094
3099
|
let e = t || "hh:mm:ss";
|
|
3095
3100
|
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;
|
|
3096
3101
|
}
|
|
3097
|
-
class
|
|
3102
|
+
class eo {
|
|
3098
3103
|
constructor() {
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3104
|
+
f(this, "hourStep", 1);
|
|
3105
|
+
f(this, "minuteStep", 1);
|
|
3106
|
+
f(this, "secondStep", 1);
|
|
3107
|
+
f(this, "use12Hours", !1);
|
|
3108
|
+
f(this, "changedValue", x({ text: "", value: void 0 }));
|
|
3109
|
+
f(this, "format", "HH:mm:ss");
|
|
3110
|
+
f(this, "temporaryHours");
|
|
3111
|
+
f(this, "temporaryMinutes");
|
|
3112
|
+
f(this, "temporarySeconds");
|
|
3113
|
+
f(this, "temporaryText", "");
|
|
3114
|
+
f(this, "temporaryValue");
|
|
3115
|
+
f(this, "temporarySelected12Hours");
|
|
3116
|
+
f(this, "temporaryDefaultOpenValue", /* @__PURE__ */ new Date());
|
|
3112
3117
|
}
|
|
3113
3118
|
/**
|
|
3114
3119
|
* @description
|
|
@@ -3139,7 +3144,7 @@ class to {
|
|
|
3139
3144
|
* Get viewHours which is selected in `time-picker-panel` and its range is [12, 1, 2, ..., 11]
|
|
3140
3145
|
*/
|
|
3141
3146
|
get viewHours() {
|
|
3142
|
-
return this.use12Hours &&
|
|
3147
|
+
return this.use12Hours && V(this.temporaryHours) ? this.calculateViewHour(this.temporaryHours) : this.temporaryHours;
|
|
3143
3148
|
}
|
|
3144
3149
|
get minutes() {
|
|
3145
3150
|
return this.temporaryMinutes;
|
|
@@ -3167,7 +3172,7 @@ class to {
|
|
|
3167
3172
|
*/
|
|
3168
3173
|
get defaultViewHours() {
|
|
3169
3174
|
const n = this.defaultOpenValue.getHours();
|
|
3170
|
-
return this.use12Hours &&
|
|
3175
|
+
return this.use12Hours && V(n) ? this.calculateViewHour(n) : n;
|
|
3171
3176
|
}
|
|
3172
3177
|
/**
|
|
3173
3178
|
* @description
|
|
@@ -3196,7 +3201,7 @@ class to {
|
|
|
3196
3201
|
return this.temporaryValue;
|
|
3197
3202
|
}
|
|
3198
3203
|
set value(n) {
|
|
3199
|
-
n !== this.temporaryValue && (this.temporaryValue = n,
|
|
3204
|
+
n !== this.temporaryValue && (this.temporaryValue = n, V(this.temporaryValue) && Ke(this.temporaryValue) ? (this.temporaryHours = this.temporaryValue.getHours(), this.temporaryMinutes = this.temporaryValue.getMinutes(), this.temporarySeconds = this.temporaryValue.getSeconds(), this.use12Hours && V(this.temporaryHours) && (this.temporarySelected12Hours = this.temporaryHours >= 12 ? "PM" : "AM")) : this.clearTimeValue());
|
|
3200
3205
|
}
|
|
3201
3206
|
get selected12Hours() {
|
|
3202
3207
|
return this.temporarySelected12Hours;
|
|
@@ -3211,7 +3216,7 @@ class to {
|
|
|
3211
3216
|
this.temporaryDefaultOpenValue !== n && (this.temporaryDefaultOpenValue = n, this.update());
|
|
3212
3217
|
}
|
|
3213
3218
|
get isEmpty() {
|
|
3214
|
-
return !(
|
|
3219
|
+
return !(V(this.temporaryHours) || V(this.temporaryMinutes) || V(this.temporarySeconds));
|
|
3215
3220
|
}
|
|
3216
3221
|
setFormat(n) {
|
|
3217
3222
|
this.format = n;
|
|
@@ -3229,7 +3234,7 @@ class to {
|
|
|
3229
3234
|
return e ? this : (this.setDefaultValueIfNil(), this.seconds = n, this);
|
|
3230
3235
|
}
|
|
3231
3236
|
setValue(n, e) {
|
|
3232
|
-
return
|
|
3237
|
+
return V(e) && (this.use12Hours = e), this.value = n, this;
|
|
3233
3238
|
}
|
|
3234
3239
|
setValueByStep(n, e) {
|
|
3235
3240
|
let r = Math.floor(n / e);
|
|
@@ -3240,10 +3245,10 @@ class to {
|
|
|
3240
3245
|
return this.defaultOpenValue = n, this;
|
|
3241
3246
|
}
|
|
3242
3247
|
setDefaultValueIfNil() {
|
|
3243
|
-
|
|
3248
|
+
V(this.temporaryValue) || (this.temporaryValue = new Date(this.defaultOpenValue));
|
|
3244
3249
|
}
|
|
3245
3250
|
update() {
|
|
3246
|
-
this.isEmpty ? this.temporaryValue = void 0 : (
|
|
3251
|
+
this.isEmpty ? this.temporaryValue = void 0 : (V(this.temporaryHours) ? this.temporaryValue.setHours(this.hours) : this.temporaryHours = this.defaultHours, V(this.temporaryMinutes) ? this.temporaryValue.setMinutes(this.minutes) : this.temporaryMinutes = this.defaultMinutes, V(this.temporarySeconds) ? this.temporaryValue.setSeconds(this.seconds) : this.temporarySeconds = this.defaultSeconds, this.use12Hours && (V(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(
|
|
3247
3252
|
this.temporaryValue,
|
|
3248
3253
|
this.format,
|
|
3249
3254
|
this.selected12Hours
|
|
@@ -3260,8 +3265,8 @@ class to {
|
|
|
3260
3265
|
return e === "PM" && n > 12 ? n - 12 : e === "AM" && n === 0 ? 12 : n;
|
|
3261
3266
|
}
|
|
3262
3267
|
}
|
|
3263
|
-
const
|
|
3264
|
-
function
|
|
3268
|
+
const to = ["moz", "ms", "webkit"];
|
|
3269
|
+
function no() {
|
|
3265
3270
|
let t = 0;
|
|
3266
3271
|
return (n) => {
|
|
3267
3272
|
const e = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (e - t)), o = setTimeout(() => {
|
|
@@ -3270,339 +3275,339 @@ function ro() {
|
|
|
3270
3275
|
return t = e + r, o;
|
|
3271
3276
|
};
|
|
3272
3277
|
}
|
|
3273
|
-
function
|
|
3278
|
+
function ro() {
|
|
3274
3279
|
if (typeof window > "u")
|
|
3275
3280
|
return () => 0;
|
|
3276
3281
|
if (window.requestAnimationFrame)
|
|
3277
3282
|
return window.requestAnimationFrame.bind(window);
|
|
3278
|
-
const t =
|
|
3279
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
3283
|
+
const t = to.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
3284
|
+
return t ? window[`${t}RequestAnimationFrame`] : no();
|
|
3280
3285
|
}
|
|
3281
|
-
const
|
|
3282
|
-
function
|
|
3283
|
-
function i(
|
|
3284
|
-
const
|
|
3285
|
-
d
|
|
3286
|
-
}
|
|
3287
|
-
function
|
|
3288
|
-
if (
|
|
3286
|
+
const oo = ro();
|
|
3287
|
+
function ao(t, n, e, r, o, a) {
|
|
3288
|
+
function i(d, s, l = 0, m, h) {
|
|
3289
|
+
const g = u(s, m, h), P = d.children[0].children[g] || d.children[0].children[0];
|
|
3290
|
+
p(d, P.offsetTop, l);
|
|
3291
|
+
}
|
|
3292
|
+
function u(d, s, l) {
|
|
3293
|
+
if (s === "hour") {
|
|
3289
3294
|
const m = t.disabledHours && t.disabledHours();
|
|
3290
|
-
return
|
|
3295
|
+
return c(
|
|
3291
3296
|
m,
|
|
3292
|
-
e.value.map((
|
|
3297
|
+
e.value.map((h) => h.index).indexOf(d)
|
|
3293
3298
|
);
|
|
3294
3299
|
}
|
|
3295
|
-
if (
|
|
3296
|
-
const m = t.disabledMinutes && t.disabledMinutes(
|
|
3297
|
-
return
|
|
3300
|
+
if (s === "minute") {
|
|
3301
|
+
const m = t.disabledMinutes && t.disabledMinutes(l.hours);
|
|
3302
|
+
return c(
|
|
3298
3303
|
m,
|
|
3299
|
-
r.value.map((
|
|
3304
|
+
r.value.map((h) => h.index).indexOf(d)
|
|
3300
3305
|
);
|
|
3301
3306
|
}
|
|
3302
|
-
if (
|
|
3303
|
-
const m = t.disabledSeconds && t.disabledSeconds(
|
|
3304
|
-
return
|
|
3307
|
+
if (s === "second") {
|
|
3308
|
+
const m = t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes);
|
|
3309
|
+
return c(
|
|
3305
3310
|
m,
|
|
3306
|
-
o.value.map((
|
|
3311
|
+
o.value.map((h) => h.index).indexOf(d)
|
|
3307
3312
|
);
|
|
3308
3313
|
}
|
|
3309
|
-
return
|
|
3314
|
+
return c(
|
|
3310
3315
|
[],
|
|
3311
|
-
a.value.map((m) => m.index).indexOf(
|
|
3316
|
+
a.value.map((m) => m.index).indexOf(d)
|
|
3312
3317
|
);
|
|
3313
3318
|
}
|
|
3314
|
-
function d
|
|
3315
|
-
if (
|
|
3316
|
-
|
|
3319
|
+
function p(d, s, l) {
|
|
3320
|
+
if (l <= 0) {
|
|
3321
|
+
d.scrollTop = s;
|
|
3317
3322
|
return;
|
|
3318
3323
|
}
|
|
3319
|
-
const
|
|
3320
|
-
|
|
3321
|
-
|
|
3324
|
+
const h = (s - d.scrollTop) / l * 10;
|
|
3325
|
+
oo(() => {
|
|
3326
|
+
d.scrollTop += h, d.scrollTop !== s && p(d, s, l - 10);
|
|
3322
3327
|
});
|
|
3323
3328
|
}
|
|
3324
|
-
function
|
|
3325
|
-
return
|
|
3329
|
+
function c(d, s) {
|
|
3330
|
+
return d && d.length && t.hideDisabledElements ? s - d.reduce((l, m) => l + (m < s ? 1 : 0), 0) : s;
|
|
3326
3331
|
}
|
|
3327
3332
|
return { scrollToSelected: i };
|
|
3328
3333
|
}
|
|
3329
3334
|
function so(t, n) {
|
|
3330
|
-
function e(
|
|
3331
|
-
return
|
|
3335
|
+
function e(u) {
|
|
3336
|
+
return u.index === t.viewHours || !V(t.viewHours) && u.index === t.defaultViewHours;
|
|
3332
3337
|
}
|
|
3333
|
-
function r(
|
|
3334
|
-
return
|
|
3338
|
+
function r(u) {
|
|
3339
|
+
return u.index === t.minutes || !V(t.minutes) && u.index === t.defaultMinutes;
|
|
3335
3340
|
}
|
|
3336
|
-
function o(
|
|
3337
|
-
return
|
|
3341
|
+
function o(u) {
|
|
3342
|
+
return u.index === t.seconds || !V(t.seconds) && u.index === t.defaultSeconds;
|
|
3338
3343
|
}
|
|
3339
|
-
function a(
|
|
3340
|
-
return
|
|
3344
|
+
function a(u) {
|
|
3345
|
+
return u.value.toUpperCase() === t.selected12Hours || !V(t.selected12Hours) && u.value.toUpperCase() === t.default12Hours;
|
|
3341
3346
|
}
|
|
3342
|
-
function i(
|
|
3343
|
-
let
|
|
3344
|
-
const
|
|
3345
|
-
let
|
|
3346
|
-
return
|
|
3347
|
+
function i(u, p) {
|
|
3348
|
+
let c = "";
|
|
3349
|
+
const d = ` ${n}-select-option-selected `, s = ` ${n}-select-option-disabled `;
|
|
3350
|
+
let l = !1;
|
|
3351
|
+
return p === "hour" ? l = e(u) : p === "minute" ? l = r(u) : p === "second" ? l = o(u) : l = a(u), l && (c += d), p === "12-hour" || u.disabled && (c += s), c;
|
|
3347
3352
|
}
|
|
3348
3353
|
return { getSelectedClass: i };
|
|
3349
3354
|
}
|
|
3350
|
-
const
|
|
3355
|
+
const Ce = /* @__PURE__ */ te({
|
|
3351
3356
|
name: "FTimePickerTimeView",
|
|
3352
|
-
props:
|
|
3357
|
+
props: nn,
|
|
3353
3358
|
emits: ["valueChange", "formatedValueChange"],
|
|
3354
3359
|
setup(t, n) {
|
|
3355
|
-
const e = "time-picker-panel", r =
|
|
3360
|
+
const e = "time-picker-panel", r = x(0), o = x([]), a = x([]), i = x([]), u = x([]), p = x(), c = x(), d = x(), s = x(), l = new eo(), {
|
|
3356
3361
|
scrollToSelected: m
|
|
3357
|
-
} =
|
|
3358
|
-
getSelectedClass:
|
|
3359
|
-
} = so(
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
}),
|
|
3363
|
-
|
|
3364
|
-
}),
|
|
3365
|
-
n.emit("valueChange",
|
|
3366
|
-
}),
|
|
3367
|
-
|
|
3368
|
-
}),
|
|
3369
|
-
|
|
3370
|
-
}),
|
|
3371
|
-
|
|
3372
|
-
}),
|
|
3373
|
-
k.value =
|
|
3374
|
-
}),
|
|
3375
|
-
|
|
3376
|
-
}),
|
|
3362
|
+
} = ao(t, n, o, a, i, u), {
|
|
3363
|
+
getSelectedClass: h
|
|
3364
|
+
} = so(l, e), g = x(t.hourStep), P = x(t.minuteStep), O = x(t.secondStep), D = x(), b = x(""), k = x(), v = x(t.hideDisabledElements), E = x(0);
|
|
3365
|
+
G(() => t.defaultOpenValue, (y) => {
|
|
3366
|
+
V(y) && (D.value = y);
|
|
3367
|
+
}), G(D, (y) => {
|
|
3368
|
+
V(y) && l.setDefaultOpenValue(y);
|
|
3369
|
+
}), D.value = t.defaultOpenValue, G(l.changedValue, (y) => {
|
|
3370
|
+
n.emit("valueChange", y);
|
|
3371
|
+
}), G(() => t.modelValue, (y) => {
|
|
3372
|
+
F(y);
|
|
3373
|
+
}), G(() => t.format, (y) => {
|
|
3374
|
+
V(y) ? b.value = y : b.value = "HH:mm:ss";
|
|
3375
|
+
}), G(b, (y) => {
|
|
3376
|
+
V(y) && (l.setFormat(b.value), E.value = 0, fe.value && E.value++, re.value && E.value++, oe.value && E.value++, k.value && (E.value++, Fe()), r.value = E.value * 66);
|
|
3377
|
+
}), G(() => t.use12Hours, (y) => {
|
|
3378
|
+
k.value = y;
|
|
3379
|
+
}), G(k, (y) => {
|
|
3380
|
+
b.value = ft(b.value, y), l.setUse12Hours(y);
|
|
3381
|
+
}), G(() => t.disabledHours, () => {
|
|
3377
3382
|
we();
|
|
3378
|
-
}),
|
|
3383
|
+
}), G(() => t.disabledMinutes, () => {
|
|
3379
3384
|
pe();
|
|
3380
|
-
}),
|
|
3381
|
-
|
|
3385
|
+
}), G(() => t.disabledSeconds, () => {
|
|
3386
|
+
ae();
|
|
3382
3387
|
});
|
|
3383
|
-
function
|
|
3384
|
-
if (
|
|
3385
|
-
|
|
3386
|
-
const
|
|
3387
|
-
|
|
3388
|
+
function F(y) {
|
|
3389
|
+
if (V(y)) {
|
|
3390
|
+
l.text = y;
|
|
3391
|
+
const M = ct(l.text, b.value);
|
|
3392
|
+
l.setValue(M, k.value), Ve();
|
|
3388
3393
|
} else
|
|
3389
|
-
|
|
3394
|
+
l.setUse12Hours(k.value);
|
|
3390
3395
|
}
|
|
3391
|
-
function
|
|
3392
|
-
let
|
|
3393
|
-
return t.disabledHours && (
|
|
3396
|
+
function L() {
|
|
3397
|
+
let y = [];
|
|
3398
|
+
return t.disabledHours && (y = t.disabledHours(), k.value && (l.selected12Hours === "PM" ? y = y.filter((M) => M >= 12).map((M) => M > 12 ? M - 12 : M) : y = y.filter((M) => M < 12 || M === 24).map((M) => M === 24 || M === 0 ? 12 : M))), y;
|
|
3394
3399
|
}
|
|
3395
|
-
function
|
|
3396
|
-
return
|
|
3400
|
+
function C(y = "hour") {
|
|
3401
|
+
return b.value ? b.value.indexOf(y[0].toUpperCase()) > -1 || b.value.indexOf(y[0].toLowerCase()) > -1 : !1;
|
|
3397
3402
|
}
|
|
3398
|
-
const
|
|
3403
|
+
const $ = I(() => ({
|
|
3399
3404
|
"time-picker-panel": !0,
|
|
3400
3405
|
"time-picker-panel-column-3": !0,
|
|
3401
3406
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3402
3407
|
"f-area-show": !0
|
|
3403
|
-
})),
|
|
3408
|
+
})), de = I(() => ({
|
|
3404
3409
|
width: k.value ? `${r.value}px` : "100%"
|
|
3405
|
-
})),
|
|
3406
|
-
function be(
|
|
3407
|
-
return
|
|
3410
|
+
})), fe = I(() => C("hour")), re = I(() => C("minute")), oe = I(() => C("second"));
|
|
3411
|
+
function be(y, M = 1, j = 0) {
|
|
3412
|
+
return M = Math.ceil(M), new Array(Math.ceil(y / M)).fill(0).map((S, se) => (se + j) * M);
|
|
3408
3413
|
}
|
|
3409
3414
|
function gt() {
|
|
3410
|
-
if (
|
|
3411
|
-
const
|
|
3412
|
-
m(
|
|
3415
|
+
if (fe.value && p.value && m(p.value, V(l.viewHours) ? l.viewHours : l.defaultViewHours, 0, "hour", l), re.value && c.value && m(c.value, V(l.minutes) ? l.minutes : l.defaultMinutes, 0, "minute", l), oe.value && d.value && m(d.value, V(l.seconds) ? l.seconds : l.defaultSeconds, 0, "second", l), k.value && s.value) {
|
|
3416
|
+
const M = (V(l.selected12Hours) ? l.selected12Hours : l.default12Hours) === "AM" ? 0 : 1;
|
|
3417
|
+
m(s.value, M, 0, "12-hour", l);
|
|
3413
3418
|
}
|
|
3414
3419
|
}
|
|
3415
3420
|
function we() {
|
|
3416
|
-
let
|
|
3417
|
-
k.value && (
|
|
3418
|
-
const
|
|
3419
|
-
if (o.value = be(
|
|
3420
|
-
index:
|
|
3421
|
-
disabled:
|
|
3421
|
+
let y = 24, M = 0;
|
|
3422
|
+
k.value && (y = 12, M = 1);
|
|
3423
|
+
const j = L();
|
|
3424
|
+
if (o.value = be(y, g.value, M).map((S) => ({
|
|
3425
|
+
index: S,
|
|
3426
|
+
disabled: j.length > 0 && j.indexOf(S) !== -1
|
|
3422
3427
|
})), k.value && o.value[o.value.length - 1].index === 12) {
|
|
3423
|
-
const
|
|
3424
|
-
|
|
3428
|
+
const S = [...o.value];
|
|
3429
|
+
S.unshift(S[S.length - 1]), S.splice(S.length - 1, 1), o.value = S;
|
|
3425
3430
|
}
|
|
3426
|
-
o.value = o.value.filter((
|
|
3431
|
+
o.value = o.value.filter((S) => !(v.value && S.disabled));
|
|
3427
3432
|
}
|
|
3428
3433
|
function pe() {
|
|
3429
|
-
a.value = be(60,
|
|
3430
|
-
index:
|
|
3431
|
-
disabled: !!t.disabledMinutes && t.disabledMinutes(
|
|
3432
|
-
})), a.value = a.value.filter((
|
|
3434
|
+
a.value = be(60, P.value).map((y) => ({
|
|
3435
|
+
index: y,
|
|
3436
|
+
disabled: !!t.disabledMinutes && t.disabledMinutes(l.hours).indexOf(y) !== -1
|
|
3437
|
+
})), a.value = a.value.filter((y) => !(v.value && y.disabled));
|
|
3433
3438
|
}
|
|
3434
|
-
function
|
|
3435
|
-
i.value = be(60,
|
|
3436
|
-
index:
|
|
3437
|
-
disabled: !!t.disabledSeconds && t.disabledSeconds(
|
|
3438
|
-
})), i.value = i.value.filter((
|
|
3439
|
+
function ae() {
|
|
3440
|
+
i.value = be(60, O.value).map((y) => ({
|
|
3441
|
+
index: y,
|
|
3442
|
+
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(y) !== -1
|
|
3443
|
+
})), i.value = i.value.filter((y) => !(v.value && y.disabled));
|
|
3439
3444
|
}
|
|
3440
3445
|
function Fe() {
|
|
3441
|
-
const
|
|
3442
|
-
|
|
3446
|
+
const y = b.value.includes("A");
|
|
3447
|
+
u.value = [{
|
|
3443
3448
|
index: 0,
|
|
3444
|
-
value:
|
|
3449
|
+
value: y ? "AM" : "am"
|
|
3445
3450
|
}, {
|
|
3446
3451
|
index: 1,
|
|
3447
|
-
value:
|
|
3448
|
-
}],
|
|
3452
|
+
value: y ? "PM" : "pm"
|
|
3453
|
+
}], u.value = u.value.filter(() => !v.value);
|
|
3449
3454
|
}
|
|
3450
|
-
function bt(
|
|
3451
|
-
if (
|
|
3452
|
-
if (m(
|
|
3455
|
+
function bt(y, M) {
|
|
3456
|
+
if (y.stopPropagation(), l.setHours(M.index, M.disabled), !M.disabled) {
|
|
3457
|
+
if (m(p.value, M.index, 120, "hour", l), t.disabledMinutes !== null) {
|
|
3453
3458
|
pe();
|
|
3454
|
-
const
|
|
3455
|
-
if (!
|
|
3459
|
+
const j = a.value.filter((S) => !S.disabled);
|
|
3460
|
+
if (!j.find((S) => S.index === l.minutes)) {
|
|
3456
3461
|
const {
|
|
3457
|
-
index:
|
|
3458
|
-
disabled:
|
|
3459
|
-
} =
|
|
3460
|
-
|
|
3462
|
+
index: S,
|
|
3463
|
+
disabled: se
|
|
3464
|
+
} = j[0];
|
|
3465
|
+
l.setMinutes(S, se);
|
|
3461
3466
|
}
|
|
3462
3467
|
}
|
|
3463
|
-
(t.disabledSeconds !== null || t.disabledMinutes !== null) &&
|
|
3468
|
+
(t.disabledSeconds !== null || t.disabledMinutes !== null) && ae();
|
|
3464
3469
|
}
|
|
3465
3470
|
}
|
|
3466
|
-
function wt(
|
|
3467
|
-
|
|
3471
|
+
function wt(y, M) {
|
|
3472
|
+
y.stopPropagation(), l.selected12Hours = M.value, we(), pe(), ae(), m(s.value, M.index, 120, "12-hour", l);
|
|
3468
3473
|
}
|
|
3469
|
-
function vt(
|
|
3470
|
-
if (
|
|
3471
|
-
|
|
3472
|
-
const
|
|
3473
|
-
if (!
|
|
3474
|
+
function vt(y, M) {
|
|
3475
|
+
if (y.stopPropagation(), l.setMinutes(M.index, M.disabled), !M.disabled && (m(c.value, M.index, 120, "minute", l), t.disabledSeconds !== null)) {
|
|
3476
|
+
ae();
|
|
3477
|
+
const j = i.value.filter((S) => !S.disabled);
|
|
3478
|
+
if (!j.find((S) => S.index === l.seconds)) {
|
|
3474
3479
|
const {
|
|
3475
|
-
index:
|
|
3476
|
-
disabled:
|
|
3477
|
-
} =
|
|
3478
|
-
|
|
3480
|
+
index: S,
|
|
3481
|
+
disabled: se
|
|
3482
|
+
} = j[0];
|
|
3483
|
+
l.setSeconds(S, se);
|
|
3479
3484
|
}
|
|
3480
3485
|
}
|
|
3481
3486
|
}
|
|
3482
|
-
function xt(
|
|
3483
|
-
|
|
3487
|
+
function xt(y, M) {
|
|
3488
|
+
y.stopPropagation(), l.setSeconds(M.index, M.disabled), !M.disabled && m(d.value, M.index, 120, "second", l);
|
|
3484
3489
|
}
|
|
3485
|
-
function
|
|
3486
|
-
we(), pe(),
|
|
3490
|
+
function Ve() {
|
|
3491
|
+
we(), pe(), ae(), Fe();
|
|
3487
3492
|
}
|
|
3488
|
-
|
|
3489
|
-
|
|
3493
|
+
ce(() => {
|
|
3494
|
+
b.value = t.format, k.value = t.use12Hours, F(t.modelValue), Ve(), setTimeout(() => {
|
|
3490
3495
|
gt();
|
|
3491
3496
|
}, 10);
|
|
3492
3497
|
});
|
|
3493
3498
|
function Mt() {
|
|
3494
|
-
return t.showHeader ?
|
|
3499
|
+
return t.showHeader ? w("div", {
|
|
3495
3500
|
class: e + "-combobox time-picker-panel-header",
|
|
3496
|
-
style:
|
|
3497
|
-
}, [
|
|
3501
|
+
style: de.value
|
|
3502
|
+
}, [fe.value && w("div", {
|
|
3498
3503
|
class: e + "-select",
|
|
3499
3504
|
style: "height: 32px"
|
|
3500
|
-
}, [
|
|
3501
|
-
class: "time-header" +
|
|
3502
|
-
}, [ve("时")])])]),
|
|
3505
|
+
}, [w("ul", null, [w("li", {
|
|
3506
|
+
class: "time-header" + re.value ? "time-header-split" : ""
|
|
3507
|
+
}, [ve("时")])])]), re.value && w("div", {
|
|
3503
3508
|
class: e + "-select",
|
|
3504
3509
|
style: "height: 32px"
|
|
3505
|
-
}, [
|
|
3506
|
-
class: "time-header" +
|
|
3507
|
-
}, [ve("分")])])]),
|
|
3510
|
+
}, [w("ul", null, [w("li", {
|
|
3511
|
+
class: "time-header" + oe.value ? "time-header-split" : ""
|
|
3512
|
+
}, [ve("分")])])]), oe.value && w("div", {
|
|
3508
3513
|
class: e + "-select",
|
|
3509
3514
|
style: "height: 32px"
|
|
3510
|
-
}, [
|
|
3515
|
+
}, [w("ul", null, [w("li", {
|
|
3511
3516
|
class: "time-header"
|
|
3512
|
-
}, [ve("秒")])])]), t.use12Hours &&
|
|
3517
|
+
}, [ve("秒")])])]), t.use12Hours && w("div", {
|
|
3513
3518
|
class: e + "-select",
|
|
3514
3519
|
style: "height: 32px"
|
|
3515
|
-
}, [
|
|
3520
|
+
}, [w("ul", null, [w("li", {
|
|
3516
3521
|
class: "time-header"
|
|
3517
3522
|
}, null)])])]) : null;
|
|
3518
3523
|
}
|
|
3519
|
-
return () =>
|
|
3520
|
-
class:
|
|
3521
|
-
}, [
|
|
3524
|
+
return () => w("div", {
|
|
3525
|
+
class: $.value
|
|
3526
|
+
}, [w("div", {
|
|
3522
3527
|
class: "farris-timer-picker"
|
|
3523
|
-
}, [
|
|
3528
|
+
}, [w("div", {
|
|
3524
3529
|
class: e + "-inner"
|
|
3525
|
-
}, [Mt(),
|
|
3530
|
+
}, [Mt(), w("div", {
|
|
3526
3531
|
class: e + "-combobox",
|
|
3527
|
-
style:
|
|
3528
|
-
}, [
|
|
3532
|
+
style: de.value
|
|
3533
|
+
}, [fe.value && w("div", {
|
|
3529
3534
|
class: e + "-select",
|
|
3530
|
-
ref:
|
|
3531
|
-
}, [
|
|
3532
|
-
class: y
|
|
3533
|
-
onClick: (
|
|
3534
|
-
}, [`${
|
|
3535
|
+
ref: p
|
|
3536
|
+
}, [w("ul", null, [o.value.map((y) => w("li", {
|
|
3537
|
+
class: h(y, "hour"),
|
|
3538
|
+
onClick: (M) => bt(M, y)
|
|
3539
|
+
}, [`${y.index}`]))])]), re.value && w("div", {
|
|
3535
3540
|
class: e + "-select",
|
|
3536
|
-
ref:
|
|
3537
|
-
}, [
|
|
3538
|
-
class: y
|
|
3539
|
-
onClick: (
|
|
3540
|
-
}, [`${
|
|
3541
|
+
ref: c
|
|
3542
|
+
}, [w("ul", null, [a.value.map((y) => w("li", {
|
|
3543
|
+
class: h(y, "minute"),
|
|
3544
|
+
onClick: (M) => vt(M, y)
|
|
3545
|
+
}, [`${y.index}`]))])]), oe.value && w("div", {
|
|
3541
3546
|
class: e + "-select",
|
|
3542
|
-
ref:
|
|
3543
|
-
}, [
|
|
3544
|
-
class: y
|
|
3545
|
-
onClick: (
|
|
3546
|
-
}, [`${
|
|
3547
|
+
ref: d
|
|
3548
|
+
}, [w("ul", null, [i.value.map((y) => w("li", {
|
|
3549
|
+
class: h(y, "second"),
|
|
3550
|
+
onClick: (M) => xt(M, y)
|
|
3551
|
+
}, [`${y.index}`]))])]), k.value && w("div", {
|
|
3547
3552
|
class: e + "-select",
|
|
3548
|
-
ref:
|
|
3549
|
-
}, [
|
|
3550
|
-
class: y
|
|
3551
|
-
onClick: (
|
|
3552
|
-
}, [`${
|
|
3553
|
+
ref: s
|
|
3554
|
+
}, [w("ul", null, [u.value.map((y) => w("li", {
|
|
3555
|
+
class: h(y, "12-hour"),
|
|
3556
|
+
onClick: (M) => wt(M, y)
|
|
3557
|
+
}, [`${y.value}`]))])])])])])]);
|
|
3553
3558
|
}
|
|
3554
|
-
}),
|
|
3559
|
+
}), K = /* @__PURE__ */ te({
|
|
3555
3560
|
name: "FTimePicker",
|
|
3556
|
-
props:
|
|
3561
|
+
props: Oe,
|
|
3557
3562
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3558
3563
|
setup(t, n) {
|
|
3559
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r =
|
|
3560
|
-
function
|
|
3564
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(null), a = x(), i = I(() => ft(t.format, t.use12Hours));
|
|
3565
|
+
function u() {
|
|
3561
3566
|
r.value = "", n.emit("clear");
|
|
3562
3567
|
}
|
|
3563
|
-
function
|
|
3568
|
+
function p() {
|
|
3564
3569
|
if (r.value) {
|
|
3565
|
-
const
|
|
3566
|
-
r.value = dt(
|
|
3570
|
+
const s = ct(r.value, i.value);
|
|
3571
|
+
r.value = dt(s, i.value);
|
|
3567
3572
|
}
|
|
3568
3573
|
}
|
|
3569
|
-
function
|
|
3570
|
-
|
|
3574
|
+
function c() {
|
|
3575
|
+
p();
|
|
3571
3576
|
}
|
|
3572
|
-
function
|
|
3573
|
-
r.value =
|
|
3577
|
+
function d(s) {
|
|
3578
|
+
r.value = s.text;
|
|
3574
3579
|
}
|
|
3575
|
-
return
|
|
3576
|
-
r.value =
|
|
3577
|
-
}),
|
|
3578
|
-
n.emit("valueChange",
|
|
3579
|
-
}), () =>
|
|
3580
|
+
return p(), G(() => t.modelValue, (s) => {
|
|
3581
|
+
r.value = s;
|
|
3582
|
+
}), G(r, (s) => {
|
|
3583
|
+
n.emit("valueChange", s), n.emit("update:modelValue", s);
|
|
3584
|
+
}), () => w(Ft, {
|
|
3580
3585
|
ref: o,
|
|
3581
3586
|
modelValue: r.value,
|
|
3582
|
-
"onUpdate:modelValue": (
|
|
3587
|
+
"onUpdate:modelValue": (s) => r.value = s,
|
|
3583
3588
|
disable: t.disabled,
|
|
3584
3589
|
readonly: t.readonly,
|
|
3585
3590
|
editable: t.editable,
|
|
3586
3591
|
buttonContent: e,
|
|
3587
3592
|
placeholder: t.placeholder,
|
|
3588
3593
|
enableClear: !0,
|
|
3589
|
-
onClear:
|
|
3590
|
-
onBlur:
|
|
3594
|
+
onClear: u,
|
|
3595
|
+
onBlur: c
|
|
3591
3596
|
}, {
|
|
3592
|
-
default: () => [
|
|
3597
|
+
default: () => [w(Ce, Te({
|
|
3593
3598
|
ref: a
|
|
3594
3599
|
}, t, {
|
|
3595
|
-
onValueChange:
|
|
3600
|
+
onValueChange: d
|
|
3596
3601
|
}), null)]
|
|
3597
3602
|
});
|
|
3598
3603
|
}
|
|
3599
|
-
}),
|
|
3600
|
-
["appearance",
|
|
3604
|
+
}), io = /* @__PURE__ */ new Map([
|
|
3605
|
+
["appearance", Vt]
|
|
3601
3606
|
]);
|
|
3602
|
-
function
|
|
3607
|
+
function uo(t, n, e) {
|
|
3603
3608
|
return n;
|
|
3604
3609
|
}
|
|
3605
|
-
const
|
|
3610
|
+
const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-design.gitee.io/button-edit.schema.json", fo = "button-edit", po = "A Farris Input Component", mo = "object", ho = {
|
|
3606
3611
|
id: {
|
|
3607
3612
|
description: "The unique identifier for a Input Group",
|
|
3608
3613
|
type: "string"
|
|
@@ -3786,18 +3791,18 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3786
3791
|
type: "string",
|
|
3787
3792
|
default: ""
|
|
3788
3793
|
}
|
|
3789
|
-
},
|
|
3794
|
+
}, yo = [
|
|
3790
3795
|
"id",
|
|
3791
3796
|
"type"
|
|
3792
|
-
],
|
|
3793
|
-
$schema:
|
|
3794
|
-
$id:
|
|
3795
|
-
title:
|
|
3796
|
-
description:
|
|
3797
|
-
type:
|
|
3798
|
-
properties:
|
|
3799
|
-
required:
|
|
3800
|
-
},
|
|
3797
|
+
], go = {
|
|
3798
|
+
$schema: lo,
|
|
3799
|
+
$id: co,
|
|
3800
|
+
title: fo,
|
|
3801
|
+
description: po,
|
|
3802
|
+
type: mo,
|
|
3803
|
+
properties: ho,
|
|
3804
|
+
required: yo
|
|
3805
|
+
}, bo = "buttonEdit", wo = "A Farris Component", vo = "object", xo = {
|
|
3801
3806
|
basic: {
|
|
3802
3807
|
description: "Basic Infomation",
|
|
3803
3808
|
title: "基本信息",
|
|
@@ -3868,7 +3873,7 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3868
3873
|
},
|
|
3869
3874
|
{
|
|
3870
3875
|
value: "center",
|
|
3871
|
-
name: "
|
|
3876
|
+
name: "居中"
|
|
3872
3877
|
},
|
|
3873
3878
|
{
|
|
3874
3879
|
value: "right",
|
|
@@ -3879,12 +3884,12 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3879
3884
|
}
|
|
3880
3885
|
}
|
|
3881
3886
|
}
|
|
3882
|
-
},
|
|
3883
|
-
title:
|
|
3884
|
-
description:
|
|
3885
|
-
type:
|
|
3886
|
-
categories:
|
|
3887
|
-
},
|
|
3887
|
+
}, Mo = {
|
|
3888
|
+
title: bo,
|
|
3889
|
+
description: wo,
|
|
3890
|
+
type: vo,
|
|
3891
|
+
categories: xo
|
|
3892
|
+
}, Be = {
|
|
3888
3893
|
/**
|
|
3889
3894
|
* 组件标识
|
|
3890
3895
|
*/
|
|
@@ -3992,65 +3997,65 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3992
3997
|
beforeOpen: { type: Function, default: null },
|
|
3993
3998
|
/** 更新方式 blur | change */
|
|
3994
3999
|
updateOn: { type: String, default: "change" }
|
|
3995
|
-
}, pt = Ue(
|
|
4000
|
+
}, pt = Ue(Be, go, io, uo, Mo), ko = {
|
|
3996
4001
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
3997
4002
|
host: { type: Object },
|
|
3998
4003
|
backgroundColor: { type: String, default: "" }
|
|
3999
|
-
},
|
|
4004
|
+
}, Co = /* @__PURE__ */ te({
|
|
4000
4005
|
name: "FOverlay",
|
|
4001
4006
|
props: ko,
|
|
4002
4007
|
emits: ["click"],
|
|
4003
4008
|
setup(t, n) {
|
|
4004
|
-
const e =
|
|
4009
|
+
const e = x(t.popupContentPosition), r = x(t.host), o = I(() => ({
|
|
4005
4010
|
backgroundColor: t.backgroundColor || "",
|
|
4006
4011
|
pointerEvents: "auto"
|
|
4007
4012
|
}));
|
|
4008
|
-
function a(
|
|
4009
|
-
n.emit("click"),
|
|
4013
|
+
function a(u) {
|
|
4014
|
+
n.emit("click"), u.preventDefault(), u.stopPropagation();
|
|
4010
4015
|
}
|
|
4011
|
-
|
|
4012
|
-
const
|
|
4013
|
-
if (
|
|
4014
|
-
const
|
|
4015
|
-
left:
|
|
4016
|
-
top:
|
|
4017
|
-
height:
|
|
4018
|
-
} =
|
|
4016
|
+
I(() => {
|
|
4017
|
+
const u = r.value;
|
|
4018
|
+
if (u) {
|
|
4019
|
+
const p = u.getBoundingClientRect(), {
|
|
4020
|
+
left: c,
|
|
4021
|
+
top: d,
|
|
4022
|
+
height: s
|
|
4023
|
+
} = p;
|
|
4019
4024
|
return {
|
|
4020
|
-
left:
|
|
4021
|
-
top:
|
|
4025
|
+
left: c,
|
|
4026
|
+
top: d + s
|
|
4022
4027
|
};
|
|
4023
4028
|
}
|
|
4024
4029
|
return e.value;
|
|
4025
4030
|
});
|
|
4026
|
-
const i =
|
|
4031
|
+
const i = I(() => ({
|
|
4027
4032
|
// position: 'relative',
|
|
4028
4033
|
// left: `${position.value.left}px`,
|
|
4029
4034
|
// top: `${position.value.top}px`
|
|
4030
4035
|
}));
|
|
4031
|
-
return () =>
|
|
4036
|
+
return () => w(Tt, {
|
|
4032
4037
|
to: "body"
|
|
4033
4038
|
}, {
|
|
4034
4039
|
default: () => {
|
|
4035
|
-
var
|
|
4036
|
-
return [
|
|
4040
|
+
var u, p;
|
|
4041
|
+
return [w("div", {
|
|
4037
4042
|
class: "overlay-container",
|
|
4038
|
-
onClick: (
|
|
4043
|
+
onClick: (c) => a(c),
|
|
4039
4044
|
style: o.value
|
|
4040
|
-
}, [
|
|
4045
|
+
}, [w("div", {
|
|
4041
4046
|
style: i.value
|
|
4042
|
-
}, [(
|
|
4047
|
+
}, [(p = (u = n.slots).default) == null ? void 0 : p.call(u)])])];
|
|
4043
4048
|
}
|
|
4044
4049
|
});
|
|
4045
4050
|
}
|
|
4046
4051
|
});
|
|
4047
|
-
function
|
|
4052
|
+
function To(t) {
|
|
4048
4053
|
if (t.content && t.content.render)
|
|
4049
4054
|
return t.content.render;
|
|
4050
4055
|
if (t.render && typeof t.render == "function")
|
|
4051
4056
|
return t.render;
|
|
4052
4057
|
}
|
|
4053
|
-
function
|
|
4058
|
+
function Po(t) {
|
|
4054
4059
|
const n = document.createElement("div");
|
|
4055
4060
|
n.style.display = "contents";
|
|
4056
4061
|
let e;
|
|
@@ -4063,8 +4068,8 @@ function Oo(t) {
|
|
|
4063
4068
|
Ot(() => {
|
|
4064
4069
|
document.body.removeChild(n);
|
|
4065
4070
|
});
|
|
4066
|
-
const a =
|
|
4067
|
-
return () =>
|
|
4071
|
+
const a = To(t);
|
|
4072
|
+
return () => w(Co, {
|
|
4068
4073
|
"popup-content-position": t.popupPosition,
|
|
4069
4074
|
host: t.host,
|
|
4070
4075
|
onClick: o,
|
|
@@ -4075,12 +4080,12 @@ function Oo(t) {
|
|
|
4075
4080
|
}
|
|
4076
4081
|
}), document.body.appendChild(n), e.mount(n), e;
|
|
4077
4082
|
}
|
|
4078
|
-
class
|
|
4083
|
+
class Oo {
|
|
4079
4084
|
static show(n) {
|
|
4080
|
-
return
|
|
4085
|
+
return Po(n);
|
|
4081
4086
|
}
|
|
4082
4087
|
}
|
|
4083
|
-
const
|
|
4088
|
+
const Do = Symbol("FModalService");
|
|
4084
4089
|
function mt(t, n) {
|
|
4085
4090
|
function e() {
|
|
4086
4091
|
const r = t.beforeOpen || t.beforeClickButton || null;
|
|
@@ -4096,190 +4101,190 @@ function mt(t, n) {
|
|
|
4096
4101
|
return { judgeCanOpen: e };
|
|
4097
4102
|
}
|
|
4098
4103
|
function ht(t, n, e, r, o) {
|
|
4099
|
-
const a =
|
|
4104
|
+
const a = x(t.buttonBehavior), i = x(t.popupOnInput), u = I(() => ({
|
|
4100
4105
|
"input-group-append": !0,
|
|
4101
4106
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4102
|
-
})), { judgeCanOpen:
|
|
4103
|
-
async function
|
|
4104
|
-
if (await
|
|
4105
|
-
const
|
|
4107
|
+
})), { judgeCanOpen: p } = mt(t, o), c = I(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = me(Do, null), s = x();
|
|
4108
|
+
async function l(g) {
|
|
4109
|
+
if (await p() && c.value) {
|
|
4110
|
+
const P = !!n.slots.default;
|
|
4106
4111
|
if (a.value === "Modal") {
|
|
4107
|
-
const
|
|
4108
|
-
...
|
|
4112
|
+
const O = t.modalOptions, D = d == null ? void 0 : d.open({
|
|
4113
|
+
...O,
|
|
4109
4114
|
render: () => n.slots.default && n.slots.default()
|
|
4110
4115
|
});
|
|
4111
|
-
|
|
4116
|
+
s.value = D == null ? void 0 : D.modalRef;
|
|
4112
4117
|
}
|
|
4113
|
-
a.value === "Overlay" &&
|
|
4118
|
+
a.value === "Overlay" && Oo.show({
|
|
4114
4119
|
// host: buttonEditRef.value,
|
|
4115
4120
|
host: document.body,
|
|
4116
4121
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
4117
4122
|
render: () => n.slots.default && n.slots.default()
|
|
4118
|
-
}),
|
|
4123
|
+
}), P && a.value === "Popup" && r.togglePopup(!0), P && i.value && r.hidePopup(), n.emit("clickButton", { origin: g, value: t.modelValue });
|
|
4119
4124
|
}
|
|
4120
4125
|
}
|
|
4121
|
-
function m(
|
|
4122
|
-
n.emit("mouseEnterIcon",
|
|
4126
|
+
function m(g) {
|
|
4127
|
+
n.emit("mouseEnterIcon", g);
|
|
4123
4128
|
}
|
|
4124
|
-
function
|
|
4125
|
-
n.emit("mouseLeaveIcon",
|
|
4129
|
+
function h(g) {
|
|
4130
|
+
n.emit("mouseLeaveIcon", g);
|
|
4126
4131
|
}
|
|
4127
4132
|
return {
|
|
4128
|
-
buttonGroupClass:
|
|
4129
|
-
onClickButton:
|
|
4133
|
+
buttonGroupClass: u,
|
|
4134
|
+
onClickButton: l,
|
|
4130
4135
|
onMouseEnterButton: m,
|
|
4131
|
-
onMouseLeaveButton:
|
|
4132
|
-
modalRef:
|
|
4136
|
+
onMouseLeaveButton: h,
|
|
4137
|
+
modalRef: s
|
|
4133
4138
|
};
|
|
4134
4139
|
}
|
|
4135
|
-
function
|
|
4136
|
-
const i =
|
|
4137
|
-
function
|
|
4140
|
+
function Ho(t, n, e, r, o, a) {
|
|
4141
|
+
const i = x(!1), u = I(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: p } = a;
|
|
4142
|
+
function c(m) {
|
|
4138
4143
|
i.value = m;
|
|
4139
4144
|
}
|
|
4140
|
-
|
|
4141
|
-
|
|
4145
|
+
G(o, () => {
|
|
4146
|
+
c(!!o.value);
|
|
4142
4147
|
});
|
|
4143
|
-
function
|
|
4144
|
-
const
|
|
4145
|
-
m.stopPropagation(), (
|
|
4148
|
+
function d(m) {
|
|
4149
|
+
const h = !t.readonly && !t.disable && t.editable, g = !t.editable;
|
|
4150
|
+
m.stopPropagation(), (h || g) && (p("", !1), c(!i.value), n.emit("clear"));
|
|
4146
4151
|
}
|
|
4147
|
-
function
|
|
4148
|
-
if (
|
|
4152
|
+
function s(m) {
|
|
4153
|
+
if (u.value) {
|
|
4149
4154
|
if (!e.value) {
|
|
4150
|
-
|
|
4155
|
+
c(!1);
|
|
4151
4156
|
return;
|
|
4152
4157
|
}
|
|
4153
|
-
!t.disable && !t.readonly &&
|
|
4158
|
+
!t.disable && !t.readonly && c(!0);
|
|
4154
4159
|
}
|
|
4155
4160
|
}
|
|
4156
|
-
function
|
|
4157
|
-
|
|
4161
|
+
function l(m) {
|
|
4162
|
+
u.value && c(!1);
|
|
4158
4163
|
}
|
|
4159
4164
|
return {
|
|
4160
|
-
enableClearButton:
|
|
4165
|
+
enableClearButton: u,
|
|
4161
4166
|
showClearButton: i,
|
|
4162
|
-
onClearValue:
|
|
4163
|
-
onMouseEnterTextBox:
|
|
4164
|
-
onMouseLeaveTextBox:
|
|
4167
|
+
onClearValue: d,
|
|
4168
|
+
onMouseEnterTextBox: s,
|
|
4169
|
+
onMouseLeaveTextBox: l
|
|
4165
4170
|
};
|
|
4166
4171
|
}
|
|
4167
4172
|
function Eo(t, n, e, r, o) {
|
|
4168
|
-
const a =
|
|
4173
|
+
const a = I(() => t.popupOnInput), i = I(() => t.popupOnFocus), { shouldPopupContent: u } = o, p = I(() => t.enableTitle ? e.value : ""), c = I(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = I(() => t.readonly || !t.editable), s = x(!1), l = I(() => !t.disable && s.value), m = I(() => ({
|
|
4169
4174
|
"text-left": t.textAlign === "left",
|
|
4170
4175
|
"text-center": t.textAlign === "center",
|
|
4171
4176
|
"text-right": t.textAlign === "right",
|
|
4172
4177
|
"form-control": !0,
|
|
4173
4178
|
"f-utils-fill": !0
|
|
4174
|
-
})),
|
|
4179
|
+
})), h = I(() => ({
|
|
4175
4180
|
"input-group": !0,
|
|
4176
4181
|
"f-state-disable": t.disable,
|
|
4177
4182
|
"f-state-editable": t.editable && !t.disable && !t.readonly,
|
|
4178
4183
|
"f-state-readonly": t.readonly && !t.disable,
|
|
4179
|
-
"f-state-focus":
|
|
4184
|
+
"f-state-focus": l.value
|
|
4180
4185
|
}));
|
|
4181
|
-
function
|
|
4182
|
-
e.value !==
|
|
4186
|
+
function g(C, $ = !0) {
|
|
4187
|
+
e.value !== C && (e.value = C, $ && (n.emit("change", C), n.emit("update:modelValue", C)));
|
|
4183
4188
|
}
|
|
4184
|
-
function
|
|
4185
|
-
|
|
4189
|
+
function P(C) {
|
|
4190
|
+
u.value = !1, g(C, !0);
|
|
4186
4191
|
}
|
|
4187
|
-
|
|
4192
|
+
G(
|
|
4188
4193
|
() => t.modelValue,
|
|
4189
|
-
(
|
|
4190
|
-
e.value =
|
|
4194
|
+
(C) => {
|
|
4195
|
+
e.value = C;
|
|
4191
4196
|
}
|
|
4192
4197
|
);
|
|
4193
|
-
function
|
|
4194
|
-
|
|
4198
|
+
function O(C) {
|
|
4199
|
+
s.value = !1, n.emit("blur", C), C.stopPropagation();
|
|
4195
4200
|
}
|
|
4196
|
-
function
|
|
4197
|
-
n.emit("click",
|
|
4201
|
+
function D(C) {
|
|
4202
|
+
n.emit("click", C);
|
|
4198
4203
|
}
|
|
4199
|
-
function
|
|
4200
|
-
t.disable || (
|
|
4204
|
+
function b(C) {
|
|
4205
|
+
t.disable || (s.value = !0, d.value || (n.emit("focus", C), i.value && !u.value && o.popup()));
|
|
4201
4206
|
}
|
|
4202
|
-
function k(
|
|
4203
|
-
n.emit("input",
|
|
4204
|
-
const
|
|
4205
|
-
r.value =
|
|
4207
|
+
function k(C) {
|
|
4208
|
+
n.emit("input", C.target.value);
|
|
4209
|
+
const $ = C.target.value;
|
|
4210
|
+
r.value = $, e.value !== $ && g($, t.updateOn === "change"), a.value && !u.value && o.popup();
|
|
4206
4211
|
}
|
|
4207
|
-
function
|
|
4208
|
-
|
|
4212
|
+
function v(C) {
|
|
4213
|
+
C.target.tagName !== "INPUT" && C.preventDefault(), C.stopPropagation();
|
|
4209
4214
|
}
|
|
4210
|
-
function
|
|
4211
|
-
n.emit("keydown",
|
|
4215
|
+
function E(C) {
|
|
4216
|
+
n.emit("keydown", C);
|
|
4212
4217
|
}
|
|
4213
|
-
function
|
|
4214
|
-
|
|
4218
|
+
function F(C) {
|
|
4219
|
+
C.key === "Enter" && (a.value || i.value) && o.hidePopup(), n.emit("keyup", C);
|
|
4215
4220
|
}
|
|
4216
|
-
function
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4221
|
+
function L(C) {
|
|
4222
|
+
const $ = C.target.value;
|
|
4223
|
+
C.stopPropagation(), g($);
|
|
4219
4224
|
}
|
|
4220
4225
|
return {
|
|
4221
|
-
hasFocusedTextBox:
|
|
4222
|
-
isTextBoxReadonly:
|
|
4226
|
+
hasFocusedTextBox: l,
|
|
4227
|
+
isTextBoxReadonly: d,
|
|
4223
4228
|
textBoxClass: m,
|
|
4224
|
-
textBoxPlaceholder:
|
|
4225
|
-
textBoxTitle:
|
|
4226
|
-
inputGroupClass:
|
|
4227
|
-
changeTextBoxValue:
|
|
4228
|
-
commitValue:
|
|
4229
|
-
onBlurTextBox:
|
|
4230
|
-
onClickTextBox:
|
|
4231
|
-
onFocusTextBox:
|
|
4229
|
+
textBoxPlaceholder: c,
|
|
4230
|
+
textBoxTitle: p,
|
|
4231
|
+
inputGroupClass: h,
|
|
4232
|
+
changeTextBoxValue: g,
|
|
4233
|
+
commitValue: P,
|
|
4234
|
+
onBlurTextBox: O,
|
|
4235
|
+
onClickTextBox: D,
|
|
4236
|
+
onFocusTextBox: b,
|
|
4232
4237
|
onInput: k,
|
|
4233
|
-
onKeyDownTextBox:
|
|
4234
|
-
onKeyUpTextBox:
|
|
4235
|
-
onMouseDownTextBox:
|
|
4236
|
-
onTextBoxValueChange:
|
|
4238
|
+
onKeyDownTextBox: E,
|
|
4239
|
+
onKeyUpTextBox: F,
|
|
4240
|
+
onMouseDownTextBox: v,
|
|
4241
|
+
onTextBoxValueChange: L
|
|
4237
4242
|
};
|
|
4238
4243
|
}
|
|
4239
4244
|
function yt(t, n, e, r) {
|
|
4240
|
-
const o =
|
|
4241
|
-
function
|
|
4242
|
-
const
|
|
4243
|
-
|
|
4245
|
+
const o = x(), a = x(!1), { judgeCanOpen: i } = mt(t, r);
|
|
4246
|
+
function u() {
|
|
4247
|
+
const s = o.value;
|
|
4248
|
+
s && s.show(e.value);
|
|
4244
4249
|
}
|
|
4245
|
-
async function
|
|
4250
|
+
async function p(s = !1) {
|
|
4246
4251
|
if (!!n.slots.default) {
|
|
4247
|
-
if (!
|
|
4252
|
+
if (!s && !a.value && !await i())
|
|
4248
4253
|
return;
|
|
4249
|
-
a.value = !a.value, await Se(),
|
|
4254
|
+
a.value = !a.value, await Se(), u();
|
|
4250
4255
|
}
|
|
4251
4256
|
}
|
|
4252
|
-
async function
|
|
4257
|
+
async function c(s = !1) {
|
|
4253
4258
|
if (!!n.slots.default) {
|
|
4254
|
-
if (!
|
|
4259
|
+
if (!s && !await i())
|
|
4255
4260
|
return;
|
|
4256
|
-
a.value = !0, await Se(),
|
|
4261
|
+
a.value = !0, await Se(), u();
|
|
4257
4262
|
}
|
|
4258
4263
|
}
|
|
4259
|
-
function
|
|
4264
|
+
function d() {
|
|
4260
4265
|
a.value = !1;
|
|
4261
4266
|
}
|
|
4262
|
-
return { hidePopup:
|
|
4267
|
+
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup: p, popoverRef: o };
|
|
4263
4268
|
}
|
|
4264
|
-
function
|
|
4265
|
-
const r =
|
|
4269
|
+
function Bo(t, n, e) {
|
|
4270
|
+
const r = x(), {
|
|
4266
4271
|
isTextBoxReadonly: o,
|
|
4267
4272
|
textBoxClass: a,
|
|
4268
4273
|
textBoxPlaceholder: i,
|
|
4269
|
-
textBoxTitle:
|
|
4270
|
-
onBlurTextBox:
|
|
4271
|
-
onClickTextBox:
|
|
4272
|
-
onFocusTextBox:
|
|
4273
|
-
onInput:
|
|
4274
|
-
onKeyDownTextBox:
|
|
4274
|
+
textBoxTitle: u,
|
|
4275
|
+
onBlurTextBox: p,
|
|
4276
|
+
onClickTextBox: c,
|
|
4277
|
+
onFocusTextBox: d,
|
|
4278
|
+
onInput: s,
|
|
4279
|
+
onKeyDownTextBox: l,
|
|
4275
4280
|
onKeyUpTextBox: m,
|
|
4276
|
-
onMouseDownTextBox:
|
|
4277
|
-
onTextBoxValueChange:
|
|
4281
|
+
onMouseDownTextBox: h,
|
|
4282
|
+
onTextBoxValueChange: g
|
|
4278
4283
|
} = e;
|
|
4279
|
-
return
|
|
4280
|
-
var
|
|
4281
|
-
t.selectOnCreated && ((
|
|
4282
|
-
}), () =>
|
|
4284
|
+
return ce(() => {
|
|
4285
|
+
var P, O;
|
|
4286
|
+
t.selectOnCreated && ((P = r.value) == null || P.select()), t.focusOnCreated && ((O = r.value) == null || O.focus());
|
|
4287
|
+
}), () => w("input", {
|
|
4283
4288
|
ref: r,
|
|
4284
4289
|
name: "input-group-value",
|
|
4285
4290
|
autocomplete: t.autoComplete ? "on" : "off",
|
|
@@ -4290,30 +4295,30 @@ function Vo(t, n, e) {
|
|
|
4290
4295
|
placeholder: i.value,
|
|
4291
4296
|
readonly: o.value,
|
|
4292
4297
|
tabindex: t.tabIndex,
|
|
4293
|
-
title:
|
|
4298
|
+
title: u.value,
|
|
4294
4299
|
type: t.inputType,
|
|
4295
4300
|
value: n.value,
|
|
4296
|
-
onBlur:
|
|
4297
|
-
onChange:
|
|
4298
|
-
onClick:
|
|
4299
|
-
onFocus:
|
|
4300
|
-
onInput:
|
|
4301
|
-
onKeydown:
|
|
4301
|
+
onBlur: p,
|
|
4302
|
+
onChange: g,
|
|
4303
|
+
onClick: c,
|
|
4304
|
+
onFocus: d,
|
|
4305
|
+
onInput: s,
|
|
4306
|
+
onKeydown: l,
|
|
4302
4307
|
onKeyup: m,
|
|
4303
|
-
onMousedown:
|
|
4308
|
+
onMousedown: h
|
|
4304
4309
|
}, null);
|
|
4305
4310
|
}
|
|
4306
4311
|
function Fo(t, n, e) {
|
|
4307
|
-
const r =
|
|
4312
|
+
const r = x(t.separator), {
|
|
4308
4313
|
changeTextBoxValue: o
|
|
4309
|
-
} = e, a =
|
|
4310
|
-
name:
|
|
4314
|
+
} = e, a = I(() => n.value ? n.value.split(r.value).map((u) => ({
|
|
4315
|
+
name: u,
|
|
4311
4316
|
selectable: !0
|
|
4312
4317
|
})) : []);
|
|
4313
|
-
function i(
|
|
4314
|
-
o(
|
|
4318
|
+
function i(u) {
|
|
4319
|
+
o(u.map((p) => p.name).join(r.value), !0);
|
|
4315
4320
|
}
|
|
4316
|
-
return () =>
|
|
4321
|
+
return () => w(St, {
|
|
4317
4322
|
id: `${t.id}-tag-editor`,
|
|
4318
4323
|
class: "form-control",
|
|
4319
4324
|
data: a.value,
|
|
@@ -4322,48 +4327,48 @@ function Fo(t, n, e) {
|
|
|
4322
4327
|
onChange: i
|
|
4323
4328
|
}, null);
|
|
4324
4329
|
}
|
|
4325
|
-
function
|
|
4330
|
+
function Vo(t, n, e, r) {
|
|
4326
4331
|
const {
|
|
4327
4332
|
buttonGroupClass: o,
|
|
4328
4333
|
onClickButton: a,
|
|
4329
4334
|
onMouseEnterButton: i,
|
|
4330
|
-
onMouseLeaveButton:
|
|
4335
|
+
onMouseLeaveButton: u
|
|
4331
4336
|
} = e, {
|
|
4332
|
-
enableClearButton:
|
|
4333
|
-
showClearButton:
|
|
4334
|
-
onClearValue:
|
|
4335
|
-
} = r,
|
|
4337
|
+
enableClearButton: p,
|
|
4338
|
+
showClearButton: c,
|
|
4339
|
+
onClearValue: d
|
|
4340
|
+
} = r, s = x();
|
|
4336
4341
|
return {
|
|
4337
|
-
renderButtonGroup: () =>
|
|
4342
|
+
renderButtonGroup: () => w("div", {
|
|
4338
4343
|
id: `${t.id}-button-group`,
|
|
4339
4344
|
class: o.value
|
|
4340
|
-
}, [
|
|
4345
|
+
}, [p.value && Dt(w("span", {
|
|
4341
4346
|
class: "input-group-text input-group-clear",
|
|
4342
|
-
onClick:
|
|
4343
|
-
}, [
|
|
4347
|
+
onClick: d
|
|
4348
|
+
}, [w("i", {
|
|
4344
4349
|
class: "f-icon modal_close"
|
|
4345
|
-
}, null)]), [[Ht,
|
|
4350
|
+
}, null)]), [[Ht, c.value]]), n.slots.buttonContent ? w("span", {
|
|
4346
4351
|
class: "input-group-text input-group-append-button",
|
|
4347
4352
|
onClick: a,
|
|
4348
4353
|
onMouseenter: i,
|
|
4349
|
-
onMouseleave:
|
|
4350
|
-
}, [n.slots.buttonContent()]) : t.buttonContent ?
|
|
4354
|
+
onMouseleave: u
|
|
4355
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? w("span", {
|
|
4351
4356
|
class: "input-group-text input-group-append-button",
|
|
4352
4357
|
innerHTML: t.buttonContent,
|
|
4353
|
-
ref:
|
|
4358
|
+
ref: s,
|
|
4354
4359
|
onClick: a,
|
|
4355
4360
|
onMouseenter: i,
|
|
4356
|
-
onMouseleave:
|
|
4361
|
+
onMouseleave: u
|
|
4357
4362
|
}, null) : null]),
|
|
4358
|
-
buttonHandleElement:
|
|
4363
|
+
buttonHandleElement: s
|
|
4359
4364
|
};
|
|
4360
4365
|
}
|
|
4361
4366
|
function So(t, n, e) {
|
|
4362
|
-
const r =
|
|
4367
|
+
const r = x(t.popupMinWidth), {
|
|
4363
4368
|
hidePopup: o,
|
|
4364
4369
|
popoverRef: a
|
|
4365
4370
|
} = e;
|
|
4366
|
-
return () =>
|
|
4371
|
+
return () => w(It, {
|
|
4367
4372
|
id: `${t.id}-popover`,
|
|
4368
4373
|
ref: a,
|
|
4369
4374
|
visible: !0,
|
|
@@ -4377,86 +4382,86 @@ function So(t, n, e) {
|
|
|
4377
4382
|
onHidden: o
|
|
4378
4383
|
}, {
|
|
4379
4384
|
default: () => {
|
|
4380
|
-
var i,
|
|
4381
|
-
return [(
|
|
4385
|
+
var i, u;
|
|
4386
|
+
return [(u = (i = n.slots).default) == null ? void 0 : u.call(i)];
|
|
4382
4387
|
}
|
|
4383
4388
|
});
|
|
4384
4389
|
}
|
|
4385
|
-
const
|
|
4390
|
+
const le = /* @__PURE__ */ te({
|
|
4386
4391
|
name: "FButtonEdit",
|
|
4387
|
-
props:
|
|
4392
|
+
props: Be,
|
|
4388
4393
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4389
4394
|
setup(t, n) {
|
|
4390
|
-
const e =
|
|
4395
|
+
const e = x(), r = x(t.customClass), o = x(t.modelValue), a = yt(t, n, e, o), {
|
|
4391
4396
|
shouldPopupContent: i,
|
|
4392
|
-
hidePopup:
|
|
4393
|
-
togglePopup:
|
|
4394
|
-
} = a,
|
|
4395
|
-
hasFocusedTextBox:
|
|
4397
|
+
hidePopup: u,
|
|
4398
|
+
togglePopup: p
|
|
4399
|
+
} = a, c = ht(t, n, e, a, o), d = x(""), s = Eo(t, n, o, d, a), {
|
|
4400
|
+
hasFocusedTextBox: l,
|
|
4396
4401
|
commitValue: m,
|
|
4397
|
-
inputGroupClass:
|
|
4398
|
-
} =
|
|
4399
|
-
onMouseEnterTextBox:
|
|
4400
|
-
onMouseLeaveTextBox:
|
|
4401
|
-
} =
|
|
4402
|
-
const
|
|
4402
|
+
inputGroupClass: h
|
|
4403
|
+
} = s, g = Ho(t, n, o, l, d, s), {
|
|
4404
|
+
onMouseEnterTextBox: P,
|
|
4405
|
+
onMouseLeaveTextBox: O
|
|
4406
|
+
} = g, D = I(() => {
|
|
4407
|
+
const C = {
|
|
4403
4408
|
"f-button-edit": !0,
|
|
4404
4409
|
"f-cmp-inputgroup": !0,
|
|
4405
4410
|
"f-button-edit-nowrap": !t.wrapText
|
|
4406
4411
|
};
|
|
4407
|
-
return r.value && r.value.split(" ").reduce((
|
|
4412
|
+
return r.value && r.value.split(" ").reduce(($, de) => ($[de] = !0, $), C), C;
|
|
4408
4413
|
});
|
|
4409
|
-
function
|
|
4410
|
-
return t.multiSelect && t.inputType === "tag" ? Fo(t, o,
|
|
4414
|
+
function b() {
|
|
4415
|
+
return t.multiSelect && t.inputType === "tag" ? Fo(t, o, s) : Bo(t, o, s);
|
|
4411
4416
|
}
|
|
4412
|
-
let k =
|
|
4413
|
-
|
|
4414
|
-
k =
|
|
4417
|
+
let k = b();
|
|
4418
|
+
G([() => t.multiSelect, () => t.inputType], () => {
|
|
4419
|
+
k = b();
|
|
4415
4420
|
});
|
|
4416
4421
|
const {
|
|
4417
|
-
renderButtonGroup:
|
|
4418
|
-
buttonHandleElement:
|
|
4419
|
-
} =
|
|
4422
|
+
renderButtonGroup: v,
|
|
4423
|
+
buttonHandleElement: E
|
|
4424
|
+
} = Vo(t, n, c, g), F = So(t, n, a), L = {
|
|
4420
4425
|
commitValue: m,
|
|
4421
4426
|
elementRef: e,
|
|
4422
|
-
hidePopup:
|
|
4427
|
+
hidePopup: u,
|
|
4423
4428
|
shouldPopupContent: i,
|
|
4424
|
-
togglePopup:
|
|
4429
|
+
togglePopup: p,
|
|
4425
4430
|
openDialog: () => {
|
|
4426
|
-
|
|
4431
|
+
E.value && t.buttonBehavior === "Modal" && E.value.click();
|
|
4427
4432
|
},
|
|
4428
4433
|
getModal: () => {
|
|
4429
|
-
var
|
|
4430
|
-
return t.buttonBehavior === "Modal" ? (
|
|
4434
|
+
var C;
|
|
4435
|
+
return t.buttonBehavior === "Modal" ? (C = c.modalRef.value) == null ? void 0 : C.value : null;
|
|
4431
4436
|
}
|
|
4432
4437
|
};
|
|
4433
|
-
return
|
|
4434
|
-
e.value.componentInstance =
|
|
4438
|
+
return ce(() => {
|
|
4439
|
+
e.value.componentInstance = L, window.onresize = () => {
|
|
4435
4440
|
document.body.click();
|
|
4436
4441
|
};
|
|
4437
|
-
}), n.expose(
|
|
4442
|
+
}), n.expose(L), () => w(Et, null, [w("div", Te(n.attrs, {
|
|
4438
4443
|
ref: e,
|
|
4439
|
-
class:
|
|
4444
|
+
class: D.value,
|
|
4440
4445
|
id: t.id
|
|
4441
|
-
}), [
|
|
4446
|
+
}), [w("div", {
|
|
4442
4447
|
id: `${t.id}-input-group`,
|
|
4443
|
-
class:
|
|
4444
|
-
onMouseenter:
|
|
4445
|
-
onMouseleave:
|
|
4446
|
-
}, [k(),
|
|
4448
|
+
class: h.value,
|
|
4449
|
+
onMouseenter: P,
|
|
4450
|
+
onMouseleave: O
|
|
4451
|
+
}, [k(), v()])]), i.value && F()]);
|
|
4447
4452
|
}
|
|
4448
4453
|
});
|
|
4449
|
-
function
|
|
4454
|
+
function Io(t, n, e) {
|
|
4450
4455
|
const {
|
|
4451
4456
|
buttonGroupClass: r
|
|
4452
|
-
} = e, o =
|
|
4457
|
+
} = e, o = x();
|
|
4453
4458
|
return {
|
|
4454
|
-
renderButtonGroup: () =>
|
|
4459
|
+
renderButtonGroup: () => w("div", {
|
|
4455
4460
|
id: `${t.id}-button-group`,
|
|
4456
4461
|
class: r.value
|
|
4457
|
-
}, [n.slots.buttonContent ?
|
|
4462
|
+
}, [n.slots.buttonContent ? w("span", {
|
|
4458
4463
|
class: "input-group-text input-group-append-button"
|
|
4459
|
-
}, [n.slots.buttonContent()]) : t.buttonContent ?
|
|
4464
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? w("span", {
|
|
4460
4465
|
class: "input-group-text input-group-append-button",
|
|
4461
4466
|
innerHTML: t.buttonContent,
|
|
4462
4467
|
ref: o
|
|
@@ -4464,155 +4469,151 @@ function Lo(t, n, e) {
|
|
|
4464
4469
|
buttonHandleElement: o
|
|
4465
4470
|
};
|
|
4466
4471
|
}
|
|
4467
|
-
const
|
|
4472
|
+
const No = /* @__PURE__ */ te({
|
|
4468
4473
|
name: "FButtonEdit",
|
|
4469
|
-
props:
|
|
4474
|
+
props: Be,
|
|
4470
4475
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4471
4476
|
setup(t, n) {
|
|
4472
|
-
const e =
|
|
4477
|
+
const e = x(), r = me("design-item-context"), o = Nt(e, r), a = x(t.customClass), i = x(t.modelValue), u = yt(t, n, e, i), p = ht(t, n, e, u, i), c = x(), d = I(() => ({
|
|
4473
4478
|
"f-cmp-inputgroup": !0,
|
|
4474
4479
|
"input-group": !0,
|
|
4475
4480
|
"f-state-disable": !0,
|
|
4476
4481
|
"f-state-editable": !1,
|
|
4477
4482
|
"f-state-readonly": !0
|
|
4478
4483
|
}));
|
|
4479
|
-
|
|
4484
|
+
ce(() => {
|
|
4480
4485
|
e.value.componentInstance = o;
|
|
4481
4486
|
}), n.expose(o.value);
|
|
4482
|
-
const
|
|
4487
|
+
const s = I(() => {
|
|
4483
4488
|
const m = {
|
|
4484
4489
|
"f-button-edit": !0,
|
|
4485
4490
|
"f-cmp-inputgroup": !0,
|
|
4486
4491
|
"f-button-edit-nowrap": !t.wrapText
|
|
4487
4492
|
};
|
|
4488
|
-
return a.value && a.value.split(" ").reduce((
|
|
4493
|
+
return a.value && a.value.split(" ").reduce((h, g) => (h[g] = !0, h), m), m;
|
|
4489
4494
|
}), {
|
|
4490
|
-
renderButtonGroup:
|
|
4491
|
-
} =
|
|
4492
|
-
return () =>
|
|
4495
|
+
renderButtonGroup: l
|
|
4496
|
+
} = Io(t, n, p);
|
|
4497
|
+
return () => w("div", Te(n.attrs, {
|
|
4493
4498
|
ref: e,
|
|
4494
|
-
class:
|
|
4499
|
+
class: s.value,
|
|
4495
4500
|
id: t.id
|
|
4496
|
-
}), [
|
|
4497
|
-
class:
|
|
4498
|
-
}, [
|
|
4499
|
-
ref:
|
|
4501
|
+
}), [w("div", {
|
|
4502
|
+
class: d.value
|
|
4503
|
+
}, [w("input", {
|
|
4504
|
+
ref: c,
|
|
4500
4505
|
class: "form-control",
|
|
4501
4506
|
readonly: !0,
|
|
4502
4507
|
placeholder: t.placeholder
|
|
4503
|
-
}, null),
|
|
4508
|
+
}, null), l()])]);
|
|
4504
4509
|
}
|
|
4505
4510
|
});
|
|
4506
|
-
|
|
4507
|
-
t["button-edit"] =
|
|
4511
|
+
le.register = (t, n, e, r) => {
|
|
4512
|
+
t["button-edit"] = le, n["button-edit"] = pt;
|
|
4508
4513
|
};
|
|
4509
|
-
|
|
4510
|
-
t["button-edit"] =
|
|
4514
|
+
le.registerDesigner = (t, n, e) => {
|
|
4515
|
+
t["button-edit"] = No, n["button-edit"] = pt;
|
|
4511
4516
|
};
|
|
4512
|
-
|
|
4513
|
-
function
|
|
4514
|
-
var
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
}
|
|
4518
|
-
r();
|
|
4519
|
-
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", i = v();
|
|
4520
|
-
function s() {
|
|
4517
|
+
Lt(le);
|
|
4518
|
+
function Lo(t, n, e) {
|
|
4519
|
+
var k;
|
|
4520
|
+
const r = e && e.getStyles && e.getStyles() || "", o = e && e.getDesignerClass && e.getDesignerClass() || "", a = x();
|
|
4521
|
+
function i() {
|
|
4521
4522
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
4522
4523
|
}
|
|
4523
|
-
function
|
|
4524
|
+
function u() {
|
|
4524
4525
|
return !1;
|
|
4525
4526
|
}
|
|
4526
|
-
function
|
|
4527
|
+
function p() {
|
|
4527
4528
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
4528
4529
|
}
|
|
4529
|
-
function
|
|
4530
|
+
function c() {
|
|
4530
4531
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
4531
4532
|
}
|
|
4532
|
-
function
|
|
4533
|
-
if (!
|
|
4533
|
+
function d(v) {
|
|
4534
|
+
if (!v || !v.value)
|
|
4534
4535
|
return null;
|
|
4535
|
-
if (
|
|
4536
|
-
return
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
4536
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
4537
|
+
return v.value;
|
|
4538
|
+
const E = x(v == null ? void 0 : v.value.parent), F = d(E);
|
|
4539
|
+
return F || null;
|
|
4539
4540
|
}
|
|
4540
|
-
function
|
|
4541
|
-
const { componentInstance:
|
|
4542
|
-
return !
|
|
4541
|
+
function s(v = n) {
|
|
4542
|
+
const { componentInstance: E, designerItemElementRef: F } = v;
|
|
4543
|
+
return !E || !E.value ? null : E.value.canMove ? F : s(v.parent);
|
|
4543
4544
|
}
|
|
4544
|
-
function
|
|
4545
|
-
return !!e && e.canAccepts(
|
|
4545
|
+
function l(v) {
|
|
4546
|
+
return !!e && e.canAccepts(v);
|
|
4546
4547
|
}
|
|
4547
|
-
function
|
|
4548
|
+
function m() {
|
|
4548
4549
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
4549
4550
|
}
|
|
4550
|
-
function
|
|
4551
|
-
}
|
|
4552
|
-
function E(T, V) {
|
|
4553
|
-
V && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(V);
|
|
4551
|
+
function h() {
|
|
4554
4552
|
}
|
|
4555
|
-
function
|
|
4556
|
-
|
|
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;
|
|
4553
|
+
function g(v, E) {
|
|
4554
|
+
E && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(E);
|
|
4561
4555
|
}
|
|
4562
|
-
function
|
|
4563
|
-
const
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
return j && !j.id && j.type === S && (j.id = `${Z}_${Math.random().toString().slice(2, 6)}`), j;
|
|
4556
|
+
function P(v, E) {
|
|
4557
|
+
const { componentType: F } = v;
|
|
4558
|
+
let L = Qe(F, v, E);
|
|
4559
|
+
e && e.onResolveNewComponentSchema && (L = e.onResolveNewComponentSchema(v, L));
|
|
4560
|
+
const C = F.toLowerCase().replace(/-/g, "_");
|
|
4561
|
+
return L && !L.id && L.type === F && (L.id = `${C}_${Math.random().toString().slice(2, 6)}`), L;
|
|
4569
4562
|
}
|
|
4570
|
-
function
|
|
4563
|
+
function O(v) {
|
|
4571
4564
|
}
|
|
4572
|
-
function
|
|
4565
|
+
function D(...v) {
|
|
4573
4566
|
if (e && e.getPropsConfig)
|
|
4574
|
-
return e.getPropsConfig(...
|
|
4567
|
+
return e.getPropsConfig(...v);
|
|
4568
|
+
}
|
|
4569
|
+
function b() {
|
|
4570
|
+
e && e.onRemoveComponent && e.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((v) => {
|
|
4571
|
+
var L;
|
|
4572
|
+
let E = v.id;
|
|
4573
|
+
v.type === "component-ref" && (E = v.component);
|
|
4574
|
+
const F = t.value.querySelector(`#${E}-design-item`);
|
|
4575
|
+
(L = F == null ? void 0 : F.componentInstance) != null && L.value.onRemoveComponent && F.componentInstance.value.onRemoveComponent();
|
|
4576
|
+
});
|
|
4575
4577
|
}
|
|
4576
|
-
return
|
|
4577
|
-
canMove:
|
|
4578
|
-
canSelectParent:
|
|
4579
|
-
canDelete:
|
|
4580
|
-
canNested: !
|
|
4578
|
+
return a.value = {
|
|
4579
|
+
canMove: i(),
|
|
4580
|
+
canSelectParent: u(),
|
|
4581
|
+
canDelete: p(),
|
|
4582
|
+
canNested: !c(),
|
|
4581
4583
|
contents: n == null ? void 0 : n.schema.contents,
|
|
4582
4584
|
elementRef: t,
|
|
4583
|
-
parent: (
|
|
4585
|
+
parent: (k = n == null ? void 0 : n.parent) == null ? void 0 : k.componentInstance,
|
|
4584
4586
|
schema: n == null ? void 0 : n.schema,
|
|
4585
|
-
styles:
|
|
4586
|
-
designerClass:
|
|
4587
|
-
canAccepts:
|
|
4588
|
-
getBelongedComponentInstance:
|
|
4589
|
-
getDraggableDesignItemElement:
|
|
4590
|
-
getDraggingDisplayText:
|
|
4591
|
-
getPropConfig:
|
|
4592
|
-
getDragScopeElement:
|
|
4593
|
-
onAcceptMovedChildElement:
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
}, i;
|
|
4587
|
+
styles: r,
|
|
4588
|
+
designerClass: o,
|
|
4589
|
+
canAccepts: l,
|
|
4590
|
+
getBelongedComponentInstance: d,
|
|
4591
|
+
getDraggableDesignItemElement: s,
|
|
4592
|
+
getDraggingDisplayText: m,
|
|
4593
|
+
getPropConfig: D,
|
|
4594
|
+
getDragScopeElement: h,
|
|
4595
|
+
onAcceptMovedChildElement: g,
|
|
4596
|
+
onChildElementMovedOut: O,
|
|
4597
|
+
addNewChildComponentSchema: P,
|
|
4598
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || x(!1),
|
|
4599
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || x(!1),
|
|
4600
|
+
onRemoveComponent: b
|
|
4601
|
+
}, a;
|
|
4601
4602
|
}
|
|
4602
|
-
class
|
|
4603
|
+
class Wo {
|
|
4603
4604
|
constructor(n, e) {
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4605
|
+
f(this, "componentId");
|
|
4606
|
+
f(this, "viewModelId");
|
|
4607
|
+
f(this, "eventsEditorUtils");
|
|
4608
|
+
f(this, "formSchemaUtils");
|
|
4609
|
+
f(this, "formMetadataConverter");
|
|
4610
|
+
f(this, "designViewModelUtils");
|
|
4611
|
+
f(this, "designViewModelField");
|
|
4612
|
+
f(this, "controlCreatorUtils");
|
|
4613
|
+
f(this, "designerHostService");
|
|
4614
|
+
f(this, "schemaService", null);
|
|
4615
|
+
f(this, "metadataService", null);
|
|
4616
|
+
f(this, "propertyConfig", {
|
|
4616
4617
|
type: "object",
|
|
4617
4618
|
categories: {}
|
|
4618
4619
|
});
|
|
@@ -4624,13 +4625,14 @@ class Ao {
|
|
|
4624
4625
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
4625
4626
|
}
|
|
4626
4627
|
setDesignViewModelField(n) {
|
|
4628
|
+
var r;
|
|
4627
4629
|
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
4628
4630
|
if (e) {
|
|
4629
4631
|
if (!this.designViewModelField) {
|
|
4630
|
-
const
|
|
4631
|
-
this.designViewModelField =
|
|
4632
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
4633
|
+
this.designViewModelField = o.fields.find((a) => a.id === e);
|
|
4632
4634
|
}
|
|
4633
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
4635
|
+
n.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
|
|
4634
4636
|
}
|
|
4635
4637
|
}
|
|
4636
4638
|
changeFieldEditorType(n, e) {
|
|
@@ -4654,7 +4656,7 @@ class Ao {
|
|
|
4654
4656
|
type: "combo-list",
|
|
4655
4657
|
textField: "name",
|
|
4656
4658
|
valueField: "value",
|
|
4657
|
-
data: [{ value: n.type, name:
|
|
4659
|
+
data: [{ value: n.type, name: T[n.type].name }]
|
|
4658
4660
|
}
|
|
4659
4661
|
}
|
|
4660
4662
|
}
|
|
@@ -4690,16 +4692,16 @@ class Ao {
|
|
|
4690
4692
|
const r = e && e.parent && e.parent.schema;
|
|
4691
4693
|
if (!r)
|
|
4692
4694
|
return;
|
|
4693
|
-
const o = r.contents.findIndex((i) => i.id === n), a =
|
|
4695
|
+
const o = r.contents.findIndex((i) => i.id === n), a = $e(r.contents[o]);
|
|
4694
4696
|
r.contents.splice(o, 1), r.contents.splice(o, 0, a);
|
|
4695
4697
|
}
|
|
4696
4698
|
}
|
|
4697
|
-
const
|
|
4699
|
+
const Z = class Z {
|
|
4698
4700
|
/**
|
|
4699
4701
|
* 根据绑定字段类型获取可用的输入类控件
|
|
4700
4702
|
*/
|
|
4701
4703
|
static getEditorTypesByMDataType(n) {
|
|
4702
|
-
const e =
|
|
4704
|
+
const e = Z.fieldControlTypeMapping[n];
|
|
4703
4705
|
return e || [{ key: "", value: "" }];
|
|
4704
4706
|
}
|
|
4705
4707
|
/**
|
|
@@ -4707,8 +4709,8 @@ const ee = class ee {
|
|
|
4707
4709
|
*/
|
|
4708
4710
|
static getAllInputTypes() {
|
|
4709
4711
|
const n = [];
|
|
4710
|
-
for (
|
|
4711
|
-
|
|
4712
|
+
for (const e in Z.fieldControlTypeMapping)
|
|
4713
|
+
Z.fieldControlTypeMapping[e].forEach((r) => {
|
|
4712
4714
|
n.find((o) => o.key === r.key && o.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
4713
4715
|
});
|
|
4714
4716
|
return n;
|
|
@@ -4717,69 +4719,174 @@ const ee = class ee {
|
|
|
4717
4719
|
/**
|
|
4718
4720
|
* <字段类型,可配置的控件类型列表>的映射
|
|
4719
4721
|
*/
|
|
4720
|
-
|
|
4722
|
+
f(Z, "fieldControlTypeMapping", {
|
|
4721
4723
|
String: [
|
|
4722
|
-
{ key:
|
|
4723
|
-
{ key:
|
|
4724
|
-
{ key:
|
|
4725
|
-
{ key:
|
|
4726
|
-
{ key:
|
|
4727
|
-
{ key:
|
|
4728
|
-
{ key:
|
|
4724
|
+
{ key: T["input-group"].type, value: T["input-group"].name },
|
|
4725
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
4726
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name },
|
|
4727
|
+
{ key: T["check-box"].type, value: T["check-box"].name },
|
|
4728
|
+
{ key: T["check-group"].type, value: T["check-group"].name },
|
|
4729
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name },
|
|
4730
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
4731
|
+
{ key: T.textarea.type, value: T.textarea.name }
|
|
4729
4732
|
],
|
|
4730
4733
|
Text: [
|
|
4731
|
-
{ key:
|
|
4732
|
-
{ key:
|
|
4734
|
+
{ key: T.textarea.type, value: T.textarea.name },
|
|
4735
|
+
{ key: T.lookup.type, value: T.lookup.name }
|
|
4733
4736
|
],
|
|
4734
4737
|
Decimal: [
|
|
4735
|
-
{ key:
|
|
4738
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4736
4739
|
],
|
|
4737
4740
|
Integer: [
|
|
4738
|
-
{ key:
|
|
4741
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4739
4742
|
],
|
|
4740
4743
|
Number: [
|
|
4741
|
-
{ key:
|
|
4744
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4742
4745
|
],
|
|
4743
4746
|
BigNumber: [
|
|
4744
|
-
{ key:
|
|
4747
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4745
4748
|
],
|
|
4746
4749
|
Date: [
|
|
4747
|
-
{ key:
|
|
4750
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
4748
4751
|
],
|
|
4749
4752
|
DateTime: [
|
|
4750
|
-
{ key:
|
|
4753
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
4751
4754
|
],
|
|
4752
4755
|
Boolean: [
|
|
4753
|
-
{ key:
|
|
4754
|
-
{ key:
|
|
4756
|
+
{ key: T.switch.type, value: T.switch.name },
|
|
4757
|
+
{ key: T["check-box"].type, value: T["check-box"].name }
|
|
4755
4758
|
],
|
|
4756
4759
|
Enum: [
|
|
4757
|
-
{ key:
|
|
4758
|
-
{ key:
|
|
4760
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
4761
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
4759
4762
|
],
|
|
4760
4763
|
Object: [
|
|
4761
|
-
{ key:
|
|
4762
|
-
{ key:
|
|
4763
|
-
{ key:
|
|
4764
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
4765
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
4766
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
4764
4767
|
]
|
|
4765
4768
|
});
|
|
4766
|
-
let ge =
|
|
4767
|
-
const
|
|
4768
|
-
class
|
|
4769
|
+
let ge = Z;
|
|
4770
|
+
const Yo = x(0);
|
|
4771
|
+
class qo {
|
|
4772
|
+
constructor() {
|
|
4773
|
+
/** 控件标题 */
|
|
4774
|
+
f(this, "label", "");
|
|
4775
|
+
/** 控件id */
|
|
4776
|
+
f(this, "id", "");
|
|
4777
|
+
/** 每个控件占用的栅格数 */
|
|
4778
|
+
f(this, "columnInSM", 12);
|
|
4779
|
+
f(this, "columnInMD", 6);
|
|
4780
|
+
f(this, "columnInLG", 3);
|
|
4781
|
+
f(this, "columnInEL", 2);
|
|
4782
|
+
/** 每个控件占用的列数 */
|
|
4783
|
+
f(this, "displayWidthInSM", 1);
|
|
4784
|
+
f(this, "displayWidthInMD", 1);
|
|
4785
|
+
f(this, "displayWidthInLG", 1);
|
|
4786
|
+
f(this, "displayWidthInEL", 1);
|
|
4787
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
4788
|
+
f(this, "displayColumnCountAtBreakPoint", "md");
|
|
4789
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
4790
|
+
f(this, "tagRow", 0);
|
|
4791
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
4792
|
+
f(this, "showTopBorder", 0);
|
|
4793
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
4794
|
+
f(this, "group", 1);
|
|
4795
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
4796
|
+
f(this, "isSupportedClass", !0);
|
|
4797
|
+
/** 控件所在分组id(设计器用的) */
|
|
4798
|
+
f(this, "fieldSetId", "");
|
|
4799
|
+
}
|
|
4800
|
+
}
|
|
4801
|
+
function Ao(t) {
|
|
4802
|
+
let n, e;
|
|
4803
|
+
const r = /* @__PURE__ */ new Map();
|
|
4804
|
+
let o = [];
|
|
4805
|
+
function a(d, s) {
|
|
4806
|
+
const m = d.split(" ").filter((D) => D.startsWith("col-"));
|
|
4807
|
+
if (m.length === 0) {
|
|
4808
|
+
s.isSupportedClass = !1;
|
|
4809
|
+
return;
|
|
4810
|
+
}
|
|
4811
|
+
let h = m.find((D) => /^col-([1-9]|10|11|12)$/.test(D)), g = m.find((D) => /^col-md-([1-9]|10|11|12)$/.test(D)), P = m.find((D) => /^col-xl-([1-9]|10|11|12)$/.test(D)), O = m.find((D) => /^col-el-([1-9]|10|11|12)$/.test(D));
|
|
4812
|
+
h = h || "col-12", s.columnInSM = parseInt(h.replace("col-", ""), 10), s.displayWidthInSM = s.columnInSM / 12, s.displayWidthInSM !== 1 && (s.isSupportedClass = !1), g = g || "col-md-" + s.columnInSM, s.columnInMD = parseInt(g.replace("col-md-", ""), 10), s.displayWidthInMD = s.columnInMD / 6, [1, 2].includes(s.displayWidthInMD) || (s.isSupportedClass = !1), P = P || "col-xl-" + s.columnInMD, s.columnInLG = parseInt(P.replace("col-xl-", ""), 10), s.displayWidthInLG = s.columnInLG / 3, [1, 2, 3, 4].includes(s.displayWidthInLG) || (s.isSupportedClass = !1), O = O || "col-el-" + s.columnInLG, s.columnInEL = parseInt(O.replace("col-el-", ""), 10), s.displayWidthInEL = s.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(s.displayWidthInEL) || (s.isSupportedClass = !1);
|
|
4813
|
+
}
|
|
4814
|
+
function i(d, s, l, m = !1) {
|
|
4815
|
+
let h = !1;
|
|
4816
|
+
d.contents.forEach((g) => {
|
|
4817
|
+
if (g.type === "fieldset") {
|
|
4818
|
+
l += 1, i(g, s, l, !0), h = !0;
|
|
4819
|
+
return;
|
|
4820
|
+
}
|
|
4821
|
+
h && (l += 1, h = !1);
|
|
4822
|
+
const P = g.appearance && g.appearance.class, O = new qo();
|
|
4823
|
+
P ? a(P, O) : O.isSupportedClass = !1, O.label = g.label || g.id, O.id = g.id, O.group = l, m && (O.fieldSetId = d.id), e === g.id && (n = l), r.set(g.id, g), s.push(O);
|
|
4824
|
+
});
|
|
4825
|
+
}
|
|
4826
|
+
function u(d) {
|
|
4827
|
+
const s = t.getComponentById(d);
|
|
4828
|
+
if (!s || !s.componentType || !s.componentType.startsWith("form"))
|
|
4829
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
4830
|
+
const l = t.selectNode(s, (m) => m.type === Ne["response-form"].type);
|
|
4831
|
+
return !l || !l.contents || l.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: l };
|
|
4832
|
+
}
|
|
4833
|
+
function p(d, s) {
|
|
4834
|
+
s = s || d.id;
|
|
4835
|
+
const { result: l, message: m, formNode: h } = u(s);
|
|
4836
|
+
if (!l)
|
|
4837
|
+
return { result: l, message: m };
|
|
4838
|
+
e = d.id, o = [], r.clear();
|
|
4839
|
+
const g = h.contents[0].type === Ne.fieldset.type ? 0 : 1;
|
|
4840
|
+
i(h, o, g);
|
|
4841
|
+
const P = o.find((D) => !D.isSupportedClass);
|
|
4842
|
+
return {
|
|
4843
|
+
defaultState: {
|
|
4844
|
+
defaultGroupNumber: n || 1,
|
|
4845
|
+
model: P ? "customize" : "standard"
|
|
4846
|
+
},
|
|
4847
|
+
importData: o
|
|
4848
|
+
};
|
|
4849
|
+
}
|
|
4850
|
+
function c(d, s) {
|
|
4851
|
+
s = s;
|
|
4852
|
+
const { result: l, formNode: m } = u(s);
|
|
4853
|
+
if (!l)
|
|
4854
|
+
return "";
|
|
4855
|
+
const h = [];
|
|
4856
|
+
return d.forEach((g) => {
|
|
4857
|
+
var D;
|
|
4858
|
+
const P = r.get(g.id), O = P.appearance && P.appearance.class;
|
|
4859
|
+
if (O) {
|
|
4860
|
+
const k = O.split(" ").filter(($) => !$.startsWith("col-")), v = "col-" + g.columnInSM, E = "col-md-" + g.columnInMD, F = "col-xl-" + g.columnInLG, L = "col-el-" + g.columnInEL, C = [v, E, F, L].concat(k);
|
|
4861
|
+
P.appearance.class = C.join(" ");
|
|
4862
|
+
}
|
|
4863
|
+
if (g.fieldSetId) {
|
|
4864
|
+
const b = m.contents.find((v) => v.id === g.fieldSetId), k = h.find((v) => v.id === g.fieldSetId);
|
|
4865
|
+
k ? (D = k.contents) == null || D.push(P) : (h.push(b), b.contents = [P]);
|
|
4866
|
+
} else
|
|
4867
|
+
h.push(P);
|
|
4868
|
+
}), m.contents = h, m.id;
|
|
4869
|
+
}
|
|
4870
|
+
return {
|
|
4871
|
+
checkCanFindFormNode: u,
|
|
4872
|
+
checkCanOpenLayoutEditor: p,
|
|
4873
|
+
changeFormControlsByResponseLayoutConfig: c,
|
|
4874
|
+
getResonseFormLayoutConfig: i
|
|
4875
|
+
};
|
|
4876
|
+
}
|
|
4877
|
+
class _o extends Wo {
|
|
4769
4878
|
constructor(e, r) {
|
|
4770
4879
|
super(e, r);
|
|
4771
|
-
|
|
4772
|
-
this.responseLayoutEditorFunction =
|
|
4880
|
+
f(this, "responseLayoutEditorFunction");
|
|
4881
|
+
this.responseLayoutEditorFunction = Ao(this.formSchemaUtils);
|
|
4773
4882
|
}
|
|
4774
4883
|
getPropertyConfig(e, r) {
|
|
4775
4884
|
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;
|
|
4776
4885
|
}
|
|
4777
4886
|
getBasicProperties(e, r) {
|
|
4778
|
-
var
|
|
4779
|
-
|
|
4780
|
-
this.setDesignViewModelField(e)
|
|
4781
|
-
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
4782
|
-
return {
|
|
4887
|
+
var a;
|
|
4888
|
+
const o = this;
|
|
4889
|
+
return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
4783
4890
|
description: "Basic Information",
|
|
4784
4891
|
title: "基本信息",
|
|
4785
4892
|
properties: {
|
|
@@ -4800,7 +4907,7 @@ class Wo extends Ao {
|
|
|
4800
4907
|
textField: "value",
|
|
4801
4908
|
valueField: "key",
|
|
4802
4909
|
editable: !1,
|
|
4803
|
-
data: o.designViewModelField ? ge.getEditorTypesByMDataType((
|
|
4910
|
+
data: o.designViewModelField ? ge.getEditorTypesByMDataType((a = o.designViewModelField.type) == null ? void 0 : a.name) : ge.getAllInputTypes()
|
|
4804
4911
|
}
|
|
4805
4912
|
},
|
|
4806
4913
|
label: {
|
|
@@ -4811,33 +4918,29 @@ class Wo extends Ao {
|
|
|
4811
4918
|
binding: {
|
|
4812
4919
|
description: "绑定的表单字段",
|
|
4813
4920
|
title: "绑定",
|
|
4814
|
-
$converter: "/converter/field-selector.converter",
|
|
4815
4921
|
editor: {
|
|
4816
|
-
type: "
|
|
4922
|
+
type: "binding-selector",
|
|
4817
4923
|
bindingType: { enable: !1 },
|
|
4818
4924
|
editorParams: {
|
|
4819
|
-
|
|
4820
|
-
|
|
4925
|
+
componentSchema: e,
|
|
4926
|
+
needSyncToViewModel: !0,
|
|
4927
|
+
viewModelId: this.viewModelId,
|
|
4928
|
+
designerHostService: this.designerHostService,
|
|
4929
|
+
disableOccupiedFields: !0
|
|
4821
4930
|
},
|
|
4822
|
-
|
|
4823
|
-
{ field: "name", title: "字段名称" },
|
|
4824
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
4825
|
-
{ field: "fieldType", title: "字段类型" }
|
|
4826
|
-
],
|
|
4827
|
-
textField: "bindingField",
|
|
4828
|
-
data: i
|
|
4931
|
+
textField: "bindingField"
|
|
4829
4932
|
}
|
|
4830
4933
|
}
|
|
4831
4934
|
},
|
|
4832
|
-
setPropertyRelates(
|
|
4833
|
-
if (
|
|
4834
|
-
switch (
|
|
4935
|
+
setPropertyRelates(i, u) {
|
|
4936
|
+
if (i)
|
|
4937
|
+
switch (i && i.propertyID) {
|
|
4835
4938
|
case "type": {
|
|
4836
|
-
o.changeControlType(e,
|
|
4939
|
+
o.changeControlType(e, i, r);
|
|
4837
4940
|
break;
|
|
4838
4941
|
}
|
|
4839
4942
|
case "label": {
|
|
4840
|
-
|
|
4943
|
+
i.needRefreshControlTree = !0;
|
|
4841
4944
|
break;
|
|
4842
4945
|
}
|
|
4843
4946
|
}
|
|
@@ -4845,7 +4948,7 @@ class Wo extends Ao {
|
|
|
4845
4948
|
};
|
|
4846
4949
|
}
|
|
4847
4950
|
getAppearanceProperties(e, r) {
|
|
4848
|
-
|
|
4951
|
+
const o = this;
|
|
4849
4952
|
return {
|
|
4850
4953
|
title: "样式",
|
|
4851
4954
|
description: "Appearance",
|
|
@@ -4897,12 +5000,12 @@ class Wo extends Ao {
|
|
|
4897
5000
|
* @param newControlType 新控件类型
|
|
4898
5001
|
*/
|
|
4899
5002
|
changeControlType(e, r, o) {
|
|
4900
|
-
var
|
|
5003
|
+
var d, s, l, m;
|
|
4901
5004
|
const a = r.propertyValue, i = o && o.parent && o.parent.schema;
|
|
4902
5005
|
if (!i)
|
|
4903
5006
|
return;
|
|
4904
|
-
const
|
|
4905
|
-
let
|
|
5007
|
+
const u = i.contents.findIndex((h) => h.id === e.id), p = i.contents[u];
|
|
5008
|
+
let c;
|
|
4906
5009
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
4907
5010
|
editor: {
|
|
4908
5011
|
$type: a
|
|
@@ -4910,22 +5013,22 @@ class Wo extends Ao {
|
|
|
4910
5013
|
name: this.designViewModelField.name,
|
|
4911
5014
|
require: this.designViewModelField.require,
|
|
4912
5015
|
readonly: this.designViewModelField.readonly
|
|
4913
|
-
}, !1),
|
|
4914
|
-
id:
|
|
4915
|
-
appearance:
|
|
4916
|
-
size:
|
|
4917
|
-
label:
|
|
4918
|
-
binding:
|
|
4919
|
-
visible:
|
|
4920
|
-
}), Object.assign(
|
|
4921
|
-
isTextArea:
|
|
4922
|
-
placeholder: (
|
|
4923
|
-
holdPlace: (
|
|
4924
|
-
readonly: (
|
|
4925
|
-
require: (m =
|
|
4926
|
-
}), i.contents.splice(
|
|
4927
|
-
(
|
|
4928
|
-
),
|
|
5016
|
+
}, !1), c = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), c || (c = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(c, {
|
|
5017
|
+
id: p.id,
|
|
5018
|
+
appearance: p.appearance,
|
|
5019
|
+
size: p.size,
|
|
5020
|
+
label: p.label,
|
|
5021
|
+
binding: p.binding,
|
|
5022
|
+
visible: p.visible
|
|
5023
|
+
}), Object.assign(c.editor, {
|
|
5024
|
+
isTextArea: c.isTextArea && p.isTextArea,
|
|
5025
|
+
placeholder: (d = p.editor) == null ? void 0 : d.placeholder,
|
|
5026
|
+
holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
|
|
5027
|
+
readonly: (l = p.editor) == null ? void 0 : l.readonly,
|
|
5028
|
+
require: (m = p.editor) == null ? void 0 : m.require
|
|
5029
|
+
}), i.contents.splice(u, 1), i.contents.splice(u, 0, c), o.schema = Object.assign(p, c), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
5030
|
+
(h) => h.classList.remove("dgComponentSelected")
|
|
5031
|
+
), Yo.value++;
|
|
4929
5032
|
}
|
|
4930
5033
|
getComponentConfig(e, r = {}, o = {}) {
|
|
4931
5034
|
const a = Object.assign({
|
|
@@ -4965,16 +5068,16 @@ class Wo extends Ao {
|
|
|
4965
5068
|
*/
|
|
4966
5069
|
updateUnifiedLayoutAfterControlChanged(e, r, o) {
|
|
4967
5070
|
const a = e.split(" ");
|
|
4968
|
-
let i = a.find((
|
|
4969
|
-
i = i || "col-12",
|
|
4970
|
-
const
|
|
5071
|
+
let i = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), u = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), p = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), c = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
5072
|
+
i = i || "col-12", u = u || "col-md-" + i.replace("col-", ""), p = p || "col-xl-" + u.replace("col-md-", ""), c = c || "col-el-" + p.replace("col-xl-", "");
|
|
5073
|
+
const d = {
|
|
4971
5074
|
id: r,
|
|
4972
5075
|
columnInSM: parseInt(i.replace("col-", ""), 10),
|
|
4973
|
-
columnInMD: parseInt(
|
|
4974
|
-
columnInLG: parseInt(
|
|
4975
|
-
columnInEL: parseInt(
|
|
5076
|
+
columnInMD: parseInt(u.replace("col-md-", ""), 10),
|
|
5077
|
+
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
5078
|
+
columnInEL: parseInt(c.replace("col-el-", ""), 10)
|
|
4976
5079
|
};
|
|
4977
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(o,
|
|
5080
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, d);
|
|
4978
5081
|
}
|
|
4979
5082
|
/**
|
|
4980
5083
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -4987,14 +5090,14 @@ class Wo extends Ao {
|
|
|
4987
5090
|
return;
|
|
4988
5091
|
const a = [];
|
|
4989
5092
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), r) {
|
|
4990
|
-
const
|
|
4991
|
-
Object.assign(
|
|
5093
|
+
const h = a.find((g) => g.id === r.id);
|
|
5094
|
+
Object.assign(h || {}, r);
|
|
4992
5095
|
}
|
|
4993
|
-
const i = a.map((
|
|
5096
|
+
const i = a.map((h) => h.columnInSM), u = a.map((h) => h.columnInMD), p = a.map((h) => h.columnInLG), c = a.map((h) => h.columnInEL), d = this.checkIsUniqueColumn(i) ? i[0] : null, s = this.checkIsUniqueColumn(u) ? u[0] : null, l = this.checkIsUniqueColumn(p) ? p[0] : null, m = this.checkIsUniqueColumn(c) ? c[0] : null;
|
|
4994
5097
|
Object.assign(o.unifiedLayout, {
|
|
4995
|
-
uniqueColClassInSM:
|
|
4996
|
-
uniqueColClassInMD:
|
|
4997
|
-
uniqueColClassInLG:
|
|
5098
|
+
uniqueColClassInSM: d,
|
|
5099
|
+
uniqueColClassInMD: s,
|
|
5100
|
+
uniqueColClassInLG: l,
|
|
4998
5101
|
uniqueColClassInEL: m
|
|
4999
5102
|
});
|
|
5000
5103
|
}
|
|
@@ -5006,7 +5109,7 @@ class Wo extends Ao {
|
|
|
5006
5109
|
return Array.from(r).length === 1;
|
|
5007
5110
|
}
|
|
5008
5111
|
}
|
|
5009
|
-
class
|
|
5112
|
+
class Go extends _o {
|
|
5010
5113
|
constructor(n, e) {
|
|
5011
5114
|
super(n, e);
|
|
5012
5115
|
}
|
|
@@ -5046,105 +5149,52 @@ class _o extends Wo {
|
|
|
5046
5149
|
});
|
|
5047
5150
|
}
|
|
5048
5151
|
}
|
|
5049
|
-
function Ro(t, n) {
|
|
5050
|
-
t.schema;
|
|
5051
|
-
const e = v(!0), r = v(!0);
|
|
5052
|
-
function o(l) {
|
|
5053
|
-
return !1;
|
|
5054
|
-
}
|
|
5055
|
-
function a() {
|
|
5056
|
-
return !1;
|
|
5057
|
-
}
|
|
5058
|
-
function i() {
|
|
5059
|
-
return !1;
|
|
5060
|
-
}
|
|
5061
|
-
function s() {
|
|
5062
|
-
return !0;
|
|
5063
|
-
}
|
|
5064
|
-
function d(l) {
|
|
5065
|
-
}
|
|
5066
|
-
function u() {
|
|
5067
|
-
}
|
|
5068
|
-
function f(l) {
|
|
5069
|
-
return null;
|
|
5070
|
-
}
|
|
5071
|
-
return {
|
|
5072
|
-
canAccepts: o,
|
|
5073
|
-
checkCanDeleteComponent: a,
|
|
5074
|
-
checkCanMoveComponent: i,
|
|
5075
|
-
hideNestedPaddingInDesginerView: s,
|
|
5076
|
-
onAcceptMovedChildElement: d,
|
|
5077
|
-
resolveComponentContext: u,
|
|
5078
|
-
triggerBelongedComponentToMoveWhenMoved: e,
|
|
5079
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
5080
|
-
getPropsConfig: f
|
|
5081
|
-
};
|
|
5082
|
-
}
|
|
5083
5152
|
function $o(t, n) {
|
|
5084
|
-
const
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
checkCanMoveComponent: o,
|
|
5088
|
-
hideNestedPaddingInDesginerView: a,
|
|
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);
|
|
5153
|
+
const e = t.schema;
|
|
5154
|
+
function r(o, a) {
|
|
5155
|
+
return new Go(o, n).getPropertyConfig(e, a);
|
|
5096
5156
|
}
|
|
5097
|
-
return {
|
|
5098
|
-
canAccepts: e,
|
|
5099
|
-
checkCanDeleteComponent: r,
|
|
5100
|
-
checkCanMoveComponent: o,
|
|
5101
|
-
hideNestedPaddingInDesginerView: a,
|
|
5102
|
-
onAcceptMovedChildElement: i,
|
|
5103
|
-
resolveComponentContext: s,
|
|
5104
|
-
triggerBelongedComponentToMoveWhenMoved: d,
|
|
5105
|
-
triggerBelongedComponentToDeleteWhenDeleted: u,
|
|
5106
|
-
getPropsConfig: l
|
|
5107
|
-
};
|
|
5157
|
+
return { getPropsConfig: r };
|
|
5108
5158
|
}
|
|
5109
|
-
const jo = /* @__PURE__ */
|
|
5159
|
+
const jo = /* @__PURE__ */ te({
|
|
5110
5160
|
name: "FTimePickerDesign",
|
|
5111
|
-
props:
|
|
5161
|
+
props: Oe,
|
|
5112
5162
|
emits: ["datePicked", "update:modelValue"],
|
|
5113
5163
|
setup(t, n) {
|
|
5114
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r =
|
|
5115
|
-
|
|
5116
|
-
a.value.componentInstance =
|
|
5117
|
-
}), n.expose(
|
|
5118
|
-
function
|
|
5164
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(), a = x(), i = me("designer-host-service"), u = me("design-item-context"), p = $o(u, i), c = Lo(a, u, p);
|
|
5165
|
+
ce(() => {
|
|
5166
|
+
a.value.componentInstance = c;
|
|
5167
|
+
}), n.expose(c.value);
|
|
5168
|
+
function d() {
|
|
5119
5169
|
}
|
|
5120
|
-
return () =>
|
|
5170
|
+
return () => w("div", {
|
|
5121
5171
|
ref: a
|
|
5122
|
-
}, [
|
|
5172
|
+
}, [w(le, {
|
|
5123
5173
|
ref: o,
|
|
5124
5174
|
modelValue: r.value,
|
|
5125
|
-
"onUpdate:modelValue": (
|
|
5175
|
+
"onUpdate:modelValue": (s) => r.value = s,
|
|
5126
5176
|
buttonContent: e,
|
|
5127
5177
|
enableClear: !0,
|
|
5128
5178
|
onClickButton: () => void 0
|
|
5129
5179
|
}, {
|
|
5130
|
-
default: () => [
|
|
5180
|
+
default: () => [w(Bt("f-time-picker-time-view"), null, null)]
|
|
5131
5181
|
})]);
|
|
5132
5182
|
}
|
|
5133
5183
|
});
|
|
5134
|
-
|
|
5135
|
-
t.component(
|
|
5184
|
+
K.install = (t) => {
|
|
5185
|
+
t.component(K.name, K).component(Ce.name, Ce);
|
|
5136
5186
|
};
|
|
5137
|
-
|
|
5138
|
-
t["time-picker"] =
|
|
5187
|
+
K.register = (t, n, e, r) => {
|
|
5188
|
+
t["time-picker"] = K, n["time-picker"] = Xe;
|
|
5139
5189
|
};
|
|
5140
|
-
|
|
5190
|
+
K.registerDesigner = (t, n, e) => {
|
|
5141
5191
|
t["time-picker"] = jo, n["time-picker"] = Xe;
|
|
5142
5192
|
};
|
|
5143
5193
|
export {
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5194
|
+
K as FTimePicker,
|
|
5195
|
+
Ce as FTimePickerTimeView,
|
|
5196
|
+
K as default,
|
|
5147
5197
|
Xe as propsResolver,
|
|
5148
|
-
|
|
5149
|
-
|
|
5198
|
+
Oe as timePickerProps,
|
|
5199
|
+
nn as timeProps
|
|
5150
5200
|
};
|