{"version":3,"sources":["webpack:///../../../src/components/VCounter/VCounter.ts","webpack:///../../../src/components/VCounter/index.ts","webpack:///../../../src/components/VTextField/VTextField.ts","webpack:///../../../src/mixins/intersectable/index.ts"],"names":["mixins","name","functional","props","value","type","Number","default","max","String","render","parseInt","content","isGreater","h","staticClass","class","ctx","baseMixins","onVisible","dirtyTypes","directives","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","this","computedColor","color","computedCounterValue","internalValue","hasCounter","hasDetails","get","set","isDirty","lazyValue","toString","length","isEnclosed","isLabelActive","isSingle","isSolo","labelPosition","offset","labelValue","$vuetify","rtl","left","right","showLabel","hasLabel","isFocused","watch","created","$attrs","hasOwnProperty","console","mounted","requestAnimationFrame","methods","focus","blur","window","clearableCallback","$refs","input","genAppendSlot","slot","$slots","genIcon","genSlot","genPrependInnerSlot","genIconSlot","genInputSlot","prepend","genClearIcon","undefined","attrs","disabled","genCounter","attrs$","$createElement","dark","light","genDefaultSlot","genFieldset","genLabel","absolute","focused","for","VLabel","genLegend","width","span","domProps","innerHTML","style","genInput","listeners","Object","id","readonly","on","keydown","onKeyDown","ref","genMessages","messagesNode","counterNode","genTextFieldSlot","genAffix","onBlur","e","$nextTick","onClick","onFocus","document","$emit","onInput","target","onMouseDown","onMouseUp","setLabelWidth","Math","scrollWidth","$el","setPrefixWidth","setPrependWidth","tryAutofocus","updateValue","handler","onObserve","destroyed","i","options","callback"],"mappings":"2RAWe,SAAAA,EAAA,qBAAyB,CACtCC,KADsC,YAGtCC,YAHsC,EAKtCC,MAAO,CACLC,MAAO,CACLC,KAAM,CAACC,OADF,QAELC,QAAS,IAEXC,IAAK,CAACF,OAAQG,SAGhBC,OAbsC,SAahC,KAAQ,IACJP,EAAR,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,gBAxPO,WAyPAtG,KAAD,UAAmBA,KAAKuC,MAA5B,mBAEAvC,KAAA,aAAoBA,KAAKuC,MAAM,iBAA/B,cAEFgE,aA7PO,WA8PL,SACGvG,KAAD,gCACO2F,WACN3F,KAAKuC,MAFN,OAGAoD,SAAA,gBAA2B3F,KAAKuC,MAJlC,SAOAvC,KAAA,qBAEA,IAEFwG,YAzQO,SAyQI,GAETxG,KAAA,WAEA,EACEA,KAAA,aAAoBA,KAApB,UACSA,KAAKN,eAAiBM,KAA1B,WACLA,KAAA,eAAqBA,KAArB,gB,kCC7fR,0EASc,cACZ,MAAsB,qBAAXqC,QAA4B,yBAAvC,OAKO,cAAW,CAChB7F,KADgB,gBAGhBwF,QAHgB,WAId,gBAAmBhC,KAAnB,IAA4C,CAC1CxD,KAD0C,YAE1CG,MAAO,CACL8J,QAASzG,KAAK0G,cAKpBC,UAZgB,WAad,cAAiB3G,KAAjB,MAGFkC,QAAS,CACPwE,UADO,SACE,OACP,KAEA,IAAK,IAAIE,EAAJ,EAAWhG,EAASiG,EAAA,UAAzB,OAAmDD,EAAnD,EAA+DA,IAAK,CAClE,IAAME,EAAY9G,KAAa6G,EAAA,UAA/B,IAEA,oBAAWC,EAKX,eAAYD,EAAA,aAAZ,0FAJEC,SA3BD,cAAW,CAAEtK,KAAM,oB","file":"js/chunk-b86f3980.821abd58.js","sourcesContent":["// 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","// 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 ripple from '../../directives/ripple'\n\n// Utilities\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 'setLabelWidth',\n 'setPrefixWidth',\n 'setPrependWidth',\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: { ripple },\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 != null &&\n this.lazyValue.toString().length > 0) ||\n 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.isLabelActive && !this.placeholder))\n },\n labelValue (): boolean {\n return !this.isSingle &&\n Boolean(this.isFocused || this.isLabelActive || this.placeholder)\n },\n },\n\n watch: {\n labelValue: 'setLabelWidth',\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 this.autofocus && this.tryAutofocus()\n this.setLabelWidth()\n this.setPrefixWidth()\n this.setPrependWidth()\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 return this.$createElement(VCounter, {\n props: {\n dark: this.dark,\n light: this.light,\n max,\n value: this.computedCounterValue,\n },\n })\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.disabled,\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.lazyValue,\n },\n attrs: {\n ...this.attrs$,\n autofocus: this.autofocus,\n disabled: this.disabled,\n id: this.computedId,\n placeholder: this.placeholder,\n readonly: this.readonly,\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 })\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.disabled || !this.$refs.input) return\n\n this.$refs.input.focus()\n },\n onFocus (e?: Event) {\n if (!this.$refs.input) return\n\n if (document.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 ||\n document.activeElement === this.$refs.input\n ) 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 },\n})\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: {\n handler: this.onObserve,\n },\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"],"sourceRoot":""}