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GAAIqB,EAAO,QACX,WAAYA,EAAO,WACnB,MAAOA,EAAO,MACd,aAAc,CAACA,EAAO,OAASA,EAAO,aACtC,YAAazB,EAAK,KAClB,SAAUyB,EAAO,SACjB,WAAY,CAAE,UAAWG,EAAS,WAAW,EAC7C,KAAMH,EAAO,KACb,mBAAoB,WACpB,oBAAqBA,EAAO,oBAC5B,mBAAoBA,EAAO,oBAAsB,CAACA,EAAO,QACvE,EAAezB,EAAK,OAAQ,CACd,sBAAuBC,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAK6C,GAAW9C,EAAK,MAAM,KAAK,cAAa,GAC1F,sBAAuB4B,EAAS,kBAC9C,CAAa,EAAG,KAAM,GAAI,CAAC,KAAM,aAAc,QAAS,eAAgB,cAAe,WAAY,aAAc,OAAQ,sBAAuB,qBAAsB,qBAAqB,CAAC,EAC5L,CAAW,CACX,CAAS,CACT,EAAS,GAAIX,EAAU,CACvB,EAAO,EAAE,CACT,EAAK,CAAC,CACN,CACK,MAAC+B,GAAgC1C,EAAYxC,EAAW,CAAC,CAAC,SAAU0D,EAAW,EAAG,CAAC,YAAa,iBAAiB,CAAC,CAAC","names":["register","t41","_sfc_main","defineComponent","mergeModels","createElementId","t","__props","modelValue","useModel","props","formattedValue","computed","formatValue","formattedMax","formattedMin","ncInputFieldPropNames","NcInputField","propsToForward","key","getReadableDate","value","yyyy","MM","dd","hh","mm","startDate","daysSinceBeginningOfYear","weekNumber","onInput","event","input","time","timezoneOffsetSeconds","inputDateWithTimezone","_ctx","_cache","openBlock","createBlock","mergeProps","NcDateTimePickerNative","_export_sfc","t50","NcPasswordField","_sfc_main$1","defineAsyncComponent","__vitePreload","n","ActionGlobalMixin","id","type","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_sfc_render","$props","$setup","$data","$options","_component_NcDateTimePicker","resolveComponent","_component_NcDateTimePickerNative","_component_NcSelect","_component_NcPasswordField","_component_NcColorPicker","_component_NcTextField","createElementBlock","normalizeClass","createElementVNode","args","renderSlot","normalizeStyle","withModifiers","toDisplayString","createCommentVNode","createVNode","$event","withCtx","NcActionInput"],"ignoreList":[0,1],"sources":["../node_modules/@nextcloud/vue/dist/chunks/NcDateTimePickerNative.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcActionInput.mjs"],"sourcesContent":["import '../assets/NcDateTimePickerNative.css';\nimport { defineComponent, useModel, computed, openBlock, createBlock, mergeProps, mergeModels } from \"vue\";\nimport { N as NcInputField } from \"./NcInputField.mjs\";\nimport { r as register, y as t41, a as t } from \"./_l10n.mjs\";\nimport { c as createElementId } from \"./createElementId.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper.mjs\";\nregister(t41);\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n  ...{ inheritAttrs: false },\n  __name: \"NcDateTimePickerNative\",\n  props: /* @__PURE__ */ mergeModels({\n    class: { default: void 0 },\n    id: { default: () => createElementId() },\n    inputClass: { default: \"\" },\n    type: { default: \"date\" },\n    label: { default: () => t(\"Please choose a date\") },\n    min: { default: null },\n    max: { default: null },\n    hideLabel: { type: Boolean }\n  }, {\n    \"modelValue\": { default: null },\n    \"modelModifiers\": {}\n  }),\n  emits: [\"update:modelValue\"],\n  setup(__props) {\n    const modelValue = useModel(__props, \"modelValue\");\n    const props = __props;\n    const formattedValue = computed(() => modelValue.value ? formatValue(modelValue.value) : \"\");\n    const formattedMax = computed(() => props.max ? formatValue(props.max) : void 0);\n    const formattedMin = computed(() => props.min ? formatValue(props.min) : void 0);\n    const ncInputFieldPropNames = new Set(Object.keys(NcInputField.props));\n    const propsToForward = computed(() => Object.fromEntries(Object.entries(props).filter(([key]) => ncInputFieldPropNames.has(key))));\n    function getReadableDate(value) {\n      const yyyy = value.getFullYear().toString().padStart(4, \"0\");\n      const MM = (value.getMonth() + 1).toString().padStart(2, \"0\");\n      const dd = value.getDate().toString().padStart(2, \"0\");\n      const hh = value.getHours().toString().padStart(2, \"0\");\n      const mm = value.getMinutes().toString().padStart(2, \"0\");\n      return { yyyy, MM, dd, hh, mm };\n    }\n    function formatValue(value) {\n      const { yyyy, MM, dd, hh, mm } = getReadableDate(value);\n      if (props.type === \"datetime-local\") {\n        return `${yyyy}-${MM}-${dd}T${hh}:${mm}`;\n      } else if (props.type === \"date\") {\n        return `${yyyy}-${MM}-${dd}`;\n      } else if (props.type === \"month\") {\n        return `${yyyy}-${MM}`;\n      } else if (props.type === \"time\") {\n        return `${hh}:${mm}`;\n      } else if (props.type === \"week\") {\n        const startDate = new Date(Number.parseInt(yyyy), 0, 1);\n        const daysSinceBeginningOfYear = Math.floor((value.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1e3));\n        const weekNumber = Math.ceil(daysSinceBeginningOfYear / 7);\n        return `${yyyy}-W${weekNumber}`;\n      }\n      return \"\";\n    }\n    function onInput(event) {\n      const input = event.target;\n      if (!input || isNaN(input.valueAsNumber)) {\n        modelValue.value = null;\n      } else if (props.type === \"time\") {\n        const time = input.value;\n        const { yyyy, MM, dd } = getReadableDate(modelValue.value || /* @__PURE__ */ new Date());\n        modelValue.value = /* @__PURE__ */ new Date(`${yyyy}-${MM}-${dd}T${time}`);\n      } else if (props.type === \"month\") {\n        const MM = (new Date(input.value).getMonth() + 1).toString().padStart(2, \"0\");\n        const { yyyy, dd, hh, mm } = getReadableDate(modelValue.value || /* @__PURE__ */ new Date());\n        modelValue.value = /* @__PURE__ */ new Date(`${yyyy}-${MM}-${dd}T${hh}:${mm}`);\n      } else {\n        const timezoneOffsetSeconds = new Date(input.valueAsNumber).getTimezoneOffset() * 1e3 * 60;\n        const inputDateWithTimezone = input.valueAsNumber + timezoneOffsetSeconds;\n        modelValue.value = new Date(inputDateWithTimezone);\n      }\n    }\n    return (_ctx, _cache) => {\n      return openBlock(), createBlock(NcInputField, mergeProps({ ..._ctx.$attrs, ...propsToForward.value }, {\n        class: \"native-datetime-picker\",\n        label: __props.hideLabel ? void 0 : __props.label,\n        labelOutside: __props.hideLabel,\n        \"aria-label\": __props.hideLabel ? __props.label : void 0,\n        modelValue: formattedValue.value,\n        min: formattedMin.value,\n        max: formattedMax.value,\n        onInput\n      }), null, 16, [\"label\", \"labelOutside\", \"aria-label\", \"modelValue\", \"min\", \"max\"]);\n    };\n  }\n});\nconst NcDateTimePickerNative = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-7639cce1\"]]);\nexport {\n  NcDateTimePickerNative as N\n};\n//# sourceMappingURL=NcDateTimePickerNative.mjs.map\n","import '../assets/NcActionInput.css';\nimport { defineAsyncComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, normalizeStyle, withModifiers, toDisplayString, createCommentVNode, createBlock, mergeProps, createVNode, withCtx } from \"vue\";\nimport { r as register, l as t50, a as t } from \"./_l10n.mjs\";\nimport { A as ActionGlobalMixin } from \"./actionGlobal.mjs\";\nimport { c as createElementId } from \"./createElementId.mjs\";\nimport { N as NcDateTimePickerNative } from \"./NcDateTimePickerNative.mjs\";\nimport { N as NcPasswordField } from \"./NcPasswordField.mjs\";\nimport { _ as _sfc_main$1 } from \"./NcTextField.vue_vue_type_script_setup_true_lang.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper.mjs\";\nregister(t50);\nconst _sfc_main = {\n  name: \"NcActionInput\",\n  components: {\n    NcDateTimePickerNative,\n    NcPasswordField,\n    NcTextField: _sfc_main$1,\n    // Lazy load components with more than 50kB bundle size impact\n    NcColorPicker: defineAsyncComponent(() => import(\"../components/NcColorPicker/index.mjs\")),\n    NcDateTimePicker: defineAsyncComponent(() => import(\"../components/NcDateTimePicker/index.mjs\")),\n    NcSelect: defineAsyncComponent(() => import(\"../components/NcSelect/index.mjs\"))\n  },\n  mixins: [ActionGlobalMixin],\n  inheritAttrs: false,\n  props: {\n    /**\n     * id attribute of the checkbox element\n     */\n    id: {\n      type: String,\n      default: () => \"action-\" + createElementId(),\n      validator: (id) => id.trim() !== \"\"\n    },\n    /**\n     * id attribute of the text input element\n     */\n    inputId: {\n      type: String,\n      default: () => \"action-input-\" + createElementId(),\n      validator: (id) => id.trim() !== \"\"\n    },\n    /**\n     * Icon to show with the action, can be either a CSS class or an URL\n     */\n    icon: {\n      type: String,\n      default: \"\"\n    },\n    /**\n     * type attribute of the input field\n     */\n    type: {\n      type: String,\n      default: \"text\",\n      validator(type) {\n        return [\n          \"date\",\n          \"datetime-local\",\n          \"month\",\n          \"multiselect\",\n          \"number\",\n          \"password\",\n          \"search\",\n          \"tel\",\n          \"text\",\n          \"time\",\n          \"url\",\n          \"week\",\n          \"color\",\n          \"email\"\n        ].includes(type);\n      }\n    },\n    /**\n     * id attribute for the native date time picker\n     */\n    idNativeDateTimePicker: {\n      type: String,\n      default: \"date-time-picker_id\"\n    },\n    /**\n     * Flag to use a native date time picker\n     */\n    isNativePicker: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * The visible input label for accessibility purposes.\n     */\n    label: {\n      type: String,\n      default: null\n    },\n    /**\n     * If you want to show the label just above the\n     * input field, pass in `true` to this prop.\n     */\n    labelOutside: {\n      type: Boolean,\n      default: true\n    },\n    /**\n     * value attribute of the input field\n     */\n    modelValue: {\n      type: [String, Date, Number, Array],\n      default: \"\"\n    },\n    /**\n     * disabled state of the input field\n     */\n    disabled: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * aria-label attribute of the input field\n     */\n    ariaLabel: {\n      type: String,\n      default: \"\"\n    },\n    /**\n     * Attribute forwarded to the underlying NcPasswordField and NcTextField\n     */\n    showTrailingButton: {\n      type: Boolean,\n      default: true\n    },\n    /**\n     * Trailing button label forwarded to the underlying NcTextField\n     */\n    trailingButtonLabel: {\n      type: String,\n      default: t(\"Submit\")\n    },\n    /**\n     * CSS class to apply to the root element.\n     */\n    class: {\n      type: [String, Array, Object],\n      default: \"\"\n    }\n  },\n  emits: [\n    \"submit\",\n    \"update:modelValue\"\n  ],\n  computed: {\n    isIconUrl() {\n      try {\n        return new URL(this.icon);\n      } catch {\n        return false;\n      }\n    },\n    isMultiselectType() {\n      return this.type === \"multiselect\";\n    },\n    nativeDatePickerType() {\n      switch (this.type) {\n        case \"date\":\n        case \"month\":\n        case \"time\":\n        case \"week\":\n        case \"datetime-local\":\n          return this.type;\n      }\n      return false;\n    },\n    datePickerType() {\n      if (!this.isNativePicker) {\n        switch (this.type) {\n          case \"date\":\n          case \"month\":\n          case \"time\":\n            return this.type;\n          case \"datetime-local\":\n            return \"datetime\";\n        }\n      }\n      return false;\n    },\n    /**\n     * determines if the action is focusable\n     *\n     * @return {boolean} is the action focusable ?\n     */\n    isFocusable() {\n      return !this.disabled;\n    }\n  },\n  methods: {\n    // closing datepicker popup on mouseleave = unfocus\n    onLeave() {\n      if (this.$refs.datetimepicker && this.$refs.datetimepicker.$refs.datepicker) {\n        this.$refs.datetimepicker.$refs.datepicker.closePopup();\n      }\n    },\n    onSubmit(event) {\n      event.preventDefault();\n      event.stopPropagation();\n      if (!this.disabled) {\n        this.$emit(\"submit\", event);\n      } else {\n        return false;\n      }\n    },\n    onUpdateModelValue(event) {\n      this.$emit(\"update:modelValue\", event);\n    }\n  }\n};\nconst _hoisted_1 = { class: \"action-input__icon-wrapper\" };\nconst _hoisted_2 = [\"disabled\"];\nconst _hoisted_3 = { class: \"action-input__container\" };\nconst _hoisted_4 = [\"for\"];\nconst _hoisted_5 = { class: \"action-input__input-container\" };\nconst _hoisted_6 = {\n  key: 4,\n  class: \"action-input__container\"\n};\nconst _hoisted_7 = [\"for\"];\nconst _hoisted_8 = { class: \"action-input__input-container\" };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcDateTimePicker = resolveComponent(\"NcDateTimePicker\");\n  const _component_NcDateTimePickerNative = resolveComponent(\"NcDateTimePickerNative\");\n  const _component_NcSelect = resolveComponent(\"NcSelect\");\n  const _component_NcPasswordField = resolveComponent(\"NcPasswordField\");\n  const _component_NcColorPicker = resolveComponent(\"NcColorPicker\");\n  const _component_NcTextField = resolveComponent(\"NcTextField\");\n  return openBlock(), createElementBlock(\"li\", {\n    class: normalizeClass([\"action\", [{ \"action--disabled\": $props.disabled }, _ctx.$props.class]])\n  }, [\n    createElementVNode(\"span\", {\n      class: normalizeClass([\"action-input\", {\n        \"action-input-picker--disabled\": $props.disabled,\n        \"action-input--visible-label\": $props.labelOutside && $props.label,\n        \"action-input--tight-label\": $props.isNativePicker || $options.isMultiselectType\n      }]),\n      onMouseleave: _cache[3] || (_cache[3] = (...args) => $options.onLeave && $options.onLeave(...args))\n    }, [\n      createElementVNode(\"span\", _hoisted_1, [\n        renderSlot(_ctx.$slots, \"icon\", {}, () => [\n          createElementVNode(\"span\", {\n            \"aria-hidden\": \"true\",\n            class: normalizeClass([\"action-input__icon\", [$options.isIconUrl ? \"action-input__icon--url\" : $props.icon]]),\n            style: normalizeStyle({ backgroundImage: $options.isIconUrl ? `url(${$props.icon})` : null })\n          }, null, 6)\n        ], true)\n      ]),\n      createElementVNode(\"form\", {\n        ref: \"form\",\n        class: \"action-input__form\",\n        disabled: $props.disabled,\n        onSubmit: _cache[2] || (_cache[2] = withModifiers((...args) => $options.onSubmit && $options.onSubmit(...args), [\"prevent\"]))\n      }, [\n        createElementVNode(\"div\", _hoisted_3, [\n          $props.label && $props.labelOutside && !$props.isNativePicker ? (openBlock(), createElementBlock(\"label\", {\n            key: 0,\n            class: normalizeClass([\"action-input__text-label\", { \"action-input__text-label--hidden\": !$props.labelOutside }]),\n            for: $props.inputId\n          }, toDisplayString($props.label), 11, _hoisted_4)) : createCommentVNode(\"\", true),\n          createElementVNode(\"div\", _hoisted_5, [\n            $options.datePickerType ? (openBlock(), createBlock(_component_NcDateTimePicker, mergeProps({\n              key: 0,\n              ref: \"datetimepicker\",\n              modelValue: $props.modelValue,\n              style: { \"z-index\": \"99999999999\" },\n              placeholder: _ctx.text,\n              disabled: $props.disabled,\n              type: $options.datePickerType,\n              inputClass: [\"mx-input\", { focusable: $options.isFocusable }],\n              class: \"action-input__datetimepicker\",\n              appendToBody: \"\"\n            }, _ctx.$attrs, { \"onUpdate:modelValue\": $options.onUpdateModelValue }), null, 16, [\"modelValue\", \"placeholder\", \"disabled\", \"type\", \"inputClass\", \"onUpdate:modelValue\"])) : $props.isNativePicker ? (openBlock(), createBlock(_component_NcDateTimePickerNative, mergeProps({\n              key: 1,\n              id: $props.idNativeDateTimePicker,\n              modelValue: $props.modelValue,\n              label: $props.label,\n              type: $options.nativeDatePickerType,\n              inputClass: { focusable: $options.isFocusable },\n              class: \"action-input__datetimepicker\"\n            }, _ctx.$attrs, { \"onUpdate:modelValue\": $options.onUpdateModelValue }), null, 16, [\"id\", \"modelValue\", \"label\", \"type\", \"inputClass\", \"onUpdate:modelValue\"])) : $options.isMultiselectType ? (openBlock(), createBlock(_component_NcSelect, mergeProps({\n              key: 2,\n              modelValue: $props.modelValue,\n              placeholder: _ctx.text,\n              disabled: $props.disabled,\n              appendToBody: false,\n              inputClass: { focusable: $options.isFocusable },\n              class: \"action-input__multi\"\n            }, _ctx.$attrs, { \"onUpdate:modelValue\": $options.onUpdateModelValue }), null, 16, [\"modelValue\", \"placeholder\", \"disabled\", \"inputClass\", \"onUpdate:modelValue\"])) : $props.type === \"password\" ? (openBlock(), createBlock(_component_NcPasswordField, mergeProps({\n              key: 3,\n              id: $props.inputId,\n              modelValue: $props.modelValue,\n              label: $props.label,\n              labelOutside: !$props.label || $props.labelOutside,\n              placeholder: _ctx.text,\n              disabled: $props.disabled,\n              inputClass: { focusable: $options.isFocusable },\n              showTrailingButton: $props.showTrailingButton && !$props.disabled\n            }, _ctx.$attrs, { \"onUpdate:modelValue\": $options.onUpdateModelValue }), null, 16, [\"id\", \"modelValue\", \"label\", \"labelOutside\", \"placeholder\", \"disabled\", \"inputClass\", \"showTrailingButton\", \"onUpdate:modelValue\"])) : $props.type === \"color\" ? (openBlock(), createElementBlock(\"div\", _hoisted_6, [\n              $props.label && $props.type === \"color\" ? (openBlock(), createElementBlock(\"label\", {\n                key: 0,\n                class: normalizeClass([\"action-input__text-label\", { \"action-input__text-label--hidden\": !$props.labelOutside }]),\n                for: $props.inputId\n              }, toDisplayString($props.label), 11, _hoisted_7)) : createCommentVNode(\"\", true),\n              createElementVNode(\"div\", _hoisted_8, [\n                createVNode(_component_NcColorPicker, mergeProps({\n                  id: \"inputId\",\n                  modelValue: $props.modelValue,\n                  class: \"colorpicker__trigger\"\n                }, _ctx.$attrs, {\n                  \"onUpdate:modelValue\": $options.onUpdateModelValue,\n                  onSubmit: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.form.requestSubmit())\n                }), {\n                  default: withCtx(() => [\n                    createElementVNode(\"button\", {\n                      class: normalizeClass([\"colorpicker__preview\", { focusable: $options.isFocusable }]),\n                      style: normalizeStyle({ \"background-color\": $props.modelValue })\n                    }, null, 6)\n                  ]),\n                  _: 1\n                }, 16, [\"modelValue\", \"onUpdate:modelValue\"])\n              ])\n            ])) : (openBlock(), createBlock(_component_NcTextField, mergeProps({\n              key: 5,\n              id: $props.inputId,\n              modelValue: $props.modelValue,\n              label: $props.label,\n              labelOutside: !$props.label || $props.labelOutside,\n              placeholder: _ctx.text,\n              disabled: $props.disabled,\n              inputClass: { focusable: $options.isFocusable },\n              type: $props.type,\n              trailingButtonIcon: \"arrowEnd\",\n              trailingButtonLabel: $props.trailingButtonLabel,\n              showTrailingButton: $props.showTrailingButton && !$props.disabled\n            }, _ctx.$attrs, {\n              onTrailingButtonClick: _cache[1] || (_cache[1] = ($event) => _ctx.$refs.form.requestSubmit()),\n              \"onUpdate:modelValue\": $options.onUpdateModelValue\n            }), null, 16, [\"id\", \"modelValue\", \"label\", \"labelOutside\", \"placeholder\", \"disabled\", \"inputClass\", \"type\", \"trailingButtonLabel\", \"showTrailingButton\", \"onUpdate:modelValue\"]))\n          ])\n        ])\n      ], 40, _hoisted_2)\n    ], 34)\n  ], 2);\n}\nconst NcActionInput = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-7720ab60\"]]);\nexport {\n  NcActionInput as N\n};\n//# sourceMappingURL=NcActionInput.mjs.map\n"],"file":"NcActionInput-CS3FaCVW.chunk.mjs"}