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AAC,GAAG,CAAnB,CADjB,SAGH,KAAK,CAAC,OAAN,CAAc,EAAd,cACO,mBAAmB,CAAC,EAAE,CAAC,CAAD,CAAH,CAD1B,kBACyC,EAAE,CAAC,CAAD,CAD3C,yBAEI,mBAAmB,CAAC,EAAD,CALpB;AAAA,KADqB,EAQzB,IARyB,CAQpB,IARoB,CAA5B;AASD,GA3BD,MA2BO;AACL,mCAAwB,mBAAmB,CAAC,EAAD,CAA3C;AACD;AACF","sourcesContent":["function createMessage (message: string, vm?: any, parent?: any): string | void {\n if (parent) {\n vm = {\n _isVue: true,\n $parent: parent,\n $options: vm,\n }\n }\n\n if (vm) {\n // Only show each message once per instance\n vm.$_alreadyWarned = vm.$_alreadyWarned || []\n if (vm.$_alreadyWarned.includes(message)) return\n vm.$_alreadyWarned.push(message)\n }\n\n return `[Vuetify] ${message}` + (\n vm ? generateComponentTrace(vm) : ''\n )\n}\n\nexport function consoleInfo (message: string, vm?: any, parent?: any): void {\n const newMessage = createMessage(message, vm, parent)\n newMessage != null && console.info(newMessage)\n}\n\nexport function consoleWarn (message: string, vm?: any, parent?: any): void {\n const newMessage = createMessage(message, vm, parent)\n newMessage != null && console.warn(newMessage)\n}\n\nexport function consoleError (message: string, vm?: any, parent?: any): void {\n const newMessage = createMessage(message, vm, parent)\n newMessage != null && console.error(newMessage)\n}\n\nexport function deprecate (original: string, replacement: string, vm?: any, parent?: any) {\n consoleWarn(`[UPGRADE] '${original}' is deprecated, use '${replacement}' instead.`, vm, parent)\n}\nexport function breaking (original: string, replacement: string, vm?: any, parent?: any) {\n consoleError(`[BREAKING] '${original}' has been removed, use '${replacement}' instead. For more information, see the upgrade guide https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0#user-content-upgrade-guide`, vm, parent)\n}\nexport function removed (original: string, vm?: any, parent?: any) {\n consoleWarn(`[REMOVED] '${original}' has been removed. You can safely omit it.`, vm, parent)\n}\n\n/**\n * Shamelessly stolen from vuejs/vue/blob/dev/src/core/util/debug.js\n */\n\nconst classifyRE = /(?:^|[-_])(\\w)/g\nconst classify = (str: string) => str\n .replace(classifyRE, c => c.toUpperCase())\n .replace(/[-_]/g, '')\n\nfunction formatComponentName (vm: any, includeFile?: boolean): string {\n if (vm.$root === vm) {\n return '<Root>'\n }\n const options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm || {}\n let name = options.name || options._componentTag\n const file = options.__file\n if (!name && file) {\n const match = file.match(/([^/\\\\]+)\\.vue$/)\n name = match && match[1]\n }\n\n return (\n (name ? `<${classify(name)}>` : `<Anonymous>`) +\n (file && includeFile !== false ? ` at ${file}` : '')\n )\n}\n\nfunction generateComponentTrace (vm: any): string {\n if (vm._isVue && vm.$parent) {\n const tree: any[] = []\n let currentRecursiveSequence = 0\n while (vm) {\n if (tree.length > 0) {\n const last: any = tree[tree.length - 1]\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++\n vm = vm.$parent\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence]\n currentRecursiveSequence = 0\n }\n }\n tree.push(vm)\n vm = vm.$parent\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map((vm, i) => `${\n i === 0 ? '---> ' : ' '.repeat(5 + i * 2)\n }${\n Array.isArray(vm)\n ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n : formatComponentName(vm)\n }`)\n .join('\\n')\n } else {\n return `\\n\\n(found in ${formatComponentName(vm)})`\n }\n}\n"],"sourceRoot":"","file":"console.js"} |