\r\n // clear existing enterCallbacks, these are added by extractComponentsGuards\r\n to.matched.forEach(record => (record.enterCallbacks = {}));\r\n // check in-component beforeRouteEnter\r\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check global guards beforeResolve\r\n guards = [];\r\n for (const guard of beforeResolveGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n // catch any navigation canceled\r\n .catch(err => isNavigationFailure(err, 8 /* NAVIGATION_CANCELLED */)\r\n ? err\r\n : Promise.reject(err)));\r\n }\r\n function triggerAfterEach(to, from, failure) {\r\n // navigation is confirmed, call afterGuards\r\n // TODO: wrap with error handlers\r\n for (const guard of afterGuards.list())\r\n guard(to, from, failure);\r\n }\r\n /**\r\n * - Cleans up any navigation guards\r\n * - Changes the url if necessary\r\n * - Calls the scrollBehavior\r\n */\r\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\r\n // a more recent navigation took place\r\n const error = checkCanceledNavigation(toLocation, from);\r\n if (error)\r\n return error;\r\n // only consider as push if it's not the first navigation\r\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\r\n const state = !isBrowser ? {} : history.state;\r\n // change URL only if the user did a push/replace and if it's not the initial navigation because\r\n // it's just reflecting the url\r\n if (isPush) {\r\n // on the initial navigation, we want to reuse the scroll position from\r\n // history state if it exists\r\n if (replace || isFirstNavigation)\r\n routerHistory.replace(toLocation.fullPath, assign({\r\n scroll: isFirstNavigation && state && state.scroll,\r\n }, data));\r\n else\r\n routerHistory.push(toLocation.fullPath, data);\r\n }\r\n // accept current navigation\r\n currentRoute.value = toLocation;\r\n handleScroll(toLocation, from, isPush, isFirstNavigation);\r\n markAsReady();\r\n }\r\n let removeHistoryListener;\r\n // attach listener to history to trigger navigations\r\n function setupListeners() {\r\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\r\n // cannot be a redirect route because it was in history\r\n const toLocation = resolve(to);\r\n // due to dynamic routing, and to hash history with manual navigation\r\n // (manually changing the url or calling history.hash = '#/somewhere'),\r\n // there could be a redirect record in history\r\n const shouldRedirect = handleRedirectRecord(toLocation);\r\n if (shouldRedirect) {\r\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\r\n return;\r\n }\r\n pendingLocation = toLocation;\r\n const from = currentRoute.value;\r\n // TODO: should be moved to web history?\r\n if (isBrowser) {\r\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\r\n }\r\n navigate(toLocation, from)\r\n .catch((error) => {\r\n if (isNavigationFailure(error, 4 /* NAVIGATION_ABORTED */ | 8 /* NAVIGATION_CANCELLED */)) {\r\n return error;\r\n }\r\n if (isNavigationFailure(error, 2 /* NAVIGATION_GUARD_REDIRECT */)) {\r\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\r\n // false) but this is bug prone as we have no way to wait the\r\n // navigation to be finished before calling pushWithRedirect. Using\r\n // a setTimeout of 16ms seems to work but there is not guarantee for\r\n // it to work on every browser. So Instead we do not restore the\r\n // history entry and trigger a new navigation as requested by the\r\n // navigation guard.\r\n // the error is already handled by router.push we just want to avoid\r\n // logging the error\r\n pushWithRedirect(error.to, toLocation\r\n // avoid an uncaught rejection, let push call triggerError\r\n )\r\n .then(failure => {\r\n // manual change in hash history #916 ending up in the URL not\r\n // changing but it was changed by the manual url change, so we\r\n // need to manually change it ourselves\r\n if (isNavigationFailure(failure, 4 /* NAVIGATION_ABORTED */ |\r\n 16 /* NAVIGATION_DUPLICATED */) &&\r\n !info.delta &&\r\n info.type === NavigationType.pop) {\r\n routerHistory.go(-1, false);\r\n }\r\n })\r\n .catch(noop);\r\n // avoid the then branch\r\n return Promise.reject();\r\n }\r\n // do not restore history on unknown direction\r\n if (info.delta)\r\n routerHistory.go(-info.delta, false);\r\n // unrecognized error, transfer to the global handler\r\n return triggerError(error, toLocation, from);\r\n })\r\n .then((failure) => {\r\n failure =\r\n failure ||\r\n finalizeNavigation(\r\n // after navigation, all matched components are resolved\r\n toLocation, from, false);\r\n // revert the navigation\r\n if (failure) {\r\n if (info.delta) {\r\n routerHistory.go(-info.delta, false);\r\n }\r\n else if (info.type === NavigationType.pop &&\r\n isNavigationFailure(failure, 4 /* NAVIGATION_ABORTED */ | 16 /* NAVIGATION_DUPLICATED */)) {\r\n // manual change in hash history #916\r\n // it's like a push but lacks the information of the direction\r\n routerHistory.go(-1, false);\r\n }\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n })\r\n .catch(noop);\r\n });\r\n }\r\n // Initialization and Errors\r\n let readyHandlers = useCallbacks();\r\n let errorHandlers = useCallbacks();\r\n let ready;\r\n /**\r\n * Trigger errorHandlers added via onError and throws the error as well\r\n *\r\n * @param error - error to throw\r\n * @param to - location we were navigating to when the error happened\r\n * @param from - location we were navigating from when the error happened\r\n * @returns the error as a rejected promise\r\n */\r\n function triggerError(error, to, from) {\r\n markAsReady(error);\r\n const list = errorHandlers.list();\r\n if (list.length) {\r\n list.forEach(handler => handler(error, to, from));\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('uncaught error during route navigation:');\r\n }\r\n console.error(error);\r\n }\r\n return Promise.reject(error);\r\n }\r\n function isReady() {\r\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\r\n return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n readyHandlers.add([resolve, reject]);\r\n });\r\n }\r\n /**\r\n * Mark the router as ready, resolving the promised returned by isReady(). Can\r\n * only be called once, otherwise does nothing.\r\n * @param err - optional error\r\n */\r\n function markAsReady(err) {\r\n if (ready)\r\n return;\r\n ready = true;\r\n setupListeners();\r\n readyHandlers\r\n .list()\r\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\r\n readyHandlers.reset();\r\n }\r\n // Scroll behavior\r\n function handleScroll(to, from, isPush, isFirstNavigation) {\r\n const { scrollBehavior } = options;\r\n if (!isBrowser || !scrollBehavior)\r\n return Promise.resolve();\r\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\r\n ((isFirstNavigation || !isPush) &&\r\n history.state &&\r\n history.state.scroll) ||\r\n null;\r\n return nextTick()\r\n .then(() => scrollBehavior(to, from, scrollPosition))\r\n .then(position => position && scrollToPosition(position))\r\n .catch(err => triggerError(err, to, from));\r\n }\r\n const go = (delta) => routerHistory.go(delta);\r\n let started;\r\n const installedApps = new Set();\r\n const router = {\r\n currentRoute,\r\n addRoute,\r\n removeRoute,\r\n hasRoute,\r\n getRoutes,\r\n resolve,\r\n options,\r\n push,\r\n replace,\r\n go,\r\n back: () => go(-1),\r\n forward: () => go(1),\r\n beforeEach: beforeGuards.add,\r\n beforeResolve: beforeResolveGuards.add,\r\n afterEach: afterGuards.add,\r\n onError: errorHandlers.add,\r\n isReady,\r\n install(app) {\r\n const router = this;\r\n app.component('RouterLink', RouterLink);\r\n app.component('RouterView', RouterView);\r\n app.config.globalProperties.$router = router;\r\n Object.defineProperty(app.config.globalProperties, '$route', {\r\n enumerable: true,\r\n get: () => unref(currentRoute),\r\n });\r\n // this initial navigation is only necessary on client, on server it doesn't\r\n // make sense because it will create an extra unnecessary navigation and could\r\n // lead to problems\r\n if (isBrowser &&\r\n // used for the initial navigation client side to avoid pushing\r\n // multiple times when the router is used in multiple apps\r\n !started &&\r\n currentRoute.value === START_LOCATION_NORMALIZED) {\r\n // see above\r\n started = true;\r\n push(routerHistory.location).catch(err => {\r\n if ((process.env.NODE_ENV !== 'production'))\r\n warn('Unexpected error when starting the router:', err);\r\n });\r\n }\r\n const reactiveRoute = {};\r\n for (const key in START_LOCATION_NORMALIZED) {\r\n // @ts-expect-error: the key matches\r\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\r\n }\r\n app.provide(routerKey, router);\r\n app.provide(routeLocationKey, reactive(reactiveRoute));\r\n app.provide(routerViewLocationKey, currentRoute);\r\n const unmountApp = app.unmount;\r\n installedApps.add(app);\r\n app.unmount = function () {\r\n installedApps.delete(app);\r\n // the router is not attached to an app anymore\r\n if (installedApps.size < 1) {\r\n // invalidate the current navigation\r\n pendingLocation = START_LOCATION_NORMALIZED;\r\n removeHistoryListener && removeHistoryListener();\r\n currentRoute.value = START_LOCATION_NORMALIZED;\r\n started = false;\r\n ready = false;\r\n }\r\n unmountApp();\r\n };\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n addDevtools(app, router, matcher);\r\n }\r\n },\r\n };\r\n return router;\r\n}\r\nfunction runGuardQueue(guards) {\r\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\r\n}\r\nfunction extractChangingRecords(to, from) {\r\n const leavingRecords = [];\r\n const updatingRecords = [];\r\n const enteringRecords = [];\r\n const len = Math.max(from.matched.length, to.matched.length);\r\n for (let i = 0; i < len; i++) {\r\n const recordFrom = from.matched[i];\r\n if (recordFrom) {\r\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\r\n updatingRecords.push(recordFrom);\r\n else\r\n leavingRecords.push(recordFrom);\r\n }\r\n const recordTo = to.matched[i];\r\n if (recordTo) {\r\n // the type doesn't matter because we are comparing per reference\r\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\r\n enteringRecords.push(recordTo);\r\n }\r\n }\r\n }\r\n return [leavingRecords, updatingRecords, enteringRecords];\r\n}\n\n/**\r\n * Returns the router instance. Equivalent to using `$router` inside\r\n * templates.\r\n */\r\nfunction useRouter() {\r\n return inject(routerKey);\r\n}\r\n/**\r\n * Returns the current route location. Equivalent to using `$route` inside\r\n * templates.\r\n */\r\nfunction useRoute() {\r\n return inject(routeLocationKey);\r\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dager',\n w: 'en uke',\n ww: '%d uker',\n M: 'en måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nb;\n\n})));\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n uncurriedNativeMethod(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n uncurriedNativeMethod(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, NativePrototype);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші',\n };\n\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n '_'\n ),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n '_'\n ),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return kk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arTn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enNz;\n\n})));\n","var DESCRIPTORS = require('../internals/descriptors');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\nvar propertyIsEnumerable = uncurryThis($propertyIsEnumerable);\nvar push = uncurryThis([].push);\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable(O, key)) {\n push(result, TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;\n\n// eslint-disable-next-line es/no-object-getownpropertynames -- required for testing\nvar FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n getOwnPropertyNames: getOwnPropertyNames\n});\n","/**\n * @hidden\n */\nexport var packageMetadata = {\n name: '@progress/kendo-vue-inputs',\n productName: 'Kendo UI for Vue',\n productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],\n publishDate: 1641561208,\n version: '',\n licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'\n};\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(\n '_'\n ),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(\n '_'\n );\n\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n '_'\n ),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fy;\n\n})));\n","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n}; // @ts-ignore\n\n\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { Keys, validatePackage, getDefaultSlots } from '@progress/kendo-vue-common';\nimport { toolbarButtons } from './../util';\nimport { packageMetadata } from '../package-metadata'; // tslint:enable:max-line-length\n\nvar Toolbar = {\n name: 'KendoToolbar',\n props: {\n tabIndex: {\n type: Number,\n default: 0\n },\n dir: String,\n keyboardNavigation: Boolean,\n buttons: Array\n },\n created: function created() {\n this.element = null;\n this.offsetHeight = 0;\n this.offsetWidth = 0;\n this.currentButtons = [];\n this.focusedSelector = this.selectors.map(function (s) {\n return s + ':focus';\n }).join(',');\n validatePackage(packageMetadata);\n },\n computed: {\n selectors: function selectors() {\n return this.$props.buttons || toolbarButtons;\n }\n },\n mounted: function mounted() {\n window.addEventListener('resize', this.onWindowResize);\n var element = this.element;\n\n if (element) {\n this.offsetWidth = element.offsetWidth;\n this.offsetHeight = element.offsetHeight;\n\n if (this.$props.keyboardNavigation !== false) {\n this.currentButtons = this.getCurrentButtons();\n this.setTabIndex(0);\n }\n }\n },\n updated: function updated() {\n var element = this.element;\n\n if (!element || this.$props.keyboardNavigation === false) {\n return;\n }\n\n this.currentButtons = this.getCurrentButtons();\n this.setTabIndex(this.focusedIndex());\n },\n destroyed: !!gh ? undefined : function () {\n window.removeEventListener('resize', this.onWindowResize);\n this.currentButtons.length = 0;\n },\n // @ts-ignore\n unmounted: function unmounted() {\n window.removeEventListener('resize', this.onWindowResize);\n this.currentButtons.length = 0;\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n return h(\"div\", {\n \"class\": 'k-widget k-toolbar',\n role: \"toolbar\",\n attrs: this.v3 ? undefined : {\n role: \"toolbar\",\n dir: this.$props.dir\n },\n dir: this.$props.dir,\n onKeydown: this.onKeyDown,\n on: this.v3 ? undefined : {\n \"keydown\": this.onKeyDown\n }\n }, [defaultSlot]);\n },\n methods: {\n getCurrentButtons: function getCurrentButtons() {\n return this.$el ? Array.from(this.$el.querySelectorAll(this.selectors.join(','))) : [];\n },\n focusedIndex: function focusedIndex() {\n var focused = this.element && this.element.querySelector(this.focusedSelector);\n return Math.max(0, this.currentButtons.findIndex(function (e) {\n return e === focused;\n }));\n },\n setTabIndex: function setTabIndex(focusedIndex) {\n var tabIndex = this.$props.tabIndex;\n this.currentButtons.forEach(function (button, index) {\n button.tabIndex = index === focusedIndex ? tabIndex : -1;\n });\n },\n onKeyDown: function onKeyDown(event) {\n if (this.$props.keyboardNavigation === false) {\n return;\n }\n\n var target = event.target;\n var arrowKey = event.keyCode === Keys.left || event.keyCode === Keys.right;\n\n if (!arrowKey || event.defaultPrevented || this.currentButtons.findIndex(function (b) {\n return b === target;\n }) === -1) {\n return;\n }\n\n var focusedIndex = this.focusedIndex();\n\n if (event.keyCode === Keys.left) {\n this.focusButton(focusedIndex, focusedIndex - 1);\n } else {\n this.focusButton(focusedIndex, focusedIndex + 1);\n }\n },\n focusButton: function focusButton(prevIndex, index) {\n var tabIndex = this.$props.tabIndex;\n var button = this.currentButtons[index];\n\n if (button) {\n button.tabIndex = tabIndex;\n button.focus();\n var prevButton = this.currentButtons[prevIndex];\n\n if (prevButton) {\n prevButton.tabIndex = -1;\n }\n }\n },\n onWindowResize: function onWindowResize(event) {\n var element = this.$el;\n\n if (!element) {\n return;\n }\n\n var offsetWidth = element.offsetWidth;\n var offsetHeight = element.offsetHeight;\n\n if (this.offsetWidth !== offsetWidth || this.offsetHeight !== offsetHeight) {\n this.offsetWidth = offsetWidth;\n this.offsetHeight = offsetHeight;\n var newSizes = {\n offsetWidth: this.offsetWidth,\n offsetHeight: this.offsetHeight\n };\n this.$emit('resize', __assign(__assign({\n target: this\n }, newSizes), {\n nativeEvent: event\n }));\n }\n }\n }\n};\nvar ToolbarVue3 = Toolbar;\nexport { Toolbar, ToolbarVue3 };","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n isCallable(NewTarget = dummy.constructor) &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getDefaultSlots, noop } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridNav` component.\n */\n\nvar GridNav = {\n name: 'KendoGridNav',\n props: {\n currentData: Array\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n inject: {\n onNavKeyDown: {\n default: noop\n },\n onNavFocus: {\n default: noop\n },\n onNavMount: {\n default: noop\n },\n handleDispatchFocus: {\n default: noop\n },\n kbContext: {\n default: null\n },\n navigation: {\n default: null\n }\n },\n mounted: function mounted() {\n this.onNavMount({\n scope: this.$el || undefined\n });\n },\n updated: function updated() {\n this.onNavMount({\n scope: this.$el || undefined\n });\n },\n methods: {\n onKeyDown: function onKeyDown(event) {\n this.onNavKeyDown(event, {\n navigation: this.navigation,\n kbContext: this.kbContext,\n onNavigationAction: this.onNavigationAction\n }); // const {mode, cell} = getSelectionOptions(this.$props.selectable);\n\n this.$emit('keydown', {\n dataItems: this.getLeafDataItems(),\n // mode,\n // cell,\n componentId: this._gridId,\n selectedField: this.$props.selectedField,\n event: event\n }); // as GridNavigationActionEvent\n },\n onFocus: function onFocus(event) {\n this.onNavFocus(event, {\n kbContext: this.kbContext\n });\n },\n onNavigationAction: function onNavigationAction(options) {\n this.$emit('navigationaction', {\n focusElement: options.focusElement,\n event: options.event\n }); // as GridNavigationActionEvent\n },\n getLeafDataItems: function getLeafDataItems() {\n return this.$props.currentData.filter(function (item) {\n return item.rowType === 'data';\n }).map(function (item) {\n return item.dataItem;\n });\n }\n },\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlots = getDefaultSlots(this);\n return h(\"div\", {\n onKeydown: this.onKeyDown,\n on: this.v3 ? undefined : {\n \"keydown\": this.onKeyDown,\n \"focusin\": this.onFocus\n },\n onFocusin: this.onFocus,\n \"data-keyboardnavscope\": true,\n attrs: this.v3 ? undefined : {\n \"data-keyboardnavscope\": true\n }\n }, [defaultSlots]);\n }\n};\nvar GridNavVue3 = GridNav;\nexport { GridNav, GridNavVue3 };","import { tableKeyboardNavigationTools as navigationTools } from '@progress/kendo-vue-data-tools';\nimport { canUseDOM } from '@progress/kendo-vue-common';\nvar STRING = 'string';\n/**\n * @hidden\n */\nexport function getNestedValue(fieldName, dataItem) {\n var path = fieldName.split('.');\n var data = dataItem;\n path.forEach(function (p) {\n data = data ? data[p] : undefined;\n });\n return data;\n}\n/**\n * @hidden\n */\nexport function flatData(output, input, footer, dataIndex, groupDefined, field, level) {\n if (level === void 0) { level = 0; }\n var maxLevel = level;\n for (var i = 0; i < input.length; i++) {\n if (!groupDefined || input[i].value === undefined || input[i].items === undefined) {\n output[output.length] = {\n dataIndex: ++dataIndex.index,\n dataItem: input[i],\n rowType: 'data',\n level: level,\n expanded: field === undefined || getNestedValue(field, input[i])\n };\n continue;\n }\n maxLevel = Math.max(maxLevel, level + 1);\n var expanded = field === undefined ||\n getNestedValue(field, input[i]) === undefined ||\n getNestedValue(field, input[i]);\n // header\n output[output.length] = {\n dataIndex: -1,\n dataItem: input[i],\n level: level,\n rowType: 'groupHeader',\n expanded: expanded\n };\n // children\n if (expanded) {\n maxLevel = Math.max(flatData(output, input[i].items, footer, dataIndex, groupDefined, field, level + 1), maxLevel);\n }\n // footer\n if (footer === 'always' || (expanded && footer === 'visible')) {\n output[output.length] = {\n dataIndex: -1,\n dataItem: input[i],\n rowType: 'groupFooter',\n level: level,\n expanded: expanded\n };\n }\n }\n return maxLevel;\n}\n/**\n * @hidden\n */\nexport function isRtl(element) {\n return element && (getComputedStyle(element).direction === 'rtl') || false;\n}\n/**\n * @hidden\n */\nexport function getIndex(event, parent) {\n if (!parent || !event || !event.originalEvent || !canUseDOM) {\n return -1;\n }\n var target = document.elementFromPoint(event.clientX, event.originalEvent.clientY);\n while (target && target.parentElement !== parent) {\n target = target.parentElement;\n }\n var children = parent.children;\n for (var i = 0; i < children.length; i++) {\n if (children[i] === target) {\n return i;\n }\n }\n return -1;\n}\nvar eventKeys = [\n 'sortChange',\n 'filterChange',\n 'groupChange',\n 'pageChange',\n 'expandChange',\n 'selectionChange',\n 'headerSelectionChange',\n 'rowClick',\n 'itemChange',\n 'dataStateChange',\n 'columnResize',\n 'columnReorder'\n];\nvar GridColumnDefaults = {\n filterable: true,\n editable: true,\n sortable: true,\n resizable: true,\n reorderable: true,\n groupable: true\n};\nvar deprecatedHandlerMessage = function (oldKey, newKey) { return (\"The \" + oldKey + \" event handler property is deprecated, \" +\n (\"use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-\" + newKey + \" instead\")); };\n/**\n * @hidden\n */\nexport function checkPropCompatibility(props) {\n for (var index = 0; index < eventKeys.length; index++) {\n var eventKey = eventKeys[index];\n if (props[eventKey] !== undefined) {\n var newKey = 'on' + eventKey.charAt(0).toUpperCase() + eventKey.slice(1);\n console.warn(deprecatedHandlerMessage(eventKey, newKey));\n }\n }\n}\nfunction nextColumn(columns, current) {\n var currentDepth = columns[current].depth;\n var next = null;\n for (var index = current + 1; index < columns.length; index++) {\n if (columns[index].depth === currentDepth) {\n next = columns[index];\n break;\n }\n }\n return next;\n}\n/**\n * @hidden\n */\nexport function mapColumns(columns) {\n var columnsMap = [[]];\n var maxDepth = 0;\n // set colspans, get maxdepth\n for (var q = columns.length - 1; q >= 0; q--) {\n maxDepth = Math.max(maxDepth, columns[q].depth);\n columns[q].colSpan = columns[q].colSpan || 1;\n if (columns[q].parentIndex !== -1) {\n columns[columns[q].parentIndex].colSpan =\n (columns[columns[q].parentIndex].colSpan || 0) + columns[q].colSpan;\n }\n }\n var rowSpan = 1;\n // set rowspan, kFirst, index AND create columnsMap\n columns.forEach(function (column, i) {\n columnsMap[column.depth] = columnsMap[column.depth] || [];\n var needKFirst = false;\n if (columnsMap[column.depth].length === 0) {\n if (rowSpan <= 1) {\n rowSpan = 1 + (column.children.length > 0 ? 0 : maxDepth - column.depth);\n }\n else {\n rowSpan--;\n needKFirst = true;\n }\n }\n column.rowSpan = 1 + (column.children.length > 0 ? 0 : maxDepth - column.depth);\n column.kFirst = needKFirst;\n column.index = columnsMap[column.depth].length;\n columnsMap[column.depth].push(i);\n });\n var stickyLeftWidth = new Array(columnsMap.length).fill(0);\n var width = 0;\n // set left AND create stickyLeftWidth\n columns.forEach(function (column) {\n if (column.locked) {\n column.left = stickyLeftWidth[column.depth];\n width = column.width ? parseFloat(column.width.toString()) : 0;\n if (column.children.length === 0) {\n for (var i = column.depth; i < stickyLeftWidth.length; i++) {\n stickyLeftWidth[i] += width;\n }\n }\n else {\n stickyLeftWidth[column.depth] += width;\n }\n }\n });\n var stickyRightWidth = new Array(columnsMap.length).fill(0);\n // set right, rightBorder AND create stickyRightWidth\n for (var i = columns.length - 1; i >= 0; i--) {\n var column = columns[i];\n if (column.locked) {\n column.right = stickyRightWidth[column.depth];\n width = column.width ? parseFloat(column.width.toString()) : 0;\n if (column.children.length === 0) {\n for (var j = column.depth; j < stickyRightWidth.length; j++) {\n stickyRightWidth[j] += width;\n }\n }\n else {\n stickyRightWidth[column.depth] += width;\n }\n var next = nextColumn(columns, i);\n column.rightBorder = !(next && next.locked);\n }\n }\n return columnsMap;\n}\n/**\n * @hidden\n */\nexport function readColumns(newColumns, oldColumns, idInfo, depth) {\n if (depth === void 0) { depth = 0; }\n var columns = [];\n var sameLength = (newColumns && newColumns.length) ? newColumns.length === oldColumns.length : false;\n if (!newColumns) {\n return [];\n }\n if (newColumns && newColumns.length === undefined) {\n newColumns = [newColumns];\n }\n // @ts-ignore\n newColumns.forEach(function (columnProps, index) {\n columnProps = columnProps;\n var oldColumn = sameLength ? oldColumns[index] || null : null;\n var notHiddenChildren = columnProps.children ?\n columnProps.children.filter(function (column) { return !column.hidden; }) : columnProps.children;\n var c = readColumns(notHiddenChildren, oldColumn && oldColumn.children || [], idInfo, depth + 1);\n columns.push(Object.assign({ depth: depth }, GridColumnDefaults, (c.length) ? { cell: function () { return null; }, filterCell: function () { return null; } } : {}, oldColumn ? { width: oldColumn.width, orderIndex: oldColumn.orderIndex } : {}, columnProps, {\n id: navigationTools.generateNavigatableId(\"\" + idInfo.prevId++, idInfo.idPrefix, 'column'),\n declarationIndex: columns.length,\n children: c,\n rowSpan: 0,\n colSpan: 0,\n isAccessible: true\n }));\n });\n var comparator = function (a, b) {\n return a.orderIndex === b.orderIndex ?\n a.declarationIndex - b.declarationIndex :\n ((a.orderIndex || 0) - (b.orderIndex || 0));\n };\n columns.sort(comparator);\n if (depth === 0) {\n var ret_1 = [];\n var flat_1 = function (cols, pIndex) {\n return cols.forEach(function (c) {\n c.parentIndex = pIndex;\n flat_1(c.children, ret_1.push(c) - 1);\n });\n };\n flat_1(columns, -1);\n return ret_1;\n }\n return columns;\n}\n/**\n * @hidden\n */\nexport function autoGenerateColumns(data, group, expandField, idInfo) {\n var propData = [];\n if (Array.isArray(data)) {\n propData = data;\n }\n else if (data) {\n propData = data.data;\n }\n if (!propData.length) {\n console.warn('Kendo Grid autogeneration of columns is only possible if some items are defined when the component is created.');\n }\n var columns = [];\n if (propData.length > 0) {\n var itemForColumnsGen = propData[0];\n if (group) {\n for (var i = 0; i < group.length; i++) {\n itemForColumnsGen = itemForColumnsGen.items && itemForColumnsGen.items[0];\n }\n }\n var fields = Object.getOwnPropertyNames(itemForColumnsGen);\n fields.forEach(function (field) {\n if (field !== expandField && field !== '__ob__') {\n columns.push(Object.assign({\n id: navigationTools.generateNavigatableId(\"\" + idInfo.prevId++, idInfo.idPrefix, 'column'),\n declarationIndex: -1,\n parentIndex: -1,\n depth: 0,\n colSpan: 0,\n rowSpan: 0,\n index: 0,\n left: 0,\n right: 0,\n children: [],\n rightBorder: false,\n ariaColumnIndex: 0,\n isAccessible: true\n }, GridColumnDefaults, { field: field }));\n }\n });\n }\n return columns;\n}\nvar hasParentFooterCell = function (columns, column) {\n var parent = columns[column.parentIndex];\n while (parent) {\n if (parent.footerCell) {\n return true;\n }\n parent = columns[parent.parentIndex];\n }\n return false;\n};\n/**\n * @hidden\n */\nexport var footerColumns = function (columns) {\n return columns.filter(function (column) {\n if (hasParentFooterCell(columns, column)) {\n return false;\n }\n return Boolean(column.footerCell) || !(column.children && column.children.length > 0);\n });\n};\n/**\n * @hidden\n */\nexport var parsers = {\n 'number': function (value, intl, format) {\n if (typeof value === STRING && value.toLowerCase() === 'null') {\n return null;\n }\n return intl.parseNumber(value, format);\n },\n 'date': function (value, intl, format) {\n if (typeof value === STRING && value.toLowerCase() === 'null') {\n return null;\n }\n return intl.parseDate(value, format);\n },\n 'boolean': function (value) {\n if (typeof value === STRING) {\n if (value.toLowerCase() === 'null') {\n return null;\n }\n else {\n return value.toLowerCase() === 'true';\n }\n }\n return value != null ? !!value : value;\n },\n 'string': function (value) {\n if (typeof value === STRING && value.toLowerCase() === 'null') {\n return null;\n }\n return value != null ? (value + '') : value;\n },\n 'default': function (value) {\n return value;\n }\n};\n","var _a;\n/**\n * @hidden\n */\nexport var noRecords = 'grid.noRecords';\n/**\n * @hidden\n */\nexport var pagerInfo = 'grid.pagerInfo';\n/**\n * @hidden\n */\nexport var pagerFirstPage = 'grid.pagerFirstPage';\n/**\n * @hidden\n */\nexport var pagerPreviousPage = 'grid.pagerPreviousPage';\n/**\n * @hidden\n */\nexport var pagerNextPage = 'grid.pagerNextPage';\n/**\n * @hidden\n */\nexport var pagerLastPage = 'grid.pagerLastPage';\n/**\n * @hidden\n */\nexport var pagerItemPerPage = 'grid.pagerItemsPerPage';\n/**\n * @hidden\n */\nexport var pagerPage = 'grid.pagerPage';\n/**\n * @hidden\n */\nexport var pagerOf = 'grid.pagerOf';\n/**\n * @hidden\n */\nexport var pagerTotalPages = 'grid.pagerTotalPages';\n/**\n * @hidden\n */\nexport var groupPanelEmpty = 'grid.groupPanelEmpty';\n/**\n * @hidden\n */\nexport var columnMenu = 'grid.columnMenu';\n/**\n * @hidden\n */\nexport var filterClearButton = 'grid.filterClearButton';\n/**\n * @hidden\n */\nexport var filterSubmitButton = 'grid.filterSubmitButton';\n/**\n * @hidden\n */\nexport var filterTitle = 'grid.filterTitle';\n/**\n * @hidden\n */\nexport var sortAscending = 'grid.sortAscending';\n/**\n * @hidden\n */\nexport var sortDescending = 'grid.sortDescending';\n/**\n * @hidden\n */\nexport var searchPlaceholder = 'grid.searchPlaceholder';\n/**\n * @hidden\n */\nexport var filterCheckAll = 'grid.filterCheckAll';\n/**\n * @hidden\n */\nexport var filterChooseOperator = 'grid.filterChooseOperator';\n/**\n * @hidden\n */\nexport var filterSelectedItems = 'grid.filterSelectedItems';\n/**\n * @hidden\n */\nexport var sortAriaLabel = 'grid.sortAriaLabel';\n/**\n * @hidden\n */\nexport var filterAriaLabel = 'grid.filterAriaLabel';\n/**\n * @hidden\n */\nexport var messages = (_a = {},\n _a[noRecords] = 'No records available',\n _a[groupPanelEmpty] = 'Drag a column header and drop it here to group by that column',\n _a[columnMenu] = 'Column Menu',\n _a[filterClearButton] = 'Clear',\n _a[filterSubmitButton] = 'Filter',\n _a[filterTitle] = 'Filter',\n _a[sortAscending] = 'Sort Ascending',\n _a[sortDescending] = 'Sort Descending',\n _a[pagerItemPerPage] = 'items per page',\n _a[pagerInfo] = '{0} - {1} of {2} items',\n _a[pagerFirstPage] = 'Go to the first page',\n _a[pagerPreviousPage] = 'Go to the previous page',\n _a[pagerNextPage] = 'Go to the next page',\n _a[pagerLastPage] = 'Go to the last page',\n _a[pagerPage] = 'Page',\n _a[pagerOf] = 'of',\n _a[pagerTotalPages] = '{0}',\n _a[searchPlaceholder] = 'Search',\n _a[filterCheckAll] = 'Check All',\n _a[filterChooseOperator] = 'Choose Operator',\n _a[filterSelectedItems] = 'selected items',\n _a[sortAriaLabel] = 'Sortable',\n _a[filterAriaLabel] = 'Filter',\n _a['grid.filterEqOperator'] = 'Is equal to',\n _a['grid.filterNotEqOperator'] = 'Is not equal to',\n _a['grid.filterIsNullOperator'] = 'Is null',\n _a['grid.filterIsNotNullOperator'] = 'Is not null',\n _a['grid.filterIsEmptyOperator'] = 'Is empty',\n _a['grid.filterIsNotEmptyOperator'] = 'Is not empty',\n _a['grid.filterStartsWithOperator'] = 'Starts with',\n _a['grid.filterContainsOperator'] = 'Contains',\n _a['grid.filterNotContainsOperator'] = 'Does not contain',\n _a['grid.filterEndsWithOperator'] = 'Ends with',\n _a['grid.filterGteOperator'] = 'Is greater than or equal to',\n _a['grid.filterGtOperator'] = 'Is greater than',\n _a['grid.filterLteOperator'] = 'Is less than or equal to',\n _a['grid.filterLtOperator'] = 'Is less than',\n _a['grid.filterIsTrue'] = 'Is true',\n _a['grid.filterIsFalse'] = 'Is false',\n _a['grid.filterBooleanAll'] = '(All)',\n _a['grid.filterAfterOrEqualOperator'] = 'Is after or equal to',\n _a['grid.filterAfterOperator'] = 'Is after',\n _a['grid.filterBeforeOperator'] = 'Is before',\n _a['grid.filterBeforeOrEqualOperator'] = 'Is before or equal to',\n _a['grid.filterAndLogic'] = 'And',\n _a['grid.filterOrLogic'] = 'Or',\n _a);\n/**\n * @hidden\n */\nexport function pagerMessagesMap(pagerMessageKey) {\n var messageKey = pagerMessageKey.replace(/^pager\\.([a-z])/, function (_match, group) { return 'grid.pager' + group.toUpperCase(); });\n return ({ messageKey: messageKey, defaultMessage: messages[messageKey] });\n}\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getNestedValue } from './../utils';\nimport { guid, getTemplate, noop } from '@progress/kendo-vue-common';\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `GridSelectionCell` component.\n */\n\nvar GridSelectionCell = {\n props: {\n id: String,\n field: String,\n dataItem: Object,\n format: String,\n type: String,\n className: String,\n colSpan: Number,\n columnIndex: Number,\n columnsCount: Number,\n rowType: String,\n level: Number,\n expanded: Boolean,\n render: [String, Function, Object],\n isSelected: Boolean,\n ariaColumnIndex: Number,\n editor: String\n },\n // @ts-ignore\n emits: {\n selectionchange: null,\n cellkeydown: null\n },\n inject: {\n kendoIntlService: {\n default: null\n },\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n data: function data() {\n return {\n inputId: guid()\n };\n },\n methods: {\n triggerKeydown: function triggerKeydown(e) {\n this.$emit('cellkeydown', {\n event: e,\n dataItem: this.$props.dataItem,\n field: this.$props.field\n });\n },\n handleOnChange: function handleOnChange(event) {\n this.$emit('selectionchange', {\n event: event,\n dataItem: this.$props.dataItem\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var data = getNestedValue(this.$props.field, this.$props.dataItem);\n var renderTemplate = this.$props.render;\n var navAttrs = this.getKeyboardNavigationAttributes(this.$props.id);\n var defaultRendering = this.$props.rowType !== 'groupHeader' ? h(\"td\", {\n onKeydown: this.triggerKeydown,\n on: this.v3 ? undefined : {\n \"keydown\": this.triggerKeydown\n },\n colSpan: this.$props.colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: this.$props.colSpan,\n \"aria-colindex\": this.$props.ariaColumnIndex,\n role: 'gridcell',\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"class\": this.$props.className,\n \"aria-colindex\": this.$props.ariaColumnIndex,\n role: 'gridcell',\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [h(\"input\", {\n checked: this.v3 ? data : null,\n domProps: this.v3 ? undefined : {\n \"checked\": data\n },\n id: this.inputId,\n attrs: this.v3 ? undefined : {\n id: this.inputId,\n type: \"checkbox\"\n },\n type: \"checkbox\",\n \"class\": \"k-checkbox\",\n onChange: this.handleOnChange,\n on: this.v3 ? undefined : {\n \"change\": this.handleOnChange\n }\n }), h(\"label\", {\n \"class\": \"k-checkbox-label\",\n \"for\": this.inputId,\n attrs: this.v3 ? undefined : {\n \"for\": this.inputId\n }\n })]) : null;\n return getTemplate.call(this, {\n h: h,\n template: renderTemplate,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n keydown: this.triggerKeydown,\n change: this.handleOnChange\n }\n });\n }\n};\nvar GridSelectionCellVue3 = GridSelectionCell;\nexport { GridSelectionCell, GridSelectionCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getNestedValue } from './../utils';\nimport { getTemplate, Keys, noop } from '@progress/kendo-vue-common';\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `GridHierarchyCell` component.\n */\n\nvar GridHierarchyCell = {\n props: {\n id: String,\n field: String,\n dataItem: Object,\n format: String,\n type: String,\n className: String,\n colSpan: Number,\n columnIndex: Number,\n columnsCount: Number,\n rowType: String,\n level: Number,\n expanded: Boolean,\n editor: String,\n isSelected: Boolean,\n dataIndex: Number,\n ariaColumnIndex: Number,\n render: [String, Function, Object]\n },\n // @ts-ignore\n emits: {\n change: null,\n cellkeydown: null\n },\n inject: {\n kendoIntlService: {\n default: null\n },\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n methods: {\n triggerKeydown: function triggerKeydown(event, expanded) {\n this.$emit('cellkeydown', {\n event: event,\n dataItem: this.$props.dataItem,\n field: this.$props.field,\n expanded: expanded\n });\n\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.keyCode === Keys.enter) {\n event.preventDefault();\n this.$emit('change', {\n dataItem: this.$props.dataItem,\n dataIndex: this.$props.dataIndex,\n event: event,\n field: this.$props.field,\n value: !expanded\n });\n }\n },\n clickHandler: function clickHandler(e, dataItem, expanded) {\n e.preventDefault();\n this.$emit('change', {\n dataItem: dataItem,\n event: e,\n field: undefined,\n value: !expanded\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var defaultRendering = null;\n var navAttrs = this.getKeyboardNavigationAttributes(this.$props.id);\n\n if (this.$props.rowType === 'groupFooter') {\n defaultRendering = h(\"td\", {\n \"class\": \"k-hierarchy-cell\"\n });\n } else if (this.$props.rowType !== 'groupHeader') {\n var expanded_1 = getNestedValue(this.$props.field, this.$props.dataItem);\n var className = expanded_1 ? 'k-icon k-i-minus' : 'k-icon k-i-plus';\n defaultRendering = h(\"td\", {\n onKeydown: function onKeydown(ev) {\n _this.triggerKeydown(ev, expanded_1);\n },\n on: this.v3 ? undefined : {\n \"keydown\": function onKeydown(ev) {\n _this.triggerKeydown(ev, expanded_1);\n }\n },\n \"class\": \"k-hierarchy-cell\",\n \"aria-expanded\": expanded_1 ? 'true' : 'false',\n attrs: this.v3 ? undefined : {\n \"aria-expanded\": expanded_1 ? 'true' : 'false',\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [h(\"a\", {\n onClick: function onClick(e) {\n _this.clickHandler(e, _this.$props.dataItem, expanded_1);\n },\n on: this.v3 ? undefined : {\n \"click\": function onClick(e) {\n _this.clickHandler(e, _this.$props.dataItem, expanded_1);\n }\n },\n \"class\": className,\n href: \"#\",\n attrs: this.v3 ? undefined : {\n href: \"#\",\n tabIndex: -1\n },\n tabIndex: -1\n })]);\n }\n\n return getTemplate.call(this, {\n h: h,\n template: this.$props.render,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n keydown: this.triggerKeydown,\n click: this.clickHandler\n }\n });\n }\n};\nvar GridHierarchyCellVue3 = GridHierarchyCell;\nexport { GridHierarchyCell, GridHierarchyCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\nimport { noop } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridDetailHierarchyCell` component.\n */\n\nvar GridDetailHierarchyCell = {\n props: {\n id: String\n },\n inject: {\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoIntlService = inject('kendoIntlService', {});\n return {\n v3: v3,\n kendoIntlService: kendoIntlService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var navAttrs = this.getKeyboardNavigationAttributes(this.$props.id);\n return h(\"td\", {\n \"class\": \"k-hierarchy-cell\",\n tabIndex: navAttrs.tabIndex,\n attrs: this.v3 ? undefined : {\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n });\n }\n};\nvar GridDetailHierarchyCellVue3 = GridDetailHierarchyCell;\nexport { GridDetailHierarchyCell, GridDetailHierarchyCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { getTemplate, noop } from '@progress/kendo-vue-common';\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `GridDetailCell` component.\n */\n\nvar GridDetailCell = {\n props: {\n colSpan: Number,\n ariaColIndex: Number,\n dataItem: [Object, String, Number],\n dataIndex: Number,\n detail: [String, Function, Object],\n id: String\n },\n inject: {\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoIntlService = inject('kendoIntlService', {});\n return {\n v3: v3,\n kendoIntlService: kendoIntlService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var _a = this.$props,\n colSpan = _a.colSpan,\n ariaColIndex = _a.ariaColIndex,\n dataItem = _a.dataItem,\n dataIndex = _a.dataIndex,\n id = _a.id;\n var navAttrs = this.getKeyboardNavigationAttributes(id);\n\n var detailRender = function detailRender(args) {\n return getTemplate.call(this, {\n h: h,\n template: this.$props.detail,\n additionalProps: args\n });\n };\n\n return h(\"td\", {\n \"class\": \"k-detail-cell\",\n colSpan: colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: colSpan,\n \"aria-colindex\": ariaColIndex,\n role: 'gridcell',\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"aria-colindex\": ariaColIndex,\n role: 'gridcell',\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [detailRender.call(this, {\n dataItem: dataItem,\n dataIndex: dataIndex\n })]);\n }\n};\nvar GridDetailCellVue3 = GridDetailCell;\nexport { GridDetailCell, GridDetailCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { getNestedValue } from './../utils';\nimport { guid, getTemplate, noop } from '@progress/kendo-vue-common';\nimport { NumericTextBox } from '@progress/kendo-vue-inputs';\nimport { DatePicker } from '@progress/kendo-vue-dateinputs';\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `GridEditCell` component.\n */\n\nvar GridEditCell = {\n props: {\n id: String,\n field: String,\n dataItem: Object,\n format: String,\n type: String,\n className: String,\n colSpan: Number,\n columnIndex: Number,\n columnsCount: Number,\n rowType: String,\n level: Number,\n expanded: Boolean,\n editor: String,\n isSelected: Boolean,\n ariaColumnIndex: Number,\n render: [String, Function, Object]\n },\n // @ts-ignore\n emits: {\n change: null,\n cellkeydown: null,\n edit: null,\n add: null,\n cancel: null,\n save: null,\n remove: null\n },\n inject: {\n kendoIntlService: {\n default: null\n },\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n data: function data() {\n return {\n inputId: guid()\n };\n },\n methods: {\n triggerKeydown: function triggerKeydown(e) {\n this.$emit('cellkeydown', {\n event: e,\n dataItem: this.$props.dataItem,\n field: this.$props.field\n });\n },\n triggerEdit: function triggerEdit(dataItem) {\n this.$emit('edit', dataItem);\n },\n triggerAdd: function triggerAdd(dataItem) {\n this.$emit('add', dataItem);\n },\n triggerCancel: function triggerCancel(dataItem) {\n this.$emit('cancel', dataItem);\n },\n triggerSave: function triggerSave(dataItem) {\n this.$emit('save', dataItem);\n },\n triggerRemove: function triggerRemove(dataItem) {\n this.$emit('remove', dataItem);\n },\n changeHandler: function changeHandler(event, value) {\n if (!value) {\n if (event.target.type === 'checkbox') {\n value = event.target.checked;\n } else {\n value = event.target.valueAsDate ? event.target.valueAsDate : event.target.value;\n }\n }\n\n this.$emit('change', {\n dataItem: this.$props.dataItem,\n field: this.$props.field,\n event: event,\n value: value\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoIntlService = inject('kendoIntlService', {});\n return {\n v3: v3,\n kendoIntlService: kendoIntlService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var data = getNestedValue(this.$props.field, this.$props.dataItem);\n var navAttrs = this.getKeyboardNavigationAttributes(this.$props.id);\n var defaultRendering = null;\n\n switch (this.$props.editor) {\n case 'numeric':\n defaultRendering = h(\"td\", {\n onKeydown: this.triggerKeydown,\n on: this.v3 ? undefined : {\n \"keydown\": this.triggerKeydown\n },\n colSpan: this.$props.colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: this.$props.colSpan,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"class\": this.$props.className,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [// @ts-ignore\n h(NumericTextBox, {\n style: {\n width: '100%'\n },\n value: data === undefined ? null : data,\n attrs: this.v3 ? undefined : {\n value: data === undefined ? null : data\n },\n onChange: this.changeHandler,\n on: this.v3 ? undefined : {\n \"change\": this.changeHandler\n }\n })]);\n break;\n\n case 'date':\n defaultRendering = h(\"td\", {\n onKeydown: this.triggerKeydown,\n on: this.v3 ? undefined : {\n \"keydown\": this.triggerKeydown\n },\n colSpan: this.$props.colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: this.$props.colSpan,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"class\": this.$props.className,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [// @ts-ignore\n h(DatePicker, {\n style: {\n width: '100%'\n },\n value: data,\n attrs: this.v3 ? undefined : {\n value: data\n },\n onChange: this.changeHandler,\n on: this.v3 ? undefined : {\n \"change\": this.changeHandler\n }\n })]);\n break;\n\n case 'boolean':\n defaultRendering = h(\"td\", {\n onKeydown: this.triggerKeydown,\n on: this.v3 ? undefined : {\n \"keydown\": this.triggerKeydown\n },\n colSpan: this.$props.colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: this.$props.colSpan,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"class\": this.$props.className,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [h(\"input\", {\n checked: this.v3 ? data || false : null,\n domProps: this.v3 ? undefined : {\n \"checked\": data || false\n },\n id: this.inputId,\n attrs: this.v3 ? undefined : {\n id: this.inputId,\n type: \"checkbox\"\n },\n type: \"checkbox\",\n \"class\": \"k-checkbox\",\n onChange: this.changeHandler,\n on: this.v3 ? undefined : {\n \"change\": this.changeHandler\n }\n }), h(\"label\", {\n \"class\": \"k-checkbox-label\",\n \"for\": this.inputId,\n attrs: this.v3 ? undefined : {\n \"for\": this.inputId\n }\n })]);\n break;\n\n default:\n defaultRendering = h(\"td\", {\n onKeydown: this.triggerKeydown,\n on: this.v3 ? undefined : {\n \"keydown\": this.triggerKeydown\n },\n colSpan: this.$props.colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: this.$props.colSpan,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"class\": this.$props.className,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [h(\"input\", {\n style: {\n width: '100%'\n },\n \"class\": \"k-textbox\",\n value: this.v3 ? data !== null && data !== void 0 ? data : '' : null,\n domProps: this.v3 ? undefined : {\n \"value\": data !== null && data !== void 0 ? data : ''\n },\n onChange: this.changeHandler,\n on: this.v3 ? undefined : {\n \"change\": this.changeHandler\n }\n })]);\n }\n\n return getTemplate.call(this, {\n h: h,\n template: this.$props.render,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n change: this.changeHandler,\n keydown: this.triggerKeydown,\n edit: this.triggerEdit,\n add: this.triggerAdd,\n cancel: this.triggerCancel,\n save: this.triggerSave,\n remove: this.triggerRemove\n }\n });\n }\n};\nvar GridEditCellVue3 = GridEditCell;\nexport { GridEditCell, GridEditCellVue3 };","var getDocument = function () { return typeof document !== 'undefined' ? document : {}; };\n/**\n * @hidden\n */\nvar BrowserSupportService = /** @class */ (function () {\n function BrowserSupportService() {\n }\n Object.defineProperty(BrowserSupportService.prototype, \"scrollbarWidth\", {\n get: function () {\n var document = getDocument();\n if (!this.scrollbar && document && document.createElement) {\n var div = document.createElement('div');\n div.style.cssText = 'overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block';\n div.innerHTML = ' ';\n document.body.appendChild(div);\n this.scrollbar = div.offsetWidth - div.scrollWidth;\n document.body.removeChild(div);\n }\n return this.scrollbar;\n },\n enumerable: false,\n configurable: true\n });\n return BrowserSupportService;\n}());\nexport { BrowserSupportService };\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar ref = allVue.ref;\nimport { BrowserSupportService } from '../utils/browser-support.service';\nimport { isRtl } from '../utils';\n/**\n * Represents the default `Header` component.\n */\n\nvar Header = {\n props: {\n staticHeaders: Boolean,\n headerRow: Object,\n columnResize: Object,\n cols: Array,\n draggable: Boolean\n },\n data: function data() {\n return {\n divStyle: {},\n element: null,\n headerWrap: null,\n table: null\n };\n },\n computed: {\n wrapperClass: function wrapperClass() {\n return {\n 'k-grid-header': true,\n 'k-grid-draggable-header': this.$props.draggable\n };\n }\n },\n mounted: function mounted() {\n this.headerWrap = this.v3 ? this.headerWrapRef : this.$refs.headerWrap;\n this.table = this.v3 ? this.tableRef : this.$refs.table;\n this.$props.columnResize.colGroupHeader = this.v3 ? this.colGroupHeaderRef : this.$refs.colGroupHeader;\n var scrollbarWidth = new BrowserSupportService().scrollbarWidth;\n var rtl = isRtl(this.$el);\n\n if (this.$props.columnResize) {\n this.$props.columnResize.setIsRtl(rtl);\n }\n\n var padding = Math.max(0, scrollbarWidth - 1) + 'px';\n var right = rtl ? 0 : padding;\n var left = rtl ? padding : 0;\n this.divStyle = {\n padding: \"0 \" + right + \" 0 \" + left\n };\n },\n methods: {\n setScrollLeft: function setScrollLeft(scrollLeft) {\n if (this.headerWrap) {\n this.headerWrap.scrollLeft = scrollLeft;\n }\n },\n setWidth: function setWidth(width) {\n if (this.table) {\n this.table.style.width = width + 'px';\n }\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var headerWrapRef = ref(null);\n var tableRef = ref(null);\n var colGroupHeaderRef = ref(null);\n return {\n v3: v3,\n headerWrapRef: headerWrapRef,\n tableRef: tableRef,\n colGroupHeaderRef: colGroupHeaderRef\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n\n if (!this.$props.staticHeaders) {\n return this.$props.headerRow;\n }\n\n return h(\"div\", {\n \"class\": this.wrapperClass,\n style: this.divStyle,\n role: \"presentation\",\n attrs: this.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n ref: this.v3 ? function (el) {\n _this.headerWrapRef = el;\n } : 'headerWrap',\n \"class\": \"k-grid-header-wrap\",\n role: \"presentation\",\n attrs: this.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"table\", {\n ref: this.v3 ? function (el) {\n _this.tableRef = el;\n } : 'table',\n role: \"presentation\",\n attrs: this.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"colgroup\", {\n role: \"presentation\",\n attrs: this.v3 ? undefined : {\n role: \"presentation\"\n },\n ref: this.v3 ? function (el) {\n _this.colGroupHeaderRef = el;\n } : 'colGroupHeader'\n }, [this.$props.cols]), this.$props.headerRow])])]);\n }\n};\nvar HeaderVue3 = Header;\nexport { Header, HeaderVue3 };","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n/**\n * @hidden\n */\nexport var normalize = function () {\n var _a;\n var settings = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n settings[_i] = arguments[_i];\n }\n return (_a = Object).assign.apply(_a, __spreadArrays([{ allowUnsort: true, mode: 'single' }], settings));\n};\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { Draggable } from '@progress/kendo-vue-common';\n/**\n * Represents the default `ColumnResizer` component.\n */\n\nvar ColumnResizer = {\n mounted: function mounted() {\n if (this.$el) {\n this.draggable = this.$refs.draggable;\n }\n },\n methods: {\n drag: function drag(event) {\n var element = this.draggable && this.draggable.element;\n\n if (element) {\n this.$emit('resize', event, element, false);\n }\n },\n release: function release(event) {\n var element = this.draggable && this.draggable.element;\n\n if (element) {\n this.$emit('resize', event, element, true);\n }\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var resizeStyle = {\n // TODO: move to theme\n cursor: 'col-resize',\n display: 'block',\n height: '1000%',\n position: 'absolute',\n // [this.props.isRtl ? 'left' : 'right']: 0,\n top: 0,\n width: '.5em'\n };\n return (// @ts-ignore function children\n h(Draggable, {\n onDrag: this.drag,\n on: this.v3 ? undefined : {\n \"drag\": this.drag,\n \"release\": this.release\n },\n onRelease: this.release,\n ref: 'draggable'\n }, this.v3 ? function () {\n return [h(\"span\", {\n \"class\": \"k-column-resizer\",\n draggable: false,\n attrs: _this.v3 ? undefined : {\n draggable: false\n },\n style: resizeStyle\n })];\n } : [h(\"span\", {\n \"class\": \"k-column-resizer\",\n draggable: false,\n attrs: _this.v3 ? undefined : {\n draggable: false\n },\n style: resizeStyle\n })])\n );\n }\n};\nvar ColumnResizerVue3 = ColumnResizer;\nexport { ColumnResizer, ColumnResizerVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getDefaultSlots, Draggable } from '@progress/kendo-vue-common';\n/**\n * Represents the default `ColumnDraggable` component.\n */\n\nvar ColumnDraggable = {\n mounted: function mounted() {\n if (this.$el) {\n this.draggable = this.$refs.draggable;\n }\n },\n methods: {\n onPress: function onPress(event) {\n var element = this.draggable && this.draggable.element;\n\n if (element) {\n this.$emit('pressHandler', event, element);\n }\n },\n onDrag: function onDrag(event) {\n var element = this.draggable && this.draggable.element;\n\n if (element) {\n this.$emit('dragHandler', event, element);\n }\n },\n onRelease: function onRelease(event) {\n var element = this.draggable && this.draggable.element;\n\n if (element) {\n this.$emit('releaseHandler', event, element);\n }\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n return (// @ts-ignore function children\n h(Draggable, {\n onPress: this.onPress,\n on: this.v3 ? undefined : {\n \"press\": this.onPress,\n \"drag\": this.onDrag,\n \"release\": this.onRelease\n },\n onDrag: this.onDrag,\n onRelease: this.onRelease,\n ref: 'draggable'\n }, this.v3 ? function () {\n return [h(\"tr\", [defaultSlot])];\n } : [h(\"tr\", [defaultSlot])])\n );\n }\n};\nvar ColumnDraggableVue3 = ColumnDraggable;\nexport { ColumnDraggable, ColumnDraggableVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getTemplate, getDefaultSlots } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridHeaderCell` component.\n */\n\nvar GridHeaderCell = {\n props: {\n field: String,\n title: String,\n sortable: [Boolean, Object],\n render: [Object, Function, String]\n },\n methods: {\n clickHandler: function clickHandler(event) {\n this.$emit('headercellclick', event);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n var renderTemplate = this.$props.render;\n var textInCell = this.$props.title || this.$props.field || \"\\xA0\";\n var defaultRendering = this.$props.sortable ? h(\"span\", {\n \"class\": \"k-link\",\n onClick: this.clickHandler,\n on: this.v3 ? undefined : {\n \"click\": this.clickHandler\n }\n }, [textInCell, defaultSlot]) : defaultSlot ? h(\"span\", [textInCell, defaultSlot]) // @ts-ignore\n : this.v3 ? textInCell : this._v(textInCell);\n return getTemplate.call(this, {\n h: h,\n template: renderTemplate,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n click: this.clickHandler\n }\n });\n }\n};\nvar GridHeaderCellVue3 = GridHeaderCell;\nexport { GridHeaderCell, GridHeaderCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { Keys } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridColumnMenuItem` component.\n */\n\nvar GridColumnMenuItem = {\n props: {\n title: String,\n iconClass: String,\n selected: Boolean\n },\n methods: {\n onClick: function onClick(e) {\n this.$emit('menuitemclick', e);\n },\n onKeyDown: function onKeyDown(event) {\n if (event.keyCode === Keys.enter) {\n this.$emit('menuitemclick', event);\n }\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var _a = this.$props,\n title = _a.title,\n iconClass = _a.iconClass,\n selected = _a.selected;\n return h(\"div\", {\n tabindex: 0,\n attrs: this.v3 ? undefined : {\n tabindex: 0\n },\n onKeydown: this.onKeyDown,\n on: this.v3 ? undefined : {\n \"keydown\": this.onKeyDown,\n \"click\": this.onClick\n },\n onClick: this.onClick,\n \"class\": \"k-columnmenu-item \" + (selected ? 'k-state-selected' : '')\n }, [iconClass && h(\"span\", {\n \"class\": \"k-icon \" + iconClass\n }), title]);\n }\n};\nvar GridColumnMenuItemVue3 = GridColumnMenuItem;\nexport { GridColumnMenuItem, GridColumnMenuItemVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getDefaultSlots } from '@progress/kendo-vue-common';\n/**\n * The GridColumnMenuItemGroup that will be used inside the Grid ColumnMenu.\n */\n\nvar GridColumnMenuItemGroup = {\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n return h(\"div\", {\n \"class\": \"k-columnmenu-item-wrapper\"\n }, [defaultSlot]);\n }\n};\nvar GridColumnMenuItemGroupVue3 = GridColumnMenuItemGroup;\nexport { GridColumnMenuItemGroup, GridColumnMenuItemGroupVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { GridColumnMenuItem } from './GridColumnMenuItem';\nimport { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';\nimport { normalize } from '../interfaces/GridSortSettings';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { messages, sortAscending, sortDescending } from '../messages';\nimport { hasListener } from '@progress/kendo-vue-common';\n/**\n * @hidden\n */\n\nvar ASC_DIR = 'asc';\n/**\n * @hidden\n */\n\nvar DESC_DIR = 'desc';\n/**\n * @hidden\n */\n\nvar sortSeqMap = {\n true: {\n 'asc': {\n 'asc': '',\n 'desc': 'desc'\n },\n 'desc': {\n 'asc': 'asc',\n 'desc': ''\n },\n '': {\n 'asc': 'asc',\n 'desc': 'desc'\n }\n },\n false: {\n 'asc': {\n 'asc': 'asc',\n 'desc': 'desc'\n },\n 'desc': {\n 'asc': 'asc',\n 'desc': 'desc'\n },\n '': {\n 'asc': 'asc',\n 'desc': 'desc'\n }\n }\n};\n/**\n * @hidden\n */\n\nvar sortIndex = function sortIndex(field, sort) {\n if (!sort) {\n return -1;\n }\n\n return sort.findIndex(function (s) {\n return s.field === field;\n });\n};\n/**\n * @hidden\n */\n\n\nvar sortedAsc = function sortedAsc(sortedIndex, sort) {\n return !!(sort && sortedIndex > -1 && sort[sortedIndex].dir === ASC_DIR);\n};\n/**\n * @hidden\n */\n\n\nvar sortedDesc = function sortedDesc(sortedIndex, sort) {\n return !!(sort && sortedIndex > -1 && sort[sortedIndex].dir === DESC_DIR);\n}; // tslint:disable:max-line-length\n\n/**\n * Can be used to check if sorting is applied to a specific field ([see example]({% slug column_menu_grid_native %}#toc-styling-the-column-menu-icon)). Useful for creating active sort indicators.\n */\n// tslint:enable:max-line-length\n\n\nexport var sortGroupByField = function sortGroupByField(field, sort) {\n var currentSortIndex = sortIndex(field, sort);\n return sortedDesc(currentSortIndex, sort) || sortedAsc(currentSortIndex, sort);\n};\n/**\n * Represents the default `GridColumnMenuSort` component.\n */\n\nvar GridColumnMenuSort = {\n props: {\n sortable: [Boolean, Object],\n sort: {\n type: Array\n },\n column: Object\n },\n inject: {\n kendoLocalizationService: {\n default: null\n }\n },\n methods: {\n onAscClick: function onAscClick(e) {\n this.onSort(e, ASC_DIR);\n this.$emit('closemenu');\n },\n onDescClick: function onDescClick(e) {\n this.onSort(e, DESC_DIR);\n this.$emit('closemenu');\n },\n onSort: function onSort(e, selectedDir) {\n e.preventDefault();\n\n if (!hasListener.call(this, 'sortchange')) {\n return;\n }\n\n var _a = this.$props,\n column = _a.column,\n sortable = _a.sortable,\n sort = _a.sort;\n\n var _b = normalize(sortable || false, false),\n allowUnsort = _b.allowUnsort,\n mode = _b.mode;\n\n var oldDescriptor = (sort || []).filter(function (d) {\n return d.field === column.field;\n })[0];\n var dir = sortSeqMap[allowUnsort][oldDescriptor && oldDescriptor.dir || ''][selectedDir];\n var newDescriptor = mode === 'single' ? [] : (this.$props.sort || []).filter(function (d) {\n return d.field !== column.field;\n });\n\n if (dir !== '' && column.field) {\n newDescriptor.push({\n field: column.field,\n dir: dir\n });\n }\n\n this.$emit('sortchange', newDescriptor, {\n event: e,\n field: this.$props.column.field\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var _a = this.$props,\n sort = _a.sort,\n column = _a.column;\n var currentSortIndex = sortIndex(column.field, sort);\n var localizationService = provideLocalizationService(this);\n return (// @ts-ignore function children\n h(GridColumnMenuItemGroup, this.v3 ? function () {\n return [// @ts-ignore\n h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),\n attrs: _this.v3 ? undefined : {\n title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),\n iconClass: 'k-i-sort-asc-sm',\n selected: sortedAsc(currentSortIndex, sort)\n },\n iconClass: 'k-i-sort-asc-sm',\n selected: sortedAsc(currentSortIndex, sort),\n onMenuitemclick: _this.onAscClick,\n on: _this.v3 ? undefined : {\n \"menuitemclick\": _this.onAscClick\n }\n }), // @ts-ignore\n h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),\n attrs: _this.v3 ? undefined : {\n title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),\n iconClass: 'k-i-sort-desc-sm',\n selected: sortedDesc(currentSortIndex, sort)\n },\n iconClass: 'k-i-sort-desc-sm',\n selected: sortedDesc(currentSortIndex, sort),\n onMenuitemclick: _this.onDescClick,\n on: _this.v3 ? undefined : {\n \"menuitemclick\": _this.onDescClick\n }\n })];\n } : [h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),\n attrs: _this.v3 ? undefined : {\n title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),\n iconClass: 'k-i-sort-asc-sm',\n selected: sortedAsc(currentSortIndex, sort)\n },\n iconClass: 'k-i-sort-asc-sm',\n selected: sortedAsc(currentSortIndex, sort),\n onMenuitemclick: _this.onAscClick,\n on: _this.v3 ? undefined : {\n \"menuitemclick\": _this.onAscClick\n }\n }), h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),\n attrs: _this.v3 ? undefined : {\n title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),\n iconClass: 'k-i-sort-desc-sm',\n selected: sortedDesc(currentSortIndex, sort)\n },\n iconClass: 'k-i-sort-desc-sm',\n selected: sortedDesc(currentSortIndex, sort),\n onMenuitemclick: _this.onDescClick,\n on: _this.v3 ? undefined : {\n \"menuitemclick\": _this.onDescClick\n }\n })])\n );\n }\n};\nvar GridColumnMenuSortVue3 = GridColumnMenuSort;\nexport { GridColumnMenuSort, GridColumnMenuSortVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getDefaultSlots } from '@progress/kendo-vue-common';\nimport { Reveal } from '@progress/kendo-vue-animation';\n/**\n * Represents the default `GridColumnMenuItemContent` component.\n */\n\nvar GridColumnMenuItemContent = {\n props: {\n show: Boolean\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n return h(\"div\", {\n \"class\": 'k-columnmenu-item-content'\n }, [// @ts-ignore function children\n h(Reveal, {\n appear: this.$props.show,\n attrs: this.v3 ? undefined : {\n appear: this.$props.show\n },\n style: {\n position: 'relative',\n display: 'block'\n }\n }, this.v3 ? function () {\n return [_this.$props.show ? defaultSlot : null];\n } : [_this.$props.show ? defaultSlot : null])]);\n }\n};\nvar GridColumnMenuItemContentVue3 = GridColumnMenuItemContent;\nexport { GridColumnMenuItemContent, GridColumnMenuItemContentVue3 };","import { messages } from './messages';\n/**\n * @hidden\n */\nexport var filterLogicList = [\n { text: 'grid.filterAndLogic', operator: 'and' },\n { text: 'grid.filterOrLogic', operator: 'or' }\n];\n/**\n * @hidden\n */\nexport var operators = {\n 'text': [\n { text: 'grid.filterContainsOperator', operator: 'contains' },\n { text: 'grid.filterNotContainsOperator', operator: 'doesnotcontain' },\n { text: 'grid.filterEqOperator', operator: 'eq' },\n { text: 'grid.filterNotEqOperator', operator: 'neq' },\n { text: 'grid.filterStartsWithOperator', operator: 'startswith' },\n { text: 'grid.filterEndsWithOperator', operator: 'endswith' },\n { text: 'grid.filterIsNullOperator', operator: 'isnull' },\n { text: 'grid.filterIsNotNullOperator', operator: 'isnotnull' },\n { text: 'grid.filterIsEmptyOperator', operator: 'isempty' },\n { text: 'grid.filterIsNotEmptyOperator', operator: 'isnotempty' }\n ],\n 'numeric': [\n { text: 'grid.filterEqOperator', operator: 'eq' },\n { text: 'grid.filterNotEqOperator', operator: 'neq' },\n { text: 'grid.filterGteOperator', operator: 'gte' },\n { text: 'grid.filterGtOperator', operator: 'gt' },\n { text: 'grid.filterLteOperator', operator: 'lte' },\n { text: 'grid.filterLtOperator', operator: 'lt' },\n { text: 'grid.filterIsNullOperator', operator: 'isnull' },\n { text: 'grid.filterIsNotNullOperator', operator: 'isnotnull' }\n ],\n 'date': [\n { text: 'grid.filterEqOperator', operator: 'eq' },\n { text: 'grid.filterNotEqOperator', operator: 'neq' },\n { text: 'grid.filterAfterOrEqualOperator', operator: 'gte' },\n { text: 'grid.filterAfterOperator', operator: 'gt' },\n { text: 'grid.filterBeforeOperator', operator: 'lt' },\n { text: 'grid.filterBeforeOrEqualOperator', operator: 'lte' },\n { text: 'grid.filterIsNullOperator', operator: 'isnull' },\n { text: 'grid.filterIsNotNullOperator', operator: 'isnotnull' }\n ],\n 'boolean': [\n { text: 'grid.filterEqOperator', operator: 'eq' }\n ]\n};\n/**\n * @hidden\n */\nexport var IsUnaryFilter = function (operator) {\n return operator === 'isnull' || operator === 'isnotnull' || operator === 'isempty' || operator === 'isnotempty';\n};\n/**\n * @hidden\n */\nexport var operatorMap = function (iterable, service) { return iterable.map(function (operator) { return ({\n text: service.toLanguageString(operator.text, messages[operator.text]),\n operator: operator.operator\n}); }); };\n/**\n * @hidden\n */\nexport var defaultBooleanOperator = 'eq';\n/**\n * @hidden\n */\nexport var booleanFilterValues = [\n { text: 'grid.filterBooleanAll', operator: '' },\n { text: 'grid.filterIsTrue', operator: true },\n { text: 'grid.filterIsFalse', operator: false }\n];\n/**\n * @hidden\n */\nexport var defaultHideSecondFilter = {\n text: false,\n numeric: false,\n date: false,\n boolean: true\n};\n/**\n * @hidden\n */\nexport var cellInputChange = function (value, e, props) {\n var defaultOperator = getDefaultOperator(props.operators);\n var operator = props.operator;\n switch (props.filterType) {\n case 'numeric':\n if (!operator || IsUnaryFilter(operator)) {\n // change the operator to default\n operator = defaultOperator;\n }\n if (value === null && operator === defaultOperator) {\n // clear only the default operator\n operator = '';\n }\n break;\n case 'date':\n if (!operator || IsUnaryFilter(operator)) {\n operator = defaultOperator;\n }\n if (value === null && operator === defaultOperator) {\n operator = '';\n }\n break;\n case 'text':\n if (!operator || IsUnaryFilter(operator)) {\n operator = defaultOperator;\n }\n if (!value && operator === defaultOperator) {\n operator = '';\n }\n break;\n default: return;\n }\n return { value: value, operator: operator, event: e };\n};\n/**\n * @hidden\n */\nexport var getDefaultOperator = function (filterOperators, filterType) {\n if (filterType) {\n return filterOperators[filterType][0].operator;\n }\n else {\n return filterOperators[0].operator;\n }\n};\n/**\n * @hidden\n */\nexport var getFilterType = function (filterType) {\n return filterType || 'text';\n};\n/**\n * @hidden\n */\nexport var cellBoolDropdownChange = function (value, e) {\n return {\n value: value,\n operator: value === '' ? '' : defaultBooleanOperator,\n event: e\n };\n};\n/**\n * @hidden\n */\nexport var cellOperatorChange = function (operator, e, value) {\n if (IsUnaryFilter(operator)) {\n // clear the value to avoid confusion on what is filtered\n value = null;\n }\n return { value: value, operator: operator, event: e };\n};\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { DropDownList } from '@progress/kendo-vue-dropdowns';\nimport { NumericTextBox } from '@progress/kendo-vue-inputs';\nimport { DatePicker } from '@progress/kendo-vue-dateinputs';\nimport { cellBoolDropdownChange, cellInputChange, cellOperatorChange } from '../filterCommon';\n/**\n * Represents the default `GridColumnMenuFilterCell` component.\n */\n\nvar GridColumnMenuFilterCell = {\n props: {\n field: String,\n filterType: String,\n value: [Object, String, Number, Date, Boolean],\n operator: String,\n operators: Array,\n booleanValues: Array\n },\n // @ts-ignore\n emits: {\n change: null\n },\n methods: {\n handleFocus: function handleFocus(e) {\n this.$emit('filtercellfocus', e);\n },\n triggerChange: function triggerChange(filter) {\n this.$emit('change', filter);\n },\n inputChange: function inputChange(value, e) {\n var filter = cellInputChange(value, e, this.$props);\n this.triggerChange(filter);\n },\n operatorChange: function operatorChange(operatorValue, e) {\n var filter = cellOperatorChange(operatorValue.value.operator, e, this.$props.value);\n this.triggerChange(filter);\n },\n boolDropdownChange: function boolDropdownChange(value, e) {\n var filter = cellBoolDropdownChange(value.value.operator, e);\n this.triggerChange(filter);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var ddlValue = this.$props.operators.find(function (item) {\n return item.operator === _this.$props.operator;\n }) || null;\n\n var filterComponent = function filterComponent(filterType, value, booleanValues) {\n var _this = this;\n\n switch (filterType) {\n case 'numeric':\n return (// @ts-ignore\n h(NumericTextBox, {\n value: value,\n attrs: this.v3 ? undefined : {\n value: value\n },\n onChange: function onChange(e) {\n _this.inputChange(e.value, e.event);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n _this.inputChange(e.value, e.event);\n }\n }\n })\n );\n\n case 'date':\n return (// @ts-ignore\n h(DatePicker, {\n value: value,\n attrs: this.v3 ? undefined : {\n value: value\n },\n onFocus: this.handleFocus,\n on: this.v3 ? undefined : {\n \"focus\": this.handleFocus,\n \"change\": function change(e) {\n _this.inputChange(e.value, e.event);\n }\n },\n onChange: function change(e) {\n _this.inputChange(e.value, e.event);\n }\n })\n );\n\n case 'boolean':\n var noFilterSet_1 = function noFilterSet_1(filter) {\n return filter === null || filter === undefined;\n };\n\n return (// @ts-ignore\n h(DropDownList, {\n onChange: this.boolDropdownChange,\n on: this.v3 ? undefined : {\n \"change\": this.boolDropdownChange\n },\n value: booleanValues.find(function (item) {\n return item.operator === (noFilterSet_1(value) ? '' : value);\n }),\n attrs: this.v3 ? undefined : {\n value: booleanValues.find(function (item) {\n return item.operator === (noFilterSet_1(value) ? '' : value);\n }),\n \"data-items\": booleanValues,\n textField: \"text\"\n },\n \"data-items\": booleanValues,\n textField: \"text\"\n })\n );\n\n default:\n return h(\"input\", {\n \"class\": \"k-textbox\",\n value: this.v3 ? value || '' : null,\n domProps: this.v3 ? undefined : {\n \"value\": value || ''\n },\n onInput: function onInput(e) {\n _this.inputChange(e.target.value, e);\n },\n on: this.v3 ? undefined : {\n \"input\": function onInput(e) {\n _this.inputChange(e.target.value, e);\n }\n }\n });\n }\n };\n\n return h(\"div\", [this.$props.filterType !== 'boolean' && // @ts-ignore\n h(DropDownList, {\n onChange: this.operatorChange,\n on: this.v3 ? undefined : {\n \"change\": this.operatorChange\n },\n value: ddlValue,\n attrs: this.v3 ? undefined : {\n value: ddlValue,\n \"data-items\": this.$props.operators,\n textField: \"text\"\n },\n \"data-items\": this.$props.operators,\n textField: \"text\"\n }), filterComponent.call(this, this.$props.filterType, this.$props.value, this.$props.booleanValues)]);\n }\n};\nvar GridColumnMenuFilterCellVue3 = GridColumnMenuFilterCell;\nexport { GridColumnMenuFilterCell, GridColumnMenuFilterCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { GridColumnMenuFilterCell } from './GridColumnMenuFilterCell';\nimport { DropDownList } from '@progress/kendo-vue-dropdowns';\nimport { getTemplate } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridColumnMenuFilterUI` component.\n */\n\nvar GridColumnMenuFilterUI = {\n props: {\n firstFilterProps: Object,\n secondFilterProps: Object,\n logicValue: Object,\n logicData: Array,\n hideSecondFilter: Boolean,\n operators: Array,\n render: [String, Function, Object]\n },\n // @ts-ignore\n emits: {\n change: null\n },\n methods: {\n handleFocus: function handleFocus(e) {\n this.$emit('filteruifocus', e);\n },\n changeHandler: function changeHandler(e, filterIndex) {\n this.$emit('change', e, filterIndex);\n },\n logicChange: function logicChange(e) {\n this.$emit('logicChange', e);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var _a = this.$props,\n firstFilterProps = _a.firstFilterProps,\n hideSecondFilter = _a.hideSecondFilter,\n secondFilterProps = _a.secondFilterProps,\n logicData = _a.logicData,\n logicValue = _a.logicValue,\n operators = _a.operators,\n render = _a.render;\n var firstField = firstFilterProps.field,\n firstValue = firstFilterProps.value,\n firstOperator = firstFilterProps.operator,\n firstBooleanValues = firstFilterProps.booleanValues,\n firstFilterType = firstFilterProps.filterType,\n secondField = secondFilterProps.field,\n secondValue = secondFilterProps.value,\n secondOperator = secondFilterProps.operator,\n secondBooleanValues = secondFilterProps.booleanValues,\n secondFilterType = secondFilterProps.filterType;\n var defaultRendering = h(\"div\", [// @ts-ignore\n h(GridColumnMenuFilterCell, {\n field: firstField,\n attrs: this.v3 ? undefined : {\n field: firstField,\n value: firstValue,\n operator: firstOperator,\n booleanValues: firstBooleanValues,\n filterType: firstFilterType,\n operators: operators\n },\n value: firstValue,\n operator: firstOperator,\n booleanValues: firstBooleanValues,\n filterType: firstFilterType,\n onFiltercellfocus: this.handleFocus,\n on: this.v3 ? undefined : {\n \"filtercellfocus\": this.handleFocus,\n \"change\": function change(e) {\n _this.changeHandler(e, 0);\n }\n },\n onChange: function change(e) {\n _this.changeHandler(e, 0);\n },\n operators: operators\n }), !hideSecondFilter && h(\"div\", [// @ts-ignore\n h(DropDownList, {\n onChange: this.logicChange,\n on: this.v3 ? undefined : {\n \"change\": this.logicChange\n },\n \"class\": \"k-filter-and\",\n \"data-items\": logicData,\n attrs: this.v3 ? undefined : {\n \"data-items\": logicData,\n value: logicValue,\n textField: \"text\"\n },\n value: logicValue,\n textField: \"text\"\n }), // @ts-ignore\n h(GridColumnMenuFilterCell, {\n field: secondField,\n attrs: this.v3 ? undefined : {\n field: secondField,\n value: secondValue,\n operator: secondOperator,\n booleanValues: secondBooleanValues,\n filterType: secondFilterType,\n operators: operators\n },\n value: secondValue,\n operator: secondOperator,\n booleanValues: secondBooleanValues,\n filterType: secondFilterType,\n onFiltercellfocus: this.handleFocus,\n on: this.v3 ? undefined : {\n \"filtercellfocus\": this.handleFocus,\n \"change\": function change(e) {\n _this.changeHandler(e, 1);\n }\n },\n onChange: function change(e) {\n _this.changeHandler(e, 1);\n },\n operators: operators\n })])]);\n return getTemplate.call(this, {\n h: h,\n template: render,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n change: this.changeHandler,\n logicchange: this.logicChange\n }\n });\n }\n};\nvar GridColumnMenuFilterUIVue3 = GridColumnMenuFilterUI;\nexport { GridColumnMenuFilterUI, GridColumnMenuFilterUIVue3 };","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}; // @ts-ignore\n\n\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { templateRendering, hasListener, getListeners } from '@progress/kendo-vue-common';\nimport { isCompositeFilterDescriptor } from '@progress/kendo-data-query';\nimport { GridColumnMenuItem } from './GridColumnMenuItem';\nimport { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';\nimport { GridColumnMenuItemContent } from './GridColumnMenuItemContent';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { operatorMap, getDefaultOperator, filterLogicList, defaultHideSecondFilter, booleanFilterValues, getFilterType, operators } from '../filterCommon';\nimport { messages, filterClearButton, filterSubmitButton, filterTitle } from '../messages';\nimport { GridColumnMenuFilterUI } from './GridColumnMenuFilterUI';\n/**\n * @hidden\n */\n\nexport var rootFilterOrDefault = function rootFilterOrDefault(rootFilter) {\n return rootFilter || {\n filters: [],\n logic: 'and'\n };\n}; // tslint:disable:max-line-length\n\n/**\n * Can be used to check if filtering is applied to a specific field ([see example]({% slug column_menu_grid_native %}#toc-styling-the-column-menu-icon)). Useful for creating active filter indicators.\n */\n// tslint:enable:max-line-length\n\nexport var filterGroupByField = function filterGroupByField(field, filter) {\n var rootFilter = rootFilterOrDefault(filter);\n var compositeFilters = rootFilter.filters.filter(function (f) {\n if (isCompositeFilterDescriptor(f)) {\n return f.filters && f.filters.length && f.filters.length <= 2 && !f.filters.find(function (nf) {\n return isCompositeFilterDescriptor(nf) || nf.field !== field;\n });\n }\n\n return false;\n });\n return compositeFilters[0] || null;\n};\n/**\n * Represents the default `GridColumnMenuFilter` component.\n */\n\nvar GridColumnMenuFilter = {\n name: 'KendoGridColumnMenuFilter',\n props: {\n column: Object,\n filter: Object,\n expanded: {\n type: Boolean,\n default: undefined\n },\n filterable: Boolean,\n filterOperators: {\n type: Object,\n default: function _default() {\n return operators;\n }\n },\n hideSecondFilter: {\n type: [Boolean, Object],\n default: function _default() {\n return undefined;\n }\n },\n filterUI: [String, Function, Object]\n },\n inject: {\n kendoLocalizationService: {\n default: null\n }\n },\n data: function data() {\n return {\n currentExpanded: false,\n filterGroup: null\n };\n },\n created: function created() {\n var _this = this;\n\n var filterGroup;\n\n if (this.$props.column && this.$props.column.field) {\n var filterType = getFilterType(this.$props.column.filter);\n var defaultOperator = getDefaultOperator(this.$props.filterOperators, filterType);\n filterGroup = filterGroupByField(this.$props.column.field, this.$props.filter);\n filterGroup = filterGroup ? __assign(__assign({}, filterGroup), {\n filters: filterGroup.filters.map(function (f) {\n return __assign({}, f);\n })\n }) : {\n logic: 'and',\n filters: [{\n field: this.$props.column.field,\n operator: defaultOperator\n }, {\n field: this.$props.column.field,\n operator: defaultOperator\n }]\n };\n\n if (filterGroup.filters.filter(function (x) {\n return x.field === _this.$props.column.field;\n }).length === 1) {\n filterGroup.filters.splice(1, 0, {\n field: this.$props.column.field,\n operator: defaultOperator\n });\n }\n }\n\n this.currentExpanded = this.$props.expanded || false;\n this.filterGroup = filterGroup;\n },\n methods: {\n removeGroup: function removeGroup(group, rootFilter) {\n var filters = __spreadArrays(rootFilter.filters);\n\n var groupIndex = filters.findIndex(function (f) {\n return f === group;\n });\n\n if (groupIndex > -1) {\n filters.splice(groupIndex, 1);\n }\n\n return __assign(__assign({}, rootFilter), {\n filters: filters\n });\n },\n insertGroup: function insertGroup(group, rootFilter) {\n return __assign(__assign({}, rootFilter), {\n filters: __spreadArrays([group], rootFilter.filters)\n });\n },\n isControlled: function isControlled() {\n return this.$props.expanded !== undefined;\n },\n onFilterExpand: function onFilterExpand() {\n var isControlled = this.isControlled();\n var nextValue = !(isControlled ? this.$props.expanded : this.currentExpanded);\n this.$emit('expandchange', nextValue);\n\n if (!isControlled) {\n this.currentExpanded = nextValue;\n }\n },\n filterChangeHandler: function filterChangeHandler(e, filterIndex) {\n this.filterChange(filterIndex || 0, e);\n },\n firstFilterChange: function firstFilterChange(e) {\n this.filterChange(0, e);\n },\n secondFilterChange: function secondFilterChange(e) {\n this.filterChange(1, e);\n },\n filterChange: function filterChange(filterIndex, e) {\n var filters = this.filterGroup.filters.map(function (f, i) {\n if (i === filterIndex) {\n return __assign(__assign({}, f), {\n value: e.value,\n operator: e.operator\n });\n }\n\n return f;\n });\n this.filterGroup = __assign(__assign({}, this.filterGroup), {\n filters: filters\n });\n },\n logicChange: function logicChange(e) {\n this.filterGroup = __assign(__assign({}, this.filterGroup), {\n logic: e.target.value.operator\n });\n },\n clear: function clear(e) {\n e.preventDefault();\n\n if (!hasListener.call(this, 'filterchange')) {\n return;\n }\n\n var field = this.$props.column.field;\n var rootFilter = rootFilterOrDefault(this.$props.filter);\n var filterGroup = filterGroupByField(field, this.$props.filter);\n var rootFilters = rootFilter.filters.filter(function (f) {\n return f !== filterGroup;\n });\n\n if (!rootFilters.length) {\n this.$emit('filterchange', null, {\n event: e,\n field: this.$props.column.field\n });\n } else {\n this.$emit('filterchange', __assign(__assign({}, rootFilter), {\n filters: rootFilters\n }), {\n event: e,\n field: this.$props.column.field\n });\n }\n\n this.$emit('closemenu');\n },\n currentFilterGroup: function currentFilterGroup() {\n return __assign(__assign({}, this.filterGroup), {\n filters: this.filterGroup.filters.filter(function (nf) {\n return nf.value !== undefined && nf.value !== null && nf.value !== '' || nf.value === null && nf.operator;\n })\n });\n },\n submit: function submit(e) {\n e.preventDefault();\n\n if (!hasListener.call(this, 'filterchange')) {\n return;\n }\n\n var field = this.$props.column.field;\n var rootFilter = rootFilterOrDefault(this.$props.filter);\n var filterGroup = filterGroupByField(field, this.$props.filter);\n var currentFilterGroup = this.currentFilterGroup();\n var updatedFilter = null;\n\n if (filterGroup && currentFilterGroup.filters.length > 0) {\n var rootFilters = rootFilter.filters.map(function (f) {\n if (f === filterGroup) {\n return currentFilterGroup;\n }\n\n return f;\n });\n updatedFilter = __assign(__assign({}, rootFilter), {\n filters: rootFilters\n });\n } else if (currentFilterGroup.filters.length === 0) {\n var rootFilters = rootFilter.filters.filter(function (f) {\n return f !== filterGroup;\n });\n\n if (rootFilters.length) {\n updatedFilter = __assign(__assign({}, rootFilter), {\n filters: rootFilters\n });\n }\n } else {\n updatedFilter = __assign(__assign({}, rootFilter), {\n filters: __spreadArrays(rootFilter.filters, [currentFilterGroup])\n });\n }\n\n this.$emit('filterchange', updatedFilter, {\n event: e,\n field: this.$props.column.field\n });\n this.$emit('closemenu');\n },\n handleFocus: function handleFocus(e) {\n this.$emit('filterfocus', e);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this2 = this;\n\n var h = gh || createElement;\n var _a = this.$props,\n column = _a.column,\n filterUI = _a.filterUI,\n hideSecondFilter = _a.hideSecondFilter,\n filterOperators = _a.filterOperators;\n\n if (!column || !column.field) {\n return h(\"div\");\n }\n\n var filterType = column.filter || 'text';\n var currentHideSecondFilter = hideSecondFilter !== undefined ? hideSecondFilter : defaultHideSecondFilter[filterType];\n var localizationService = provideLocalizationService(this);\n var filters = this.filterGroup.filters;\n var currentOperators = operatorMap(filterOperators[filterType], localizationService);\n var booleanValues = operatorMap(booleanFilterValues, localizationService);\n var firstFilterCellProps = {\n field: column.field,\n value: filters[0].value,\n operator: filters[0].operator,\n operators: currentOperators,\n booleanValues: booleanValues,\n filterType: filterType\n };\n var secondFilterCellProps = {\n field: column.field,\n value: filters[1].value,\n operator: filters[1].operator,\n operators: currentOperators,\n booleanValues: booleanValues,\n filterType: filterType\n };\n var filterLogic = this.filterGroup.logic;\n var logicData = operatorMap(filterLogicList, localizationService);\n var logicProps = {\n value: logicData.find(function (item) {\n return item.operator === (filterLogic === null ? '' : filterLogic);\n }),\n data: logicData\n };\n var isFilterValid = this.currentFilterGroup().filters.length !== 0;\n var expandState = this.isControlled() ? this.$props.expanded : this.currentExpanded;\n return (// @ts-ignore function children\n h(GridColumnMenuItemGroup, this.v3 ? function () {\n return [// @ts-ignore\n h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n attrs: _this2.v3 ? undefined : {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n iconClass: 'k-i-filter'\n },\n iconClass: 'k-i-filter',\n onMenuitemclick: _this2.onFilterExpand,\n on: _this2.v3 ? undefined : {\n \"menuitemclick\": _this2.onFilterExpand\n }\n }), // @ts-ignore function children\n h(GridColumnMenuItemContent, {\n show: !!expandState,\n attrs: _this2.v3 ? undefined : {\n show: !!expandState\n }\n }, _this2.v3 ? function () {\n return [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [// @ts-ignore\n h(GridColumnMenuFilterUI, {\n firstFilterProps: firstFilterCellProps,\n attrs: _this2.v3 ? undefined : {\n firstFilterProps: firstFilterCellProps,\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n },\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n onFilteruifocus: _this2.handleFocus,\n on: _this2.v3 ? undefined : {\n \"filteruifocus\": _this2.handleFocus,\n \"logicChange\": _this2.logicChange,\n \"change\": _this2.filterChangeHandler\n },\n onLogicChange: _this2.logicChange,\n onChange: _this2.filterChangeHandler,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n }), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary',\n disabled: !isFilterValid,\n attrs: _this2.v3 ? undefined : {\n disabled: !isFilterValid\n }\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])];\n } : [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [h(GridColumnMenuFilterUI, {\n firstFilterProps: firstFilterCellProps,\n attrs: _this2.v3 ? undefined : {\n firstFilterProps: firstFilterCellProps,\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n },\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n onFilteruifocus: _this2.handleFocus,\n on: _this2.v3 ? undefined : {\n \"filteruifocus\": _this2.handleFocus,\n \"logicChange\": _this2.logicChange,\n \"change\": _this2.filterChangeHandler\n },\n onLogicChange: _this2.logicChange,\n onChange: _this2.filterChangeHandler,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n }), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary',\n disabled: !isFilterValid,\n attrs: _this2.v3 ? undefined : {\n disabled: !isFilterValid\n }\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])])];\n } : [h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n attrs: _this2.v3 ? undefined : {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n iconClass: 'k-i-filter'\n },\n iconClass: 'k-i-filter',\n onMenuitemclick: _this2.onFilterExpand,\n on: _this2.v3 ? undefined : {\n \"menuitemclick\": _this2.onFilterExpand\n }\n }), h(GridColumnMenuItemContent, {\n show: !!expandState,\n attrs: _this2.v3 ? undefined : {\n show: !!expandState\n }\n }, _this2.v3 ? function () {\n return [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [h(GridColumnMenuFilterUI, {\n firstFilterProps: firstFilterCellProps,\n attrs: _this2.v3 ? undefined : {\n firstFilterProps: firstFilterCellProps,\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n },\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n onFilteruifocus: _this2.handleFocus,\n on: _this2.v3 ? undefined : {\n \"filteruifocus\": _this2.handleFocus,\n \"logicChange\": _this2.logicChange,\n \"change\": _this2.filterChangeHandler\n },\n onLogicChange: _this2.logicChange,\n onChange: _this2.filterChangeHandler,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n }), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary',\n disabled: !isFilterValid,\n attrs: _this2.v3 ? undefined : {\n disabled: !isFilterValid\n }\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])];\n } : [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [h(GridColumnMenuFilterUI, {\n firstFilterProps: firstFilterCellProps,\n attrs: _this2.v3 ? undefined : {\n firstFilterProps: firstFilterCellProps,\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n },\n secondFilterProps: secondFilterCellProps,\n logicData: logicProps.data,\n logicValue: logicProps.value,\n onFilteruifocus: _this2.handleFocus,\n on: _this2.v3 ? undefined : {\n \"filteruifocus\": _this2.handleFocus,\n \"logicChange\": _this2.logicChange,\n \"change\": _this2.filterChangeHandler\n },\n onLogicChange: _this2.logicChange,\n onChange: _this2.filterChangeHandler,\n hideSecondFilter: currentHideSecondFilter,\n operators: currentOperators,\n render: filterUI && templateRendering.call(_this2, filterUI, getListeners.call(_this2))\n }), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary',\n disabled: !isFilterValid,\n attrs: _this2.v3 ? undefined : {\n disabled: !isFilterValid\n }\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])])])\n );\n }\n};\nvar GridColumnMenuFilterVue3 = GridColumnMenuFilter;\nexport { GridColumnMenuFilter, GridColumnMenuFilterVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { GridColumnMenuSort } from './GridColumnMenuSort';\nimport { GridColumnMenuFilter } from './GridColumnMenuFilter';\nimport { getTemplate, Keys } from '@progress/kendo-vue-common';\n/**\n * Represents the default `ColumnMenuContent` component.\n */\n\nvar ColumnMenuContent = {\n name: 'KendoColumnMenuContent',\n props: {\n column: Object,\n sortable: [Boolean, Object],\n sort: {\n type: Array\n },\n filter: Object,\n filterOperators: Object,\n filterable: Boolean,\n render: [Boolean, String, Function, Object]\n },\n methods: {\n handleFocus: function handleFocus(e) {\n this.$emit('contentfocus', e);\n },\n closeMenu: function closeMenu() {\n this.$emit('closemenu');\n },\n expandChange: function expandChange() {\n this.$emit('expandchange');\n },\n sortChange: function sortChange(newDescriptor, e) {\n this.$emit('sortchange', newDescriptor, e);\n },\n filterChange: function filterChange(newDescriptor, e) {\n this.$emit('filterchange', newDescriptor, e);\n },\n contentKeyDown: function contentKeyDown(event) {\n if (event.keyCode === Keys.esc) {\n this.$emit('closemenu');\n }\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var renderTemplate = this.$props.render;\n var defaultRendering = h(\"div\", {\n onKeydown: this.contentKeyDown,\n on: this.v3 ? undefined : {\n \"keydown\": this.contentKeyDown\n }\n }, [// @ts-ignore\n h(GridColumnMenuSort, {\n column: this.$props.column,\n attrs: this.v3 ? undefined : {\n column: this.$props.column,\n sortable: this.$props.sortable,\n sort: this.$props.sort\n },\n sortable: this.$props.sortable,\n sort: this.$props.sort,\n onClosemenu: this.closeMenu,\n on: this.v3 ? undefined : {\n \"closemenu\": this.closeMenu,\n \"sortchange\": this.sortChange\n },\n onSortchange: this.sortChange\n }), // @ts-ignore\n h(GridColumnMenuFilter, {\n column: this.$props.column,\n attrs: this.v3 ? undefined : {\n column: this.$props.column,\n filterable: this.$props.filterable,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators\n },\n filterable: this.$props.filterable,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators,\n onFilterfocus: this.handleFocus,\n on: this.v3 ? undefined : {\n \"filterfocus\": this.handleFocus,\n \"closemenu\": this.closeMenu,\n \"expandchange\": this.expandChange,\n \"filterchange\": this.filterChange\n },\n onClosemenu: this.closeMenu,\n onExpandchange: this.expandChange,\n onFilterchange: this.filterChange\n })]);\n return getTemplate.call(this, {\n h: h,\n template: typeof renderTemplate !== 'boolean' && renderTemplate,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n closemenu: this.closeMenu,\n filterchange: this.filterChange,\n sortchange: this.sortChange,\n expandchange: this.expandChange\n }\n });\n }\n};\nvar ColumnMenuContentVue3 = ColumnMenuContent;\nexport { ColumnMenuContent, ColumnMenuContentVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { guid } from '@progress/kendo-vue-common';\nimport { Popup } from '@progress/kendo-vue-popup';\nimport { ColumnMenuContent } from './ColumnMenuContent';\nimport { tableKeyboardNavigationTools } from '@progress/kendo-vue-data-tools';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { messages, columnMenu } from '../messages';\n/**\n * Represents the default `ColumnMenu` component.\n */\n\nvar ColumnMenu = {\n name: 'KendoColumnMenu',\n props: {\n animate: {\n type: [Boolean, Object],\n default: function _default() {\n return true;\n }\n },\n column: Object,\n sortable: [Boolean, Object],\n sort: {\n type: Array\n },\n opened: Boolean,\n filter: Object,\n filterable: Boolean,\n filterOperators: Object,\n render: [Boolean, String, Function, Object]\n },\n inject: {\n kendoIntlService: {\n default: null\n },\n kendoLocalizationService: {\n default: null\n }\n },\n data: function data() {\n return {\n show: false,\n blurTimeout: undefined\n };\n },\n created: function created() {\n this._anchor = guid();\n },\n computed: {\n currentOpen: function currentOpen() {\n return this.show || this.$props.opened;\n }\n },\n watch: {\n currentOpen: function currentOpen(newOpened) {\n this.$nextTick(function () {\n this._content = this.$refs.content;\n\n if (newOpened && this._content) {\n var focusableElements = tableKeyboardNavigationTools.getFocusableElements(this._content, {\n focusable: true\n });\n\n if (focusableElements.length) {\n focusableElements[0].focus();\n } else {\n this._content.focus();\n }\n }\n });\n }\n },\n methods: {\n blur: function blur() {\n var _this = this;\n\n clearTimeout(this.blurTimeout);\n this.blurTimeout = setTimeout(function () {\n _this.closeMenu();\n }, 200);\n },\n focus: function focus() {\n clearTimeout(this.blurTimeout);\n },\n handleFocus: function handleFocus(_) {\n clearTimeout(this.blurTimeout);\n },\n anchorClick: function anchorClick() {\n var that = this;\n this.show = !this.show;\n },\n closeMenu: function closeMenu() {\n this.$emit('close');\n this.show = false;\n },\n sortChange: function sortChange(newDescriptor, e) {\n this.$emit('sortchange', newDescriptor, e);\n },\n filterChange: function filterChange(newDescriptor, e) {\n this.$emit('filterchange', newDescriptor, e);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this2 = this;\n\n var _this = this;\n\n var h = gh || createElement;\n var renderTemplate = this.$props.render;\n var ls = provideLocalizationService(this);\n return h(\"div\", {\n style: {\n display: 'inline'\n }\n }, [h(\"div\", {\n \"class\": 'k-grid-column-menu k-grid-filter',\n tabindex: 0,\n attrs: this.v3 ? undefined : {\n tabindex: 0,\n title: this.$props.column.field + \" \" + ls.toLanguageString(columnMenu, messages[columnMenu])\n },\n title: this.$props.column.field + \" \" + ls.toLanguageString(columnMenu, messages[columnMenu]),\n ref: this.v3 ? function (el) {\n _this.kendoAnchorRef = el;\n } : this._anchor,\n onClick: this.anchorClick,\n on: this.v3 ? undefined : {\n \"click\": this.anchorClick\n }\n }, [h(\"span\", {\n \"class\": 'k-icon k-i-more-vertical'\n })]), // @ts-ignore function children\n h(Popup, {\n animate: this.$props.animate,\n attrs: this.v3 ? undefined : {\n animate: this.$props.animate,\n anchor: this._anchor,\n show: this.currentOpen\n },\n anchor: this._anchor,\n show: this.currentOpen\n }, this.v3 ? function () {\n return [h(\"div\", {\n ref: 'content',\n \"class\": 'k-grid-columnmenu-popup',\n tabIndex: 0,\n attrs: _this2.v3 ? undefined : {\n tabIndex: 0\n },\n onFocusout: _this2.blur,\n on: _this2.v3 ? undefined : {\n \"focusout\": _this2.blur,\n \"focusin\": _this2.focus\n },\n onFocusin: _this2.focus,\n style: {\n outline: 'none'\n }\n }, [// @ts-ignore\n h(ColumnMenuContent, {\n column: _this2.$props.column,\n attrs: _this2.v3 ? undefined : {\n column: _this2.$props.column,\n sortable: _this2.$props.sortable,\n sort: _this2.$props.sort,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable,\n filterOperators: _this2.$props.filterOperators,\n render: renderTemplate\n },\n sortable: _this2.$props.sortable,\n sort: _this2.$props.sort,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable,\n filterOperators: _this2.$props.filterOperators,\n render: renderTemplate,\n onContentfocus: _this2.handleFocus,\n on: _this2.v3 ? undefined : {\n \"contentfocus\": _this2.handleFocus,\n \"closemenu\": _this2.closeMenu,\n \"sortchange\": _this2.sortChange,\n \"filterchange\": _this2.filterChange\n },\n onClosemenu: _this2.closeMenu,\n onSortchange: _this2.sortChange,\n onFilterchange: _this2.filterChange\n })])];\n } : [h(\"div\", {\n ref: 'content',\n \"class\": 'k-grid-columnmenu-popup',\n tabIndex: 0,\n attrs: _this2.v3 ? undefined : {\n tabIndex: 0\n },\n onFocusout: _this2.blur,\n on: _this2.v3 ? undefined : {\n \"focusout\": _this2.blur,\n \"focusin\": _this2.focus\n },\n onFocusin: _this2.focus,\n style: {\n outline: 'none'\n }\n }, [h(ColumnMenuContent, {\n column: _this2.$props.column,\n attrs: _this2.v3 ? undefined : {\n column: _this2.$props.column,\n sortable: _this2.$props.sortable,\n sort: _this2.$props.sort,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable,\n filterOperators: _this2.$props.filterOperators,\n render: renderTemplate\n },\n sortable: _this2.$props.sortable,\n sort: _this2.$props.sort,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable,\n filterOperators: _this2.$props.filterOperators,\n render: renderTemplate,\n onContentfocus: _this2.handleFocus,\n on: _this2.v3 ? undefined : {\n \"contentfocus\": _this2.handleFocus,\n \"closemenu\": _this2.closeMenu,\n \"sortchange\": _this2.sortChange,\n \"filterchange\": _this2.filterChange\n },\n onClosemenu: _this2.closeMenu,\n onSortchange: _this2.sortChange,\n onFilterchange: _this2.filterChange\n })])])]);\n }\n};\nvar ColumnMenuVue3 = ColumnMenu;\nexport { ColumnMenu, ColumnMenuVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { normalize } from '../interfaces/GridSortSettings';\nimport { ColumnResizer } from '../drag/ColumnResizer';\nimport { ColumnDraggable } from '../drag/ColumnDraggable';\nimport { GridHeaderCell } from './GridHeaderCell'; // import { GridColumnMenuProps } from '../interfaces/GridColumnMenuProps';\n\nimport { ColumnMenu } from '../columnMenu/ColumnMenu';\nimport { templateRendering, hasListener, getListeners, Keys, noop } from '@progress/kendo-vue-common';\nimport { HeaderThElement } from '@progress/kendo-vue-data-tools'; // from '../../../datatools/src/main';\n\n/**\n * @hidden\n */\n\nvar ariaSortMap = {\n 'none': 'none',\n 'asc': 'ascending',\n 'desc': 'descending'\n};\n/**\n * @hidden\n */\n\nvar sortSeqMap = {\n true: {\n 'asc': 'desc',\n 'desc': '',\n '': 'asc'\n },\n false: {\n 'asc': 'desc',\n 'desc': 'asc',\n '': 'asc'\n }\n};\n/**\n * Represents the default `HeaderRow` component.\n */\n\nvar HeaderRow = {\n name: 'KendoHeaderRow',\n props: {\n grid: Object,\n cellRender: [String, Function, Object],\n groupable: [Boolean, Object],\n reorderable: Boolean,\n sortable: [Boolean, Object],\n sort: {\n type: Array\n },\n filter: Object,\n filterable: Boolean,\n filterOperators: Object,\n filterChange: Function,\n filterRow: Object,\n columns: Array,\n columnsMap: Array,\n columnResize: Object,\n columnMenu: [Boolean, String, Function, Object],\n columnMenuAnimate: {\n type: [Boolean, Object],\n default: function _default() {\n return true;\n }\n },\n isRtl: Boolean\n },\n inject: {\n onNavFocus: {\n default: noop\n }\n },\n data: function data() {\n return {\n columnMenuOpened: {}\n };\n },\n created: function created() {\n this.serviceIndex = 0;\n this.index = -1;\n this._element = null;\n this.cellClick = this.cellClick.bind(this);\n },\n methods: {\n pressHandler: function pressHandler(event, element) {\n this.$emit('pressHandler', event, element);\n },\n dragHandler: function dragHandler(event, element) {\n this.$emit('dragHandler', event, element);\n },\n releaseHandler: function releaseHandler(event) {\n this.$emit('releaseHandler', event);\n },\n selectionChangeHandler: function selectionChangeHandler(options) {\n this.$emit('selectionchange', options);\n },\n cellClick: function cellClick(e, column) {\n e.preventDefault();\n\n if (!hasListener.call(this, 'sortChange')) {\n return;\n }\n\n var _a = normalize(this.$props.sortable || false, column.sortable || false),\n allowUnsort = _a.allowUnsort,\n mode = _a.mode;\n\n var oldDescriptor = (this.$props.sort || []).filter(function (d) {\n return d.field === column.field;\n })[0];\n var dir = sortSeqMap[allowUnsort][oldDescriptor && oldDescriptor.dir || ''];\n var newDescriptor = mode === 'single' ? [] : (this.$props.sort || []).filter(function (d) {\n return d.field !== column.field;\n });\n\n if (dir !== '' && column.field) {\n newDescriptor.push({\n field: column.field,\n dir: dir\n });\n }\n\n this.sortChangeHandler(newDescriptor, {\n event: e,\n field: column.field\n });\n },\n sortChangeHandler: function sortChangeHandler(newDescriptor, e) {\n this.$emit('sortChange', newDescriptor, e);\n },\n filterChangeHandler: function filterChangeHandler(newDescriptor, e) {\n this.$emit('filterChange', newDescriptor, e);\n },\n cellClass: function cellClass(field, headerClassName, locked) {\n var customClass = headerClassName ? ' ' + headerClassName : '';\n var result = \"k-header \" + (locked ? 'k-grid-header-sticky' : '') + customClass;\n\n if (this.$props.sort && this.$props.sort.filter(function (descriptor) {\n return descriptor.field === field;\n }).length > 0) {\n result += ' k-sorted';\n }\n\n return result;\n },\n cellKeyDown: function cellKeyDown(event, column) {\n var _a;\n\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.keyCode === Keys.enter) {\n this.cellClick(event, column);\n }\n\n if (event.altKey && event.keyCode === Keys.down) {\n if (column.field) {\n event.preventDefault();\n this.columnMenuOpened = (_a = {}, _a[column.field] = true, _a);\n }\n }\n },\n getTemplate: function getTemplate(template) {\n return templateRendering.call(this.$props.grid, template, getListeners.call(this.$props.grid));\n },\n columnMenuClose: function columnMenuClose() {\n this.onNavFocus({});\n this.columnMenuOpened = {};\n }\n },\n computed: {\n element: {\n get: function get() {\n return this._element;\n }\n },\n theadClasses: {\n get: function get() {\n return {\n 'k-grid-header': true\n };\n }\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n this.serviceIndex = 0;\n this.index = -1;\n\n var cells = function cells(rowIndexes) {\n return rowIndexes.map(function (columnIndex) {\n var _this2 = this;\n\n var _this = this;\n\n var column = this.$props.columns[columnIndex];\n var sortable = this.$props.sortable && column.sortable;\n var sortIndex = this.$props.sort ? this.$props.sort.findIndex(function (s) {\n return s.field === column.field;\n }) : -1;\n var sortDir = sortIndex >= 0 ? this.$props.sort[sortIndex].dir || 'none' : 'none';\n\n var sortIconRenderer = function sortIconRenderer(iconSortIndex) {\n if (!_this.$props.sort) {\n return null;\n }\n\n return iconSortIndex >= 0 && [h(\"span\", {\n key: 1,\n \"class\": 'k-icon k-i-sort-' + _this.$props.sort[iconSortIndex].dir + '-sm'\n }), _this.$props.sort.length > 1 && h(\"span\", {\n key: 2,\n \"class\": \"k-sort-order\"\n }, [iconSortIndex + 1])];\n };\n\n var sortIcon = sortIconRenderer(sortIndex);\n var className = (column.kFirst ? 'k-first ' : '') + this.cellClass(column.field, column.headerClassName, column.locked);\n var columnMenu = column.columnMenu || column.columnMenu === false ? column.columnMenu : this.$props.columnMenu;\n var columnMenuRender = !columnMenu || typeof columnMenu === 'boolean' ? !!columnMenu : this.getTemplate(columnMenu);\n var style = column.left !== undefined ? !this.$props.isRtl ? {\n left: column.left + 'px',\n right: column.right + 'px'\n } : {\n left: column.right + 'px',\n right: column.left + 'px'\n } : {};\n var ariaAttrs = column.isAccessible ? {\n ariaSort: ariaSortMap[sortDir],\n role: 'columnheader',\n ariaColumnIndex: column.ariaColumnIndex,\n ariaSelected: false\n } : {\n 'role': 'presentation'\n };\n var key = column.declarationIndex >= 0 ? ++this.index : --this.serviceIndex;\n return (// @ts-ignore function children\n h(HeaderThElement, {\n ariaSort: ariaAttrs.ariaSort,\n attrs: this.v3 ? undefined : {\n ariaSort: ariaAttrs.ariaSort,\n role: ariaAttrs.role,\n ariaColumnIndex: ariaAttrs.ariaColumnIndex,\n ariaSelected: ariaAttrs.ariaSelected,\n colSpan: column.colSpan,\n rowSpan: column.rowSpan,\n columnId: column.id,\n navigatable: column.navigatable\n },\n role: ariaAttrs.role,\n ariaColumnIndex: ariaAttrs.ariaColumnIndex,\n ariaSelected: ariaAttrs.ariaSelected,\n key: key,\n colSpan: column.colSpan,\n rowSpan: column.rowSpan,\n \"class\": className,\n style: style,\n columnId: column.id,\n navigatable: column.navigatable,\n onKeydown: function onKeydown(e) {\n return _this.cellKeyDown(e, column);\n },\n on: this.v3 ? undefined : {\n \"keydown\": function onKeydown(e) {\n return _this.cellKeyDown(e, column);\n }\n }\n }, this.v3 ? function () {\n return [[// @ts-ignore\n column.children.length === 0 && columnMenu && h(ColumnMenu, {\n key: 0,\n column: {\n field: column.field,\n filter: column.filter\n },\n attrs: _this2.v3 ? undefined : {\n column: {\n field: column.field,\n filter: column.filter\n },\n opened: _this2.columnMenuOpened[column.field],\n animate: _this2.$props.columnMenuAnimate,\n sortable: sortable,\n sort: _this2.$props.sort,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable && column.filterable,\n filterOperators: _this2.$props.filterOperators,\n render: columnMenuRender\n },\n opened: _this2.columnMenuOpened[column.field],\n animate: _this2.$props.columnMenuAnimate,\n sortable: sortable,\n sort: _this2.$props.sort,\n onClose: _this2.columnMenuClose,\n on: _this2.v3 ? undefined : {\n \"close\": _this2.columnMenuClose,\n \"sortchange\": _this2.sortChangeHandler,\n \"filterchange\": _this2.filterChangeHandler\n },\n onSortchange: _this2.sortChangeHandler,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable && column.filterable,\n filterOperators: _this2.$props.filterOperators,\n onFilterchange: _this2.filterChangeHandler,\n render: columnMenuRender\n }), column.internalHeaderCell && // @ts-ignore function children\n h(column.internalHeaderCell, {\n key: 1,\n field: column.field,\n attrs: _this2.v3 ? undefined : {\n field: column.field,\n sortable: sortable,\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n },\n sortable: sortable,\n onHeadercellclick: function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n },\n on: _this2.v3 ? undefined : {\n \"headercellclick\": function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n },\n \"selectionchange\": _this2.selectionChangeHandler\n },\n onSelectionchange: _this2.selectionChangeHandler,\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n }, _this2.v3 ? function () {\n return [sortIcon];\n } : [sortIcon]) || // @ts-ignore function children\n h(GridHeaderCell, {\n key: 1,\n field: column.field,\n attrs: _this2.v3 ? undefined : {\n field: column.field,\n sortable: sortable,\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n },\n sortable: sortable,\n onHeadercellclick: function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n },\n on: _this2.v3 ? undefined : {\n \"headercellclick\": function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n }\n },\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n }, _this2.v3 ? function () {\n return [sortIcon];\n } : [sortIcon]), _this2.$props.columnResize && _this2.$props.columnResize.resizable // @ts-ignore\n && column.resizable && h(ColumnResizer, {\n key: 2,\n onResize: function onResize(e, element, end) {\n return _this.$props.columnResize && _this.$props.columnResize.dragHandler(e, column, element, end);\n },\n on: _this2.v3 ? undefined : {\n \"resize\": function onResize(e, element, end) {\n return _this.$props.columnResize && _this.$props.columnResize.dragHandler(e, column, element, end);\n }\n }\n })]];\n } : [[column.children.length === 0 && columnMenu && h(ColumnMenu, {\n key: 0,\n column: {\n field: column.field,\n filter: column.filter\n },\n attrs: _this2.v3 ? undefined : {\n column: {\n field: column.field,\n filter: column.filter\n },\n opened: _this2.columnMenuOpened[column.field],\n animate: _this2.$props.columnMenuAnimate,\n sortable: sortable,\n sort: _this2.$props.sort,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable && column.filterable,\n filterOperators: _this2.$props.filterOperators,\n render: columnMenuRender\n },\n opened: _this2.columnMenuOpened[column.field],\n animate: _this2.$props.columnMenuAnimate,\n sortable: sortable,\n sort: _this2.$props.sort,\n onClose: _this2.columnMenuClose,\n on: _this2.v3 ? undefined : {\n \"close\": _this2.columnMenuClose,\n \"sortchange\": _this2.sortChangeHandler,\n \"filterchange\": _this2.filterChangeHandler\n },\n onSortchange: _this2.sortChangeHandler,\n filter: _this2.$props.filter,\n filterable: _this2.$props.filterable && column.filterable,\n filterOperators: _this2.$props.filterOperators,\n onFilterchange: _this2.filterChangeHandler,\n render: columnMenuRender\n }), column.internalHeaderCell && h(column.internalHeaderCell, {\n key: 1,\n field: column.field,\n attrs: _this2.v3 ? undefined : {\n field: column.field,\n sortable: sortable,\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n },\n sortable: sortable,\n onHeadercellclick: function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n },\n on: _this2.v3 ? undefined : {\n \"headercellclick\": function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n },\n \"selectionchange\": _this2.selectionChangeHandler\n },\n onSelectionchange: _this2.selectionChangeHandler,\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n }, _this2.v3 ? function () {\n return [sortIcon];\n } : [sortIcon]) || h(GridHeaderCell, {\n key: 1,\n field: column.field,\n attrs: _this2.v3 ? undefined : {\n field: column.field,\n sortable: sortable,\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n },\n sortable: sortable,\n onHeadercellclick: function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n },\n on: _this2.v3 ? undefined : {\n \"headercellclick\": function onHeadercellclick(e) {\n return _this.cellClick(e, column);\n }\n },\n selectionValue: column.headerSelectionValue,\n title: column.title,\n render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)\n }, _this2.v3 ? function () {\n return [sortIcon];\n } : [sortIcon]), _this2.$props.columnResize && _this2.$props.columnResize.resizable && column.resizable && h(ColumnResizer, {\n key: 2,\n onResize: function onResize(e, element, end) {\n return _this.$props.columnResize && _this.$props.columnResize.dragHandler(e, column, element, end);\n },\n on: _this2.v3 ? undefined : {\n \"resize\": function onResize(e, element, end) {\n return _this.$props.columnResize && _this.$props.columnResize.dragHandler(e, column, element, end);\n }\n }\n })]])\n );\n }, this);\n };\n\n return h(\"thead\", {\n role: \"presentation\",\n attrs: this.v3 ? undefined : {\n role: \"presentation\",\n \"data-keyboardnavheader\": true\n },\n \"class\": this.theadClasses,\n \"data-keyboardnavheader\": true\n }, [this.$props.columnsMap.map(function (rowIndexes, index) {\n var _this3 = this;\n\n return (this.$props.groupable || this.$props.reorderable) && // @ts-ignore function children\n h(ColumnDraggable, {\n key: index,\n onPressHandler: this.pressHandler,\n on: this.v3 ? undefined : {\n \"pressHandler\": this.pressHandler,\n \"dragHandler\": this.dragHandler,\n \"releaseHandler\": this.releaseHandler\n },\n onDragHandler: this.dragHandler,\n onReleaseHandler: this.releaseHandler\n }, this.v3 ? function () {\n return [cells.call(_this3, rowIndexes)];\n } : [cells.call(_this3, rowIndexes)]) || h(\"tr\", [cells.call(this, rowIndexes)]);\n }, this), this.$props.filterRow]);\n }\n};\nvar HeaderRowVue3 = HeaderRow;\nexport { HeaderRow, HeaderRowVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { messages, filterClearButton, filterChooseOperator } from '../messages';\nimport { DropDownList } from '@progress/kendo-vue-dropdowns';\nimport { NumericTextBox } from '@progress/kendo-vue-inputs';\nimport { DatePicker } from '@progress/kendo-vue-dateinputs';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { cellBoolDropdownChange, cellInputChange, cellOperatorChange } from '../filterCommon';\nimport { templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridFilterCell` component.\n */\n\nvar GridFilterCell = {\n name: 'KendoGridFilterCell',\n props: {\n id: String,\n grid: Object,\n field: String,\n filterType: String,\n colSpan: Number,\n title: String,\n value: [String, Number, Boolean, Date],\n operator: [String, Function],\n operators: Array,\n booleanValues: Array,\n onChange: Function,\n render: [String, Function, Object]\n },\n inject: {\n kendoLocalizationService: {\n default: null\n },\n kendoIntlService: {\n default: null\n }\n },\n methods: {\n inputChange: function inputChange(value, e) {\n var filter = cellInputChange(value, e, this.$props);\n this.triggerChange(filter);\n },\n operatorChange: function operatorChange(operatorValue, e) {\n var filter = cellOperatorChange(operatorValue.value.operator, e, this.$props.value);\n this.triggerChange(filter);\n },\n boolDropdownChange: function boolDropdownChange(value, e) {\n var filter = cellBoolDropdownChange(value.value.operator, e);\n this.triggerChange(filter);\n },\n clear: function clear(e) {\n e.preventDefault();\n this.triggerChange({\n value: '',\n operator: '',\n event: e\n });\n },\n triggerChange: function triggerChange(filter) {\n filter.field = this.$props.field;\n this.$emit('change', filter);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoIntlService = inject('kendoIntlService', {});\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoIntlService: kendoIntlService,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var localizationService = provideLocalizationService(this);\n var selectedOperator = this.$props.operators.find(function (item) {\n return item.operator === _this.$props.operator;\n }) || null;\n\n var renderOperatorEditor = function renderOperatorEditor() {\n if (this.$props.filterType === 'boolean') {\n return;\n }\n\n return (// @ts-ignore\n h(DropDownList, {\n onChange: this.operatorChange,\n on: this.v3 ? undefined : {\n \"change\": this.operatorChange\n },\n value: selectedOperator,\n attrs: this.v3 ? undefined : {\n value: selectedOperator,\n iconClassName: \"k-i-filter k-icon\",\n \"data-items\": this.$props.operators,\n textField: \"text\",\n title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),\n popupSettings: {\n width: ''\n }\n },\n \"class\": \"k-dropdown-operator\",\n iconClassName: \"k-i-filter k-icon\",\n \"data-items\": this.$props.operators,\n textField: \"text\",\n title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),\n popupSettings: {\n width: ''\n }\n })\n );\n };\n\n var filterComponent = function filterComponent(filterType, value) {\n var _this = this;\n\n switch (filterType) {\n case 'numeric':\n return (// @ts-ignore\n h(NumericTextBox, {\n value: value,\n attrs: this.v3 ? undefined : {\n value: value,\n title: this.$props.title\n },\n onChange: function onChange(e) {\n _this.inputChange(e.value, e.event);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n _this.inputChange(e.value, e.event);\n }\n },\n title: this.$props.title\n })\n );\n\n case 'date':\n return (// @ts-ignore\n h(DatePicker, {\n value: value,\n attrs: this.v3 ? undefined : {\n value: value,\n title: this.$props.title\n },\n onChange: function onChange(e) {\n _this.inputChange(e.value, e);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n _this.inputChange(e.value, e);\n }\n },\n title: this.$props.title\n })\n );\n\n case 'boolean':\n var booleanValues = this.$props.booleanValues;\n return (// @ts-ignore\n h(DropDownList, {\n onChange: this.boolDropdownChange,\n on: this.v3 ? undefined : {\n \"change\": this.boolDropdownChange\n },\n value: booleanValues.find(function (item) {\n return item.operator === (value || '');\n }),\n attrs: this.v3 ? undefined : {\n value: booleanValues.find(function (item) {\n return item.operator === (value || '');\n }),\n \"data-items\": booleanValues,\n textField: \"text\",\n title: this.$props.title\n },\n \"data-items\": booleanValues,\n textField: \"text\",\n title: this.$props.title\n })\n );\n\n default:\n return h(\"input\", {\n \"class\": \"k-textbox\",\n value: this.v3 ? value || '' : null,\n domProps: this.v3 ? undefined : {\n \"value\": value || ''\n },\n onInput: function onInput(e) {\n _this.inputChange(e.target.value, e);\n },\n on: this.v3 ? undefined : {\n \"input\": function onInput(e) {\n _this.inputChange(e.target.value, e);\n }\n },\n title: this.$props.title,\n attrs: this.v3 ? undefined : {\n title: this.$props.title\n }\n });\n }\n };\n\n var defaultRendering = h(\"div\", {\n \"class\": \"k-filtercell\"\n }, [h(\"div\", {\n \"class\": \"k-filtercell-wrapper\"\n }, [filterComponent.call(this, this.$props.filterType, this.$props.value), h(\"div\", {\n \"class\": \"k-filtercell-operator\"\n }, [renderOperatorEditor.call(this), h(\"button\", {\n \"class\":\n /* button is always visible if there is either value or operator */\n !(this.$props.value === null || this.$props.value === '') || this.$props.operator ? 'k-button k-button-icon k-clear-button-visible' : 'k-button k-button-icon',\n title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton]),\n attrs: this.v3 ? undefined : {\n title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton]),\n type: \"button\"\n },\n type: \"button\",\n onClick: this.clear,\n on: this.v3 ? undefined : {\n \"click\": this.clear\n }\n }, [h(\"span\", {\n \"class\": \"k-icon k-i-filter-clear\"\n })])])])]);\n var gridListeners = this.$props.grid ? getListeners.call(this.$props.grid) : null;\n var cellRenderFunction = templateRendering.call(this.$props.grid, this.$props.render, gridListeners);\n return getTemplate.call(this, {\n h: h,\n template: cellRenderFunction,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n change: this.triggerChange\n }\n });\n }\n};\nvar GridFilterCellVue3 = GridFilterCell;\nexport { GridFilterCell, GridFilterCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { operatorMap, booleanFilterValues, getFilterType } from '../filterCommon';\nimport { GridFilterCell } from '../cells/GridFilterCell';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { filterAriaLabel, messages } from '../messages';\nimport { tableKeyboardNavigationTools as navigationTools, HeaderThElement } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `FilterRow` component.\n */\n\nvar FilterRow = {\n name: 'kendoFilterRow',\n props: {\n grid: Object,\n columns: Array,\n filter: Object,\n filterOperators: Object,\n sort: [Object, Array],\n cellRender: [String, Function, Object],\n isRtl: Boolean\n },\n inject: {\n kendoLocalizationService: {\n default: null\n }\n },\n methods: {\n headerCellClassName: function headerCellClassName(field, locked) {\n var result = \"\" + (locked ? 'k-grid-header-sticky' : '');\n\n if (this.$props.sort && this.$props.sort.filter(function (descriptor) {\n return descriptor.field === field;\n }).length > 0) {\n result += ' k-sorted';\n }\n\n return result;\n },\n setFilter: function setFilter(value, operator, field, e) {\n var filters = [];\n\n if (value !== '' && value !== null || operator !== '') {\n filters.push({\n field: field,\n operator: operator,\n value: value\n });\n }\n\n if (this.$props.filter && this.$props.filter.filters) {\n var oldFilters = this.$props.filter.filters || [];\n oldFilters.forEach(function (filter) {\n var descriptor = filter;\n\n if (descriptor && descriptor.field !== field) {\n filters.push(descriptor);\n }\n });\n }\n\n var filtersResult = filters.length > 0 ? {\n logic: 'and',\n filters: filters\n } : null;\n this.$emit('filterchange', filtersResult, e);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var intl = provideLocalizationService(this);\n var oldFilters = this.$props.filter && this.$props.filter.filters || [];\n\n var activeFilterValueFor = function activeFilterValueFor(field, defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = null;\n }\n\n var found = oldFilters.filter(function (filter) {\n return filter.field === field;\n })[0];\n return found ? found.value : defaultValue;\n };\n\n var activeOperatorFor = function activeOperatorFor(field) {\n var found = oldFilters.filter(function (filter) {\n return filter.field === field;\n })[0];\n return found ? found.operator : null;\n };\n\n var filterCellProps;\n var serviceIndex = 0,\n index = -1;\n var filterCells = this.$props.columns.filter(function (c) {\n return c.children.length === 0;\n }).map(function (column) {\n var _this = this;\n\n var onChangeFn = function onChangeFn(e) {\n _this.setFilter(e.value, e.operator, column.field, e);\n };\n\n var filterType = getFilterType(column.filter); // @ts-ignore\n\n var filterRender = h(GridFilterCell, {\n grid: this.$props.grid,\n attrs: this.v3 ? undefined : {\n grid: this.$props.grid,\n field: column.field,\n title: column.filterTitle,\n value: activeFilterValueFor(column.field, filterType === 'text' ? '' : null),\n operator: activeOperatorFor(column.field),\n operators: operatorMap(this.$props.filterOperators[filterType] || [], intl),\n booleanValues: operatorMap(booleanFilterValues, intl),\n filterType: filterType,\n render: column.filterCell || this.$props.cellRender\n },\n field: column.field,\n title: column.filterTitle,\n value: activeFilterValueFor(column.field, filterType === 'text' ? '' : null),\n operator: activeOperatorFor(column.field),\n operators: operatorMap(this.$props.filterOperators[filterType] || [], intl),\n booleanValues: operatorMap(booleanFilterValues, intl),\n filterType: filterType,\n onChange: onChangeFn,\n on: this.v3 ? undefined : {\n \"change\": onChangeFn\n },\n render: column.filterCell || this.$props.cellRender\n });\n var key = column.declarationIndex >= 0 ? ++index : --serviceIndex;\n var ariaAttrs = {\n ariaLabel: column.filterable ? intl.toLanguageString(filterAriaLabel, messages[filterAriaLabel]) : undefined,\n ariaColumnIndex: column.ariaColumnIndex\n };\n var style = column.left !== undefined ? !this.$props.isRtl ? {\n left: column.left + 'px',\n right: column.right + 'px'\n } : {\n left: column.right + 'px',\n right: column.left + 'px'\n } : {};\n var filterCell = // @ts-ignore function children\n h(HeaderThElement, {\n key: key,\n columnId: navigationTools.getFilterColumnId(column.id),\n attrs: this.v3 ? undefined : {\n columnId: navigationTools.getFilterColumnId(column.id),\n navigatable: column.navigatable,\n ariaLabel: ariaAttrs.ariaLabel,\n ariaColumnIndex: ariaAttrs.ariaColumnIndex\n },\n navigatable: column.navigatable,\n style: style,\n \"class\": this.headerCellClassName(column.field, column.locked) || undefined,\n ariaLabel: ariaAttrs.ariaLabel,\n ariaColumnIndex: ariaAttrs.ariaColumnIndex\n }, this.v3 ? function () {\n return [filterRender];\n } : [filterRender]);\n return column.filterable && filterCell || // @ts-ignore function children\n h(HeaderThElement, {\n key: key,\n columnId: navigationTools.getFilterColumnId(column.id),\n attrs: this.v3 ? undefined : {\n columnId: navigationTools.getFilterColumnId(column.id),\n navigatable: column.navigatable,\n ariaLabel: ariaAttrs.ariaLabel,\n ariaColumnIndex: ariaAttrs.ariaColumnIndex\n },\n navigatable: column.navigatable,\n style: style,\n \"class\": this.headerCellClassName(column.field, column.locked) || undefined,\n ariaLabel: ariaAttrs.ariaLabel,\n ariaColumnIndex: ariaAttrs.ariaColumnIndex\n });\n }, this);\n return h(\"tr\", {\n \"class\": \"k-filter-row\"\n }, [filterCells]);\n }\n};\nvar FilterRowVue3 = FilterRow;\nexport { FilterRow, FilterRowVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar ref = allVue.ref;\nimport { Draggable } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GroupingIndicator` component.\n */\n\nvar GroupingIndicator = {\n props: {\n title: String,\n dir: String // 'asc' | 'desc';\n\n },\n mounted: function mounted() {\n this.element = this.v3 ? this.indicatorContainerRef : this.$refs.indicatorContainer;\n\n if (this.element) {\n this.draggable = this.$refs.draggable;\n }\n },\n methods: {\n press: function press(event) {\n if (this.element) {\n this.$emit('press', event, this.element);\n }\n },\n drag: function drag(event) {\n if (this.element) {\n this.$emit('drag', event, this.element);\n }\n },\n release: function release(event) {\n if (this.element) {\n this.$emit('release', event, this.element);\n }\n },\n sortChange: function sortChange(event) {\n event.preventDefault();\n var sort = this.$props.dir === 'asc' ? 'desc' : 'asc';\n this.$emit('sortChange', event, sort);\n },\n groupRemove: function groupRemove(event) {\n event.preventDefault();\n this.$emit('remove', event);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var indicatorContainerRef = ref(null);\n return {\n v3: v3,\n indicatorContainerRef: indicatorContainerRef\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this2 = this;\n\n var _this = this;\n\n var h = gh || createElement;\n return (// @ts-ignore function children\n h(Draggable, {\n onPress: this.press,\n on: this.v3 ? undefined : {\n \"press\": this.press,\n \"drag\": this.drag,\n \"release\": this.release\n },\n onDrag: this.drag,\n onRelease: this.release,\n ref: 'draggable'\n }, this.v3 ? function () {\n return [h(\"div\", {\n \"class\": \"k-indicator-container\",\n ref: _this2.v3 ? function (el) {\n _this.indicatorContainerRef = el;\n } : 'indicatorContainer'\n }, [h(\"div\", {\n \"class\": \"k-group-indicator\"\n }, [h(\"a\", {\n \"class\": \"k-link\",\n href: \"#\",\n attrs: _this2.v3 ? undefined : {\n href: \"#\",\n tabIndex: -1\n },\n tabIndex: -1,\n onClick: _this2.sortChange,\n on: _this2.v3 ? undefined : {\n \"click\": _this2.sortChange\n }\n }, [h(\"span\", {\n \"class\": 'k-icon k-i-sort-' + _this2.$props.dir + '-sm'\n }), _this2.$props.title]), h(\"a\", {\n \"class\": \"k-button k-button-icon k-bare\",\n tabIndex: -1,\n attrs: _this2.v3 ? undefined : {\n tabIndex: -1\n },\n onClick: _this2.groupRemove,\n on: _this2.v3 ? undefined : {\n \"click\": _this2.groupRemove\n }\n }, [h(\"span\", {\n \"class\": \"k-icon k-i-group-delete\"\n })])])])];\n } : [h(\"div\", {\n \"class\": \"k-indicator-container\",\n ref: _this2.v3 ? function (el) {\n _this.indicatorContainerRef = el;\n } : 'indicatorContainer'\n }, [h(\"div\", {\n \"class\": \"k-group-indicator\"\n }, [h(\"a\", {\n \"class\": \"k-link\",\n href: \"#\",\n attrs: _this2.v3 ? undefined : {\n href: \"#\",\n tabIndex: -1\n },\n tabIndex: -1,\n onClick: _this2.sortChange,\n on: _this2.v3 ? undefined : {\n \"click\": _this2.sortChange\n }\n }, [h(\"span\", {\n \"class\": 'k-icon k-i-sort-' + _this2.$props.dir + '-sm'\n }), _this2.$props.title]), h(\"a\", {\n \"class\": \"k-button k-button-icon k-bare\",\n tabIndex: -1,\n attrs: _this2.v3 ? undefined : {\n tabIndex: -1\n },\n onClick: _this2.groupRemove,\n on: _this2.v3 ? undefined : {\n \"click\": _this2.groupRemove\n }\n }, [h(\"span\", {\n \"class\": \"k-icon k-i-group-delete\"\n })])])])])\n );\n }\n};\nvar GroupingIndicatorVue3 = GroupingIndicator;\nexport { GroupingIndicator, GroupingIndicatorVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { GroupingIndicator } from '../drag/GroupingIndicator';\nimport { messages, groupPanelEmpty as messageKey } from './../messages';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\n/**\n * Represents the default `GroupPanel` component.\n */\n\nvar GroupPanel = {\n props: {\n group: Array,\n resolveTitle: Function\n },\n inject: {\n kendoLocalizationService: {\n default: null\n }\n },\n methods: {\n pressHandler: function pressHandler(event, element) {\n this.$emit('pressHandler', event, element);\n },\n dragHandler: function dragHandler(event, element) {\n this.$emit('dragHandler', event, element);\n },\n releaseHandler: function releaseHandler(event) {\n this.$emit('releaseHandler', event);\n },\n onGroupRemove: function onGroupRemove(event, index) {\n var newGroups = this.$props.group.slice();\n newGroups.splice(index, 1);\n this.$emit('groupChange', newGroups, event);\n },\n onGroupSortChange: function onGroupSortChange(event, index, groupDesc, dir) {\n var group = Object.assign({}, groupDesc, {\n dir: dir\n });\n var newGroups = this.$props.group.slice();\n newGroups.splice(index, 1, group);\n this.$emit('groupChange', newGroups, event);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var groupsProp = this.$props.group || [];\n var groups = groupsProp.map(function (groupDesc, index) {\n var _this = this;\n\n return (// @ts-ignore\n h(GroupingIndicator, {\n key: index,\n dir: groupDesc.dir || 'asc',\n attrs: this.v3 ? undefined : {\n dir: groupDesc.dir || 'asc',\n title: this.$props.resolveTitle(groupDesc.field)\n },\n title: this.$props.resolveTitle(groupDesc.field),\n onRemove: function onRemove(event) {\n return _this.onGroupRemove(event, index);\n },\n on: this.v3 ? undefined : {\n \"remove\": function onRemove(event) {\n return _this.onGroupRemove(event, index);\n },\n \"sortChange\": function sortChange(event, dir) {\n _this.onGroupSortChange(event, index, groupDesc, dir);\n },\n \"press\": this.pressHandler,\n \"drag\": this.dragHandler,\n \"release\": this.releaseHandler\n },\n onSortChange: function sortChange(event, dir) {\n _this.onGroupSortChange(event, index, groupDesc, dir);\n },\n onPress: this.pressHandler,\n onDrag: this.dragHandler,\n onRelease: this.releaseHandler\n })\n );\n }, this);\n return h(\"div\", {\n \"class\": \"k-grouping-header k-grouping-header-flex\"\n }, [groups, h(\"div\", {\n \"class\": \"k-indicator-container\"\n }, [!groups.length && provideLocalizationService(this).toLanguageString(messageKey, messages[messageKey])])]);\n }\n};\nvar GroupPanelVue3 = GroupPanel;\nexport { GroupPanel, GroupPanelVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar ref = allVue.ref;\nimport { BrowserSupportService } from '../utils/browser-support.service';\nimport { isRtl } from '../utils';\nvar Footer = {\n name: 'Footer',\n props: {\n staticHeaders: Boolean,\n row: Object,\n columnResize: Object,\n cols: Array\n },\n data: function data() {\n return {\n scrollbarWidth: 0,\n rtl: false,\n tableWidth: null\n };\n },\n computed: {\n divStyle: {\n get: function get() {\n var padding = this.$data.scrollbarWidth + 'px';\n var right = this.rtl ? 0 : padding;\n var left = this.rtl ? padding : 0;\n return {\n padding: \"0 \" + right + \" 0 \" + left\n };\n }\n },\n tableStyle: {\n get: function get() {\n return this.tableWidth ? {\n width: this.tableWidth\n } : null;\n }\n }\n },\n mounted: function mounted() {\n this.$data.scrollbarWidth = new BrowserSupportService().scrollbarWidth;\n this.rtl = isRtl(this.$el);\n this.$props.columnResize.colGroupFooter = this.v3 ? this.colGroupHeaderRef : this.$refs.colGroupHeader;\n this._footerWrap = this.v3 ? this.footerWrapRef : this.$refs.footerWrap;\n },\n methods: {\n setScrollLeft: function setScrollLeft(scrollLeft) {\n if (this._footerWrap) {\n this._footerWrap.scrollLeft = scrollLeft;\n }\n },\n setWidth: function setWidth(width) {\n this.$data.tableWidth = width + 'px';\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var footerWrapRef = ref(null);\n var colGroupHeaderRef = ref(null);\n return {\n v3: v3,\n colGroupHeaderRef: colGroupHeaderRef,\n footerWrapRef: footerWrapRef\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n\n if (!this.$props.staticHeaders) {\n return h(\"tfoot\", {\n \"class\": \"k-grid-footer\"\n }, [this.$props.row]);\n }\n\n return h(\"div\", {\n \"class\": \"k-grid-footer\",\n style: this.divStyle\n }, [h(\"div\", {\n \"class\": \"k-grid-footer-wrap\",\n ref: this.v3 ? function (el) {\n _this.footerWrapRef = el;\n } : 'footerWrap'\n }, [h(\"table\", {\n style: this.tableStyle\n }, [h(\"colgroup\", {\n ref: this.v3 ? function (el) {\n _this.colGroupHeaderRef = el;\n } : 'colGroupHeader'\n }, [this.$props.cols]), h(\"tfoot\", [this.$props.row])])])]);\n }\n};\nvar FooterVue3 = Footer;\nexport { Footer, FooterVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getTemplate } from '@progress/kendo-vue-common';\nimport { footerColumns } from './../utils';\nvar FooterRow = {\n name: 'FooterRow',\n props: {\n isRtl: Boolean,\n columns: Array\n },\n methods: {\n columnStyles: function columnStyles(column) {\n return column.left !== undefined ? !this.$props.isRtl ? {\n left: column.left + 'px',\n right: column.right + 'px'\n } : {\n left: column.right + 'px',\n right: column.left + 'px'\n } : {};\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n\n var renderCell = function renderCell(column, index) {\n var footerCellRendering = null;\n var stickyClassName = column.locked && column.left !== undefined ? 'k-grid-footer-sticky' : '';\n var tdClassName = column.footerClassName ? column.footerClassName + \" \" + stickyClassName : stickyClassName;\n footerCellRendering = getTemplate.call(this, {\n h: h,\n template: column.footerCell,\n defaultRendering: null,\n additionalProps: {\n field: column.field,\n colSpan: column.colSpan !== 1 ? column.colSpan : undefined,\n defaultStyle: this.columnStyles(column)\n }\n });\n return h(\"td\", {\n key: index,\n field: column.field,\n attrs: this.v3 ? undefined : {\n field: column.field,\n colSpan: column.colSpan !== 1 ? column.colSpan : undefined\n },\n colSpan: column.colSpan !== 1 ? column.colSpan : undefined,\n style: this.columnStyles(column),\n \"class\": tdClassName\n }, [footerCellRendering]);\n };\n\n return h(\"tr\", [footerColumns(this.$props.columns).map(renderCell, this)]);\n }\n};\nvar FooterRowVue3 = FooterRow;\nexport { FooterRow, FooterRowVue3 };","/**\n * @hidden\n */\nvar VirtualScroll = /** @class */ (function () {\n function VirtualScroll(cached) {\n this.containerHeight = 0;\n this.topCacheCount = 0; // 4;\n this.attendedSkip = 0; // -4;\n this.propsSkip = 0;\n this.total = 0;\n this.scrollableVirtual = false;\n this.realSkip = 0;\n this.pageSize = 0;\n this.heightContainer = null;\n this.prevScrollPos = 0;\n this.tableTranslate = 0;\n this.scrollSyncing = false;\n if (cached) {\n this.topCacheCount = 4;\n this.attendedSkip = -this.topCacheCount;\n }\n this.scrollHandler = this.scrollHandler.bind(this);\n }\n Object.defineProperty(VirtualScroll.prototype, \"rowHeights\", {\n /**\n * @return - The row heights in an array.\n */\n get: function () {\n var result = [];\n var allRows = this.tableBody && this.tableBody.children || [];\n var accumulate = 0;\n for (var i = 0; i < allRows.length; i++) {\n if (allRows[i].className.indexOf('k-grouping-row') > -1) {\n accumulate += allRows[i].scrollHeight;\n continue;\n }\n if (allRows[i].className.indexOf('k-detail-row') > -1) {\n result[result.length - 1].line += allRows[i].scrollHeight;\n }\n else {\n result.push({\n line: allRows[i].scrollHeight,\n acc: accumulate\n });\n accumulate = 0;\n }\n }\n return result;\n },\n enumerable: false,\n configurable: true\n });\n VirtualScroll.prototype.changePage = function (skip, e) {\n this.attendedSkip = skip - this.topCacheCount;\n this.PageChange({\n skip: Math.max(0, skip - this.topCacheCount),\n take: this.pageSize\n }, e);\n };\n VirtualScroll.prototype.translate = function (dY) {\n this.tableTranslate = dY;\n if (this.table) {\n this.table.style.transform = 'translateY(' + dY + 'px)';\n }\n };\n VirtualScroll.prototype.syncScroll = function () {\n if (!this.scrollableVirtual || !this.container) {\n return;\n }\n this.syncTimeout = null;\n var scrollTop = this.container.scrollTop;\n var containerHeight = this.containerHeight; // = this.container.scrollHeight;\n var rowHeights = this.rowHeights;\n var percentage = (scrollTop - this.tableTranslate) / rowHeights[0].line;\n var targetFloorScrollPosition = Math.floor((containerHeight) * (this.propsSkip + percentage) / this.total);\n if (this.container.scrollTop !== (this.prevScrollPos = targetFloorScrollPosition)) {\n this.scrollSyncing = true;\n this.container.scrollTop = (this.prevScrollPos = targetFloorScrollPosition);\n }\n this.translate(this.tableTranslate + targetFloorScrollPosition - scrollTop);\n };\n VirtualScroll.prototype.reset = function () {\n this.scrollSyncing = true;\n if (this.container) {\n this.container.scrollTop = 0;\n }\n this.translate(0);\n };\n VirtualScroll.prototype.localScrollUp = function (e) {\n if (!this.container) {\n return;\n }\n var heights = this.rowHeights;\n var scrollTop = this.container.scrollTop;\n var targetTranslate = this.tableTranslate;\n var rowsCount = 0;\n var additionalOnTop = scrollTop - targetTranslate;\n if (additionalOnTop > 0) {\n return;\n }\n while ((rowsCount < this.topCacheCount + this.attendedSkip - this.realSkip)\n && this.propsSkip - rowsCount > 0 &&\n !(targetTranslate + (heights[heights.length - 1 - rowsCount].line + heights[heights.length - 1 - rowsCount].acc) + additionalOnTop <= scrollTop)) {\n targetTranslate -= heights[heights.length - 1 - rowsCount].line +\n heights[heights.length - 1 - rowsCount].acc;\n rowsCount++;\n }\n if (rowsCount === 0 && this.topCacheCount === 0 && this.attendedSkip > 0) {\n // allows local scrolling up, when top caching is disabled\n // for variable heights 'topCacheCount' should be atleast 1 to avoid flickering\n targetTranslate = Math.max(targetTranslate - heights[0].line, 0);\n rowsCount = 1;\n }\n if (this.propsSkip - rowsCount <= 0 && targetTranslate > scrollTop) {\n this.translate(0);\n this.changePage(0, e);\n this.container.scrollTop = 0;\n return;\n }\n if (targetTranslate > scrollTop) {\n targetTranslate = scrollTop;\n // need to handle these cases\n // if the item height is not available:\n // floor the translate to beginning of the item in absolute value\n }\n if (targetTranslate !== this.tableTranslate) {\n this.translate(targetTranslate);\n this.changePage(this.propsSkip - rowsCount, e);\n }\n };\n VirtualScroll.prototype.localScrollDown = function (e) {\n if (!this.container) {\n return;\n }\n var heights = this.rowHeights;\n var scrollTop = this.container.scrollTop;\n var targetTranslate = this.tableTranslate;\n var rowsCount = 0;\n while (rowsCount < heights.length - this.topCacheCount &&\n !(targetTranslate + heights[rowsCount].line + heights[rowsCount].acc > scrollTop)) {\n targetTranslate += heights[rowsCount].line + heights[rowsCount].acc;\n rowsCount++;\n }\n if (rowsCount >= heights.length - this.topCacheCount && this.propsSkip + rowsCount >= this.total) {\n this.translate(targetTranslate);\n this.changePage(this.total - 1, e);\n }\n else if (targetTranslate !== this.tableTranslate) {\n this.translate(targetTranslate);\n this.changePage(this.propsSkip + rowsCount, e);\n }\n };\n VirtualScroll.prototype.scrollNonStrict = function (e) {\n var floatRowIndex = this.total * this.prevScrollPos / (this.containerHeight);\n var rowIndex = Math.floor(floatRowIndex);\n if (rowIndex >= this.total) {\n rowIndex = this.total - 1;\n }\n var rowpercentage = Math.min(floatRowIndex - rowIndex, 1);\n var microAdjust = 0;\n var rowIndexOffset = rowIndex - this.propsSkip;\n var heights = this.rowHeights;\n if (rowIndexOffset >= 0 && rowIndexOffset <= 1) {\n microAdjust = -((heights[0].line + heights[0].acc) * rowpercentage);\n }\n else if (rowIndexOffset === -1) {\n microAdjust = -((heights[heights.length - 1].line + heights[heights.length - 1].acc) * rowpercentage);\n }\n this.translate(microAdjust + this.containerHeight * floatRowIndex / this.total);\n this.changePage(rowIndex, e);\n };\n VirtualScroll.prototype.scrollHandler = function (e) {\n if (!this.scrollableVirtual) {\n return;\n }\n if (this.scrollSyncing || !this.container || !this.table) {\n this.scrollSyncing = false;\n return;\n }\n var grid = this;\n clearTimeout(this.syncTimeout);\n this.syncTimeout = setTimeout(function () { grid.syncScroll(); }, 200);\n var scrollTop = this.container.scrollTop;\n var prev = this.prevScrollPos;\n this.prevScrollPos = scrollTop;\n if (scrollTop - prev < 0 && scrollTop > this.tableTranslate - this.table.scrollHeight / 10) {\n this.localScrollUp(e);\n }\n else if (scrollTop - prev > 0 && scrollTop < this.tableTranslate + this.table.scrollHeight * 2 / 3) {\n this.localScrollDown(e);\n }\n else {\n this.scrollNonStrict(e);\n }\n this.prevScrollPos = scrollTop;\n };\n return VirtualScroll;\n}());\nexport { VirtualScroll };\n","/**\n * @hidden\n */\nvar ColumnResize = /** @class */ (function () {\n function ColumnResize(triggerResize) {\n var _this = this;\n /**\n * The settings for resizing the Grid.\n */\n this.resizable = false;\n this.isRtl = false;\n this.setIsRtl = function (isRtl) {\n _this.isRtl = isRtl;\n };\n this.onResize = triggerResize;\n this.dragHandler = this.dragHandler.bind(this);\n }\n ColumnResize.prototype.dragHandler = function (event, column, dragCue, end) {\n var e = event.originalEvent;\n if (!end) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n var tdElement = dragCue.parentElement;\n if (!tdElement || !tdElement.parentElement) {\n return;\n }\n var oldWidth = tdElement.clientWidth;\n var newWidth;\n if (this.isRtl) {\n newWidth = (dragCue.getBoundingClientRect().right - (dragCue.offsetWidth / 2)) - event.clientX;\n newWidth += oldWidth;\n }\n else {\n newWidth = oldWidth + event.clientX - dragCue.getBoundingClientRect().left - (dragCue.offsetWidth / 2);\n }\n if (!end && Math.abs(newWidth - oldWidth) < 1) {\n return;\n }\n this.fixateInitialWidths(tdElement.parentElement.clientWidth);\n this.setWidths(column, Math.floor(newWidth) / oldWidth);\n var index = this.columns.filter(function (c) { return !c.children.length; }).indexOf(column);\n this.onResize(index, oldWidth, newWidth, e, end);\n };\n ColumnResize.prototype.fixateInitialWidths = function (width) {\n var columns = this.columns.filter(function (c) { return !c.children.length; });\n var remainingCount = 0;\n var cols = this.colGroupMain ? this.colGroupMain.children : [];\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].width) {\n width -= parseFloat(cols[i].width);\n }\n else {\n remainingCount++;\n }\n }\n if (remainingCount === 0) {\n return;\n }\n var perCol = Math.floor(width / remainingCount);\n for (var i = 0; i < cols.length; i++) {\n var col = cols[i];\n if (!col.width) {\n col.width = perCol;\n columns[i].width = perCol.toString();\n if (this.colGroupHeader) {\n this.colGroupHeader.children[i].width = perCol;\n }\n if (this.colGroupFooter) {\n this.colGroupFooter.children[i].width = perCol;\n }\n }\n }\n };\n ColumnResize.prototype.setWidths = function (column, coef) {\n var indexInOriginal = this.columns.indexOf(column);\n var toAdjust = [];\n var more = column.children.length;\n for (var i = indexInOriginal + 1; more > 0 && i < this.columns.length; i++, more--) {\n var cc = this.columns[i];\n if (!cc.children.length) {\n toAdjust.push(cc);\n }\n else {\n more += cc.children.length;\n }\n }\n if (toAdjust.length === 0) {\n toAdjust.push(column);\n }\n toAdjust.forEach(function (colToAdjust) {\n var targetWidth = colToAdjust.width ? parseFloat(colToAdjust.width.toString()) * coef : 0;\n var min = colToAdjust.minResizableWidth === undefined ? 10 : colToAdjust.minResizableWidth;\n if (targetWidth < min) {\n targetWidth = min;\n }\n colToAdjust.width = targetWidth;\n });\n this.updateColElements(toAdjust);\n };\n ColumnResize.prototype.updateColElements = function (affectedColumns) {\n var columns = this.columns.filter(function (c) { return !c.children.length; });\n var difference = 1e-10;\n for (var i = 0; i < affectedColumns.length; i++) {\n var colIndex = columns.indexOf(affectedColumns[i]);\n var currentColumnFloatWidth = parseFloat((affectedColumns[i].width || 0).toString());\n difference += currentColumnFloatWidth - Math.floor(currentColumnFloatWidth);\n var currentWidth = Math.floor(currentColumnFloatWidth) + Math.floor(difference);\n difference -= Math.floor(difference);\n if (this.colGroupMain) {\n this.colGroupMain.children[colIndex].width = currentWidth + 'px';\n }\n if (this.colGroupHeader) {\n // static headers\n this.colGroupHeader.children[colIndex].width = currentWidth + 'px';\n }\n if (this.colGroupFooter && this.colGroupFooter.children[colIndex]) {\n // static footers\n this.colGroupFooter.children[colIndex].width = currentWidth + 'px';\n }\n }\n };\n return ColumnResize;\n}());\nexport { ColumnResize };\n","import { getIndex } from '../utils';\nimport { canUseDOM } from '@progress/kendo-vue-common';\n/**\n * @hidden\n */\nvar CommonDragLogic = /** @class */ (function () {\n function CommonDragLogic(columnReorder, groupReorder, columnToGroup) {\n var _this = this;\n this.reorderable = false;\n this.groupable = false;\n this.dropElementClue = null;\n this.dragElementClue = null;\n this.startColumn = -1;\n this.startGroup = -1;\n this.currentColumn = -1;\n this.currentGroup = -1;\n this.groupPanelDivElement = null;\n this.refGroupPanelDiv = function (e) {\n _this.groupPanelDivElement = e;\n };\n this.refDropElementClue = function (e) {\n _this.dropElementClue = e;\n if (_this.dropElementClue && canUseDOM) {\n document.body.appendChild(_this.dropElementClue.$el);\n }\n };\n this.refDragElementClue = function (e) {\n _this.dragElementClue = e;\n if (_this.dragElementClue && canUseDOM) {\n document.body.appendChild(_this.dragElementClue.$el);\n }\n };\n this.pressHandler = function (event, element) {\n if (!event.isTouch) {\n event.originalEvent.preventDefault();\n }\n var startColumn = _this.getColumnIndex(event, element);\n _this.startGroup = _this.getGroupIndex(event);\n if (startColumn >= 0) {\n var col = _this.columns[startColumn];\n if (col.reorderable && _this.reorderable || col.groupable && _this.groupable) {\n _this.startColumn = startColumn;\n }\n }\n };\n this.dragHandler = function (event, element) {\n if (!event.isTouch) {\n event.originalEvent.preventDefault();\n }\n event.originalEvent.stopPropagation();\n if (_this.startColumn === -1 && _this.startGroup === -1) {\n return;\n }\n _this.currentColumn = _this.getColumnIndex(event, element);\n _this.currentGroup = _this.getGroupIndex(event);\n if (_this.groupPanelDivElement && _this.startGroup >= 0) {\n _this.currentGroup = Math.min(_this.currentGroup, _this.groupPanelDivElement.children.length - 2);\n }\n var invalidIndex = !_this.isValid();\n if (invalidIndex) {\n _this.currentColumn = -1;\n _this.currentGroup = -1;\n }\n var targetElement = (_this.currentColumn >= 0) ?\n element.children[_this.columns[_this.currentColumn].index] :\n _this.groupPanelDivElement && _this.groupPanelDivElement.children[_this.currentGroup];\n _this.updateDragElementClue(event, element, targetElement, invalidIndex);\n _this.updateDropElementClue(event, element, targetElement, invalidIndex);\n };\n this.releaseHandler = function (event) {\n var prevColumnIndex = _this.startColumn;\n var nextColumnIndex = _this.currentColumn;\n var prevGroupIndex = _this.startGroup;\n var nextGroupIndex = _this.currentGroup;\n if (_this.dropElementClue) {\n _this.dropElementClue.visible = false;\n }\n if (_this.dragElementClue) {\n _this.dragElementClue.visible = false;\n }\n var isValid = _this.isValid();\n _this.startColumn = _this.startGroup = _this.currentColumn = _this.currentGroup = -1;\n if (!isValid) {\n return;\n }\n if (prevColumnIndex >= 0 && nextColumnIndex >= 0) {\n _this.columnReorder(prevColumnIndex, nextColumnIndex, event.originalEvent);\n }\n else if (prevGroupIndex >= 0 && nextGroupIndex >= 0) {\n _this.groupReorder(prevGroupIndex, nextGroupIndex, event.originalEvent);\n }\n else if (prevColumnIndex >= 0 && nextGroupIndex >= 0) {\n _this.columnToGroup(prevColumnIndex, nextGroupIndex, event.originalEvent);\n }\n };\n this.columnReorder = columnReorder;\n this.groupReorder = groupReorder;\n this.columnToGroup = columnToGroup;\n }\n CommonDragLogic.prototype.getColumnIndex = function (event, parent) {\n if (!parent || (parent.parentElement === this.groupPanelDivElement)) {\n return -1;\n }\n var index = getIndex(event, parent);\n if (index === -1) {\n return -1;\n }\n var _loop_1 = function (i) {\n if (parent.parentNode.children[i] === parent) {\n return { value: this_1.columns.findIndex(function (c) { return ((c.index === index) && (c.depth === i)); }) };\n }\n };\n var this_1 = this;\n for (var i = 0; i < parent.parentNode.children.length; i++) {\n var state_1 = _loop_1(i);\n if (typeof state_1 === \"object\")\n return state_1.value;\n }\n return -1;\n };\n CommonDragLogic.prototype.getGroupIndex = function (event) {\n return getIndex(event, this.groupPanelDivElement);\n };\n CommonDragLogic.prototype.isValid = function () {\n if (this.startGroup >= 0) {\n // group can be moved into group only\n return this.currentGroup >= 0 && this.currentGroup !== this.startGroup;\n }\n if (this.startColumn === -1) {\n return false;\n }\n if (this.currentGroup >= 0) {\n // column to group is possible\n return this.columns[this.startColumn].groupable === true && this.groupable === true;\n }\n // reorder is possible\n return this.reorderable === true &&\n this.currentColumn >= 0 &&\n this.currentColumn !== this.startColumn &&\n this.columns[this.startColumn].reorderable === true &&\n this.columns[this.currentColumn].parentIndex === this.columns[this.startColumn].parentIndex;\n };\n CommonDragLogic.prototype.updateDragElementClue = function (event, element, targetElement, invalidIndex) {\n if (!this.dragElementClue) {\n return;\n }\n var innerText = this.startColumn >= 0 ?\n element.children[this.columns[this.startColumn].index].innerText :\n element.innerText;\n this.dragElementClue.visible = true;\n this.dragElementClue.top = (event.pageY + 10);\n this.dragElementClue.left = event.pageX;\n this.dragElementClue.innerText = innerText;\n this.dragElementClue.status = (invalidIndex || !targetElement) ? 'k-i-cancel' : 'k-i-add';\n };\n CommonDragLogic.prototype.updateDropElementClue = function (event, element, targetElement, invalidIndex) {\n if (!this.dropElementClue) {\n return;\n }\n if (invalidIndex || !targetElement) {\n this.dropElementClue.visible = false;\n return;\n }\n var rect = targetElement.getBoundingClientRect();\n var left = rect.left + event.pageX - event.clientX - 6;\n if (this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) {\n left += rect.width;\n }\n var top = rect.top + event.pageY - event.clientY;\n this.dropElementClue.visible = true;\n this.dropElementClue.top = top;\n this.dropElementClue.left = left;\n this.dropElementClue.height = (this.currentColumn >= 0) ? element.clientHeight : rect.height;\n };\n return CommonDragLogic;\n}());\nexport { CommonDragLogic };\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\n/**\n * Represents the default `DragClue` component.\n */\n\nvar DragClue = {\n data: function data() {\n return {\n visible: false,\n top: 0,\n left: 0,\n innerText: '',\n status: 'k-i-cancel'\n };\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n return this.visible && h(\"div\", {\n \"class\": \"k-header k-drag-clue\",\n style: {\n display: 'block',\n position: 'absolute',\n zIndex: 20000,\n padding: '8px 12px',\n top: this.top + 'px',\n left: this.left + 'px'\n }\n }, [h(\"span\", {\n \"class\": 'k-icon k-drag-status ' + this.status + ' k-icon-with-modifier'\n }, [h(\"span\", {\n \"class\": \"k-icon k-icon-modifier\"\n })]), this.innerText]);\n }\n};\nvar DragClueVue3 = DragClue;\nexport { DragClue, DragClueVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\n/**\n * Represents the default `DropClue` component.\n */\n\nvar DropClue = {\n data: function data() {\n return {\n height: 0,\n visible: false,\n left: 0,\n top: 0\n };\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n return this.visible && h(\"div\", {\n \"class\": \"k-grouping-dropclue\",\n style: {\n zIndex: 10000,\n display: 'block',\n top: this.top + 'px',\n left: this.left + 'px',\n height: this.height + 'px'\n }\n });\n }\n};\nvar DropClueVue3 = DropClue;\nexport { DropClue, DropClueVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { getNestedValue, parsers } from './../utils';\nimport { provideIntlService } from '@progress/kendo-vue-intl';\nimport { getTemplate, noop } from '@progress/kendo-vue-common';\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `GridCell` component.\n */\n\nvar GridCell = {\n name: 'GridCell',\n // @ts-ignore\n emits: {\n cellclick: null,\n cellkeydown: null\n },\n props: {\n id: String,\n field: String,\n dataItem: Object,\n format: String,\n className: String,\n colSpan: Number,\n columnIndex: Number,\n columnsCount: Number,\n dataIndex: Number,\n rowType: String,\n level: Number,\n expanded: Boolean,\n type: String,\n editor: String,\n isSelected: Boolean,\n ariaColumnIndex: Number,\n render: [String, Function, Object]\n },\n inject: {\n kendoIntlService: {\n default: null\n },\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n methods: {\n triggerClick: function triggerClick() {\n this.$emit('cellclick', {\n dataItem: this.$props.dataItem,\n field: this.$props.field\n });\n },\n triggerKeydown: function triggerKeydown(e) {\n this.$emit('cellkeydown', {\n event: e,\n dataItem: this.$props.dataItem,\n field: this.$props.field\n });\n },\n triggerEdit: function triggerEdit(dataItem) {\n this.$emit('edit', dataItem);\n },\n triggerAdd: function triggerAdd(dataItem) {\n this.$emit('add', dataItem);\n },\n triggerCancel: function triggerCancel(dataItem) {\n this.$emit('cancel', dataItem);\n },\n triggerSave: function triggerSave(dataItem) {\n this.$emit('save', dataItem);\n },\n triggerRemove: function triggerRemove(dataItem) {\n this.$emit('remove', dataItem);\n }\n },\n created: function created() {\n this._intl = provideIntlService(this);\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoIntlService = inject('kendoIntlService', {});\n return {\n v3: v3,\n kendoIntlService: kendoIntlService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultRendering = null;\n var navAttrs = this.getKeyboardNavigationAttributes(this.$props.id);\n\n if (this.$props.rowType === 'groupFooter') {\n defaultRendering = h(\"td\", {\n \"class\": this.$props.className\n });\n } else if (this.$props.field !== undefined && this.$props.rowType !== 'groupHeader') {\n var data = getNestedValue(this.$props.field, this.$props.dataItem);\n var dataAsString = '';\n\n if (data !== undefined && data !== null) {\n dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, parsers[this.$props.type](data, this._intl)) : this._intl.format(this.$props.format, data) : data.toString();\n }\n\n defaultRendering = h(\"td\", {\n colSpan: this.$props.colSpan,\n attrs: this.v3 ? undefined : {\n colSpan: this.$props.colSpan,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n \"class\": this.$props.className,\n onKeydown: this.triggerKeydown,\n on: this.v3 ? undefined : {\n \"keydown\": this.triggerKeydown,\n \"click\": this.triggerClick\n },\n onClick: this.triggerClick,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [dataAsString]);\n }\n\n return getTemplate.call(this, {\n h: h,\n template: this.$props.render,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n click: this.triggerClick,\n keydown: this.triggerKeydown,\n edit: this.triggerEdit,\n add: this.triggerAdd,\n cancel: this.triggerCancel,\n save: this.triggerSave,\n remove: this.triggerRemove\n }\n });\n }\n};\nvar GridCellVue3 = GridCell;\nexport { GridCell, GridCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getTemplate, Keys, noop } from '@progress/kendo-vue-common';\nimport { KEYBOARD_NAV_DATA_ID, KEYBOARD_NAV_DATA_LEVEL } from '@progress/kendo-vue-data-tools';\n/**\n * Represents the default `GridGroupCell` component.\n */\n\nvar GridGroupCell = {\n props: {\n id: String,\n field: String,\n dataItem: Object,\n format: String,\n type: String,\n colSpan: Number,\n className: String,\n columnIndex: Number,\n columnsCount: Number,\n rowType: String,\n level: Number,\n expanded: Boolean,\n editor: String,\n dataIndex: Number,\n isSelected: Boolean,\n ariaColumnIndex: Number,\n render: [String, Function, Object]\n },\n // @ts-ignore\n emits: {\n change: null,\n cellkeydown: null\n },\n inject: {\n kendoIntlService: {\n default: null\n },\n getKeyboardNavigationAttributes: {\n default: noop\n }\n },\n methods: {\n triggerKeydown: function triggerKeydown(event, expanded) {\n this.$emit('cellkeydown', {\n event: event,\n dataItem: this.$props.dataItem,\n dataIndex: this.$props.dataIndex,\n field: this.$props.field,\n expanded: this.$props.expanded\n });\n\n if (event.defaultPrevented) {\n return;\n }\n\n if (event.keyCode === Keys.enter) {\n event.preventDefault();\n this.$emit('change', {\n dataItem: this.$props.dataItem,\n dataIndex: this.$props.dataIndex,\n event: event,\n field: undefined,\n value: !expanded\n });\n }\n },\n clickHandler: function clickHandler(e, dataItem, expanded) {\n e.preventDefault();\n this.$emit('change', {\n dataItem: dataItem,\n dataIndex: this.$props.dataIndex,\n event: e,\n field: undefined,\n value: !expanded\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var defaultRendering = null;\n var _a = this.$props,\n columnIndex = _a.columnIndex,\n level = _a.level,\n columnsCount = _a.columnsCount,\n rowType = _a.rowType,\n dataItem = _a.dataItem,\n field = _a.field,\n expanded = _a.expanded,\n render = _a.render;\n var navAttrs = this.getKeyboardNavigationAttributes(this.$props.id);\n\n if (columnIndex === undefined || level === undefined || columnIndex < level || columnsCount === undefined || rowType !== 'groupHeader' || dataItem[field] === undefined) {\n defaultRendering = h(\"td\", {\n key: 'g' + columnIndex,\n \"class\": \"k-group-cell\"\n });\n } else if (columnIndex <= level) {\n defaultRendering = h(\"td\", {\n onKeydown: function onKeydown(ev) {\n _this.triggerKeydown(ev, expanded);\n },\n on: this.v3 ? undefined : {\n \"keydown\": function onKeydown(ev) {\n _this.triggerKeydown(ev, expanded);\n }\n },\n key: 'g-colspan',\n colSpan: columnsCount - columnIndex,\n attrs: this.v3 ? undefined : {\n colSpan: columnsCount - columnIndex,\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n },\n role: 'gridcell',\n \"aria-colindex\": this.$props.ariaColumnIndex,\n \"aria-selected\": this.$props.isSelected,\n \"data-grid-col-index\": this.$props.columnIndex,\n tabIndex: navAttrs.tabIndex,\n \"data-keyboardnavlevel\": navAttrs[KEYBOARD_NAV_DATA_LEVEL],\n \"data-keyboardnavid\": navAttrs[KEYBOARD_NAV_DATA_ID]\n }, [h(\"p\", {\n \"class\": \"k-reset\"\n }, [h(\"a\", {\n onClick: function onClick(e) {\n _this.clickHandler(e, dataItem, expanded);\n },\n on: this.v3 ? undefined : {\n \"click\": function onClick(e) {\n _this.clickHandler(e, dataItem, expanded);\n }\n },\n href: \"#\",\n attrs: this.v3 ? undefined : {\n href: \"#\",\n tabIndex: -1\n },\n tabIndex: -1,\n \"class\": expanded ? 'k-i-collapse k-icon' : 'k-i-expand k-icon'\n }), dataItem[field].toString()])]);\n }\n\n return getTemplate.call(this, {\n h: h,\n template: render,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n keydown: this.triggerKeydown,\n click: this.clickHandler\n }\n });\n }\n};\nvar GridGroupCellVue3 = GridGroupCell;\nexport { GridGroupCell, GridGroupCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getNestedValue } from '../utils';\nimport { getTemplate, getDefaultSlots } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridRow` component.\n */\n\nvar GridRow = {\n props: {\n rowType: String,\n dataItem: Object,\n isAltRow: Boolean,\n isHidden: Boolean,\n onClick: Function,\n selectedField: String,\n rowHeight: Number,\n ariaRowIndex: Number,\n dataIndex: Number,\n render: [String, Function, Object]\n },\n methods: {\n handleClick: function handleClick(e) {\n this.$emit('rowclick', e);\n },\n handleDoubleClick: function handleDoubleClick(e) {\n this.$emit('rowdblclick', e);\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n var className = this.$props.rowType === 'groupFooter' || this.$props.rowType === 'groupHeader' ? this.$props.rowType === 'groupFooter' && 'k-group-footer' || 'k-grouping-row' : (this.$props.isAltRow ? 'k-master-row k-alt' : 'k-master-row') + (this.$props.selectedField !== undefined && getNestedValue(this.$props.selectedField, this.$props.dataItem) ? ' k-state-selected' : '');\n var defaultRendering = h(\"tr\", {\n onClick: this.handleClick,\n on: this.v3 ? undefined : {\n \"click\": this.handleClick,\n \"dblclick\": this.handleDoubleClick\n },\n onDblclick: this.handleDoubleClick,\n \"class\": className,\n style: {\n height: this.$props.rowHeight ? this.$props.rowHeight + 'px' : '',\n visibility: this.$props.isHidden ? 'hidden' : ''\n },\n role: \"row\",\n attrs: this.v3 ? undefined : {\n role: \"row\",\n \"aria-rowindex\": this.$props.ariaRowIndex,\n \"data-grid-row-index\": this.$props.rowType === 'data' ? this.$props.dataIndex : undefined\n },\n \"aria-rowindex\": this.$props.ariaRowIndex,\n \"data-grid-row-index\": this.$props.rowType === 'data' ? this.$props.dataIndex : undefined\n }, [defaultSlot]);\n return getTemplate.call(this, {\n h: h,\n template: this.$props.render,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n click: this.handleClick\n },\n defaultSlots: defaultSlot,\n swapDefaultSlots: true\n });\n }\n};\nvar GridRowVue3 = GridRow;\nexport { GridRow, GridRowVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { guid, getTemplate } from '@progress/kendo-vue-common';\n/**\n * Represents the default `GridHeaderSelectionCell` component.\n */\n\nvar GridHeaderSelectionCell = {\n props: {\n field: String,\n title: String,\n selectionValue: Boolean,\n render: [Object, Function, String]\n },\n created: function created() {\n this.inputId = guid();\n },\n methods: {\n changeHandle: function changeHandle(e) {\n this.$emit('selectionchange', {\n field: this.$props.field,\n event: e\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var renderTemplate = this.$props.render;\n var defaultRendering = h(\"span\", [[h(\"input\", {\n key: 0,\n checked: this.v3 ? this.$props.selectionValue : null,\n domProps: this.v3 ? undefined : {\n \"checked\": this.$props.selectionValue\n },\n id: this.inputId,\n attrs: this.v3 ? undefined : {\n id: this.inputId,\n type: \"checkbox\"\n },\n type: \"checkbox\",\n \"class\": \"k-checkbox\",\n onChange: this.changeHandle,\n on: this.v3 ? undefined : {\n \"change\": this.changeHandle\n }\n }), h(\"label\", {\n key: 1,\n \"class\": \"k-checkbox-label\",\n \"for\": this.inputId,\n attrs: this.v3 ? undefined : {\n \"for\": this.inputId\n }\n })]]);\n return getTemplate.call(this, {\n h: h,\n template: renderTemplate,\n defaultRendering: defaultRendering,\n additionalProps: this.$props,\n additionalListeners: {\n selectionchange: this.changeHandle\n }\n });\n }\n};\nvar GridHeaderSelectionCellVue3 = GridHeaderSelectionCell;\nexport { GridHeaderSelectionCell, GridHeaderSelectionCellVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { messages, noRecords } from './messages';\nimport { getDefaultSlots } from '@progress/kendo-vue-common';\n/**\n * Represents the GridNoRecords component which is rendered\n * when the `data` property of the Grid is empty or `null`.\n *\n * @example\n * ```tsx-no-run\n * \n * \n * \n * There is no data available custom\n * \n * \n *
\n * \n * ```\n */\n\n/**\n * Represents the default `GridNoRecords` component.\n */\n\nvar GridNoRecords = {\n name: 'GridNoRecords',\n inject: {\n kendoLocalizationService: {\n default: null\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n var localizationService = provideLocalizationService(this);\n var noRecordsMessage = localizationService.toLanguageString(noRecords, messages[noRecords]);\n return defaultSlot ? h(\"div\", [defaultSlot]) // @ts-ignore\n : this.v3 ? noRecordsMessage : this._v(noRecordsMessage);\n }\n};\nvar GridNoRecordsVue3 = GridNoRecords;\nexport { GridNoRecords, GridNoRecordsVue3 };","/**\n * @hidden\n */\nexport var packageMetadata = {\n name: '@progress/kendo-vue-grid',\n productName: 'Kendo UI for Vue',\n productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],\n publishDate: 1641561536,\n version: '',\n licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}; // @ts-ignore\n\n\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar ref = allVue.ref;\nvar markRaw = allVue.markRaw;\nimport { templateRendering, hasListener, getListeners, getDefaultSlots, guid, getter, isRtl, validatePackage, getTemplate, canUseDOM } from '@progress/kendo-vue-common';\nimport { tableColumnsVirtualization, Pager, normalize, tableKeyboardNavigationTools as navigationTools, TableKeyboardNavigationProvider } from '@progress/kendo-vue-data-tools';\nimport { GridNav } from './GridNav';\nimport { GridSelectionCell } from './cells/GridSelectionCell';\nimport { GridHierarchyCell } from './cells/GridHierarchyCell';\nimport { GridDetailHierarchyCell } from './cells/GridDetailHierarchyCell';\nimport { GridDetailCell } from './cells/GridDetailCell';\nimport { GridEditCell } from './cells/GridEditCell';\nimport { Header } from './header/Header';\nimport { HeaderRow } from './header/HeaderRow';\nimport { FilterRow } from './header/FilterRow';\nimport { GroupPanel } from './header/GroupPanel';\nimport { Footer } from './footer/Footer';\nimport { FooterRow } from './footer/FooterRow';\nimport { operators } from './filterCommon';\nimport { VirtualScroll } from './VirtualScroll';\nimport { ColumnResize } from './drag/ColumnResize';\nimport { CommonDragLogic } from './drag/CommonDragLogic';\nimport { DragClue } from './drag/DragClue';\nimport { DropClue } from './drag/DropClue';\nimport { getNestedValue, flatData, mapColumns, readColumns, autoGenerateColumns } from './utils/index'; // import { GridCellProps } from './interfaces/GridCellProps';\n\nimport { GridCell } from './cells/GridCell'; // import { GridToolbar } from './GridToolbar';\n\nimport { GridGroupCell } from './cells/GridGroupCell';\nimport { GridRow } from './rows/GridRow';\nimport { GridHeaderSelectionCell } from './header/GridHeaderSelectionCell'; // import { ScrollMode } from './ScrollMode';\n\nimport { GridNoRecords } from './GridNoRecords';\nimport { packageMetadata } from './package-metadata';\nimport { pagerMessagesMap } from './messages';\n/**\n * Represents the default `Grid` component.\n */\n\nvar Grid = {\n name: 'KendoGrid',\n props: {\n alternatePerGroup: Boolean,\n columns: Array,\n columnVirtualization: Boolean,\n dataItems: [Array, Object],\n sortable: [Boolean, Object],\n sort: Array,\n filterable: Boolean,\n filterOperators: Object,\n filterCellRender: [String, Function, Object],\n headerCellRender: [String, Function, Object],\n filter: Object,\n pageable: [Boolean, Object],\n pageSize: Number,\n total: Number,\n skip: Number,\n take: Number,\n expandField: String,\n selectedField: String,\n cellRender: [String, Function, Object],\n rowRender: [String, Function, Object],\n resizable: Boolean,\n reorderable: Boolean,\n group: Array,\n groupable: [Boolean, Object],\n editField: String,\n scrollable: {\n type: String,\n default: 'scrollable'\n },\n pager: [String, Function, Object],\n rowHeight: Number,\n detail: [String, Function, Object],\n columnMenu: [Boolean, String, Function, Object],\n columnMenuAnimate: {\n type: [Boolean, Object],\n default: function _default() {\n return true;\n }\n },\n dataItemKey: String,\n navigatable: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n isRtl: false,\n context: undefined,\n navigation: undefined\n };\n },\n watch: {\n skip: function skip(value, oldValue) {\n // @ts-ignore\n this.onSkipChanged(value, oldValue);\n },\n total: function total(value, oldValue) {\n // @ts-ignore\n this.onTotalChanged(value, oldValue);\n },\n rowHeight: function rowHeight(value, oldValue) {\n // @ts-ignore\n this.onRowHeightChanged(value, oldValue);\n }\n },\n created: function created() {\n validatePackage(packageMetadata);\n this.initialHeight = null;\n this._columns = [];\n var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;\n this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);\n this.dragLogic = new CommonDragLogic(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this));\n this.columnResize = new ColumnResize(this.onResize.bind(this));\n this._columnsMap = [[]];\n this._header = null;\n this._footer = null;\n this.forceUpdateTimeout = undefined;\n this._gridId = guid();\n },\n mounted: function mounted() {\n this.setRefs();\n var rtl = isRtl(this._element);\n this.isRtl = rtl; // @ts-ignore\n\n this.initialHeight = this._element.style ? this._element.style.height : null;\n },\n updated: function updated() {\n this.setRefs();\n var rtl = isRtl(this._element);\n this.isRtl = rtl;\n },\n destroyed: !!gh ? undefined : function () {\n this.gridUnmounted();\n },\n // @ts-ignore\n unmounted: function unmounted() {\n this.gridUnmounted();\n },\n computed: {\n getCorrectHeight: {\n get: function get() {\n if (this.$props.scrollable === 'virtual') {\n return this.initialHeight || '450px';\n } else {\n return null;\n }\n }\n }\n },\n methods: {\n /**\n * A getter of the current columns. Gets the current column width or current columns,\n * or any other [`GridColumnProps`]({% slug api_grid_native_columnprops %}) for each defined column.\n * Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref`\n * callback. The following example demonstrates how to reorder the columns by dragging their handlers\n * and check the properties afterwards. You can check the result in the browser console.\n */\n getColumns: function getColumns() {\n var shuffledColumns = this._columns.filter(function (q) {\n return q.declarationIndex >= 0 && q.parentIndex === -1;\n });\n\n var sanitize = function sanitize(columns) {\n columns.sort(function (a, b) {\n return a.declarationIndex - b.declarationIndex;\n });\n return columns.map(function (column) {\n var declarationIndex = column.declarationIndex,\n parentIndex = column.parentIndex,\n depth = column.depth,\n colSpan = column.colSpan,\n rowSpan = column.rowSpan,\n index = column.index,\n kFirst = column.kFirst,\n children = column.children,\n props = __rest(column, [\"declarationIndex\", \"parentIndex\", \"depth\", \"colSpan\", \"rowSpan\", \"index\", \"kFirst\", \"children\"]);\n\n return children.length ? __assign({\n children: sanitize(children)\n }, props) : props;\n });\n };\n\n return sanitize(shuffledColumns);\n },\n setRefs: function setRefs() {\n var elementString = '$el';\n var element = this.v3 ? this.gridNavRef : this.$refs.gridNav;\n\n if (element) {\n this._element = element[elementString];\n }\n\n var groupPanelDiv = this.v3 ? this.groupPanelDivRef : this.$refs.groupPanelDiv;\n\n if (groupPanelDiv) {\n var groupPanelDivElement = groupPanelDiv[elementString] || null;\n this.dragLogic.refGroupPanelDiv(groupPanelDivElement);\n }\n\n var dropElementClue = this.v3 ? this.dropElementClueRef : this.$refs.dropElementClue;\n var dragElementClue = this.v3 ? this.dragElementClueRef : this.$refs.dragElementClue;\n this.dragLogic.refDropElementClue(dropElementClue);\n this.dragLogic.refDragElementClue(dragElementClue);\n this.columnResize.colGroupMain = this.v3 ? this.colGroupRef : this.$refs.colGroup;\n this._header = this.v3 ? this.headerRef : this.$refs.header;\n this._footer = this.v3 ? this.footerRef : this.$refs.footer;\n this.vs.container = this.v3 ? this.scrollContainerRef : this.$refs.scrollContainer;\n this.vs.table = this.v3 ? this.scrollTableRef : this.$refs.scrollTable;\n this.resetTableWidth();\n this.vs.tableBody = this.v3 ? this.scrollTableBodyRef : this.$refs.scrollTableBody;\n },\n gridUnmounted: function gridUnmounted() {\n clearTimeout(this.forceUpdateTimeout);\n this.columnResize.columns = [];\n this.dragLogic.columns = [];\n\n if (this.dragLogic && this.dragLogic.dragElementClue) {\n this.dragLogic.dragElementClue.$el.remove();\n this.dragLogic.dropElementClue.$el.remove();\n }\n\n this._columns = [];\n },\n resetVirtual: function resetVirtual() {\n this.vs.PageChange = this.pageChangeHandler;\n this.vs.realSkip = this.$props.skip || 0;\n this.vs.pageSize = (this.$props.take !== undefined ? this.$props.take : this.$props.pageSize) || 0;\n this.vs.scrollableVirtual = this.$props.scrollable === 'virtual';\n this.vs.propsSkip = (this.$props.skip || 0) + (this.$props.scrollable === 'virtual' ? this.vs.topCacheCount + (this.vs.attendedSkip - (this.$props.skip || 0)) : 0);\n },\n onSkipChanged: function onSkipChanged(value, _oldValue) {\n if (Math.max(0, this.vs.attendedSkip) !== value && value !== undefined) {\n this.vs.attendedSkip = value;\n this.vs.propsSkip = (value || 0) + (this.$props.scrollable === 'virtual' ? this.vs.topCacheCount + (this.vs.attendedSkip - (value || 0)) : 0);\n this.vs.syncScroll();\n }\n },\n onTotalChanged: function onTotalChanged(_value, _oldValue) {\n var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;\n this.vs.reset();\n this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);\n this.resetVirtual();\n this.setRefs();\n },\n onRowHeightChanged: function onRowHeightChanged(_value, _oldValue) {\n var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;\n this.vs.reset();\n this.vs = new VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);\n this.resetVirtual();\n this.setRefs();\n },\n scrollHandler: function scrollHandler(event) {\n var _this = this;\n\n clearTimeout(this.forceUpdateTimeout);\n\n if (this.$props.columnVirtualization && !this.vs.scrollableVirtual) {\n this.forceUpdateTimeout = setTimeout(function () {\n _this.$forceUpdate();\n }, 0);\n }\n\n if (this._header) {\n this._header.setScrollLeft(event.currentTarget.scrollLeft);\n }\n\n if (this._footer) {\n this._footer.setScrollLeft(event.currentTarget.scrollLeft);\n }\n\n if (this.vs) {\n this.vs.scrollHandler(event);\n }\n\n this.$emit('scroll', event);\n },\n rowClick: function rowClick(e, item) {\n if (e.target.type !== 'checkbox') {\n this.$emit('rowclick', __assign({\n dataItem: item.dataItem\n }, this.getArguments(e)));\n }\n },\n rowDoubleClick: function rowDoubleClick(e, item) {\n if (e.target.type !== 'checkbox') {\n this.$emit('rowdblclick', __assign({\n dataItem: item.dataItem\n }, this.getArguments(e)));\n }\n },\n itemChange: function itemChange(event) {\n var itemChange = hasListener.call(this, 'itemchange');\n\n if (event.field === this.$props.expandField || (this.$props.group || this.$props.detail) && event.field === undefined) {\n var expandChange = hasListener.call(this, 'expandchange');\n\n if (expandChange) {\n this.$emit('expandchange', __assign(__assign({}, this.getArguments(event.event)), {\n dataItem: event.dataItem,\n value: event.value\n }));\n }\n\n return;\n }\n\n if (itemChange) {\n this.$emit('itemchange', __assign(__assign({}, this.getArguments(event.event)), {\n dataItem: event.dataItem,\n field: event.field,\n value: event.value\n }));\n }\n },\n cellClickHandler: function cellClickHandler(event) {\n this.$emit('cellclick', {\n dataItem: event.dataItem,\n field: event.field\n });\n },\n cellKeydownHandler: function cellKeydownHandler(event) {\n this.$emit('cellkeydown', event);\n },\n editHandler: function editHandler(dataItem) {\n this.$emit('edit', {\n dataItem: dataItem\n });\n },\n removeHandler: function removeHandler(dataItem) {\n this.$emit('remove', {\n dataItem: dataItem\n });\n },\n saveHandler: function saveHandler(dataItem) {\n this.$emit('save', {\n dataItem: dataItem\n });\n },\n cancelHandler: function cancelHandler(dataItem) {\n this.$emit('cancel', {\n dataItem: dataItem\n });\n },\n selectionChangeHandler: function selectionChangeHandler(options) {\n var event = options.event,\n dataItem = options.dataItem,\n dataIndex = options.dataIndex,\n columnIndex = options.columnIndex;\n this.$emit('selectionchange', __assign(__assign({}, this.getArguments(event.event)), {\n dataItem: dataItem,\n startColIndex: columnIndex,\n endColIndex: columnIndex,\n startRowIndex: dataIndex,\n endRowIndex: dataIndex,\n dataItems: this.getLeafDataItems(),\n altKey: false,\n ctrlKey: false,\n shiftKey: false,\n metaKey: false,\n isDrag: false,\n componentId: this._gridId,\n selectedField: this.$props.selectedField || ''\n }));\n },\n onHeaderSelectionChangeHandler: function onHeaderSelectionChangeHandler(event) {\n this.$emit('headerselectionchange', {\n field: event.field,\n event: event.event,\n target: this\n });\n },\n pageChangeHandler: function pageChangeHandler(page, event) {\n this.raiseDataEvent('pagechange', {\n page: page\n }, {\n skip: page.skip,\n take: page.take\n }, event);\n },\n sortChangeHandler: function sortChangeHandler(sort, event) {\n this.raiseDataEvent('sortchange', {\n sort: sort\n }, {\n sort: sort\n }, event);\n },\n filterChangeHandler: function filterChangeHandler(filter, event) {\n this.raiseDataEvent('filterchange', {\n filter: filter\n }, {\n filter: filter,\n skip: 0\n }, event);\n },\n groupChangeHandler: function groupChangeHandler(groups, event) {\n this.raiseDataEvent('groupchange', {\n group: groups\n }, {\n group: groups,\n skip: 0\n }, event);\n },\n raiseDataEvent: function raiseDataEvent(handler, data, moreData, event) {\n if (hasListener.call(this, handler)) {\n this.$emit(handler, __assign(__assign({}, this.getArguments(event)), data));\n } else if (hasListener.call(this, 'datastatechange')) {\n this.$emit('datastatechange', __assign(__assign({}, this.getArguments(event)), {\n data: __assign(__assign({}, this.getDataState()), moreData)\n }));\n }\n },\n columnReorder: function columnReorder(prev, next, event) {\n var _a;\n\n var _this = this;\n\n var depth = this._columns[prev].depth;\n\n var end = function end(index) {\n do {\n index++;\n } while (index < _this._columns.length && _this._columns[index].depth > depth);\n\n return index;\n };\n\n var spliced = this._columns.splice(prev, end(prev) - prev);\n\n (_a = this._columns).splice.apply(_a, __spreadArrays([prev < next ? end(next - spliced.length) : next, 0], spliced));\n\n this._columns.filter(function (q) {\n return q.declarationIndex >= 0;\n }).forEach(function (c, i) {\n return c.orderIndex = i;\n });\n\n var eventColumnProps = this.getColumns();\n this.$emit('columnreorder', {\n target: this,\n columns: eventColumnProps,\n event: event\n });\n },\n groupReorder: function groupReorder(prevIndex, nextIndex, event) {\n if (this.$props.group === undefined) {\n return;\n }\n\n var group = this.$props.group.slice();\n group.splice.apply(group, __spreadArrays([nextIndex, 0], group.splice(prevIndex, 1)));\n this.groupChangeHandler(group, event);\n },\n columnToGroup: function columnToGroup(columnIndex, groupIndex, event) {\n var field = this._columns[columnIndex].field;\n\n if (!field) {\n return;\n }\n\n var group = (this.$props.group || []).slice();\n group.splice(groupIndex, 0, {\n field: field\n });\n this.groupChangeHandler(group, event);\n },\n resetTableWidth: function resetTableWidth() {\n var totalWidth = 0;\n\n if (!this.columnResize.colGroupMain) {\n return;\n }\n\n var colElements = this.columnResize.colGroupMain.children;\n\n for (var i = 0; i < colElements.length; i++) {\n var width = colElements[i].width;\n\n if (!width) {\n return;\n }\n\n totalWidth += parseFloat(width.toString());\n }\n\n totalWidth = Math.round(totalWidth);\n\n if (this._header) {\n this._header.setWidth(totalWidth);\n }\n\n if (this._footer) {\n this._footer.setWidth(totalWidth);\n }\n\n if (this.vs.table) {\n this.vs.table.style.width = totalWidth + 'px';\n }\n },\n onResize: function onResize(index, newWidth, oldWidth, event, end) {\n this.resetTableWidth();\n this.$emit('columnresize', {\n columns: this.getColumns(),\n index: index,\n event: event,\n newWidth: newWidth,\n oldWidth: oldWidth,\n end: end,\n target: this\n });\n },\n initColumns: function initColumns(columnElements, groupCount) {\n var _this = this;\n\n var idPrefix = navigationTools.getIdPrefix(this.navigation);\n this._columns = readColumns(columnElements, this.getColumns(), {\n prevId: 0,\n idPrefix: idPrefix\n });\n\n if (this._columns.length === 0) {\n var currentColumns = autoGenerateColumns(this.$props.dataItems, this.$props.group, this.$props.expandField, {\n prevId: 0,\n idPrefix: idPrefix\n });\n this._columns = currentColumns;\n }\n\n if (this.$props.selectedField) {\n var that_1 = this;\n\n this._columns.filter(function (c) {\n return c.field === _this.$props.selectedField;\n }).forEach(function (c) {\n c.width = c.width || '50px';\n c.internalCell = that_1.v3 ? markRaw(GridSelectionCell) : GridSelectionCell;\n c.internalHeaderCell = that_1.v3 ? markRaw(GridHeaderSelectionCell) : GridHeaderSelectionCell;\n });\n }\n\n var defaultServiceProps = {\n id: '',\n resizable: true,\n width: '32px',\n title: ' ',\n declarationIndex: -1,\n orderIndex: -1,\n children: [],\n parentIndex: -1,\n depth: 0,\n colSpan: 0,\n rowSpan: 0,\n left: 0,\n right: 0,\n // position: 'sticky',\n index: 0,\n rightBorder: false,\n ariaColumnIndex: 0,\n isAccessible: true\n };\n var columnIndexOffset = 0;\n\n if (this.$props.expandField && hasListener.call(this, 'expandchange') && this.$props.detail) {\n this._columns.unshift(__assign(__assign({}, defaultServiceProps), {\n internalCell: this.v3 ? markRaw(GridHierarchyCell) : GridHierarchyCell,\n field: this.$props.expandField,\n headerClassName: 'k-hierarchy-cell k-header',\n id: navigationTools.generateNavigatableId(\"\" + this._columns.length, idPrefix, 'column')\n }));\n\n columnIndexOffset++;\n }\n\n for (var i = 0; i < groupCount; i++) {\n this._columns.unshift(__assign(__assign({}, defaultServiceProps), {\n isAccessible: false,\n internalCell: this.v3 ? markRaw(GridGroupCell) : GridGroupCell,\n field: 'value'\n }));\n\n columnIndexOffset++;\n }\n\n this._columns.slice(columnIndexOffset).forEach(function (c) {\n return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset);\n });\n\n this._columnsMap = mapColumns(this._columns);\n this.columnResize.columns = this._columns;\n this.dragLogic.columns = this._columns;\n },\n resolveTitle: function resolveTitle(field) {\n var column = this.findColumnByField(field);\n var title = column && (column.title || column.field);\n return title === undefined ? field : title;\n },\n findColumnByField: function findColumnByField(field) {\n var _this = this;\n\n var column;\n this.$props.columns.forEach(function (c) {\n var columnFound = _this.searchColumn(c, field);\n\n if (columnFound) {\n column = columnFound;\n }\n });\n return column;\n },\n searchColumn: function searchColumn(column, field) {\n if (column.field === field) {\n return column;\n } else if (column.children) {\n var i = void 0,\n result = null;\n\n for (i = 0; result == null && i < column.children.length; i++) {\n result = this.searchColumn(column.children[i], field);\n }\n\n return result;\n }\n\n return null;\n },\n getDataState: function getDataState() {\n return {\n filter: this.$props.filter,\n sort: this.$props.sort,\n skip: this.$props.skip,\n take: this.$props.take !== undefined ? this.$props.take : this.$props.pageSize,\n group: this.$props.group\n };\n },\n getArguments: function getArguments(event) {\n return {\n event: event,\n target: this\n };\n },\n getLeafDataItems: function getLeafDataItems() {\n return this.currentData.filter(function (item) {\n return item.rowType === 'data';\n }).map(function (item) {\n return item.dataItem;\n });\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var groupPanelDivRef = ref(null);\n var dropElementClueRef = ref(null);\n var dragElementClueRef = ref(null);\n var headerRef = ref(null);\n var footerRef = ref(null);\n var gridNavRef = ref(null);\n var colGroupRef = ref(null);\n var scrollContainerRef = ref(null);\n var scrollTableRef = ref(null);\n var scrollTableBodyRef = ref(null);\n return {\n v3: v3,\n groupPanelDivRef: groupPanelDivRef,\n dropElementClueRef: dropElementClueRef,\n dragElementClueRef: dragElementClueRef,\n headerRef: headerRef,\n footerRef: footerRef,\n gridNavRef: gridNavRef,\n colGroupRef: colGroupRef,\n scrollContainerRef: scrollContainerRef,\n scrollTableRef: scrollTableRef,\n scrollTableBodyRef: scrollTableBodyRef\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this3 = this;\n\n var _this = this;\n\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n var total = this.$props.total || 0;\n var idPrefix = navigationTools.getIdPrefix(this.navigation);\n var gridData = [];\n\n if (Array.isArray(this.$props.dataItems)) {\n gridData = this.$props.dataItems;\n } else if (this.$props.dataItems) {\n gridData = this.$props.dataItems.data;\n total = total || this.$props.dataItems.total;\n }\n\n var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;\n this.columnResize.resizable = this.$props.resizable || false;\n this.dragLogic.reorderable = this.$props.reorderable || false;\n this.dragLogic.groupable = groupable;\n this.resetVirtual();\n this.vs.total = total;\n\n if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !groupable) {\n this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * (total || 0));\n } else {\n this.vs.containerHeight = 1533915;\n }\n\n var children = defaultSlot || [];\n var groupingFooter = _typeof(this.$props.groupable) === 'object' && this.$props.groupable.footer || 'none';\n this.currentData = [];\n var resolvedGroupsCount = flatData(this.currentData, gridData, groupingFooter, {\n index: this.$props.skip || 0\n }, this.$props.group !== undefined, this.$props.expandField);\n var notHiddenColumns = this.$props.columns ? this.$props.columns.filter(function (column) {\n return !column.hidden;\n }) : this.$props.columns;\n this.initColumns(notHiddenColumns, resolvedGroupsCount);\n var toolbar = children.filter(function (child) {\n return child && child.tag && child.tag.toLowerCase().indexOf('toolbar') !== -1 || child.componentOptions && child.componentOptions.tag && child.componentOptions.tag.toLowerCase().indexOf('toolbar') !== -1 || child.type && child.type.name && child.type.name.toLowerCase().indexOf('toolbar') !== -1;\n });\n var noRecords = children.filter(function (child) {\n return child && child.tag && child.tag.toLowerCase().indexOf('records') !== -1 || child.componentOptions && child.componentOptions.tag && child.componentOptions.tag.toLowerCase().indexOf('records') !== -1 || child.type && child.type.name && child.type.name.toLowerCase().indexOf('records') !== -1;\n });\n\n var columnsWithColGroup = this._columns.filter(function (c) {\n return c.children.length === 0;\n }); // @ts-ignore\n\n\n var groupingPanel = groupable && h(GroupPanel, {\n ref: this.v3 ? function (el) {\n _this.groupPanelDivRef = el;\n } : 'groupPanelDiv',\n group: this.$props.group || [],\n attrs: this.v3 ? undefined : {\n group: this.$props.group || [],\n resolveTitle: this.resolveTitle\n },\n onGroupChange: this.groupChangeHandler,\n on: this.v3 ? undefined : {\n \"groupChange\": this.groupChangeHandler,\n \"pressHandler\": this.dragLogic.pressHandler,\n \"dragHandler\": this.dragLogic.dragHandler,\n \"releaseHandler\": this.dragLogic.releaseHandler\n },\n onPressHandler: this.dragLogic.pressHandler,\n onDragHandler: this.dragLogic.dragHandler,\n onReleaseHandler: this.dragLogic.releaseHandler,\n resolveTitle: this.resolveTitle\n });\n var clues = (this.dragLogic.reorderable || this.dragLogic.groupable) && canUseDOM && document && document.body // @ts-ignore\n && [h(DropClue, {\n ref: this.v3 ? function (el) {\n _this.dropElementClueRef = el;\n } : 'dropElementClue'\n }), // @ts-ignore\n h(DragClue, {\n ref: this.v3 ? function (el) {\n _this.dragElementClueRef = el;\n } : 'dragElementClue'\n })]; // @ts-ignore\n\n var header = h(Header, {\n columnResize: this.columnResize,\n attrs: this.v3 ? undefined : {\n columnResize: this.columnResize,\n staticHeaders: this.$props.scrollable !== 'none',\n // @ts-ignore\n headerRow: h(HeaderRow, {\n grid: this,\n attrs: this.v3 ? undefined : {\n grid: this,\n sort: this.$props.sort,\n groupable: this.$props.groupable,\n reorderable: this.$props.reorderable,\n sortable: this.$props.sortable,\n filter: this.$props.filter,\n filterable: this.$props.filterable,\n filterOperators: this.$props.filterOperators || operators,\n columnMenu: this.$props.columnMenu,\n columnMenuAnimate: this.$props.columnMenuAnimate,\n columns: this._columns,\n columnResize: this.columnResize,\n columnsMap: this._columnsMap,\n cellRender: this.$props.headerCellRender,\n isRtl: this.isRtl,\n filterRow: this.$props.filterable // @ts-ignore \n && h(FilterRow, {\n grid: this,\n attrs: this.v3 ? undefined : {\n grid: this,\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n },\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n onFilterchange: this.filterChangeHandler,\n on: this.v3 ? undefined : {\n \"filterchange\": this.filterChangeHandler\n },\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n }) || undefined\n },\n sort: this.$props.sort,\n groupable: this.$props.groupable,\n reorderable: this.$props.reorderable,\n sortable: this.$props.sortable,\n onSortChange: this.sortChangeHandler,\n on: this.v3 ? undefined : {\n \"sortChange\": this.sortChangeHandler,\n \"filterChange\": this.filterChangeHandler,\n \"selectionchange\": this.onHeaderSelectionChangeHandler,\n \"pressHandler\": this.dragLogic.pressHandler,\n \"dragHandler\": this.dragLogic.dragHandler,\n \"releaseHandler\": this.dragLogic.releaseHandler\n },\n filter: this.$props.filter,\n filterable: this.$props.filterable,\n filterOperators: this.$props.filterOperators || operators,\n onFilterChange: this.filterChangeHandler,\n columnMenu: this.$props.columnMenu,\n columnMenuAnimate: this.$props.columnMenuAnimate,\n onSelectionchange: this.onHeaderSelectionChangeHandler,\n columns: this._columns,\n columnResize: this.columnResize,\n onPressHandler: this.dragLogic.pressHandler,\n onDragHandler: this.dragLogic.dragHandler,\n onReleaseHandler: this.dragLogic.releaseHandler,\n columnsMap: this._columnsMap,\n cellRender: this.$props.headerCellRender,\n isRtl: this.isRtl,\n filterRow: this.$props.filterable && h(FilterRow, {\n grid: this,\n attrs: this.v3 ? undefined : {\n grid: this,\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n },\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n onFilterchange: this.filterChangeHandler,\n on: this.v3 ? undefined : {\n \"filterchange\": this.filterChangeHandler\n },\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n }) || undefined\n }),\n cols: columnsWithColGroup.map(function (column, index) {\n return h(\"col\", {\n key: index.toString(),\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined,\n attrs: this.v3 ? undefined : {\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined\n }\n });\n }, this)\n },\n staticHeaders: this.$props.scrollable !== 'none',\n ref: this.v3 ? function (el) {\n _this.headerRef = el;\n } : 'header',\n headerRow: h(HeaderRow, {\n grid: this,\n attrs: this.v3 ? undefined : {\n grid: this,\n sort: this.$props.sort,\n groupable: this.$props.groupable,\n reorderable: this.$props.reorderable,\n sortable: this.$props.sortable,\n filter: this.$props.filter,\n filterable: this.$props.filterable,\n filterOperators: this.$props.filterOperators || operators,\n columnMenu: this.$props.columnMenu,\n columnMenuAnimate: this.$props.columnMenuAnimate,\n columns: this._columns,\n columnResize: this.columnResize,\n columnsMap: this._columnsMap,\n cellRender: this.$props.headerCellRender,\n isRtl: this.isRtl,\n filterRow: this.$props.filterable && h(FilterRow, {\n grid: this,\n attrs: this.v3 ? undefined : {\n grid: this,\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n },\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n onFilterchange: this.filterChangeHandler,\n on: this.v3 ? undefined : {\n \"filterchange\": this.filterChangeHandler\n },\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n }) || undefined\n },\n sort: this.$props.sort,\n groupable: this.$props.groupable,\n reorderable: this.$props.reorderable,\n sortable: this.$props.sortable,\n onSortChange: this.sortChangeHandler,\n on: this.v3 ? undefined : {\n \"sortChange\": this.sortChangeHandler,\n \"filterChange\": this.filterChangeHandler,\n \"selectionchange\": this.onHeaderSelectionChangeHandler,\n \"pressHandler\": this.dragLogic.pressHandler,\n \"dragHandler\": this.dragLogic.dragHandler,\n \"releaseHandler\": this.dragLogic.releaseHandler\n },\n filter: this.$props.filter,\n filterable: this.$props.filterable,\n filterOperators: this.$props.filterOperators || operators,\n onFilterChange: this.filterChangeHandler,\n columnMenu: this.$props.columnMenu,\n columnMenuAnimate: this.$props.columnMenuAnimate,\n onSelectionchange: this.onHeaderSelectionChangeHandler,\n columns: this._columns,\n columnResize: this.columnResize,\n onPressHandler: this.dragLogic.pressHandler,\n onDragHandler: this.dragLogic.dragHandler,\n onReleaseHandler: this.dragLogic.releaseHandler,\n columnsMap: this._columnsMap,\n cellRender: this.$props.headerCellRender,\n isRtl: this.isRtl,\n filterRow: this.$props.filterable && h(FilterRow, {\n grid: this,\n attrs: this.v3 ? undefined : {\n grid: this,\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n },\n columns: this._columns,\n filter: this.$props.filter,\n filterOperators: this.$props.filterOperators || operators,\n onFilterchange: this.filterChangeHandler,\n on: this.v3 ? undefined : {\n \"filterchange\": this.filterChangeHandler\n },\n sort: this.$props.sort,\n cellRender: this.$props.filterCellRender,\n isRtl: this.isRtl,\n ariaRowIndex: this._columnsMap.length + 1\n }) || undefined\n }),\n cols: columnsWithColGroup.map(function (column, index) {\n return h(\"col\", {\n key: index.toString(),\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined,\n attrs: this.v3 ? undefined : {\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined\n }\n });\n }, this)\n });\n var footer = this._columns.some(function (c) {\n return Boolean(c.footerCell);\n }) ? // @ts-ignore\n h(Footer, {\n columnResize: this.columnResize,\n attrs: this.v3 ? undefined : {\n columnResize: this.columnResize,\n staticHeaders: this.$props.scrollable !== 'none',\n row: // @ts-ignore\n h(FooterRow, {\n isRtl: this.isRtl,\n attrs: this.v3 ? undefined : {\n isRtl: this.isRtl,\n columns: this._columns.map(function (col) {\n return __assign(__assign({}, col), {\n footerCell: templateRendering.call(this, col.footerCell, getListeners.call(this))\n });\n }, this)\n },\n columns: this._columns.map(function (col) {\n return __assign(__assign({}, col), {\n footerCell: templateRendering.call(this, col.footerCell, getListeners.call(this))\n });\n }, this)\n }),\n cols: columnsWithColGroup.map(function (column, index) {\n return h(\"col\", {\n key: index.toString(),\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined,\n attrs: this.v3 ? undefined : {\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined\n }\n });\n }, this)\n },\n staticHeaders: this.$props.scrollable !== 'none',\n ref: this.v3 ? function (el) {\n _this.footerRef = el;\n } : 'footer',\n row: h(FooterRow, {\n isRtl: this.isRtl,\n attrs: this.v3 ? undefined : {\n isRtl: this.isRtl,\n columns: this._columns.map(function (col) {\n return __assign(__assign({}, col), {\n footerCell: templateRendering.call(this, col.footerCell, getListeners.call(this))\n });\n }, this)\n },\n columns: this._columns.map(function (col) {\n return __assign(__assign({}, col), {\n footerCell: templateRendering.call(this, col.footerCell, getListeners.call(this))\n });\n }, this)\n }),\n cols: columnsWithColGroup.map(function (column, index) {\n return h(\"col\", {\n key: index.toString(),\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined,\n attrs: this.v3 ? undefined : {\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined\n }\n });\n }, this)\n }) : h(\"span\");\n var cellRenderFunction = templateRendering.call(this, this.$props.cellRender, getListeners.call(this));\n var leftWidth = 0;\n var vnodeDataStyle = this.v3 ? this.$attrs.style : this.$vnode && this.$vnode.data ? this.$vnode.data.style : null;\n var widthProp = 'width';\n var elementInlineStyleWidth = vnodeDataStyle && (typeof vnodeDataStyle === \"undefined\" ? \"undefined\" : _typeof(vnodeDataStyle)) === 'object' ? vnodeDataStyle[widthProp] || '' : '';\n var tableWidth = parseFloat(elementInlineStyleWidth.toString());\n var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;\n\n var _a = tableColumnsVirtualization({\n enabled: this.$props.columnVirtualization,\n columns: this._columns,\n tableViewPortWidth: tableWidth,\n scrollLeft: scrollLeft\n }),\n colSpans = _a.colSpans,\n isColHidden = _a.hiddenColumns;\n\n var dataRow = function dataRow(item, rowId, rowDataIndex) {\n var isInEdit = false;\n var selectedValue = this.$props.selectedField ? getNestedValue(this.$props.selectedField, item.dataItem) : undefined;\n return {\n row: this._columns.map(function (column, index) {\n var _this = this;\n\n if (isColHidden[index]) {\n return null;\n }\n\n var className = \"\" + (column.className ? column.className + ' ' : '') + (\"\" + (column.locked ? 'k-grid-content-sticky' : ''));\n var style = column.left !== undefined ? !this.isRtl ? {\n left: column.left + 'px',\n right: column.right + 'px'\n } : {\n left: column.right + 'px',\n right: column.left + 'px'\n } : {};\n var currentColumnIsInEdit = false;\n\n if (column.editable && this.$props.editField) {\n var inEdit = getNestedValue(this.$props.editField, item.dataItem);\n\n if (inEdit === true || inEdit === column.field) {\n isInEdit = true;\n currentColumnIsInEdit = true;\n }\n }\n\n var columnCellRenderFunction;\n\n if (column.cell) {\n columnCellRenderFunction = templateRendering.call(this, column.cell, getListeners.call(this));\n }\n\n if (column.internalCell) {\n return h(column.internalCell, {\n key: index,\n id: navigationTools.generateNavigatableId(rowId + \"-\" + String(index), idPrefix),\n attrs: this.v3 ? undefined : {\n id: navigationTools.generateNavigatableId(rowId + \"-\" + String(index), idPrefix),\n colSpan: colSpans[index],\n dataItem: item.dataItem,\n field: column.field || '',\n editor: column.editor,\n format: column.format,\n type: column.type,\n className: className,\n render: columnCellRenderFunction || cellRenderFunction,\n columnIndex: index,\n columnsCount: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n rowType: item.rowType,\n level: item.level,\n expanded: item.expanded,\n dataIndex: item.dataIndex,\n ariaColumnIndex: column.ariaColumnIndex,\n isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(index) > -1\n },\n colSpan: colSpans[index],\n dataItem: item.dataItem,\n field: column.field || '',\n editor: column.editor,\n format: column.format,\n type: column.type,\n className: className,\n render: columnCellRenderFunction || cellRenderFunction,\n onChange: this.itemChange,\n on: this.v3 ? undefined : {\n \"change\": this.itemChange,\n \"selectionchange\": function selectionchange(e) {\n return _this.selectionChangeHandler({\n event: e,\n dataItem: item.dataItem,\n dataIndex: rowDataIndex,\n columnIndex: index\n });\n }\n },\n onSelectionchange: function selectionchange(e) {\n return _this.selectionChangeHandler({\n event: e,\n dataItem: item.dataItem,\n dataIndex: rowDataIndex,\n columnIndex: index\n });\n },\n columnIndex: index,\n columnsCount: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n rowType: item.rowType,\n level: item.level,\n expanded: item.expanded,\n dataIndex: item.dataIndex,\n style: style,\n ariaColumnIndex: column.ariaColumnIndex,\n isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(index) > -1\n });\n }\n\n if (currentColumnIsInEdit) {\n // @ts-ignore\n return h(GridEditCell, {\n id: navigationTools.generateNavigatableId(rowId + \"-\" + String(index), idPrefix),\n attrs: this.v3 ? undefined : {\n id: navigationTools.generateNavigatableId(rowId + \"-\" + String(index), idPrefix),\n colSpan: colSpans[index],\n dataItem: item.dataItem,\n field: column.field || '' // todo\n ,\n editor: column.editor,\n format: column.format,\n type: column.type,\n className: className,\n render: columnCellRenderFunction || cellRenderFunction,\n columnIndex: index,\n columnsCount: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n rowType: item.rowType,\n level: item.level,\n expanded: item.expanded,\n dataIndex: item.dataIndex\n },\n key: index,\n colSpan: colSpans[index],\n dataItem: item.dataItem,\n field: column.field || '',\n editor: column.editor,\n format: column.format,\n type: column.type,\n className: className,\n render: columnCellRenderFunction || cellRenderFunction,\n onEdit: this.editHandler,\n on: this.v3 ? undefined : {\n \"edit\": this.editHandler,\n \"remove\": this.removeHandler,\n \"save\": this.saveHandler,\n \"cancel\": this.cancelHandler,\n \"change\": this.itemChange\n },\n onRemove: this.removeHandler,\n onSave: this.saveHandler,\n onCancel: this.cancelHandler,\n onChange: this.itemChange,\n columnIndex: index,\n columnsCount: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n rowType: item.rowType,\n level: item.level,\n expanded: item.expanded,\n dataIndex: item.dataIndex,\n style: style\n });\n } // @ts-ignore\n\n\n var inbuiltSlot = h(GridCell, {\n key: index,\n id: navigationTools.generateNavigatableId(rowId + \"-\" + String(index), idPrefix),\n attrs: this.v3 ? undefined : {\n id: navigationTools.generateNavigatableId(rowId + \"-\" + String(index), idPrefix),\n colSpan: colSpans[index],\n dataItem: item.dataItem,\n field: column.field || '' // todo\n ,\n editor: column.editor,\n format: column.format,\n type: column.type,\n className: className,\n render: columnCellRenderFunction || cellRenderFunction,\n columnIndex: index,\n columnsCount: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n rowType: item.rowType,\n level: item.level,\n expanded: item.expanded,\n dataIndex: item.dataIndex\n },\n colSpan: colSpans[index],\n dataItem: item.dataItem,\n field: column.field || '',\n editor: column.editor,\n format: column.format,\n type: column.type,\n className: className,\n render: columnCellRenderFunction || cellRenderFunction,\n onCellclick: this.cellClickHandler,\n on: this.v3 ? undefined : {\n \"cellclick\": this.cellClickHandler,\n \"cellkeydown\": this.cellKeydownHandler,\n \"edit\": this.editHandler,\n \"remove\": this.removeHandler,\n \"save\": this.saveHandler,\n \"cancel\": this.cancelHandler,\n \"change\": this.itemChange,\n \"selectionchange\": function selectionchange(e) {\n return _this.selectionChangeHandler({\n event: e,\n dataItem: item.dataItem,\n dataIndex: rowDataIndex,\n columnIndex: index\n });\n }\n },\n onCellkeydown: this.cellKeydownHandler,\n onEdit: this.editHandler,\n onRemove: this.removeHandler,\n onSave: this.saveHandler,\n onCancel: this.cancelHandler,\n onChange: this.itemChange,\n onSelectionchange: function selectionchange(e) {\n return _this.selectionChangeHandler({\n event: e,\n dataItem: item.dataItem,\n dataIndex: rowDataIndex,\n columnIndex: index\n });\n },\n columnIndex: index,\n columnsCount: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n rowType: item.rowType,\n level: item.level,\n expanded: item.expanded,\n dataIndex: item.dataIndex,\n style: style\n });\n return inbuiltSlot;\n }, this),\n isInEdit: isInEdit,\n isSelected: typeof selectedValue === 'boolean' && selectedValue\n };\n };\n\n var hiddenRows = 0;\n\n if (this.$props.scrollable === 'virtual') {\n for (var i = 0; i < this.vs.topCacheCount + this.vs.attendedSkip - (this.$props.skip || 0); i++) {\n var item = this.currentData.shift();\n\n if (item) {\n this.currentData.push(item);\n hiddenRows++;\n\n if (item.rowType === 'groupHeader') {\n i--;\n }\n } else {\n break;\n }\n }\n }\n\n var hidden = function hidden(index) {\n return index >= _this.currentData.length - hiddenRows;\n };\n\n var detailRenderFunction = templateRendering.call(this, this.$props.detail, getListeners.call(this));\n var absoluteDataIndex = this.vs.propsSkip || 0;\n var rowIndexStart = this._columnsMap.length + (this.$props.filterable ? 1 : 0) + 1;\n var currentAriaRowIndex;\n var dataIndex = -1;\n var detailRowCount = 0; // @ts-ignore\n\n var body = this.currentData.length && this.currentData.map(function (item, rowIndex) {\n var _this2 = this;\n\n var _this = this;\n\n if (item.rowType === 'data') {\n absoluteDataIndex++;\n }\n\n if (this.$props.alternatePerGroup && item.rowType === 'groupHeader') {\n absoluteDataIndex = 0;\n }\n\n var isAlt = absoluteDataIndex % 2 === 0;\n var dataItemKey = this.$props.dataItemKey && getter(this.$props.dataItemKey)(item.dataItem);\n var absoluteIndex = rowIndex + (this.vs.propsSkip || 0);\n var rowId = dataItemKey ? dataItemKey : 'ai' + absoluteIndex;\n var detailRowId = rowId + '_1';\n currentAriaRowIndex = absoluteIndex + rowIndexStart + detailRowCount;\n leftWidth = 0;\n var rowRenderFunction = templateRendering.call(this, this.$props.rowRender, getListeners.call(this));\n var detailColspan;\n\n if (this.$props.detail && item.rowType === 'data' && item.expanded) {\n detailColspan = columnsWithColGroup.length - (this.$props.expandField ? 1 : 0) - (this.$props.group ? this.$props.group.length : 0) || 1;\n detailRowCount++;\n currentAriaRowIndex = absoluteIndex + rowIndexStart + detailRowCount;\n }\n\n return [// @ts-ignore function children\n h(GridRow, {\n key: rowId,\n dataItem: item.dataItem,\n attrs: this.v3 ? undefined : {\n dataItem: item.dataItem,\n isAltRow: isAlt,\n isInEdit: dataRow.isInEdit,\n rowType: item.rowType,\n isHidden: hidden(rowIndex),\n selectedField: this.$props.selectedField,\n rowHeight: this.$props.rowHeight,\n render: rowRenderFunction,\n ariaRowIndex: currentAriaRowIndex,\n dataIndex: dataIndex,\n isSelected: dataRow.isSelected\n },\n isAltRow: isAlt,\n isInEdit: dataRow.isInEdit,\n rowType: item.rowType,\n isHidden: hidden(rowIndex),\n onRowclick: function onRowclick(e) {\n return _this.rowClick(e, item);\n },\n on: this.v3 ? undefined : {\n \"rowclick\": function onRowclick(e) {\n return _this.rowClick(e, item);\n },\n \"rowdblclick\": function rowdblclick(e) {\n return _this.rowDoubleClick(e, item);\n }\n },\n onRowdblclick: function rowdblclick(e) {\n return _this.rowDoubleClick(e, item);\n },\n selectedField: this.$props.selectedField,\n rowHeight: this.$props.rowHeight,\n render: rowRenderFunction,\n ariaRowIndex: currentAriaRowIndex,\n dataIndex: dataIndex,\n isSelected: dataRow.isSelected\n }, this.v3 ? function () {\n return [dataRow.call(_this2, item, rowId, dataIndex).row];\n } : [dataRow.call(_this2, item, rowId, dataIndex).row]), this.$props.detail && item.rowType === 'data' && item.expanded && h(\"tr\", {\n key: detailRowId,\n \"class\": isAlt ? 'k-detail-row k-alt' : 'k-detail-row',\n style: {\n visibility: hidden(rowIndex) ? 'hidden' : ''\n },\n role: \"row\",\n attrs: this.v3 ? undefined : {\n role: \"row\",\n \"aria-rowindex\": currentAriaRowIndex\n },\n \"aria-rowindex\": currentAriaRowIndex\n }, [this.$props.group && this.$props.group.map(function (group, idx) {\n // @ts-ignore\n return h(GridGroupCell, {\n id: '',\n attrs: this.v3 ? undefined : {\n id: '',\n dataIndex: item.dataIndex,\n field: group.field,\n dataItem: item.dataItem\n },\n dataIndex: item.dataIndex,\n field: group.field,\n dataItem: item.dataItem,\n key: idx\n });\n }, this), this.$props.expandField && // @ts-ignore function children\n h(GridDetailHierarchyCell, {\n id: navigationTools.generateNavigatableId(detailRowId + \"-dhcell\", idPrefix),\n attrs: this.v3 ? undefined : {\n id: navigationTools.generateNavigatableId(detailRowId + \"-dhcell\", idPrefix)\n }\n }), // @ts-ignore function children\n h(GridDetailCell, {\n dataItem: item.dataItem,\n attrs: this.v3 ? undefined : {\n dataItem: item.dataItem,\n dataIndex: item.dataIndex,\n colSpan: detailColspan,\n ariaColIndex: 2 + (this.$props.group ? this.$props.group.length : 0),\n detail: this.$props.detail ? detailRenderFunction : undefined,\n id: navigationTools.generateNavigatableId(detailRowId + \"-dcell\", idPrefix)\n },\n dataIndex: item.dataIndex,\n colSpan: detailColspan,\n ariaColIndex: 2 + (this.$props.group ? this.$props.group.length : 0),\n detail: this.$props.detail ? detailRenderFunction : undefined,\n id: navigationTools.generateNavigatableId(detailRowId + \"-dcell\", idPrefix)\n })])];\n }, this) || h(\"tr\", {\n \"class\": \"k-grid-norecords\"\n }, [h(\"td\", {\n colSpan: this._columns.filter(function (c) {\n return !c.children.length;\n }).length,\n attrs: this.v3 ? undefined : {\n colSpan: this._columns.filter(function (c) {\n return !c.children.length;\n }).length\n }\n }, [// @ts-ignore\n noRecords.length ? noRecords : h(GridNoRecords)])]);\n var pagerTemplate = templateRendering.call(this, this.$props.pager, getListeners.call(this)); // @ts-ignore\n\n var defaultPagerRendering = this.$props.pageable && h(Pager, {\n \"class\": 'k-grid-pager',\n onPagesizechange: this.pageChangeHandler,\n on: this.v3 ? undefined : {\n \"pagesizechange\": this.pageChangeHandler,\n \"pagechange\": this.pageChangeHandler\n },\n onPagechange: this.pageChangeHandler,\n total: total,\n attrs: this.v3 ? undefined : {\n total: total,\n skip: this.vs.propsSkip || 0,\n pageSize: (this.$props.take !== undefined ? this.$props.take : this.$props.pageSize) || 10,\n messagesMap: pagerMessagesMap,\n settings: normalize(this.$props.pageable || {})\n },\n skip: this.vs.propsSkip || 0,\n pageSize: (this.$props.take !== undefined ? this.$props.take : this.$props.pageSize) || 10,\n messagesMap: pagerMessagesMap,\n settings: normalize(this.$props.pageable || {})\n });\n var pager = getTemplate.call(this, {\n h: h,\n template: pagerTemplate,\n defaultRendering: defaultPagerRendering,\n additionalProps: __assign(__assign({}, this.$props), {\n skip: this.vs.propsSkip || 0,\n messagesMap: pagerMessagesMap\n }),\n additionalListeners: {\n pagesizechange: this.pageChangeHandler,\n pagechange: this.pageChangeHandler\n }\n });\n\n var sorted = function sorted(field) {\n return _this.$props.sort && _this.$props.sort.filter(function (descriptor) {\n return descriptor.field === field;\n }).length > 0;\n };\n\n var colGroups = h(\"colgroup\", {\n role: \"presentation\",\n attrs: this.v3 ? undefined : {\n role: \"presentation\"\n },\n ref: this.v3 ? function (el) {\n _this.colGroupRef = el;\n } : 'colGroup'\n }, [columnsWithColGroup.map(function (column, index) {\n return h(\"col\", {\n key: index.toString(),\n \"class\": sorted(column.field) ? 'k-sorted' : undefined,\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined,\n attrs: this.v3 ? undefined : {\n width: column.width !== undefined ? Math.floor(parseFloat(column.width.toString())) + 'px' : undefined\n }\n });\n }, this)]);\n var wrapperStyle = {\n height: this.getCorrectHeight\n };\n\n if (this.$props.scrollable === 'none') {\n return (// @ts-ignore function children\n h(TableKeyboardNavigationProvider, {\n ref: 'navRef',\n id: this._gridId,\n attrs: this.v3 ? undefined : {\n id: this._gridId,\n navigatable: this.$props.navigatable\n },\n navigatable: this.$props.navigatable\n }, this.v3 ? function () {\n return [// @ts-ignore function children\n h(GridNav, {\n ref: _this3.v3 ? function (el) {\n _this.gridNavRef = el;\n } : 'gridNav',\n currentData: _this3.currentData,\n attrs: _this3.v3 ? undefined : {\n currentData: _this3.currentData,\n role: \"grid\"\n },\n style: wrapperStyle,\n role: \"grid\",\n \"class\": \"k-widget k-grid\"\n }, _this3.v3 ? function () {\n return [toolbar, groupingPanel, h(\"table\", {\n style: {\n tableLayout: 'fixed'\n }\n }, [colGroups, header, h(\"tbody\", {\n \"data-keyboardnavbody\": true,\n attrs: _this3.v3 ? undefined : {\n \"data-keyboardnavbody\": true\n }\n }, [body]), footer]), pager, clues];\n } : [toolbar, groupingPanel, h(\"table\", {\n style: {\n tableLayout: 'fixed'\n }\n }, [colGroups, header, h(\"tbody\", {\n \"data-keyboardnavbody\": true,\n attrs: _this3.v3 ? undefined : {\n \"data-keyboardnavbody\": true\n }\n }, [body]), footer]), pager, clues])];\n } : [h(GridNav, {\n ref: _this3.v3 ? function (el) {\n _this.gridNavRef = el;\n } : 'gridNav',\n currentData: _this3.currentData,\n attrs: _this3.v3 ? undefined : {\n currentData: _this3.currentData,\n role: \"grid\"\n },\n style: wrapperStyle,\n role: \"grid\",\n \"class\": \"k-widget k-grid\"\n }, _this3.v3 ? function () {\n return [toolbar, groupingPanel, h(\"table\", {\n style: {\n tableLayout: 'fixed'\n }\n }, [colGroups, header, h(\"tbody\", {\n \"data-keyboardnavbody\": true,\n attrs: _this3.v3 ? undefined : {\n \"data-keyboardnavbody\": true\n }\n }, [body]), footer]), pager, clues];\n } : [toolbar, groupingPanel, h(\"table\", {\n style: {\n tableLayout: 'fixed'\n }\n }, [colGroups, header, h(\"tbody\", {\n \"data-keyboardnavbody\": true,\n attrs: _this3.v3 ? undefined : {\n \"data-keyboardnavbody\": true\n }\n }, [body]), footer]), pager, clues])])\n );\n }\n\n return (// @ts-ignore function children\n h(TableKeyboardNavigationProvider, {\n ref: 'navRef',\n id: this._gridId,\n attrs: this.v3 ? undefined : {\n id: this._gridId,\n navigatable: this.$props.navigatable\n },\n navigatable: this.$props.navigatable\n }, this.v3 ? function () {\n return [// @ts-ignore function children\n h(GridNav, {\n ref: _this3.v3 ? function (el) {\n _this.gridNavRef = el;\n } : 'gridNav',\n currentData: _this3.currentData,\n attrs: _this3.v3 ? undefined : {\n currentData: _this3.currentData,\n role: \"grid\"\n },\n style: wrapperStyle,\n role: \"grid\",\n \"class\": 'k-widget k-grid' + (_this3.$props.scrollable === 'virtual' ? ' k-grid-virtual' : '')\n }, _this3.v3 ? function () {\n return [toolbar, groupingPanel, header, h(\"div\", {\n \"class\": \"k-grid-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n },\n ref: _this3.v3 ? function (el) {\n _this.scrollContainerRef = el;\n } : 'scrollContainer',\n \"class\": \"k-grid-content k-virtual-content\",\n onScroll: _this3.scrollHandler,\n on: _this3.v3 ? undefined : {\n \"scroll\": _this3.scrollHandler\n }\n }, [h(\"div\", {\n style: {\n 'position': 'relative'\n }\n }, [h(\"table\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n tabIndex: -1\n },\n tabIndex: -1,\n \"class\": 'k-grid-table',\n ref: _this3.v3 ? function (el) {\n _this.scrollTableRef = el;\n } : 'scrollTable'\n }, [colGroups, h(\"tbody\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n \"data-keyboardnavbody\": true\n },\n \"data-keyboardnavbody\": true,\n ref: _this3.v3 ? function (el) {\n _this.scrollTableBodyRef = el;\n } : 'scrollTableBody'\n }, [body])])]), h(\"div\", {\n \"class\": \"k-height-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n style: _this3.$props.scrollable === 'virtual' ? {\n 'height': _this3.vs.containerHeight + 'px'\n } : {}\n })])])]), footer, pager, clues];\n } : [toolbar, groupingPanel, header, h(\"div\", {\n \"class\": \"k-grid-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n },\n ref: _this3.v3 ? function (el) {\n _this.scrollContainerRef = el;\n } : 'scrollContainer',\n \"class\": \"k-grid-content k-virtual-content\",\n onScroll: _this3.scrollHandler,\n on: _this3.v3 ? undefined : {\n \"scroll\": _this3.scrollHandler\n }\n }, [h(\"div\", {\n style: {\n 'position': 'relative'\n }\n }, [h(\"table\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n tabIndex: -1\n },\n tabIndex: -1,\n \"class\": 'k-grid-table',\n ref: _this3.v3 ? function (el) {\n _this.scrollTableRef = el;\n } : 'scrollTable'\n }, [colGroups, h(\"tbody\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n \"data-keyboardnavbody\": true\n },\n \"data-keyboardnavbody\": true,\n ref: _this3.v3 ? function (el) {\n _this.scrollTableBodyRef = el;\n } : 'scrollTableBody'\n }, [body])])]), h(\"div\", {\n \"class\": \"k-height-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n style: _this3.$props.scrollable === 'virtual' ? {\n 'height': _this3.vs.containerHeight + 'px'\n } : {}\n })])])]), footer, pager, clues])];\n } : [h(GridNav, {\n ref: _this3.v3 ? function (el) {\n _this.gridNavRef = el;\n } : 'gridNav',\n currentData: _this3.currentData,\n attrs: _this3.v3 ? undefined : {\n currentData: _this3.currentData,\n role: \"grid\"\n },\n style: wrapperStyle,\n role: \"grid\",\n \"class\": 'k-widget k-grid' + (_this3.$props.scrollable === 'virtual' ? ' k-grid-virtual' : '')\n }, _this3.v3 ? function () {\n return [toolbar, groupingPanel, header, h(\"div\", {\n \"class\": \"k-grid-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n },\n ref: _this3.v3 ? function (el) {\n _this.scrollContainerRef = el;\n } : 'scrollContainer',\n \"class\": \"k-grid-content k-virtual-content\",\n onScroll: _this3.scrollHandler,\n on: _this3.v3 ? undefined : {\n \"scroll\": _this3.scrollHandler\n }\n }, [h(\"div\", {\n style: {\n 'position': 'relative'\n }\n }, [h(\"table\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n tabIndex: -1\n },\n tabIndex: -1,\n \"class\": 'k-grid-table',\n ref: _this3.v3 ? function (el) {\n _this.scrollTableRef = el;\n } : 'scrollTable'\n }, [colGroups, h(\"tbody\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n \"data-keyboardnavbody\": true\n },\n \"data-keyboardnavbody\": true,\n ref: _this3.v3 ? function (el) {\n _this.scrollTableBodyRef = el;\n } : 'scrollTableBody'\n }, [body])])]), h(\"div\", {\n \"class\": \"k-height-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n style: _this3.$props.scrollable === 'virtual' ? {\n 'height': _this3.vs.containerHeight + 'px'\n } : {}\n })])])]), footer, pager, clues];\n } : [toolbar, groupingPanel, header, h(\"div\", {\n \"class\": \"k-grid-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n },\n ref: _this3.v3 ? function (el) {\n _this.scrollContainerRef = el;\n } : 'scrollContainer',\n \"class\": \"k-grid-content k-virtual-content\",\n onScroll: _this3.scrollHandler,\n on: _this3.v3 ? undefined : {\n \"scroll\": _this3.scrollHandler\n }\n }, [h(\"div\", {\n style: {\n 'position': 'relative'\n }\n }, [h(\"table\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n tabIndex: -1\n },\n tabIndex: -1,\n \"class\": 'k-grid-table',\n ref: _this3.v3 ? function (el) {\n _this.scrollTableRef = el;\n } : 'scrollTable'\n }, [colGroups, h(\"tbody\", {\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\",\n \"data-keyboardnavbody\": true\n },\n \"data-keyboardnavbody\": true,\n ref: _this3.v3 ? function (el) {\n _this.scrollTableBodyRef = el;\n } : 'scrollTableBody'\n }, [body])])]), h(\"div\", {\n \"class\": \"k-height-container\",\n role: \"presentation\",\n attrs: _this3.v3 ? undefined : {\n role: \"presentation\"\n }\n }, [h(\"div\", {\n style: _this3.$props.scrollable === 'virtual' ? {\n 'height': _this3.vs.containerHeight + 'px'\n } : {}\n })])])]), footer, pager, clues])])\n );\n }\n};\nvar GridVue3 = Grid;\nexport { Grid, GridVue3 };","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}; // @ts-ignore\n\n\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar inject = allVue.inject;\nimport { GridColumnMenuItem } from './GridColumnMenuItem';\nimport { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';\nimport { GridColumnMenuItemContent } from './GridColumnMenuItemContent';\nimport { Checkbox } from '@progress/kendo-vue-inputs';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { messages, filterClearButton, filterSubmitButton, filterTitle, searchPlaceholder, filterCheckAll } from '../messages';\nimport { filterBy } from '@progress/kendo-data-query';\nimport { clone } from '@progress/kendo-vue-common';\nimport { getNestedValue } from '../utils';\n/**\n * @hidden\n */\n\nvar isArrayEqual = function isArrayEqual(firstArray, secondArray) {\n if (firstArray.length !== secondArray.length) {\n return false;\n }\n\n return firstArray.every(function (ex, i) {\n return ex === secondArray[i];\n });\n};\n/**\n * Represents the default `GridColumnMenuCheckboxFilter` component.\n */\n\n\nvar GridColumnMenuCheckboxFilter = {\n name: 'KendoGridColumnMenuCheckboxFilter',\n props: {\n column: Object,\n filter: Object,\n filterable: Boolean,\n filterOperators: Object,\n expanded: {\n type: Boolean,\n default: undefined\n },\n dataItems: Array,\n searchBox: {\n type: Boolean,\n default: true\n },\n uniqueData: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n currentExpanded: false,\n currentValue: '',\n currentData: undefined,\n dataFromProps: undefined,\n currentFilter: undefined\n };\n },\n created: function created() {\n this.compositeFilterIndex = this.getFilterIndex();\n this.currentExpanded = this.$props.expanded;\n this.currentData = this.parseData(this.$props.dataItems, this.$props.uniqueData) || [];\n this.dataFromProps = this.parseData(this.$props.dataItems, false) || [];\n this.currentFilter = this.defaultFilter();\n },\n updated: function updated() {\n var field = this.$props.column.field || '';\n var data = this.$props.dataItems.map(function (item) {\n return getNestedValue(field, item);\n });\n\n if (!isArrayEqual(data, this.dataFromProps)) {\n this.currentData = data;\n this.dataFromProps = data;\n }\n },\n inject: {\n kendoLocalizationService: {\n default: null\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoLocalizationService = inject('kendoLocalizationService', {});\n return {\n v3: v3,\n kendoLocalizationService: kendoLocalizationService\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this2 = this;\n\n var _this = this;\n\n var h = gh || createElement;\n var column = this.$props.column;\n\n if (!column || !column.field) {\n return h(\"div\");\n }\n\n var localizationService = provideLocalizationService(this);\n var expandState = this.$props.expanded !== undefined ? this.$props.expanded : this.currentExpanded;\n var filterValues = [];\n\n if (this.currentFilter) {\n var currentFilter = __spreadArrays(this.currentFilter.filters);\n\n this.compositeFilterIndex = currentFilter.findIndex(function (filter) {\n if (filter.filters && filter.filters.length > 0) {\n return filter.filters[0].field === column.field;\n }\n\n return false;\n });\n\n if (this.compositeFilterIndex !== -1 && currentFilter[this.compositeFilterIndex].filters.length > 0) {\n currentFilter[this.compositeFilterIndex].filters.forEach(function (filterItem) {\n if (filterItem.field === _this.$props.column.field) {\n filterValues.push(filterItem.value);\n }\n });\n }\n }\n\n var searchBox = function searchBox() {\n return this.$props.searchBox && h(\"span\", {\n \"class\": \"k-list-filter\"\n }, [h(\"input\", {\n ref: 'searchBox',\n placeholder: localizationService.toLanguageString(searchPlaceholder, messages[searchPlaceholder]),\n attrs: this.v3 ? undefined : {\n placeholder: localizationService.toLanguageString(searchPlaceholder, messages[searchPlaceholder])\n },\n \"class\": \"k-textbox\",\n value: this.v3 ? this.currentValue : null,\n domProps: this.v3 ? undefined : {\n \"value\": this.currentValue\n },\n onInput: this.handleSearchChange,\n on: this.v3 ? undefined : {\n \"input\": this.handleSearchChange\n }\n }), h(\"span\", {\n \"class\": \"k-icon k-i-search\"\n })]);\n };\n\n var uniqueFilterValues = filterValues.filter(function (item, index) {\n return filterValues.indexOf(item) === index;\n });\n return (// @ts-ignore function children\n h(GridColumnMenuItemGroup, this.v3 ? function () {\n return [// @ts-ignore function children\n h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n attrs: _this2.v3 ? undefined : {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n iconClass: 'k-i-filter'\n },\n iconClass: 'k-i-filter',\n onClick: _this2.onFilterExpand,\n on: _this2.v3 ? undefined : {\n \"click\": _this2.onFilterExpand\n }\n }), // @ts-ignore function children\n h(GridColumnMenuItemContent, {\n show: !!expandState,\n attrs: _this2.v3 ? undefined : {\n show: !!expandState\n }\n }, _this2.v3 ? function () {\n return [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [searchBox.call(_this2), h(\"ul\", {\n \"class\": \"k-reset k-multicheck-wrap\"\n }, [h(\"li\", {\n \"class\": \"k-item\"\n }, [// @ts-ignore function children\n h(Checkbox, {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n attrs: _this2.v3 ? undefined : {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n checked: _this2.isAllSelected()\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n },\n on: _this2.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n }\n },\n checked: _this2.isAllSelected()\n })]), _this2.currentData.map(function (item, index) {\n var _this = this;\n\n return h(\"li\", {\n \"class\": \"k-item\",\n key: index\n }, [// @ts-ignore function children\n h(Checkbox, {\n label: String(item),\n attrs: this.v3 ? undefined : {\n label: String(item),\n checked: uniqueFilterValues.includes(item)\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n }\n },\n checked: uniqueFilterValues.includes(item)\n })]);\n }, _this2)]), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary'\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])];\n } : [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [searchBox.call(_this2), h(\"ul\", {\n \"class\": \"k-reset k-multicheck-wrap\"\n }, [h(\"li\", {\n \"class\": \"k-item\"\n }, [h(Checkbox, {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n attrs: _this2.v3 ? undefined : {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n checked: _this2.isAllSelected()\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n },\n on: _this2.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n }\n },\n checked: _this2.isAllSelected()\n })]), _this2.currentData.map(function (item, index) {\n var _this = this;\n\n return h(\"li\", {\n \"class\": \"k-item\",\n key: index\n }, [h(Checkbox, {\n label: String(item),\n attrs: this.v3 ? undefined : {\n label: String(item),\n checked: uniqueFilterValues.includes(item)\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n }\n },\n checked: uniqueFilterValues.includes(item)\n })]);\n }, _this2)]), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary'\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])])];\n } : [h(GridColumnMenuItem, {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n attrs: _this2.v3 ? undefined : {\n title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),\n iconClass: 'k-i-filter'\n },\n iconClass: 'k-i-filter',\n onClick: _this2.onFilterExpand,\n on: _this2.v3 ? undefined : {\n \"click\": _this2.onFilterExpand\n }\n }), h(GridColumnMenuItemContent, {\n show: !!expandState,\n attrs: _this2.v3 ? undefined : {\n show: !!expandState\n }\n }, _this2.v3 ? function () {\n return [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [searchBox.call(_this2), h(\"ul\", {\n \"class\": \"k-reset k-multicheck-wrap\"\n }, [h(\"li\", {\n \"class\": \"k-item\"\n }, [h(Checkbox, {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n attrs: _this2.v3 ? undefined : {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n checked: _this2.isAllSelected()\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n },\n on: _this2.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n }\n },\n checked: _this2.isAllSelected()\n })]), _this2.currentData.map(function (item, index) {\n var _this = this;\n\n return h(\"li\", {\n \"class\": \"k-item\",\n key: index\n }, [h(Checkbox, {\n label: String(item),\n attrs: this.v3 ? undefined : {\n label: String(item),\n checked: uniqueFilterValues.includes(item)\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n }\n },\n checked: uniqueFilterValues.includes(item)\n })]);\n }, _this2)]), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary'\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])];\n } : [h(\"div\", {\n \"class\": 'kendo-grid-filter-menu-container'\n }, [h(\"form\", {\n \"class\": 'k-filter-menu k-group k-reset k-state-border-up',\n onSubmit: _this2.submit,\n on: _this2.v3 ? undefined : {\n \"submit\": _this2.submit,\n \"reset\": _this2.clear\n },\n onReset: _this2.clear\n }, [h(\"div\", {\n \"class\": 'k-filter-menu-container'\n }, [searchBox.call(_this2), h(\"ul\", {\n \"class\": \"k-reset k-multicheck-wrap\"\n }, [h(\"li\", {\n \"class\": \"k-item\"\n }, [h(Checkbox, {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n attrs: _this2.v3 ? undefined : {\n label: localizationService.toLanguageString(filterCheckAll, messages[filterCheckAll]),\n checked: _this2.isAllSelected()\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n },\n on: _this2.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, 'all');\n }\n },\n checked: _this2.isAllSelected()\n })]), _this2.currentData.map(function (item, index) {\n var _this = this;\n\n return h(\"li\", {\n \"class\": \"k-item\",\n key: index\n }, [h(Checkbox, {\n label: String(item),\n attrs: this.v3 ? undefined : {\n label: String(item),\n checked: uniqueFilterValues.includes(item)\n },\n onChange: function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n },\n on: this.v3 ? undefined : {\n \"change\": function onChange(e) {\n return _this.handleCheckBoxChange(e, item);\n }\n },\n checked: uniqueFilterValues.includes(item)\n })]);\n }, _this2)]), h(\"div\", {\n \"class\": 'k-columnmenu-actions'\n }, [h(\"button\", {\n \"class\": 'k-button',\n type: 'reset',\n attrs: _this2.v3 ? undefined : {\n type: 'reset'\n }\n }, [localizationService.toLanguageString(filterClearButton, messages[filterClearButton])]), h(\"button\", {\n \"class\": 'k-button k-primary'\n }, [localizationService.toLanguageString(filterSubmitButton, messages[filterSubmitButton])])])])])])])])\n );\n },\n methods: {\n defaultFilter: function defaultFilter() {\n if (this.$props.filter) {\n return clone(this.$props.filter);\n }\n\n return {\n filters: [],\n logic: 'and'\n };\n },\n parseData: function parseData(originalData, isUnique) {\n var field = this.$props.column.field || '';\n var data = originalData.map(function (item) {\n return getNestedValue(field, item);\n });\n\n if (isUnique) {\n return data.filter(function (item, index) {\n return data.indexOf(item) === index;\n });\n }\n\n return data;\n },\n getFilterIndex: function getFilterIndex() {\n var field = this.$props.column.field;\n var currentFilter = this.defaultFilter();\n var compositeFilterIndex = currentFilter.filters.findIndex(function (filter) {\n return filter.filters && filter.filters.length > 0 && filter.filters[0].field === field;\n });\n return compositeFilterIndex;\n },\n onFilterExpand: function onFilterExpand() {\n var isControlled = this.$props.expanded !== undefined;\n var nextValue = !(isControlled ? this.$props.expanded : this.currentExpanded);\n this.$emit('expandchange', nextValue);\n\n if (!isControlled) {\n this.currentExpanded = nextValue;\n }\n },\n handleSearchChange: function handleSearchChange(e) {\n var filterExpression = {\n logic: 'and',\n filters: [{\n field: this.$props.column.field,\n operator: 'startswith',\n value: e.target.value,\n ignoreCase: true\n }]\n };\n this.currentValue = e.target.value;\n this.currentData = this.parseData(filterBy(this.$props.dataItems || [], filterExpression), this.$props.uniqueData);\n },\n clear: function clear(e) {\n e.preventDefault();\n var updatedFilter = this.currentFilter || null;\n\n if (updatedFilter !== null && updatedFilter.filters.length > 0) {\n if (this.compositeFilterIndex >= 0) {\n updatedFilter.filters.splice(this.compositeFilterIndex, 1);\n }\n\n this.$emit('filterchange', updatedFilter, e);\n } else {\n this.$emit('filterchange', null, e);\n }\n\n this.$emit('closemenu');\n },\n submit: function submit(e) {\n e.preventDefault();\n var updatedFilter = this.currentFilter || null;\n this.$emit('filterchange', updatedFilter, e);\n this.$emit('closemenu');\n },\n handleCheckBoxChange: function handleCheckBoxChange(e, value) {\n var field = this.$props.column.field || '';\n\n var newFilter = __assign({}, this.currentFilter);\n\n var filters = __spreadArrays(this.currentFilter.filters) || [];\n var fieldFilters = [];\n\n if (this.compositeFilterIndex !== -1 && newFilter.filters[this.compositeFilterIndex].filters && value !== 'all') {\n fieldFilters = newFilter.filters[this.compositeFilterIndex].filters;\n }\n\n if (e.value && value === 'all') {\n this.currentData.forEach(function (item) {\n fieldFilters.push({\n field: field,\n operator: 'eq',\n value: item\n });\n });\n } else if (e.value) {\n fieldFilters.push({\n field: field,\n operator: 'eq',\n value: value\n });\n } else if (this.currentFilter) {\n var index = fieldFilters.findIndex(function (filter) {\n return filter.value === value;\n });\n fieldFilters.splice(index, 1);\n }\n\n newFilter.logic = 'and';\n\n if (this.compositeFilterIndex !== -1) {\n filters[this.compositeFilterIndex] = {\n logic: 'or',\n filters: fieldFilters\n };\n } else {\n filters.push({\n logic: 'or',\n filters: fieldFilters\n });\n }\n\n if (!e.value && value === 'all' || fieldFilters.length === 0) {\n filters.splice(this.compositeFilterIndex, 1);\n }\n\n newFilter.filters = filters;\n this.currentFilter = newFilter;\n },\n isAllSelected: function isAllSelected() {\n var _this = this;\n\n var isAllChecked = false;\n\n if (this.currentFilter) {\n var filters_1 = __spreadArrays(this.currentFilter.filters);\n\n if (this.compositeFilterIndex === -1) {\n return false;\n }\n\n isAllChecked = this.currentData.every(function (item) {\n if (_this.compositeFilterIndex !== -1 && filters_1[_this.compositeFilterIndex].filters) {\n var index = filters_1[_this.compositeFilterIndex].filters.findIndex(function (filter) {\n return filter.value === item;\n });\n\n return index >= 0;\n }\n\n return false;\n });\n return isAllChecked;\n }\n\n return isAllChecked;\n }\n }\n};\nvar GridColumnMenuCheckboxFilterVue3 = GridColumnMenuCheckboxFilter;\nexport { GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\n/**\n * The detail-row class of the native Vue Grid by Kendo UI. Defines custom\n * details for each row. Can be applied for building the hierarchy. If `expandField` is\n * set, depending on the current data item and its `expandField` value,\n * the details for each row will be visible or hidden.\n */\n\n/**\n * @hidden\n */\n\nvar GridDetailRow = {\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n return null;\n }\n};\nvar GridDetailRowVue3 = GridDetailRow;\nexport { GridDetailRow, GridDetailRowVue3 };","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getDefaultSlots } from '@progress/kendo-vue-common';\n/**\n * Represents the GridToolbar component.\n *\n * @example\n * ```tsx-no-run\n * \n * \n * \n * \n * \n * \n * \n *
\n * \n * ```\n */\n\n/**\n * Represents the default `GridToolbar` component.\n */\n\nvar GridToolbar = {\n name: 'GridToolbar',\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n return h(\"div\", {\n \"class\": \"k-toolbar k-grid-toolbar\"\n }, [defaultSlot]);\n }\n};\nvar GridToolbarVue3 = GridToolbar;\nexport { GridToolbar, GridToolbarVue3 };","import { Grid, GridVue3 } from './Grid';\nimport { GridColumnMenuSort, GridColumnMenuSortVue3, sortGroupByField } from './columnMenu/GridColumnMenuSort';\nimport { GridColumnMenuFilter, GridColumnMenuFilterVue3, filterGroupByField } from './columnMenu/GridColumnMenuFilter';\nimport { GridColumnMenuFilterUI, GridColumnMenuFilterUIVue3 } from './columnMenu/GridColumnMenuFilterUI';\nimport { GridColumnMenuFilterCell, GridColumnMenuFilterCellVue3 } from './columnMenu/GridColumnMenuFilterCell';\nimport { GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterVue3 } from './columnMenu/GridColumnMenuCheckboxFilter';\nimport { GridCell, GridCellVue3 } from './cells/GridCell';\nimport { GridEditCell, GridEditCellVue3 } from './cells/GridEditCell';\nimport { GridGroupCell, GridGroupCellVue3 } from './cells/GridGroupCell';\nimport { GridHierarchyCell, GridHierarchyCellVue3 } from './cells/GridHierarchyCell';\nimport { GridFilterCell, GridFilterCellVue3 } from './cells/GridFilterCell';\nimport { GridHeaderCell, GridHeaderCellVue3 } from './header/GridHeaderCell';\nimport { Footer, FooterVue3 } from './footer/Footer';\nimport { FooterRow, FooterRowVue3 } from './footer/FooterRow';\nimport { GridDetailRow, GridDetailRowVue3 } from './rows/GridDetailRow';\nimport { GridRow, GridRowVue3 } from './rows/GridRow';\nimport { GridToolbar, GridToolbarVue3 } from './GridToolbar';\nimport { GridNoRecords, GridNoRecordsVue3 } from './GridNoRecords';\nimport { GridColumnMenuItem, GridColumnMenuItemVue3 } from './columnMenu/GridColumnMenuItem';\nimport { GridColumnMenuItemContent, GridColumnMenuItemContentVue3 } from './columnMenu/GridColumnMenuItemContent';\nimport { GridColumnMenuItemGroup, GridColumnMenuItemGroupVue3 } from './columnMenu/GridColumnMenuItemGroup';\nexport { Grid, GridVue3, GridCell, GridCellVue3, GridEditCell, GridEditCellVue3, GridGroupCell, GridHierarchyCell, GridGroupCellVue3, GridHierarchyCellVue3, GridDetailRow, GridDetailRowVue3, GridRow, GridRowVue3, GridFilterCell, GridFilterCellVue3, GridHeaderCell, GridHeaderCellVue3, Footer, FooterRow, FooterVue3, FooterRowVue3, GridColumnMenuSort, GridColumnMenuSortVue3, sortGroupByField, GridColumnMenuFilter, GridColumnMenuFilterVue3, filterGroupByField, GridColumnMenuItem, GridColumnMenuItemVue3, GridColumnMenuItemContent, GridColumnMenuItemContentVue3, GridColumnMenuItemGroup, GridColumnMenuItemGroupVue3, GridColumnMenuFilterUI, GridColumnMenuFilterUIVue3, GridColumnMenuFilterCell, GridColumnMenuFilterCellVue3, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterVue3, GridToolbar, GridToolbarVue3, GridNoRecords, GridNoRecordsVue3 };\n// Automatic installation if Vue has been added to the global scope.\nvar vue = 'Vue';\nif (typeof window !== 'undefined' && window[vue] && window[vue].component) {\n window[vue].component('kendo-grid', Grid);\n window[vue].component('kendo-grid-toolbar', GridToolbar);\n window[vue].component('kendo-grid-norecords', GridNoRecords);\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar requestHelpers = __importStar(require(\"../../core/requestHelpers\"));\nvar ImageService = /** @class */ (function () {\n function ImageService(axios, store) {\n this.axios = axios;\n this.store = store;\n }\n //---------------------------------------------------------------------------\n // upload\n ImageService.prototype.getSharedAccessSignature = function (fileName, sizeBytes, contentType, \n // tags: string | null,\n // projectId: number | null,\n // bucketId: number,\n cancelToken, systemUser) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/GetSharedAccessSignature\", {\n fileName: fileName,\n sizeBytes: sizeBytes,\n contentType: contentType,\n // tags: tags,\n // projectId: projectId,\n // bucketId,\n systemUser: systemUser,\n }, {\n cancelToken: cancelToken.token,\n tpsDotNet: true,\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.verifyUploadFile = function (uploadId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/VerifyFileUploaded\", { uploadId: uploadId }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.cloudImageResize = function (uploadId, lastModifiedDate, systemUser) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/CloudImageResize\", { uploadId: uploadId, lastModifiedDate: lastModifiedDate, systemUser: systemUser }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.checkResizeStatus = function (uploadIds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/CheckResizeStatus\", { uploadIds: uploadIds, now: new Date().toISOString() }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.getImagesByUploadImageIds = function (uploadImageIds, systemUser) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/GetImagesByUploadImageIds\", { uploadImageIds: uploadImageIds, systemUser: systemUser }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.reprocess = function (fileId, systemUser) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/Reprocess\", { fileId: fileId, systemUser: systemUser }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.queueImageForResize = function (imageId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/QueueImageForResize\", { imageId: imageId }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.checkImageResizeStatus = function (imageIds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/CheckImageResizeStatus\", { imageIds: imageIds }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n //---------------------------------------------------------------------------\n // file details view\n ImageService.prototype.getImageDetailsJson = function (imageId, shareLink) {\n if (shareLink === void 0) { shareLink = null; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/ImageDetailsJson\", { imageId: imageId, shareLink: shareLink }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.getImageById = function (imageId, minimal) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/GetImageById\", { imageId: imageId, minimal: minimal }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.getImageMetadata = function (imageId, shareLink) {\n if (shareLink === void 0) { shareLink = null; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/ImageMetadataJson\", { imageId: imageId, shareLink: shareLink }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.getSimilarFiles = function (imageId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/SimilarImagesJson\", { imageId: imageId }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ImageService.prototype.fileVersionHistory = function (projectId, fileId, shareLink) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/FileVersionHistory\", { projectId: projectId, fileId: fileId, shareLink: shareLink }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n // async getImageTitleById(id: number, shareLink: string) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/GetImageTitleById\",\n // {\n // id,\n // shareLink,\n // },\n // );\n // }\n // async getSharedImageById(id: number, shareLink: string) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/GetSharedImageById\",\n // {\n // imageId: id,\n // shareLink,\n // },\n // );\n // }\n // async getDefaultBrandingAndSigname() {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/GetDefaultBrandingAndSigname\",\n // {},\n // );\n // }\n // async getOnlineReferences(offset: number, fetch: number) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/OnlineReferencesJson\",\n // { offset, fetch },\n // );\n // }\n // async updateImage(payload: any) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/UpdateImage\",\n // payload,\n // );\n // }\n ImageService.prototype.imagesExists = function (ids) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!ids || !ids.length)\n return [2 /*return*/, { data: [] }];\n return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/ImagesExists\", { imageIds: ids }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n // async deleteSelected(ids: number[]) {\n // const data = await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/DeleteSelected\",\n // { imageIds: ids },\n // );\n // this.store.commit(\"project/setHasDeletedImages\", true);\n // return data;\n // }\n // async setImagesTag(imageIdArray: number[], tag: string) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/AddTagToImages\",\n // {\n // imageIds: imageIdArray,\n // tagString: tag,\n // },\n // );\n // }\n // async updateMultipleImages(\n // imageIds: number[],\n // artistId: number,\n // brandingId: number,\n // tags: any[],\n // ) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/UpdateMultipleImages\",\n // {\n // imageIds,\n // artistId,\n // brandingId,\n // tags,\n // },\n // );\n // }\n // async verifyImageInStorage(imageId: number) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/VerifyImageInStorage\",\n // {\n // imageId: imageId,\n // },\n // );\n // }\n // async cancelFileUpload(uploadIds: number[]) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/CancelFileUpload\",\n // {\n // uploadIds: uploadIds,\n // },\n // );\n // }\n // async restoreFiles(fileIds: number[]) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/RestoreFiles\",\n // {\n // fileIds,\n // },\n // );\n // }\n // async versionFile(\n // projectId: number | null,\n // newFileId: number,\n // oldFIleId: number,\n // ) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/VersionFile\",\n // {\n // projectId,\n // newFileId,\n // oldFIleId,\n // },\n // );\n // }\n // async updateFileName(imageId: number, name: string) {\n // return await requestHelpers.postWithCsrfTokenJson(\n // this.axios,\n // \"/Image/UpdateFileName\",\n // {\n // imageId,\n // name,\n // },\n // );\n // }\n // async checkCanDownloadImages(queryString: string) {\n // return await requestHelpers.postWithCsrfToken(\n // this.axios,\n // `/Image/CheckCanDownloadImages${queryString}`,\n // {},\n // );\n // }\n ImageService.prototype.refreshViewsByFilesIds = function (fileIds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, requestHelpers.postWithCsrfTokenJson(this.axios, \"/Image/RefreshViewsByFilesIds\", { fileIds: fileIds }, { tpsDotNet: true })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return ImageService;\n}());\nexports.default = ImageService;\n//# sourceMappingURL=imageService.js.map","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { getDefaultSlots } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length\n\nvar ToolbarItem = {\n name: 'KendoToolbarItem',\n methods: {\n element: function element() {\n return this.$el;\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n render: function render(createElement) {\n var h = gh || createElement;\n var defaultSlot = getDefaultSlots(this);\n return h(\"span\", [defaultSlot]);\n }\n};\nvar ToolbarItemVue3 = ToolbarItem;\nexport { ToolbarItem, ToolbarItemVue3 };","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar join = uncurryThis([].join);\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return join(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enIl;\n\n})));\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar call = require('../internals/function-call');\nvar $fill = require('../internals/array-fill');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n return call(\n $fill,\n aTypedArray(this),\n value,\n length > 1 ? arguments[1] : undefined,\n length > 2 ? arguments[2] : undefined\n );\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var path = require('../internals/path');\nvar hasOwn = require('../internals/has-own-property');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n '_'\n ),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sw;\n\n})));\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isIntegralNumber = require('../internals/is-integral-number');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n aTypedArrayConstructor(C);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isIntegralNumber(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && hasOwn(descriptor, 'value')\n && !hasOwn(descriptor, 'get')\n && !hasOwn(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!hasOwn(descriptor, 'writable') || descriptor.writable)\n && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructorPrototype);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return call(typedArrayFrom, TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructorPrototype);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return call(typedArrayFrom, TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","// @ts-ignore\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nimport { guid, noop, Keys, getTabIndex, validatePackage, isRtl } from '@progress/kendo-vue-common';\nimport { provideLocalizationService } from '@progress/kendo-vue-intl';\nimport { messages, switchValidation } from './../messages';\nimport { packageMetadata } from '../package-metadata';\nvar SWITCH_CONTAINER = 'k-switch-container';\nvar SWITCH_HANDLE = 'k-switch-handle';\nvar SWITCH_LABEL_ON = 'k-switch-label-on';\nvar SWITCH_LABEL_OFF = 'k-switch-label-off'; // tslint:enable:max-line-length\n\nvar Switch = {\n name: 'KendoSwitch',\n model: {\n event: 'changemodel'\n },\n // @ts-ignore\n emits: {\n 'change': null,\n 'changemodel': null,\n 'update:modelValue': null,\n 'focus': null,\n 'blur': null\n },\n props: {\n accessKey: String,\n checked: {\n type: Boolean,\n default: undefined\n },\n className: String,\n disabled: {\n type: Boolean,\n default: false\n },\n defaultChecked: {\n type: Boolean,\n default: false\n },\n dir: String,\n id: String,\n ariaLabelledBy: String,\n ariaDescribedBy: String,\n offLabel: {\n type: String,\n default: 'OFF'\n },\n onLabel: {\n type: String,\n default: 'ON'\n },\n required: {\n type: Boolean,\n default: false\n },\n tabIndex: Number,\n valid: Boolean,\n // validate: {\n // type: Boolean,\n // default: false\n // },\n validityStyles: {\n type: Boolean,\n default: false\n },\n validationMessage: String,\n value: {\n type: [String, Number, Boolean],\n default: undefined\n },\n modelValue: {\n type: Boolean,\n default: undefined\n }\n },\n created: function created() {\n validatePackage(packageMetadata);\n this._id = guid();\n this.defaultValidationMessage = provideLocalizationService(this);\n },\n data: function data() {\n return {\n currentChecked: this.$props.defaultChecked,\n valueDuringOnChange: undefined,\n focused: false,\n currentDir: undefined\n };\n },\n computed: {\n computedValue: function computedValue() {\n return this.valueDuringOnChange !== undefined ? this.valueDuringOnChange : this.$props.checked !== undefined ? this.$props.checked : this.$props.value !== undefined ? this.$props.value : this.$props.modelValue !== undefined ? this.$props.modelValue : this.currentChecked;\n },\n switchClassName: function switchClassName() {\n var isValid = !this.validityStyles || this.validity().valid;\n return {\n 'k-widget': true,\n 'k-switch': true,\n 'k-switch-on': this.computedValue,\n 'k-switch-off': !this.computedValue,\n 'k-state-focused': this.focused,\n 'k-state-disabled': this.$props.disabled,\n 'k-state-invalid': !isValid\n };\n }\n },\n mounted: function mounted() {\n this._element = this.v3 ? this.elementRef : this.$refs.element;\n this.input = this.v3 ? this.inputRef : this.$refs.input;\n this.currentDir = this.$props.dir !== undefined ? this.$props.dir : isRtl(this.$el) ? 'rtl' : 'ltr';\n this.setValidity();\n },\n updated: function updated() {\n this.setValidity();\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n return {\n v3: v3\n };\n },\n // @ts-ignore\n render: function render(createElement) {\n var _this = this;\n\n var h = gh || createElement;\n var _a = this.$props,\n disabled = _a.disabled,\n id = _a.id,\n offLabel = _a.offLabel,\n onLabel = _a.onLabel,\n tabIndex = _a.tabIndex;\n return h(\"span\", {\n \"class\": this.switchClassName,\n dir: this.currentDir,\n attrs: this.v3 ? undefined : {\n dir: this.currentDir\n },\n onKeydown: this.handleKeyDown,\n on: this.v3 ? undefined : {\n \"keydown\": this.handleKeyDown,\n \"click\": this.handleClick,\n \"focusout\": this.handleWrapperBlur,\n \"focusin\": this.handleWrapperFocus\n },\n onClick: this.handleClick,\n onFocusout: this.handleWrapperBlur,\n onFocusin: this.handleWrapperFocus\n }, [h(\"span\", {\n \"class\": SWITCH_CONTAINER,\n id: id || this._id,\n attrs: this.v3 ? undefined : {\n id: id || this._id,\n role: 'switch',\n \"aria-checked\": this.computedValue,\n \"aria-disabled\": disabled || undefined,\n \"aria-labelledby\": this.$props.ariaLabelledBy,\n \"aria-describedby\": this.$props.ariaDescribedBy,\n tabIndex: getTabIndex(tabIndex, disabled, undefined),\n accessKey: this.$props.accessKey\n },\n role: 'switch',\n \"aria-checked\": this.computedValue,\n \"aria-disabled\": disabled || undefined,\n \"aria-labelledby\": this.$props.ariaLabelledBy,\n \"aria-describedby\": this.$props.ariaDescribedBy,\n ref: this.v3 ? function (el) {\n _this.elementRef = el;\n } : 'element',\n tabIndex: getTabIndex(tabIndex, disabled, undefined),\n accessKey: this.$props.accessKey\n }, [h(\"input\", {\n type: \"checkbox\",\n attrs: this.v3 ? undefined : {\n type: \"checkbox\",\n tabIndex: -1,\n \"aria-hidden\": true\n },\n checked: this.v3 ? this.$props.checked : null,\n domProps: this.v3 ? undefined : {\n \"checked\": this.$props.checked,\n \"value\": this.computedValue\n },\n ref: this.v3 ? function (el) {\n _this.inputRef = el;\n } : 'input',\n tabIndex: -1,\n \"aria-hidden\": true,\n value: this.v3 ? this.computedValue : null,\n style: {\n opacity: 0,\n width: 1,\n border: 0,\n zIndex: -1,\n position: 'absolute',\n left: '50%'\n },\n onChange: noop,\n on: this.v3 ? undefined : {\n \"change\": noop\n }\n }), h(\"span\", {\n \"class\": SWITCH_LABEL_ON\n }, [onLabel]), h(\"span\", {\n \"class\": SWITCH_LABEL_OFF\n }, [offLabel]), h(\"span\", {\n \"class\": SWITCH_HANDLE\n })])]);\n },\n methods: {\n focus: function focus() {\n if (this._element) {\n this._element.focus();\n }\n },\n element: function element() {\n return this._element;\n },\n name: function name() {\n return this.$props.name;\n },\n validity: function validity() {\n var customError = this.$props.validationMessage !== undefined;\n var isValid = this.$props.valid !== undefined ? this.$props.valid : !this.$props.required ? true : this.computedValue ? true : false;\n var valid = this.$props.valid !== undefined ? this.$props.valid : isValid;\n return {\n customError: customError,\n valid: valid,\n valueMissing: this.computedValue === null\n };\n },\n setValidity: function setValidity() {\n if (this.input && this.input.setCustomValidity) {\n this.input.setCustomValidity(this.validity().valid ? '' : this.$props.validationMessage || this.defaultValidationMessage.toLanguageString(switchValidation, messages[switchValidation]));\n }\n },\n limit: function limit(offset, drag, wrapper) {\n var wrapperWidth = wrapper.offsetWidth;\n var margin = drag.offsetWidth;\n\n if (offset < 0) {\n return 0;\n } else if (offset > wrapperWidth - margin) {\n return wrapperWidth - margin;\n }\n\n return offset;\n },\n toggle: function toggle(value, event) {\n this.currentChecked = value;\n this.valueDuringOnChange = value;\n this.$emit('change', {\n event: event,\n component: this,\n target: {\n value: value\n },\n name: this.$props.name,\n value: value,\n validity: this.validity()\n });\n this.$emit('changemodel', value);\n this.$emit('update:modelValue', value);\n this.valueDuringOnChange = undefined;\n },\n handleClick: function handleClick(event) {\n if (this.eventTimeStamp === event.timeStamp) {\n // This is guard against the case when wrapped in label, click event is emmited twice\n return;\n }\n\n this.eventTimeStamp = event.timeStamp;\n this.toggle(!this.computedValue, event);\n },\n handleKeyDown: function handleKeyDown(event) {\n if (this.$props.disabled) {\n return;\n }\n\n var keyCode = event.keyCode;\n\n if (keyCode === Keys.space || keyCode === Keys.enter) {\n this.toggle(!this.computedValue, event);\n }\n },\n handleWrapperFocus: function handleWrapperFocus(event) {\n if (this.$props.disabled) {\n return;\n }\n\n this.focused = true;\n this.$emit('focus', event);\n },\n handleWrapperBlur: function handleWrapperBlur(event) {\n if (this.$props.disabled) {\n return;\n }\n\n this.focused = false;\n this.$emit('blur', event);\n }\n }\n};\nvar SwitchVue3 = Switch;\nexport { Switch, SwitchVue3 };","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar global = require('../internals/global');\n\nvar Array = global.Array;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n c = pow(2, -exponent);\n if (number * c < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n while (mantissaLength >= 8) {\n buffer[index++] = mantissa & 255;\n mantissa /= 256;\n mantissaLength -= 8;\n }\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n while (exponentLength > 0) {\n buffer[index++] = exponent & 255;\n exponent /= 256;\n exponentLength -= 8;\n }\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n while (nBits > 0) {\n exponent = exponent * 256 + buffer[index--];\n nBits -= 8;\n }\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n while (nBits > 0) {\n mantissa = mantissa * 256 + buffer[index--];\n nBits -= 8;\n }\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","export * from './loader/Loader';\nexport * from './loader/LoaderProps';\nexport * from './loader/models/size';\nexport * from './loader/models/theme-color';\nexport * from './loader/models/type';\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n}; // @ts-ignore\n\n\nimport * as Vue from 'vue';\nvar allVue = Vue;\nvar gh = allVue.h;\nvar ref = allVue.ref;\nimport { Button as KendoButton } from '../Button';\nimport { classNames, guid, Keys } from '@progress/kendo-vue-common';\nimport navigation from './utils/navigation';\nimport { ButtonItem } from './ButtonItem';\nimport { Popup } from '@progress/kendo-vue-popup';\nimport { getAnchorAlign, getPopupAlign } from './utils/popup';\nimport { validatePackage, templateRendering, getListeners, canUseDOM } from '@progress/kendo-vue-common';\nimport { packageMetadata } from '../package-metadata'; // tslint:enable:max-line-length\n\nvar DropDownButton = {\n name: 'KendoDropDownButton',\n // @ts-ignore\n emits: {\n focus: null,\n blur: null,\n itemclick: null,\n open: null,\n close: null\n },\n props: {\n accessKey: String,\n primary: Boolean,\n items: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n text: String,\n textField: String,\n tabIndex: Number,\n disabled: Boolean,\n icon: String,\n iconClass: String,\n imageUrl: String,\n popupSettings: Object,\n itemRender: [String, Object, Function],\n item: Function,\n opened: {\n type: Boolean,\n default: undefined\n },\n look: {\n type: String,\n validator: function validator(value) {\n return ['default', 'flat', 'outline'].includes(value);\n }\n },\n buttonClass: String,\n dir: String\n },\n created: function created() {\n this._blurTimeout = null;\n this._anchor = guid();\n this.wrapper = null;\n this.mainButton = null;\n this.guid = guid();\n this.buttonsData = [];\n validatePackage(packageMetadata);\n },\n mounted: function mounted() {\n this.mainButton = this.$refs[this._anchor]; // If this.$props.opened is true during the initial render, the popup is not aligned.\n\n if (this.$props.dir === undefined && this.isRtl() || this.computedOpened) {\n this.$forceUpdate();\n }\n },\n updated: function updated() {\n if (this.focused && this.element()) {\n this.mainButton = this.$refs[this._anchor];\n this.mainButton.focus();\n }\n },\n data: function data() {\n return {\n currentOpened: false,\n focused: false,\n focusedIndex: -1\n };\n },\n computed: {\n computedOpened: function computedOpened() {\n return this.$props.opened === undefined ? this.currentOpened : this.$props.opened;\n },\n wrapperClass: function wrapperClass() {\n return {\n 'k-widget': true,\n 'k-dropdown-button': true,\n 'k-state-focused': this.focused\n };\n }\n },\n // @ts-ignore\n setup: !gh ? undefined : function () {\n var v3 = !!gh;\n var kendoAnchorRef = ref(null);\n return {\n v3: v3,\n kendoAnchorRef: kendoAnchorRef\n };\n },\n render: function render(createElement) {\n var _this2 = this;\n\n var h = gh || createElement;\n var rtl = this.isRtl();\n var dir = rtl ? 'rtl' : undefined;\n var _a = this.$props,\n tabIndex = _a.tabIndex,\n disabled = _a.disabled;\n this.buttonsData = this.$props.items;\n\n var renderChildItems = function renderChildItems() {\n var _a = this.$props,\n item = _a.item,\n itemRender = _a.itemRender,\n textField = _a.textField;\n return this.buttonsData.length > 0 ? this.buttonsData.map(function (dataItem, index) {\n var currentDataItem = typeof dataItem !== 'string' ? __assign(__assign({}, dataItem), {\n render: templateRendering.call(this, dataItem.render, getListeners.call(this))\n }) : dataItem;\n return (// @ts-ignore\n h(ButtonItem, {\n dataItem: currentDataItem,\n attrs: this.v3 ? undefined : {\n dataItem: currentDataItem,\n textField: textField,\n focused: this.focusedIndex === index,\n render: templateRendering.call(this, itemRender, getListeners.call(this)),\n item: item,\n index: index,\n id: this.guid + \"-\" + index\n },\n textField: textField,\n focused: this.focusedIndex === index,\n onClick: this.onItemClick,\n on: this.v3 ? undefined : {\n \"click\": this.onItemClick,\n \"down\": this.onItemDown\n },\n onDown: this.onItemDown,\n render: templateRendering.call(this, itemRender, getListeners.call(this)),\n item: item,\n index: index,\n key: index,\n id: this.guid + \"-\" + index\n })\n );\n }, this) : null;\n };\n\n var renderPopup = function renderPopup() {\n var _this = this;\n\n var _a = this.$props.popupSettings,\n popupSettings = _a === void 0 ? {} : _a;\n return (// @ts-ignore function children\n h(Popup, {\n anchor: this._anchor,\n attrs: this.v3 ? undefined : {\n anchor: this._anchor,\n show: this.computedOpened,\n animate: popupSettings.animate,\n popupClass: classNames('k-list-container k-reset k-group', popupSettings.popupClass),\n anchorAlign: popupSettings.anchorAlign || getAnchorAlign(rtl),\n popupAlign: popupSettings.popupAlign || getPopupAlign(rtl)\n },\n show: this.computedOpened,\n animate: popupSettings.animate,\n popupClass: classNames('k-list-container k-reset k-group', popupSettings.popupClass),\n anchorAlign: popupSettings.anchorAlign || getAnchorAlign(rtl),\n popupAlign: popupSettings.popupAlign || getPopupAlign(rtl),\n style: rtl ? {\n direction: 'rtl'\n } : undefined\n }, this.v3 ? function () {\n return [h(\"ul\", {\n \"class\": \"k-list k-reset\",\n role: \"menu\",\n attrs: _this.v3 ? undefined : {\n role: \"menu\",\n id: _this.guid\n },\n id: _this.guid\n }, [renderChildItems.call(_this)])];\n } : [h(\"ul\", {\n \"class\": \"k-list k-reset\",\n role: \"menu\",\n attrs: _this.v3 ? undefined : {\n role: \"menu\",\n id: _this.guid\n },\n id: _this.guid\n }, [renderChildItems.call(_this)])])\n );\n };\n\n return h(\"div\", {\n \"class\": this.wrapperClass,\n onKeydown: this.onKeyDown,\n on: this.v3 ? undefined : {\n \"keydown\": this.onKeyDown,\n \"focusin\": this.onFocus,\n \"focusout\": this.onBlur\n },\n onFocusin: this.onFocus,\n onFocusout: this.onBlur,\n dir: dir,\n attrs: this.v3 ? undefined : {\n dir: dir\n }\n }, [// @ts-ignore function children\n h(KendoButton, {\n onClick: this.onClickMainButton,\n on: this.v3 ? undefined : {\n \"click\": this.onClickMainButton,\n \"mousedown\": this.mouseDown\n },\n onMousedown: this.mouseDown,\n disabled: disabled || undefined,\n attrs: this.v3 ? undefined : {\n disabled: disabled || undefined,\n tabIndex: tabIndex,\n accessKey: this.$props.accessKey,\n icon: this.$props.icon,\n iconClass: this.$props.iconClass,\n imageUrl: this.$props.imageUrl,\n look: this.$props.look,\n primary: this.$props.primary,\n dir: dir,\n type: \"button\",\n \"aria-disabled\": disabled,\n \"aria-haspopup\": true,\n \"aria-expanded\": this.computedOpened,\n \"aria-label\": this.$props.text + \" dropdownbutton\",\n \"aria-owns\": this.guid,\n \"aria-activedescendant\": this.focusedIndex !== undefined && this.focusedIndex >= 0 ? this.guid + \"-\" + this.focusedIndex : undefined\n },\n tabIndex: tabIndex,\n accessKey: this.$props.accessKey,\n icon: this.$props.icon,\n iconClass: this.$props.iconClass,\n \"class\": this.$props.buttonClass,\n imageUrl: this.$props.imageUrl,\n look: this.$props.look,\n primary: this.$props.primary,\n dir: dir,\n ref: this._anchor,\n type: \"button\",\n \"aria-disabled\": disabled,\n \"aria-haspopup\": true,\n \"aria-expanded\": this.computedOpened,\n \"aria-label\": this.$props.text + \" dropdownbutton\",\n \"aria-owns\": this.guid,\n \"aria-activedescendant\": this.focusedIndex !== undefined && this.focusedIndex >= 0 ? this.guid + \"-\" + this.focusedIndex : undefined\n }, this.v3 ? function () {\n return [_this2.$props.text];\n } : [_this2.$props.text]), renderPopup.call(this)]);\n },\n methods: {\n element: function element() {\n return this.mainButton;\n },\n onKeyDown: function onKeyDown(event) {\n if (event.altKey) {\n if (!this.computedOpened && event.keyCode === Keys.down) {\n this.dispatchPopupEvent(event, true);\n this.focusedIndex = 0;\n this.currentOpened = true;\n } else if (this.computedOpened && event.keyCode === Keys.up) {\n this.dispatchPopupEvent(event, false);\n this.focusedIndex = -1;\n this.currentOpened = false;\n }\n\n return;\n }\n\n if (event.keyCode === Keys.enter || event.keyCode === Keys.space) {\n if (this.focusedIndex !== undefined && this.focusedIndex >= 0) {\n this.dispatchClickEvent(event, this.focusedIndex);\n } // Prevent default because otherwise when an item is selected\n // click on the default button gets emitted which opens the popup again.\n\n\n event.preventDefault();\n this.focusedIndex = this.computedOpened ? -1 : 0, this.currentOpened = !this.computedOpened;\n this.dispatchPopupEvent(event, this.currentOpened);\n } else if (this.computedOpened && event.keyCode === Keys.esc) {\n this.focusedIndex = -1;\n this.currentOpened = false;\n this.dispatchPopupEvent(event, this.currentOpened);\n }\n\n if (this.computedOpened) {\n var newFocused = navigation(this.focusedIndex, event.keyCode, event.altKey, this.buttonsData.length);\n this.focusedIndex = newFocused;\n var arrowKey = event.keyCode === Keys.up || event.keyCode === Keys.down || event.keyCode === Keys.left || event.keyCode === Keys.right;\n\n if (!event.altKey && arrowKey) {\n // Needed to notify the parent listeners that event is handled.\n event.preventDefault();\n }\n }\n },\n onFocus: function onFocus(event) {\n if (!this.focused) {\n this.focused = true;\n this.$emit('focus', event, this, undefined);\n }\n\n this.focusedIndex = this.computedOpened ? 0 : -1;\n clearTimeout(this._blurTimeout);\n },\n onBlur: function onBlur(event) {\n clearTimeout(this._blurTimeout);\n this.createBlurTimeout(event);\n },\n createBlurTimeout: function createBlurTimeout(event) {\n var that = this;\n this._blurTimeout = setTimeout(function () {\n if (canUseDOM && document.activeElement !== that.$el) {\n that.focused = false;\n that.focusedIndex = -1;\n that.$emit('blur', event, that, undefined);\n var fireCloseEvent = that.computedOpened;\n\n if (fireCloseEvent) {\n that.currentOpened = false;\n that.dispatchPopupEvent(event, false);\n }\n }\n }, 200);\n },\n onItemClick: function onItemClick(event, clickedItemIndex) {\n this.focusedIndex = -1;\n this.currentOpened = false;\n this.dispatchClickEvent(event, clickedItemIndex);\n this.dispatchPopupEvent(event, false);\n },\n onItemDown: function onItemDown(event) {\n if (document.activeElement === this.element()) {\n event.preventDefault();\n }\n },\n mouseDown: function mouseDown(event) {\n event.preventDefault();\n },\n dispatchClickEvent: function dispatchClickEvent(dispatchedEvent, index) {\n if (!this.isItemDisabled(index)) {\n this.$emit('itemclick', {\n event: dispatchedEvent,\n item: this.buttonsData[index],\n itemIndex: index\n });\n }\n },\n onClickMainButton: function onClickMainButton(event) {\n if (!this.buttonsData.length) {\n return;\n }\n\n var toOpen = !this.computedOpened;\n this.currentOpened = toOpen;\n this.focused = true;\n this.focusedIndex = toOpen ? 0 : -1;\n this.dispatchPopupEvent(event, toOpen);\n },\n dispatchPopupEvent: function dispatchPopupEvent(dispatchedEvent, open) {\n this.$emit(open ? 'open' : 'close', dispatchedEvent, this, undefined);\n },\n isItemDisabled: function isItemDisabled(index) {\n return this.buttonsData[index] ? this.buttonsData[index].disabled : this.$props.disabled;\n },\n isRtl: function isRtl() {\n return this.$props.dir !== undefined ? this.$props.dir === 'rtl' : !!this.$el && getComputedStyle(this.$el).direction === 'rtl';\n }\n }\n};\nvar DropDownButtonVue3 = DropDownButton;\nexport { DropDownButton, DropDownButtonVue3 };","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = {\n props: {\n name: {\n type: String,\n default: undefined,\n kComposite: 'name'\n },\n tooltip: {\n type: String,\n default: undefined,\n kComposite: 'tooltip'\n },\n exec: {\n type: Function,\n default: undefined,\n kComposite: 'exec'\n },\n items: {\n type: Array,\n default: undefined,\n kComposite: 'items'\n },\n palette: {\n type: [String, Array],\n default: undefined,\n kComposite: 'palette'\n },\n columns: {\n type: Number,\n default: undefined,\n kComposite: 'columns'\n },\n template: {\n type: [String, Function],\n default: undefined,\n kComposite: 'template'\n }\n }\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = {\n allowHideAfter: {\n type: Number,\n default: undefined\n },\n animation: {\n type: [Object, Boolean],\n default: undefined\n },\n appendTo: {\n type: [String, Object],\n default: undefined\n },\n autoHideAfter: {\n type: Number,\n default: undefined\n },\n button: {\n type: Boolean,\n default: undefined\n },\n height: {\n type: [Number, String],\n default: undefined\n },\n hideOnClick: {\n type: Boolean,\n default: undefined\n },\n position: {\n type: Object,\n default: undefined\n },\n stacking: {\n type: String,\n default: undefined\n },\n templates: {\n type: Array,\n default: undefined\n },\n width: {\n type: [Number, String],\n default: undefined\n },\n\n // Events\n hide: Function,\n show: Function\n};","import { extend, isArray, isMap, isIntegerKey, isSymbol, hasOwn, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\r\n console.warn(`[Vue warn] ${msg}`, ...args);\r\n}\n\nlet activeEffectScope;\r\nconst effectScopeStack = [];\r\nclass EffectScope {\r\n constructor(detached = false) {\r\n this.active = true;\r\n this.effects = [];\r\n this.cleanups = [];\r\n if (!detached && activeEffectScope) {\r\n this.parent = activeEffectScope;\r\n this.index =\r\n (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\r\n }\r\n }\r\n run(fn) {\r\n if (this.active) {\r\n try {\r\n this.on();\r\n return fn();\r\n }\r\n finally {\r\n this.off();\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`cannot run an inactive effect scope.`);\r\n }\r\n }\r\n on() {\r\n if (this.active) {\r\n effectScopeStack.push(this);\r\n activeEffectScope = this;\r\n }\r\n }\r\n off() {\r\n if (this.active) {\r\n effectScopeStack.pop();\r\n activeEffectScope = effectScopeStack[effectScopeStack.length - 1];\r\n }\r\n }\r\n stop(fromParent) {\r\n if (this.active) {\r\n this.effects.forEach(e => e.stop());\r\n this.cleanups.forEach(cleanup => cleanup());\r\n if (this.scopes) {\r\n this.scopes.forEach(e => e.stop(true));\r\n }\r\n // nested scope, dereference from parent to avoid memory leaks\r\n if (this.parent && !fromParent) {\r\n // optimized O(1) removal\r\n const last = this.parent.scopes.pop();\r\n if (last && last !== this) {\r\n this.parent.scopes[this.index] = last;\r\n last.index = this.index;\r\n }\r\n }\r\n this.active = false;\r\n }\r\n }\r\n}\r\nfunction effectScope(detached) {\r\n return new EffectScope(detached);\r\n}\r\nfunction recordEffectScope(effect, scope) {\r\n scope = scope || activeEffectScope;\r\n if (scope && scope.active) {\r\n scope.effects.push(effect);\r\n }\r\n}\r\nfunction getCurrentScope() {\r\n return activeEffectScope;\r\n}\r\nfunction onScopeDispose(fn) {\r\n if (activeEffectScope) {\r\n activeEffectScope.cleanups.push(fn);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`onScopeDispose() is called when there is no active effect scope` +\r\n ` to be associated with.`);\r\n }\r\n}\n\nconst createDep = (effects) => {\r\n const dep = new Set(effects);\r\n dep.w = 0;\r\n dep.n = 0;\r\n return dep;\r\n};\r\nconst wasTracked = (dep) => (dep.w & trackOpBit) > 0;\r\nconst newTracked = (dep) => (dep.n & trackOpBit) > 0;\r\nconst initDepMarkers = ({ deps }) => {\r\n if (deps.length) {\r\n for (let i = 0; i < deps.length; i++) {\r\n deps[i].w |= trackOpBit; // set was tracked\r\n }\r\n }\r\n};\r\nconst finalizeDepMarkers = (effect) => {\r\n const { deps } = effect;\r\n if (deps.length) {\r\n let ptr = 0;\r\n for (let i = 0; i < deps.length; i++) {\r\n const dep = deps[i];\r\n if (wasTracked(dep) && !newTracked(dep)) {\r\n dep.delete(effect);\r\n }\r\n else {\r\n deps[ptr++] = dep;\r\n }\r\n // clear bits\r\n dep.w &= ~trackOpBit;\r\n dep.n &= ~trackOpBit;\r\n }\r\n deps.length = ptr;\r\n }\r\n};\n\nconst targetMap = new WeakMap();\r\n// The number of effects currently being tracked recursively.\r\nlet effectTrackDepth = 0;\r\nlet trackOpBit = 1;\r\n/**\r\n * The bitwise track markers support at most 30 levels of recursion.\r\n * This value is chosen to enable modern JS engines to use a SMI on all platforms.\r\n * When recursion depth is greater, fall back to using a full cleanup.\r\n */\r\nconst maxMarkerBits = 30;\r\nconst effectStack = [];\r\nlet activeEffect;\r\nconst ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'iterate' : '');\r\nconst MAP_KEY_ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'Map key iterate' : '');\r\nclass ReactiveEffect {\r\n constructor(fn, scheduler = null, scope) {\r\n this.fn = fn;\r\n this.scheduler = scheduler;\r\n this.active = true;\r\n this.deps = [];\r\n recordEffectScope(this, scope);\r\n }\r\n run() {\r\n if (!this.active) {\r\n return this.fn();\r\n }\r\n if (!effectStack.length || !effectStack.includes(this)) {\r\n try {\r\n effectStack.push((activeEffect = this));\r\n enableTracking();\r\n trackOpBit = 1 << ++effectTrackDepth;\r\n if (effectTrackDepth <= maxMarkerBits) {\r\n initDepMarkers(this);\r\n }\r\n else {\r\n cleanupEffect(this);\r\n }\r\n return this.fn();\r\n }\r\n finally {\r\n if (effectTrackDepth <= maxMarkerBits) {\r\n finalizeDepMarkers(this);\r\n }\r\n trackOpBit = 1 << --effectTrackDepth;\r\n resetTracking();\r\n effectStack.pop();\r\n const n = effectStack.length;\r\n activeEffect = n > 0 ? effectStack[n - 1] : undefined;\r\n }\r\n }\r\n }\r\n stop() {\r\n if (this.active) {\r\n cleanupEffect(this);\r\n if (this.onStop) {\r\n this.onStop();\r\n }\r\n this.active = false;\r\n }\r\n }\r\n}\r\nfunction cleanupEffect(effect) {\r\n const { deps } = effect;\r\n if (deps.length) {\r\n for (let i = 0; i < deps.length; i++) {\r\n deps[i].delete(effect);\r\n }\r\n deps.length = 0;\r\n }\r\n}\r\nfunction effect(fn, options) {\r\n if (fn.effect) {\r\n fn = fn.effect.fn;\r\n }\r\n const _effect = new ReactiveEffect(fn);\r\n if (options) {\r\n extend(_effect, options);\r\n if (options.scope)\r\n recordEffectScope(_effect, options.scope);\r\n }\r\n if (!options || !options.lazy) {\r\n _effect.run();\r\n }\r\n const runner = _effect.run.bind(_effect);\r\n runner.effect = _effect;\r\n return runner;\r\n}\r\nfunction stop(runner) {\r\n runner.effect.stop();\r\n}\r\nlet shouldTrack = true;\r\nconst trackStack = [];\r\nfunction pauseTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = false;\r\n}\r\nfunction enableTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = true;\r\n}\r\nfunction resetTracking() {\r\n const last = trackStack.pop();\r\n shouldTrack = last === undefined ? true : last;\r\n}\r\nfunction track(target, type, key) {\r\n if (!isTracking()) {\r\n return;\r\n }\r\n let depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n targetMap.set(target, (depsMap = new Map()));\r\n }\r\n let dep = depsMap.get(key);\r\n if (!dep) {\r\n depsMap.set(key, (dep = createDep()));\r\n }\r\n const eventInfo = (process.env.NODE_ENV !== 'production')\r\n ? { effect: activeEffect, target, type, key }\r\n : undefined;\r\n trackEffects(dep, eventInfo);\r\n}\r\nfunction isTracking() {\r\n return shouldTrack && activeEffect !== undefined;\r\n}\r\nfunction trackEffects(dep, debuggerEventExtraInfo) {\r\n let shouldTrack = false;\r\n if (effectTrackDepth <= maxMarkerBits) {\r\n if (!newTracked(dep)) {\r\n dep.n |= trackOpBit; // set newly tracked\r\n shouldTrack = !wasTracked(dep);\r\n }\r\n }\r\n else {\r\n // Full cleanup mode.\r\n shouldTrack = !dep.has(activeEffect);\r\n }\r\n if (shouldTrack) {\r\n dep.add(activeEffect);\r\n activeEffect.deps.push(dep);\r\n if ((process.env.NODE_ENV !== 'production') && activeEffect.onTrack) {\r\n activeEffect.onTrack(Object.assign({\r\n effect: activeEffect\r\n }, debuggerEventExtraInfo));\r\n }\r\n }\r\n}\r\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\r\n const depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n // never been tracked\r\n return;\r\n }\r\n let deps = [];\r\n if (type === \"clear\" /* CLEAR */) {\r\n // collection being cleared\r\n // trigger all effects for target\r\n deps = [...depsMap.values()];\r\n }\r\n else if (key === 'length' && isArray(target)) {\r\n depsMap.forEach((dep, key) => {\r\n if (key === 'length' || key >= newValue) {\r\n deps.push(dep);\r\n }\r\n });\r\n }\r\n else {\r\n // schedule runs for SET | ADD | DELETE\r\n if (key !== void 0) {\r\n deps.push(depsMap.get(key));\r\n }\r\n // also run for iteration key on ADD | DELETE | Map.SET\r\n switch (type) {\r\n case \"add\" /* ADD */:\r\n if (!isArray(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n else if (isIntegerKey(key)) {\r\n // new index added to array -> length changes\r\n deps.push(depsMap.get('length'));\r\n }\r\n break;\r\n case \"delete\" /* DELETE */:\r\n if (!isArray(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n break;\r\n case \"set\" /* SET */:\r\n if (isMap(target)) {\r\n deps.push(depsMap.get(ITERATE_KEY));\r\n }\r\n break;\r\n }\r\n }\r\n const eventInfo = (process.env.NODE_ENV !== 'production')\r\n ? { target, type, key, newValue, oldValue, oldTarget }\r\n : undefined;\r\n if (deps.length === 1) {\r\n if (deps[0]) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n triggerEffects(deps[0], eventInfo);\r\n }\r\n else {\r\n triggerEffects(deps[0]);\r\n }\r\n }\r\n }\r\n else {\r\n const effects = [];\r\n for (const dep of deps) {\r\n if (dep) {\r\n effects.push(...dep);\r\n }\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n triggerEffects(createDep(effects), eventInfo);\r\n }\r\n else {\r\n triggerEffects(createDep(effects));\r\n }\r\n }\r\n}\r\nfunction triggerEffects(dep, debuggerEventExtraInfo) {\r\n // spread into array for stabilization\r\n for (const effect of isArray(dep) ? dep : [...dep]) {\r\n if (effect !== activeEffect || effect.allowRecurse) {\r\n if ((process.env.NODE_ENV !== 'production') && effect.onTrigger) {\r\n effect.onTrigger(extend({ effect }, debuggerEventExtraInfo));\r\n }\r\n if (effect.scheduler) {\r\n effect.scheduler();\r\n }\r\n else {\r\n effect.run();\r\n }\r\n }\r\n }\r\n}\n\nconst isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);\r\nconst builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol)\r\n .map(key => Symbol[key])\r\n .filter(isSymbol));\r\nconst get = /*#__PURE__*/ createGetter();\r\nconst shallowGet = /*#__PURE__*/ createGetter(false, true);\r\nconst readonlyGet = /*#__PURE__*/ createGetter(true);\r\nconst shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);\r\nconst arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations();\r\nfunction createArrayInstrumentations() {\r\n const instrumentations = {};\r\n ['includes', 'indexOf', 'lastIndexOf'].forEach(key => {\r\n instrumentations[key] = function (...args) {\r\n const arr = toRaw(this);\r\n for (let i = 0, l = this.length; i < l; i++) {\r\n track(arr, \"get\" /* GET */, i + '');\r\n }\r\n // we run the method using the original args first (which may be reactive)\r\n const res = arr[key](...args);\r\n if (res === -1 || res === false) {\r\n // if that didn't work, run it again using raw values.\r\n return arr[key](...args.map(toRaw));\r\n }\r\n else {\r\n return res;\r\n }\r\n };\r\n });\r\n ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => {\r\n instrumentations[key] = function (...args) {\r\n pauseTracking();\r\n const res = toRaw(this)[key].apply(this, args);\r\n resetTracking();\r\n return res;\r\n };\r\n });\r\n return instrumentations;\r\n}\r\nfunction createGetter(isReadonly = false, shallow = false) {\r\n return function get(target, key, receiver) {\r\n if (key === \"__v_isReactive\" /* IS_REACTIVE */) {\r\n return !isReadonly;\r\n }\r\n else if (key === \"__v_isReadonly\" /* IS_READONLY */) {\r\n return isReadonly;\r\n }\r\n else if (key === \"__v_isShallow\" /* IS_SHALLOW */) {\r\n return shallow;\r\n }\r\n else if (key === \"__v_raw\" /* RAW */ &&\r\n receiver ===\r\n (isReadonly\r\n ? shallow\r\n ? shallowReadonlyMap\r\n : readonlyMap\r\n : shallow\r\n ? shallowReactiveMap\r\n : reactiveMap).get(target)) {\r\n return target;\r\n }\r\n const targetIsArray = isArray(target);\r\n if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {\r\n return Reflect.get(arrayInstrumentations, key, receiver);\r\n }\r\n const res = Reflect.get(target, key, receiver);\r\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\r\n return res;\r\n }\r\n if (!isReadonly) {\r\n track(target, \"get\" /* GET */, key);\r\n }\r\n if (shallow) {\r\n return res;\r\n }\r\n if (isRef(res)) {\r\n // ref unwrapping - does not apply for Array + integer key.\r\n const shouldUnwrap = !targetIsArray || !isIntegerKey(key);\r\n return shouldUnwrap ? res.value : res;\r\n }\r\n if (isObject(res)) {\r\n // Convert returned value into a proxy as well. we do the isObject check\r\n // here to avoid invalid value warning. Also need to lazy access readonly\r\n // and reactive here to avoid circular dependency.\r\n return isReadonly ? readonly(res) : reactive(res);\r\n }\r\n return res;\r\n };\r\n}\r\nconst set = /*#__PURE__*/ createSetter();\r\nconst shallowSet = /*#__PURE__*/ createSetter(true);\r\nfunction createSetter(shallow = false) {\r\n return function set(target, key, value, receiver) {\r\n let oldValue = target[key];\r\n if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {\r\n return false;\r\n }\r\n if (!shallow && !isReadonly(value)) {\r\n if (!isShallow(value)) {\r\n value = toRaw(value);\r\n oldValue = toRaw(oldValue);\r\n }\r\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n }\r\n const hadKey = isArray(target) && isIntegerKey(key)\r\n ? Number(key) < target.length\r\n : hasOwn(target, key);\r\n const result = Reflect.set(target, key, value, receiver);\r\n // don't trigger if target is something up in the prototype chain of original\r\n if (target === toRaw(receiver)) {\r\n if (!hadKey) {\r\n trigger(target, \"add\" /* ADD */, key, value);\r\n }\r\n else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\" /* SET */, key, value, oldValue);\r\n }\r\n }\r\n return result;\r\n };\r\n}\r\nfunction deleteProperty(target, key) {\r\n const hadKey = hasOwn(target, key);\r\n const oldValue = target[key];\r\n const result = Reflect.deleteProperty(target, key);\r\n if (result && hadKey) {\r\n trigger(target, \"delete\" /* DELETE */, key, undefined, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction has(target, key) {\r\n const result = Reflect.has(target, key);\r\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\r\n track(target, \"has\" /* HAS */, key);\r\n }\r\n return result;\r\n}\r\nfunction ownKeys(target) {\r\n track(target, \"iterate\" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);\r\n return Reflect.ownKeys(target);\r\n}\r\nconst mutableHandlers = {\r\n get,\r\n set,\r\n deleteProperty,\r\n has,\r\n ownKeys\r\n};\r\nconst readonlyHandlers = {\r\n get: readonlyGet,\r\n set(target, key) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\r\n }\r\n return true;\r\n },\r\n deleteProperty(target, key) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\r\n }\r\n return true;\r\n }\r\n};\r\nconst shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, {\r\n get: shallowGet,\r\n set: shallowSet\r\n});\r\n// Props handlers are special in the sense that it should not unwrap top-level\r\n// refs (in order to allow refs to be explicitly passed down), but should\r\n// retain the reactivity of the normal readonly object.\r\nconst shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {\r\n get: shallowReadonlyGet\r\n});\n\nconst toShallow = (value) => value;\r\nconst getProto = (v) => Reflect.getPrototypeOf(v);\r\nfunction get$1(target, key, isReadonly = false, isShallow = false) {\r\n // #1772: readonly(reactive(Map)) should return readonly + reactive version\r\n // of the value\r\n target = target[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (key !== rawKey) {\r\n !isReadonly && track(rawTarget, \"get\" /* GET */, key);\r\n }\r\n !isReadonly && track(rawTarget, \"get\" /* GET */, rawKey);\r\n const { has } = getProto(rawTarget);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n if (has.call(rawTarget, key)) {\r\n return wrap(target.get(key));\r\n }\r\n else if (has.call(rawTarget, rawKey)) {\r\n return wrap(target.get(rawKey));\r\n }\r\n else if (target !== rawTarget) {\r\n // #3602 readonly(reactive(Map))\r\n // ensure that the nested reactive `Map` can do tracking for itself\r\n target.get(key);\r\n }\r\n}\r\nfunction has$1(key, isReadonly = false) {\r\n const target = this[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (key !== rawKey) {\r\n !isReadonly && track(rawTarget, \"has\" /* HAS */, key);\r\n }\r\n !isReadonly && track(rawTarget, \"has\" /* HAS */, rawKey);\r\n return key === rawKey\r\n ? target.has(key)\r\n : target.has(key) || target.has(rawKey);\r\n}\r\nfunction size(target, isReadonly = false) {\r\n target = target[\"__v_raw\" /* RAW */];\r\n !isReadonly && track(toRaw(target), \"iterate\" /* ITERATE */, ITERATE_KEY);\r\n return Reflect.get(target, 'size', target);\r\n}\r\nfunction add(value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const proto = getProto(target);\r\n const hadKey = proto.has.call(target, value);\r\n if (!hadKey) {\r\n target.add(value);\r\n trigger(target, \"add\" /* ADD */, value, value);\r\n }\r\n return this;\r\n}\r\nfunction set$1(key, value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const { has, get } = getProto(target);\r\n let hadKey = has.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has.call(target, key);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n checkIdentityKeys(target, has, key);\r\n }\r\n const oldValue = get.call(target, key);\r\n target.set(key, value);\r\n if (!hadKey) {\r\n trigger(target, \"add\" /* ADD */, key, value);\r\n }\r\n else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\" /* SET */, key, value, oldValue);\r\n }\r\n return this;\r\n}\r\nfunction deleteEntry(key) {\r\n const target = toRaw(this);\r\n const { has, get } = getProto(target);\r\n let hadKey = has.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has.call(target, key);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n checkIdentityKeys(target, has, key);\r\n }\r\n const oldValue = get ? get.call(target, key) : undefined;\r\n // forward the operation before queueing reactions\r\n const result = target.delete(key);\r\n if (hadKey) {\r\n trigger(target, \"delete\" /* DELETE */, key, undefined, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction clear() {\r\n const target = toRaw(this);\r\n const hadItems = target.size !== 0;\r\n const oldTarget = (process.env.NODE_ENV !== 'production')\r\n ? isMap(target)\r\n ? new Map(target)\r\n : new Set(target)\r\n : undefined;\r\n // forward the operation before queueing reactions\r\n const result = target.clear();\r\n if (hadItems) {\r\n trigger(target, \"clear\" /* CLEAR */, undefined, undefined, oldTarget);\r\n }\r\n return result;\r\n}\r\nfunction createForEach(isReadonly, isShallow) {\r\n return function forEach(callback, thisArg) {\r\n const observed = this;\r\n const target = observed[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly && track(rawTarget, \"iterate\" /* ITERATE */, ITERATE_KEY);\r\n return target.forEach((value, key) => {\r\n // important: make sure the callback is\r\n // 1. invoked with the reactive map as `this` and 3rd arg\r\n // 2. the value received should be a corresponding reactive/readonly.\r\n return callback.call(thisArg, wrap(value), wrap(key), observed);\r\n });\r\n };\r\n}\r\nfunction createIterableMethod(method, isReadonly, isShallow) {\r\n return function (...args) {\r\n const target = this[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const targetIsMap = isMap(rawTarget);\r\n const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);\r\n const isKeyOnly = method === 'keys' && targetIsMap;\r\n const innerIterator = target[method](...args);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly &&\r\n track(rawTarget, \"iterate\" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\r\n // return a wrapped iterator which returns observed versions of the\r\n // values emitted from the real iterator\r\n return {\r\n // iterator protocol\r\n next() {\r\n const { value, done } = innerIterator.next();\r\n return done\r\n ? { value, done }\r\n : {\r\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\r\n done\r\n };\r\n },\r\n // iterable protocol\r\n [Symbol.iterator]() {\r\n return this;\r\n }\r\n };\r\n };\r\n}\r\nfunction createReadonlyMethod(type) {\r\n return function (...args) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\r\n console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));\r\n }\r\n return type === \"delete\" /* DELETE */ ? false : this;\r\n };\r\n}\r\nfunction createInstrumentations() {\r\n const mutableInstrumentations = {\r\n get(key) {\r\n return get$1(this, key);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has: has$1,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, false)\r\n };\r\n const shallowInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, false, true);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has: has$1,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, true)\r\n };\r\n const readonlyInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has$1.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\" /* ADD */),\r\n set: createReadonlyMethod(\"set\" /* SET */),\r\n delete: createReadonlyMethod(\"delete\" /* DELETE */),\r\n clear: createReadonlyMethod(\"clear\" /* CLEAR */),\r\n forEach: createForEach(true, false)\r\n };\r\n const shallowReadonlyInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, true, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has$1.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\" /* ADD */),\r\n set: createReadonlyMethod(\"set\" /* SET */),\r\n delete: createReadonlyMethod(\"delete\" /* DELETE */),\r\n clear: createReadonlyMethod(\"clear\" /* CLEAR */),\r\n forEach: createForEach(true, true)\r\n };\r\n const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];\r\n iteratorMethods.forEach(method => {\r\n mutableInstrumentations[method] = createIterableMethod(method, false, false);\r\n readonlyInstrumentations[method] = createIterableMethod(method, true, false);\r\n shallowInstrumentations[method] = createIterableMethod(method, false, true);\r\n shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);\r\n });\r\n return [\r\n mutableInstrumentations,\r\n readonlyInstrumentations,\r\n shallowInstrumentations,\r\n shallowReadonlyInstrumentations\r\n ];\r\n}\r\nconst [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations();\r\nfunction createInstrumentationGetter(isReadonly, shallow) {\r\n const instrumentations = shallow\r\n ? isReadonly\r\n ? shallowReadonlyInstrumentations\r\n : shallowInstrumentations\r\n : isReadonly\r\n ? readonlyInstrumentations\r\n : mutableInstrumentations;\r\n return (target, key, receiver) => {\r\n if (key === \"__v_isReactive\" /* IS_REACTIVE */) {\r\n return !isReadonly;\r\n }\r\n else if (key === \"__v_isReadonly\" /* IS_READONLY */) {\r\n return isReadonly;\r\n }\r\n else if (key === \"__v_raw\" /* RAW */) {\r\n return target;\r\n }\r\n return Reflect.get(hasOwn(instrumentations, key) && key in target\r\n ? instrumentations\r\n : target, key, receiver);\r\n };\r\n}\r\nconst mutableCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(false, false)\r\n};\r\nconst shallowCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(false, true)\r\n};\r\nconst readonlyCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(true, false)\r\n};\r\nconst shallowReadonlyCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(true, true)\r\n};\r\nfunction checkIdentityKeys(target, has, key) {\r\n const rawKey = toRaw(key);\r\n if (rawKey !== key && has.call(target, rawKey)) {\r\n const type = toRawType(target);\r\n console.warn(`Reactive ${type} contains both the raw and reactive ` +\r\n `versions of the same object${type === `Map` ? ` as keys` : ``}, ` +\r\n `which can lead to inconsistencies. ` +\r\n `Avoid differentiating between the raw and reactive versions ` +\r\n `of an object and only use the reactive version if possible.`);\r\n }\r\n}\n\nconst reactiveMap = new WeakMap();\r\nconst shallowReactiveMap = new WeakMap();\r\nconst readonlyMap = new WeakMap();\r\nconst shallowReadonlyMap = new WeakMap();\r\nfunction targetTypeMap(rawType) {\r\n switch (rawType) {\r\n case 'Object':\r\n case 'Array':\r\n return 1 /* COMMON */;\r\n case 'Map':\r\n case 'Set':\r\n case 'WeakMap':\r\n case 'WeakSet':\r\n return 2 /* COLLECTION */;\r\n default:\r\n return 0 /* INVALID */;\r\n }\r\n}\r\nfunction getTargetType(value) {\r\n return value[\"__v_skip\" /* SKIP */] || !Object.isExtensible(value)\r\n ? 0 /* INVALID */\r\n : targetTypeMap(toRawType(value));\r\n}\r\nfunction reactive(target) {\r\n // if trying to observe a readonly proxy, return the readonly version.\r\n if (isReadonly(target)) {\r\n return target;\r\n }\r\n return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\r\n}\r\n/**\r\n * Return a shallowly-reactive copy of the original object, where only the root\r\n * level properties are reactive. It also does not auto-unwrap refs (even at the\r\n * root level).\r\n */\r\nfunction shallowReactive(target) {\r\n return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);\r\n}\r\n/**\r\n * Creates a readonly copy of the original object. Note the returned copy is not\r\n * made reactive, but `readonly` can be called on an already reactive object.\r\n */\r\nfunction readonly(target) {\r\n return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\r\n}\r\n/**\r\n * Returns a reactive-copy of the original object, where only the root level\r\n * properties are readonly, and does NOT unwrap refs nor recursively convert\r\n * returned properties.\r\n * This is used for creating the props proxy object for stateful components.\r\n */\r\nfunction shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}\r\nfunction createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {\r\n if (!isObject(target)) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`value cannot be made reactive: ${String(target)}`);\r\n }\r\n return target;\r\n }\r\n // target is already a Proxy, return it.\r\n // exception: calling readonly() on a reactive object\r\n if (target[\"__v_raw\" /* RAW */] &&\r\n !(isReadonly && target[\"__v_isReactive\" /* IS_REACTIVE */])) {\r\n return target;\r\n }\r\n // target already has corresponding Proxy\r\n const existingProxy = proxyMap.get(target);\r\n if (existingProxy) {\r\n return existingProxy;\r\n }\r\n // only a whitelist of value types can be observed.\r\n const targetType = getTargetType(target);\r\n if (targetType === 0 /* INVALID */) {\r\n return target;\r\n }\r\n const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);\r\n proxyMap.set(target, proxy);\r\n return proxy;\r\n}\r\nfunction isReactive(value) {\r\n if (isReadonly(value)) {\r\n return isReactive(value[\"__v_raw\" /* RAW */]);\r\n }\r\n return !!(value && value[\"__v_isReactive\" /* IS_REACTIVE */]);\r\n}\r\nfunction isReadonly(value) {\r\n return !!(value && value[\"__v_isReadonly\" /* IS_READONLY */]);\r\n}\r\nfunction isShallow(value) {\r\n return !!(value && value[\"__v_isShallow\" /* IS_SHALLOW */]);\r\n}\r\nfunction isProxy(value) {\r\n return isReactive(value) || isReadonly(value);\r\n}\r\nfunction toRaw(observed) {\r\n const raw = observed && observed[\"__v_raw\" /* RAW */];\r\n return raw ? toRaw(raw) : observed;\r\n}\r\nfunction markRaw(value) {\r\n def(value, \"__v_skip\" /* SKIP */, true);\r\n return value;\r\n}\r\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\r\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction trackRefValue(ref) {\r\n if (isTracking()) {\r\n ref = toRaw(ref);\r\n if (!ref.dep) {\r\n ref.dep = createDep();\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n trackEffects(ref.dep, {\r\n target: ref,\r\n type: \"get\" /* GET */,\r\n key: 'value'\r\n });\r\n }\r\n else {\r\n trackEffects(ref.dep);\r\n }\r\n }\r\n}\r\nfunction triggerRefValue(ref, newVal) {\r\n ref = toRaw(ref);\r\n if (ref.dep) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n triggerEffects(ref.dep, {\r\n target: ref,\r\n type: \"set\" /* SET */,\r\n key: 'value',\r\n newValue: newVal\r\n });\r\n }\r\n else {\r\n triggerEffects(ref.dep);\r\n }\r\n }\r\n}\r\nfunction isRef(r) {\r\n return Boolean(r && r.__v_isRef === true);\r\n}\r\nfunction ref(value) {\r\n return createRef(value, false);\r\n}\r\nfunction shallowRef(value) {\r\n return createRef(value, true);\r\n}\r\nfunction createRef(rawValue, shallow) {\r\n if (isRef(rawValue)) {\r\n return rawValue;\r\n }\r\n return new RefImpl(rawValue, shallow);\r\n}\r\nclass RefImpl {\r\n constructor(value, __v_isShallow) {\r\n this.__v_isShallow = __v_isShallow;\r\n this.dep = undefined;\r\n this.__v_isRef = true;\r\n this._rawValue = __v_isShallow ? value : toRaw(value);\r\n this._value = __v_isShallow ? value : toReactive(value);\r\n }\r\n get value() {\r\n trackRefValue(this);\r\n return this._value;\r\n }\r\n set value(newVal) {\r\n newVal = this.__v_isShallow ? newVal : toRaw(newVal);\r\n if (hasChanged(newVal, this._rawValue)) {\r\n this._rawValue = newVal;\r\n this._value = this.__v_isShallow ? newVal : toReactive(newVal);\r\n triggerRefValue(this, newVal);\r\n }\r\n }\r\n}\r\nfunction triggerRef(ref) {\r\n triggerRefValue(ref, (process.env.NODE_ENV !== 'production') ? ref.value : void 0);\r\n}\r\nfunction unref(ref) {\r\n return isRef(ref) ? ref.value : ref;\r\n}\r\nconst shallowUnwrapHandlers = {\r\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\r\n set: (target, key, value, receiver) => {\r\n const oldValue = target[key];\r\n if (isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n else {\r\n return Reflect.set(target, key, value, receiver);\r\n }\r\n }\r\n};\r\nfunction proxyRefs(objectWithRefs) {\r\n return isReactive(objectWithRefs)\r\n ? objectWithRefs\r\n : new Proxy(objectWithRefs, shallowUnwrapHandlers);\r\n}\r\nclass CustomRefImpl {\r\n constructor(factory) {\r\n this.dep = undefined;\r\n this.__v_isRef = true;\r\n const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this));\r\n this._get = get;\r\n this._set = set;\r\n }\r\n get value() {\r\n return this._get();\r\n }\r\n set value(newVal) {\r\n this._set(newVal);\r\n }\r\n}\r\nfunction customRef(factory) {\r\n return new CustomRefImpl(factory);\r\n}\r\nfunction toRefs(object) {\r\n if ((process.env.NODE_ENV !== 'production') && !isProxy(object)) {\r\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\r\n }\r\n const ret = isArray(object) ? new Array(object.length) : {};\r\n for (const key in object) {\r\n ret[key] = toRef(object, key);\r\n }\r\n return ret;\r\n}\r\nclass ObjectRefImpl {\r\n constructor(_object, _key, _defaultValue) {\r\n this._object = _object;\r\n this._key = _key;\r\n this._defaultValue = _defaultValue;\r\n this.__v_isRef = true;\r\n }\r\n get value() {\r\n const val = this._object[this._key];\r\n return val === undefined ? this._defaultValue : val;\r\n }\r\n set value(newVal) {\r\n this._object[this._key] = newVal;\r\n }\r\n}\r\nfunction toRef(object, key, defaultValue) {\r\n const val = object[key];\r\n return isRef(val)\r\n ? val\r\n : new ObjectRefImpl(object, key, defaultValue);\r\n}\n\nclass ComputedRefImpl {\r\n constructor(getter, _setter, isReadonly, isSSR) {\r\n this._setter = _setter;\r\n this.dep = undefined;\r\n this.__v_isRef = true;\r\n this._dirty = true;\r\n this.effect = new ReactiveEffect(getter, () => {\r\n if (!this._dirty) {\r\n this._dirty = true;\r\n triggerRefValue(this);\r\n }\r\n });\r\n this.effect.computed = this;\r\n this.effect.active = this._cacheable = !isSSR;\r\n this[\"__v_isReadonly\" /* IS_READONLY */] = isReadonly;\r\n }\r\n get value() {\r\n // the computed ref may get wrapped by other proxies e.g. readonly() #3376\r\n const self = toRaw(this);\r\n trackRefValue(self);\r\n if (self._dirty || !self._cacheable) {\r\n self._dirty = false;\r\n self._value = self.effect.run();\r\n }\r\n return self._value;\r\n }\r\n set value(newValue) {\r\n this._setter(newValue);\r\n }\r\n}\r\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\r\n let getter;\r\n let setter;\r\n const onlyGetter = isFunction(getterOrOptions);\r\n if (onlyGetter) {\r\n getter = getterOrOptions;\r\n setter = (process.env.NODE_ENV !== 'production')\r\n ? () => {\r\n console.warn('Write operation failed: computed value is readonly');\r\n }\r\n : NOOP;\r\n }\r\n else {\r\n getter = getterOrOptions.get;\r\n setter = getterOrOptions.set;\r\n }\r\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\r\n if ((process.env.NODE_ENV !== 'production') && debugOptions && !isSSR) {\r\n cRef.effect.onTrack = debugOptions.onTrack;\r\n cRef.effect.onTrigger = debugOptions.onTrigger;\r\n }\r\n return cRef;\r\n}\n\nvar _a;\r\nconst tick = Promise.resolve();\r\nconst queue = [];\r\nlet queued = false;\r\nconst scheduler = (fn) => {\r\n queue.push(fn);\r\n if (!queued) {\r\n queued = true;\r\n tick.then(flush);\r\n }\r\n};\r\nconst flush = () => {\r\n for (let i = 0; i < queue.length; i++) {\r\n queue[i]();\r\n }\r\n queue.length = 0;\r\n queued = false;\r\n};\r\nclass DeferredComputedRefImpl {\r\n constructor(getter) {\r\n this.dep = undefined;\r\n this._dirty = true;\r\n this.__v_isRef = true;\r\n this[_a] = true;\r\n let compareTarget;\r\n let hasCompareTarget = false;\r\n let scheduled = false;\r\n this.effect = new ReactiveEffect(getter, (computedTrigger) => {\r\n if (this.dep) {\r\n if (computedTrigger) {\r\n compareTarget = this._value;\r\n hasCompareTarget = true;\r\n }\r\n else if (!scheduled) {\r\n const valueToCompare = hasCompareTarget ? compareTarget : this._value;\r\n scheduled = true;\r\n hasCompareTarget = false;\r\n scheduler(() => {\r\n if (this.effect.active && this._get() !== valueToCompare) {\r\n triggerRefValue(this);\r\n }\r\n scheduled = false;\r\n });\r\n }\r\n // chained upstream computeds are notified synchronously to ensure\r\n // value invalidation in case of sync access; normal effects are\r\n // deferred to be triggered in scheduler.\r\n for (const e of this.dep) {\r\n if (e.computed instanceof DeferredComputedRefImpl) {\r\n e.scheduler(true /* computedTrigger */);\r\n }\r\n }\r\n }\r\n this._dirty = true;\r\n });\r\n this.effect.computed = this;\r\n }\r\n _get() {\r\n if (this._dirty) {\r\n this._dirty = false;\r\n return (this._value = this.effect.run());\r\n }\r\n return this._value;\r\n }\r\n get value() {\r\n trackRefValue(this);\r\n // the computed ref may get wrapped by other proxies e.g. readonly() #3376\r\n return toRaw(this)._get();\r\n }\r\n}\r\n_a = \"__v_isReadonly\" /* IS_READONLY */;\r\nfunction deferredComputed(getter) {\r\n return new DeferredComputedRefImpl(getter);\r\n}\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, triggerRef, unref };\n","import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, reactive, shallowReactive, trigger, isProxy, shallowReadonly, track, EffectScope, markRaw, proxyRefs, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, def, isReservedProp, EMPTY_ARR, capitalize, toRawType, makeMap, NO, normalizeClass, normalizeStyle, isGloballyWhitelisted } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\r\nfunction pushWarningContext(vnode) {\r\n stack.push(vnode);\r\n}\r\nfunction popWarningContext() {\r\n stack.pop();\r\n}\r\nfunction warn(msg, ...args) {\r\n // avoid props formatting or warn handler tracking deps that might be mutated\r\n // during patch, leading to infinite recursion.\r\n pauseTracking();\r\n const instance = stack.length ? stack[stack.length - 1].component : null;\r\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\r\n const trace = getComponentTrace();\r\n if (appWarnHandler) {\r\n callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [\r\n msg + args.join(''),\r\n instance && instance.proxy,\r\n trace\r\n .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`)\r\n .join('\\n'),\r\n trace\r\n ]);\r\n }\r\n else {\r\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\r\n /* istanbul ignore if */\r\n if (trace.length &&\r\n // avoid spamming console during tests\r\n !false) {\r\n warnArgs.push(`\\n`, ...formatTrace(trace));\r\n }\r\n console.warn(...warnArgs);\r\n }\r\n resetTracking();\r\n}\r\nfunction getComponentTrace() {\r\n let currentVNode = stack[stack.length - 1];\r\n if (!currentVNode) {\r\n return [];\r\n }\r\n // we can't just use the stack because it will be incomplete during updates\r\n // that did not start from the root. Re-construct the parent chain using\r\n // instance parent pointers.\r\n const normalizedStack = [];\r\n while (currentVNode) {\r\n const last = normalizedStack[0];\r\n if (last && last.vnode === currentVNode) {\r\n last.recurseCount++;\r\n }\r\n else {\r\n normalizedStack.push({\r\n vnode: currentVNode,\r\n recurseCount: 0\r\n });\r\n }\r\n const parentInstance = currentVNode.component && currentVNode.component.parent;\r\n currentVNode = parentInstance && parentInstance.vnode;\r\n }\r\n return normalizedStack;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatTrace(trace) {\r\n const logs = [];\r\n trace.forEach((entry, i) => {\r\n logs.push(...(i === 0 ? [] : [`\\n`]), ...formatTraceEntry(entry));\r\n });\r\n return logs;\r\n}\r\nfunction formatTraceEntry({ vnode, recurseCount }) {\r\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\r\n const isRoot = vnode.component ? vnode.component.parent == null : false;\r\n const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;\r\n const close = `>` + postfix;\r\n return vnode.props\r\n ? [open, ...formatProps(vnode.props), close]\r\n : [open + close];\r\n}\r\n/* istanbul ignore next */\r\nfunction formatProps(props) {\r\n const res = [];\r\n const keys = Object.keys(props);\r\n keys.slice(0, 3).forEach(key => {\r\n res.push(...formatProp(key, props[key]));\r\n });\r\n if (keys.length > 3) {\r\n res.push(` ...`);\r\n }\r\n return res;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatProp(key, value, raw) {\r\n if (isString(value)) {\r\n value = JSON.stringify(value);\r\n return raw ? value : [`${key}=${value}`];\r\n }\r\n else if (typeof value === 'number' ||\r\n typeof value === 'boolean' ||\r\n value == null) {\r\n return raw ? value : [`${key}=${value}`];\r\n }\r\n else if (isRef(value)) {\r\n value = formatProp(key, toRaw(value.value), true);\r\n return raw ? value : [`${key}=Ref<`, value, `>`];\r\n }\r\n else if (isFunction(value)) {\r\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\r\n }\r\n else {\r\n value = toRaw(value);\r\n return raw ? value : [`${key}=`, value];\r\n }\r\n}\n\nconst ErrorTypeStrings = {\r\n [\"sp\" /* SERVER_PREFETCH */]: 'serverPrefetch hook',\r\n [\"bc\" /* BEFORE_CREATE */]: 'beforeCreate hook',\r\n [\"c\" /* CREATED */]: 'created hook',\r\n [\"bm\" /* BEFORE_MOUNT */]: 'beforeMount hook',\r\n [\"m\" /* MOUNTED */]: 'mounted hook',\r\n [\"bu\" /* BEFORE_UPDATE */]: 'beforeUpdate hook',\r\n [\"u\" /* UPDATED */]: 'updated',\r\n [\"bum\" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook',\r\n [\"um\" /* UNMOUNTED */]: 'unmounted hook',\r\n [\"a\" /* ACTIVATED */]: 'activated hook',\r\n [\"da\" /* DEACTIVATED */]: 'deactivated hook',\r\n [\"ec\" /* ERROR_CAPTURED */]: 'errorCaptured hook',\r\n [\"rtc\" /* RENDER_TRACKED */]: 'renderTracked hook',\r\n [\"rtg\" /* RENDER_TRIGGERED */]: 'renderTriggered hook',\r\n [0 /* SETUP_FUNCTION */]: 'setup function',\r\n [1 /* RENDER_FUNCTION */]: 'render function',\r\n [2 /* WATCH_GETTER */]: 'watcher getter',\r\n [3 /* WATCH_CALLBACK */]: 'watcher callback',\r\n [4 /* WATCH_CLEANUP */]: 'watcher cleanup function',\r\n [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler',\r\n [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler',\r\n [7 /* VNODE_HOOK */]: 'vnode hook',\r\n [8 /* DIRECTIVE_HOOK */]: 'directive hook',\r\n [9 /* TRANSITION_HOOK */]: 'transition hook',\r\n [10 /* APP_ERROR_HANDLER */]: 'app errorHandler',\r\n [11 /* APP_WARN_HANDLER */]: 'app warnHandler',\r\n [12 /* FUNCTION_REF */]: 'ref function',\r\n [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',\r\n [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +\r\n 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'\r\n};\r\nfunction callWithErrorHandling(fn, instance, type, args) {\r\n let res;\r\n try {\r\n res = args ? fn(...args) : fn();\r\n }\r\n catch (err) {\r\n handleError(err, instance, type);\r\n }\r\n return res;\r\n}\r\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\r\n if (isFunction(fn)) {\r\n const res = callWithErrorHandling(fn, instance, type, args);\r\n if (res && isPromise(res)) {\r\n res.catch(err => {\r\n handleError(err, instance, type);\r\n });\r\n }\r\n return res;\r\n }\r\n const values = [];\r\n for (let i = 0; i < fn.length; i++) {\r\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\r\n }\r\n return values;\r\n}\r\nfunction handleError(err, instance, type, throwInDev = true) {\r\n const contextVNode = instance ? instance.vnode : null;\r\n if (instance) {\r\n let cur = instance.parent;\r\n // the exposed instance is the render proxy to keep it consistent with 2.x\r\n const exposedInstance = instance.proxy;\r\n // in production the hook receives only the error code\r\n const errorInfo = (process.env.NODE_ENV !== 'production') ? ErrorTypeStrings[type] : type;\r\n while (cur) {\r\n const errorCapturedHooks = cur.ec;\r\n if (errorCapturedHooks) {\r\n for (let i = 0; i < errorCapturedHooks.length; i++) {\r\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\r\n return;\r\n }\r\n }\r\n }\r\n cur = cur.parent;\r\n }\r\n // app-level handling\r\n const appErrorHandler = instance.appContext.config.errorHandler;\r\n if (appErrorHandler) {\r\n callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);\r\n return;\r\n }\r\n }\r\n logError(err, type, contextVNode, throwInDev);\r\n}\r\nfunction logError(err, type, contextVNode, throwInDev = true) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const info = ErrorTypeStrings[type];\r\n if (contextVNode) {\r\n pushWarningContext(contextVNode);\r\n }\r\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\r\n if (contextVNode) {\r\n popWarningContext();\r\n }\r\n // crash in dev by default so it's more noticeable\r\n if (throwInDev) {\r\n throw err;\r\n }\r\n else {\r\n console.error(err);\r\n }\r\n }\r\n else {\r\n // recover in prod to reduce the impact on end-user\r\n console.error(err);\r\n }\r\n}\n\nlet isFlushing = false;\r\nlet isFlushPending = false;\r\nconst queue = [];\r\nlet flushIndex = 0;\r\nconst pendingPreFlushCbs = [];\r\nlet activePreFlushCbs = null;\r\nlet preFlushIndex = 0;\r\nconst pendingPostFlushCbs = [];\r\nlet activePostFlushCbs = null;\r\nlet postFlushIndex = 0;\r\nconst resolvedPromise = Promise.resolve();\r\nlet currentFlushPromise = null;\r\nlet currentPreFlushParentJob = null;\r\nconst RECURSION_LIMIT = 100;\r\nfunction nextTick(fn) {\r\n const p = currentFlushPromise || resolvedPromise;\r\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\r\n}\r\n// #2768\r\n// Use binary-search to find a suitable position in the queue,\r\n// so that the queue maintains the increasing order of job's id,\r\n// which can prevent the job from being skipped and also can avoid repeated patching.\r\nfunction findInsertionIndex(id) {\r\n // the start index should be `flushIndex + 1`\r\n let start = flushIndex + 1;\r\n let end = queue.length;\r\n while (start < end) {\r\n const middle = (start + end) >>> 1;\r\n const middleJobId = getId(queue[middle]);\r\n middleJobId < id ? (start = middle + 1) : (end = middle);\r\n }\r\n return start;\r\n}\r\nfunction queueJob(job) {\r\n // the dedupe search uses the startIndex argument of Array.includes()\r\n // by default the search index includes the current job that is being run\r\n // so it cannot recursively trigger itself again.\r\n // if the job is a watch() callback, the search will start with a +1 index to\r\n // allow it recursively trigger itself - it is the user's responsibility to\r\n // ensure it doesn't end up in an infinite loop.\r\n if ((!queue.length ||\r\n !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) &&\r\n job !== currentPreFlushParentJob) {\r\n if (job.id == null) {\r\n queue.push(job);\r\n }\r\n else {\r\n queue.splice(findInsertionIndex(job.id), 0, job);\r\n }\r\n queueFlush();\r\n }\r\n}\r\nfunction queueFlush() {\r\n if (!isFlushing && !isFlushPending) {\r\n isFlushPending = true;\r\n currentFlushPromise = resolvedPromise.then(flushJobs);\r\n }\r\n}\r\nfunction invalidateJob(job) {\r\n const i = queue.indexOf(job);\r\n if (i > flushIndex) {\r\n queue.splice(i, 1);\r\n }\r\n}\r\nfunction queueCb(cb, activeQueue, pendingQueue, index) {\r\n if (!isArray(cb)) {\r\n if (!activeQueue ||\r\n !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) {\r\n pendingQueue.push(cb);\r\n }\r\n }\r\n else {\r\n // if cb is an array, it is a component lifecycle hook which can only be\r\n // triggered by a job, which is already deduped in the main queue, so\r\n // we can skip duplicate check here to improve perf\r\n pendingQueue.push(...cb);\r\n }\r\n queueFlush();\r\n}\r\nfunction queuePreFlushCb(cb) {\r\n queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);\r\n}\r\nfunction queuePostFlushCb(cb) {\r\n queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);\r\n}\r\nfunction flushPreFlushCbs(seen, parentJob = null) {\r\n if (pendingPreFlushCbs.length) {\r\n currentPreFlushParentJob = parentJob;\r\n activePreFlushCbs = [...new Set(pendingPreFlushCbs)];\r\n pendingPreFlushCbs.length = 0;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) {\r\n continue;\r\n }\r\n activePreFlushCbs[preFlushIndex]();\r\n }\r\n activePreFlushCbs = null;\r\n preFlushIndex = 0;\r\n currentPreFlushParentJob = null;\r\n // recursively flush until it drains\r\n flushPreFlushCbs(seen, parentJob);\r\n }\r\n}\r\nfunction flushPostFlushCbs(seen) {\r\n if (pendingPostFlushCbs.length) {\r\n const deduped = [...new Set(pendingPostFlushCbs)];\r\n pendingPostFlushCbs.length = 0;\r\n // #1947 already has active queue, nested flushPostFlushCbs call\r\n if (activePostFlushCbs) {\r\n activePostFlushCbs.push(...deduped);\r\n return;\r\n }\r\n activePostFlushCbs = deduped;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\r\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\r\n continue;\r\n }\r\n activePostFlushCbs[postFlushIndex]();\r\n }\r\n activePostFlushCbs = null;\r\n postFlushIndex = 0;\r\n }\r\n}\r\nconst getId = (job) => job.id == null ? Infinity : job.id;\r\nfunction flushJobs(seen) {\r\n isFlushPending = false;\r\n isFlushing = true;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n flushPreFlushCbs(seen);\r\n // Sort queue before flush.\r\n // This ensures that:\r\n // 1. Components are updated from parent to child. (because parent is always\r\n // created before the child so its render effect will have smaller\r\n // priority number)\r\n // 2. If a component is unmounted during a parent component's update,\r\n // its update can be skipped.\r\n queue.sort((a, b) => getId(a) - getId(b));\r\n // conditional usage of checkRecursiveUpdate must be determined out of\r\n // try ... catch block since Rollup by default de-optimizes treeshaking\r\n // inside try-catch. This can leave all warning code unshaked. Although\r\n // they would get eventually shaken by a minifier like terser, some minifiers\r\n // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)\r\n const check = (process.env.NODE_ENV !== 'production')\r\n ? (job) => checkRecursiveUpdates(seen, job)\r\n : NOOP;\r\n try {\r\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\r\n const job = queue[flushIndex];\r\n if (job && job.active !== false) {\r\n if ((process.env.NODE_ENV !== 'production') && check(job)) {\r\n continue;\r\n }\r\n // console.log(`running:`, job.id)\r\n callWithErrorHandling(job, null, 14 /* SCHEDULER */);\r\n }\r\n }\r\n }\r\n finally {\r\n flushIndex = 0;\r\n queue.length = 0;\r\n flushPostFlushCbs(seen);\r\n isFlushing = false;\r\n currentFlushPromise = null;\r\n // some postFlushCb queued jobs!\r\n // keep flushing until it drains.\r\n if (queue.length ||\r\n pendingPreFlushCbs.length ||\r\n pendingPostFlushCbs.length) {\r\n flushJobs(seen);\r\n }\r\n }\r\n}\r\nfunction checkRecursiveUpdates(seen, fn) {\r\n if (!seen.has(fn)) {\r\n seen.set(fn, 1);\r\n }\r\n else {\r\n const count = seen.get(fn);\r\n if (count > RECURSION_LIMIT) {\r\n const instance = fn.ownerInstance;\r\n const componentName = instance && getComponentName(instance.type);\r\n warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +\r\n `This means you have a reactive effect that is mutating its own ` +\r\n `dependencies and thus recursively triggering itself. Possible sources ` +\r\n `include component template, render function, updated hook or ` +\r\n `watcher source function.`);\r\n return true;\r\n }\r\n else {\r\n seen.set(fn, count + 1);\r\n }\r\n }\r\n}\n\n/* eslint-disable no-restricted-globals */\r\nlet isHmrUpdating = false;\r\nconst hmrDirtyComponents = new Set();\r\n// Expose the HMR runtime on the global object\r\n// This makes it entirely tree-shakable without polluting the exports and makes\r\n// it easier to be used in toolings like vue-loader\r\n// Note: for a component to be eligible for HMR it also needs the __hmrId option\r\n// to be set so that its instances can be registered / removed.\r\nif ((process.env.NODE_ENV !== 'production')) {\r\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\r\n createRecord: tryWrap(createRecord),\r\n rerender: tryWrap(rerender),\r\n reload: tryWrap(reload)\r\n };\r\n}\r\nconst map = new Map();\r\nfunction registerHMR(instance) {\r\n const id = instance.type.__hmrId;\r\n let record = map.get(id);\r\n if (!record) {\r\n createRecord(id, instance.type);\r\n record = map.get(id);\r\n }\r\n record.instances.add(instance);\r\n}\r\nfunction unregisterHMR(instance) {\r\n map.get(instance.type.__hmrId).instances.delete(instance);\r\n}\r\nfunction createRecord(id, initialDef) {\r\n if (map.has(id)) {\r\n return false;\r\n }\r\n map.set(id, {\r\n initialDef: normalizeClassComponent(initialDef),\r\n instances: new Set()\r\n });\r\n return true;\r\n}\r\nfunction normalizeClassComponent(component) {\r\n return isClassComponent(component) ? component.__vccOpts : component;\r\n}\r\nfunction rerender(id, newRender) {\r\n const record = map.get(id);\r\n if (!record) {\r\n return;\r\n }\r\n // update initial record (for not-yet-rendered component)\r\n record.initialDef.render = newRender;\r\n [...record.instances].forEach(instance => {\r\n if (newRender) {\r\n instance.render = newRender;\r\n normalizeClassComponent(instance.type).render = newRender;\r\n }\r\n instance.renderCache = [];\r\n // this flag forces child components with slot content to update\r\n isHmrUpdating = true;\r\n instance.update();\r\n isHmrUpdating = false;\r\n });\r\n}\r\nfunction reload(id, newComp) {\r\n const record = map.get(id);\r\n if (!record)\r\n return;\r\n newComp = normalizeClassComponent(newComp);\r\n // update initial def (for not-yet-rendered components)\r\n updateComponentDef(record.initialDef, newComp);\r\n // create a snapshot which avoids the set being mutated during updates\r\n const instances = [...record.instances];\r\n for (const instance of instances) {\r\n const oldComp = normalizeClassComponent(instance.type);\r\n if (!hmrDirtyComponents.has(oldComp)) {\r\n // 1. Update existing comp definition to match new one\r\n if (oldComp !== record.initialDef) {\r\n updateComponentDef(oldComp, newComp);\r\n }\r\n // 2. mark definition dirty. This forces the renderer to replace the\r\n // component on patch.\r\n hmrDirtyComponents.add(oldComp);\r\n }\r\n // 3. invalidate options resolution cache\r\n instance.appContext.optionsCache.delete(instance.type);\r\n // 4. actually update\r\n if (instance.ceReload) {\r\n // custom element\r\n hmrDirtyComponents.add(oldComp);\r\n instance.ceReload(newComp.styles);\r\n hmrDirtyComponents.delete(oldComp);\r\n }\r\n else if (instance.parent) {\r\n // 4. Force the parent instance to re-render. This will cause all updated\r\n // components to be unmounted and re-mounted. Queue the update so that we\r\n // don't end up forcing the same parent to re-render multiple times.\r\n queueJob(instance.parent.update);\r\n // instance is the inner component of an async custom element\r\n // invoke to reset styles\r\n if (instance.parent.type.__asyncLoader &&\r\n instance.parent.ceReload) {\r\n instance.parent.ceReload(newComp.styles);\r\n }\r\n }\r\n else if (instance.appContext.reload) {\r\n // root instance mounted via createApp() has a reload method\r\n instance.appContext.reload();\r\n }\r\n else if (typeof window !== 'undefined') {\r\n // root instance inside tree created via raw render(). Force reload.\r\n window.location.reload();\r\n }\r\n else {\r\n console.warn('[HMR] Root or manually mounted instance modified. Full reload required.');\r\n }\r\n }\r\n // 5. make sure to cleanup dirty hmr components after update\r\n queuePostFlushCb(() => {\r\n for (const instance of instances) {\r\n hmrDirtyComponents.delete(normalizeClassComponent(instance.type));\r\n }\r\n });\r\n}\r\nfunction updateComponentDef(oldComp, newComp) {\r\n extend(oldComp, newComp);\r\n for (const key in oldComp) {\r\n if (key !== '__file' && !(key in newComp)) {\r\n delete oldComp[key];\r\n }\r\n }\r\n}\r\nfunction tryWrap(fn) {\r\n return (id, arg) => {\r\n try {\r\n return fn(id, arg);\r\n }\r\n catch (e) {\r\n console.error(e);\r\n console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` +\r\n `Full reload required.`);\r\n }\r\n };\r\n}\n\nlet devtools;\r\nlet buffer = [];\r\nlet devtoolsNotInstalled = false;\r\nfunction emit(event, ...args) {\r\n if (devtools) {\r\n devtools.emit(event, ...args);\r\n }\r\n else if (!devtoolsNotInstalled) {\r\n buffer.push({ event, args });\r\n }\r\n}\r\nfunction setDevtoolsHook(hook, target) {\r\n var _a, _b;\r\n devtools = hook;\r\n if (devtools) {\r\n devtools.enabled = true;\r\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\r\n buffer = [];\r\n }\r\n else if (\r\n // handle late devtools injection - only do this if we are in an actual\r\n // browser environment to avoid the timer handle stalling test runner exit\r\n // (#4815)\r\n // eslint-disable-next-line no-restricted-globals\r\n typeof window !== 'undefined' &&\r\n // some envs mock window but not fully\r\n window.HTMLElement &&\r\n // also exclude jsdom\r\n !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {\r\n const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =\r\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);\r\n replay.push((newHook) => {\r\n setDevtoolsHook(newHook, target);\r\n });\r\n // clear buffer after 3s - the user probably doesn't have devtools installed\r\n // at all, and keeping the buffer will cause memory leaks (#4738)\r\n setTimeout(() => {\r\n if (!devtools) {\r\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\r\n devtoolsNotInstalled = true;\r\n buffer = [];\r\n }\r\n }, 3000);\r\n }\r\n else {\r\n // non-browser env, assume not installed\r\n devtoolsNotInstalled = true;\r\n buffer = [];\r\n }\r\n}\r\nfunction devtoolsInitApp(app, version) {\r\n emit(\"app:init\" /* APP_INIT */, app, version, {\r\n Fragment,\r\n Text,\r\n Comment,\r\n Static\r\n });\r\n}\r\nfunction devtoolsUnmountApp(app) {\r\n emit(\"app:unmount\" /* APP_UNMOUNT */, app);\r\n}\r\nconst devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook(\"component:added\" /* COMPONENT_ADDED */);\r\nconst devtoolsComponentUpdated = \r\n/*#__PURE__*/ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\r\nconst devtoolsComponentRemoved = \r\n/*#__PURE__*/ createDevtoolsComponentHook(\"component:removed\" /* COMPONENT_REMOVED */);\r\nfunction createDevtoolsComponentHook(hook) {\r\n return (component) => {\r\n emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);\r\n };\r\n}\r\nconst devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:start\" /* PERFORMANCE_START */);\r\nconst devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\r\nfunction createDevtoolsPerformanceHook(hook) {\r\n return (component, type, time) => {\r\n emit(hook, component.appContext.app, component.uid, component, type, time);\r\n };\r\n}\r\nfunction devtoolsComponentEmit(component, event, params) {\r\n emit(\"component:emit\" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);\r\n}\n\nfunction emit$1(instance, event, ...rawArgs) {\r\n const props = instance.vnode.props || EMPTY_OBJ;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const { emitsOptions, propsOptions: [propsOptions] } = instance;\r\n if (emitsOptions) {\r\n if (!(event in emitsOptions) &&\r\n !(false )) {\r\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\r\n warn(`Component emitted event \"${event}\" but it is neither declared in ` +\r\n `the emits option nor as an \"${toHandlerKey(event)}\" prop.`);\r\n }\r\n }\r\n else {\r\n const validator = emitsOptions[event];\r\n if (isFunction(validator)) {\r\n const isValid = validator(...rawArgs);\r\n if (!isValid) {\r\n warn(`Invalid event arguments: event validation failed for event \"${event}\".`);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let args = rawArgs;\r\n const isModelListener = event.startsWith('update:');\r\n // for v-model update:xxx events, apply modifiers on args\r\n const modelArg = isModelListener && event.slice(7);\r\n if (modelArg && modelArg in props) {\r\n const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`;\r\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\r\n if (trim) {\r\n args = rawArgs.map(a => a.trim());\r\n }\r\n else if (number) {\r\n args = rawArgs.map(toNumber);\r\n }\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentEmit(instance, event, args);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const lowerCaseEvent = event.toLowerCase();\r\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\r\n warn(`Event \"${lowerCaseEvent}\" is emitted in component ` +\r\n `${formatComponentName(instance, instance.type)} but the handler is registered for \"${event}\". ` +\r\n `Note that HTML attributes are case-insensitive and you cannot use ` +\r\n `v-on to listen to camelCase events when using in-DOM templates. ` +\r\n `You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`);\r\n }\r\n }\r\n let handlerName;\r\n let handler = props[(handlerName = toHandlerKey(event))] ||\r\n // also try camelCase event handler (#2249)\r\n props[(handlerName = toHandlerKey(camelize(event)))];\r\n // for v-model update:xxx events, also trigger kebab-case equivalent\r\n // for props passed via kebab-case\r\n if (!handler && isModelListener) {\r\n handler = props[(handlerName = toHandlerKey(hyphenate(event)))];\r\n }\r\n if (handler) {\r\n callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);\r\n }\r\n const onceHandler = props[handlerName + `Once`];\r\n if (onceHandler) {\r\n if (!instance.emitted) {\r\n instance.emitted = {};\r\n }\r\n else if (instance.emitted[handlerName]) {\r\n return;\r\n }\r\n instance.emitted[handlerName] = true;\r\n callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);\r\n }\r\n}\r\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.emitsCache;\r\n const cached = cache.get(comp);\r\n if (cached !== undefined) {\r\n return cached;\r\n }\r\n const raw = comp.emits;\r\n let normalized = {};\r\n // apply mixin/extends props\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\r\n const extendEmits = (raw) => {\r\n const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true);\r\n if (normalizedFromExtend) {\r\n hasExtends = true;\r\n extend(normalized, normalizedFromExtend);\r\n }\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendEmits);\r\n }\r\n if (comp.extends) {\r\n extendEmits(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendEmits);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n cache.set(comp, null);\r\n return null;\r\n }\r\n if (isArray(raw)) {\r\n raw.forEach(key => (normalized[key] = null));\r\n }\r\n else {\r\n extend(normalized, raw);\r\n }\r\n cache.set(comp, normalized);\r\n return normalized;\r\n}\r\n// Check if an incoming prop key is a declared emit event listener.\r\n// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are\r\n// both considered matched listeners.\r\nfunction isEmitListener(options, key) {\r\n if (!options || !isOn(key)) {\r\n return false;\r\n }\r\n key = key.slice(2).replace(/Once$/, '');\r\n return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) ||\r\n hasOwn(options, hyphenate(key)) ||\r\n hasOwn(options, key));\r\n}\n\n/**\r\n * mark the current rendering instance for asset resolution (e.g.\r\n * resolveComponent, resolveDirective) during render\r\n */\r\nlet currentRenderingInstance = null;\r\nlet currentScopeId = null;\r\n/**\r\n * Note: rendering calls maybe nested. The function returns the parent rendering\r\n * instance if present, which should be restored after the render is done:\r\n *\r\n * ```js\r\n * const prev = setCurrentRenderingInstance(i)\r\n * // ...render\r\n * setCurrentRenderingInstance(prev)\r\n * ```\r\n */\r\nfunction setCurrentRenderingInstance(instance) {\r\n const prev = currentRenderingInstance;\r\n currentRenderingInstance = instance;\r\n currentScopeId = (instance && instance.type.__scopeId) || null;\r\n return prev;\r\n}\r\n/**\r\n * Set scope id when creating hoisted vnodes.\r\n * @private compiler helper\r\n */\r\nfunction pushScopeId(id) {\r\n currentScopeId = id;\r\n}\r\n/**\r\n * Technically we no longer need this after 3.0.8 but we need to keep the same\r\n * API for backwards compat w/ code generated by compilers.\r\n * @private\r\n */\r\nfunction popScopeId() {\r\n currentScopeId = null;\r\n}\r\n/**\r\n * Only for backwards compat\r\n * @private\r\n */\r\nconst withScopeId = (_id) => withCtx;\r\n/**\r\n * Wrap a slot function to memoize current rendering instance\r\n * @private compiler helper\r\n */\r\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only\r\n) {\r\n if (!ctx)\r\n return fn;\r\n // already normalized\r\n if (fn._n) {\r\n return fn;\r\n }\r\n const renderFnWithContext = (...args) => {\r\n // If a user calls a compiled slot inside a template expression (#1745), it\r\n // can mess up block tracking, so by default we disable block tracking and\r\n // force bail out when invoking a compiled slot (indicated by the ._d flag).\r\n // This isn't necessary if rendering a compiled ``, so we flip the\r\n // ._d flag off when invoking the wrapped fn inside `renderSlot`.\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(-1);\r\n }\r\n const prevInstance = setCurrentRenderingInstance(ctx);\r\n const res = fn(...args);\r\n setCurrentRenderingInstance(prevInstance);\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(1);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentUpdated(ctx);\r\n }\r\n return res;\r\n };\r\n // mark normalized to avoid duplicated wrapping\r\n renderFnWithContext._n = true;\r\n // mark this as compiled by default\r\n // this is used in vnode.ts -> normalizeChildren() to set the slot\r\n // rendering flag.\r\n renderFnWithContext._c = true;\r\n // disable block tracking by default\r\n renderFnWithContext._d = true;\r\n return renderFnWithContext;\r\n}\n\n/**\r\n * dev only flag to track whether $attrs was used during render.\r\n * If $attrs was used during render then the warning for failed attrs\r\n * fallthrough can be suppressed.\r\n */\r\nlet accessedAttrs = false;\r\nfunction markAttrsAccessed() {\r\n accessedAttrs = true;\r\n}\r\nfunction renderComponentRoot(instance) {\r\n const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;\r\n let result;\r\n let fallthroughAttrs;\r\n const prev = setCurrentRenderingInstance(instance);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n accessedAttrs = false;\r\n }\r\n try {\r\n if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {\r\n // withProxy is a proxy with a different `has` trap only for\r\n // runtime-compiled render functions using `with` block.\r\n const proxyToUse = withProxy || proxy;\r\n result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx));\r\n fallthroughAttrs = attrs;\r\n }\r\n else {\r\n // functional\r\n const render = Component;\r\n // in dev, mark attrs accessed if optional props (attrs === props)\r\n if ((process.env.NODE_ENV !== 'production') && attrs === props) {\r\n markAttrsAccessed();\r\n }\r\n result = normalizeVNode(render.length > 1\r\n ? render(props, (process.env.NODE_ENV !== 'production')\r\n ? {\r\n get attrs() {\r\n markAttrsAccessed();\r\n return attrs;\r\n },\r\n slots,\r\n emit\r\n }\r\n : { attrs, slots, emit })\r\n : render(props, null /* we know it doesn't need it */));\r\n fallthroughAttrs = Component.props\r\n ? attrs\r\n : getFunctionalFallthrough(attrs);\r\n }\r\n }\r\n catch (err) {\r\n blockStack.length = 0;\r\n handleError(err, instance, 1 /* RENDER_FUNCTION */);\r\n result = createVNode(Comment);\r\n }\r\n // attr merging\r\n // in dev mode, comments are preserved, and it's possible for a template\r\n // to have comments along side the root element which makes it a fragment\r\n let root = result;\r\n let setRoot = undefined;\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n result.patchFlag > 0 &&\r\n result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {\r\n [root, setRoot] = getChildRoot(result);\r\n }\r\n if (fallthroughAttrs && inheritAttrs !== false) {\r\n const keys = Object.keys(fallthroughAttrs);\r\n const { shapeFlag } = root;\r\n if (keys.length) {\r\n if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {\r\n if (propsOptions && keys.some(isModelListener)) {\r\n // If a v-model listener (onUpdate:xxx) has a corresponding declared\r\n // prop, it indicates this component expects to handle v-model and\r\n // it should not fallthrough.\r\n // related: #1543, #1643, #1989\r\n fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);\r\n }\r\n root = cloneVNode(root, fallthroughAttrs);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production') && !accessedAttrs && root.type !== Comment) {\r\n const allAttrs = Object.keys(attrs);\r\n const eventAttrs = [];\r\n const extraAttrs = [];\r\n for (let i = 0, l = allAttrs.length; i < l; i++) {\r\n const key = allAttrs[i];\r\n if (isOn(key)) {\r\n // ignore v-model handlers when they fail to fallthrough\r\n if (!isModelListener(key)) {\r\n // remove `on`, lowercase first letter to reflect event casing\r\n // accurately\r\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\r\n }\r\n }\r\n else {\r\n extraAttrs.push(key);\r\n }\r\n }\r\n if (extraAttrs.length) {\r\n warn(`Extraneous non-props attributes (` +\r\n `${extraAttrs.join(', ')}) ` +\r\n `were passed to component but could not be automatically inherited ` +\r\n `because component renders fragment or text root nodes.`);\r\n }\r\n if (eventAttrs.length) {\r\n warn(`Extraneous non-emits event listeners (` +\r\n `${eventAttrs.join(', ')}) ` +\r\n `were passed to component but could not be automatically inherited ` +\r\n `because component renders fragment or text root nodes. ` +\r\n `If the listener is intended to be a component custom event listener only, ` +\r\n `declare it using the \"emits\" option.`);\r\n }\r\n }\r\n }\r\n }\r\n // inherit directives\r\n if (vnode.dirs) {\r\n if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {\r\n warn(`Runtime directive used on component with non-element root node. ` +\r\n `The directives will not function as intended.`);\r\n }\r\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\r\n }\r\n // inherit transition data\r\n if (vnode.transition) {\r\n if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {\r\n warn(`Component inside renders non-element root node ` +\r\n `that cannot be animated.`);\r\n }\r\n root.transition = vnode.transition;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && setRoot) {\r\n setRoot(root);\r\n }\r\n else {\r\n result = root;\r\n }\r\n setCurrentRenderingInstance(prev);\r\n return result;\r\n}\r\n/**\r\n * dev only\r\n * In dev mode, template root level comments are rendered, which turns the\r\n * template into a fragment root, but we need to locate the single element\r\n * root for attrs and scope id processing.\r\n */\r\nconst getChildRoot = (vnode) => {\r\n const rawChildren = vnode.children;\r\n const dynamicChildren = vnode.dynamicChildren;\r\n const childRoot = filterSingleRoot(rawChildren);\r\n if (!childRoot) {\r\n return [vnode, undefined];\r\n }\r\n const index = rawChildren.indexOf(childRoot);\r\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\r\n const setRoot = (updatedRoot) => {\r\n rawChildren[index] = updatedRoot;\r\n if (dynamicChildren) {\r\n if (dynamicIndex > -1) {\r\n dynamicChildren[dynamicIndex] = updatedRoot;\r\n }\r\n else if (updatedRoot.patchFlag > 0) {\r\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\r\n }\r\n }\r\n };\r\n return [normalizeVNode(childRoot), setRoot];\r\n};\r\nfunction filterSingleRoot(children) {\r\n let singleRoot;\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n if (isVNode(child)) {\r\n // ignore user comment\r\n if (child.type !== Comment || child.children === 'v-if') {\r\n if (singleRoot) {\r\n // has more than 1 non-comment child, return now\r\n return;\r\n }\r\n else {\r\n singleRoot = child;\r\n }\r\n }\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n return singleRoot;\r\n}\r\nconst getFunctionalFallthrough = (attrs) => {\r\n let res;\r\n for (const key in attrs) {\r\n if (key === 'class' || key === 'style' || isOn(key)) {\r\n (res || (res = {}))[key] = attrs[key];\r\n }\r\n }\r\n return res;\r\n};\r\nconst filterModelListeners = (attrs, props) => {\r\n const res = {};\r\n for (const key in attrs) {\r\n if (!isModelListener(key) || !(key.slice(9) in props)) {\r\n res[key] = attrs[key];\r\n }\r\n }\r\n return res;\r\n};\r\nconst isElementRoot = (vnode) => {\r\n return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||\r\n vnode.type === Comment // potential v-if branch switch\r\n );\r\n};\r\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\r\n const { props: prevProps, children: prevChildren, component } = prevVNode;\r\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\r\n const emits = component.emitsOptions;\r\n // Parent component's render function was hot-updated. Since this may have\r\n // caused the child component's slots content to have changed, we need to\r\n // force the child to update as well.\r\n if ((process.env.NODE_ENV !== 'production') && (prevChildren || nextChildren) && isHmrUpdating) {\r\n return true;\r\n }\r\n // force child update for runtime directive or transition on component vnode.\r\n if (nextVNode.dirs || nextVNode.transition) {\r\n return true;\r\n }\r\n if (optimized && patchFlag >= 0) {\r\n if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {\r\n // slot content that references values that might have changed,\r\n // e.g. in a v-for\r\n return true;\r\n }\r\n if (patchFlag & 16 /* FULL_PROPS */) {\r\n if (!prevProps) {\r\n return !!nextProps;\r\n }\r\n // presence of this flag indicates props are always non-null\r\n return hasPropsChanged(prevProps, nextProps, emits);\r\n }\r\n else if (patchFlag & 8 /* PROPS */) {\r\n const dynamicProps = nextVNode.dynamicProps;\r\n for (let i = 0; i < dynamicProps.length; i++) {\r\n const key = dynamicProps[i];\r\n if (nextProps[key] !== prevProps[key] &&\r\n !isEmitListener(emits, key)) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // this path is only taken by manually written render functions\r\n // so presence of any children leads to a forced update\r\n if (prevChildren || nextChildren) {\r\n if (!nextChildren || !nextChildren.$stable) {\r\n return true;\r\n }\r\n }\r\n if (prevProps === nextProps) {\r\n return false;\r\n }\r\n if (!prevProps) {\r\n return !!nextProps;\r\n }\r\n if (!nextProps) {\r\n return true;\r\n }\r\n return hasPropsChanged(prevProps, nextProps, emits);\r\n }\r\n return false;\r\n}\r\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\r\n const nextKeys = Object.keys(nextProps);\r\n if (nextKeys.length !== Object.keys(prevProps).length) {\r\n return true;\r\n }\r\n for (let i = 0; i < nextKeys.length; i++) {\r\n const key = nextKeys[i];\r\n if (nextProps[key] !== prevProps[key] &&\r\n !isEmitListener(emitsOptions, key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction updateHOCHostEl({ vnode, parent }, el // HostNode\r\n) {\r\n while (parent && parent.subTree === vnode) {\r\n (vnode = parent.vnode).el = el;\r\n parent = parent.parent;\r\n }\r\n}\n\nconst isSuspense = (type) => type.__isSuspense;\r\n// Suspense exposes a component-like API, and is treated like a component\r\n// in the compiler, but internally it's a special built-in type that hooks\r\n// directly into the renderer.\r\nconst SuspenseImpl = {\r\n name: 'Suspense',\r\n // In order to make Suspense tree-shakable, we need to avoid importing it\r\n // directly in the renderer. The renderer checks for the __isSuspense flag\r\n // on a vnode's type and calls the `process` method, passing in renderer\r\n // internals.\r\n __isSuspense: true,\r\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, \r\n // platform-specific impl passed from renderer\r\n rendererInternals) {\r\n if (n1 == null) {\r\n mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals);\r\n }\r\n else {\r\n patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals);\r\n }\r\n },\r\n hydrate: hydrateSuspense,\r\n create: createSuspenseBoundary,\r\n normalize: normalizeSuspenseChildren\r\n};\r\n// Force-casted public typing for h and TSX props inference\r\nconst Suspense = (SuspenseImpl );\r\nfunction triggerEvent(vnode, name) {\r\n const eventListener = vnode.props && vnode.props[name];\r\n if (isFunction(eventListener)) {\r\n eventListener();\r\n }\r\n}\r\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\r\n const { p: patch, o: { createElement } } = rendererInternals;\r\n const hiddenContainer = createElement('div');\r\n const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals));\r\n // start mounting the content subtree in an off-dom container\r\n patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds);\r\n // now check if we have encountered any async deps\r\n if (suspense.deps > 0) {\r\n // has async\r\n // invoke @fallback event\r\n triggerEvent(vnode, 'onPending');\r\n triggerEvent(vnode, 'onFallback');\r\n // mount the fallback tree\r\n patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds);\r\n setActiveBranch(suspense, vnode.ssFallback);\r\n }\r\n else {\r\n // Suspense has no async deps. Just resolve.\r\n suspense.resolve();\r\n }\r\n}\r\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\r\n const suspense = (n2.suspense = n1.suspense);\r\n suspense.vnode = n2;\r\n n2.el = n1.el;\r\n const newBranch = n2.ssContent;\r\n const newFallback = n2.ssFallback;\r\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\r\n if (pendingBranch) {\r\n suspense.pendingBranch = newBranch;\r\n if (isSameVNodeType(newBranch, pendingBranch)) {\r\n // same root type but content may have changed.\r\n patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n else if (isInFallback) {\r\n patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newFallback);\r\n }\r\n }\r\n else {\r\n // toggled before pending tree is resolved\r\n suspense.pendingId++;\r\n if (isHydrating) {\r\n // if toggled before hydration is finished, the current DOM tree is\r\n // no longer valid. set it as the active branch so it will be unmounted\r\n // when resolved\r\n suspense.isHydrating = false;\r\n suspense.activeBranch = pendingBranch;\r\n }\r\n else {\r\n unmount(pendingBranch, parentComponent, suspense);\r\n }\r\n // increment pending ID. this is used to invalidate async callbacks\r\n // reset suspense state\r\n suspense.deps = 0;\r\n // discard effects from pending branch\r\n suspense.effects.length = 0;\r\n // discard previous container\r\n suspense.hiddenContainer = createElement('div');\r\n if (isInFallback) {\r\n // already in fallback state\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n else {\r\n patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newFallback);\r\n }\r\n }\r\n else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\r\n // toggled \"back\" to current active branch\r\n patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n // force resolve\r\n suspense.resolve(true);\r\n }\r\n else {\r\n // switched to a 3rd branch\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\r\n // root did not change, just normal patch\r\n patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newBranch);\r\n }\r\n else {\r\n // root node toggled\r\n // invoke @pending event\r\n triggerEvent(n2, 'onPending');\r\n // mount pending branch in off-dom container\r\n suspense.pendingBranch = newBranch;\r\n suspense.pendingId++;\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n // incoming branch has no async deps, resolve now.\r\n suspense.resolve();\r\n }\r\n else {\r\n const { timeout, pendingId } = suspense;\r\n if (timeout > 0) {\r\n setTimeout(() => {\r\n if (suspense.pendingId === pendingId) {\r\n suspense.fallback(newFallback);\r\n }\r\n }, timeout);\r\n }\r\n else if (timeout === 0) {\r\n suspense.fallback(newFallback);\r\n }\r\n }\r\n }\r\n }\r\n}\r\nlet hasWarned = false;\r\nfunction createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\r\n /* istanbul ignore if */\r\n if ((process.env.NODE_ENV !== 'production') && !false && !hasWarned) {\r\n hasWarned = true;\r\n // @ts-ignore `console.info` cannot be null error\r\n console[console.info ? 'info' : 'log'](` is an experimental feature and its API will likely change.`);\r\n }\r\n const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;\r\n const timeout = toNumber(vnode.props && vnode.props.timeout);\r\n const suspense = {\r\n vnode,\r\n parent,\r\n parentComponent,\r\n isSVG,\r\n container,\r\n hiddenContainer,\r\n anchor,\r\n deps: 0,\r\n pendingId: 0,\r\n timeout: typeof timeout === 'number' ? timeout : -1,\r\n activeBranch: null,\r\n pendingBranch: null,\r\n isInFallback: true,\r\n isHydrating,\r\n isUnmounted: false,\r\n effects: [],\r\n resolve(resume = false) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (!resume && !suspense.pendingBranch) {\r\n throw new Error(`suspense.resolve() is called without a pending branch.`);\r\n }\r\n if (suspense.isUnmounted) {\r\n throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);\r\n }\r\n }\r\n const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense;\r\n if (suspense.isHydrating) {\r\n suspense.isHydrating = false;\r\n }\r\n else if (!resume) {\r\n const delayEnter = activeBranch &&\r\n pendingBranch.transition &&\r\n pendingBranch.transition.mode === 'out-in';\r\n if (delayEnter) {\r\n activeBranch.transition.afterLeave = () => {\r\n if (pendingId === suspense.pendingId) {\r\n move(pendingBranch, container, anchor, 0 /* ENTER */);\r\n }\r\n };\r\n }\r\n // this is initial anchor on mount\r\n let { anchor } = suspense;\r\n // unmount current active tree\r\n if (activeBranch) {\r\n // if the fallback tree was mounted, it may have been moved\r\n // as part of a parent suspense. get the latest anchor for insertion\r\n anchor = next(activeBranch);\r\n unmount(activeBranch, parentComponent, suspense, true);\r\n }\r\n if (!delayEnter) {\r\n // move content from off-dom container to actual container\r\n move(pendingBranch, container, anchor, 0 /* ENTER */);\r\n }\r\n }\r\n setActiveBranch(suspense, pendingBranch);\r\n suspense.pendingBranch = null;\r\n suspense.isInFallback = false;\r\n // flush buffered effects\r\n // check if there is a pending parent suspense\r\n let parent = suspense.parent;\r\n let hasUnresolvedAncestor = false;\r\n while (parent) {\r\n if (parent.pendingBranch) {\r\n // found a pending parent suspense, merge buffered post jobs\r\n // into that parent\r\n parent.effects.push(...effects);\r\n hasUnresolvedAncestor = true;\r\n break;\r\n }\r\n parent = parent.parent;\r\n }\r\n // no pending parent suspense, flush all jobs\r\n if (!hasUnresolvedAncestor) {\r\n queuePostFlushCb(effects);\r\n }\r\n suspense.effects = [];\r\n // invoke @resolve event\r\n triggerEvent(vnode, 'onResolve');\r\n },\r\n fallback(fallbackVNode) {\r\n if (!suspense.pendingBranch) {\r\n return;\r\n }\r\n const { vnode, activeBranch, parentComponent, container, isSVG } = suspense;\r\n // invoke @fallback event\r\n triggerEvent(vnode, 'onFallback');\r\n const anchor = next(activeBranch);\r\n const mountFallback = () => {\r\n if (!suspense.isInFallback) {\r\n return;\r\n }\r\n // mount the fallback tree\r\n patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, fallbackVNode);\r\n };\r\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in';\r\n if (delayEnter) {\r\n activeBranch.transition.afterLeave = mountFallback;\r\n }\r\n suspense.isInFallback = true;\r\n // unmount current active branch\r\n unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now\r\n true // shouldRemove\r\n );\r\n if (!delayEnter) {\r\n mountFallback();\r\n }\r\n },\r\n move(container, anchor, type) {\r\n suspense.activeBranch &&\r\n move(suspense.activeBranch, container, anchor, type);\r\n suspense.container = container;\r\n },\r\n next() {\r\n return suspense.activeBranch && next(suspense.activeBranch);\r\n },\r\n registerDep(instance, setupRenderEffect) {\r\n const isInPendingSuspense = !!suspense.pendingBranch;\r\n if (isInPendingSuspense) {\r\n suspense.deps++;\r\n }\r\n const hydratedEl = instance.vnode.el;\r\n instance\r\n .asyncDep.catch(err => {\r\n handleError(err, instance, 0 /* SETUP_FUNCTION */);\r\n })\r\n .then(asyncSetupResult => {\r\n // retry when the setup() promise resolves.\r\n // component may have been unmounted before resolve.\r\n if (instance.isUnmounted ||\r\n suspense.isUnmounted ||\r\n suspense.pendingId !== instance.suspenseId) {\r\n return;\r\n }\r\n // retry from this component\r\n instance.asyncResolved = true;\r\n const { vnode } = instance;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n pushWarningContext(vnode);\r\n }\r\n handleSetupResult(instance, asyncSetupResult, false);\r\n if (hydratedEl) {\r\n // vnode may have been replaced if an update happened before the\r\n // async dep is resolved.\r\n vnode.el = hydratedEl;\r\n }\r\n const placeholder = !hydratedEl && instance.subTree.el;\r\n setupRenderEffect(instance, vnode, \r\n // component may have been moved before resolve.\r\n // if this is not a hydration, instance.subTree will be the comment\r\n // placeholder.\r\n parentNode(hydratedEl || instance.subTree.el), \r\n // anchor will not be used if this is hydration, so only need to\r\n // consider the comment placeholder case.\r\n hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized);\r\n if (placeholder) {\r\n remove(placeholder);\r\n }\r\n updateHOCHostEl(instance, vnode.el);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n popWarningContext();\r\n }\r\n // only decrease deps count if suspense is not already resolved\r\n if (isInPendingSuspense && --suspense.deps === 0) {\r\n suspense.resolve();\r\n }\r\n });\r\n },\r\n unmount(parentSuspense, doRemove) {\r\n suspense.isUnmounted = true;\r\n if (suspense.activeBranch) {\r\n unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);\r\n }\r\n if (suspense.pendingBranch) {\r\n unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove);\r\n }\r\n }\r\n };\r\n return suspense;\r\n}\r\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\r\n /* eslint-disable no-restricted-globals */\r\n const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */));\r\n // there are two possible scenarios for server-rendered suspense:\r\n // - success: ssr content should be fully resolved\r\n // - failure: ssr content should be the fallback branch.\r\n // however, on the client we don't really know if it has failed or not\r\n // attempt to hydrate the DOM assuming it has succeeded, but we still\r\n // need to construct a suspense boundary first\r\n const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized);\r\n if (suspense.deps === 0) {\r\n suspense.resolve();\r\n }\r\n return result;\r\n /* eslint-enable no-restricted-globals */\r\n}\r\nfunction normalizeSuspenseChildren(vnode) {\r\n const { shapeFlag, children } = vnode;\r\n const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;\r\n vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);\r\n vnode.ssFallback = isSlotChildren\r\n ? normalizeSuspenseSlot(children.fallback)\r\n : createVNode(Comment);\r\n}\r\nfunction normalizeSuspenseSlot(s) {\r\n let block;\r\n if (isFunction(s)) {\r\n const trackBlock = isBlockTreeEnabled && s._c;\r\n if (trackBlock) {\r\n // disableTracking: false\r\n // allow block tracking for compiled slots\r\n // (see ./componentRenderContext.ts)\r\n s._d = false;\r\n openBlock();\r\n }\r\n s = s();\r\n if (trackBlock) {\r\n s._d = true;\r\n block = currentBlock;\r\n closeBlock();\r\n }\r\n }\r\n if (isArray(s)) {\r\n const singleChild = filterSingleRoot(s);\r\n if ((process.env.NODE_ENV !== 'production') && !singleChild) {\r\n warn(` slots expect a single root node.`);\r\n }\r\n s = singleChild;\r\n }\r\n s = normalizeVNode(s);\r\n if (block && !s.dynamicChildren) {\r\n s.dynamicChildren = block.filter(c => c !== s);\r\n }\r\n return s;\r\n}\r\nfunction queueEffectWithSuspense(fn, suspense) {\r\n if (suspense && suspense.pendingBranch) {\r\n if (isArray(fn)) {\r\n suspense.effects.push(...fn);\r\n }\r\n else {\r\n suspense.effects.push(fn);\r\n }\r\n }\r\n else {\r\n queuePostFlushCb(fn);\r\n }\r\n}\r\nfunction setActiveBranch(suspense, branch) {\r\n suspense.activeBranch = branch;\r\n const { vnode, parentComponent } = suspense;\r\n const el = (vnode.el = branch.el);\r\n // in case suspense is the root node of a component,\r\n // recursively update the HOC el\r\n if (parentComponent && parentComponent.subTree === vnode) {\r\n parentComponent.vnode.el = el;\r\n updateHOCHostEl(parentComponent, el);\r\n }\r\n}\n\nfunction provide(key, value) {\r\n if (!currentInstance) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`provide() can only be used inside setup().`);\r\n }\r\n }\r\n else {\r\n let provides = currentInstance.provides;\r\n // by default an instance inherits its parent's provides object\r\n // but when it needs to provide values of its own, it creates its\r\n // own provides object using parent provides object as prototype.\r\n // this way in `inject` we can simply look up injections from direct\r\n // parent and let the prototype chain do the work.\r\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\r\n if (parentProvides === provides) {\r\n provides = currentInstance.provides = Object.create(parentProvides);\r\n }\r\n // TS doesn't allow symbol as index type\r\n provides[key] = value;\r\n }\r\n}\r\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\r\n // fallback to `currentRenderingInstance` so that this can be called in\r\n // a functional component\r\n const instance = currentInstance || currentRenderingInstance;\r\n if (instance) {\r\n // #2400\r\n // to support `app.use` plugins,\r\n // fallback to appContext's `provides` if the instance is at root\r\n const provides = instance.parent == null\r\n ? instance.vnode.appContext && instance.vnode.appContext.provides\r\n : instance.parent.provides;\r\n if (provides && key in provides) {\r\n // TS doesn't allow symbol as index type\r\n return provides[key];\r\n }\r\n else if (arguments.length > 1) {\r\n return treatDefaultAsFactory && isFunction(defaultValue)\r\n ? defaultValue.call(instance.proxy)\r\n : defaultValue;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`injection \"${String(key)}\" not found.`);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`inject() can only be used inside setup() or functional components.`);\r\n }\r\n}\n\n// Simple effect.\r\nfunction watchEffect(effect, options) {\r\n return doWatch(effect, null, options);\r\n}\r\nfunction watchPostEffect(effect, options) {\r\n return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')\r\n ? Object.assign(options || {}, { flush: 'post' })\r\n : { flush: 'post' }));\r\n}\r\nfunction watchSyncEffect(effect, options) {\r\n return doWatch(effect, null, ((process.env.NODE_ENV !== 'production')\r\n ? Object.assign(options || {}, { flush: 'sync' })\r\n : { flush: 'sync' }));\r\n}\r\n// initial value for watchers to trigger on undefined initial values\r\nconst INITIAL_WATCHER_VALUE = {};\r\n// implementation\r\nfunction watch(source, cb, options) {\r\n if ((process.env.NODE_ENV !== 'production') && !isFunction(cb)) {\r\n warn(`\\`watch(fn, options?)\\` signature has been moved to a separate API. ` +\r\n `Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only ` +\r\n `supports \\`watch(source, cb, options?) signature.`);\r\n }\r\n return doWatch(source, cb, options);\r\n}\r\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {\r\n if ((process.env.NODE_ENV !== 'production') && !cb) {\r\n if (immediate !== undefined) {\r\n warn(`watch() \"immediate\" option is only respected when using the ` +\r\n `watch(source, callback, options?) signature.`);\r\n }\r\n if (deep !== undefined) {\r\n warn(`watch() \"deep\" option is only respected when using the ` +\r\n `watch(source, callback, options?) signature.`);\r\n }\r\n }\r\n const warnInvalidSource = (s) => {\r\n warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +\r\n `a reactive object, or an array of these types.`);\r\n };\r\n const instance = currentInstance;\r\n let getter;\r\n let forceTrigger = false;\r\n let isMultiSource = false;\r\n if (isRef(source)) {\r\n getter = () => source.value;\r\n forceTrigger = isShallow$1(source);\r\n }\r\n else if (isReactive(source)) {\r\n getter = () => source;\r\n deep = true;\r\n }\r\n else if (isArray(source)) {\r\n isMultiSource = true;\r\n forceTrigger = source.some(isReactive);\r\n getter = () => source.map(s => {\r\n if (isRef(s)) {\r\n return s.value;\r\n }\r\n else if (isReactive(s)) {\r\n return traverse(s);\r\n }\r\n else if (isFunction(s)) {\r\n return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);\r\n }\r\n else {\r\n (process.env.NODE_ENV !== 'production') && warnInvalidSource(s);\r\n }\r\n });\r\n }\r\n else if (isFunction(source)) {\r\n if (cb) {\r\n // getter with cb\r\n getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);\r\n }\r\n else {\r\n // no cb -> simple effect\r\n getter = () => {\r\n if (instance && instance.isUnmounted) {\r\n return;\r\n }\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]);\r\n };\r\n }\r\n }\r\n else {\r\n getter = NOOP;\r\n (process.env.NODE_ENV !== 'production') && warnInvalidSource(source);\r\n }\r\n if (cb && deep) {\r\n const baseGetter = getter;\r\n getter = () => traverse(baseGetter());\r\n }\r\n let cleanup;\r\n let onCleanup = (fn) => {\r\n cleanup = effect.onStop = () => {\r\n callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);\r\n };\r\n };\r\n // in SSR there is no need to setup an actual effect, and it should be noop\r\n // unless it's eager\r\n if (isInSSRComponentSetup) {\r\n // we will also not call the invalidate callback (+ runner is not set up)\r\n onCleanup = NOOP;\r\n if (!cb) {\r\n getter();\r\n }\r\n else if (immediate) {\r\n callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [\r\n getter(),\r\n isMultiSource ? [] : undefined,\r\n onCleanup\r\n ]);\r\n }\r\n return NOOP;\r\n }\r\n let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\r\n const job = () => {\r\n if (!effect.active) {\r\n return;\r\n }\r\n if (cb) {\r\n // watch(source, cb)\r\n const newValue = effect.run();\r\n if (deep ||\r\n forceTrigger ||\r\n (isMultiSource\r\n ? newValue.some((v, i) => hasChanged(v, oldValue[i]))\r\n : hasChanged(newValue, oldValue)) ||\r\n (false )) {\r\n // cleanup before running cb again\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [\r\n newValue,\r\n // pass undefined as the old value when it's changed for the first time\r\n oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\r\n onCleanup\r\n ]);\r\n oldValue = newValue;\r\n }\r\n }\r\n else {\r\n // watchEffect\r\n effect.run();\r\n }\r\n };\r\n // important: mark the job as a watcher callback so that scheduler knows\r\n // it is allowed to self-trigger (#1727)\r\n job.allowRecurse = !!cb;\r\n let scheduler;\r\n if (flush === 'sync') {\r\n scheduler = job; // the scheduler function gets called directly\r\n }\r\n else if (flush === 'post') {\r\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\r\n }\r\n else {\r\n // default: 'pre'\r\n scheduler = () => {\r\n if (!instance || instance.isMounted) {\r\n queuePreFlushCb(job);\r\n }\r\n else {\r\n // with 'pre' option, the first call must happen before\r\n // the component is mounted so it is called synchronously.\r\n job();\r\n }\r\n };\r\n }\r\n const effect = new ReactiveEffect(getter, scheduler);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n effect.onTrack = onTrack;\r\n effect.onTrigger = onTrigger;\r\n }\r\n // initial run\r\n if (cb) {\r\n if (immediate) {\r\n job();\r\n }\r\n else {\r\n oldValue = effect.run();\r\n }\r\n }\r\n else if (flush === 'post') {\r\n queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense);\r\n }\r\n else {\r\n effect.run();\r\n }\r\n return () => {\r\n effect.stop();\r\n if (instance && instance.scope) {\r\n remove(instance.scope.effects, effect);\r\n }\r\n };\r\n}\r\n// this.$watch\r\nfunction instanceWatch(source, value, options) {\r\n const publicThis = this.proxy;\r\n const getter = isString(source)\r\n ? source.includes('.')\r\n ? createPathGetter(publicThis, source)\r\n : () => publicThis[source]\r\n : source.bind(publicThis, publicThis);\r\n let cb;\r\n if (isFunction(value)) {\r\n cb = value;\r\n }\r\n else {\r\n cb = value.handler;\r\n options = value;\r\n }\r\n const cur = currentInstance;\r\n setCurrentInstance(this);\r\n const res = doWatch(getter, cb.bind(publicThis), options);\r\n if (cur) {\r\n setCurrentInstance(cur);\r\n }\r\n else {\r\n unsetCurrentInstance();\r\n }\r\n return res;\r\n}\r\nfunction createPathGetter(ctx, path) {\r\n const segments = path.split('.');\r\n return () => {\r\n let cur = ctx;\r\n for (let i = 0; i < segments.length && cur; i++) {\r\n cur = cur[segments[i]];\r\n }\r\n return cur;\r\n };\r\n}\r\nfunction traverse(value, seen) {\r\n if (!isObject(value) || value[\"__v_skip\" /* SKIP */]) {\r\n return value;\r\n }\r\n seen = seen || new Set();\r\n if (seen.has(value)) {\r\n return value;\r\n }\r\n seen.add(value);\r\n if (isRef(value)) {\r\n traverse(value.value, seen);\r\n }\r\n else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n traverse(value[i], seen);\r\n }\r\n }\r\n else if (isSet(value) || isMap(value)) {\r\n value.forEach((v) => {\r\n traverse(v, seen);\r\n });\r\n }\r\n else if (isPlainObject(value)) {\r\n for (const key in value) {\r\n traverse(value[key], seen);\r\n }\r\n }\r\n return value;\r\n}\n\nfunction useTransitionState() {\r\n const state = {\r\n isMounted: false,\r\n isLeaving: false,\r\n isUnmounting: false,\r\n leavingVNodes: new Map()\r\n };\r\n onMounted(() => {\r\n state.isMounted = true;\r\n });\r\n onBeforeUnmount(() => {\r\n state.isUnmounting = true;\r\n });\r\n return state;\r\n}\r\nconst TransitionHookValidator = [Function, Array];\r\nconst BaseTransitionImpl = {\r\n name: `BaseTransition`,\r\n props: {\r\n mode: String,\r\n appear: Boolean,\r\n persisted: Boolean,\r\n // enter\r\n onBeforeEnter: TransitionHookValidator,\r\n onEnter: TransitionHookValidator,\r\n onAfterEnter: TransitionHookValidator,\r\n onEnterCancelled: TransitionHookValidator,\r\n // leave\r\n onBeforeLeave: TransitionHookValidator,\r\n onLeave: TransitionHookValidator,\r\n onAfterLeave: TransitionHookValidator,\r\n onLeaveCancelled: TransitionHookValidator,\r\n // appear\r\n onBeforeAppear: TransitionHookValidator,\r\n onAppear: TransitionHookValidator,\r\n onAfterAppear: TransitionHookValidator,\r\n onAppearCancelled: TransitionHookValidator\r\n },\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n const state = useTransitionState();\r\n let prevTransitionKey;\r\n return () => {\r\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\r\n if (!children || !children.length) {\r\n return;\r\n }\r\n // warn multiple elements\r\n if ((process.env.NODE_ENV !== 'production') && children.length > 1) {\r\n warn(' can only be used on a single element or component. Use ' +\r\n ' for lists.');\r\n }\r\n // there's no need to track reactivity for these props so use the raw\r\n // props for a bit better perf\r\n const rawProps = toRaw(props);\r\n const { mode } = rawProps;\r\n // check mode\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n mode &&\r\n mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {\r\n warn(`invalid mode: ${mode}`);\r\n }\r\n // at this point children has a guaranteed length of 1.\r\n const child = children[0];\r\n if (state.isLeaving) {\r\n return emptyPlaceholder(child);\r\n }\r\n // in the case of , we need to\r\n // compare the type of the kept-alive children.\r\n const innerChild = getKeepAliveChild(child);\r\n if (!innerChild) {\r\n return emptyPlaceholder(child);\r\n }\r\n const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance);\r\n setTransitionHooks(innerChild, enterHooks);\r\n const oldChild = instance.subTree;\r\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\r\n let transitionKeyChanged = false;\r\n const { getTransitionKey } = innerChild.type;\r\n if (getTransitionKey) {\r\n const key = getTransitionKey();\r\n if (prevTransitionKey === undefined) {\r\n prevTransitionKey = key;\r\n }\r\n else if (key !== prevTransitionKey) {\r\n prevTransitionKey = key;\r\n transitionKeyChanged = true;\r\n }\r\n }\r\n // handle mode\r\n if (oldInnerChild &&\r\n oldInnerChild.type !== Comment &&\r\n (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\r\n const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);\r\n // update old tree's hooks in case of dynamic transition\r\n setTransitionHooks(oldInnerChild, leavingHooks);\r\n // switching between different views\r\n if (mode === 'out-in') {\r\n state.isLeaving = true;\r\n // return placeholder node and queue update when leave finishes\r\n leavingHooks.afterLeave = () => {\r\n state.isLeaving = false;\r\n instance.update();\r\n };\r\n return emptyPlaceholder(child);\r\n }\r\n else if (mode === 'in-out' && innerChild.type !== Comment) {\r\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\r\n const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);\r\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\r\n // early removal callback\r\n el._leaveCb = () => {\r\n earlyRemove();\r\n el._leaveCb = undefined;\r\n delete enterHooks.delayedLeave;\r\n };\r\n enterHooks.delayedLeave = delayedLeave;\r\n };\r\n }\r\n }\r\n return child;\r\n };\r\n }\r\n};\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\nconst BaseTransition = BaseTransitionImpl;\r\nfunction getLeavingNodesForType(state, vnode) {\r\n const { leavingVNodes } = state;\r\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\r\n if (!leavingVNodesCache) {\r\n leavingVNodesCache = Object.create(null);\r\n leavingVNodes.set(vnode.type, leavingVNodesCache);\r\n }\r\n return leavingVNodesCache;\r\n}\r\n// The transition hooks are attached to the vnode as vnode.transition\r\n// and will be called at appropriate timing in the renderer.\r\nfunction resolveTransitionHooks(vnode, props, state, instance) {\r\n const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;\r\n const key = String(vnode.key);\r\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\r\n const callHook = (hook, args) => {\r\n hook &&\r\n callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);\r\n };\r\n const hooks = {\r\n mode,\r\n persisted,\r\n beforeEnter(el) {\r\n let hook = onBeforeEnter;\r\n if (!state.isMounted) {\r\n if (appear) {\r\n hook = onBeforeAppear || onBeforeEnter;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n // for same element (v-show)\r\n if (el._leaveCb) {\r\n el._leaveCb(true /* cancelled */);\r\n }\r\n // for toggled element with same key (v-if)\r\n const leavingVNode = leavingVNodesCache[key];\r\n if (leavingVNode &&\r\n isSameVNodeType(vnode, leavingVNode) &&\r\n leavingVNode.el._leaveCb) {\r\n // force early removal (not cancelled)\r\n leavingVNode.el._leaveCb();\r\n }\r\n callHook(hook, [el]);\r\n },\r\n enter(el) {\r\n let hook = onEnter;\r\n let afterHook = onAfterEnter;\r\n let cancelHook = onEnterCancelled;\r\n if (!state.isMounted) {\r\n if (appear) {\r\n hook = onAppear || onEnter;\r\n afterHook = onAfterAppear || onAfterEnter;\r\n cancelHook = onAppearCancelled || onEnterCancelled;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n let called = false;\r\n const done = (el._enterCb = (cancelled) => {\r\n if (called)\r\n return;\r\n called = true;\r\n if (cancelled) {\r\n callHook(cancelHook, [el]);\r\n }\r\n else {\r\n callHook(afterHook, [el]);\r\n }\r\n if (hooks.delayedLeave) {\r\n hooks.delayedLeave();\r\n }\r\n el._enterCb = undefined;\r\n });\r\n if (hook) {\r\n hook(el, done);\r\n if (hook.length <= 1) {\r\n done();\r\n }\r\n }\r\n else {\r\n done();\r\n }\r\n },\r\n leave(el, remove) {\r\n const key = String(vnode.key);\r\n if (el._enterCb) {\r\n el._enterCb(true /* cancelled */);\r\n }\r\n if (state.isUnmounting) {\r\n return remove();\r\n }\r\n callHook(onBeforeLeave, [el]);\r\n let called = false;\r\n const done = (el._leaveCb = (cancelled) => {\r\n if (called)\r\n return;\r\n called = true;\r\n remove();\r\n if (cancelled) {\r\n callHook(onLeaveCancelled, [el]);\r\n }\r\n else {\r\n callHook(onAfterLeave, [el]);\r\n }\r\n el._leaveCb = undefined;\r\n if (leavingVNodesCache[key] === vnode) {\r\n delete leavingVNodesCache[key];\r\n }\r\n });\r\n leavingVNodesCache[key] = vnode;\r\n if (onLeave) {\r\n onLeave(el, done);\r\n if (onLeave.length <= 1) {\r\n done();\r\n }\r\n }\r\n else {\r\n done();\r\n }\r\n },\r\n clone(vnode) {\r\n return resolveTransitionHooks(vnode, props, state, instance);\r\n }\r\n };\r\n return hooks;\r\n}\r\n// the placeholder really only handles one special case: KeepAlive\r\n// in the case of a KeepAlive in a leave phase we need to return a KeepAlive\r\n// placeholder with empty content to avoid the KeepAlive instance from being\r\n// unmounted.\r\nfunction emptyPlaceholder(vnode) {\r\n if (isKeepAlive(vnode)) {\r\n vnode = cloneVNode(vnode);\r\n vnode.children = null;\r\n return vnode;\r\n }\r\n}\r\nfunction getKeepAliveChild(vnode) {\r\n return isKeepAlive(vnode)\r\n ? vnode.children\r\n ? vnode.children[0]\r\n : undefined\r\n : vnode;\r\n}\r\nfunction setTransitionHooks(vnode, hooks) {\r\n if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {\r\n setTransitionHooks(vnode.component.subTree, hooks);\r\n }\r\n else if (vnode.shapeFlag & 128 /* SUSPENSE */) {\r\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\r\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\r\n }\r\n else {\r\n vnode.transition = hooks;\r\n }\r\n}\r\nfunction getTransitionRawChildren(children, keepComment = false) {\r\n let ret = [];\r\n let keyedFragmentCount = 0;\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n // handle fragment children case, e.g. v-for\r\n if (child.type === Fragment) {\r\n if (child.patchFlag & 128 /* KEYED_FRAGMENT */)\r\n keyedFragmentCount++;\r\n ret = ret.concat(getTransitionRawChildren(child.children, keepComment));\r\n }\r\n // comment placeholders should be skipped, e.g. v-if\r\n else if (keepComment || child.type !== Comment) {\r\n ret.push(child);\r\n }\r\n }\r\n // #1126 if a transition children list contains multiple sub fragments, these\r\n // fragments will be merged into a flat children array. Since each v-for\r\n // fragment may contain different static bindings inside, we need to de-op\r\n // these children to force full diffs to ensure correct behavior.\r\n if (keyedFragmentCount > 1) {\r\n for (let i = 0; i < ret.length; i++) {\r\n ret[i].patchFlag = -2 /* BAIL */;\r\n }\r\n }\r\n return ret;\r\n}\n\n// implementation, close to no-op\r\nfunction defineComponent(options) {\r\n return isFunction(options) ? { setup: options, name: options.name } : options;\r\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\r\nfunction defineAsyncComponent(source) {\r\n if (isFunction(source)) {\r\n source = { loader: source };\r\n }\r\n const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out\r\n suspensible = true, onError: userOnError } = source;\r\n let pendingRequest = null;\r\n let resolvedComp;\r\n let retries = 0;\r\n const retry = () => {\r\n retries++;\r\n pendingRequest = null;\r\n return load();\r\n };\r\n const load = () => {\r\n let thisRequest;\r\n return (pendingRequest ||\r\n (thisRequest = pendingRequest =\r\n loader()\r\n .catch(err => {\r\n err = err instanceof Error ? err : new Error(String(err));\r\n if (userOnError) {\r\n return new Promise((resolve, reject) => {\r\n const userRetry = () => resolve(retry());\r\n const userFail = () => reject(err);\r\n userOnError(err, userRetry, userFail, retries + 1);\r\n });\r\n }\r\n else {\r\n throw err;\r\n }\r\n })\r\n .then((comp) => {\r\n if (thisRequest !== pendingRequest && pendingRequest) {\r\n return pendingRequest;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && !comp) {\r\n warn(`Async component loader resolved to undefined. ` +\r\n `If you are using retry(), make sure to return its return value.`);\r\n }\r\n // interop module default\r\n if (comp &&\r\n (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\r\n comp = comp.default;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && comp && !isObject(comp) && !isFunction(comp)) {\r\n throw new Error(`Invalid async component load result: ${comp}`);\r\n }\r\n resolvedComp = comp;\r\n return comp;\r\n })));\r\n };\r\n return defineComponent({\r\n name: 'AsyncComponentWrapper',\r\n __asyncLoader: load,\r\n get __asyncResolved() {\r\n return resolvedComp;\r\n },\r\n setup() {\r\n const instance = currentInstance;\r\n // already resolved\r\n if (resolvedComp) {\r\n return () => createInnerComp(resolvedComp, instance);\r\n }\r\n const onError = (err) => {\r\n pendingRequest = null;\r\n handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);\r\n };\r\n // suspense-controlled or SSR.\r\n if ((suspensible && instance.suspense) ||\r\n (isInSSRComponentSetup)) {\r\n return load()\r\n .then(comp => {\r\n return () => createInnerComp(comp, instance);\r\n })\r\n .catch(err => {\r\n onError(err);\r\n return () => errorComponent\r\n ? createVNode(errorComponent, {\r\n error: err\r\n })\r\n : null;\r\n });\r\n }\r\n const loaded = ref(false);\r\n const error = ref();\r\n const delayed = ref(!!delay);\r\n if (delay) {\r\n setTimeout(() => {\r\n delayed.value = false;\r\n }, delay);\r\n }\r\n if (timeout != null) {\r\n setTimeout(() => {\r\n if (!loaded.value && !error.value) {\r\n const err = new Error(`Async component timed out after ${timeout}ms.`);\r\n onError(err);\r\n error.value = err;\r\n }\r\n }, timeout);\r\n }\r\n load()\r\n .then(() => {\r\n loaded.value = true;\r\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\r\n // parent is keep-alive, force update so the loaded component's\r\n // name is taken into account\r\n queueJob(instance.parent.update);\r\n }\r\n })\r\n .catch(err => {\r\n onError(err);\r\n error.value = err;\r\n });\r\n return () => {\r\n if (loaded.value && resolvedComp) {\r\n return createInnerComp(resolvedComp, instance);\r\n }\r\n else if (error.value && errorComponent) {\r\n return createVNode(errorComponent, {\r\n error: error.value\r\n });\r\n }\r\n else if (loadingComponent && !delayed.value) {\r\n return createVNode(loadingComponent);\r\n }\r\n };\r\n }\r\n });\r\n}\r\nfunction createInnerComp(comp, { vnode: { ref, props, children } }) {\r\n const vnode = createVNode(comp, props, children);\r\n // ensure inner component inherits the async wrapper's ref owner\r\n vnode.ref = ref;\r\n return vnode;\r\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\r\nconst KeepAliveImpl = {\r\n name: `KeepAlive`,\r\n // Marker for special handling inside the renderer. We are not using a ===\r\n // check directly on KeepAlive in the renderer, because importing it directly\r\n // would prevent it from being tree-shaken.\r\n __isKeepAlive: true,\r\n props: {\r\n include: [String, RegExp, Array],\r\n exclude: [String, RegExp, Array],\r\n max: [String, Number]\r\n },\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n // KeepAlive communicates with the instantiated renderer via the\r\n // ctx where the renderer passes in its internals,\r\n // and the KeepAlive instance exposes activate/deactivate implementations.\r\n // The whole point of this is to avoid importing KeepAlive directly in the\r\n // renderer to facilitate tree-shaking.\r\n const sharedContext = instance.ctx;\r\n // if the internal renderer is not registered, it indicates that this is server-side rendering,\r\n // for KeepAlive, we just need to render its children\r\n if (!sharedContext.renderer) {\r\n return slots.default;\r\n }\r\n const cache = new Map();\r\n const keys = new Set();\r\n let current = null;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n instance.__v_cache = cache;\r\n }\r\n const parentSuspense = instance.suspense;\r\n const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;\r\n const storageContainer = createElement('div');\r\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\r\n const instance = vnode.component;\r\n move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);\r\n // in case props have changed\r\n patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);\r\n queuePostRenderEffect(() => {\r\n instance.isDeactivated = false;\r\n if (instance.a) {\r\n invokeArrayFns(instance.a);\r\n }\r\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\r\n if (vnodeHook) {\r\n invokeVNodeHook(vnodeHook, instance.parent, vnode);\r\n }\r\n }, parentSuspense);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n // Update components tree\r\n devtoolsComponentAdded(instance);\r\n }\r\n };\r\n sharedContext.deactivate = (vnode) => {\r\n const instance = vnode.component;\r\n move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);\r\n queuePostRenderEffect(() => {\r\n if (instance.da) {\r\n invokeArrayFns(instance.da);\r\n }\r\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\r\n if (vnodeHook) {\r\n invokeVNodeHook(vnodeHook, instance.parent, vnode);\r\n }\r\n instance.isDeactivated = true;\r\n }, parentSuspense);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n // Update components tree\r\n devtoolsComponentAdded(instance);\r\n }\r\n };\r\n function unmount(vnode) {\r\n // reset the shapeFlag so it can be properly unmounted\r\n resetShapeFlag(vnode);\r\n _unmount(vnode, instance, parentSuspense, true);\r\n }\r\n function pruneCache(filter) {\r\n cache.forEach((vnode, key) => {\r\n const name = getComponentName(vnode.type);\r\n if (name && (!filter || !filter(name))) {\r\n pruneCacheEntry(key);\r\n }\r\n });\r\n }\r\n function pruneCacheEntry(key) {\r\n const cached = cache.get(key);\r\n if (!current || cached.type !== current.type) {\r\n unmount(cached);\r\n }\r\n else if (current) {\r\n // current active instance should no longer be kept-alive.\r\n // we can't unmount it now but it might be later, so reset its flag now.\r\n resetShapeFlag(current);\r\n }\r\n cache.delete(key);\r\n keys.delete(key);\r\n }\r\n // prune cache on include/exclude prop change\r\n watch(() => [props.include, props.exclude], ([include, exclude]) => {\r\n include && pruneCache(name => matches(include, name));\r\n exclude && pruneCache(name => !matches(exclude, name));\r\n }, \r\n // prune post-render after `current` has been updated\r\n { flush: 'post', deep: true });\r\n // cache sub tree after render\r\n let pendingCacheKey = null;\r\n const cacheSubtree = () => {\r\n // fix #1621, the pendingCacheKey could be 0\r\n if (pendingCacheKey != null) {\r\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\r\n }\r\n };\r\n onMounted(cacheSubtree);\r\n onUpdated(cacheSubtree);\r\n onBeforeUnmount(() => {\r\n cache.forEach(cached => {\r\n const { subTree, suspense } = instance;\r\n const vnode = getInnerChild(subTree);\r\n if (cached.type === vnode.type) {\r\n // current instance will be unmounted as part of keep-alive's unmount\r\n resetShapeFlag(vnode);\r\n // but invoke its deactivated hook here\r\n const da = vnode.component.da;\r\n da && queuePostRenderEffect(da, suspense);\r\n return;\r\n }\r\n unmount(cached);\r\n });\r\n });\r\n return () => {\r\n pendingCacheKey = null;\r\n if (!slots.default) {\r\n return null;\r\n }\r\n const children = slots.default();\r\n const rawVNode = children[0];\r\n if (children.length > 1) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`KeepAlive should contain exactly one component child.`);\r\n }\r\n current = null;\r\n return children;\r\n }\r\n else if (!isVNode(rawVNode) ||\r\n (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&\r\n !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {\r\n current = null;\r\n return rawVNode;\r\n }\r\n let vnode = getInnerChild(rawVNode);\r\n const comp = vnode.type;\r\n // for async components, name check should be based in its loaded\r\n // inner component if available\r\n const name = getComponentName(isAsyncWrapper(vnode)\r\n ? vnode.type.__asyncResolved || {}\r\n : comp);\r\n const { include, exclude, max } = props;\r\n if ((include && (!name || !matches(include, name))) ||\r\n (exclude && name && matches(exclude, name))) {\r\n current = vnode;\r\n return rawVNode;\r\n }\r\n const key = vnode.key == null ? comp : vnode.key;\r\n const cachedVNode = cache.get(key);\r\n // clone vnode if it's reused because we are going to mutate it\r\n if (vnode.el) {\r\n vnode = cloneVNode(vnode);\r\n if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {\r\n rawVNode.ssContent = vnode;\r\n }\r\n }\r\n // #1513 it's possible for the returned vnode to be cloned due to attr\r\n // fallthrough or scopeId, so the vnode here may not be the final vnode\r\n // that is mounted. Instead of caching it directly, we store the pending\r\n // key and cache `instance.subTree` (the normalized vnode) in\r\n // beforeMount/beforeUpdate hooks.\r\n pendingCacheKey = key;\r\n if (cachedVNode) {\r\n // copy over mounted state\r\n vnode.el = cachedVNode.el;\r\n vnode.component = cachedVNode.component;\r\n if (vnode.transition) {\r\n // recursively update transition hooks on subTree\r\n setTransitionHooks(vnode, vnode.transition);\r\n }\r\n // avoid vnode being mounted as fresh\r\n vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;\r\n // make this key the freshest\r\n keys.delete(key);\r\n keys.add(key);\r\n }\r\n else {\r\n keys.add(key);\r\n // prune oldest entry\r\n if (max && keys.size > parseInt(max, 10)) {\r\n pruneCacheEntry(keys.values().next().value);\r\n }\r\n }\r\n // avoid vnode being unmounted\r\n vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;\r\n current = vnode;\r\n return rawVNode;\r\n };\r\n }\r\n};\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\nconst KeepAlive = KeepAliveImpl;\r\nfunction matches(pattern, name) {\r\n if (isArray(pattern)) {\r\n return pattern.some((p) => matches(p, name));\r\n }\r\n else if (isString(pattern)) {\r\n return pattern.split(',').includes(name);\r\n }\r\n else if (pattern.test) {\r\n return pattern.test(name);\r\n }\r\n /* istanbul ignore next */\r\n return false;\r\n}\r\nfunction onActivated(hook, target) {\r\n registerKeepAliveHook(hook, \"a\" /* ACTIVATED */, target);\r\n}\r\nfunction onDeactivated(hook, target) {\r\n registerKeepAliveHook(hook, \"da\" /* DEACTIVATED */, target);\r\n}\r\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\r\n // cache the deactivate branch check wrapper for injected hooks so the same\r\n // hook can be properly deduped by the scheduler. \"__wdc\" stands for \"with\r\n // deactivation check\".\r\n const wrappedHook = hook.__wdc ||\r\n (hook.__wdc = () => {\r\n // only fire the hook if the target instance is NOT in a deactivated branch.\r\n let current = target;\r\n while (current) {\r\n if (current.isDeactivated) {\r\n return;\r\n }\r\n current = current.parent;\r\n }\r\n return hook();\r\n });\r\n injectHook(type, wrappedHook, target);\r\n // In addition to registering it on the target instance, we walk up the parent\r\n // chain and register it on all ancestor instances that are keep-alive roots.\r\n // This avoids the need to walk the entire component tree when invoking these\r\n // hooks, and more importantly, avoids the need to track child components in\r\n // arrays.\r\n if (target) {\r\n let current = target.parent;\r\n while (current && current.parent) {\r\n if (isKeepAlive(current.parent.vnode)) {\r\n injectToKeepAliveRoot(wrappedHook, type, target, current);\r\n }\r\n current = current.parent;\r\n }\r\n }\r\n}\r\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\r\n // injectHook wraps the original for error handling, so make sure to remove\r\n // the wrapped version.\r\n const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */);\r\n onUnmounted(() => {\r\n remove(keepAliveRoot[type], injected);\r\n }, target);\r\n}\r\nfunction resetShapeFlag(vnode) {\r\n let shapeFlag = vnode.shapeFlag;\r\n if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {\r\n shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;\r\n }\r\n if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {\r\n shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;\r\n }\r\n vnode.shapeFlag = shapeFlag;\r\n}\r\nfunction getInnerChild(vnode) {\r\n return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;\r\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\r\n if (target) {\r\n const hooks = target[type] || (target[type] = []);\r\n // cache the error handling wrapper for injected hooks so the same hook\r\n // can be properly deduped by the scheduler. \"__weh\" stands for \"with error\r\n // handling\".\r\n const wrappedHook = hook.__weh ||\r\n (hook.__weh = (...args) => {\r\n if (target.isUnmounted) {\r\n return;\r\n }\r\n // disable tracking inside all lifecycle hooks\r\n // since they can potentially be called inside effects.\r\n pauseTracking();\r\n // Set currentInstance during hook invocation.\r\n // This assumes the hook does not synchronously trigger other hooks, which\r\n // can only be false when the user does something really funky.\r\n setCurrentInstance(target);\r\n const res = callWithAsyncErrorHandling(hook, target, type, args);\r\n unsetCurrentInstance();\r\n resetTracking();\r\n return res;\r\n });\r\n if (prepend) {\r\n hooks.unshift(wrappedHook);\r\n }\r\n else {\r\n hooks.push(wrappedHook);\r\n }\r\n return wrappedHook;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));\r\n warn(`${apiName} is called when there is no active component instance to be ` +\r\n `associated with. ` +\r\n `Lifecycle injection APIs can only be used during execution of setup().` +\r\n (` If you are using async setup(), make sure to register lifecycle ` +\r\n `hooks before the first await statement.`\r\n ));\r\n }\r\n}\r\nconst createHook = (lifecycle) => (hook, target = currentInstance) => \r\n// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\r\n(!isInSSRComponentSetup || lifecycle === \"sp\" /* SERVER_PREFETCH */) &&\r\n injectHook(lifecycle, hook, target);\r\nconst onBeforeMount = createHook(\"bm\" /* BEFORE_MOUNT */);\r\nconst onMounted = createHook(\"m\" /* MOUNTED */);\r\nconst onBeforeUpdate = createHook(\"bu\" /* BEFORE_UPDATE */);\r\nconst onUpdated = createHook(\"u\" /* UPDATED */);\r\nconst onBeforeUnmount = createHook(\"bum\" /* BEFORE_UNMOUNT */);\r\nconst onUnmounted = createHook(\"um\" /* UNMOUNTED */);\r\nconst onServerPrefetch = createHook(\"sp\" /* SERVER_PREFETCH */);\r\nconst onRenderTriggered = createHook(\"rtg\" /* RENDER_TRIGGERED */);\r\nconst onRenderTracked = createHook(\"rtc\" /* RENDER_TRACKED */);\r\nfunction onErrorCaptured(hook, target = currentInstance) {\r\n injectHook(\"ec\" /* ERROR_CAPTURED */, hook, target);\r\n}\n\nfunction createDuplicateChecker() {\r\n const cache = Object.create(null);\r\n return (type, key) => {\r\n if (cache[key]) {\r\n warn(`${type} property \"${key}\" is already defined in ${cache[key]}.`);\r\n }\r\n else {\r\n cache[key] = type;\r\n }\r\n };\r\n}\r\nlet shouldCacheAccess = true;\r\nfunction applyOptions(instance) {\r\n const options = resolveMergedOptions(instance);\r\n const publicThis = instance.proxy;\r\n const ctx = instance.ctx;\r\n // do not cache property access on public proxy during state initialization\r\n shouldCacheAccess = false;\r\n // call beforeCreate first before accessing other options since\r\n // the hook may mutate resolved options (#2791)\r\n if (options.beforeCreate) {\r\n callHook(options.beforeCreate, instance, \"bc\" /* BEFORE_CREATE */);\r\n }\r\n const { \r\n // state\r\n data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, \r\n // lifecycle\r\n created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, \r\n // public API\r\n expose, inheritAttrs, \r\n // assets\r\n components, directives, filters } = options;\r\n const checkDuplicateProperties = (process.env.NODE_ENV !== 'production') ? createDuplicateChecker() : null;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const [propsOptions] = instance.propsOptions;\r\n if (propsOptions) {\r\n for (const key in propsOptions) {\r\n checkDuplicateProperties(\"Props\" /* PROPS */, key);\r\n }\r\n }\r\n }\r\n // options initialization order (to be consistent with Vue 2):\r\n // - props (already done outside of this function)\r\n // - inject\r\n // - methods\r\n // - data (deferred since it relies on `this` access)\r\n // - computed\r\n // - watch (deferred since it relies on `this` access)\r\n if (injectOptions) {\r\n resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);\r\n }\r\n if (methods) {\r\n for (const key in methods) {\r\n const methodHandler = methods[key];\r\n if (isFunction(methodHandler)) {\r\n // In dev mode, we use the `createRenderContext` function to define\r\n // methods to the proxy target, and those are read-only but\r\n // reconfigurable, so it needs to be redefined here\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n Object.defineProperty(ctx, key, {\r\n value: methodHandler.bind(publicThis),\r\n configurable: true,\r\n enumerable: true,\r\n writable: true\r\n });\r\n }\r\n else {\r\n ctx[key] = methodHandler.bind(publicThis);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Methods\" /* METHODS */, key);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Method \"${key}\" has type \"${typeof methodHandler}\" in the component definition. ` +\r\n `Did you reference the function correctly?`);\r\n }\r\n }\r\n }\r\n if (dataOptions) {\r\n if ((process.env.NODE_ENV !== 'production') && !isFunction(dataOptions)) {\r\n warn(`The data option must be a function. ` +\r\n `Plain object usage is no longer supported.`);\r\n }\r\n const data = dataOptions.call(publicThis, publicThis);\r\n if ((process.env.NODE_ENV !== 'production') && isPromise(data)) {\r\n warn(`data() returned a Promise - note data() cannot be async; If you ` +\r\n `intend to perform data fetching before component renders, use ` +\r\n `async setup() + .`);\r\n }\r\n if (!isObject(data)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`data() should return an object.`);\r\n }\r\n else {\r\n instance.data = reactive(data);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n for (const key in data) {\r\n checkDuplicateProperties(\"Data\" /* DATA */, key);\r\n // expose data on ctx during dev\r\n if (key[0] !== '$' && key[0] !== '_') {\r\n Object.defineProperty(ctx, key, {\r\n configurable: true,\r\n enumerable: true,\r\n get: () => data[key],\r\n set: NOOP\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // state initialization complete at this point - start caching access\r\n shouldCacheAccess = true;\r\n if (computedOptions) {\r\n for (const key in computedOptions) {\r\n const opt = computedOptions[key];\r\n const get = isFunction(opt)\r\n ? opt.bind(publicThis, publicThis)\r\n : isFunction(opt.get)\r\n ? opt.get.bind(publicThis, publicThis)\r\n : NOOP;\r\n if ((process.env.NODE_ENV !== 'production') && get === NOOP) {\r\n warn(`Computed property \"${key}\" has no getter.`);\r\n }\r\n const set = !isFunction(opt) && isFunction(opt.set)\r\n ? opt.set.bind(publicThis)\r\n : (process.env.NODE_ENV !== 'production')\r\n ? () => {\r\n warn(`Write operation failed: computed property \"${key}\" is readonly.`);\r\n }\r\n : NOOP;\r\n const c = computed({\r\n get,\r\n set\r\n });\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => c.value,\r\n set: v => (c.value = v)\r\n });\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Computed\" /* COMPUTED */, key);\r\n }\r\n }\r\n }\r\n if (watchOptions) {\r\n for (const key in watchOptions) {\r\n createWatcher(watchOptions[key], ctx, publicThis, key);\r\n }\r\n }\r\n if (provideOptions) {\r\n const provides = isFunction(provideOptions)\r\n ? provideOptions.call(publicThis)\r\n : provideOptions;\r\n Reflect.ownKeys(provides).forEach(key => {\r\n provide(key, provides[key]);\r\n });\r\n }\r\n if (created) {\r\n callHook(created, instance, \"c\" /* CREATED */);\r\n }\r\n function registerLifecycleHook(register, hook) {\r\n if (isArray(hook)) {\r\n hook.forEach(_hook => register(_hook.bind(publicThis)));\r\n }\r\n else if (hook) {\r\n register(hook.bind(publicThis));\r\n }\r\n }\r\n registerLifecycleHook(onBeforeMount, beforeMount);\r\n registerLifecycleHook(onMounted, mounted);\r\n registerLifecycleHook(onBeforeUpdate, beforeUpdate);\r\n registerLifecycleHook(onUpdated, updated);\r\n registerLifecycleHook(onActivated, activated);\r\n registerLifecycleHook(onDeactivated, deactivated);\r\n registerLifecycleHook(onErrorCaptured, errorCaptured);\r\n registerLifecycleHook(onRenderTracked, renderTracked);\r\n registerLifecycleHook(onRenderTriggered, renderTriggered);\r\n registerLifecycleHook(onBeforeUnmount, beforeUnmount);\r\n registerLifecycleHook(onUnmounted, unmounted);\r\n registerLifecycleHook(onServerPrefetch, serverPrefetch);\r\n if (isArray(expose)) {\r\n if (expose.length) {\r\n const exposed = instance.exposed || (instance.exposed = {});\r\n expose.forEach(key => {\r\n Object.defineProperty(exposed, key, {\r\n get: () => publicThis[key],\r\n set: val => (publicThis[key] = val)\r\n });\r\n });\r\n }\r\n else if (!instance.exposed) {\r\n instance.exposed = {};\r\n }\r\n }\r\n // options that are handled when creating the instance but also need to be\r\n // applied from mixins\r\n if (render && instance.render === NOOP) {\r\n instance.render = render;\r\n }\r\n if (inheritAttrs != null) {\r\n instance.inheritAttrs = inheritAttrs;\r\n }\r\n // asset options.\r\n if (components)\r\n instance.components = components;\r\n if (directives)\r\n instance.directives = directives;\r\n}\r\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {\r\n if (isArray(injectOptions)) {\r\n injectOptions = normalizeInject(injectOptions);\r\n }\r\n for (const key in injectOptions) {\r\n const opt = injectOptions[key];\r\n let injected;\r\n if (isObject(opt)) {\r\n if ('default' in opt) {\r\n injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);\r\n }\r\n else {\r\n injected = inject(opt.from || key);\r\n }\r\n }\r\n else {\r\n injected = inject(opt);\r\n }\r\n if (isRef(injected)) {\r\n // TODO remove the check in 3.3\r\n if (unwrapRef) {\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => injected.value,\r\n set: v => (injected.value = v)\r\n });\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`injected property \"${key}\" is a ref and will be auto-unwrapped ` +\r\n `and no longer needs \\`.value\\` in the next minor release. ` +\r\n `To opt-in to the new behavior now, ` +\r\n `set \\`app.config.unwrapInjectedRef = true\\` (this config is ` +\r\n `temporary and will not be needed in the future.)`);\r\n }\r\n ctx[key] = injected;\r\n }\r\n }\r\n else {\r\n ctx[key] = injected;\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Inject\" /* INJECT */, key);\r\n }\r\n }\r\n}\r\nfunction callHook(hook, instance, type) {\r\n callWithAsyncErrorHandling(isArray(hook)\r\n ? hook.map(h => h.bind(instance.proxy))\r\n : hook.bind(instance.proxy), instance, type);\r\n}\r\nfunction createWatcher(raw, ctx, publicThis, key) {\r\n const getter = key.includes('.')\r\n ? createPathGetter(publicThis, key)\r\n : () => publicThis[key];\r\n if (isString(raw)) {\r\n const handler = ctx[raw];\r\n if (isFunction(handler)) {\r\n watch(getter, handler);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch handler specified by key \"${raw}\"`, handler);\r\n }\r\n }\r\n else if (isFunction(raw)) {\r\n watch(getter, raw.bind(publicThis));\r\n }\r\n else if (isObject(raw)) {\r\n if (isArray(raw)) {\r\n raw.forEach(r => createWatcher(r, ctx, publicThis, key));\r\n }\r\n else {\r\n const handler = isFunction(raw.handler)\r\n ? raw.handler.bind(publicThis)\r\n : ctx[raw.handler];\r\n if (isFunction(handler)) {\r\n watch(getter, handler, raw);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch handler specified by key \"${raw.handler}\"`, handler);\r\n }\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch option: \"${key}\"`, raw);\r\n }\r\n}\r\n/**\r\n * Resolve merged options and cache it on the component.\r\n * This is done only once per-component since the merging does not involve\r\n * instances.\r\n */\r\nfunction resolveMergedOptions(instance) {\r\n const base = instance.type;\r\n const { mixins, extends: extendsOptions } = base;\r\n const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;\r\n const cached = cache.get(base);\r\n let resolved;\r\n if (cached) {\r\n resolved = cached;\r\n }\r\n else if (!globalMixins.length && !mixins && !extendsOptions) {\r\n {\r\n resolved = base;\r\n }\r\n }\r\n else {\r\n resolved = {};\r\n if (globalMixins.length) {\r\n globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true));\r\n }\r\n mergeOptions(resolved, base, optionMergeStrategies);\r\n }\r\n cache.set(base, resolved);\r\n return resolved;\r\n}\r\nfunction mergeOptions(to, from, strats, asMixin = false) {\r\n const { mixins, extends: extendsOptions } = from;\r\n if (extendsOptions) {\r\n mergeOptions(to, extendsOptions, strats, true);\r\n }\r\n if (mixins) {\r\n mixins.forEach((m) => mergeOptions(to, m, strats, true));\r\n }\r\n for (const key in from) {\r\n if (asMixin && key === 'expose') {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`\"expose\" option is ignored when declared in mixins or extends. ` +\r\n `It should only be declared in the base component itself.`);\r\n }\r\n else {\r\n const strat = internalOptionMergeStrats[key] || (strats && strats[key]);\r\n to[key] = strat ? strat(to[key], from[key]) : from[key];\r\n }\r\n }\r\n return to;\r\n}\r\nconst internalOptionMergeStrats = {\r\n data: mergeDataFn,\r\n props: mergeObjectOptions,\r\n emits: mergeObjectOptions,\r\n // objects\r\n methods: mergeObjectOptions,\r\n computed: mergeObjectOptions,\r\n // lifecycle\r\n beforeCreate: mergeAsArray,\r\n created: mergeAsArray,\r\n beforeMount: mergeAsArray,\r\n mounted: mergeAsArray,\r\n beforeUpdate: mergeAsArray,\r\n updated: mergeAsArray,\r\n beforeDestroy: mergeAsArray,\r\n beforeUnmount: mergeAsArray,\r\n destroyed: mergeAsArray,\r\n unmounted: mergeAsArray,\r\n activated: mergeAsArray,\r\n deactivated: mergeAsArray,\r\n errorCaptured: mergeAsArray,\r\n serverPrefetch: mergeAsArray,\r\n // assets\r\n components: mergeObjectOptions,\r\n directives: mergeObjectOptions,\r\n // watch\r\n watch: mergeWatchOptions,\r\n // provide / inject\r\n provide: mergeDataFn,\r\n inject: mergeInject\r\n};\r\nfunction mergeDataFn(to, from) {\r\n if (!from) {\r\n return to;\r\n }\r\n if (!to) {\r\n return from;\r\n }\r\n return function mergedDataFn() {\r\n return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);\r\n };\r\n}\r\nfunction mergeInject(to, from) {\r\n return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\r\n}\r\nfunction normalizeInject(raw) {\r\n if (isArray(raw)) {\r\n const res = {};\r\n for (let i = 0; i < raw.length; i++) {\r\n res[raw[i]] = raw[i];\r\n }\r\n return res;\r\n }\r\n return raw;\r\n}\r\nfunction mergeAsArray(to, from) {\r\n return to ? [...new Set([].concat(to, from))] : from;\r\n}\r\nfunction mergeObjectOptions(to, from) {\r\n return to ? extend(extend(Object.create(null), to), from) : from;\r\n}\r\nfunction mergeWatchOptions(to, from) {\r\n if (!to)\r\n return from;\r\n if (!from)\r\n return to;\r\n const merged = extend(Object.create(null), to);\r\n for (const key in from) {\r\n merged[key] = mergeAsArray(to[key], from[key]);\r\n }\r\n return merged;\r\n}\n\nfunction initProps(instance, rawProps, isStateful, // result of bitwise flag comparison\r\nisSSR = false) {\r\n const props = {};\r\n const attrs = {};\r\n def(attrs, InternalObjectKey, 1);\r\n instance.propsDefaults = Object.create(null);\r\n setFullProps(instance, rawProps, props, attrs);\r\n // ensure all declared prop keys are present\r\n for (const key in instance.propsOptions[0]) {\r\n if (!(key in props)) {\r\n props[key] = undefined;\r\n }\r\n }\r\n // validation\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateProps(rawProps || {}, props, instance);\r\n }\r\n if (isStateful) {\r\n // stateful\r\n instance.props = isSSR ? props : shallowReactive(props);\r\n }\r\n else {\r\n if (!instance.type.props) {\r\n // functional w/ optional props, props === attrs\r\n instance.props = attrs;\r\n }\r\n else {\r\n // functional w/ declared props\r\n instance.props = props;\r\n }\r\n }\r\n instance.attrs = attrs;\r\n}\r\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\r\n const { props, attrs, vnode: { patchFlag } } = instance;\r\n const rawCurrentProps = toRaw(props);\r\n const [options] = instance.propsOptions;\r\n let hasAttrsChanged = false;\r\n if (\r\n // always force full diff in dev\r\n // - #1942 if hmr is enabled with sfc component\r\n // - vite#872 non-sfc component used by sfc component\r\n !((process.env.NODE_ENV !== 'production') &&\r\n (instance.type.__hmrId ||\r\n (instance.parent && instance.parent.type.__hmrId))) &&\r\n (optimized || patchFlag > 0) &&\r\n !(patchFlag & 16 /* FULL_PROPS */)) {\r\n if (patchFlag & 8 /* PROPS */) {\r\n // Compiler-generated props & no keys change, just set the updated\r\n // the props.\r\n const propsToUpdate = instance.vnode.dynamicProps;\r\n for (let i = 0; i < propsToUpdate.length; i++) {\r\n let key = propsToUpdate[i];\r\n // PROPS flag guarantees rawProps to be non-null\r\n const value = rawProps[key];\r\n if (options) {\r\n // attr / props separation was done on init and will be consistent\r\n // in this code path, so just check if attrs have it.\r\n if (hasOwn(attrs, key)) {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n else {\r\n const camelizedKey = camelize(key);\r\n props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */);\r\n }\r\n }\r\n else {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // full props update.\r\n if (setFullProps(instance, rawProps, props, attrs)) {\r\n hasAttrsChanged = true;\r\n }\r\n // in case of dynamic props, check if we need to delete keys from\r\n // the props object\r\n let kebabKey;\r\n for (const key in rawCurrentProps) {\r\n if (!rawProps ||\r\n // for camelCase\r\n (!hasOwn(rawProps, key) &&\r\n // it's possible the original props was passed in as kebab-case\r\n // and converted to camelCase (#955)\r\n ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) {\r\n if (options) {\r\n if (rawPrevProps &&\r\n // for camelCase\r\n (rawPrevProps[key] !== undefined ||\r\n // for kebab-case\r\n rawPrevProps[kebabKey] !== undefined)) {\r\n props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */);\r\n }\r\n }\r\n else {\r\n delete props[key];\r\n }\r\n }\r\n }\r\n // in the case of functional component w/o props declaration, props and\r\n // attrs point to the same object so it should already have been updated.\r\n if (attrs !== rawCurrentProps) {\r\n for (const key in attrs) {\r\n if (!rawProps ||\r\n (!hasOwn(rawProps, key) &&\r\n (!false ))) {\r\n delete attrs[key];\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n // trigger updates for $attrs in case it's used in component slots\r\n if (hasAttrsChanged) {\r\n trigger(instance, \"set\" /* SET */, '$attrs');\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateProps(rawProps || {}, props, instance);\r\n }\r\n}\r\nfunction setFullProps(instance, rawProps, props, attrs) {\r\n const [options, needCastKeys] = instance.propsOptions;\r\n let hasAttrsChanged = false;\r\n let rawCastValues;\r\n if (rawProps) {\r\n for (let key in rawProps) {\r\n // key, ref are reserved and never passed down\r\n if (isReservedProp(key)) {\r\n continue;\r\n }\r\n const value = rawProps[key];\r\n // prop option names are camelized during normalization, so to support\r\n // kebab -> camel conversion here we need to camelize the key.\r\n let camelKey;\r\n if (options && hasOwn(options, (camelKey = camelize(key)))) {\r\n if (!needCastKeys || !needCastKeys.includes(camelKey)) {\r\n props[camelKey] = value;\r\n }\r\n else {\r\n (rawCastValues || (rawCastValues = {}))[camelKey] = value;\r\n }\r\n }\r\n else if (!isEmitListener(instance.emitsOptions, key)) {\r\n if (!(key in attrs) || value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n if (needCastKeys) {\r\n const rawCurrentProps = toRaw(props);\r\n const castValues = rawCastValues || EMPTY_OBJ;\r\n for (let i = 0; i < needCastKeys.length; i++) {\r\n const key = needCastKeys[i];\r\n props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));\r\n }\r\n }\r\n return hasAttrsChanged;\r\n}\r\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\r\n const opt = options[key];\r\n if (opt != null) {\r\n const hasDefault = hasOwn(opt, 'default');\r\n // default values\r\n if (hasDefault && value === undefined) {\r\n const defaultValue = opt.default;\r\n if (opt.type !== Function && isFunction(defaultValue)) {\r\n const { propsDefaults } = instance;\r\n if (key in propsDefaults) {\r\n value = propsDefaults[key];\r\n }\r\n else {\r\n setCurrentInstance(instance);\r\n value = propsDefaults[key] = defaultValue.call(null, props);\r\n unsetCurrentInstance();\r\n }\r\n }\r\n else {\r\n value = defaultValue;\r\n }\r\n }\r\n // boolean casting\r\n if (opt[0 /* shouldCast */]) {\r\n if (isAbsent && !hasDefault) {\r\n value = false;\r\n }\r\n else if (opt[1 /* shouldCastTrue */] &&\r\n (value === '' || value === hyphenate(key))) {\r\n value = true;\r\n }\r\n }\r\n }\r\n return value;\r\n}\r\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.propsCache;\r\n const cached = cache.get(comp);\r\n if (cached) {\r\n return cached;\r\n }\r\n const raw = comp.props;\r\n const normalized = {};\r\n const needCastKeys = [];\r\n // apply mixin/extends props\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\r\n const extendProps = (raw) => {\r\n hasExtends = true;\r\n const [props, keys] = normalizePropsOptions(raw, appContext, true);\r\n extend(normalized, props);\r\n if (keys)\r\n needCastKeys.push(...keys);\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendProps);\r\n }\r\n if (comp.extends) {\r\n extendProps(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendProps);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n cache.set(comp, EMPTY_ARR);\r\n return EMPTY_ARR;\r\n }\r\n if (isArray(raw)) {\r\n for (let i = 0; i < raw.length; i++) {\r\n if ((process.env.NODE_ENV !== 'production') && !isString(raw[i])) {\r\n warn(`props must be strings when using array syntax.`, raw[i]);\r\n }\r\n const normalizedKey = camelize(raw[i]);\r\n if (validatePropName(normalizedKey)) {\r\n normalized[normalizedKey] = EMPTY_OBJ;\r\n }\r\n }\r\n }\r\n else if (raw) {\r\n if ((process.env.NODE_ENV !== 'production') && !isObject(raw)) {\r\n warn(`invalid props options`, raw);\r\n }\r\n for (const key in raw) {\r\n const normalizedKey = camelize(key);\r\n if (validatePropName(normalizedKey)) {\r\n const opt = raw[key];\r\n const prop = (normalized[normalizedKey] =\r\n isArray(opt) || isFunction(opt) ? { type: opt } : opt);\r\n if (prop) {\r\n const booleanIndex = getTypeIndex(Boolean, prop.type);\r\n const stringIndex = getTypeIndex(String, prop.type);\r\n prop[0 /* shouldCast */] = booleanIndex > -1;\r\n prop[1 /* shouldCastTrue */] =\r\n stringIndex < 0 || booleanIndex < stringIndex;\r\n // if the prop needs boolean casting or default value\r\n if (booleanIndex > -1 || hasOwn(prop, 'default')) {\r\n needCastKeys.push(normalizedKey);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n const res = [normalized, needCastKeys];\r\n cache.set(comp, res);\r\n return res;\r\n}\r\nfunction validatePropName(key) {\r\n if (key[0] !== '$') {\r\n return true;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid prop name: \"${key}\" is a reserved property.`);\r\n }\r\n return false;\r\n}\r\n// use function string name to check type constructors\r\n// so that it works across vms / iframes.\r\nfunction getType(ctor) {\r\n const match = ctor && ctor.toString().match(/^\\s*function (\\w+)/);\r\n return match ? match[1] : ctor === null ? 'null' : '';\r\n}\r\nfunction isSameType(a, b) {\r\n return getType(a) === getType(b);\r\n}\r\nfunction getTypeIndex(type, expectedTypes) {\r\n if (isArray(expectedTypes)) {\r\n return expectedTypes.findIndex(t => isSameType(t, type));\r\n }\r\n else if (isFunction(expectedTypes)) {\r\n return isSameType(expectedTypes, type) ? 0 : -1;\r\n }\r\n return -1;\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction validateProps(rawProps, props, instance) {\r\n const resolvedValues = toRaw(props);\r\n const options = instance.propsOptions[0];\r\n for (const key in options) {\r\n let opt = options[key];\r\n if (opt == null)\r\n continue;\r\n validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)));\r\n }\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction validateProp(name, value, prop, isAbsent) {\r\n const { type, required, validator } = prop;\r\n // required!\r\n if (required && isAbsent) {\r\n warn('Missing required prop: \"' + name + '\"');\r\n return;\r\n }\r\n // missing but optional\r\n if (value == null && !prop.required) {\r\n return;\r\n }\r\n // type check\r\n if (type != null && type !== true) {\r\n let isValid = false;\r\n const types = isArray(type) ? type : [type];\r\n const expectedTypes = [];\r\n // value is valid as long as one of the specified types match\r\n for (let i = 0; i < types.length && !isValid; i++) {\r\n const { valid, expectedType } = assertType(value, types[i]);\r\n expectedTypes.push(expectedType || '');\r\n isValid = valid;\r\n }\r\n if (!isValid) {\r\n warn(getInvalidTypeMessage(name, value, expectedTypes));\r\n return;\r\n }\r\n }\r\n // custom validator\r\n if (validator && !validator(value)) {\r\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".');\r\n }\r\n}\r\nconst isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');\r\n/**\r\n * dev only\r\n */\r\nfunction assertType(value, type) {\r\n let valid;\r\n const expectedType = getType(type);\r\n if (isSimpleType(expectedType)) {\r\n const t = typeof value;\r\n valid = t === expectedType.toLowerCase();\r\n // for primitive wrapper objects\r\n if (!valid && t === 'object') {\r\n valid = value instanceof type;\r\n }\r\n }\r\n else if (expectedType === 'Object') {\r\n valid = isObject(value);\r\n }\r\n else if (expectedType === 'Array') {\r\n valid = isArray(value);\r\n }\r\n else if (expectedType === 'null') {\r\n valid = value === null;\r\n }\r\n else {\r\n valid = value instanceof type;\r\n }\r\n return {\r\n valid,\r\n expectedType\r\n };\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\r\n let message = `Invalid prop: type check failed for prop \"${name}\".` +\r\n ` Expected ${expectedTypes.map(capitalize).join(' | ')}`;\r\n const expectedType = expectedTypes[0];\r\n const receivedType = toRawType(value);\r\n const expectedValue = styleValue(value, expectedType);\r\n const receivedValue = styleValue(value, receivedType);\r\n // check if we need to specify expected value\r\n if (expectedTypes.length === 1 &&\r\n isExplicable(expectedType) &&\r\n !isBoolean(expectedType, receivedType)) {\r\n message += ` with value ${expectedValue}`;\r\n }\r\n message += `, got ${receivedType} `;\r\n // check if we need to specify received value\r\n if (isExplicable(receivedType)) {\r\n message += `with value ${receivedValue}.`;\r\n }\r\n return message;\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction styleValue(value, type) {\r\n if (type === 'String') {\r\n return `\"${value}\"`;\r\n }\r\n else if (type === 'Number') {\r\n return `${Number(value)}`;\r\n }\r\n else {\r\n return `${value}`;\r\n }\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction isExplicable(type) {\r\n const explicitTypes = ['string', 'number', 'boolean'];\r\n return explicitTypes.some(elem => type.toLowerCase() === elem);\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction isBoolean(...args) {\r\n return args.some(elem => elem.toLowerCase() === 'boolean');\r\n}\n\nconst isInternalKey = (key) => key[0] === '_' || key === '$stable';\r\nconst normalizeSlotValue = (value) => isArray(value)\r\n ? value.map(normalizeVNode)\r\n : [normalizeVNode(value)];\r\nconst normalizeSlot = (key, rawSlot, ctx) => {\r\n const normalized = withCtx((...args) => {\r\n if ((process.env.NODE_ENV !== 'production') && currentInstance) {\r\n warn(`Slot \"${key}\" invoked outside of the render function: ` +\r\n `this will not track dependencies used in the slot. ` +\r\n `Invoke the slot function inside the render function instead.`);\r\n }\r\n return normalizeSlotValue(rawSlot(...args));\r\n }, ctx);\r\n normalized._c = false;\r\n return normalized;\r\n};\r\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\r\n const ctx = rawSlots._ctx;\r\n for (const key in rawSlots) {\r\n if (isInternalKey(key))\r\n continue;\r\n const value = rawSlots[key];\r\n if (isFunction(value)) {\r\n slots[key] = normalizeSlot(key, value, ctx);\r\n }\r\n else if (value != null) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !(false )) {\r\n warn(`Non-function value encountered for slot \"${key}\". ` +\r\n `Prefer function slots for better performance.`);\r\n }\r\n const normalized = normalizeSlotValue(value);\r\n slots[key] = () => normalized;\r\n }\r\n }\r\n};\r\nconst normalizeVNodeSlots = (instance, children) => {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !isKeepAlive(instance.vnode) &&\r\n !(false )) {\r\n warn(`Non-function value encountered for default slot. ` +\r\n `Prefer function slots for better performance.`);\r\n }\r\n const normalized = normalizeSlotValue(children);\r\n instance.slots.default = () => normalized;\r\n};\r\nconst initSlots = (instance, children) => {\r\n if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {\r\n const type = children._;\r\n if (type) {\r\n // users can get the shallow readonly version of the slots object through `this.$slots`,\r\n // we should avoid the proxy object polluting the slots of the internal instance\r\n instance.slots = toRaw(children);\r\n // make compiler marker non-enumerable\r\n def(children, '_', type);\r\n }\r\n else {\r\n normalizeObjectSlots(children, (instance.slots = {}));\r\n }\r\n }\r\n else {\r\n instance.slots = {};\r\n if (children) {\r\n normalizeVNodeSlots(instance, children);\r\n }\r\n }\r\n def(instance.slots, InternalObjectKey, 1);\r\n};\r\nconst updateSlots = (instance, children, optimized) => {\r\n const { vnode, slots } = instance;\r\n let needDeletionCheck = true;\r\n let deletionComparisonTarget = EMPTY_OBJ;\r\n if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {\r\n const type = children._;\r\n if (type) {\r\n // compiled slots.\r\n if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) {\r\n // Parent was HMR updated so slot content may have changed.\r\n // force update slots and mark instance for hmr as well\r\n extend(slots, children);\r\n }\r\n else if (optimized && type === 1 /* STABLE */) {\r\n // compiled AND stable.\r\n // no need to update, and skip stale slots removal.\r\n needDeletionCheck = false;\r\n }\r\n else {\r\n // compiled but dynamic (v-if/v-for on slots) - update slots, but skip\r\n // normalization.\r\n extend(slots, children);\r\n // #2893\r\n // when rendering the optimized slots by manually written render function,\r\n // we need to delete the `slots._` flag if necessary to make subsequent updates reliable,\r\n // i.e. let the `renderSlot` create the bailed Fragment\r\n if (!optimized && type === 1 /* STABLE */) {\r\n delete slots._;\r\n }\r\n }\r\n }\r\n else {\r\n needDeletionCheck = !children.$stable;\r\n normalizeObjectSlots(children, slots);\r\n }\r\n deletionComparisonTarget = children;\r\n }\r\n else if (children) {\r\n // non slot object children (direct value) passed to a component\r\n normalizeVNodeSlots(instance, children);\r\n deletionComparisonTarget = { default: 1 };\r\n }\r\n // delete stale slots\r\n if (needDeletionCheck) {\r\n for (const key in slots) {\r\n if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {\r\n delete slots[key];\r\n }\r\n }\r\n }\r\n};\n\n/**\r\nRuntime helper for applying directives to a vnode. Example usage:\r\n\nconst comp = resolveComponent('comp')\r\nconst foo = resolveDirective('foo')\r\nconst bar = resolveDirective('bar')\r\n\nreturn withDirectives(h(comp), [\r\n [foo, this.x],\r\n [bar, this.y]\r\n])\r\n*/\r\nconst isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');\r\nfunction validateDirectiveName(name) {\r\n if (isBuiltInDirective(name)) {\r\n warn('Do not use built-in directive ids as custom directive id: ' + name);\r\n }\r\n}\r\n/**\r\n * Adds directives to a VNode.\r\n */\r\nfunction withDirectives(vnode, directives) {\r\n const internalInstance = currentRenderingInstance;\r\n if (internalInstance === null) {\r\n (process.env.NODE_ENV !== 'production') && warn(`withDirectives can only be used inside render functions.`);\r\n return vnode;\r\n }\r\n const instance = internalInstance.proxy;\r\n const bindings = vnode.dirs || (vnode.dirs = []);\r\n for (let i = 0; i < directives.length; i++) {\r\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\r\n if (isFunction(dir)) {\r\n dir = {\r\n mounted: dir,\r\n updated: dir\r\n };\r\n }\r\n if (dir.deep) {\r\n traverse(value);\r\n }\r\n bindings.push({\r\n dir,\r\n instance,\r\n value,\r\n oldValue: void 0,\r\n arg,\r\n modifiers\r\n });\r\n }\r\n return vnode;\r\n}\r\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\r\n const bindings = vnode.dirs;\r\n const oldBindings = prevVNode && prevVNode.dirs;\r\n for (let i = 0; i < bindings.length; i++) {\r\n const binding = bindings[i];\r\n if (oldBindings) {\r\n binding.oldValue = oldBindings[i].value;\r\n }\r\n let hook = binding.dir[name];\r\n if (hook) {\r\n // disable tracking inside all lifecycle hooks\r\n // since they can potentially be called inside effects.\r\n pauseTracking();\r\n callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [\r\n vnode.el,\r\n binding,\r\n vnode,\r\n prevVNode\r\n ]);\r\n resetTracking();\r\n }\r\n }\r\n}\n\nfunction createAppContext() {\r\n return {\r\n app: null,\r\n config: {\r\n isNativeTag: NO,\r\n performance: false,\r\n globalProperties: {},\r\n optionMergeStrategies: {},\r\n errorHandler: undefined,\r\n warnHandler: undefined,\r\n compilerOptions: {}\r\n },\r\n mixins: [],\r\n components: {},\r\n directives: {},\r\n provides: Object.create(null),\r\n optionsCache: new WeakMap(),\r\n propsCache: new WeakMap(),\r\n emitsCache: new WeakMap()\r\n };\r\n}\r\nlet uid = 0;\r\nfunction createAppAPI(render, hydrate) {\r\n return function createApp(rootComponent, rootProps = null) {\r\n if (rootProps != null && !isObject(rootProps)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`root props passed to app.mount() must be an object.`);\r\n rootProps = null;\r\n }\r\n const context = createAppContext();\r\n const installedPlugins = new Set();\r\n let isMounted = false;\r\n const app = (context.app = {\r\n _uid: uid++,\r\n _component: rootComponent,\r\n _props: rootProps,\r\n _container: null,\r\n _context: context,\r\n _instance: null,\r\n version,\r\n get config() {\r\n return context.config;\r\n },\r\n set config(v) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`app.config cannot be replaced. Modify individual options instead.`);\r\n }\r\n },\r\n use(plugin, ...options) {\r\n if (installedPlugins.has(plugin)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Plugin has already been applied to target app.`);\r\n }\r\n else if (plugin && isFunction(plugin.install)) {\r\n installedPlugins.add(plugin);\r\n plugin.install(app, ...options);\r\n }\r\n else if (isFunction(plugin)) {\r\n installedPlugins.add(plugin);\r\n plugin(app, ...options);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`A plugin must either be a function or an object with an \"install\" ` +\r\n `function.`);\r\n }\r\n return app;\r\n },\r\n mixin(mixin) {\r\n if (__VUE_OPTIONS_API__) {\r\n if (!context.mixins.includes(mixin)) {\r\n context.mixins.push(mixin);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Mixin has already been applied to target app' +\r\n (mixin.name ? `: ${mixin.name}` : ''));\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Mixins are only available in builds supporting Options API');\r\n }\r\n return app;\r\n },\r\n component(name, component) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateComponentName(name, context.config);\r\n }\r\n if (!component) {\r\n return context.components[name];\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && context.components[name]) {\r\n warn(`Component \"${name}\" has already been registered in target app.`);\r\n }\r\n context.components[name] = component;\r\n return app;\r\n },\r\n directive(name, directive) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateDirectiveName(name);\r\n }\r\n if (!directive) {\r\n return context.directives[name];\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && context.directives[name]) {\r\n warn(`Directive \"${name}\" has already been registered in target app.`);\r\n }\r\n context.directives[name] = directive;\r\n return app;\r\n },\r\n mount(rootContainer, isHydrate, isSVG) {\r\n if (!isMounted) {\r\n const vnode = createVNode(rootComponent, rootProps);\r\n // store app context on the root VNode.\r\n // this will be set on the root instance on initial mount.\r\n vnode.appContext = context;\r\n // HMR root reload\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n context.reload = () => {\r\n render(cloneVNode(vnode), rootContainer, isSVG);\r\n };\r\n }\r\n if (isHydrate && hydrate) {\r\n hydrate(vnode, rootContainer);\r\n }\r\n else {\r\n render(vnode, rootContainer, isSVG);\r\n }\r\n isMounted = true;\r\n app._container = rootContainer;\r\n rootContainer.__vue_app__ = app;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n app._instance = vnode.component;\r\n devtoolsInitApp(app, version);\r\n }\r\n return getExposeProxy(vnode.component) || vnode.component.proxy;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`App has already been mounted.\\n` +\r\n `If you want to remount the same app, move your app creation logic ` +\r\n `into a factory function and create fresh app instances for each ` +\r\n `mount - e.g. \\`const createMyApp = () => createApp(App)\\``);\r\n }\r\n },\r\n unmount() {\r\n if (isMounted) {\r\n render(null, app._container);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n app._instance = null;\r\n devtoolsUnmountApp(app);\r\n }\r\n delete app._container.__vue_app__;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Cannot unmount an app that is not mounted.`);\r\n }\r\n },\r\n provide(key, value) {\r\n if ((process.env.NODE_ENV !== 'production') && key in context.provides) {\r\n warn(`App already provides property with key \"${String(key)}\". ` +\r\n `It will be overwritten with the new value.`);\r\n }\r\n // TypeScript doesn't allow symbols as index type\r\n // https://github.com/Microsoft/TypeScript/issues/24587\r\n context.provides[key] = value;\r\n return app;\r\n }\r\n });\r\n return app;\r\n };\r\n}\n\n/**\r\n * Function for handling a template ref\r\n */\r\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\r\n if (isArray(rawRef)) {\r\n rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));\r\n return;\r\n }\r\n if (isAsyncWrapper(vnode) && !isUnmount) {\r\n // when mounting async components, nothing needs to be done,\r\n // because the template ref is forwarded to inner component\r\n return;\r\n }\r\n const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */\r\n ? getExposeProxy(vnode.component) || vnode.component.proxy\r\n : vnode.el;\r\n const value = isUnmount ? null : refValue;\r\n const { i: owner, r: ref } = rawRef;\r\n if ((process.env.NODE_ENV !== 'production') && !owner) {\r\n warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +\r\n `A vnode with ref must be created inside the render function.`);\r\n return;\r\n }\r\n const oldRef = oldRawRef && oldRawRef.r;\r\n const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;\r\n const setupState = owner.setupState;\r\n // dynamic ref changed. unset old ref\r\n if (oldRef != null && oldRef !== ref) {\r\n if (isString(oldRef)) {\r\n refs[oldRef] = null;\r\n if (hasOwn(setupState, oldRef)) {\r\n setupState[oldRef] = null;\r\n }\r\n }\r\n else if (isRef(oldRef)) {\r\n oldRef.value = null;\r\n }\r\n }\r\n if (isFunction(ref)) {\r\n callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);\r\n }\r\n else {\r\n const _isString = isString(ref);\r\n const _isRef = isRef(ref);\r\n if (_isString || _isRef) {\r\n const doSet = () => {\r\n if (rawRef.f) {\r\n const existing = _isString ? refs[ref] : ref.value;\r\n if (isUnmount) {\r\n isArray(existing) && remove(existing, refValue);\r\n }\r\n else {\r\n if (!isArray(existing)) {\r\n if (_isString) {\r\n refs[ref] = [refValue];\r\n }\r\n else {\r\n ref.value = [refValue];\r\n if (rawRef.k)\r\n refs[rawRef.k] = ref.value;\r\n }\r\n }\r\n else if (!existing.includes(refValue)) {\r\n existing.push(refValue);\r\n }\r\n }\r\n }\r\n else if (_isString) {\r\n refs[ref] = value;\r\n if (hasOwn(setupState, ref)) {\r\n setupState[ref] = value;\r\n }\r\n }\r\n else if (isRef(ref)) {\r\n ref.value = value;\r\n if (rawRef.k)\r\n refs[rawRef.k] = value;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid template ref type:', ref, `(${typeof ref})`);\r\n }\r\n };\r\n if (value) {\r\n doSet.id = -1;\r\n queuePostRenderEffect(doSet, parentSuspense);\r\n }\r\n else {\r\n doSet();\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid template ref type:', ref, `(${typeof ref})`);\r\n }\r\n }\r\n}\n\nlet hasMismatch = false;\r\nconst isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';\r\nconst isComment = (node) => node.nodeType === 8 /* COMMENT */;\r\n// Note: hydration is DOM-specific\r\n// But we have to place it in core due to tight coupling with core - splitting\r\n// it out creates a ton of unnecessary complexity.\r\n// Hydration also depends on some renderer internal logic which needs to be\r\n// passed in via arguments.\r\nfunction createHydrationFunctions(rendererInternals) {\r\n const { mt: mountComponent, p: patch, o: { patchProp, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;\r\n const hydrate = (vnode, container) => {\r\n if (!container.hasChildNodes()) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Attempting to hydrate existing markup but container is empty. ` +\r\n `Performing full mount instead.`);\r\n patch(null, vnode, container);\r\n flushPostFlushCbs();\r\n return;\r\n }\r\n hasMismatch = false;\r\n hydrateNode(container.firstChild, vnode, null, null, null);\r\n flushPostFlushCbs();\r\n if (hasMismatch && !false) {\r\n // this error should show up in production\r\n console.error(`Hydration completed but contains mismatches.`);\r\n }\r\n };\r\n const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\r\n const isFragmentStart = isComment(node) && node.data === '[';\r\n const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);\r\n const { type, ref, shapeFlag } = vnode;\r\n const domType = node.nodeType;\r\n vnode.el = node;\r\n let nextNode = null;\r\n switch (type) {\r\n case Text:\r\n if (domType !== 3 /* TEXT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n if (node.data !== vnode.children) {\r\n hasMismatch = true;\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Hydration text mismatch:` +\r\n `\\n- Client: ${JSON.stringify(node.data)}` +\r\n `\\n- Server: ${JSON.stringify(vnode.children)}`);\r\n node.data = vnode.children;\r\n }\r\n nextNode = nextSibling(node);\r\n }\r\n break;\r\n case Comment:\r\n if (domType !== 8 /* COMMENT */ || isFragmentStart) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = nextSibling(node);\r\n }\r\n break;\r\n case Static:\r\n if (domType !== 1 /* ELEMENT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n // determine anchor, adopt content\r\n nextNode = node;\r\n // if the static vnode has its content stripped during build,\r\n // adopt it from the server-rendered HTML.\r\n const needToAdoptContent = !vnode.children.length;\r\n for (let i = 0; i < vnode.staticCount; i++) {\r\n if (needToAdoptContent)\r\n vnode.children += nextNode.outerHTML;\r\n if (i === vnode.staticCount - 1) {\r\n vnode.anchor = nextNode;\r\n }\r\n nextNode = nextSibling(nextNode);\r\n }\r\n return nextNode;\r\n }\r\n break;\r\n case Fragment:\r\n if (!isFragmentStart) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n break;\r\n default:\r\n if (shapeFlag & 1 /* ELEMENT */) {\r\n if (domType !== 1 /* ELEMENT */ ||\r\n vnode.type.toLowerCase() !==\r\n node.tagName.toLowerCase()) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n }\r\n else if (shapeFlag & 6 /* COMPONENT */) {\r\n // when setting up the render effect, if the initial vnode already\r\n // has .el set, the component will perform hydration instead of mount\r\n // on its sub-tree.\r\n vnode.slotScopeIds = slotScopeIds;\r\n const container = parentNode(node);\r\n mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized);\r\n // component may be async, so in the case of fragments we cannot rely\r\n // on component's rendered output to determine the end of the fragment\r\n // instead, we do a lookahead to find the end anchor node.\r\n nextNode = isFragmentStart\r\n ? locateClosingAsyncAnchor(node)\r\n : nextSibling(node);\r\n // #3787\r\n // if component is async, it may get moved / unmounted before its\r\n // inner component is loaded, so we need to give it a placeholder\r\n // vnode that matches its adopted DOM.\r\n if (isAsyncWrapper(vnode)) {\r\n let subTree;\r\n if (isFragmentStart) {\r\n subTree = createVNode(Fragment);\r\n subTree.anchor = nextNode\r\n ? nextNode.previousSibling\r\n : container.lastChild;\r\n }\r\n else {\r\n subTree =\r\n node.nodeType === 3 ? createTextVNode('') : createVNode('div');\r\n }\r\n subTree.el = node;\r\n vnode.component.subTree = subTree;\r\n }\r\n }\r\n else if (shapeFlag & 64 /* TELEPORT */) {\r\n if (domType !== 8 /* COMMENT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);\r\n }\r\n }\r\n else if (shapeFlag & 128 /* SUSPENSE */) {\r\n nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid HostVNode type:', type, `(${typeof type})`);\r\n }\r\n }\r\n if (ref != null) {\r\n setRef(ref, null, parentSuspense, vnode);\r\n }\r\n return nextNode;\r\n };\r\n const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\r\n optimized = optimized || !!vnode.dynamicChildren;\r\n const { type, props, patchFlag, shapeFlag, dirs } = vnode;\r\n // #4006 for form elements with non-string v-model value bindings\r\n // e.g.