@descope/web-components-ui 2.1.17 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/cjs/index.cjs.js +494 -380
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +14785 -14648
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1899.js +1 -1
  6. package/dist/umd/1899.js.map +1 -1
  7. package/dist/umd/4623.js +1 -1
  8. package/dist/umd/4623.js.map +1 -1
  9. package/dist/umd/4914.js +1 -1
  10. package/dist/umd/4914.js.map +1 -1
  11. package/dist/umd/5648.js +1 -1
  12. package/dist/umd/5648.js.map +1 -1
  13. package/dist/umd/8961.js +1 -1
  14. package/dist/umd/8961.js.map +1 -1
  15. package/dist/umd/9365.js +1 -1
  16. package/dist/umd/9365.js.map +1 -1
  17. package/dist/umd/9582.js +2 -0
  18. package/dist/umd/9582.js.map +1 -0
  19. package/dist/umd/DescopeDev.js +1 -1
  20. package/dist/umd/DescopeDev.js.map +1 -1
  21. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
  22. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -1
  23. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  24. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
  25. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  26. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  27. package/dist/umd/descope-alert-index-js.js +1 -1
  28. package/dist/umd/descope-alert-index-js.js.map +1 -1
  29. package/dist/umd/descope-apps-list.js +2 -2
  30. package/dist/umd/descope-apps-list.js.map +1 -1
  31. package/dist/umd/descope-email-field-index-js.js +1 -1
  32. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  33. package/dist/umd/descope-enriched-text.js +1 -1
  34. package/dist/umd/descope-enriched-text.js.map +1 -1
  35. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  36. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  37. package/dist/umd/descope-grid-index-js.js +1 -1
  38. package/dist/umd/descope-grid-index-js.js.map +1 -1
  39. package/dist/umd/descope-passcode-index-js.js +1 -1
  40. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  41. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  42. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  43. package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
  44. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  45. package/dist/umd/descope-text-field-index-js.js +1 -1
  46. package/dist/umd/descope-text-field-index-js.js.map +1 -1
  47. package/dist/umd/index.js +1 -1
  48. package/dist/umd/index.js.map +1 -1
  49. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  50. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
  51. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  52. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  53. package/package.json +28 -28
  54. package/src/components/boolean-fields/commonStyles.js +11 -1
  55. package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +32 -4
  56. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +15 -2
  57. package/src/components/boolean-fields/descope-checkbox/index.js +1 -0
  58. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +5 -2
  59. package/src/components/boolean-fields/descope-switch-toggle/index.js +1 -0
  60. package/src/mixins/createStyleMixin/helpers.js +15 -2
@@ -1 +1 @@
1
- {"version":3,"file":"5648.js","mappings":";gMAWA,MAAMA,EAAc,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCvB,QAAe,sBAAuB,CAAC,IAAkB,IAAaA,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AAqBlG,GAEvBA,IAEEA,EAAMvB,OAASuB,EAAMvB,QAAUO,KAAKP,QACtC0H,QAAQC,KAAK,+BAA+BpH,KAAKM,yBACjDU,EAAMvB,MAAQ,IAGZO,KAAKP,QACPuB,EAAMvB,MAAQO,KAAKP,OAGzB,CAQA,WAAA4F,CAAYC,GACVzF,MAAMwF,YAAYC,IAIbA,GAAW+B,SAASC,YACvBtH,KAAKwF,UAET,CASA,QAAAP,CAASrD,GACP/B,MAAMoF,SAASrD,GAEX5B,KAAKuB,SACPvB,KAAKwF,UAET,CAWA,aAAAnB,CAAcxB,EAAU0E,GACtB1H,MAAMwE,cAAcxB,EAAU0E,QAEbC,IAAbD,GAIAvH,KAAKuB,SACPvB,KAAKwF,UAET,E","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/theme/lumo/vaadin-number-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/src/vaadin-number-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/src/vaadin-number-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/src/vaadin-number-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport { fieldButton } from '@vaadin/vaadin-lumo-styles/mixins/field-button.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst numberField = css`\n :host([step-buttons-visible]:not([theme~='align-right'])) ::slotted(input) {\n text-align: center;\n }\n\n [part$='button'][disabled] {\n opacity: 0.2;\n }\n\n :host([step-buttons-visible]) [part='input-field'] {\n padding: 0;\n }\n\n [part\\$='button'] {\n cursor: pointer;\n font-size: var(--lumo-icon-size-s);\n width: 1.6em;\n height: 1.6em;\n }\n\n [part\\$='button']::before {\n margin-top: 0.3em;\n }\n\n [part='decrease-button']::before {\n content: var(--lumo-icons-minus);\n }\n\n [part='increase-button']::before {\n content: var(--lumo-icons-plus);\n }\n\n /* RTL specific styles */\n :host([dir='rtl']:not([theme~='align-right'])) ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n`;\n\nregisterStyles('vaadin-number-field', [inputFieldShared, fieldButton, numberField], {\n moduleId: 'lumo-number-field',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common number field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const NumberFieldMixin = (superClass) =>\n class NumberFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * The minimum value of the field.\n */\n min: {\n type: Number,\n },\n\n /**\n * The maximum value of the field.\n */\n max: {\n type: Number,\n },\n\n /**\n * Specifies the allowed number intervals of the field.\n * @type {number}\n */\n step: {\n type: Number,\n },\n\n /**\n * Set to true to show increase/decrease buttons.\n * @attr {boolean} step-buttons-visible\n */\n stepButtonsVisible: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n },\n };\n }\n\n static get observers() {\n return ['_stepChanged(step, inputElement)'];\n }\n\n static get delegateProps() {\n return [...super.delegateProps, 'min', 'max'];\n }\n\n static get constraints() {\n return [...super.constraints, 'min', 'max', 'step'];\n }\n\n constructor() {\n super();\n this._setType('number');\n this.__onWheel = this.__onWheel.bind(this);\n }\n\n /** @protected */\n get slotStyles() {\n const tag = this.localName;\n return [\n `\n ${tag} input[type=\"number\"]::-webkit-outer-spin-button,\n ${tag} input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n ${tag} input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n ${tag}[dir='rtl'] input[type=\"number\"]::placeholder {\n direction: rtl;\n }\n\n ${tag}[dir='rtl']:not([step-buttons-visible]) input[type=\"number\"]::placeholder {\n text-align: left;\n }\n `,\n ];\n }\n\n /**\n * Used by `InputControlMixin` as a reference to the clear button element.\n * @protected\n */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /**\n * Whether the input element's value is unparsable.\n *\n * @private\n */\n get __hasUnparsableValue() {\n return this.inputElement.validity.badInput;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n\n /**\n * Override the method from `InputConstraintsMixin`\n * to enforce HTML constraint validation even if\n * the user didn't add any constraints explicitly:\n * the field has to be regardless checked for bad input.\n *\n * @override\n */\n checkValidity() {\n if (this.inputElement) {\n return this.inputElement.checkValidity();\n }\n\n return !this.invalid;\n }\n\n /**\n * Override the method from `InputMixin` to add\n * a wheel event listener to the input element.\n *\n * @param {HTMLElement} input\n * @override\n * @protected\n */\n _addInputListeners(input) {\n super._addInputListeners(input);\n input.addEventListener('wheel', this.__onWheel);\n }\n\n /**\n * Override the method from `InputMixin` to remove\n * the wheel event listener from the input element.\n *\n * @param {HTMLElement} input\n * @override\n * @protected\n */\n _removeInputListeners(input) {\n super._removeInputListeners(input);\n input.removeEventListener('wheel', this.__onWheel);\n }\n\n /**\n * Prevents default browser behavior for wheel events on the input element\n * when it's focused. More precisely, this prevents the browser from attempting\n * to increment or decrement the value when the mouse wheel is used within\n * the input element.\n *\n * CAVEAT: As a side-effect, this also prevents page scrolling when\n * the pointer is positioned over the field and the field is focused.\n *\n * @param {WheelEvent} event\n * @private\n */\n __onWheel(event) {\n if (this.hasAttribute('focused')) {\n event.preventDefault();\n }\n }\n\n /** @protected */\n _onDecreaseButtonTouchend(e) {\n // Cancel the following click and focus events. If the event is not cancelable,\n // it means scrolling is in progress, therefore we shouldn't update field value.\n if (e.cancelable) {\n e.preventDefault();\n this._decreaseValue();\n }\n }\n\n /** @protected */\n _onIncreaseButtonTouchend(e) {\n // Cancel the following click and focus events. If the event is not cancelable,\n // it means scrolling is in progress, therefore we shouldn't update field value.\n if (e.cancelable) {\n e.preventDefault();\n this._increaseValue();\n }\n }\n\n /** @protected */\n _onDecreaseButtonClick() {\n this._decreaseValue();\n }\n\n /** @protected */\n _onIncreaseButtonClick() {\n this._increaseValue();\n }\n\n /** @private */\n _decreaseValue() {\n this._incrementValue(-1);\n }\n\n /** @private */\n _increaseValue() {\n this._incrementValue(1);\n }\n\n /** @private */\n _incrementValue(incr) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const step = this.step || 1;\n let value = parseFloat(this.value);\n\n if (!this.value) {\n if ((this.min === 0 && incr < 0) || (this.max === 0 && incr > 0) || (this.max === 0 && this.min === 0)) {\n incr = 0;\n value = 0;\n } else if ((this.max == null || this.max >= 0) && (this.min == null || this.min <= 0)) {\n value = 0;\n } else if (this.min > 0) {\n value = this.min;\n if (this.max < 0 && incr < 0) {\n value = this.max;\n }\n incr = 0;\n } else if (this.max < 0) {\n value = this.max;\n if (incr < 0) {\n incr = 0;\n } else if (this._getIncrement(1, value - step) > this.max) {\n value -= 2 * step;\n // FIXME(yuriy): find a proper solution to make correct step back\n } else {\n value -= step;\n }\n }\n } else if (value < this.min) {\n incr = 0;\n value = this.min;\n } else if (value > this.max) {\n incr = 0;\n value = this.max;\n }\n\n const newValue = this._getIncrement(incr, value);\n if (!this.value || incr === 0 || this._incrementIsInsideTheLimits(incr, value)) {\n this.inputElement.value = String(parseFloat(newValue));\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n this.__commitValueChange();\n }\n }\n\n /** @private */\n _getIncrement(incr, currentValue) {\n let step = this.step || 1,\n min = this.min || 0;\n\n // To avoid problems with decimal math, multiplying to operate with integers.\n const multiplier = Math.max(\n this._getMultiplier(currentValue),\n this._getMultiplier(step),\n this._getMultiplier(min),\n );\n\n step *= multiplier;\n currentValue = Math.round(currentValue * multiplier);\n min *= multiplier;\n\n const margin = (currentValue - min) % step;\n\n if (incr > 0) {\n return (currentValue - margin + step) / multiplier;\n } else if (incr < 0) {\n return (currentValue - (margin || step)) / multiplier;\n }\n return currentValue / multiplier;\n }\n\n /** @private */\n _getDecimalCount(number) {\n const s = String(number);\n const i = s.indexOf('.');\n return i === -1 ? 1 : s.length - i - 1;\n }\n\n /** @private */\n _getMultiplier(number) {\n if (!isNaN(number)) {\n return 10 ** this._getDecimalCount(number);\n }\n }\n\n /** @private */\n _incrementIsInsideTheLimits(incr, value) {\n if (incr < 0) {\n return this.min == null || this._getIncrement(incr, value) >= this.min;\n } else if (incr > 0) {\n return this.max == null || this._getIncrement(incr, value) <= this.max;\n }\n return this._getIncrement(incr, value) <= this.max && this._getIncrement(incr, value) >= this.min;\n }\n\n /** @protected */\n _isButtonEnabled(sign) {\n const incr = sign * (this.step || 1);\n const value = parseFloat(this.value);\n return !this.value || (!this.disabled && this._incrementIsInsideTheLimits(incr, value));\n }\n\n /**\n * @param {number} step\n * @param {HTMLElement | undefined} inputElement\n * @protected\n */\n _stepChanged(step, inputElement) {\n if (inputElement) {\n inputElement.step = step || 'any';\n }\n }\n\n /**\n * @param {unknown} newVal\n * @param {unknown} oldVal\n * @protected\n * @override\n */\n _valueChanged(newVal, oldVal) {\n // Validate value to be numeric\n if (newVal && isNaN(parseFloat(newVal))) {\n this.value = '';\n } else if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n super._valueChanged(this.value, oldVal);\n\n if (!this.__keepCommittedValue) {\n this.__committedValue = this.value;\n this.__committedUnparsableValueStatus = false;\n }\n }\n\n /**\n * Override an event listener from `InputControlMixin`\n * to avoid adding a separate listener.\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n this._increaseValue();\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n this._decreaseValue();\n }\n\n super._onKeyDown(event);\n }\n\n /**\n * Native [type=number] inputs don't update their value\n * when you are entering input that the browser is unable to parse\n * e.g. \"--5\", hence we have to override this method from `InputMixin`\n * so that, when value is empty, it would additionally check\n * for bad input based on the native `validity.badInput` property.\n *\n * @param {InputEvent} event\n * @protected\n * @override\n */\n _setHasInputValue(event) {\n const target = event.composedPath()[0];\n this._hasInputValue = target.value.length > 0 || this.__hasUnparsableValue;\n }\n\n /**\n * Override this method from `InputMixin` to prevent\n * the value change caused by user input from being treated\n * as initiated programmatically by the developer and therefore\n * from getting silently committed by the value observer without\n * any change event. The value change will be committed later\n * on blur or Enter.\n *\n * @param {InputEvent} event\n * @override\n * @protected\n */\n _onInput(event) {\n this.__keepCommittedValue = true;\n super._onInput(event);\n this.__keepCommittedValue = false;\n }\n\n /**\n * Override this method from `InputControlMixin`\n * to stop propagation of the native change event.\n *\n * @param {Event}\n * @override\n * @protected\n */\n _onChange(event) {\n event.stopPropagation();\n }\n\n /**\n * Override this method from `ClearButtonMixin`\n * to properly commit the empty value since\n * the change handler doesn't do that anymore.\n *\n * @param {MouseEvent} event\n * @override\n * @protected\n */\n _onClearAction(event) {\n super._onClearAction(event);\n this.__commitValueChange();\n }\n\n /**\n * Override this method from `FocusMixin`\n * to commit a possible pending value change on blur.\n *\n * @param {boolean} focused\n * @override\n * @protected\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n if (!focused) {\n this.__commitValueChange();\n }\n }\n\n /**\n * Override this method from `KeyboardMixin`\n * to commit a possible pending value change on Enter.\n *\n * @param {KeyboardEvent} event\n * @override\n * @protected\n */\n _onEnter(event) {\n super._onEnter(event);\n this.__commitValueChange();\n }\n\n /**\n * Depending on the nature of the value change that has occurred since\n * the last commit attempt, triggers validation and fires an event:\n *\n * Value change | Event\n * :------------------------|:------------------\n * empty => parsable | change\n * empty => unparsable | unparsable-change\n * parsable => empty | change\n * parsable => parsable | change\n * parsable => unparsable | change\n * unparsable => empty | unparsable-change\n * unparsable => parsable | change\n * unparsable => unparsable | -\n *\n * Note, there is currently no way to detect unparsable => unparsable changes\n * because the browser doesn't provide access to unparsable values of native\n * [type=number] inputs.\n *\n * @private\n */\n __commitValueChange() {\n if (this.__committedValue !== this.value) {\n this.validate();\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }));\n } else if (this.__committedUnparsableValueStatus !== this.__hasUnparsableValue) {\n this.validate();\n this.dispatchEvent(new CustomEvent('unparsable-change'));\n }\n\n this.__committedValue = this.value;\n this.__committedUnparsableValueStatus = this.__hasUnparsableValue;\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const numberFieldStyles = css`\n :host([readonly]) [part$='button'] {\n pointer-events: none;\n }\n\n [part='decrease-button']::before {\n content: '\\\\2212';\n }\n\n [part='increase-button']::before {\n content: '+';\n }\n\n [part='decrease-button'],\n [part='increase-button'] {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { NumberFieldMixin } from './vaadin-number-field-mixin.js';\nimport { numberFieldStyles } from './vaadin-number-field-styles.js';\n\nregisterStyles('vaadin-number-field', [inputFieldShared, numberFieldStyles], {\n moduleId: 'vaadin-number-field-styles',\n});\n\n/**\n * `<vaadin-number-field>` is an input field web component that only accepts numeric input.\n *\n * ```html\n * <vaadin-number-field label=\"Balance\"></vaadin-number-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-number-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n *\n * Part name | Description\n * ------------------|-------------------------\n * `increase-button` | Increase (\"plus\") button\n * `decrease-button` | Decrease (\"minus\") button\n *\n * Note, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * ### Change events\n *\n * Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\n * the component can fire either a `change` event or an `unparsable-change` event:\n *\n * Value change | Event\n * :------------------------|:------------------\n * empty => parsable | change\n * empty => unparsable | unparsable-change\n * parsable => empty | change\n * parsable => parsable | change\n * parsable => unparsable | change\n * unparsable => empty | unparsable-change\n * unparsable => parsable | change\n * unparsable => unparsable | -\n *\n * Note, there is currently no way to detect unparsable => unparsable changes because the browser\n * doesn't provide access to unparsable values of native [type=number] inputs.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {Event} unparsable-change - Fired when the user commits an unparsable value change and there is no change event.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes NumberFieldMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nexport class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-number-field';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <div\n disabled$=\"[[!_isButtonEnabled(-1, value, min, max, step)]]\"\n part=\"decrease-button\"\n on-click=\"_onDecreaseButtonClick\"\n on-touchend=\"_onDecreaseButtonTouchend\"\n hidden$=\"[[!stepButtonsVisible]]\"\n aria-hidden=\"true\"\n slot=\"prefix\"\n ></div>\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n <div\n disabled$=\"[[!_isButtonEnabled(1, value, min, max, step)]]\"\n part=\"increase-button\"\n on-click=\"_onIncreaseButtonClick\"\n on-touchend=\"_onIncreaseButtonTouchend\"\n hidden$=\"[[!stepButtonsVisible]]\"\n aria-hidden=\"true\"\n slot=\"suffix\"\n ></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n }\n}\n\ndefineCustomElement(NumberField);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n"],"names":["numberField","moduleId","NumberFieldMixin","superClass","properties","min","type","Number","max","step","stepButtonsVisible","Boolean","value","reflectToAttribute","observers","delegateProps","super","constraints","constructor","this","_setType","__onWheel","bind","slotStyles","tag","localName","clearElement","$","clearButton","__hasUnparsableValue","inputElement","validity","badInput","ready","addController","input","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","checkValidity","invalid","_addInputListeners","addEventListener","_removeInputListeners","removeEventListener","event","hasAttribute","preventDefault","_onDecreaseButtonTouchend","e","cancelable","_decreaseValue","_onIncreaseButtonTouchend","_increaseValue","_onDecreaseButtonClick","_onIncreaseButtonClick","_incrementValue","incr","disabled","readonly","parseFloat","_getIncrement","newValue","_incrementIsInsideTheLimits","String","dispatchEvent","Event","bubbles","composed","__commitValueChange","currentValue","multiplier","Math","_getMultiplier","margin","round","_getDecimalCount","number","s","i","indexOf","length","isNaN","_isButtonEnabled","sign","_stepChanged","_valueChanged","newVal","oldVal","__keepCommittedValue","__committedValue","__committedUnparsableValueStatus","_onKeyDown","key","_setHasInputValue","target","composedPath","_hasInputValue","_onInput","_onChange","stopPropagation","_onClearAction","_setFocused","focused","_onEnter","validate","CustomEvent","numberFieldStyles","NumberField","is","template","_tooltipController","setPosition","setAriaTarget","InputController","host","callback","initializer","node","setAttribute","id","defaultId","useUniqueId","InputFieldMixin","superclass","autocomplete","autocorrect","autocapitalize","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","document","hasFocus","oldValue","undefined"],"sourceRoot":""}
1
+ {"version":3,"file":"5648.js","mappings":";qMAWA,MAAMA,EAAc,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCvB,QAAe,sBAAuB,CAAC,IAAkB,IAAaA,GAAc,CAClFC,SAAU,sB,qGCnCL,MAAMC,EAAoBC,GAC/B,eAAoC,OAAgBA,IAClD,qBAAWC,GACT,MAAO,CAILC,IAAK,CACHC,KAAMC,QAMRC,IAAK,CACHF,KAAMC,QAORE,KAAM,CACJH,KAAMC,QAORG,mBAAoB,CAClBJ,KAAMK,QACNC,OAAO,EACPC,oBAAoB,GAG1B,CAEA,oBAAWC,GACT,MAAO,CAAC,mCACV,CAEA,wBAAWC,GACT,MAAO,IAAIC,MAAMD,cAAe,MAAO,MACzC,CAEA,sBAAWE,GACT,MAAO,IAAID,MAAMC,YAAa,MAAO,MAAO,OAC9C,CAEA,WAAAC,GACEF,QACAG,KAAKC,SAAS,UACdD,KAAKE,UAAYF,KAAKE,UAAUC,KAAKH,KACvC,CAGA,cAAII,GACF,MAAMC,EAAML,KAAKM,UACjB,MAAO,CACL,eACID,iEACAA,gJAKAA,+FAIAA,2GAIAA,qIAK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MC,GAChBtG,MAAMqG,EAAM,QAAS,QAAS,CAC5BE,YAAa,CAACC,EAAMH,KACdA,EAAKzG,QACP4G,EAAK5G,MAAQyG,EAAKzG,OAEhByG,EAAK/G,MACPkH,EAAKC,aAAa,OAAQJ,EAAK/G,MAIjCkH,EAAKE,GAAKvG,KAAKwG,UAES,mBAAbL,GACTA,EAASE,IAGbI,aAAa,GAEjB,E,kDCjBK,MAAMC,EAAmBC,GAC9B,eAAmC,OAAkBA,IACnD,qBAAW1H,GACT,MAAO,CAML2H,aAAc,CACZzH,KAAM4D,QAUR8D,YAAa,CACX1H,KAAM4D,QAYR+D,eAAgB,CACd3H,KAAM4D,OACNrD,oBAAoB,GAG1B,CAEA,wBAAWqH,GACT,MAAO,IAAIlH,MAAMkH,cAAe,iBAAkB,eAAgB,cACpE,CAGA,UAAIC,GACF,OAAOhH,KAAKiH,aAAe,CAAC,CAC9B,CAEA,UAAID,CAAOvH,GACTO,KAAKiH,YAAcxH,CACrB,CAOA,oBAAAyH,CAAqBlG,GACnBnB,MAAMqH,qBAAqBlG,GAEvBA,IAEEA,EAAMvB,OAASuB,EAAMvB,QAAUO,KAAKP,QACtC0H,QAAQC,KAAK,+BAA+BpH,KAAKM,yBACjDU,EAAMvB,MAAQ,IAGZO,KAAKP,QACPuB,EAAMvB,MAAQO,KAAKP,OAGzB,CAQA,WAAA4F,CAAYC,GACVzF,MAAMwF,YAAYC,IAIbA,GAAW+B,SAASC,YACvBtH,KAAKwF,UAET,CASA,QAAAP,CAASrD,GACP/B,MAAMoF,SAASrD,GAEX5B,KAAKuB,SACPvB,KAAKwF,UAET,CAWA,aAAAnB,CAAcxB,EAAU0E,GACtB1H,MAAMwE,cAAcxB,EAAU0E,QAEbC,IAAbD,GAIAvH,KAAKuB,SACPvB,KAAKwF,UAET,E","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/theme/lumo/vaadin-number-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/src/vaadin-number-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/src/vaadin-number-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/number-field/src/vaadin-number-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport { fieldButton } from '@vaadin/vaadin-lumo-styles/mixins/field-button.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst numberField = css`\n :host([step-buttons-visible]:not([theme~='align-right'])) ::slotted(input) {\n text-align: center;\n }\n\n [part$='button'][disabled] {\n opacity: 0.2;\n }\n\n :host([step-buttons-visible]) [part='input-field'] {\n padding: 0;\n }\n\n [part\\$='button'] {\n cursor: pointer;\n font-size: var(--lumo-icon-size-s);\n width: 1.6em;\n height: 1.6em;\n }\n\n [part\\$='button']::before {\n margin-top: 0.3em;\n }\n\n [part='decrease-button']::before {\n content: var(--lumo-icons-minus);\n }\n\n [part='increase-button']::before {\n content: var(--lumo-icons-plus);\n }\n\n /* RTL specific styles */\n :host([dir='rtl']:not([theme~='align-right'])) ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n`;\n\nregisterStyles('vaadin-number-field', [inputFieldShared, fieldButton, numberField], {\n moduleId: 'lumo-number-field',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common number field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const NumberFieldMixin = (superClass) =>\n class NumberFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * The minimum value of the field.\n */\n min: {\n type: Number,\n },\n\n /**\n * The maximum value of the field.\n */\n max: {\n type: Number,\n },\n\n /**\n * Specifies the allowed number intervals of the field.\n * @type {number}\n */\n step: {\n type: Number,\n },\n\n /**\n * Set to true to show increase/decrease buttons.\n * @attr {boolean} step-buttons-visible\n */\n stepButtonsVisible: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n },\n };\n }\n\n static get observers() {\n return ['_stepChanged(step, inputElement)'];\n }\n\n static get delegateProps() {\n return [...super.delegateProps, 'min', 'max'];\n }\n\n static get constraints() {\n return [...super.constraints, 'min', 'max', 'step'];\n }\n\n constructor() {\n super();\n this._setType('number');\n this.__onWheel = this.__onWheel.bind(this);\n }\n\n /** @protected */\n get slotStyles() {\n const tag = this.localName;\n return [\n `\n ${tag} input[type=\"number\"]::-webkit-outer-spin-button,\n ${tag} input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n ${tag} input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n ${tag}[dir='rtl'] input[type=\"number\"]::placeholder {\n direction: rtl;\n }\n\n ${tag}[dir='rtl']:not([step-buttons-visible]) input[type=\"number\"]::placeholder {\n text-align: left;\n }\n `,\n ];\n }\n\n /**\n * Used by `InputControlMixin` as a reference to the clear button element.\n * @protected\n */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /**\n * Whether the input element's value is unparsable.\n *\n * @private\n */\n get __hasUnparsableValue() {\n return this.inputElement.validity.badInput;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n\n /**\n * Override the method from `InputConstraintsMixin`\n * to enforce HTML constraint validation even if\n * the user didn't add any constraints explicitly:\n * the field has to be regardless checked for bad input.\n *\n * @override\n */\n checkValidity() {\n if (this.inputElement) {\n return this.inputElement.checkValidity();\n }\n\n return !this.invalid;\n }\n\n /**\n * Override the method from `InputMixin` to add\n * a wheel event listener to the input element.\n *\n * @param {HTMLElement} input\n * @override\n * @protected\n */\n _addInputListeners(input) {\n super._addInputListeners(input);\n input.addEventListener('wheel', this.__onWheel);\n }\n\n /**\n * Override the method from `InputMixin` to remove\n * the wheel event listener from the input element.\n *\n * @param {HTMLElement} input\n * @override\n * @protected\n */\n _removeInputListeners(input) {\n super._removeInputListeners(input);\n input.removeEventListener('wheel', this.__onWheel);\n }\n\n /**\n * Prevents default browser behavior for wheel events on the input element\n * when it's focused. More precisely, this prevents the browser from attempting\n * to increment or decrement the value when the mouse wheel is used within\n * the input element.\n *\n * CAVEAT: As a side-effect, this also prevents page scrolling when\n * the pointer is positioned over the field and the field is focused.\n *\n * @param {WheelEvent} event\n * @private\n */\n __onWheel(event) {\n if (this.hasAttribute('focused')) {\n event.preventDefault();\n }\n }\n\n /** @protected */\n _onDecreaseButtonTouchend(e) {\n // Cancel the following click and focus events. If the event is not cancelable,\n // it means scrolling is in progress, therefore we shouldn't update field value.\n if (e.cancelable) {\n e.preventDefault();\n this._decreaseValue();\n }\n }\n\n /** @protected */\n _onIncreaseButtonTouchend(e) {\n // Cancel the following click and focus events. If the event is not cancelable,\n // it means scrolling is in progress, therefore we shouldn't update field value.\n if (e.cancelable) {\n e.preventDefault();\n this._increaseValue();\n }\n }\n\n /** @protected */\n _onDecreaseButtonClick() {\n this._decreaseValue();\n }\n\n /** @protected */\n _onIncreaseButtonClick() {\n this._increaseValue();\n }\n\n /** @private */\n _decreaseValue() {\n this._incrementValue(-1);\n }\n\n /** @private */\n _increaseValue() {\n this._incrementValue(1);\n }\n\n /** @private */\n _incrementValue(incr) {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const step = this.step || 1;\n let value = parseFloat(this.value);\n\n if (!this.value) {\n if ((this.min === 0 && incr < 0) || (this.max === 0 && incr > 0) || (this.max === 0 && this.min === 0)) {\n incr = 0;\n value = 0;\n } else if ((this.max == null || this.max >= 0) && (this.min == null || this.min <= 0)) {\n value = 0;\n } else if (this.min > 0) {\n value = this.min;\n if (this.max < 0 && incr < 0) {\n value = this.max;\n }\n incr = 0;\n } else if (this.max < 0) {\n value = this.max;\n if (incr < 0) {\n incr = 0;\n } else if (this._getIncrement(1, value - step) > this.max) {\n value -= 2 * step;\n // FIXME(yuriy): find a proper solution to make correct step back\n } else {\n value -= step;\n }\n }\n } else if (value < this.min) {\n incr = 0;\n value = this.min;\n } else if (value > this.max) {\n incr = 0;\n value = this.max;\n }\n\n const newValue = this._getIncrement(incr, value);\n if (!this.value || incr === 0 || this._incrementIsInsideTheLimits(incr, value)) {\n this.inputElement.value = String(parseFloat(newValue));\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n this.__commitValueChange();\n }\n }\n\n /** @private */\n _getIncrement(incr, currentValue) {\n let step = this.step || 1,\n min = this.min || 0;\n\n // To avoid problems with decimal math, multiplying to operate with integers.\n const multiplier = Math.max(\n this._getMultiplier(currentValue),\n this._getMultiplier(step),\n this._getMultiplier(min),\n );\n\n step *= multiplier;\n currentValue = Math.round(currentValue * multiplier);\n min *= multiplier;\n\n const margin = (currentValue - min) % step;\n\n if (incr > 0) {\n return (currentValue - margin + step) / multiplier;\n } else if (incr < 0) {\n return (currentValue - (margin || step)) / multiplier;\n }\n return currentValue / multiplier;\n }\n\n /** @private */\n _getDecimalCount(number) {\n const s = String(number);\n const i = s.indexOf('.');\n return i === -1 ? 1 : s.length - i - 1;\n }\n\n /** @private */\n _getMultiplier(number) {\n if (!isNaN(number)) {\n return 10 ** this._getDecimalCount(number);\n }\n }\n\n /** @private */\n _incrementIsInsideTheLimits(incr, value) {\n if (incr < 0) {\n return this.min == null || this._getIncrement(incr, value) >= this.min;\n } else if (incr > 0) {\n return this.max == null || this._getIncrement(incr, value) <= this.max;\n }\n return this._getIncrement(incr, value) <= this.max && this._getIncrement(incr, value) >= this.min;\n }\n\n /** @protected */\n _isButtonEnabled(sign) {\n const incr = sign * (this.step || 1);\n const value = parseFloat(this.value);\n return !this.value || (!this.disabled && this._incrementIsInsideTheLimits(incr, value));\n }\n\n /**\n * @param {number} step\n * @param {HTMLElement | undefined} inputElement\n * @protected\n */\n _stepChanged(step, inputElement) {\n if (inputElement) {\n inputElement.step = step || 'any';\n }\n }\n\n /**\n * @param {unknown} newVal\n * @param {unknown} oldVal\n * @protected\n * @override\n */\n _valueChanged(newVal, oldVal) {\n // Validate value to be numeric\n if (newVal && isNaN(parseFloat(newVal))) {\n this.value = '';\n } else if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n super._valueChanged(this.value, oldVal);\n\n if (!this.__keepCommittedValue) {\n this.__committedValue = this.value;\n this.__committedUnparsableValueStatus = false;\n }\n }\n\n /**\n * Override an event listener from `InputControlMixin`\n * to avoid adding a separate listener.\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n this._increaseValue();\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n this._decreaseValue();\n }\n\n super._onKeyDown(event);\n }\n\n /**\n * Native [type=number] inputs don't update their value\n * when you are entering input that the browser is unable to parse\n * e.g. \"--5\", hence we have to override this method from `InputMixin`\n * so that, when value is empty, it would additionally check\n * for bad input based on the native `validity.badInput` property.\n *\n * @param {InputEvent} event\n * @protected\n * @override\n */\n _setHasInputValue(event) {\n const target = event.composedPath()[0];\n this._hasInputValue = target.value.length > 0 || this.__hasUnparsableValue;\n }\n\n /**\n * Override this method from `InputMixin` to prevent\n * the value change caused by user input from being treated\n * as initiated programmatically by the developer and therefore\n * from getting silently committed by the value observer without\n * any change event. The value change will be committed later\n * on blur or Enter.\n *\n * @param {InputEvent} event\n * @override\n * @protected\n */\n _onInput(event) {\n this.__keepCommittedValue = true;\n super._onInput(event);\n this.__keepCommittedValue = false;\n }\n\n /**\n * Override this method from `InputControlMixin`\n * to stop propagation of the native change event.\n *\n * @param {Event}\n * @override\n * @protected\n */\n _onChange(event) {\n event.stopPropagation();\n }\n\n /**\n * Override this method from `ClearButtonMixin`\n * to properly commit the empty value since\n * the change handler doesn't do that anymore.\n *\n * @param {MouseEvent} event\n * @override\n * @protected\n */\n _onClearAction(event) {\n super._onClearAction(event);\n this.__commitValueChange();\n }\n\n /**\n * Override this method from `FocusMixin`\n * to commit a possible pending value change on blur.\n *\n * @param {boolean} focused\n * @override\n * @protected\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n if (!focused) {\n this.__commitValueChange();\n }\n }\n\n /**\n * Override this method from `KeyboardMixin`\n * to commit a possible pending value change on Enter.\n *\n * @param {KeyboardEvent} event\n * @override\n * @protected\n */\n _onEnter(event) {\n super._onEnter(event);\n this.__commitValueChange();\n }\n\n /**\n * Depending on the nature of the value change that has occurred since\n * the last commit attempt, triggers validation and fires an event:\n *\n * Value change | Event\n * :------------------------|:------------------\n * empty => parsable | change\n * empty => unparsable | unparsable-change\n * parsable => empty | change\n * parsable => parsable | change\n * parsable => unparsable | change\n * unparsable => empty | unparsable-change\n * unparsable => parsable | change\n * unparsable => unparsable | -\n *\n * Note, there is currently no way to detect unparsable => unparsable changes\n * because the browser doesn't provide access to unparsable values of native\n * [type=number] inputs.\n *\n * @private\n */\n __commitValueChange() {\n if (this.__committedValue !== this.value) {\n this.validate();\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }));\n } else if (this.__committedUnparsableValueStatus !== this.__hasUnparsableValue) {\n this.validate();\n this.dispatchEvent(new CustomEvent('unparsable-change'));\n }\n\n this.__committedValue = this.value;\n this.__committedUnparsableValueStatus = this.__hasUnparsableValue;\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const numberFieldStyles = css`\n :host([readonly]) [part$='button'] {\n pointer-events: none;\n }\n\n [part='decrease-button']::before {\n content: '\\\\2212';\n }\n\n [part='increase-button']::before {\n content: '+';\n }\n\n [part='decrease-button'],\n [part='increase-button'] {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { NumberFieldMixin } from './vaadin-number-field-mixin.js';\nimport { numberFieldStyles } from './vaadin-number-field-styles.js';\n\nregisterStyles('vaadin-number-field', [inputFieldShared, numberFieldStyles], {\n moduleId: 'vaadin-number-field-styles',\n});\n\n/**\n * `<vaadin-number-field>` is an input field web component that only accepts numeric input.\n *\n * ```html\n * <vaadin-number-field label=\"Balance\"></vaadin-number-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-number-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n *\n * Part name | Description\n * ------------------|-------------------------\n * `increase-button` | Increase (\"plus\") button\n * `decrease-button` | Decrease (\"minus\") button\n *\n * Note, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * ### Change events\n *\n * Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\n * the component can fire either a `change` event or an `unparsable-change` event:\n *\n * Value change | Event\n * :------------------------|:------------------\n * empty => parsable | change\n * empty => unparsable | unparsable-change\n * parsable => empty | change\n * parsable => parsable | change\n * parsable => unparsable | change\n * unparsable => empty | unparsable-change\n * unparsable => parsable | change\n * unparsable => unparsable | -\n *\n * Note, there is currently no way to detect unparsable => unparsable changes because the browser\n * doesn't provide access to unparsable values of native [type=number] inputs.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {Event} unparsable-change - Fired when the user commits an unparsable value change and there is no change event.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes NumberFieldMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nexport class NumberField extends NumberFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-number-field';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <div\n disabled$=\"[[!_isButtonEnabled(-1, value, min, max, step)]]\"\n part=\"decrease-button\"\n on-click=\"_onDecreaseButtonClick\"\n on-touchend=\"_onDecreaseButtonTouchend\"\n hidden$=\"[[!stepButtonsVisible]]\"\n aria-hidden=\"true\"\n slot=\"prefix\"\n ></div>\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n <div\n disabled$=\"[[!_isButtonEnabled(1, value, min, max, step)]]\"\n part=\"increase-button\"\n on-click=\"_onIncreaseButtonClick\"\n on-touchend=\"_onIncreaseButtonTouchend\"\n hidden$=\"[[!stepButtonsVisible]]\"\n aria-hidden=\"true\"\n slot=\"suffix\"\n ></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n }\n}\n\ndefineCustomElement(NumberField);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n"],"names":["numberField","moduleId","NumberFieldMixin","superClass","properties","min","type","Number","max","step","stepButtonsVisible","Boolean","value","reflectToAttribute","observers","delegateProps","super","constraints","constructor","this","_setType","__onWheel","bind","slotStyles","tag","localName","clearElement","$","clearButton","__hasUnparsableValue","inputElement","validity","badInput","ready","addController","input","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","checkValidity","invalid","_addInputListeners","addEventListener","_removeInputListeners","removeEventListener","event","hasAttribute","preventDefault","_onDecreaseButtonTouchend","e","cancelable","_decreaseValue","_onIncreaseButtonTouchend","_increaseValue","_onDecreaseButtonClick","_onIncreaseButtonClick","_incrementValue","incr","disabled","readonly","parseFloat","_getIncrement","newValue","_incrementIsInsideTheLimits","String","dispatchEvent","Event","bubbles","composed","__commitValueChange","currentValue","multiplier","Math","_getMultiplier","margin","round","_getDecimalCount","number","s","i","indexOf","length","isNaN","_isButtonEnabled","sign","_stepChanged","_valueChanged","newVal","oldVal","__keepCommittedValue","__committedValue","__committedUnparsableValueStatus","_onKeyDown","key","_setHasInputValue","target","composedPath","_hasInputValue","_onInput","_onChange","stopPropagation","_onClearAction","_setFocused","focused","_onEnter","validate","CustomEvent","numberFieldStyles","NumberField","is","template","_tooltipController","setPosition","setAriaTarget","InputController","host","callback","initializer","node","setAttribute","id","defaultId","useUniqueId","InputFieldMixin","superclass","autocomplete","autocorrect","autocapitalize","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","document","hasFocus","oldValue","undefined"],"sourceRoot":""}
package/dist/umd/8961.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8961],{1160:(t,e,s)=>{s.d(e,{t:()=>o});var r=s(72270),i=s(63200),n=s(25964),a=s(50336);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,r.qu)({componentName:t,baseSelector:e})){#t=a.r.bind(this,"blur");#e=a.r.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<${e}>\n\t\t\t${s.map(t=>`<slot ${t?`name="${t}" slot="${t}"`:""}></slot>`).join("")}\n\t\t\t</${e}>\n\t\t`,(0,n.fz)(((0,i.Tn)(o)?o():o)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",t=>{this.#t()}),this.baseElement.addEventListener("focus",t=>{this.#e()}),(0,n.q)(this.baseElement,this,c),(0,n.Gh)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},1317:(t,e,s)=>{s.d(e,{_:()=>i});var r=s(50336);const i=t=>class extends t{#s=r.r.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",t=>{t.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)})}}},3563:(t,e,s)=>{s(63200),s(22515),s(11430),s(34797),s(25964)},4430:(t,e,s)=>{s.d(e,{X:()=>n}),s(42672);const r=["required","pattern"],i=Symbol("validationTarget"),n=t=>class extends t{#r=i;static get observedAttributes(){return[...t.observedAttributes||[],...r]}static get formAssociated(){return!0}#i;get internals(){return this.#i}set internals(t){this.#i=t}constructor(){super(),this.#i=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(t,e){return this.hasAttribute(t)?this.getAttribute(t)||" ":e}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:r,stepMismatch:i,tooShort:n,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case s||i||h:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case r:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case a:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case o:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#n(){const t=this.isReadOnly?{}:this.getValidity();this.#i.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#i.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#i.validity.valid}reportValidity(){return this.#i.reportValidity()}get validity(){return this.#i.validity}get validationTarget(){return this.#r===i?this.inputElement:this.#r}set validationTarget(t){this.#r=t}setCustomValidity(t){t?this.#i.setValidity({customError:!0},t,this.validationTarget):(this.#i.setValidity({}),this.#n())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#i.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),r.includes(t)&&this.#n()}init(){super.init?.(),this.addEventListener("change",this.#n),this.addEventListener("invalid",t=>t.stopPropagation()),this.addEventListener("input",this.#n),setTimeout(()=>this.#n())}}},11430:(t,e,s)=>{s.d(e,{V:()=>i});var r=s(25964);const i=t=>class extends t{constructor(){super(),(0,r.fz)(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}}),super.init?.()}}},11501:(t,e,s)=>{s.d(e,{m:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}}},19852:(t,e,s)=>{s(25964)},22515:(t,e,s)=>{s.d(e,{R:()=>l});var r=s(69591),i=s(63200),n=s(25964),a=s(79673),o=s(83538);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class e extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SR)(l,{...t})}}#a;#o;#l;#h;#c;#u;#d;#m;#p;constructor({getRootElement:t,componentNameSuffix:s="",themeSection:n=r.IM,baseSelector:a}={}){super(),this.#h=s,this.#c=n,this.#d=a??this.baseSelector,this.#p=t,this.#m=Object.keys(e.cssVarList).map(t=>(0,i.GL)("st",s,t))}get#g(){return a.br.currentTheme?.[l]||""}#b(){this.#o.replaceSync(this.#g[this.#c]),this.currentThemeName=a.br.currentThemeName,this.onThemeChange?.(a.br.currentThemeName)}#E(){this.#o=(0,n.fz)("",this.#u,{prepend:!0}),this.#l=a.br.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){let t=(0,o.AM)(l,r.aE);const e=this.getAttribute("id");e&&(t+=`#${CSS.escape(e)}`),this.#a=(0,n.fz)(`:host(${t}) {}`,this.#u)}}#f(t,e){const s=this.#a.cssRules[0].style;if(!s)return;const r=(0,n.Ix)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(r,e):(s?.removeProperty(r),this.removeAttribute(t))}#y(t=[]){t.forEach(t=>{this.#m.includes(t)&&this.#f(t,this.getAttribute(t))})}#A(){if(Object.keys(t).length){const e=(0,o._r)((0,i.GL)(l,this.#h),this.#d,t);(0,n.fz)(e,this.#u,{prepend:!0})}}#C(t){(this.#u.classList||this.#u.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#u=await(this.#p?.(this))||this.shadowRoot,this.#C(l),this.#A(),this.#E(),this.#v(),(0,n.mx)(this,this.#y.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},27754:(t,e,s)=>{s.d(e,{b:()=>r});const r=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},34797:(t,e,s)=>{s.d(e,{q:()=>l});var r=s(63200),i=s(61246),n=s(27754),a=s(11501),o=s(36745);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#S;#M=!0;get baseSelector(){return e}get baseElement(){return this.#S??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#S||console.warn("missing base element for component",this.localName),this.#S}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#M&&(this.#M=!1,this.init?.())}}return(0,r.Zz)(i.t,a.m,o.y,n.b)(s)}},36745:(t,e,s)=>{s.d(e,{y:()=>n});var r=s(25964);const i=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","collapsed"],n=t=>class extends t{init(){super.init?.(),(0,r.mx)(this,t=>t.forEach(t=>{const e=this.getAttribute(t);(t=>i.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}),{})}}},49449:(t,e,s)=>{s.d(e,{y:()=>h});var r=s(63200),i=s(1317),n=s(70962),a=s(4430),o=s(36745),l=s(34797);const h=(...t)=>(0,r.Zz)(a.X,i._,o.y,n.j)((0,l.q)(...t))},50336:(t,e,s)=>{function r(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{r:()=>r})},61246:(t,e,s)=>{s.d(e,{t:()=>r});const r=t=>class extends t{#w(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#w()}}},70962:(t,e,s)=>{s.d(e,{j:()=>i});var r=s(50336);const i=t=>class extends t{init(){this.#T(),super.init?.()}#T(){["blur","focus","focusin","focusout"].forEach(t=>{this.addEventListener(t,t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()})})}handleFocusEventsDispatching(t){let e;t?.forEach(t=>{t?.addEventListener("focusout",t=>{t.stopImmediatePropagation(),e=setTimeout(()=>{e=null,r.r.call(this,"blur"),r.r.call(this,"focusout",{bubbles:!0})})});const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(r.r.call(this,"focus"),r.r.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)})}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",e=>{this!==e.target&&(e.stopImmediatePropagation(),t!==this.value&&(t=this.value,r.r.call(this,"input",{bubbles:!0,composed:!0})))})}}},71209:(t,e,s)=>{s.d(e,{O:()=>u});var r=s(63200),i=s(25964),n=s(50336),a=s(4430),o=s(22515);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},c=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:r=[],proxyParentValidation:o=!1})=>c=>class extends((0,a.X)(c)){static get observedAttributes(){return[...c.observedAttributes||[],...l]}#R;#s=n.r.bind(this,"change");constructor(){super(),this.#R=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#R&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#R)return this.#R;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#R=h(t)||h(e),this.#R}set inputElement(t){this.#R=t}getValidity(){return this.inputElement?.validity||{}}#x(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#x(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),r.forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(s)?s:[s]).forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#x()})}),this.baseElement.addEventListener("change",()=>{this.#s()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#x()}),t.forEach(t=>{const s=this.querySelector('input[slot="external-input"]')||null,r=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const r=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){r.forEach(e=>{e[s]=t})},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...r],t)}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,i.EA)(this,this.inputElement,{includeAttrs:["inputmode"]})}),o){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...r)=>{if(3===r.length){const t=r.slice(0,r.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...r);return t[s](...r)}:"function"==typeof t[s]?(...r)=>(e.internals[s](...r),t[s](...r)):t[s]})}}},u=t=>(0,r.Zz)(c(t),(0,o.R)({componentNameOverride:(0,i.xE)("input-wrapper")}))},71887:(t,e,s)=>{s.d(e,{y:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",()=>this.removeAttribute("active"),{once:!0})})}}},72270:(t,e,s)=>{s.d(e,{OR:()=>n.O,h:()=>n.h,qu:()=>r.q,yc:()=>i.y});var r=s(34797),i=(s(3563),s(49449)),n=s(84548)},78968:(t,e,s)=>{s.d(e,{Jm:()=>h.J,OZ:()=>a.O,RF:()=>r.R,VO:()=>i.V,mA:()=>l.m,t$:()=>c.t,tQ:()=>o.t,tz:()=>n.t,y:()=>u.y});var r=s(22515),i=s(11430),n=s(1160),a=s(71209),o=s(61246),l=(s(4430),s(87503)),h=(s(36745),s(19852),s(83370)),c=s(84292),u=s(71887)},83370:(t,e,s)=>{s.d(e,{J:()=>r});const r=({connectorClasses:t})=>e=>class extends e{#V=t;static get observedAttributes(){return[...e.observedAttributes||[],"connector-template"]}get connectorClasses(){return this.#V}set connectorClasses(t){this.#V=t}get connectorTemplate(){return this.getAttribute("connector-template")}initializeConnector(){const t=this.connectorTemplate;if(!this.connectorClasses[t])return;const e=this.connectorClasses[t];this.connector=new e(this.getAttribute.bind(this))}async fetchConnectorResults(t){if(!this.connector)return console.error(`No connector initialized for the field with template: ${this.connectorTemplate}`),{results:[]};const{results:e,error:s}=await this.connector.fetch(t);return s?{results:[],error:s}:{results:e.map(({label:t,value:e})=>({label:t,value:e}))}}init(){super.init?.(),this.initializeConnector()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),e!==s&&"connector-template"===t&&this.initializeConnector()}}},83538:(t,e,s)=>{s.d(e,{AM:()=>u,SR:()=>c,_r:()=>l});var r=s(63200),i=s(25964);const n=(t,e)=>`var(${t}${e?`, ${e}`:""})`;class a{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce((t,[e,s])=>`${t}${e} { \n${s.map(({property:t,value:e})=>`${t}: ${e}`).join(";\n")} \n}\n\n`,"")}}const o=(t,e="fallback")=>(0,r.GL)(t,e),l=(t,e,s)=>{const l=new a,h=(t,e)=>{if(!t)return"";if("string"==typeof t)return t;const s=o(e,t?.suffix);return n(s,h(t.fallback,s))};return Object.keys(s).forEach(a=>{const o=((t,e)=>{const s={selector:"",property:(0,r.kW)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map(t=>({...s,...t})):[{...s,...e}]:[s]})(a,s[a]),c=(0,i.Ix)(t,a);o.forEach(({selector:t,property:s,important:i,fallback:a})=>{const o=h(a,c);l.add(((t="",e="")=>(0,r.Tn)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,r.Tn)(s)?s():s,n(c,o)+(i?"!important":""))})}),l.toString()},h=(t,e,{fallback:s})=>{if(!s)return{};const i=o(e,s.suffix),n=(0,r.dk)(t,s.suffix||"fallback");return{[n]:i,...h(n,i,s)}},c=(t,e)=>Object.keys(e).reduce((s,r)=>{const n=(0,i.Ix)(t,r);return Object.assign(s,{[r]:n},h(r,n,e[r]))},{}),u=(t,e)=>`.${t}`.repeat(e)},84292:(t,e,s)=>{s.d(e,{t:()=>a});var r=s(25964);const i=()=>!0,n=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`,a=({itemRenderer:t=n,validateSchema:e=i,slotName:s,rerenderAttrsList:a=[],targetSelector:o,sortFn:l=t=>t})=>i=>class extends i{#L=[];#N;#O(t){if(!e)return!0;const s=e(t);return!0===s||(console.error("Data schema validation failed",s||""),!1)}#I(){const t=s?`*[slot="${s}"]`:":not([slot])";this.#N&&this.#N.querySelectorAll(t).forEach(t=>t.remove())}#k(){this.#I(),(l?this.data.sort(l):this.data).forEach((e,s)=>{const r="string"==typeof(i=t(e,s,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(i).content:i instanceof HTMLTemplateElement?i.content:(console.error("Invalid template",i),null);var i;this.#N&&this.#N.appendChild(r?.cloneNode(!0))})}set data(t){this.#O(t)&&(this.#L=t,this.#k())}get data(){return this.#L}init(){super.init?.(),this.#N=o?this.shadowRoot.querySelector(o):this.baseElement,(0,r.mx)(this,t=>{t.includes("data")?this.#$():this.#k()},{includeAttrs:[...a,"data"]})}#$(){const t=this.getAttribute("data");if(t)try{this.data=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}}},84548:(t,e,s)=>{s.d(e,{O:()=>r,h:()=>i});const r={CONNECTOR_INVALID:"CONNECTOR_INVALID",FETCH_RESULTS_ERROR:"FETCH_RESULTS_ERROR"},i=()=>class{constructor(t){this.getAttribute=t,this.isValid=this.#q()}checkConnectorValidity(){this.isValid=this.#q()}#q(){return!this.getRequiredParams().filter(t=>{const e=this.getAttribute(t);return!e||!this.validateParam(t,e)}).length}validateParam(t,e){return e.trim().length>0}getRequiredParams(){return console.error("Connector must implement getRequiredParams"),[]}async fetch(t){return this.isValid?this._fetchResults(t):(console.error(`[${this.constructor.name}] Cannot fetch results: connector is not properly configured`),{results:[],error:r.CONNECTOR_INVALID})}_fetchResults(t){return console.error("Connector must implement fetchResults"),{results:[],error:void 0}}}},87503:(t,e,s)=>{s.d(e,{m:()=>l});var r=s(63200),i=s(25964),n=s(22515),a=s(83538);const o=t=>async e=>{const s=await t(e);return new Promise(t=>{let e=0;const r=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(r)};r()})},l=({name:t,selector:e,mappings:s={},forward:{attributes:l=[],include:h=!0}={}})=>c=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=(0,n.R)({mappings:s})(c);return class extends d{static get cssVarList(){return{...d.cssVarList,[u]:(0,a.SR)((0,r.GL)(c.componentName,"_"+u),s)}}#P;constructor(){const t=o(async t=>{const s=(t.shadowRoot||t).querySelector(t.baseSelector);return e?(await o(()=>s)(t)).querySelector(e):s});super({getRootElement:t,componentNameSuffix:"_"+u,themeSection:"@"+u,baseSelector:":host"}),this.#P=t(this).then(t=>t.host)}async#_(){const t=await this.#P;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#P;(0,i.EA)(this,t,{[h?"includeAttrs":"excludeAttrs"]:l}),this.#_()}}}},88961:(t,e,s)=>{s.d(e,{Jm:()=>r.Jm,OZ:()=>r.OZ,RF:()=>r.RF,VO:()=>r.VO,mA:()=>r.mA,t$:()=>r.t$,tQ:()=>r.tQ,tz:()=>r.tz,y:()=>r.y});var r=s(78968)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8961],{1160:(t,e,s)=>{s.d(e,{t:()=>o});var r=s(72270),i=s(63200),n=s(25964),a=s(50336);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:c=[],delegatesFocus:u=!0})=>{class d extends((0,r.qu)({componentName:t,baseSelector:e})){#t=a.r.bind(this,"blur");#e=a.r.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:u}).innerHTML=`\n\t\t\t<${e}>\n\t\t\t${s.map(t=>`<slot ${t?`name="${t}" slot="${t}"`:""}></slot>`).join("")}\n\t\t\t</${e}>\n\t\t`,(0,n.fz)(((0,i.Tn)(o)?o():o)||"",this)}init(){super.init?.(),this.baseElement.addEventListener("blur",t=>{this.#t()}),this.baseElement.addEventListener("focus",t=>{this.#e()}),(0,n.q)(this.baseElement,this,c),(0,n.Gh)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},1317:(t,e,s)=>{s.d(e,{_:()=>i});var r=s(50336);const i=t=>class extends t{#s=r.r.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",t=>{t.stopPropagation()}),this.addEventListener("blur",()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)})}}},3563:(t,e,s)=>{s(63200),s(22515),s(11430),s(34797),s(25964)},4430:(t,e,s)=>{s.d(e,{X:()=>n}),s(42672);const r=["required","pattern"],i=Symbol("validationTarget"),n=t=>class extends t{#r=i;static get observedAttributes(){return[...t.observedAttributes||[],...r]}static get formAssociated(){return!0}#i;get internals(){return this.#i}set internals(t){this.#i=t}constructor(){super(),this.#i=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getCustomErrorMessage(t,e){return this.hasAttribute(t)?this.getAttribute(t)||" ":e}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:r,stepMismatch:i,tooShort:n,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:c}=t;switch(!0){case e:return this.getCustomErrorMessage("data-errormessage-value-missing",this.defaultErrorMsgValueMissing);case s||i||h:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch",this.defaultErrorMsgPatternMismatch);case r:return this.getCustomErrorMessage("data-errormessage-type-mismatch",this.defaultErrorMsgTypeMismatch);case n:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-short",this.defaultErrorMsgTooShort);case a:return this.getCustomErrorMessage("data-errormessage-pattern-mismatch-too-long",this.defaultErrorMsgTooLong);case l:return this.getCustomErrorMessage("data-errormessage-pattern-range-underflow",this.defaultErrorMsgRangeUnderflow);case o:return this.getCustomErrorMessage("data-errormessage-pattern-range-overflow",this.defaultErrorMsgRangeOverflow);case c:return this.validationMessage;default:return""}}#n(){const t=this.isReadOnly?{}:this.getValidity();this.#i.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#i.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#i.validity.valid}reportValidity(){return this.#i.reportValidity()}get validity(){return this.#i.validity}get validationTarget(){return this.#r===i?this.inputElement:this.#r}set validationTarget(t){this.#r=t}setCustomValidity(t){t?this.#i.setValidity({customError:!0},t,this.validationTarget):(this.#i.setValidity({}),this.#n())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#i.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),r.includes(t)&&this.#n()}init(){super.init?.(),this.addEventListener("change",this.#n),this.addEventListener("invalid",t=>t.stopPropagation()),this.addEventListener("input",this.#n),setTimeout(()=>this.#n())}}},11430:(t,e,s)=>{s.d(e,{V:()=>i});var r=s(25964);const i=t=>class extends t{constructor(){super(),(0,r.fz)(':host([draggable="true"]) * { cursor: inherit!important }',this)}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}}),super.init?.()}}},11501:(t,e,s)=>{s.d(e,{m:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",()=>this.removeAttribute("hover"),{once:!0})})}}},19852:(t,e,s)=>{s(25964)},22515:(t,e,s)=>{s.d(e,{R:()=>l});var r=s(69591),i=s(63200),n=s(25964),a=s(79673),o=s(83538);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class e extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SR)(l,{...t})}}#a;#o;#l;#h;#c;#u;#d;#m;#p;constructor({getRootElement:t,componentNameSuffix:s="",themeSection:n=r.IM,baseSelector:a}={}){super(),this.#h=s,this.#c=n,this.#d=a??this.baseSelector,this.#p=t,this.#m=Object.keys(e.cssVarList).map(t=>(0,i.GL)("st",s,t))}get#g(){return a.br.currentTheme?.[l]||""}#b(){this.#o.replaceSync(this.#g[this.#c]),this.currentThemeName=a.br.currentThemeName,this.onThemeChange?.(a.br.currentThemeName)}#E(){this.#o=(0,n.fz)("",this.#u,{prepend:!0}),this.#l=a.br.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){let t=(0,o.AM)(l,r.aE);const e=this.getAttribute("id");e&&(t+=`#${CSS.escape(e)}`),this.#a=(0,n.fz)(`:host(${t}) {}`,this.#u)}}#f(t,e){const s=this.#a.cssRules[0].style;if(!s)return;const r=(0,n.Ix)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(r,e):(s?.removeProperty(r),this.removeAttribute(t))}#y(t=[]){t.forEach(t=>{this.#m.includes(t)&&this.#f(t,this.getAttribute(t))})}#A(){if(Object.keys(t).length){const e=(0,o._r)((0,i.GL)(l,this.#h),this.#d,t);(0,n.fz)(e,this.#u,{prepend:!0})}}#C(t){(this.#u.classList||this.#u.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#u=await(this.#p?.(this))||this.shadowRoot,this.#C(l),this.#A(),this.#E(),this.#v(),(0,n.mx)(this,this.#y.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},27754:(t,e,s)=>{s.d(e,{b:()=>r});const r=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},34797:(t,e,s)=>{s.d(e,{q:()=>l});var r=s(63200),i=s(61246),n=s(27754),a=s(11501),o=s(36745);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#S;#M=!0;get baseSelector(){return e}get baseElement(){return this.#S??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#S||console.warn("missing base element for component",this.localName),this.#S}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#M&&(this.#M=!1,this.init?.())}}return(0,r.Zz)(i.t,a.m,o.y,n.b)(s)}},36745:(t,e,s)=>{s.d(e,{y:()=>n});var r=s(25964);const i=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options","loading","allow-custom-value","collapsed"],n=t=>class extends t{init(){super.init?.(),(0,r.mx)(this,t=>t.forEach(t=>{const e=this.getAttribute(t);(t=>i.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}),{})}}},49449:(t,e,s)=>{s.d(e,{y:()=>h});var r=s(63200),i=s(1317),n=s(70962),a=s(4430),o=s(36745),l=s(34797);const h=(...t)=>(0,r.Zz)(a.X,i._,o.y,n.j)((0,l.q)(...t))},50336:(t,e,s)=>{function r(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{r:()=>r})},61246:(t,e,s)=>{s.d(e,{t:()=>r});const r=t=>class extends t{#w(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#w()}}},70962:(t,e,s)=>{s.d(e,{j:()=>i});var r=s(50336);const i=t=>class extends t{init(){this.#T(),super.init?.()}#T(){["blur","focus","focusin","focusout"].forEach(t=>{this.addEventListener(t,t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()})})}handleFocusEventsDispatching(t){let e;t?.forEach(t=>{t?.addEventListener("focusout",t=>{t.stopImmediatePropagation(),e=setTimeout(()=>{e=null,r.r.call(this,"blur"),r.r.call(this,"focusout",{bubbles:!0})})});const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(r.r.call(this,"focus"),r.r.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)})}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",e=>{this!==e.target&&(e.stopImmediatePropagation(),t!==this.value&&(t=this.value,r.r.call(this,"input",{bubbles:!0,composed:!0})))})}}},71209:(t,e,s)=>{s.d(e,{O:()=>u});var r=s(63200),i=s(25964),n=s(50336),a=s(4430),o=s(22515);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},c=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:r=[],proxyParentValidation:o=!1})=>c=>class extends((0,a.X)(c)){static get observedAttributes(){return[...c.observedAttributes||[],...l]}#R;#s=n.r.bind(this,"change");constructor(){super(),this.#R=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout(()=>{!this.#R&&console.warn(this.localName,"no input was found")},0)}get inputElement(){if(this.#R)return this.#R;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#R=h(t)||h(e),this.#R}set inputElement(t){this.#R=t}getValidity(){return this.inputElement?.validity||{}}#x(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#x(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),r.forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.inputElement?.setCustomValidity("")})}),setTimeout(()=>{(Array.isArray(s)?s:[s]).forEach(t=>{this.baseElement?.addEventListener(t,()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#x()})}),this.baseElement.addEventListener("change",()=>{this.#s()}),this.addEventListener("invalid",()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#x()}),t.forEach(t=>{const s=this.querySelector('input[slot="external-input"]')||null,r=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const r=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){r.forEach(e=>{e[s]=t})},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...r],t)}),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,i.EA)(this,this.inputElement,{includeAttrs:["inputmode"]})}),o){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...r)=>{if(3===r.length){const t=r.slice(0,r.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...r);return t[s](...r)}:"function"==typeof t[s]?(...r)=>(e.internals[s](...r),t[s](...r)):t[s]})}}},u=t=>(0,r.Zz)(c(t),(0,o.R)({componentNameOverride:(0,i.xE)("input-wrapper")}))},71887:(t,e,s)=>{s.d(e,{y:()=>r});const r=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mousedown",t=>{t.preventDefault(),this.setAttribute("active","true"),window.addEventListener("mouseup",()=>this.removeAttribute("active"),{once:!0})})}}},72270:(t,e,s)=>{s.d(e,{OR:()=>n.O,h:()=>n.h,qu:()=>r.q,yc:()=>i.y});var r=s(34797),i=(s(3563),s(49449)),n=s(84548)},78968:(t,e,s)=>{s.d(e,{Jm:()=>h.J,OZ:()=>a.O,RF:()=>r.R,VO:()=>i.V,mA:()=>l.m,t$:()=>c.t,tQ:()=>o.t,tz:()=>n.t,y:()=>u.y});var r=s(22515),i=s(11430),n=s(1160),a=s(71209),o=s(61246),l=(s(4430),s(87503)),h=(s(36745),s(19852),s(83370)),c=s(84292),u=s(71887)},83370:(t,e,s)=>{s.d(e,{J:()=>r});const r=({connectorClasses:t})=>e=>class extends e{#V=t;static get observedAttributes(){return[...e.observedAttributes||[],"connector-template"]}get connectorClasses(){return this.#V}set connectorClasses(t){this.#V=t}get connectorTemplate(){return this.getAttribute("connector-template")}initializeConnector(){const t=this.connectorTemplate;if(!this.connectorClasses[t])return;const e=this.connectorClasses[t];this.connector=new e(this.getAttribute.bind(this))}async fetchConnectorResults(t){if(!this.connector)return console.error(`No connector initialized for the field with template: ${this.connectorTemplate}`),{results:[]};const{results:e,error:s}=await this.connector.fetch(t);return s?{results:[],error:s}:{results:e.map(({label:t,value:e})=>({label:t,value:e}))}}init(){super.init?.(),this.initializeConnector()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),e!==s&&"connector-template"===t&&this.initializeConnector()}}},83538:(t,e,s)=>{s.d(e,{AM:()=>d,SR:()=>u,_r:()=>h});var r=s(63200),i=s(25964);const n=t=>`${t}__override`,a=(t,e,s=!1)=>{const r=`var(${t}${e?`, ${e}`:""})`;return s?`var(${n(t)}, ${r})`:r};class o{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce((t,[e,s])=>`${t}${e} { \n${s.map(({property:t,value:e})=>`${t}: ${e}`).join(";\n")} \n}\n\n`,"")}}const l=(t,e="fallback")=>(0,r.GL)(t,e),h=(t,e,s)=>{const n=new o,h=(t,e)=>{if(!t)return"";if("string"==typeof t)return t;const s=l(e,t?.suffix);return a(s,h(t.fallback,s))};return Object.keys(s).forEach(o=>{const l=((t,e)=>{const s={selector:"",property:(0,r.kW)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map(t=>({...s,...t})):[{...s,...e}]:[s]})(o,s[o]),c=(0,i.Ix)(t,o);l.forEach(({selector:t,property:s,important:i,fallback:o})=>{const l=h(o,c);n.add(((t="",e="")=>(0,r.Tn)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,r.Tn)(s)?s():s,a(c,l,!0)+(i?"!important":""))})}),n.toString()},c=(t,e,{fallback:s})=>{if(!s)return{};const i=l(e,s.suffix),n=(0,r.dk)(t,s.suffix||"fallback");return{[n]:i,...c(n,i,s)}},u=(t,e)=>Object.keys(e).reduce((s,r)=>{const a=(0,i.Ix)(t,r);return Object.assign(s,{[r]:a},{[r+"Override"]:n(a)},c(r,a,e[r]))},{}),d=(t,e)=>`.${t}`.repeat(e)},84292:(t,e,s)=>{s.d(e,{t:()=>a});var r=s(25964);const i=()=>!0,n=t=>`<pre>${JSON.stringify(t,null,4)}</pre>`,a=({itemRenderer:t=n,validateSchema:e=i,slotName:s,rerenderAttrsList:a=[],targetSelector:o,sortFn:l=t=>t})=>i=>class extends i{#L=[];#N;#O(t){if(!e)return!0;const s=e(t);return!0===s||(console.error("Data schema validation failed",s||""),!1)}#$(){const t=s?`*[slot="${s}"]`:":not([slot])";this.#N&&this.#N.querySelectorAll(t).forEach(t=>t.remove())}#I(){this.#$(),(l?this.data.sort(l):this.data).forEach((e,s)=>{const r="string"==typeof(i=t(e,s,this))?(t=>{const e=document.createElement("template");return e.innerHTML=t,e})(i).content:i instanceof HTMLTemplateElement?i.content:(console.error("Invalid template",i),null);var i;this.#N&&this.#N.appendChild(r?.cloneNode(!0))})}set data(t){this.#O(t)&&(this.#L=t,this.#I())}get data(){return this.#L}init(){super.init?.(),this.#N=o?this.shadowRoot.querySelector(o):this.baseElement,(0,r.mx)(this,t=>{t.includes("data")?this.#k():this.#I()},{includeAttrs:[...a,"data"]})}#k(){const t=this.getAttribute("data");if(t)try{this.data=JSON.parse(t)}catch(e){console.warn("Invalid JSON data",t)}}}},84548:(t,e,s)=>{s.d(e,{O:()=>r,h:()=>i});const r={CONNECTOR_INVALID:"CONNECTOR_INVALID",FETCH_RESULTS_ERROR:"FETCH_RESULTS_ERROR"},i=()=>class{constructor(t){this.getAttribute=t,this.isValid=this.#_()}checkConnectorValidity(){this.isValid=this.#_()}#_(){return!this.getRequiredParams().filter(t=>{const e=this.getAttribute(t);return!e||!this.validateParam(t,e)}).length}validateParam(t,e){return e.trim().length>0}getRequiredParams(){return console.error("Connector must implement getRequiredParams"),[]}async fetch(t){return this.isValid?this._fetchResults(t):(console.error(`[${this.constructor.name}] Cannot fetch results: connector is not properly configured`),{results:[],error:r.CONNECTOR_INVALID})}_fetchResults(t){return console.error("Connector must implement fetchResults"),{results:[],error:void 0}}}},87503:(t,e,s)=>{s.d(e,{m:()=>l});var r=s(63200),i=s(25964),n=s(22515),a=s(83538);const o=t=>async e=>{const s=await t(e);return new Promise(t=>{let e=0;const r=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(r)};r()})},l=({name:t,selector:e,mappings:s={},forward:{attributes:l=[],include:h=!0}={}})=>c=>{const u=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=(0,n.R)({mappings:s})(c);return class extends d{static get cssVarList(){return{...d.cssVarList,[u]:(0,a.SR)((0,r.GL)(c.componentName,"_"+u),s)}}#q;constructor(){const t=o(async t=>{const s=(t.shadowRoot||t).querySelector(t.baseSelector);return e?(await o(()=>s)(t)).querySelector(e):s});super({getRootElement:t,componentNameSuffix:"_"+u,themeSection:"@"+u,baseSelector:":host"}),this.#q=t(this).then(t=>t.host)}async#P(){const t=await this.#q;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#q;(0,i.EA)(this,t,{[h?"includeAttrs":"excludeAttrs"]:l}),this.#P()}}}},88961:(t,e,s)=>{s.d(e,{Jm:()=>r.Jm,OZ:()=>r.OZ,RF:()=>r.RF,VO:()=>r.VO,mA:()=>r.mA,t$:()=>r.t$,tQ:()=>r.tQ,tz:()=>r.tz,y:()=>r.y});var r=s(78968)}}]);
2
2
  //# sourceMappingURL=8961.js.map