{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.object.is.js","webpack:///../../../src/components/VCounter/VCounter.ts","webpack:///../../../src/components/VCounter/index.ts","webpack:///../../../src/mixins/intersectable/index.ts","webpack:///../../src/util/dom.ts","webpack:///../../../src/components/VTextField/VTextField.ts","webpack:///../../../src/directives/resize/index.ts"],"names":["$","is","target","stat","mixins","name","functional","props","value","type","Number","default","max","String","render","parseInt","content","isGreater","h","staticClass","class","ctx","window","mounted","this","onObserve","destroyed","methods","i","length","options","callback","console","node","root","composed","baseMixins","onVisible","dirtyTypes","directives","resize","ripple","inheritAttrs","appendOuterIcon","autofocus","clearable","clearIcon","counter","Boolean","counterValue","filled","flat","fullWidth","label","outlined","placeholder","prefix","prependInnerIcon","reverse","rounded","shaped","singleLine","solo","soloInverted","suffix","data","badInput","labelWidth","prefixWidth","prependWidth","initialValue","isBooted","isClearing","computed","classes","VInput","computedColor","color","computedCounterValue","internalValue","hasCounter","hasDetails","get","set","isDirty","isEnclosed","isLabelActive","isSingle","isSolo","labelPosition","offset","labelValue","$vuetify","rtl","left","right","showLabel","hasLabel","isFocused","watch","created","$attrs","hasOwnProperty","requestAnimationFrame","focus","blur","clearableCallback","$refs","input","genAppendSlot","slot","$slots","genIcon","genSlot","genPrependInnerSlot","genIconSlot","genInputSlot","prepend","genClearIcon","undefined","attrs","disabled","genCounter","attrs$","dark","light","$scopedSlots","$createElement","genControl","genDefaultSlot","genFieldset","genLabel","absolute","focused","for","VLabel","genLegend","width","span","domProps","innerHTML","style","genInput","listeners","Object","lazyValue","id","readonly","on","keydown","onKeyDown","ref","modifiers","quiet","onResize","genMessages","messagesNode","counterNode","genTextFieldSlot","genAffix","onBlur","e","$nextTick","onClick","onFocus","attachedRoot","$emit","onInput","onMouseDown","onMouseUp","setLabelWidth","Math","scrollWidth","$el","setPrefixWidth","setPrependWidth","tryAutofocus","document","updateValue","inserted","binding","passive","el","unbind","Resize"],"mappings":"qGAAA,IAAIA,EAAI,EAAQ,QACZC,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AnF,KAAA,YAAmBA,KAAKmF,MAAMnD,OAA9B,cAEFuH,gBAnQO,WAoQAvJ,KAAD,UAAmBA,KAAKmF,MAA5B,mBAEAnF,KAAA,aAAoBA,KAAKmF,MAAM,iBAA/B,cAEFqE,aAxQO,WAyQL,IACGxJ,KAAD,gCACOyJ,WACNzJ,KAAKmF,MAHR,MAGqB,OAAO,EAE5B,IAAMzE,EAAOmI,EAAa7I,KAA1B,KACA,SAAKU,GAAQA,EAAA,gBAAuBV,KAAKmF,MAAzC,SAEAnF,KAAA,qBAEA,IAEF0J,YArRO,SAqRI,GAET1J,KAAA,WAEA,EACEA,KAAA,aAAoBA,KAApB,UACSA,KAAK8C,eAAiB9C,KAA1B,WACLA,KAAA,eAAqBA,KAArB,YAGJkI,SA/RO,WAgSLlI,KAAA,gBACAA,KAAA,iBACAA,KAAA,uB,kCCzgBN,SAAS2J,EAAT,KACE,IAAMpJ,EAAWqJ,EAAjB,MACMtJ,EAAUsJ,EAAA,SAAmB,CAAEC,SAAS,GAE9C/J,OAAA,+BACAgK,EAAA,UAAe,CACbvJ,WACAD,WAGGsJ,EAAD,WAAuBA,EAAA,UAA3B,OACErJ,IAIJ,SAASwJ,EAAT,GACE,GAAKD,EAAL,WAD8B,MAGAA,EAA9B,UAAM,EAHwB,EAGxB,SAAYxJ,EAHY,EAGZA,QAClBR,OAAA,yCACOgK,EAAP,WAGK,IAAME,EAAS,CACpBL,WACAI,UAGF,U","file":"js/chunk-6228ece4.26e0ce2c.js","sourcesContent":["var $ = require('../internals/export');\nvar is = require('../internals/same-value');\n\n// `Object.is` method\n// https://tc39.es/ecma262/#sec-object.is\n$({ target: 'Object', stat: true }, {\n is: is\n});\n","// Styles\nimport './VCounter.sass'\n\n// Mixins\nimport Themeable, { functionalThemeClasses } from '../../mixins/themeable'\n\n// Types\nimport { VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\n/* @vue/component */\nexport default mixins(Themeable).extend({\n name: 'v-counter',\n\n functional: true,\n\n props: {\n value: {\n type: [Number, String],\n default: '',\n },\n max: [Number, String],\n },\n\n render (h, ctx): VNode {\n const { props } = ctx\n const max = parseInt(props.max, 10)\n const value = parseInt(props.value, 10)\n const content = max ? `${value} / ${max}` : String(props.value)\n const isGreater = max && (value > max)\n\n return h('div', {\n staticClass: 'v-counter',\n class: {\n 'error--text': isGreater,\n ...functionalThemeClasses(ctx),\n },\n }, content)\n },\n})\n","import VCounter from './VCounter'\n\nexport { VCounter }\nexport default VCounter\n","// Directives\nimport Intersect from '../../directives/intersect'\n\n// Utilities\nimport { consoleWarn } from '../../util/console'\n\n// Types\nimport Vue from 'vue'\n\nexport default function intersectable (options: { onVisible: string[] }) {\n if (typeof window === 'undefined' || !('IntersectionObserver' in window)) {\n // do nothing because intersection observer is not available\n return Vue.extend({ name: 'intersectable' })\n }\n\n return Vue.extend({\n name: 'intersectable',\n\n mounted () {\n Intersect.inserted(this.$el as HTMLElement, {\n name: 'intersect',\n value: this.onObserve,\n })\n },\n\n destroyed () {\n Intersect.unbind(this.$el as HTMLElement)\n },\n\n methods: {\n onObserve (entries: IntersectionObserverEntry[], observer: IntersectionObserver, isIntersecting: boolean) {\n if (!isIntersecting) return\n\n for (let i = 0, length = options.onVisible.length; i < length; i++) {\n const callback = (this as any)[options.onVisible[i]]\n\n if (typeof callback === 'function') {\n callback()\n continue\n }\n\n consoleWarn(options.onVisible[i] + ' method is not available on the instance but referenced in intersectable mixin options')\n }\n },\n },\n })\n}\n","/**\n * Returns:\n * - 'null' if the node is not attached to the DOM\n * - the root node (HTMLDocument | ShadowRoot) otherwise\n */\nexport function attachedRoot (node: Node): null | HTMLDocument | ShadowRoot {\n /* istanbul ignore next */\n if (typeof node.getRootNode !== 'function') {\n // Shadow DOM not supported (IE11), lets find the root of this node\n while (node.parentNode) node = node.parentNode\n\n // The root parent is the document if the node is attached to the DOM\n if (node !== document) return null\n\n return document\n }\n\n const root = node.getRootNode()\n\n // The composed root node is the document if the node is attached to the DOM\n if (root !== document && root.getRootNode({ composed: true }) !== document) return null\n\n return root as HTMLDocument | ShadowRoot\n}\n","// Styles\nimport './VTextField.sass'\n\n// Extensions\nimport VInput from '../VInput'\n\n// Components\nimport VCounter from '../VCounter'\nimport VLabel from '../VLabel'\n\n// Mixins\nimport Intersectable from '../../mixins/intersectable'\nimport Loadable from '../../mixins/loadable'\nimport Validatable from '../../mixins/validatable'\n\n// Directives\nimport resize from '../../directives/resize'\nimport ripple from '../../directives/ripple'\n\n// Utilities\nimport { attachedRoot } from '../../util/dom'\nimport { convertToUnit, keyCodes } from '../../util/helpers'\nimport { breaking, consoleWarn } from '../../util/console'\n\n// Types\nimport mixins from '../../util/mixins'\nimport { VNode, PropType } from 'vue/types'\n\nconst baseMixins = mixins(\n VInput,\n Intersectable({\n onVisible: [\n 'onResize',\n 'tryAutofocus',\n ],\n }),\n Loadable,\n)\ninterface options extends InstanceType {\n $refs: {\n label: HTMLElement\n input: HTMLInputElement\n 'prepend-inner': HTMLElement\n prefix: HTMLElement\n suffix: HTMLElement\n }\n}\n\nconst dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\n/* @vue/component */\nexport default baseMixins.extend().extend({\n name: 'v-text-field',\n\n directives: {\n resize,\n ripple,\n },\n\n inheritAttrs: false,\n\n props: {\n appendOuterIcon: String,\n autofocus: Boolean,\n clearable: Boolean,\n clearIcon: {\n type: String,\n default: '$clear',\n },\n counter: [Boolean, Number, String],\n counterValue: Function as PropType<(value: any) => number>,\n filled: Boolean,\n flat: Boolean,\n fullWidth: Boolean,\n label: String,\n outlined: Boolean,\n placeholder: String,\n prefix: String,\n prependInnerIcon: String,\n reverse: Boolean,\n rounded: Boolean,\n shaped: Boolean,\n singleLine: Boolean,\n solo: Boolean,\n soloInverted: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n },\n\n data: () => ({\n badInput: false,\n labelWidth: 0,\n prefixWidth: 0,\n prependWidth: 0,\n initialValue: null,\n isBooted: false,\n isClearing: false,\n }),\n\n computed: {\n classes (): object {\n return {\n ...VInput.options.computed.classes.call(this),\n 'v-text-field': true,\n 'v-text-field--full-width': this.fullWidth,\n 'v-text-field--prefix': this.prefix,\n 'v-text-field--single-line': this.isSingle,\n 'v-text-field--solo': this.isSolo,\n 'v-text-field--solo-inverted': this.soloInverted,\n 'v-text-field--solo-flat': this.flat,\n 'v-text-field--filled': this.filled,\n 'v-text-field--is-booted': this.isBooted,\n 'v-text-field--enclosed': this.isEnclosed,\n 'v-text-field--reverse': this.reverse,\n 'v-text-field--outlined': this.outlined,\n 'v-text-field--placeholder': this.placeholder,\n 'v-text-field--rounded': this.rounded,\n 'v-text-field--shaped': this.shaped,\n }\n },\n computedColor (): string | undefined {\n const computedColor = Validatable.options.computed.computedColor.call(this)\n\n if (!this.soloInverted || !this.isFocused) return computedColor\n\n return this.color || 'primary'\n },\n computedCounterValue (): number {\n if (typeof this.counterValue === 'function') {\n return this.counterValue(this.internalValue)\n }\n return [...(this.internalValue || '').toString()].length\n },\n hasCounter (): boolean {\n return this.counter !== false && this.counter != null\n },\n hasDetails (): boolean {\n return VInput.options.computed.hasDetails.call(this) || this.hasCounter\n },\n internalValue: {\n get (): any {\n return this.lazyValue\n },\n set (val: any) {\n this.lazyValue = val\n this.$emit('input', this.lazyValue)\n },\n },\n isDirty (): boolean {\n return this.lazyValue?.toString().length > 0 || this.badInput\n },\n isEnclosed (): boolean {\n return (\n this.filled ||\n this.isSolo ||\n this.outlined\n )\n },\n isLabelActive (): boolean {\n return this.isDirty || dirtyTypes.includes(this.type)\n },\n isSingle (): boolean {\n return (\n this.isSolo ||\n this.singleLine ||\n this.fullWidth ||\n // https://material.io/components/text-fields/#filled-text-field\n (this.filled && !this.hasLabel)\n )\n },\n isSolo (): boolean {\n return this.solo || this.soloInverted\n },\n labelPosition (): Record<'left' | 'right', string | number | undefined> {\n let offset = (this.prefix && !this.labelValue) ? this.prefixWidth : 0\n\n if (this.labelValue && this.prependWidth) offset -= this.prependWidth\n\n return (this.$vuetify.rtl === this.reverse) ? {\n left: offset,\n right: 'auto',\n } : {\n left: 'auto',\n right: offset,\n }\n },\n showLabel (): boolean {\n return this.hasLabel && !(this.isSingle && this.labelValue)\n },\n labelValue (): boolean {\n return this.isFocused || this.isLabelActive\n },\n },\n\n watch: {\n // labelValue: 'setLabelWidth', // moved to mounted, see #11533\n outlined: 'setLabelWidth',\n label () {\n this.$nextTick(this.setLabelWidth)\n },\n prefix () {\n this.$nextTick(this.setPrefixWidth)\n },\n isFocused: 'updateValue',\n value (val) {\n this.lazyValue = val\n },\n },\n\n created () {\n /* istanbul ignore next */\n if (this.$attrs.hasOwnProperty('box')) {\n breaking('box', 'filled', this)\n }\n\n /* istanbul ignore next */\n if (this.$attrs.hasOwnProperty('browser-autocomplete')) {\n breaking('browser-autocomplete', 'autocomplete', this)\n }\n\n /* istanbul ignore if */\n if (this.shaped && !(this.filled || this.outlined || this.isSolo)) {\n consoleWarn('shaped should be used with either filled or outlined', this)\n }\n },\n\n mounted () {\n // #11533\n this.$watch(() => this.labelValue, this.setLabelWidth)\n\n this.autofocus && this.tryAutofocus()\n\n requestAnimationFrame(() => (this.isBooted = true))\n },\n\n methods: {\n /** @public */\n focus () {\n this.onFocus()\n },\n /** @public */\n blur (e?: Event) {\n // https://github.com/vuetifyjs/vuetify/issues/5913\n // Safari tab order gets broken if called synchronous\n window.requestAnimationFrame(() => {\n this.$refs.input && this.$refs.input.blur()\n })\n },\n clearableCallback () {\n this.$refs.input && this.$refs.input.focus()\n this.$nextTick(() => this.internalValue = null)\n },\n genAppendSlot () {\n const slot = []\n\n if (this.$slots['append-outer']) {\n slot.push(this.$slots['append-outer'] as VNode[])\n } else if (this.appendOuterIcon) {\n slot.push(this.genIcon('appendOuter'))\n }\n\n return this.genSlot('append', 'outer', slot)\n },\n genPrependInnerSlot () {\n const slot = []\n\n if (this.$slots['prepend-inner']) {\n slot.push(this.$slots['prepend-inner'] as VNode[])\n } else if (this.prependInnerIcon) {\n slot.push(this.genIcon('prependInner'))\n }\n\n return this.genSlot('prepend', 'inner', slot)\n },\n genIconSlot () {\n const slot = []\n\n if (this.$slots.append) {\n slot.push(this.$slots.append as VNode[])\n } else if (this.appendIcon) {\n slot.push(this.genIcon('append'))\n }\n\n return this.genSlot('append', 'inner', slot)\n },\n genInputSlot () {\n const input = VInput.options.methods.genInputSlot.call(this)\n\n const prepend = this.genPrependInnerSlot()\n\n if (prepend) {\n input.children = input.children || []\n input.children.unshift(prepend)\n }\n\n return input\n },\n genClearIcon () {\n if (!this.clearable) return null\n\n const data = this.isDirty ? undefined : { attrs: { disabled: true } }\n\n return this.genSlot('append', 'inner', [\n this.genIcon('clear', this.clearableCallback, data),\n ])\n },\n genCounter () {\n if (!this.hasCounter) return null\n\n const max = this.counter === true ? this.attrs$.maxlength : this.counter\n\n const props = {\n dark: this.dark,\n light: this.light,\n max,\n value: this.computedCounterValue,\n }\n\n return this.$scopedSlots.counter?.({ props }) ?? this.$createElement(VCounter, { props })\n },\n genControl () {\n return VInput.options.methods.genControl.call(this)\n },\n genDefaultSlot () {\n return [\n this.genFieldset(),\n this.genTextFieldSlot(),\n this.genClearIcon(),\n this.genIconSlot(),\n this.genProgress(),\n ]\n },\n genFieldset () {\n if (!this.outlined) return null\n\n return this.$createElement('fieldset', {\n attrs: {\n 'aria-hidden': true,\n },\n }, [this.genLegend()])\n },\n genLabel () {\n if (!this.showLabel) return null\n\n const data = {\n props: {\n absolute: true,\n color: this.validationState,\n dark: this.dark,\n disabled: this.isDisabled,\n focused: !this.isSingle && (this.isFocused || !!this.validationState),\n for: this.computedId,\n left: this.labelPosition.left,\n light: this.light,\n right: this.labelPosition.right,\n value: this.labelValue,\n },\n }\n\n return this.$createElement(VLabel, data, this.$slots.label || this.label)\n },\n genLegend () {\n const width = !this.singleLine && (this.labelValue || this.isDirty) ? this.labelWidth : 0\n const span = this.$createElement('span', {\n domProps: { innerHTML: '​' },\n })\n\n return this.$createElement('legend', {\n style: {\n width: !this.isSingle ? convertToUnit(width) : undefined,\n },\n }, [span])\n },\n genInput () {\n const listeners = Object.assign({}, this.listeners$)\n delete listeners.change // Change should not be bound externally\n\n return this.$createElement('input', {\n style: {},\n domProps: {\n value: (this.type === 'number' && Object.is(this.lazyValue, -0)) ? '-0' : this.lazyValue,\n },\n attrs: {\n ...this.attrs$,\n autofocus: this.autofocus,\n disabled: this.isDisabled,\n id: this.computedId,\n placeholder: this.isFocused || !this.hasLabel ? this.placeholder : undefined,\n readonly: this.isReadonly,\n type: this.type,\n },\n on: Object.assign(listeners, {\n blur: this.onBlur,\n input: this.onInput,\n focus: this.onFocus,\n keydown: this.onKeyDown,\n }),\n ref: 'input',\n directives: [{\n name: 'resize',\n modifiers: { quiet: true },\n value: this.onResize,\n }],\n })\n },\n genMessages () {\n if (!this.showDetails) return null\n\n const messagesNode = VInput.options.methods.genMessages.call(this)\n const counterNode = this.genCounter()\n\n return this.$createElement('div', {\n staticClass: 'v-text-field__details',\n }, [\n messagesNode,\n counterNode,\n ])\n },\n genTextFieldSlot () {\n return this.$createElement('div', {\n staticClass: 'v-text-field__slot',\n }, [\n this.genLabel(),\n this.prefix ? this.genAffix('prefix') : null,\n this.genInput(),\n this.suffix ? this.genAffix('suffix') : null,\n ])\n },\n genAffix (type: 'prefix' | 'suffix') {\n return this.$createElement('div', {\n class: `v-text-field__${type}`,\n ref: type,\n }, this[type])\n },\n onBlur (e?: Event) {\n this.isFocused = false\n e && this.$nextTick(() => this.$emit('blur', e))\n },\n onClick () {\n if (this.isFocused || this.isDisabled || !this.$refs.input) return\n\n this.$refs.input.focus()\n },\n onFocus (e?: Event) {\n if (!this.$refs.input) return\n\n const root = attachedRoot(this.$el)\n if (!root) return\n\n if (root.activeElement !== this.$refs.input) {\n return this.$refs.input.focus()\n }\n\n if (!this.isFocused) {\n this.isFocused = true\n e && this.$emit('focus', e)\n }\n },\n onInput (e: Event) {\n const target = e.target as HTMLInputElement\n this.internalValue = target.value\n this.badInput = target.validity && target.validity.badInput\n },\n onKeyDown (e: KeyboardEvent) {\n if (e.keyCode === keyCodes.enter) this.$emit('change', this.internalValue)\n\n this.$emit('keydown', e)\n },\n onMouseDown (e: Event) {\n // Prevent input from being blurred\n if (e.target !== this.$refs.input) {\n e.preventDefault()\n e.stopPropagation()\n }\n\n VInput.options.methods.onMouseDown.call(this, e)\n },\n onMouseUp (e: Event) {\n if (this.hasMouseDown) this.focus()\n\n VInput.options.methods.onMouseUp.call(this, e)\n },\n setLabelWidth () {\n if (!this.outlined) return\n\n this.labelWidth = this.$refs.label\n ? Math.min(this.$refs.label.scrollWidth * 0.75 + 6, (this.$el as HTMLElement).offsetWidth - 24)\n : 0\n },\n setPrefixWidth () {\n if (!this.$refs.prefix) return\n\n this.prefixWidth = this.$refs.prefix.offsetWidth\n },\n setPrependWidth () {\n if (!this.outlined || !this.$refs['prepend-inner']) return\n\n this.prependWidth = this.$refs['prepend-inner'].offsetWidth\n },\n tryAutofocus () {\n if (\n !this.autofocus ||\n typeof document === 'undefined' ||\n !this.$refs.input) return false\n\n const root = attachedRoot(this.$el)\n if (!root || root.activeElement === this.$refs.input) return false\n\n this.$refs.input.focus()\n\n return true\n },\n updateValue (val: boolean) {\n // Sets validationState from validatable\n this.hasColor = val\n\n if (val) {\n this.initialValue = this.lazyValue\n } else if (this.initialValue !== this.lazyValue) {\n this.$emit('change', this.lazyValue)\n }\n },\n onResize () {\n this.setLabelWidth()\n this.setPrefixWidth()\n this.setPrependWidth()\n },\n },\n})\n","import { VNodeDirective } from 'vue/types/vnode'\n\ninterface ResizeVNodeDirective extends VNodeDirective {\n value?: () => void\n options?: boolean | AddEventListenerOptions\n}\n\nfunction inserted (el: HTMLElement, binding: ResizeVNodeDirective) {\n const callback = binding.value!\n const options = binding.options || { passive: true }\n\n window.addEventListener('resize', callback, options)\n el._onResize = {\n callback,\n options,\n }\n\n if (!binding.modifiers || !binding.modifiers.quiet) {\n callback()\n }\n}\n\nfunction unbind (el: HTMLElement) {\n if (!el._onResize) return\n\n const { callback, options } = el._onResize\n window.removeEventListener('resize', callback, options)\n delete el._onResize\n}\n\nexport const Resize = {\n inserted,\n unbind,\n}\n\nexport default Resize\n"],"sourceRoot":""}