@rededor/cura 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (91) hide show
  1. package/dist/cjs/cura-accordion_9.cjs.entry.js +2 -2
  2. package/dist/cjs/cura-accordion_9.cjs.entry.js.map +1 -1
  3. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  4. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-button-select.cjs.entry.js +2 -2
  6. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  7. package/dist/cjs/cura-button-transparent_2.cjs.entry.js +2 -2
  8. package/dist/cjs/cura-button-transparent_2.cjs.entry.js.map +1 -1
  9. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +1 -1
  10. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-dropdown-search.cjs.entry.js +3 -3
  12. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  14. package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
  15. package/dist/cjs/cura.cjs.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/components/buttons/cura-button/cura-button.js +6 -6
  18. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  19. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +6 -6
  20. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  21. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +6 -6
  22. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  23. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +6 -6
  24. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  25. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  26. package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
  27. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.css +4 -0
  28. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +3 -3
  29. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  30. package/dist/components/cura-button-outline.js +3 -3
  31. package/dist/components/cura-button-outline.js.map +1 -1
  32. package/dist/components/cura-button-select.js +3 -3
  33. package/dist/components/cura-button-select.js.map +1 -1
  34. package/dist/components/cura-button-transparent2.js +3 -3
  35. package/dist/components/cura-button-transparent2.js.map +1 -1
  36. package/dist/components/cura-button.js +3 -3
  37. package/dist/components/cura-button.js.map +1 -1
  38. package/dist/components/cura-dropdown-search-option.js +1 -1
  39. package/dist/components/cura-dropdown-search-option.js.map +1 -1
  40. package/dist/components/cura-dropdown-search.js +3 -3
  41. package/dist/components/cura-dropdown-search.js.map +1 -1
  42. package/dist/components/cura-toast.js +1 -1
  43. package/dist/components/cura-toast.js.map +1 -1
  44. package/dist/cura/cura.esm.js +1 -1
  45. package/dist/cura/p-11e828b5.entry.js +2 -0
  46. package/dist/cura/p-11e828b5.entry.js.map +1 -0
  47. package/dist/cura/{p-e622006c.entry.js → p-17a878d4.entry.js} +2 -2
  48. package/dist/cura/p-17a878d4.entry.js.map +1 -0
  49. package/dist/cura/{p-29790bb5.entry.js → p-27afaed4.entry.js} +2 -2
  50. package/dist/cura/p-27afaed4.entry.js.map +1 -0
  51. package/dist/cura/p-31ae34e3.entry.js +2 -0
  52. package/dist/cura/p-31ae34e3.entry.js.map +1 -0
  53. package/dist/cura/{p-86b6e638.entry.js → p-3b4bf71e.entry.js} +2 -2
  54. package/dist/cura/p-3b4bf71e.entry.js.map +1 -0
  55. package/dist/cura/p-45bc4f7c.entry.js +2 -0
  56. package/dist/cura/p-45bc4f7c.entry.js.map +1 -0
  57. package/dist/cura/p-c518a91c.entry.js +2 -0
  58. package/dist/cura/p-c518a91c.entry.js.map +1 -0
  59. package/dist/esm/cura-accordion_9.entry.js +2 -2
  60. package/dist/esm/cura-accordion_9.entry.js.map +1 -1
  61. package/dist/esm/cura-button-outline.entry.js +2 -2
  62. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  63. package/dist/esm/cura-button-select.entry.js +2 -2
  64. package/dist/esm/cura-button-select.entry.js.map +1 -1
  65. package/dist/esm/cura-button-transparent_2.entry.js +2 -2
  66. package/dist/esm/cura-button-transparent_2.entry.js.map +1 -1
  67. package/dist/esm/cura-dropdown-search-option.entry.js +1 -1
  68. package/dist/esm/cura-dropdown-search-option.entry.js.map +1 -1
  69. package/dist/esm/cura-dropdown-search.entry.js +3 -3
  70. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  71. package/dist/esm/cura-toast.entry.js +1 -1
  72. package/dist/esm/cura-toast.entry.js.map +1 -1
  73. package/dist/esm/cura.js +1 -1
  74. package/dist/esm/loader.js +1 -1
  75. package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
  76. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +1 -1
  77. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +1 -1
  78. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +1 -1
  79. package/dist/types/components.d.ts +8 -8
  80. package/package.json +2 -2
  81. package/dist/cura/p-039b3701.entry.js +0 -2
  82. package/dist/cura/p-039b3701.entry.js.map +0 -1
  83. package/dist/cura/p-29790bb5.entry.js.map +0 -1
  84. package/dist/cura/p-5e5f37c7.entry.js +0 -2
  85. package/dist/cura/p-5e5f37c7.entry.js.map +0 -1
  86. package/dist/cura/p-86b6e638.entry.js.map +0 -1
  87. package/dist/cura/p-b1148bb2.entry.js +0 -2
  88. package/dist/cura/p-b1148bb2.entry.js.map +0 -1
  89. package/dist/cura/p-e1253a09.entry.js +0 -2
  90. package/dist/cura/p-e1253a09.entry.js.map +0 -1
  91. package/dist/cura/p-e622006c.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["curaDropdownSearchCss","CuraDropdownSearchStyle0","CuraDropdownSearch","this","overlayElement","handleSlotChange","options","Array","from","host","querySelectorAll","addClickListenersToOptions","updateHoveredIndex","handleInputChange","event","input","target","value","onValueChange","handleKeyDown","key","preventDefault","moveHighlight","hoveredIndex","handleOnBlur","onSelectedOption","handleResize","isMobile","window","innerWidth","isDropdownOpen","showOverlay","removeOverlay","connectedCallback","weights","CuraAPI","theme","fonts","getWeights","styles","colors","getColor","breakpoints","get","getSize","getFamily","medium","newValue","updateSelectedOption","valueChanged","emit","componentWillLoad","componentDidRender","componentDidLoad","addEventListener","disconnectedCallback","removeEventListener","document","createElement","className","style","position","top","left","width","height","zIndex","backgroundColor","body","appendChild","parentNode","removeChild","forEach","option","index","selectedOptionIndex","findIndex","getAttribute","updateOptionAttribute","scrollIntoView","selectedOption","selectable","selectedValue","textContent","isOnBlurInput","direction","visibleOptions","newIndex","length","attribute","indexToUpdate","currentValue","container","_a","shadowRoot","querySelector","hoveredOption","optionRect","getBoundingClientRect","containerRect","bottom","scrollTop","setTimeout","getClasses","status","getDropdownClasses","visible","hostCSSProperties","dropdownMaxHeight","render","isMobileDropdown","h","Host","class","fontColor","onClick","iconName","size","iconOnly","color","label","part","mode","required","hideErrorIcon","e","onInput","onFocus","onBlur","placeholder","onKeyDown","name","id","onSlotchange"],"sources":["src/components/forms/cura-dropdown-search/cura-dropdown-search.scss?tag=cura-dropdown-search&encapsulation=shadow","src/components/forms/cura-dropdown-search/cura-dropdown-search.tsx"],"sourcesContent":["@import '../../../scss/mixins/shadows.scss';\n\n:host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n}\n\n.dropdown {\n display: flex;\n position: relative;\n\n flex-direction: column;\n width: inherit;\n\n &-input-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n\n\n &.dropdown-open {\n ::part(cura-input-field) {\n border-radius: 4px 4px 0px 0px;\n }\n ::slotted([slot='helperText']) {\n display: none;\n }\n\n cura-input-text {\n ::slotted([slot='helperText']) {\n display: none;\n }\n }\n }\n }\n\n &-search-list {\n position: absolute;\n top: calc(100% - 8px);\n width: 100%;\n max-height: var(--dropdown-max-height);\n padding: 12px 12px;\n margin: 0;\n box-sizing: border-box;\n @include shadow-level3(--neutral-black-shadow);\n border-radius: 0px 0px 4px 4px;\n border-top: 0 var(--neutral-light);\n border-right: 2px solid var(--neutral-light);\n border-bottom: 2px solid var(--neutral-light);\n border-left: 2px solid var(--neutral-light);\n background-color: var(--neutral-purewhite);\n list-style: none;\n overflow-y: auto;\n display: none;\n\n &.visible {\n display: block;\n }\n\n &-input-search {\n width: inherit;\n\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px 8px;\n border-bottom: 2px solid var(--info-base);\n background-color: var(--neutral-purewhite);\n\n cura-input-text {\n width: inherit;\n }\n\n &.error {\n background-color: var(--error-lighter);\n border-bottom: 2px solid var(--error-dark);\n }\n }\n }\n\n &-mobile {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n width: 100%;\n\n z-index: 10000;\n .dropdown-input-search {\n display: flex;\n gap: 4px;\n padding: 12px 8px;\n background-color: var(--neutral-purewhite);\n border-bottom: 2px solid var(--info-base);\n z-index: 10000;\n cura-button-transparent {\n display: flex;\n }\n &.error {\n background-color: var(--error-lighter);\n border-bottom: 2px solid var(--error-dark);\n }\n &.dropdown-open {\n display: flex;\n\n ::slotted([slot='helperText']) {\n display: block;\n }\n }\n }\n .dropdown-search-list {\n position: static;\n width: 100%;\n height: 100%;\n max-height: none;\n padding: 12px 12px;\n margin: 0;\n box-sizing: border-box;\n box-shadow: none;\n border: none;\n background-color: var(--neutral-purewhite);\n list-style: none;\n overflow-y: auto;\n z-index: 10000;\n }\n }\n}\n","import { Component, Host, Prop, State, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-dropdown-search',\n styleUrl: 'cura-dropdown-search.scss',\n shadow: true,\n})\nexport class CuraDropdownSearch {\n /**\n * Define the status of the dropdown search.\n */\n @Prop({ reflect: true }) status: 'error' | 'default' = 'default';\n\n /**\n * The name of the dropdown search component.\n */\n @Prop({ reflect: true }) name: string;\n\n /**\n * Indicates if the dropdown search is required.\n */\n @Prop({ reflect: true, mutable: true }) required: boolean = false;\n\n /**\n * Indicates if the dropdown search is selected.\n */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /**\n * The value of the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * The placeholder text for the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) placeholder: string = '';\n\n /**\n * The label for the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) label: string = '';\n\n /**\n * Custom icon name. Default: search.\n */\n @Prop({reflect: true}) iconName = 'search';\n\n /**\n * CSS max-height property for dropdown item.\n * Default to 630px\n */\n @Prop({reflect: true}) dropdownMaxHeight = '630px';\n\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n /**\n * Indicates if the overlay is visible.\n */\n @State() overlayVisible: boolean = false;\n\n /**\n * Event emitted when the value changes.\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Indicates if the dropdown is open.\n */\n @State() isDropdownOpen: boolean = false;\n\n /**\n * Styles for the component.\n\n */\n @State() styles = {};\n\n /**\n * Indicates if the component is being viewed on a mobile device.\n */\n @State() isMobile: boolean = window.innerWidth < 768;\n\n /**\n * The mode of the dropdown search.\n */\n @State() mode: 'default' | 'transparent' = 'default';\n\n @Event() onselect: EventEmitter;\n\n @State() inputTextRef!: HTMLCuraInputTextElement;\n\n /**\n * Indicates if the input is on blur.\n */\n @State() isOnBlurInput: boolean = true;\n\n /**\n * The index of the currently hovered option.\n */\n @State() hoveredIndex: number = -1;\n\n /**\n * The options for the dropdown search.\n * @type {HTMLCuraDropdownSearchOptionElement[]}\n */\n\n weights;\n\n private overlayElement: HTMLDivElement | null = null;\n\n @State() options: HTMLCuraDropdownSearchOptionElement[] = [];\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--info-base'] = window.CuraAPI.theme.colors.getColor('info-base');\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');\n this.styles['--breakpoints'] = window.CuraAPI.theme.breakpoints.get();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n }\n\n @Watch('value')\n onValueChange(newValue: string) {\n this.updateSelectedOption(newValue);\n this.valueChanged.emit(newValue);\n }\n\n componentWillLoad() {\n this.updateSelectedOption(this.value);\n }\n\n componentDidRender() {\n if (this.isDropdownOpen && this.isMobile) {\n this.showOverlay();\n } else {\n this.removeOverlay();\n }\n }\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n private showOverlay() {\n if (!this.overlayElement) {\n this.overlayElement = document.createElement('div');\n this.overlayElement.className = 'dropdown-overlay';\n this.overlayElement.style.position = 'fixed';\n this.overlayElement.style.top = '0';\n this.overlayElement.style.left = '0';\n this.overlayElement.style.width = '100%';\n this.overlayElement.style.height = '100%';\n this.overlayElement.style.zIndex = '9999';\n this.overlayElement.style.backgroundColor = 'white';\n document.body.appendChild(this.overlayElement);\n }\n }\n\n private removeOverlay() {\n if (this.overlayElement && this.overlayElement.parentNode === document.body) {\n document.body.removeChild(this.overlayElement);\n this.overlayElement = null;\n }\n }\n\n private handleSlotChange = () => {\n this.options = Array.from(this.host.querySelectorAll('cura-dropdown-search-option'));\n this.addClickListenersToOptions();\n this.updateHoveredIndex();\n };\n\n private addClickListenersToOptions() {\n this.options.forEach((option, index) => {\n option.addEventListener('click', () => this.onSelectedOption(index));\n });\n }\n\n private updateSelectedOption(value: string) {\n const selectedOptionIndex = this.options.findIndex(option => option.getAttribute('value') === value);\n this.hoveredIndex = selectedOptionIndex;\n this.updateOptionAttribute('hovered', this.hoveredIndex);\n this.updateOptionAttribute('selected', this.hoveredIndex);\n\n this.scrollIntoView();\n }\n\n private handleInputChange = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.onValueChange(this.value);\n // this.valueChanged.emit(this.value);\n };\n\n private onSelectedOption(index: number) {\n const selectedOption = this.options[index];\n if(selectedOption.selectable) {\n const selectedValue = selectedOption.getAttribute('value') || selectedOption.textContent;\n\n this.value = selectedValue || '';\n this.updateSelectedOption(this.value);\n\n this.isDropdownOpen = false;\n this.isOnBlurInput = true;\n this.removeOverlay();\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.moveHighlight(1);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n this.moveHighlight(-1);\n } else if (event.key === 'Enter') {\n event.preventDefault();\n if (this.hoveredIndex > -1) {\n this.handleOnBlur();\n this.onSelectedOption(this.hoveredIndex);\n }\n }\n };\n\n private moveHighlight(direction: number) {\n const visibleOptions = this.options;\n const newIndex = (this.hoveredIndex + direction + visibleOptions.length) % visibleOptions.length;\n this.hoveredIndex = newIndex;\n this.updateOptionAttribute('hovered', this.hoveredIndex);\n this.scrollIntoView();\n }\n\n private updateOptionAttribute(attribute: string, indexToUpdate: number) {\n this.options.forEach((option, index) => {\n (option as any)[attribute] = index === indexToUpdate;\n });\n }\n\n private updateHoveredIndex() {\n const visibleOptions = this.options;\n const currentValue = this.value;\n this.hoveredIndex = visibleOptions.findIndex(option => option.getAttribute('value') === currentValue);\n }\n\n private scrollIntoView() {\n const container = this.host.shadowRoot?.querySelector('.dropdown-search-list');\n const hoveredOption = this.options[this.hoveredIndex];\n\n if (container && hoveredOption) {\n const optionRect = hoveredOption.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n\n if (optionRect.bottom > containerRect.bottom) {\n container.scrollTop += optionRect.bottom - containerRect.bottom;\n }\n\n if (optionRect.top < containerRect.top) {\n container.scrollTop -= containerRect.top - optionRect.top;\n }\n }\n }\n\n private handleResize = () => {\n this.isMobile = window.innerWidth < 768;\n if (this.isDropdownOpen) {\n if (this.isMobile) {\n this.showOverlay();\n } else {\n this.removeOverlay();\n }\n }\n };\n\n handleOnBlur() {\n if (this.isOnBlurInput === true) {\n setTimeout(() => {\n this.isDropdownOpen = false;\n this.removeOverlay();\n }, 200);\n }\n }\n getClasses() {\n return {\n 'dropdown-input-search': true,\n 'dropdown-open': this.isDropdownOpen,\n [this.status]: true,\n };\n }\n\n getDropdownClasses() {\n return {\n 'dropdown-search-list': true,\n 'visible': this.options.length && this.isDropdownOpen ? true : false\n };\n }\n\n hostCSSProperties() {\n return {\n '--dropdown-max-height': this.dropdownMaxHeight,\n };\n }\n\n render() {\n const isMobileDropdown = this.isMobile && this.isDropdownOpen;\n return (\n <Host style={this.hostCSSProperties()} class=\"dropdown-overlay\">\n <div class={`dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`} style={this.styles}>\n <div class={this.getClasses()}>\n {this.isMobile && this.isDropdownOpen && (\n <cura-button-transparent\n fontColor=\"dark\"\n onClick={() => (this.isMobile = false)}\n iconName=\"arrowLeft\"\n size=\"medium\"\n iconOnly\n color=\"primary\"\n ></cura-button-transparent>\n )}\n <cura-input-text\n label={this.label}\n part=\"cura-input-field\"\n mode={isMobileDropdown ? 'transparent' : 'default'}\n required={this.required}\n hideErrorIcon={this.status === 'error'}\n iconName={this.iconName || 'search'}\n value={this.value}\n status={this.status}\n onValueChange={e => this.onValueChange(e.target.value as string)}\n onInput={e => this.handleInputChange(e)}\n onFocus={() => (this.isDropdownOpen = true)}\n onClick={() => (window.innerWidth < 768 ? (this.isMobile = true) : null)}\n onBlur={() => {\n this.handleOnBlur();\n }}\n placeholder={this.placeholder}\n size=\"large\"\n onKeyDown={this.handleKeyDown}\n >\n <slot name=\"helperText\"></slot>\n </cura-input-text>\n </div>\n <div id=\"dropdown-search-list\" class={this.getDropdownClasses()}>\n <slot name=\"dropdown-search-option\" onSlotchange={this.handleSlotChange}></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as a,h as e,H as s}from"./p-312791fb.js";const i=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:2px solid var(--primary-base)}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-lighter);border-color:var(--color-base)}:host button:focus,:host a:focus{border-color:var(--info-base) !important}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 6.12px) calc(var(--base-spacing) * 9.96px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 33.7px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3.44px) calc(var(--base-spacing) * 9.96px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 29.95px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 3.24px) calc(var(--base-spacing) * 7.44px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 21.67px)}:host button:not(.isLoading).large,:host a:not(.isLoading).large{padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 13px)}:host button:not(.isLoading).medium,:host a:not(.isLoading).medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 11px)}:host button:not(.isLoading).small,:host a:not(.isLoading).small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 8px)}:host button cura-label,:host a cura-label{flex:1;font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.2em;text-align:var(--text-align, "left")}:host button.medium cura-label,:host a.medium cura-label{font-size:1.14em}:host button.small cura-label,:host a.small cura-label{font-size:1em}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative;gap:5px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-base);border-color:var(--color-darker)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--neutral-medium-primary-base)}';const o=i;const r=class{constructor(e){t(this,e);this.onclick=a(this,"onclick",7);this.theme=window.CuraAPI.theme;this.size="medium";this.disabled="false";this.selected=false;this.iconPosition="right";this.color="accent";this.background="light";this.fontcolor="dark";this.hovered=false;this.styles={}}setColors(){const t=[{name:"--color-base",theme:`${this.color}-base`},{name:"--color-darker",theme:`${this.color}-darker`},{name:"--color-lighter",theme:`${this.color}-lighter`},{name:"--neutral-purewhite-black",theme:this.fontcolor==="light"?"neutral-purewhite":"neutral-black"},{name:"--neutral-white-primary-darker",theme:this.background==="light"?"neutral-white":"primary-darker"},{name:"--neutral-medium-primary-base",theme:this.background==="light"?"neutral-medium":"primary-base"}];t.forEach((t=>{this.styles=Object.assign(Object.assign({},this.styles),{[t.name]:this.theme.colors.getColor(t.theme)})}))}setStyles(){this.weights=this.theme.fonts.getWeights();this.styles["--base-spacing"]=this.theme.spacing.getSpacing();this.styles["--font-size"]=this.theme.fonts.getSize();this.styles["--font-family"]=this.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium;this.styles["--neutral-purewhite"]=this.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-black"]=this.theme.colors.getColor("neutral-black");this.styles["--primary-base"]=this.theme.colors.getColor("primary-base");this.styles["--info-base"]=this.theme.colors.getColor("info-base")}connectedCallback(){this.setStyles();this.setColors()}handleMouseEnter(){if(this.disabled)return;this.hovered=true}handleMouseLeave(){this.hovered=false}assignColor(){if(!this.selected)return"primary-base";const t=this.disabled?this.background==="light"?"neutral-medium":"primary-base":this.selected&&this.fontcolor==="dark"?"neutral-black":"neutral-purewhite";return t}getIcon(){if(!this.selected)return;const t=this.size==="small"?16:this.size==="medium"?20:24;const a=this.hovered?"closeCircle":"checkCircle";return e("cura-icon",{class:"button-icon",name:a,size:t,color:this.assignColor()})}handleClick(t){if(this.disabled)t.preventDefault();this.selected=!this.selected;this.onclick.emit({selected:this.selected})}getClasses(){const t={};t[`${this.size.toLowerCase()}`]=true;t[`icon-${this.iconPosition.toLowerCase()}`]=true;t["disabled"]=this.disabled;t["selected"]=this.selected;return t}render(){return e(s,{key:"46ec847aae53f96f9c9cb9cba1472bb33df8fcdb"},e("button",{key:"508303050695d9a1ff7d27174e511bcac814c153",class:this.getClasses(),style:this.styles,disabled:this.disabled==="true"?true:null,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},e("div",{key:"bd06094e5004bd11e8ba9d05387300c8d57d34e2",class:"button-container"},this.getIcon(),e("cura-label",{key:"b688ba052bdf3bcd39a61d553f49a0e47ac5ca54",class:"label",lineHeight:"0%",color:this.assignColor()},e("slot",{key:"29f645c3866a9f24cbae12f5167a2645c0452153"})))))}static get watchers(){return{background:["setColors","assignColor"],color:["setColors"],fontcolor:["setColors","assignColor"]}}};r.style=o;export{r as cura_button_select};
2
- //# sourceMappingURL=p-e622006c.entry.js.map
1
+ import{r as t,c as a,h as e,H as s}from"./p-312791fb.js";const i=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:2px solid var(--primary-base)}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-lighter);border-color:var(--color-base)}:host button:focus,:host a:focus{border-color:var(--info-base) !important}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 6.12px) calc(var(--base-spacing) * 9.96px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 33.7px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3.44px) calc(var(--base-spacing) * 9.96px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 29.95px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 3.24px) calc(var(--base-spacing) * 7.44px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 21.67px)}:host button:not(.isLoading).large,:host a:not(.isLoading).large{padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 13px)}:host button:not(.isLoading).medium,:host a:not(.isLoading).medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 11px)}:host button:not(.isLoading).small,:host a:not(.isLoading).small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 8px)}:host button cura-label,:host a cura-label{flex:1;font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.2em;text-align:var(--text-align, "left")}:host button.medium cura-label,:host a.medium cura-label{font-size:1.14em}:host button.small cura-label,:host a.small cura-label{font-size:1em}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative;gap:5px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-base);border-color:var(--color-darker)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--neutral-medium-primary-base)}';const o=i;const r=class{constructor(e){t(this,e);this.onclick=a(this,"onclick",7);this.theme=window.CuraAPI.theme;this.size="medium";this.disabled=false;this.selected=false;this.iconPosition="right";this.color="accent";this.background="light";this.fontcolor="dark";this.hovered=false;this.styles={}}setColors(){const t=[{name:"--color-base",theme:`${this.color}-base`},{name:"--color-darker",theme:`${this.color}-darker`},{name:"--color-lighter",theme:`${this.color}-lighter`},{name:"--neutral-purewhite-black",theme:this.fontcolor==="light"?"neutral-purewhite":"neutral-black"},{name:"--neutral-white-primary-darker",theme:this.background==="light"?"neutral-white":"primary-darker"},{name:"--neutral-medium-primary-base",theme:this.background==="light"?"neutral-medium":"primary-base"}];t.forEach((t=>{this.styles=Object.assign(Object.assign({},this.styles),{[t.name]:this.theme.colors.getColor(t.theme)})}))}setStyles(){this.weights=this.theme.fonts.getWeights();this.styles["--base-spacing"]=this.theme.spacing.getSpacing();this.styles["--font-size"]=this.theme.fonts.getSize();this.styles["--font-family"]=this.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium;this.styles["--neutral-purewhite"]=this.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-black"]=this.theme.colors.getColor("neutral-black");this.styles["--primary-base"]=this.theme.colors.getColor("primary-base");this.styles["--info-base"]=this.theme.colors.getColor("info-base")}connectedCallback(){this.setStyles();this.setColors()}handleMouseEnter(){if(this.disabled)return;this.hovered=true}handleMouseLeave(){this.hovered=false}assignColor(){if(!this.selected)return"primary-base";const t=this.disabled?this.background==="light"?"neutral-medium":"primary-base":this.selected&&this.fontcolor==="dark"?"neutral-black":"neutral-purewhite";return t}getIcon(){if(!this.selected)return;const t=this.size==="small"?16:this.size==="medium"?20:24;const a=this.hovered?"closeCircle":"checkCircle";return e("cura-icon",{class:"button-icon",name:a,size:t,color:this.assignColor()})}handleClick(t){if(this.disabled)t.preventDefault();this.selected=!this.selected;this.onclick.emit({selected:this.selected})}getClasses(){const t={};t[`${this.size.toLowerCase()}`]=true;t[`icon-${this.iconPosition.toLowerCase()}`]=true;t["disabled"]=this.disabled;t["selected"]=this.selected;return t}render(){return e(s,{key:"11c526fa5a82a986513a2d2cf94e85fbdc0a83c5"},e("button",{key:"539cb4766e18cf195541731bf95809784021fc21",class:this.getClasses(),style:this.styles,disabled:this.disabled,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},e("div",{key:"f57e41656abb33d450e9876517e575c628c633c6",class:"button-container"},this.getIcon(),e("cura-label",{key:"84ee6289e8c5e242cbdc2cdd8110be7102244176",class:"label",lineHeight:"0%",color:this.assignColor()},e("slot",{key:"2f292f5308c69fc9efa66a43bac5941ab2adeaf9"})))))}static get watchers(){return{background:["setColors","assignColor"],color:["setColors"],fontcolor:["setColors","assignColor"]}}};r.style=o;export{r as cura_button_select};
2
+ //# sourceMappingURL=p-17a878d4.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["curaButtonSelectCss","CuraButtonSelectStyle0","CuraButtonOutline","this","theme","window","CuraAPI","setColors","colors","name","color","fontcolor","background","forEach","styles","Object","assign","getColor","setStyles","weights","fonts","getWeights","spacing","getSpacing","getSize","getFamily","medium","connectedCallback","handleMouseEnter","disabled","hovered","handleMouseLeave","assignColor","selected","getIcon","iconSize","size","iconName","h","class","handleClick","e","preventDefault","onclick","emit","getClasses","classes","toLowerCase","iconPosition","render","Host","key","style","onClick","onMouseEnter","onMouseLeave","lineHeight"],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.tsx"],"sourcesContent":["@import \"../../../scss/mixins/buttons.scss\";\n\n:host {\n @include button-host();\n\n button, a {\n @include button-element() {\n background-color: var(--neutral-purewhite);\n box-sizing: border-box;\n border: 2px solid var(--primary-base);\n\n &:not(.disabled):hover {\n background-color: var(--color-lighter);\n border-color: var(--color-base);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n gap: 5px;\n }\n\n @mixin button-icon() {\n margin: 0;\n }\n\n // selected state\n @include button-selected() {\n background-color: var(--color-base);\n border-color: var(--color-darker);\n\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--neutral-medium-primary-base);\n\n }\n\n }\n}\n// ver as cores do label button\n","import { Component, Host, h, Prop, Watch, State, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\n\nexport class CuraButtonOutline {\n /**\n * Button size: small | medium (default) | large = medium\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Disabled state. Boolean.\n */\n @Prop({ reflect: true }) disabled = false;\n /**\n * selected state. Boolean.\n */\n @Prop({ reflect: true }) selected = false;\n /**\n * Icon position: left (default) | right.\n */\n @Prop({ reflect: true }) iconPosition: 'left' | 'right' = 'right';\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n /**\n * Set the font color to dark or light.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * fontcolor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() fontcolor: 'dark' | 'light' = 'dark';\n /**\n * hovered state. Boolean.\n */\n @State() hovered = false;\n\n @State() styles = {};\n\n @Event({ eventName: \"onclick\" }) onclick: EventEmitter<{ selected: boolean; }>;\n\n theme = window.CuraAPI.theme\n\n weights;\n\n @Watch('background')\n @Watch('color')\n @Watch('fontcolor')\n setColors() {\n const colors = [\n { name: '--color-base', theme: `${this.color}-base` },\n { name: '--color-darker', theme: `${this.color}-darker` },\n { name: '--color-lighter', theme: `${this.color}-lighter` },\n { name: '--neutral-purewhite-black', theme: this.fontcolor === 'light' ? 'neutral-purewhite' : 'neutral-black' },\n { name: '--neutral-white-primary-darker', theme: this.background === 'light' ? 'neutral-white' : 'primary-darker' },\n { name: '--neutral-medium-primary-base', theme: this.background === 'light' ? 'neutral-medium' : 'primary-base' },\n ];\n\n colors.forEach(color => {\n this.styles = {\n ...this.styles,\n [color.name]: this.theme.colors.getColor(color.theme)\n };\n });\n }\n\n setStyles() {\n this.weights = this.theme.fonts.getWeights();\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.styles['--font-size'] = this.theme.fonts.getSize();\n this.styles['--font-family'] = this.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--neutral-purewhite'] = this.theme.colors.getColor(\"neutral-purewhite\");\n this.styles['--neutral-black'] = this.theme.colors.getColor(\"neutral-black\");\n this.styles['--primary-base'] = this.theme.colors.getColor(\"primary-base\");\n this.styles['--info-base'] = this.theme.colors.getColor(\"info-base\");\n }\n\n connectedCallback() {\n this.setStyles()\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Watch('background')\n @Watch('fontcolor')\n assignColor() {\n if (!this.selected) return 'primary-base'\n\n const fontcolor =\n this.disabled\n ? (this.background === 'light' ? 'neutral-medium' : 'primary-base')\n : this.selected && this.fontcolor === \"dark\" ? 'neutral-black' : \"neutral-purewhite\";\n\n return fontcolor\n }\n\n getIcon() {\n if (!this.selected) return;\n\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const iconName = this.hovered ? 'closeCircle' : 'checkCircle';\n\n return <cura-icon class=\"button-icon\" name={iconName} size={iconSize} color={this.assignColor()}></cura-icon>;\n }\n\n\n handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n\n\n render() {\n return (\n <Host>\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}>\n <div class=\"button-container\">\n {this.getIcon()}\n <cura-label class=\"label\" lineHeight='0%' color={this.assignColor()}><slot></slot></cura-label>\n </div>\n </button>\n </Host>\n );\n }\n\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,H as a,g as o}from"./p-312791fb.js";const s=":host{display:block;box-sizing:border-box}:host .container{position:fixed;display:flex;box-sizing:border-box;min-width:328px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, top 0.5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, bottom 0.5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity 0.5s ease-in-out, left 0.5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translateX(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity 0.5s ease-in-out, right 0.5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translateX(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}";const r=s;const n=class{constructor(i){t(this,i);this.close=e(this,"close",7);this.handleClose=()=>{this.close.emit();this.closeContainer()};this.type="info";this.position="top-right";this.icon=undefined;this.label=undefined;this.closeButton=true;this.loader=true;this.autoCloseDelay=1e4;this.styles={};this.progress=0}handleChangeType(){this.setStyle()}connectedCallback(){this.setStyle()}render(){return i(a,{key:"8a49bdd99528c7b50b1b8a0de6ee0d985ffd5a11"},i("div",{key:"6e560327e729ecb9fc9e6c081cc4d3b1131f892c",class:this.getClasses(),style:this.styles},i("cura-icon",{key:"25efc30bc808e9f04be780ddf5bdc7edc3e56725",class:"default-icon",name:this.getNameIcon(),size:16,color:`${this.type}-dark`}),i("div",{key:"b1cbab08ae6845f8f544d4497b786fdfae645b72",class:"content"},i("cura-heading",{key:"6d64c4fc8c43862f8fc5dba886b34a904a81208d",level:4,size:"xsmall",color:`${this.type}-dark`,weight:"bold","margin-block":"0"},this.label),i("cura-paragraph",{key:"fa990a332ca8caf8b110b643b39c44a17bb8de67",color:`${this.type}-darker`,size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},i("slot",{key:"ec9ab2abe06b0d67ea71725abe3a02aca1a736c6"})),i("slot",{key:"dc08874d1145bb7e62cac9081014d17ad0095f53",name:"actions"})),this.closeButton&&i("cura-icon",{key:"3f22011909ed7074962a2ccec8ffe05bb9b01feb",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.loader&&!!this.autoCloseDelay&&i("cura-loader-bar",{key:"2e4168859d19170702a690bed3a20d28029cf7dc",color:`${this.type}-base`,progress:this.progress})))}componentDidLoad(){this.openContainer();this.startAnimation()}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor(`neutral-purewhite`),"--neutral-base":window.CuraAPI.theme.colors.getColor(`neutral-base`,.2),"--primary-base":window.CuraAPI.theme.colors.getColor(`primary-base`),"--color-base":window.CuraAPI.theme.colors.getColor(`${this.type}-base`)})}getClasses(){const[t,e]=this.position.split("-");const i={};i["container"]=true;i[t]=true;i[e]=true;if(this.loader){i["loader"]=true}return i}getNameIcon(){const t={info:"infoCircle",success:"checkCircle",warning:"alertCircle",error:"alertTriangle"};return this.icon?this.icon:t[this.type]}openContainer(){this.container=this.host.shadowRoot.querySelector(".container");this.container.classList.add("active")}closeContainer(){this.container.classList.remove("active");setTimeout((()=>{this.host.remove()}),500)}startAnimation(){if(!!this.autoCloseDelay){if(this.loader){this.progress=0;let t=setInterval((()=>{if(this.progress>=100){clearInterval(t);this.closeContainer()}else{this.progress++}}),this.autoCloseDelay/100)}else{let t=setInterval((()=>{clearInterval(t);this.closeContainer()}),this.autoCloseDelay)}}}get host(){return o(this)}static get watchers(){return{type:["handleChangeType"],position:["handleChangeType"]}}};n.style=r;export{n as cura_toast};
2
- //# sourceMappingURL=p-29790bb5.entry.js.map
1
+ import{r as t,c as e,h as i,H as a,g as o}from"./p-312791fb.js";const s=":host{display:block;box-sizing:border-box}:host .container{position:fixed;display:flex;box-sizing:border-box;min-width:328px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, top 0.5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, bottom 0.5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity 0.5s ease-in-out, left 0.5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translateX(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity 0.5s ease-in-out, right 0.5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translateX(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}";const r=s;const n=class{constructor(i){t(this,i);this.close=e(this,"close",7);this.handleClose=()=>{this.close.emit();this.closeContainer()};this.type="info";this.position="top-right";this.icon=undefined;this.label=undefined;this.closeButton=true;this.loader=true;this.autoCloseDelay=1e4;this.styles={};this.progress=0}handleChangeType(){this.setStyle()}connectedCallback(){this.setStyle()}render(){return i(a,{key:"b958a96eb8626cbe2e8aec9dcad3f1afac7a0a87"},i("div",{key:"d7c34ec40555fee4a8faf732f313da127b45f357",class:this.getClasses(),style:this.styles},i("cura-icon",{key:"5464f67130f7c1b402fea8eadf3840e4d5d7c21a",class:"default-icon",name:this.getNameIcon(),size:16,color:`${this.type}-dark`}),i("div",{key:"17f172c49e7c75f7ca436e92b7f161433bfc5245",class:"content"},i("cura-heading",{key:"e924e17df1943e43e7fbd5ada62b3cd98709d7d1",level:4,size:"xsmall",color:`${this.type}-dark`,weight:"bold","margin-block":"0"},this.label),i("cura-paragraph",{key:"dafbb9fbf6c834769aee9383018f9545acb10ea9",color:`${this.type}-darker`,size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},i("slot",{key:"a9b2b54151ca3b3ca206ef267e5e0f6bbba81b5d"})),i("slot",{key:"345dad781f7dd492b941bbe66d60ce57db7f538a",name:"actions"})),this.closeButton&&i("cura-icon",{key:"8ec9acc13ef3997b86de33e4ebbbb13df22ac81f",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.loader&&!!this.autoCloseDelay&&i("cura-loader-bar",{key:"99ecb5ffa81ac996281398f07c68018905406294",color:`${this.type}-base`,progress:this.progress})))}componentDidLoad(){this.openContainer();this.startAnimation()}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor(`neutral-purewhite`),"--neutral-base":window.CuraAPI.theme.colors.getColor(`neutral-base`,.2),"--primary-base":window.CuraAPI.theme.colors.getColor(`primary-base`),"--color-base":window.CuraAPI.theme.colors.getColor(`${this.type}-base`)})}getClasses(){const[t,e]=this.position.split("-");const i={};i["container"]=true;i[t]=true;i[e]=true;if(this.loader){i["loader"]=true}return i}getNameIcon(){const t={info:"infoCircle",success:"checkCircle",warning:"alertCircle",error:"alertTriangle"};return this.icon?this.icon:t[this.type]}openContainer(){this.container=this.host.shadowRoot.querySelector(".container");this.container.classList.add("active")}closeContainer(){this.container.classList.remove("active");setTimeout((()=>{this.host.remove()}),500)}startAnimation(){if(!!this.autoCloseDelay){if(this.loader){this.progress=0;let t=setInterval((()=>{if(this.progress>=100){clearInterval(t);this.closeContainer()}else{this.progress++}}),this.autoCloseDelay/100)}else{let t=setInterval((()=>{clearInterval(t);this.closeContainer()}),this.autoCloseDelay)}}}get host(){return o(this)}static get watchers(){return{type:["handleChangeType"],position:["handleChangeType"]}}};n.style=r;export{n as cura_toast};
2
+ //# sourceMappingURL=p-27afaed4.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["curaToastCss","CuraToastStyle0","CuraToast","this","handleClose","close","emit","closeContainer","handleChangeType","setStyle","connectedCallback","render","h","Host","key","class","getClasses","style","styles","name","getNameIcon","size","color","type","level","weight","label","marginBlock","lineHeight","closeButton","onClick","loader","autoCloseDelay","progress","componentDidLoad","openContainer","startAnimation","Object","assign","window","CuraAPI","theme","colors","getColor","firstPosition","secondPosition","position","split","classes","iconMapping","info","success","warning","error","icon","container","host","shadowRoot","querySelector","classList","add","remove","setTimeout","intervalId","setInterval","clearInterval"],"sources":["src/components/cura-toast/cura-toast.scss?tag=cura-toast&encapsulation=shadow","src/components/cura-toast/cura-toast.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n\n@mixin horizontalConfig($property) {\n #{$property}: 24px;\n\n &.center {\n #{$property}: -100%;\n left: 50%;\n transform: translateX(-50%);\n opacity: 0;\n transition: opacity 0.5s ease-in-out, #{$property} 0.5s ease-in-out;\n\n &.active {\n #{$property}: 24px;\n opacity: 1;\n }\n }\n}\n\n@mixin verticalConfig($property) {\n #{$property}: -100%;\n opacity: 0;\n transition: opacity 0.5s ease-in-out, #{$property} 0.5s ease-in-out;\n \n @include mobile-only() {\n right: unset;\n left: 50%;\n transform: translateX(-50%);\n }\n\n &.active {\n #{$property}: 24px;\n opacity: 1;\n }\n}\n\n:host {\n display: block;\n box-sizing: border-box;\n\n .container {\n position: fixed;\n display: flex;\n box-sizing: border-box;\n min-width: 328px;\n height: fit-content;\n padding: 16px;\n border: 1px solid var(--color-base);\n border-radius: 12px;\n background-color: var(--neutral-purewhite);\n overflow: hidden;\n @include shadow-level4();\n\n &.loader {\n padding: 16px 16px 20px;\n }\n\n &.top {\n @include horizontalConfig(top);\n }\n\n &.bottom {\n @include horizontalConfig(bottom);\n }\n\n &.left {\n @include verticalConfig(left);\n }\n\n &.right {\n @include verticalConfig(right);\n }\n\n .content {\n flex: 1 1 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .default-icon {\n margin-right: 12px;\n }\n\n .close-icon {\n margin-left: 12px;\n cursor: pointer;\n }\n }\n}","import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cura-toast',\n styleUrl: 'cura-toast.scss',\n shadow: true,\n})\nexport class CuraToast {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop() position: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' = 'top-right';\n @Prop({ reflect: true }) icon: string;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeButton = true;\n @Prop({ reflect: true }) loader = true;\n @Prop({ reflect: true }) autoCloseDelay = 10000;\n\n @State() styles = {};\n @State() progress = 0;\n\n @Event() close: EventEmitter<void>;\n\n @Watch('type')\n @Watch('position')\n handleChangeType() {\n this.setStyle();\n }\n\n container: HTMLElement;\n\n connectedCallback() {\n this.setStyle();\n }\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon class=\"default-icon\" name={this.getNameIcon()} size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n <cura-heading level={4} size=\"xsmall\" color={`${this.type}-dark`} weight=\"bold\" margin-block=\"0\">\n {this.label}\n </cura-heading>\n <cura-paragraph color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n {this.closeButton && <cura-icon class=\"close-icon\" name=\"close\" size={16} color=\"error-dark\" onClick={this.handleClose}></cura-icon>}\n {this.loader && !!this.autoCloseDelay && <cura-loader-bar color={`${this.type}-base`} progress={this.progress}></cura-loader-bar>}\n </div>\n </Host>\n );\n }\n\n componentDidLoad() {\n this.openContainer();\n this.startAnimation();\n }\n\n setStyle() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor(`neutral-purewhite`),\n '--neutral-base': window.CuraAPI.theme.colors.getColor(`neutral-base`, 0.2),\n '--primary-base': window.CuraAPI.theme.colors.getColor(`primary-base`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.type}-base`)\n }\n }\n\n getClasses() {\n const [firstPosition, secondPosition] = this.position.split('-');\n const classes = {};\n\n classes['container'] = true;\n classes[firstPosition] = true;\n classes[secondPosition] = true;\n\n if (this.loader) {\n classes['loader'] = true;\n }\n\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n openContainer() {\n this.container = this.host.shadowRoot.querySelector('.container') as HTMLElement;\n this.container.classList.add('active');\n }\n\n closeContainer() {\n this.container.classList.remove('active');\n setTimeout(() => {\n this.host.remove();\n }, 500);\n }\n\n handleClose = () => {\n this.close.emit();\n this.closeContainer();\n };\n\n startAnimation() {\n if (!!this.autoCloseDelay) {\n if (this.loader) {\n this.progress = 0;\n let intervalId = setInterval(() => {\n if (this.progress >= 100) {\n clearInterval(intervalId);\n this.closeContainer();\n } else {\n this.progress++;\n }\n }, this.autoCloseDelay/100);\n } else {\n let intervalId = setInterval(() => {\n clearInterval(intervalId);\n this.closeContainer();\n }, this.autoCloseDelay);\n }\n }\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAe,8hDACrB,MAAAC,EAAeD,E,MCMFE,EAAS,M,sDAqGpBC,KAAAC,YAAc,KACZD,KAAKE,MAAMC,OACXH,KAAKI,gBAAgB,E,UApGkC,O,cACsD,Y,0DAGxE,K,YACL,K,oBACQ,I,YAExB,G,cACE,C,CAMpB,gBAAAC,GACEL,KAAKM,U,CAKP,iBAAAC,GACEP,KAAKM,U,CAGP,MAAAE,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,2CAAKC,MAAOZ,KAAKa,aAAcC,MAAOd,KAAKe,QACzCN,EAAA,aAAAE,IAAA,2CAAWC,MAAM,eAAeI,KAAMhB,KAAKiB,cAAeC,KAAM,GAAIC,MAAO,GAAGnB,KAAKoB,cACnFX,EAAA,OAAAE,IAAA,2CAAKC,MAAM,WACTH,EAAA,gBAAAE,IAAA,2CAAcU,MAAO,EAAGH,KAAK,SAASC,MAAO,GAAGnB,KAAKoB,YAAaE,OAAO,OAAM,eAAc,KAC1FtB,KAAKuB,OAERd,EAAA,kBAAAE,IAAA,2CAAgBQ,MAAO,GAAGnB,KAAKoB,cAAeF,KAAK,SAASM,YAAY,IAAIC,WAAW,WACrFhB,EAAA,QAAAE,IAAA,8CAEFF,EAAA,QAAAE,IAAA,2CAAMK,KAAK,aAEZhB,KAAK0B,aAAejB,EAAA,aAAAE,IAAA,2CAAWC,MAAM,aAAaI,KAAK,QAAQE,KAAM,GAAIC,MAAM,aAAaQ,QAAS3B,KAAKC,cAC1GD,KAAK4B,UAAY5B,KAAK6B,gBAAkBpB,EAAA,mBAAAE,IAAA,2CAAiBQ,MAAO,GAAGnB,KAAKoB,YAAaU,SAAU9B,KAAK8B,Y,CAM7G,gBAAAC,GACE/B,KAAKgC,gBACLhC,KAAKiC,gB,CAGP,QAAA3B,GACEN,KAAKe,OAAMmB,OAAAC,OAAAD,OAAAC,OAAA,GACNnC,KAAKe,QAAM,CACd,sBAAuBqB,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,qBAC5D,iBAAkBJ,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,eAAgB,IACvE,iBAAkBJ,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,gBACvD,eAAgBJ,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,GAAGxC,KAAKoB,c,CAIjE,UAAAP,GACE,MAAO4B,EAAeC,GAAkB1C,KAAK2C,SAASC,MAAM,KAC5D,MAAMC,EAAU,GAEhBA,EAAQ,aAAe,KACvBA,EAAQJ,GAAiB,KACzBI,EAAQH,GAAkB,KAE1B,GAAI1C,KAAK4B,OAAQ,CACfiB,EAAQ,UAAY,I,CAGtB,OAAOA,C,CAGT,WAAA5B,GACE,MAAM6B,EAAc,CAClBC,KAAM,aACNC,QAAS,cACTC,QAAS,cACTC,MAAO,iBAET,OAAOlD,KAAKmD,KAAOnD,KAAKmD,KAAOL,EAAY9C,KAAKoB,K,CAGlD,aAAAY,GACEhC,KAAKoD,UAAYpD,KAAKqD,KAAKC,WAAWC,cAAc,cACpDvD,KAAKoD,UAAUI,UAAUC,IAAI,S,CAG/B,cAAArD,GACEJ,KAAKoD,UAAUI,UAAUE,OAAO,UAChCC,YAAW,KACT3D,KAAKqD,KAAKK,QAAQ,GACjB,I,CAQL,cAAAzB,GACE,KAAMjC,KAAK6B,eAAgB,CACzB,GAAI7B,KAAK4B,OAAQ,CACf5B,KAAK8B,SAAW,EAChB,IAAI8B,EAAaC,aAAY,KAC3B,GAAI7D,KAAK8B,UAAY,IAAK,CACxBgC,cAAcF,GACd5D,KAAKI,gB,KACA,CACLJ,KAAK8B,U,IAEN9B,KAAK6B,eAAe,I,KAClB,CACL,IAAI+B,EAAaC,aAAY,KAC3BC,cAAcF,GACd5D,KAAKI,gBAAgB,GACpBJ,KAAK6B,e","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as i,H as r,c as e}from"./p-312791fb.js";const s=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;border-width:0px;border:2px solid transparent}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 6.12px) calc(var(--base-spacing) * 9.96px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 33.7px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3.44px) calc(var(--base-spacing) * 9.96px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 29.95px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 3.24px) calc(var(--base-spacing) * 7.44px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 21.67px)}:host button:not(.isLoading).large,:host a:not(.isLoading).large{padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 13px)}:host button:not(.isLoading).medium,:host a:not(.isLoading).medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 11px)}:host button:not(.isLoading).small,:host a:not(.isLoading).small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button cura-label,:host a cura-label{flex:1;font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.2em;text-align:var(--text-align, "left")}:host button.medium cura-label,:host a.medium cura-label{font-size:1.14em}:host button.small cura-label,:host a.small cura-label{font-size:1em}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium.icon-left cura-icon,:host a.medium.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.7px)}:host button.medium.icon-right cura-icon,:host a.medium.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.7px)}:host button.small.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.5px)}:host button.small.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.5px)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.icon-only,:host a.icon-only{padding:calc(var(--base-spacing) * 3.5px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--base-spacing) * 2.75px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--base-spacing) * 1.5px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0.3}:host button.isLoading.icon-only .button-container,:host a.isLoading.icon-only .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}:host button.isLoading cura-label,:host a.isLoading cura-label{display:none}';const n=s;const u=class{constructor(i){t(this,i);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.type="button";this.size="large";this.disabled=false;this.isLoading=false;this.iconName=undefined;this.iconset="default";this.iconPosition="left";this.iconOnly=false;this.href=undefined;this.target="_self";this.color="primary";this.fontColor="light";this.textAlign="left";this.hovered=false;this.styles={}}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing();this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor(`neutral-white`);this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor(`neutral-base`);this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor(`neutral-dark`);this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium;this.styles["--text-align"]=this.textAlign}getClasses(){const t={};t[`${this.size.toLowerCase()}`]=true;t[`icon-${this.iconPosition.toLowerCase()}`]=true;t[`icon-only`]=this.iconOnly;t["disabled"]=this.disabled;t["isLoading"]=this.isLoading;return t}getIcon(){if(!this.iconName||this.isLoading)return null;const t=this.size==="small"?16:this.size==="medium"?20:24;return i("cura-icon",{name:this.iconName,iconset:this.iconset,size:t,color:this.getSymbolColor()})}handleMouseEnter(){if(this.disabled)return;this.hovered=true}handleMouseLeave(){this.hovered=false}getSymbolColor(){if(this.disabled)return"neutral-dark";if(this.hovered)return this.fontColor==="light"?`${this.color}-darker`:`${this.color}-lighter`;return this.fontColor==="light"?"neutral-purewhite":`${this.color}-dark`}handleClick(t){if(this.disabled||this.isLoading){t.preventDefault();return}if(!this.href){if(this.type==="submit"&&this.internals.form)this.internals.form.submit();if(this.type==="reset"&&this.internals.form)this.internals.form.reset()}}render(){return i(r,{key:"eb208813f7743d71c826ea4e05c19933fdec34de"},this.href?i("a",{href:this.disabled?"":this.href,target:this.target,class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},i("span",{class:"button-container"},this.getIcon(),i("cura-label",{lineHeight:"0%",color:this.getSymbolColor()},i("slot",null))),i("cura-loader-circle",{size:this.size,color:this.fontColor==="light"?`${this.color}-dark`:"neutral-purewhite"})):i("button",{class:this.getClasses(),style:this.styles,disabled:this.disabled||null,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),type:this.type},i("span",{class:"button-container"},this.getIcon(),i("cura-label",{lineHeight:"0%",color:this.getSymbolColor()},i("slot",null))),i("cura-loader-circle",{size:this.size,color:this.fontColor==="light"?`${this.color}-dark`:"neutral-purewhite"})))}static get formAssociated(){return true}static get watchers(){return{fontColor:["getSymbolColor"],color:["getSymbolColor"]}}};u.style=n;function a(t){return typeof t==="string"||t instanceof String}function o(t){var i;return typeof t==="object"&&t!=null&&(t==null||(i=t.constructor)==null?void 0:i.name)==="Object"}function h(t,i){if(Array.isArray(i))return h(t,((t,r)=>i.includes(r)));return Object.entries(t).reduce(((t,r)=>{let[e,s]=r;if(i(s,e))t[e]=s;return t}),{})}const l={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function p(t){switch(t){case l.LEFT:return l.FORCE_LEFT;case l.RIGHT:return l.FORCE_RIGHT;default:return t}}function c(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function d(t,i){if(i===t)return true;const r=Array.isArray(i),e=Array.isArray(t);let s;if(r&&e){if(i.length!=t.length)return false;for(s=0;s<i.length;s++)if(!d(i[s],t[s]))return false;return true}if(r!=e)return false;if(i&&t&&typeof i==="object"&&typeof t==="object"){const r=i instanceof Date,e=t instanceof Date;if(r&&e)return i.getTime()==t.getTime();if(r!=e)return false;const n=i instanceof RegExp,u=t instanceof RegExp;if(n&&u)return i.toString()==t.toString();if(n!=u)return false;const a=Object.keys(i);for(s=0;s<a.length;s++)if(!Object.prototype.hasOwnProperty.call(t,a[s]))return false;for(s=0;s<a.length;s++)if(!d(t[a[s]],i[a[s]]))return false;return true}else if(i&&t&&typeof i==="function"&&typeof t==="function"){return i.toString()===t.toString()}return false}class f{constructor(t){Object.assign(this,t);while(this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos)){--this.oldSelection.start}if(this.insertedCount){while(this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end)){if(this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end)++this.oldSelection.end;else++this.cursorPos}}}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){if(!this.removedCount||this.insertedCount)return l.NONE;return(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?l.RIGHT:l.LEFT}}function g(t,i){return new g.InputMask(t,i)}function b(t){if(t==null)throw new Error("mask property should be defined");if(t instanceof RegExp)return g.MaskedRegExp;if(a(t))return g.MaskedPattern;if(t===Date)return g.MaskedDate;if(t===Number)return g.MaskedNumber;if(Array.isArray(t)||t===Array)return g.MaskedDynamic;if(g.Masked&&t.prototype instanceof g.Masked)return t;if(g.Masked&&t instanceof g.Masked)return t.constructor;if(t instanceof Function)return g.MaskedFunction;console.warn("Mask not found for mask",t);return g.Masked}function m(t){if(!t)throw new Error("Options in not defined");if(g.Masked){if(t.prototype instanceof g.Masked)return{mask:t};const{mask:i=undefined,...r}=t instanceof g.Masked?{mask:t}:o(t)&&t.mask instanceof g.Masked?t:{};if(i){const t=i.mask;return{...h(i,((t,i)=>!i.startsWith("_"))),mask:i.constructor,_mask:t,...r}}}if(!o(t))return{mask:t};return{...t}}function x(t){if(g.Masked&&t instanceof g.Masked)return t;const i=m(t);const r=b(i.mask);if(!r)throw new Error("Masked class is not found for provided mask "+i.mask+", appropriate module needs to be imported manually before creating mask.");if(i.mask===r)delete i.mask;if(i._mask){i.mask=i._mask;delete i._mask}return new r(i)}g.createMask=x;class v{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t!=null?t:this.value.length}select(t,i){if(t==null||i==null||t===this.selectionStart&&i===this.selectionEnd)return;try{this._unsafeSelect(t,i)}catch{}}get isActive(){return false}}g.MaskElement=v;const w=90;const k=89;class A extends v{constructor(t){super();this.input=t;this._onKeydown=this._onKeydown.bind(this);this._onInput=this._onInput.bind(this);this._onBeforeinput=this._onBeforeinput.bind(this);this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,i,r;return(t=(i=(r=this.input).getRootNode)==null?void 0:i.call(r))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown);this.input.addEventListener("input",this._onInput);this.input.addEventListener("beforeinput",this._onBeforeinput);this.input.addEventListener("compositionend",this._onCompositionEnd);this.input.addEventListener("drop",t.drop);this.input.addEventListener("click",t.click);this.input.addEventListener("focus",t.focus);this.input.addEventListener("blur",t.commit);this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===w&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===k&&t.ctrlKey)){t.preventDefault();return this._handlers.redo(t)}if(this._handlers.undo&&t.keyCode===w&&(t.metaKey||t.ctrlKey)){t.preventDefault();return this._handlers.undo(t)}if(!t.isComposing)this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo){t.preventDefault();return this._handlers.undo(t)}if(t.inputType==="historyRedo"&&this._handlers.redo){t.preventDefault();return this._handlers.redo(t)}}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){if(!t.isComposing)this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown);this.input.removeEventListener("input",this._onInput);this.input.removeEventListener("beforeinput",this._onBeforeinput);this.input.removeEventListener("compositionend",this._onCompositionEnd);this.input.removeEventListener("drop",this._handlers.drop);this.input.removeEventListener("click",this._handlers.click);this.input.removeEventListener("focus",this._handlers.focus);this.input.removeEventListener("blur",this._handlers.commit);this._handlers={}}}g.HTMLMaskElement=A;class y extends A{constructor(t){super(t);this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,i){this.input.setSelectionRange(t,i)}get value(){return this.input.value}set value(t){this.input.value=t}}g.HTMLMaskElement=A;class C extends A{get _unsafeSelectionStart(){const t=this.rootElement;const i=t.getSelection&&t.getSelection();const r=i&&i.anchorOffset;const e=i&&i.focusOffset;if(e==null||r==null||r<e){return r}return e}get _unsafeSelectionEnd(){const t=this.rootElement;const i=t.getSelection&&t.getSelection();const r=i&&i.anchorOffset;const e=i&&i.focusOffset;if(e==null||r==null||r>e){return r}return e}_unsafeSelect(t,i){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,t);r.setEnd(this.input.lastChild||this.input,i);const e=this.rootElement;const s=e.getSelection&&e.getSelection();if(s){s.removeAllRanges();s.addRange(r)}}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}g.HTMLContenteditableMaskElement=C;class F{constructor(){this.states=[];this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){if(this.currentIndex<this.states.length-1)this.states.length=this.currentIndex+1;this.states.push(t);if(this.states.length>F.MAX_LENGTH)this.states.shift();this.currentIndex=this.states.length-1}go(t){this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1);return this.currentState}undo(){return this.go(-1)}redo(){return this.go(+1)}clear(){this.states.length=0;this.currentIndex=0}}F.MAX_LENGTH=100;class B{constructor(t,i){this.el=t instanceof v?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new C(t):new y(t);this.masked=x(i);this._listeners={};this._value="";this._unmaskedValue="";this._rawInputValue="";this.history=new F;this._saveSelection=this._saveSelection.bind(this);this._onInput=this._onInput.bind(this);this._onChange=this._onChange.bind(this);this._onDrop=this._onDrop.bind(this);this._onFocus=this._onFocus.bind(this);this._onClick=this._onClick.bind(this);this._onUndo=this._onUndo.bind(this);this._onRedo=this._onRedo.bind(this);this.alignCursor=this.alignCursor.bind(this);this.alignCursorFriendly=this.alignCursorFriendly.bind(this);this._bindEvents();this.updateValue();this._onChange()}maskEquals(t){var i;return t==null||((i=this.masked)==null?void 0:i.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof g.Masked)&&this.masked.constructor===b(t)){this.masked.updateOptions({mask:t});return}const i=t instanceof g.Masked?t:x({mask:t});i.unmaskedValue=this.masked.unmaskedValue;this.masked=i}get value(){return this._value}set value(t){if(this.value===t)return;this.masked.value=t;this.updateControl("auto")}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){if(this.unmaskedValue===t)return;this.masked.unmaskedValue=t;this.updateControl("auto")}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){if(this.rawInputValue===t)return;this.masked.rawInputValue=t;this.updateControl();this.alignCursor()}get typedValue(){return this.masked.typedValue}set typedValue(t){if(this.masked.typedValueEquals(t))return;this.masked.typedValue=t;this.updateControl("auto")}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){if(this.el)this.el.unbindEvents()}_fireEvent(t,i){const r=this._listeners[t];if(!r)return;r.forEach((t=>t(i)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){if(!this.el||!this.el.isActive)return;this.el.select(t,t);this._saveSelection()}_saveSelection(){if(this.displayValue!==this.el.value){console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.")}this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value;this._value=this.masked.value;this._unmaskedValue=this.masked.unmaskedValue;this._rawInputValue=this.masked.rawInputValue}updateControl(t){const i=this.masked.unmaskedValue;const r=this.masked.value;const e=this.masked.rawInputValue;const s=this.displayValue;const n=this.unmaskedValue!==i||this.value!==r||this._rawInputValue!==e;this._unmaskedValue=i;this._value=r;this._rawInputValue=e;if(this.el.value!==s)this.el.value=s;if(t==="auto")this.alignCursor();else if(t!=null)this.cursorPos=t;if(n)this._fireChangeEvents();if(!this._historyChanging&&(n||this.history.isEmpty))this.history.push({unmaskedValue:i,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:i,...r}=t;const e=!this.maskEquals(i);const s=this.masked.optionsIsChanged(r);if(e)this.mask=i;if(s)this.masked.updateOptions(r);if(e||s)this.updateControl()}updateCursor(t){if(t==null)return;this.cursorPos=t;this._delayUpdateCursor(t)}_delayUpdateCursor(t){this._abortUpdateCursor();this._changingCursorPos=t;this._cursorChanging=setTimeout((()=>{if(!this.el)return;this.cursorPos=this._changingCursorPos;this._abortUpdateCursor()}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent);if(this.masked.isComplete)this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){if(this._cursorChanging){clearTimeout(this._cursorChanging);delete this._cursorChanging}}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,l.LEFT))}alignCursorFriendly(){if(this.selectionStart!==this.cursorPos)return;this.alignCursor()}on(t,i){if(!this._listeners[t])this._listeners[t]=[];this._listeners[t].push(i);return this}off(t,i){if(!this._listeners[t])return this;if(!i){delete this._listeners[t];return this}const r=this._listeners[t].indexOf(i);if(r>=0)this._listeners[t].splice(r,1);return this}_onInput(t){this._inputEvent=t;this._abortUpdateCursor();const i=new f({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection});const r=this.masked.rawInputValue;const e=this.masked.splice(i.startChangePos,i.removed.length,i.inserted,i.removeDirection,{input:true,raw:true}).offset;const s=r===this.masked.rawInputValue?i.removeDirection:l.NONE;let n=this.masked.nearestInputPos(i.startChangePos+e,s);if(s!==l.NONE)n=this.masked.nearestInputPos(n,l.NONE);this.updateControl(n);delete this._inputEvent}_onChange(){if(this.displayValue!==this.el.value)this.updateValue();this.masked.doCommit();this.updateControl();this._saveSelection()}_onDrop(t){t.preventDefault();t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){if(!t)return;this._historyChanging=true;this.unmaskedValue=t.unmaskedValue;this.el.select(t.selection.start,t.selection.end);this._saveSelection();this._historyChanging=false}destroy(){this._unbindEvents();this._listeners.length=0;delete this.el}}g.InputMask=B;class E{static normalize(t){return Array.isArray(t)?t:[t,new E]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:false},t)}aggregate(t){this.inserted+=t.inserted;this.rawInserted+=t.rawInserted;this.tailShift+=t.tailShift;this.skip=this.skip||t.skip;return this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}g.ChangeDetails=E;class D{constructor(t,i,r){if(t===void 0){t=""}if(i===void 0){i=0}this.value=t;this.from=i;this.stop=r}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:true}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const i=this.value[0];this.value=this.value.slice(1);return i}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];this.value=this.value.slice(0,-1);return t}}class _{constructor(t){this._value="";this._update({..._.DEFAULTS,...t});this._initialized=true}updateOptions(t){if(!this.optionsIsChanged(t))return;this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:true})}resolve(t,i){if(i===void 0){i={input:true}}this.reset();this.append(t,i,"");this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){if(this.format){this.value=this.format(t,this)}else{this.unmaskedValue=String(t)}}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:true})}set rawInputValue(t){this.resolve(t,{raw:true})}get displayValue(){return this.value}get isComplete(){return true}get isFilled(){return this.isComplete}nearestInputPos(t,i){return t}totalInputPositions(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}return Math.min(this.displayValue.length,i-t)}extractInput(t,i,r){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}return this.displayValue.slice(t,i)}extractTail(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}return new D(this.extractInput(t,i),t)}appendTail(t){if(a(t))t=new D(String(t));return t.appendTo(this)}_appendCharRaw(t,i){if(!t)return new E;this._value+=t;return new E({inserted:t,rawInserted:t})}_appendChar(t,i,r){if(i===void 0){i={}}const e=this.state;let s;[t,s]=this.doPrepareChar(t,i);if(t){s=s.aggregate(this._appendCharRaw(t,i));if(!s.rawInserted&&this.autofix==="pad"){const r=this.state;this.state=e;let n=this.pad(i);const u=this._appendCharRaw(t,i);n=n.aggregate(u);if(u.rawInserted||n.equals(s)){s=n}else{this.state=r}}}if(s.inserted){let t;let n=this.doValidate(i)!==false;if(n&&r!=null){const i=this.state;if(this.overwrite===true){t=r.state;for(let t=0;t<s.rawInserted.length;++t){r.unshift(this.displayValue.length-s.tailShift)}}let e=this.appendTail(r);n=e.rawInserted.length===r.toString().length;if(!(n&&e.inserted)&&this.overwrite==="shift"){this.state=i;t=r.state;for(let t=0;t<s.rawInserted.length;++t){r.shift()}e=this.appendTail(r);n=e.rawInserted.length===r.toString().length}if(n&&e.inserted)this.state=i}if(!n){s=new E;this.state=e;if(r&&t)r.state=t}}return s}_appendPlaceholder(){return new E}_appendEager(){return new E}append(t,i,r){if(!a(t))throw new Error("value should be string");const e=a(r)?new D(String(r)):r;if(i!=null&&i.tail)i._beforeTailState=this.state;let s;[t,s]=this.doPrepare(t,i);for(let r=0;r<t.length;++r){const n=this._appendChar(t[r],i,e);if(!n.rawInserted&&!this.doSkipInvalid(t[r],i,e))break;s.aggregate(n)}if((this.eager===true||this.eager==="append")&&i!=null&&i.input&&t){s.aggregate(this._appendEager())}if(e!=null){s.tailShift+=this.appendTail(e).tailShift}return s}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}this._value=this.displayValue.slice(0,t)+this.displayValue.slice(i);return new E}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=true;const i=this.rawInputValue;const r=this.value;const e=t();this.rawInputValue=i;if(this.value&&this.value!==r&&r.indexOf(this.value)===0){this.append(r.slice(this.displayValue.length),{},"");this.doCommit()}delete this._refreshing;return e}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=true;const i=this.state;const r=t(this);this.state=i;delete this._isolated;return r}doSkipInvalid(t,i,r){return Boolean(this.skipInvalid)}doPrepare(t,i){if(i===void 0){i={}}return E.normalize(this.prepare?this.prepare(t,this,i):t)}doPrepareChar(t,i){if(i===void 0){i={}}return E.normalize(this.prepareChar?this.prepareChar(t,this,i):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){if(this.commit)this.commit(this.value,this)}splice(t,i,r,e,s){if(r===void 0){r=""}if(e===void 0){e=l.NONE}if(s===void 0){s={input:true}}const n=t+i;const u=this.extractTail(n);const a=this.eager===true||this.eager==="remove";let o;if(a){e=p(e);o=this.extractInput(0,n,{raw:true})}let h=t;const c=new E;if(e!==l.NONE){h=this.nearestInputPos(t,i>1&&t!==0&&!a?l.NONE:e);c.tailShift=h-t}c.aggregate(this.remove(h));if(a&&e!==l.NONE&&o===this.rawInputValue){if(e===l.FORCE_LEFT){let t;while(o===this.rawInputValue&&(t=this.displayValue.length)){c.aggregate(new E({tailShift:-1})).aggregate(this.remove(t-1))}}else if(e===l.FORCE_RIGHT){u.unshift()}}return c.aggregate(this.append(r,s,u))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!d(this,t)}typedValueEquals(t){const i=this.typedValue;return t===i||_.EMPTY_VALUES.includes(t)&&_.EMPTY_VALUES.includes(i)||(this.format?this.format(t,this)===this.format(this.typedValue,this):false)}pad(t){return new E}}_.DEFAULTS={skipInvalid:true};_.EMPTY_VALUES=[undefined,null,""];g.Masked=_;class z{constructor(t,i){if(t===void 0){t=[]}if(i===void 0){i=0}this.chunks=t;this.from=i}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=a(t)?new D(String(t)):t;const i=this.chunks[this.chunks.length-1];const r=i&&(i.stop===t.stop||t.stop==null)&&t.from===i.from+i.toString().length;if(t instanceof D){if(r){i.extend(t.toString())}else{this.chunks.push(t)}}else if(t instanceof z){if(t.stop==null){let i;while(t.chunks.length&&t.chunks[0].stop==null){i=t.chunks.shift();i.from+=t.from;this.extend(i)}}if(t.toString()){t.stop=t.blockIndex;this.chunks.push(t)}}}appendTo(t){if(!(t instanceof g.MaskedPattern)){const i=new D(this.toString());return i.appendTo(t)}const i=new E;for(let r=0;r<this.chunks.length;++r){const e=this.chunks[r];const s=t._mapPosToBlock(t.displayValue.length);const n=e.stop;let u;if(n!=null&&(!s||s.index<=n)){if(e instanceof z||t._stops.indexOf(n)>=0){i.aggregate(t._appendPlaceholder(n))}u=e instanceof z&&t._blocks[n]}if(u){const r=u.appendTail(e);i.aggregate(r);const s=e.toString().slice(r.rawInserted.length);if(s)i.aggregate(t.append(s,{tail:true}))}else{i.aggregate(t.append(e.toString(),{tail:true}))}}return i}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:i,...r}=t;Object.assign(this,r);this.chunks=i.map((t=>{const i="chunks"in t?new z:new D;i.state=t;return i}))}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const i=t!=null?t-this.from:t;let r=0;while(r<this.chunks.length){const t=this.chunks[r];const e=t.unshift(i);if(t.toString()){if(!e)break;++r}else{this.chunks.splice(r,1)}if(e)return e}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;while(0<=t){const i=this.chunks[t];const r=i.shift();if(i.toString()){if(!r)break;--t}else{this.chunks.splice(t,1)}if(r)return r}return""}}class I{constructor(t,i){this.masked=t;this._log=[];const{offset:r,index:e}=t._mapPosToBlock(i)||(i<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r;this.index=e;this.ok=false}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();if(t)this.state=t;return t}bindBlock(){if(this.block)return;if(this.index<0){this.index=0;this.offset=0}if(this.index>=this.masked._blocks.length){this.index=this.masked._blocks.length-1;this.offset=this.block.displayValue.length}}_pushLeft(t){this.pushState();for(this.bindBlock();0<=this.index;--this.index,this.offset=((i=this.block)==null?void 0:i.displayValue.length)||0){var i;if(t())return this.ok=true}return this.ok=false}_pushRight(t){this.pushState();for(this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0){if(t())return this.ok=true}return this.ok=false}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(this.block.isFixed||!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,l.FORCE_LEFT);if(this.offset!==0)return true}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(this.block.isFixed)return;this.offset=this.block.nearestInputPos(this.offset,l.LEFT);return true}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(this.block.isFixed||this.block.isOptional&&!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,l.LEFT);return true}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(this.block.isFixed||!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,l.FORCE_RIGHT);if(this.offset!==this.block.value.length)return true}))}pushRightBeforeInput(){return this._pushRight((()=>{if(this.block.isFixed)return;this.offset=this.block.nearestInputPos(this.offset,l.NONE);return true}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(this.block.isFixed||this.block.isOptional&&!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,l.NONE);return true}))}}class S{constructor(t){Object.assign(this,t);this._value="";this.isFixed=true}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=false;this._value=""}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this._value.length}this._value=this._value.slice(0,t)+this._value.slice(i);if(!this._value)this._isRawInput=false;return new E}nearestInputPos(t,i){if(i===void 0){i=l.NONE}const r=0;const e=this._value.length;switch(i){case l.LEFT:case l.FORCE_LEFT:return r;case l.NONE:case l.RIGHT:case l.FORCE_RIGHT:default:return e}}totalInputPositions(t,i){if(t===void 0){t=0}if(i===void 0){i=this._value.length}return this._isRawInput?i-t:0}extractInput(t,i,r){if(t===void 0){t=0}if(i===void 0){i=this._value.length}if(r===void 0){r={}}return r.raw&&this._isRawInput&&this._value.slice(t,i)||""}get isComplete(){return true}get isFilled(){return Boolean(this._value)}_appendChar(t,i){if(i===void 0){i={}}if(this.isFilled)return new E;const r=this.eager===true||this.eager==="append";const e=this.char===t;const s=e&&(this.isUnmasking||i.input||i.raw)&&(!i.raw||!r)&&!i.tail;const n=new E({inserted:this.char,rawInserted:s?this.char:""});this._value=this.char;this._isRawInput=s&&(i.raw||i.input);return n}_appendEager(){return this._appendChar(this.char,{tail:true})}_appendPlaceholder(){const t=new E;if(this.isFilled)return t;this._value=t.inserted=this.char;return t}extractTail(){return new D("")}appendTail(t){if(a(t))t=new D(String(t));return t.appendTo(this)}append(t,i,r){const e=this._appendChar(t[0],i);if(r!=null){e.tailShift+=this.appendTail(r).tailShift}return e}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value;this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class V{constructor(t){const{parent:i,isOptional:r,placeholderChar:e,displayChar:s,lazy:n,eager:u,...a}=t;this.masked=x(a);Object.assign(this,{parent:i,isOptional:r,placeholderChar:e,displayChar:s,lazy:n,eager:u})}reset(){this.isFilled=false;this.masked.reset()}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this.value.length}if(t===0&&i>=1){this.isFilled=false;return this.masked.remove(t,i)}return new E}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,i){if(i===void 0){i={}}if(this.isFilled)return new E;const r=this.masked.state;let e=this.masked._appendChar(t,this.currentMaskFlags(i));if(e.inserted&&this.doValidate(i)===false){e=new E;this.masked.state=r}if(!e.inserted&&!this.isOptional&&!this.lazy&&!i.input){e.inserted=this.placeholderChar}e.skip=!e.inserted&&!this.isOptional;this.isFilled=Boolean(e.inserted);return e}append(t,i,r){return this.masked.append(t,this.currentMaskFlags(i),r)}_appendPlaceholder(){if(this.isFilled||this.isOptional)return new E;this.isFilled=true;return new E({inserted:this.placeholderChar})}_appendEager(){return new E}extractTail(t,i){return this.masked.extractTail(t,i)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,i,r){if(t===void 0){t=0}if(i===void 0){i=this.value.length}return this.masked.extractInput(t,i,r)}nearestInputPos(t,i){if(i===void 0){i=l.NONE}const r=0;const e=this.value.length;const s=Math.min(Math.max(t,r),e);switch(i){case l.LEFT:case l.FORCE_LEFT:return this.isComplete?s:r;case l.RIGHT:case l.FORCE_RIGHT:return this.isComplete?s:e;case l.NONE:default:return s}}totalInputPositions(t,i){if(t===void 0){t=0}if(i===void 0){i=this.value.length}return this.value.slice(t,i).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked;this.isFilled=t.isFilled}currentMaskFlags(t){var i;return{...t,_beforeTailState:(t==null||(i=t._beforeTailState)==null?void 0:i.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new E}}V.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class M extends _{updateOptions(t){super.updateOptions(t)}_update(t){const i=t.mask;if(i)t.validate=t=>t.search(i)>=0;super._update(t)}}g.MaskedRegExp=M;class L extends _{constructor(t){super({...L.DEFAULTS,...t,definitions:Object.assign({},V.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions);super._update(t);this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[];this.exposeBlock=undefined;this._stops=[];this._maskedBlocks={};const i=this.mask;if(!i||!t)return;let r=false;let e=false;for(let s=0;s<i.length;++s){if(this.blocks){const t=i.slice(s);const r=Object.keys(this.blocks).filter((i=>t.indexOf(i)===0));r.sort(((t,i)=>i.length-t.length));const e=r[0];if(e){const{expose:t,repeat:i,...r}=m(this.blocks[e]);const n={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...r,repeat:i,parent:this};const u=i!=null?new g.RepeatBlock(n):x(n);if(u){this._blocks.push(u);if(t)this.exposeBlock=u;if(!this._maskedBlocks[e])this._maskedBlocks[e]=[];this._maskedBlocks[e].push(this._blocks.length-1)}s+=e.length-1;continue}}let n=i[s];let u=n in t;if(n===L.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){r=!r;continue}if(n==="["||n==="]"){e=!e;continue}if(n===L.ESCAPE_CHAR){++s;n=i[s];if(!n)break;u=false}const a=u?new V({isOptional:e,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...m(t[n]),parent:this}):new S({char:n,eager:this.eager,isUnmasking:r});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t){this.reset();return}const{_blocks:i,...r}=t;this._blocks.forEach(((t,r)=>t.state=i[r]));super.state=r}reset(){super.reset();this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit()));super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,i)=>t+=i.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t;this.appendTail(i);this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,i)=>t+=i.value),"")}set value(t){if(this.exposeBlock){const i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t;this.appendTail(i);this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t;this.appendTail(i);this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,i)=>t+=i.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const i=new E;let r=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(r==null)return i;if(this._blocks[r].isFilled)++r;for(let t=r;t<this._blocks.length;++t){const r=this._blocks[t]._appendEager();if(!r.inserted)break;i.aggregate(r)}return i}_appendCharRaw(t,i){if(i===void 0){i={}}const r=this._mapPosToBlock(this.displayValue.length);const e=new E;if(!r)return e;for(let n=r.index,u;u=this._blocks[n];++n){var s;const r=u._appendChar(t,{...i,_beforeTailState:(s=i._beforeTailState)==null||(s=s._blocks)==null?void 0:s[n]});e.aggregate(r);if(r.consumed)break}return e}extractTail(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}const r=new z;if(t===i)return r;this._forEachBlocksInRange(t,i,((t,i,e,s)=>{const n=t.extractTail(e,s);n.stop=this._findStopBefore(i);n.from=this._blockStartPos(i);if(n instanceof z)n.blockIndex=i;r.extend(n)}));return r}extractInput(t,i,r){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}if(r===void 0){r={}}if(t===i)return"";let e="";this._forEachBlocksInRange(t,i,((t,i,s,n)=>{e+=t.extractInput(s,n,r)}));return e}_findStopBefore(t){let i;for(let r=0;r<this._stops.length;++r){const e=this._stops[r];if(e<=t)i=e;else break}return i}_appendPlaceholder(t){const i=new E;if(this.lazy&&t==null)return i;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return i;const e=r.index;const s=t!=null?t:this._blocks.length;this._blocks.slice(e,s).forEach((r=>{if(!r.lazy||t!=null){var e;i.aggregate(r._appendPlaceholder((e=r._blocks)==null?void 0:e.length))}}));return i}_mapPosToBlock(t){let i="";for(let r=0;r<this._blocks.length;++r){const e=this._blocks[r];const s=i.length;i+=e.displayValue;if(t<=i.length){return{index:r,offset:t-s}}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,i)=>t+=i.displayValue.length),0)}_forEachBlocksInRange(t,i,r){if(i===void 0){i=this.displayValue.length}const e=this._mapPosToBlock(t);if(e){const t=this._mapPosToBlock(i);const s=t&&e.index===t.index;const n=e.offset;const u=t&&s?t.offset:this._blocks[e.index].displayValue.length;r(this._blocks[e.index],e.index,n,u);if(t&&!s){for(let i=e.index+1;i<t.index;++i){r(this._blocks[i],i,0,this._blocks[i].displayValue.length)}r(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}const r=super.remove(t,i);this._forEachBlocksInRange(t,i,((t,i,e,s)=>{r.aggregate(t.remove(e,s))}));return r}nearestInputPos(t,i){if(i===void 0){i=l.NONE}if(!this._blocks.length)return 0;const r=new I(this,t);if(i===l.NONE){if(r.pushRightBeforeInput())return r.pos;r.popState();if(r.pushLeftBeforeInput())return r.pos;return this.displayValue.length}if(i===l.LEFT||i===l.FORCE_LEFT){if(i===l.LEFT){r.pushRightBeforeFilled();if(r.ok&&r.pos===t)return t;r.popState()}r.pushLeftBeforeInput();r.pushLeftBeforeRequired();r.pushLeftBeforeFilled();if(i===l.LEFT){r.pushRightBeforeInput();r.pushRightBeforeRequired();if(r.ok&&r.pos<=t)return r.pos;r.popState();if(r.ok&&r.pos<=t)return r.pos;r.popState()}if(r.ok)return r.pos;if(i===l.FORCE_LEFT)return 0;r.popState();if(r.ok)return r.pos;r.popState();if(r.ok)return r.pos;return 0}if(i===l.RIGHT||i===l.FORCE_RIGHT){r.pushRightBeforeInput();r.pushRightBeforeRequired();if(r.pushRightBeforeFilled())return r.pos;if(i===l.FORCE_RIGHT)return this.displayValue.length;r.popState();if(r.ok)return r.pos;r.popState();if(r.ok)return r.pos;return this.nearestInputPos(t,l.LEFT)}return t}totalInputPositions(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}let r=0;this._forEachBlocksInRange(t,i,((t,i,e,s)=>{r+=t.totalInputPositions(e,s)}));return r}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const i=this._maskedBlocks[t];if(!i)return[];return i.map((t=>this._blocks[t]))}pad(t){const i=new E;this._forEachBlocksInRange(0,this.displayValue.length,(r=>i.aggregate(r.pad(t))));return i}}L.DEFAULTS={..._.DEFAULTS,lazy:true,placeholderChar:"_"};L.STOP_CHAR="`";L.ESCAPE_CHAR="\\";L.InputDefinition=V;L.FixedDefinition=S;g.MaskedPattern=L;class O extends L{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:i=this.to||0,from:r=this.from||0,maxLength:e=this.maxLength||0,autofix:s=this.autofix,...n}=t;this.to=i;this.from=r;this.maxLength=Math.max(String(i).length,e);this.autofix=s;const u=String(this.from).padStart(this.maxLength,"0");const a=String(this.to).padStart(this.maxLength,"0");let o=0;while(o<a.length&&a[o]===u[o])++o;n.mask=a.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o);super._update(n)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let i="";let r="";const[,e,s]=t.match(/^(\D*)(\d*)(\D*)/)||[];if(s){i="0".repeat(e.length)+s;r="9".repeat(e.length)+s}i=i.padEnd(this.maxLength,"0");r=r.padEnd(this.maxLength,"9");return[i,r]}doPrepareChar(t,i){if(i===void 0){i={}}let r;[t,r]=super.doPrepareChar(t.replace(/\D/g,""),i);if(!t)r.skip=!this.isComplete;return[t,r]}_appendCharRaw(t,i){if(i===void 0){i={}}if(!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,i);const r=String(this.from).padStart(this.maxLength,"0");const e=String(this.to).padStart(this.maxLength,"0");const[s,n]=this.boundaries(this.value+t);if(Number(n)<this.from)return super._appendCharRaw(r[this.value.length],i);if(Number(s)>this.to){if(!i.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength){return super._appendCharRaw(r[this.value.length],i).aggregate(this._appendCharRaw(t,i))}return super._appendCharRaw(e[this.value.length],i)}return super._appendCharRaw(t,i)}doValidate(t){const i=this.value;const r=i.search(/[^0]/);if(r===-1&&i.length<=this._matchFrom)return true;const[e,s]=this.boundaries(i);return this.from<=Number(s)&&Number(e)<=this.to&&super.doValidate(t)}pad(t){const i=new E;if(this.value.length===this.maxLength)return i;const r=this.value;const e=this.maxLength-this.value.length;if(e){this.reset();for(let r=0;r<e;++r){i.aggregate(super._appendCharRaw("0",t))}r.split("").forEach((t=>this._appendCharRaw(t)))}return i}}g.MaskedRange=O;const R="d{.}`m{.}`Y";class T extends L{static extractPatternOptions(t){const{mask:i,pattern:r,...e}=t;return{...e,mask:a(i)?i:r}}constructor(t){super(T.extractPatternOptions({...T.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:i,pattern:r,blocks:e,...s}={...T.DEFAULTS,...t};const n=Object.assign({},T.GET_DEFAULT_BLOCKS());if(t.min)n.Y.from=t.min.getFullYear();if(t.max)n.Y.to=t.max.getFullYear();if(t.min&&t.max&&n.Y.from===n.Y.to){n.m.from=t.min.getMonth()+1;n.m.to=t.max.getMonth()+1;if(n.m.from===n.m.to){n.d.from=t.min.getDate();n.d.to=t.max.getDate()}}Object.assign(n,this.blocks,e);super._update({...s,mask:a(i)?i:r,blocks:n})}doValidate(t){const i=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&i!=null&&(this.min==null||this.min<=i)&&(this.max==null||i<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(T.extractPatternOptions(t))}}T.GET_DEFAULT_BLOCKS=()=>({d:{mask:O,from:1,to:31,maxLength:2},m:{mask:O,from:1,to:12,maxLength:2},Y:{mask:O,from:1900,to:9999}});T.DEFAULTS={...L.DEFAULTS,mask:Date,pattern:R,format:(t,i)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0");const e=String(t.getMonth()+1).padStart(2,"0");const s=t.getFullYear();return[r,e,s].join(".")},parse:(t,i)=>{const[r,e,s]=t.split(".").map(Number);return new Date(s,e-1,r)}};g.MaskedDate=T;class P extends _{constructor(t){super({...P.DEFAULTS,...t});this.currentMask=undefined}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t);if("mask"in t){this.exposeMask=undefined;this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:i,...r}=m(t);const e=x({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});if(i)this.exposeMask=e;return e})):[]}}_appendCharRaw(t,i){if(i===void 0){i={}}const r=this._applyDispatch(t,i);if(this.currentMask){r.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(i)))}return r}_applyDispatch(t,i,r){if(t===void 0){t=""}if(i===void 0){i={}}if(r===void 0){r=""}const e=i.tail&&i._beforeTailState!=null?i._beforeTailState._value:this.value;const s=this.rawInputValue;const n=i.tail&&i._beforeTailState!=null?i._beforeTailState._rawInputValue:s;const u=s.slice(n.length);const a=this.currentMask;const o=new E;const h=a==null?void 0:a.state;this.currentMask=this.doDispatch(t,{...i},r);if(this.currentMask){if(this.currentMask!==a){this.currentMask.reset();if(n){this.currentMask.append(n,{raw:true});o.tailShift=this.currentMask.value.length-e.length}if(u){o.tailShift+=this.currentMask.append(u,{raw:true,tail:true}).tailShift}}else if(h){this.currentMask.state=h}}return o}_appendPlaceholder(){const t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendPlaceholder())}return t}_appendEager(){const t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendEager())}return t}appendTail(t){const i=new E;if(t)i.aggregate(this._applyDispatch("",{},t));return i.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var i,r;return{...t,_beforeTailState:((i=t._beforeTailState)==null?void 0:i.currentMaskRef)===this.currentMask&&((r=t._beforeTailState)==null?void 0:r.currentMask)||t._beforeTailState}}doDispatch(t,i,r){if(i===void 0){i={}}if(r===void 0){r=""}return this.dispatch(t,this,i,r)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,i){if(i===void 0){i={}}let[r,e]=super.doPrepare(t,i);if(this.currentMask){let t;[r,t]=super.doPrepare(r,this.currentMaskFlags(i));e=e.aggregate(t)}return[r,e]}doPrepareChar(t,i){if(i===void 0){i={}}let[r,e]=super.doPrepareChar(t,i);if(this.currentMask){let t;[r,t]=super.doPrepareChar(r,this.currentMaskFlags(i));e=e.aggregate(t)}return[r,e]}reset(){var t;(t=this.currentMask)==null||t.reset();this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){if(this.exposeMask){this.exposeMask.value=t;this.currentMask=this.exposeMask;this._applyDispatch()}else super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){if(this.exposeMask){this.exposeMask.unmaskedValue=t;this.currentMask=this.exposeMask;this._applyDispatch()}else super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t;this.currentMask=this.exposeMask;this._applyDispatch();return}let i=String(t);if(this.currentMask){this.currentMask.typedValue=t;i=this.currentMask.unmaskedValue}this.unmaskedValue=i}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isComplete)}get isFilled(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isFilled)}remove(t,i){const r=new E;if(this.currentMask){r.aggregate(this.currentMask.remove(t,i)).aggregate(this._applyDispatch())}return r}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:i,currentMaskRef:r,currentMask:e,...s}=t;if(i)this.compiledMasks.forEach(((t,r)=>t.state=i[r]));if(r!=null){this.currentMask=r;this.currentMask.state=e}super.state=s}extractInput(t,i,r){return this.currentMask?this.currentMask.extractInput(t,i,r):""}extractTail(t,i){return this.currentMask?this.currentMask.extractTail(t,i):super.extractTail(t,i)}doCommit(){if(this.currentMask)this.currentMask.doCommit();super.doCommit()}nearestInputPos(t,i){return this.currentMask?this.currentMask.nearestInputPos(t,i):super.nearestInputPos(t,i)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((i,r)=>{if(!t[r])return;const{mask:e,...s}=t[r];return d(i,s)&&i.maskEquals(e)})):super.maskEquals(t)}typedValueEquals(t){var i;return Boolean((i=this.currentMask)==null?void 0:i.typedValueEquals(t))}}P.DEFAULTS={..._.DEFAULTS,dispatch:(t,i,r,e)=>{if(!i.compiledMasks.length)return;const s=i.rawInputValue;const n=i.compiledMasks.map(((n,u)=>{const a=i.currentMask===n;const o=a?n.displayValue.length:n.nearestInputPos(n.displayValue.length,l.FORCE_LEFT);if(n.rawInputValue!==s){n.reset();n.append(s,{raw:true})}else if(!a){n.remove(o)}n.append(t,i.currentMaskFlags(r));n.appendTail(e);return{index:u,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(o,n.nearestInputPos(n.displayValue.length,l.FORCE_LEFT)))}}));n.sort(((t,i)=>i.weight-t.weight||i.totalInputPositions-t.totalInputPositions));return i.compiledMasks[n[0].index]}};g.MaskedDynamic=P;class j extends L{constructor(t){super({...j.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:i,...r}=t;if(i){const t=i.map((t=>t.length));const e=Math.min(...t);const s=Math.max(...t)-e;r.mask="*".repeat(e);if(s)r.mask+="["+"*".repeat(s)+"]";this.enum=i}super._update(r)}_appendCharRaw(t,i){if(i===void 0){i={}}const r=Math.min(this.nearestInputPos(0,l.FORCE_RIGHT),this.value.length);const e=this.enum.filter((i=>this.matchValue(i,this.unmaskedValue+t,r)));if(e.length){if(e.length===1){this._forEachBlocksInRange(0,this.value.length,((t,r)=>{const s=e[0][r];if(r>=this.value.length||s===t.value)return;t.reset();t._appendChar(s,i)}))}const t=super._appendCharRaw(e[0][this.value.length],i);if(e.length===1){e[0].slice(this.unmaskedValue.length).split("").forEach((i=>t.aggregate(super._appendCharRaw(i))))}return t}return new E({skip:!this.isComplete})}extractTail(t,i){if(t===void 0){t=0}return new D("",t)}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}if(t===i)return new E;const r=Math.min(super.nearestInputPos(0,l.FORCE_RIGHT),this.value.length);let e;for(e=t;e>=0;--e){const t=this.enum.filter((t=>this.matchValue(t,this.value.slice(r,e),r)));if(t.length>1)break}const s=super.remove(e,i);s.tailShift+=e-t;return s}get isComplete(){return this.enum.indexOf(this.value)>=0}}j.DEFAULTS={...L.DEFAULTS,matchValue:(t,i,r)=>t.indexOf(i,r)===r};g.MaskedEnum=j;class N extends _{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}g.MaskedFunction=N;var $;class q extends _{constructor(t){super({...q.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t);this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":"");const i="\\d*";const r=(this.scale?"("+c(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+i+r);this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(c).join("")+"]","g");this._thousandsSeparatorRegExp=new RegExp(c(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const i=t.split(this.radix);i[0]=i[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator);return i.join(this.radix)}doPrepareChar(t,i){if(i===void 0){i={}}const[r,e]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(i.input&&i.raw||!i.input&&!i.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),i);if(t&&!r)e.skip=true;if(r&&!this.allowPositive&&!this.value&&r!=="-")e.aggregate(this._appendChar("-"));return[r,e]}_separatorsCount(t,i){if(i===void 0){i=false}let r=0;for(let e=0;e<t;++e){if(this._value.indexOf(this.thousandsSeparator,e)===e){++r;if(i)t+=this.thousandsSeparator.length}}return r}_separatorsCountFromSlice(t){if(t===void 0){t=this._value}return this._separatorsCount(this._removeThousandsSeparators(t).length,true)}extractInput(t,i,r){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}[t,i]=this._adjustRangeWithSeparators(t,i);return this._removeThousandsSeparators(super.extractInput(t,i,r))}_appendCharRaw(t,i){if(i===void 0){i={}}const r=i.tail&&i._beforeTailState?i._beforeTailState._value:this._value;const e=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=t;const n=this.number;let u=!isNaN(n);let a=false;if(u){let t;if(this.min!=null&&this.min<0&&this.number<this.min)t=this.min;if(this.max!=null&&this.max>0&&this.number>this.max)t=this.max;if(t!=null){if(this.autofix){this._value=this.format(t,this).replace(q.UNMASKED_RADIX,this.radix);a||(a=s===this._value&&!i.tail)}else{u=false}}u&&(u=Boolean(this._value.match(this._numberRegExp)))}let o;if(!u){this._value=s;o=new E}else{o=new E({inserted:this._value.slice(s.length),rawInserted:a?"":t,skip:a})}this._value=this._insertThousandsSeparators(this._value);const h=i.tail&&i._beforeTailState?i._beforeTailState._value:this._value;const l=this._separatorsCountFromSlice(h);o.tailShift+=(l-e)*this.thousandsSeparator.length;return o}_findSeparatorAround(t){if(this.thousandsSeparator){const i=t-this.thousandsSeparator.length+1;const r=this.value.indexOf(this.thousandsSeparator,i);if(r<=t)return r}return-1}_adjustRangeWithSeparators(t,i){const r=this._findSeparatorAround(t);if(r>=0)t=r;const e=this._findSeparatorAround(i);if(e>=0)i=e+this.thousandsSeparator.length;return[t,i]}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}[t,i]=this._adjustRangeWithSeparators(t,i);const r=this.value.slice(0,t);const e=this.value.slice(i);const s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+e));const n=this._separatorsCountFromSlice(r);return new E({tailShift:(n-s)*this.thousandsSeparator.length})}nearestInputPos(t,i){if(!this.thousandsSeparator)return t;switch(i){case l.NONE:case l.LEFT:case l.FORCE_LEFT:{const r=this._findSeparatorAround(t-1);if(r>=0){const e=r+this.thousandsSeparator.length;if(t<e||this.value.length<=e||i===l.FORCE_LEFT){return r}}break}case l.RIGHT:case l.FORCE_RIGHT:{const i=this._findSeparatorAround(t);if(i>=0){return i+this.thousandsSeparator.length}}}return t}doCommit(){if(this.value){const t=this.number;let i=t;if(this.min!=null)i=Math.max(i,this.min);if(this.max!=null)i=Math.min(i,this.max);if(i!==t)this.unmaskedValue=this.format(i,this);let r=this.value;if(this.normalizeZeros)r=this._normalizeZeros(r);if(this.padFractionalZeros&&this.scale>0)r=this._padFractionalZeros(r);this._value=r}super.doCommit()}_normalizeZeros(t){const i=this._removeThousandsSeparators(t).split(this.radix);i[0]=i[0].replace(/^(\D*)(0*)(\d*)/,((t,i,r,e)=>i+e));if(t.length&&!/\d$/.test(i[0]))i[0]=i[0]+"0";if(i.length>1){i[1]=i[1].replace(/0*$/,"");if(!i[1].length)i.length=1}return this._insertThousandsSeparators(i.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const i=t.split(this.radix);if(i.length<2)i.push("");i[1]=i[1].padEnd(this.scale,"0");return i.join(this.radix)}doSkipInvalid(t,i,r){if(i===void 0){i={}}const e=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===q.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,i,r)&&!e}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,q.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(q.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||q.EMPTY_VALUES.includes(t)&&q.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}$=q;q.UNMASKED_RADIX=".";q.EMPTY_VALUES=[..._.EMPTY_VALUES,0];q.DEFAULTS={..._.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[$.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:true,padFractionalZeros:false,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:false,maximumFractionDigits:20})};g.MaskedNumber=q;const H={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function U(t,i,r){if(i===void 0){i=H.MASKED}if(r===void 0){r=H.MASKED}const e=x(t);return t=>e.runIsolated((e=>{e[i]=t;return e[r]}))}function G(t,i,r,e){return U(i,r,e)(t)}g.PIPE_TYPE=H;g.createPipe=U;g.pipe=G;class K extends L{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===Infinity?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:Infinity}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var i,r,e;const{repeat:s,...n}=m(t);this._blockOpts=Object.assign({},this._blockOpts,n);const u=x(this._blockOpts);this.repeat=(i=(r=s!=null?s:u.repeat)!=null?r:this.repeat)!=null?i:Infinity;super._update({mask:"m".repeat(Math.max(this.repeatTo===Infinity&&((e=this._blocks)==null?void 0:e.length)||0,this.repeatFrom)),blocks:{m:u},eager:u.eager,overwrite:u.overwrite,skipInvalid:u.skipInvalid,lazy:u.lazy,placeholderChar:u.placeholderChar,displayChar:u.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===Infinity||this._blocks.length<this.repeatTo){this._blocks.push(x(this._blockOpts));this.mask+="m";return this._blocks[this._blocks.length-1]}}_appendCharRaw(t,i){if(i===void 0){i={}}const r=new E;for(let a=(e=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?e:Math.max(this._blocks.length-1,0),o,h;o=(n=this._blocks[a])!=null?n:h=!h&&this._allocateBlock(a);++a){var e,s,n,u;const l=o._appendChar(t,{...i,_beforeTailState:(u=i._beforeTailState)==null||(u=u._blocks)==null?void 0:u[a]});if(l.skip&&h){this._blocks.pop();this.mask=this.mask.slice(1);break}r.aggregate(l);if(l.consumed)break}return r}_trimEmptyTail(t,i){var r,e;if(t===void 0){t=0}const s=Math.max(((r=this._mapPosToBlock(t))==null?void 0:r.index)||0,this.repeatFrom,0);let n;if(i!=null)n=(e=this._mapPosToBlock(i))==null?void 0:e.index;if(n==null)n=this._blocks.length-1;let u=0;for(let t=n;s<=t;--t,++u){if(this._blocks[t].unmaskedValue)break}if(u){this._blocks.splice(n-u+1,u);this.mask=this.mask.slice(u)}}reset(){super.reset();this._trimEmptyTail()}remove(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}const r=super.remove(t,i);this._trimEmptyTail(t,i);return r}totalInputPositions(t,i){if(t===void 0){t=0}if(i==null&&this.repeatTo===Infinity)return Infinity;return super.totalInputPositions(t,i)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length;this.mask=this.mask.slice(0,this._blocks.length);super.state=t}}g.RepeatBlock=K;try{globalThis.IMask=g}catch{}const Z={cpf_cnpj:{mask:[{mask:"000.000.000-00"},{mask:"00.000.000/0000-00"}],placeholderChar:"_"},cpf:{mask:"000.000.000-00",placeholderChar:"_"},cnpj:{mask:"00.000.000/0000-00",placeholderChar:"_"},phone:{mask:"(00) 00000-0000",blocks:{"(00)":{mask:"(00)",maxLength:2,placeholderChar:""},"00000":{mask:"00000",maxLength:5,placeholderChar:"_"},"-":{mask:"-"},"0000":{mask:"0000",maxLength:4,placeholderChar:"_"}},placeholderChar:"_"},date:{mask:Date,min:new Date(1900,0,1),max:new Date(2099,11,31),lazy:false,placeholderChar:"_"}};const Y=":host{display:block;box-sizing:border-box;width:100%}.required{color:var(--error-base)}.cura-input-group{width:100%;font-family:var(--font-family);text-align:left !important}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group cura-label{margin-bottom:8px}.cura-input-group .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group .cura-input-field cura-loader-circle{margin:0px 12px}.cura-input-group .cura-input-field .feedback-icon{padding-left:12px;padding-top:6px}.cura-input-group .cura-input-field .clear-button{padding-right:12px;cursor:pointer}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field input{color:var(--success-darker) !important}.cura-input-group.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.cura-input-group.success:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-input-group.success:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field input{color:var(--error-darker) !important}.cura-input-group.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.cura-input-group.error:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-input-group.error:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field{border-color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group:focus-within .cura-input-field{border:2px solid var(--info-base) !important;background-color:var(--neutral-purewhite);outline:none}.cura-input-group:focus-within .cura-input-field input{color:var(--neutral-black) !important}.cura-input-group.isLoading{cursor:wait}.cura-input-group.isLoading .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:var(--neutral-white) !important;border:2px solid var(--primary-base) !important}.cura-input-group.isLoading .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.isLoading .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.isLoading .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.isLoading .cura-input-field input{cursor:wait;color:var(--primary-base) !important}.cura-input-group.isLoading .cura-input-field input::placeholder{color:var(--primary-base) !important}.cura-input-group.disabled .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.cura-input-group.disabled .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.disabled .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.disabled .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.disabled .cura-input-field input{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field input::placeholder{color:var(--neutral-medium)}.cura-input-group.readOnly[read-only] .cura-input-field{cursor:default}.cura-input-group.readOnly[read-only] .cura-input-field input{cursor:default}.cura-input-group.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.transparent{background-color:transparent;padding:0px;max-height:80px}.cura-input-group.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px}.cura-input-group.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.transparent .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.transparent .cura-input-field input{color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.cura-input-group.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.cura-input-group.transparent .cura-input-field .feedback-icon{order:3;margin:0 20px 0 0}.cura-input-group.transparent:focus-within .cura-input-field{border:none !important;background-color:transparent !important}.cura-input-group.transparent:focus-within .cura-input-field input{border:none !important;outline:none}.cura-input-group.transparent .helper-text{margin-top:0px}.cura-input-group.transparent.transparent{display:flex;background-color:transparent;padding:0px;justify-content:start;align-items:center;max-height:80px;gap:4px}.cura-input-group.transparent.transparent .input-wrapper{display:flex;width:100%;flex-direction:column;justify-content:start}.cura-input-group.transparent.transparent cura-label{margin-bottom:4px}.cura-input-group.transparent.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px;overflow:hidden}.cura-input-group.transparent.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.transparent.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.transparent.transparent .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.transparent.transparent .cura-input-field input{order:1;color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.cura-input-group.transparent.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.cura-input-group.transparent.transparent .cura-input-field .clear-button{order:2;cursor:pointer;margin:0 20px 0 0;padding:0}.cura-input-group.transparent.transparent .cura-input-field .feedback-icon{padding:6px 0 0 0}.cura-input-group.transparent.transparent .cura-input-field cura-loader-circle{order:2;margin:0 20px 0 0}.cura-input-group.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field input{color:var(--error-darker) !important}.cura-input-group.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.cura-input-group.error.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.error.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.error.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.error.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.error.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.error:not(.transparent).large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-input-group.error:not(.transparent).large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error:not(.transparent).large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error:not(.transparent).large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field input{color:var(--success-darker) !important}.cura-input-group.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.cura-input-group.success.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.success.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.success.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.success.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.success.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.success:not(.transparent).large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-input-group.success:not(.transparent).large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success:not(.transparent).large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success:not(.transparent).large .cura-input-field .feedback-icon{padding-left:12px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}";const J=Y;const W=class{constructor(i){t(this,i);this.valueChange=e(this,"valueChange",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.mode="default";this.status="default";this.size="medium";this.type="text";this.inputMode="text";this.label="";this.name="";this.placeholder=null;this.value="";this.iconName="";this.helperText=undefined;this.disabled=false;this.required=false;this.maskPreset=undefined;this.maskRegex=undefined;this.maskAdvanced=undefined;this.maxlength=undefined;this.readOnly=false;this.isLoading=false;this.isHovered=false;this.isFocused=false;this.styles={};this.clearIcon=true;this.hideErrorIcon=false}formStateRestoreCallback(t){this.value=t.value;this.applyValueToMask();this.internals.setFormValue(this.value)}formAssociatedCallback(t){t.ariaLabel=this.label}formResetCallback(){this.handleClearInput();this.internals.setValidity({});this.internals.setFormValue("")}formDisabledCallback(t){this.disabled=t}connectedCallback(){this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor(`primary-base`);this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor(`neutral-white`);this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor(`neutral-black`);this.styles["--neutral-medium"]=window.CuraAPI.theme.colors.getColor(`neutral-medium`);this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor(`neutral-base`);this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor(`neutral-dark`);this.styles["--success-dark"]=window.CuraAPI.theme.colors.getColor(`success-dark`);this.styles["--success-darker"]=window.CuraAPI.theme.colors.getColor(`success-darker`);this.styles["--success-lighter"]=window.CuraAPI.theme.colors.getColor(`success-lighter`);this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor(`error-lighter`);this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor(`error-dark`);this.styles["--error-darker"]=window.CuraAPI.theme.colors.getColor(`error-darker`);this.styles["--error-base"]=window.CuraAPI.theme.colors.getColor(`error-base`);this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor(`info-base`);this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor();this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--font-weight-medium"]=this.weights.medium;this.styles["--font-weight-bold"]=this.weights.bold;this.styles["--font-weight-regular"]=this.weights.regular}getClasses(){return{[this.size.toLowerCase()]:this.mode==="default",disabled:this.disabled,isLoading:this.isLoading,isFocused:this.isFocused&&!this.disabled&&!this.readOnly&&!this.isLoading,isHovered:this.isHovered,[this.status]:true,transparent:this.mode==="transparent"}}getLabelColor(){if(!!this.disabled){return"neutral-medium"}else if(this.isLoading&&this.mode==="transparent"&&!this.isHovered){return"neutral-dark"}else if((this.isFocused||this.isHovered||this.status==="success"||this.status==="error")&&!this.readOnly||this.isHovered){return"neutral-black"}else{return"neutral-dark"}}renderIcon(){if(this.iconName===""&&this.status==="default"||this.mode==="transparent"&&this.isLoading||this.mode==="transparent"&&this.status==="default"){return}if(this.status==="error"&&this.hideErrorIcon){return}const t=this.size==="large"?20:16;const r=this.mode==="transparent"?20:t;const e={loading:{name:this.iconName,color:"primary-base"},success:{name:"checkCircle",color:"success-dark"},error:{name:"alertCircle",color:"error-dark"},default:{name:this.iconName,color:"neutral-dark"}};const s=e[this.isLoading?"loading":this.status||"default"];return i("div",{class:"feedback-icon",style:this.styles},i("cura-icon",{name:s.name,iconset:"default",size:r,color:s.color}))}renderHelperText(){const t=this.status==="error";const r=this.status==="success";const e=this.status==="default";const s=this.size==="large"?"small":"xsmall";const n=this.mode==="transparent"?"bold":"regular";const u=(()=>{if(this.disabled)return"neutral-medium";if(this.isLoading)return"primary-base";if(this.isFocused||this.isHovered)return"neutral-black";return"neutral-dark"})();return i("div",{style:this.styles,class:"helper-text"},e&&i("cura-label",{size:s,lineHeight:"xsmall",color:u,weight:n},i("slot",null)),t&&i("cura-label",{size:s,lineHeight:"xsmall",color:"error-dark",weight:n},i("slot",null)),r&&i("cura-label",{size:s,lineHeight:"xsmall",color:"success-dark",weight:n},i("slot",null)))}handleMouseEnter(){this.isHovered=true}handleMouseLeave(){this.isHovered=false}componentDidLoad(){this.initializeMask()}disconnectedCallback(){this.destroyMask()}handleMaskUpdate(){if(this.maskedInput){this.maskedInput.updateValue()}}handleClearInput(){this.handleMaskUpdate();this.value="";this.inputRef.value="";this.valueChange.emit(this.value);this.handleMaskUpdate()}handleInputFocus(){this.handleMaskUpdate();this.isFocused=true}handleInputBlur(){this.handleMaskUpdate();setTimeout((()=>{this.isFocused=false}),150)}shouldDisplayMask(){return this.maskPreset||this.maskRegex||this.maskAdvanced}initializeMask(){if(this.shouldDisplayMask()){if(this.maskedInput){this.destroyMask()}if(this.maskPreset){this.initializePresetMask()}else if(this.maskRegex){this.initializeRegexMask()}else if(this.maskAdvanced){this.initializeAdvancedMask()}this.applyValueToMask()}else{this.clearMaskValue()}}initializeRegexMask(){const t=this.maskRegex.replace(/^\/|\/[gimsuy]*$/g,"");const i=(this.maskRegex.match(/\/[gimsuy]*$/g)||[""])[0].slice(1);this.maskedInput=g(this.inputRef,{mask:new RegExp(t,i)})}initializePresetMask(){const t=Z[this.maskPreset];if(t){this.maskedInput=g(this.inputRef,t)}else{console.error(`Mask preset "${this.maskPreset}" not found.`)}}initializeAdvancedMask(){try{const t=typeof this.maskAdvanced==="string"?JSON.parse(this.maskAdvanced):this.maskAdvanced;this.maskedInput=g(this.inputRef,t)}catch(t){console.error("Error defining maskAdvanced:",t)}}applyValueToMask(){if(this.maskedInput){if(this.maskedInput.mask===Date||this.maskedInput.mask===Number){this.maskedInput.typedValue=this.value}else{this.value=this.maskedInput.value}this.handleMaskUpdate()}}clearMaskValue(){this.inputRef.value=this.value}destroyMask(){if(this.maskedInput){this.maskedInput.destroy();this.maskedInput=undefined}}handleInputChange(t){const i=t.target.value;if(this.type==="number"){this.handleNumberInputChange(i)}else{this.handleTextInputChange(i)}this.internals.setFormValue(this.value)}handleNumberInputChange(t){const i=parseFloat(t);if(!isNaN(i)){this.value=i}else{console.error("Invalid numeric input:",t)}}handleTextInputChange(t){if(this.maskedInput){if(this.maskedInput.mask instanceof Date||this.maskedInput.mask===Number){this.maskedInput.typedValue=t;this.value=this.maskedInput.typedValue}this.value=this.maskedInput.value}else{this.value=t}}handleKeyDown(t){if(this.type==="number"){this.handleBlockInvalidNumber(t)}}handleBlockInvalidNumber(t){if(["e","E","+","-"].includes(t.key))t.preventDefault()}render(){return i(r,{key:"958e9c9ce207852a9a89bcbf6b2300a020e57e21"},i("div",{key:"a0b0a2dc0cef39d82f922f19a68adc2fea19ada4",style:this.styles,onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),class:Object.assign({"cura-input-group":true},this.getClasses())},i("div",{key:"600ac418f5e11b145546efd999e46f6dc439dbe2",class:"input-wrapper"},this.label&&i("cura-label",{key:"b7d8c89801d73f6b304b15cb3a1fb053be6c10a3",class:"label",weight:"bold",size:this.size==="large"?"small":"xsmall",color:this.getLabelColor()},this.label," ",this.required&&i("span",{key:"fbfc7e95fae3d2f695af8e966d50c36eaddf83ff",class:"required"},"* ")),i("div",{key:"50b2e6a4edb17507bcbed66ddb262b5816eeea98",class:"cura-input-field",part:"cura-input-field",style:this.styles},this.renderIcon(),i("input",{key:"e0fb2fe18ca4555b15396bc794dc553273f06921",name:this.name?this.name:"",type:this.type,onKeyDown:t=>this.handleKeyDown(t),onBlur:this.handleInputBlur.bind(this),onFocus:this.handleInputFocus.bind(this),onInput:t=>this.handleInputChange(t),class:this.getClasses(),style:this.styles,placeholder:this.placeholder,disabled:this.disabled||this.isLoading,required:this.required,readonly:this.readOnly,maxlength:this.maxlength,value:this.value!==undefined&&this.value!==null?this.value:"",inputmode:this.maskPreset?"tel":this.inputMode,ref:t=>this.inputRef=t}),!!this.clearIcon&&!this.readOnly&&!this.isLoading&&!this.disabled&&this.value&&this.isFocused&&i("cura-icon",{key:"dde6d704a5fa3aac4bfa2428b636fc7e19301ace",size:this.size==="large"||this.mode==="transparent"?20:16,color:"primary-base",name:"closeCircle",iconset:"default",class:"clear-button",onClick:()=>this.handleClearInput()}),this.isLoading&&i("cura-loader-circle",{key:"9322c8e784058c1e0880b3d248c5f1272a1518c4",size:this.size==="large"?"medium":"small",color:"primary-base"})),this.renderHelperText())))}static get formAssociated(){return true}static get watchers(){return{styles:["connectedCallback"],size:["getClasses"],status:["renderIcon"],mode:["renderIcon"],maskPreset:["initializeMask"],maskRegex:["initializeMask"],maskAdvanced:["initializeMask"]}}};W.style=J;export{u as cura_button_transparent,W as cura_input_text};
2
+ //# sourceMappingURL=p-31ae34e3.entry.js.map