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AAM,CACzC,GAAAA,EAAQ,OAAS,gBACZ,eAAQ,OAAOA,CAAO,EAG3B,IAAAvjB,EAgBA,GAfAujB,EAAQ,IACVvjB,EAAUujB,EAAQ,SAAS,SAAWA,EAAQ,SAAS,KAAO,mCACrDA,EAAQ,SACPvjB,EAAA,UAAUujB,EAAQ,SAAS,MAAM,GAClCA,EAAQ,QACPvjB,EAAA,uCAEAA,EAAA,sBAGZvE,EAAI,OAAO,CACT,KAAMuE,EACN,KAAM,QACP,EAEGujB,EAAQ,UAAU,MAAQ,eAAgB,CAC5C,MAAM+D,EAAe7E,GAAgB,EACrC6E,EAAa,eAAiB,GAChC,CAGK,eAAQ,OAAO/D,CAAO,EAC9B,EAEL,CAAC,EAEG,SACF,OAAO,aAAe,eAOxB9nB,EAAI,IAAI6zB,GAAqB,CAC3B,QAAUvyB,GAAS,CAsBjBtB,EAAI,KAAK,KAAK8zB,GAAkBxyB,EAAM,CAAE,aAAc,GAAO,EAEjE,CAAC,EACDtB,EAAI,IAAIgsB,EAAe,EAEvB1F,IAAiC,iBAAiB,UAAY1f,GAAU,CAClEA,GAAO,MAAM,OAAS,aAEfssB,IAAA,YAAY,CAAC,WAAW,CAAC,CAGtC,CAAC,EAED,IAAIlzB,EAAI,CACN,WAAY,UACV+zB,GACA,WAAAnI,EACF,EAEA,SAAU,CACD,OACL,IAAAoH,GACA,OAAQhzB,EAAI,MACd,CACF,EAEA,OAAAsR,GACA,QAAA0iB,GACA,MAAA1xB,GACA,OAAS8Q,GAAMA,EAAE6gB,EAAG,CACtB,CAAC,EAAE,OAAO,MAAM","names":["Vue","hasInjectionContext","getCurrentInstance","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","_a","now","ApiProxy","plugin","hook","defaultSettings","id","item","localSettingsSaveId","currentSettings","raw","data","value","pluginId","_target","prop","args","resolve","target","setupDevtoolsPlugin","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia","piniaSymbol","isPlainObject","o","MutationType","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","a","popup","force","isSafari","isChromeIOS","reader","toastMessage","message","type","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","loadStoresState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","state","key","storeState","formatDisplay","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","store","formatStoreForInspectorState","storeNames","storeMap","storeId","getters","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","wrapWithProxy","actions","storeActions","actionName","_actionId","trackedStore","retValue","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","ref","_p","noop","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","fallbackRunWithContext","fn","mergeReactiveObjects","patchToApply","subPatch","targetValue","isRef","isReactive","skipHydrateMap","shouldHydrate","obj","assign","isComputed","createOptionsStore","hot","initialState","setup","set","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","actionSubscriptions","debuggerEvents","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","newState","$state","wrapAction","action","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","stopWatcher","reactive","setupStore","actionValue","nonEnumerable","p","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","inject","mapState","keysOrMapper","reduced","storeKey","mapGetters","mapWritableState","storeToRefs","PiniaVuePlugin","_Vue","provideCache","v","SharedWorkerSupported","SharedWorkerPolyfill","transfer","listener","src_default","extend","b","encodeReserveRE","encodeReserveReplacer","c","commaRE","encode","str","decode","resolveQuery","query","extraQuery","_parseQuery","parse","parseQuery","parsedQuery","castQueryParamValue","res","param","parts","val","stringifyQuery","val2","x","trailingSlashRE","createRoute","record","location","redirectedFrom","router","clone","route","getFullPath","formatMatch","START","_stringifyQuery","hash","stringify","isSameRoute","onlyPath","isObjectEqual","aKeys","bKeys","i","aVal","bKey","bVal","isIncludedRoute","current","queryIncludes","handleRouteEntered","instance","cbs","i$1","View","_","props","children","parent","h","cache","depth","inactive","vnodeData","cachedData","cachedComponent","fillPropsinData","matched","component","vm","vnode","configProps","propsToPass","resolveProps","attrs","config","resolvePath","relative","base","append","firstChar","stack","segments","segment","parsePath","hashIndex","queryIndex","cleanPath","isarray","arr","pathToRegexp_1","pathToRegexp","parse_1","compile_1","compile","tokensToFunction_1","tokensToFunction","tokensToRegExp_1","tokensToRegExp","PATH_REGEXP","tokens","index","defaultDelimiter","m","escaped","offset","next","prefix","capture","group","modifier","asterisk","partial","repeat","optional","delimiter","pattern","escapeGroup","escapeString","encodeURIComponentPretty","encodeAsterisk","matches","flags","token","j","attachKeys","re","keys","regexpToRegexp","groups","arrayToRegexp","regexp","stringToRegexp","strict","end","endsWithDelimiter","regexpCompileCache","fillParams","params","routeMsg","filler","normalizeLocation","params$1","rawPath","parsedPath","basePath","toTypes","eventTypes","Link","this$1$1","href","classes","globalActiveClass","globalExactActiveClass","activeClassFallback","exactActiveClassFallback","activeClass","exactActiveClass","compareTarget","ariaCurrentValue","handler","e","guardEvent","on","scopedSlot","findAnchor","aData","handler$1","event$1","aAttrs","child","install","isDef","registerInstance","callVal","strats","inBrowser","createRouteMap","routes","oldPathList","oldPathMap","oldNameMap","parentRoute","pathList","pathMap","nameMap","addRouteRecord","l","matchAs","pathToRegexpOptions","normalizedPath","normalizePath","compileRouteRegex","childMatchAs","aliases","alias","aliasRoute","regex","createMatcher","addRoutes","addRoute","parentOrRoute","getRoutes","match","currentRoute","_createRoute","paramNames","record$1","matchRoute","redirect","originalRedirect","resolveRecordPath","resolvedPath","aliasedPath","aliasedMatch","aliasedRecord","len","Time","genStateKey","_key","getStateKey","setStateKey","positionStore","setupScroll","protocolAndPath","absolutePath","stateCopy","handlePopState","handleScroll","to","from","isPop","behavior","position","getScrollPosition","shouldScroll","scrollToPosition","err","saveScrollPosition","getElementPosition","el","docEl","docRect","elRect","isValidPosition","isNumber","normalizePosition","normalizeOffset","hashStartsWithNumberRE","isObject","supportsPushState","ua","pushState","replace","history","replaceState","NavigationFailureType","createNavigationRedirectedError","createRouterError","stringifyRoute","createNavigationDuplicatedError","createNavigationCancelledError","createNavigationAbortedError","propertiesToLog","isError","isNavigationFailure","errorType","runQueue","queue","cb","step","resolveAsyncComponents","hasAsync","pending","flatMapComponents","def","once","resolvedDef","isESModule","reason","msg","comp","flatten","hasSymbol","called","History","normalizeBase","errorCb","onComplete","onAbort","prev","abort","lastRouteIndex","lastCurrentIndex","resolveQueue","updated","deactivated","activated","extractLeaveGuards","extractUpdateHooks","iterator","enterGuards","extractEnterGuards","cleanupListener","baseEl","max","extractGuards","records","bind","reverse","guards","guard","extractGuard","bindGuard","bindEnterGuard","HTML5History","getLocation","expectScroll","supportsScroll","handleRoutingEvent","fromRoute","push","pathLowerCase","baseLowerCase","HashHistory","fallback","checkFallback","ensureSlash","getHash","replaceHash","eventType","pushHash","getUrl","AbstractHistory","targetIndex","VueRouter","mode","prototypeAccessors","handleInitialScroll","routeOrError","setupListeners","registerHook","n","fullPath","createHref","VueRouter$1","list","lastSelectedCompanyKey","lastSelectedRoleKey","getLastSessionSelectedCompany","setLastSessionSelectedCompany","getLastSelectedRole","setLastSelectedRole","role","removeLastSessionSelectedCompany","companyDelete","companyAdd","companyUpdate","companyBilling","companyInvestmentStats","companyAvailableDocuments","profileGet","profileTaskData","signalrMethods","defaultBroadcastServiceSender","defaultBroadcastServiceReceiver","lastSelectedCompany","investorRegistrationTasksTypes","investorProfileRegistrationTasksTypes","billingAccountTypeBySide","updateBillingData","fired_utc_at","tp","incomingBillingData","lsDismissQualifiedInvestorCardKey","useProfileStore","shallowRef","readonly","roleSide","companyId","company","side","billingDataAcc","acc","regState","lastTaskState","formatPhone","billingDataAccItemById","companyType","wrapper","apiResponse","newUserid","borrowerTask","investorTask","investorProfileTask","borrowerProfileTask","task","filtered","response","tabInfo","AcceptAutoApp","defineAsyncComponent","ApiKeys","CardealerSubjects","ChangePassword","ChooseInvestorAutoPanel","ConfirmDialog","EarlyRepayment","InvestBuy","InvestSell","Invest","PayPenalty","RepaymentDetail","RequisiteAdd","SettingAutoWallet","SmsSign","TaxiparkSubjects","Tickets","Topup","TransactionDetail","TransferMoney","Withdrawals","findById","sidePanel","findByName","useSidepanelStore","length","closeVisible","SidePanels","activeSidePanel","firstArgumentType","comparator","cabinetRoutes","applicationable","mixins","PositionableFactory","newVal","oldVal","__unplugin_components_0","VSheet","Applicationable","SSRBootable","height","convertToUnit","_sfc_main","defineComponent","CabinetLayout","__vitePreload","SimpleLayout","RoleBasedCabinetSidebar","SimpleGridView","SiteFooter","profileStore","finalCompanyId","legacyCabinetRoutes","CustomVueRouter","exception","initialSearchParams","currentSide","toRegisterBorrowerRoute","queryRole","freeGlobal","freeSelf","root","reWhitespace","trimmedEndIndex","string","reTrimStart","baseTrim","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","isOwn","tag","unmasked","objectToString","nullTag","undefinedTag","baseGetTag","isObjectLike","symbolTag","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","other","isBinary","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","script","this$1","fragment","mutations","shouldMove","mutation","filteredAddedNodes","childChangeRecord","normalizeComponent","template","style","scopeId","isFunctionalTemplate","moduleIdentifier","shadowMode","createInjector","createInjectorSSR","createInjectorShadow","context","originalRender","existing","isOldIE","addStyle","HEAD","styles","css","code","textNode","nodes","__vue_script__","__vue_render__","_vm","_h","_c","__vue_staticRenderFns__","__vue_inject_styles__","__vue_scope_id__","__vue_module_identifier__","__vue_is_functional_template__","__vue_component__","GlobalVue","Teleport","hideLoaderDebouncer","activeRequests","bus","mitt","signalr","SharedWorker","busSignalrEventType","ChangeTitlePlugin","NotificationsPlugin","onSignalrEvent","busHandler","originalDispose","HttpPlugin","request","selectedCompanyId","ErrorTrackingPlugin","errortrackingNew","SiteLogo","vuetify","App"],"ignoreList":[0,1,2,3,4,5,6,7,8,37,38,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56],"sources":["../../../../../home/build/node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../../../../home/build/node_modules/@vue/devtools-api/lib/esm/env.js","../../../../../home/build/node_modules/@vue/devtools-api/lib/esm/const.js","../../../../../home/build/node_modules/@vue/devtools-api/lib/esm/time.js","../../../../../home/build/node_modules/@vue/devtools-api/lib/esm/proxy.js","../../../../../home/build/node_modules/@vue/devtools-api/lib/esm/index.js","../../../../../home/build/node_modules/pinia/dist/pinia.mjs","../../../../../home/build/node_modules/@okikio/sharedworker/lib/index.js","../../../../../home/build/node_modules/vue-router/dist/vue-router.esm.js","../../src/constants/storage-keys.js","../../src/api/endpoints/user-company.ts","../../src/constants/signalr-methods.ts","../../src/utils/broadcast-service.ts","../../src/store/profile.ts","../../src/components/side-panels/accept-auto-app/index.ts","../../src/components/side-panels/api-keys/index.ts","../../src/components/side-panels/cardealer-subjects/index.ts","../../src/components/side-panels/change-password/index.ts","../../src/components/side-panels/choose-investor-auto/index.ts","../../src/components/side-panels/confirm-dialog/index.ts","../../src/components/side-panels/early-repayment/index.ts","../../src/components/side-panels/invest-buy/index.ts","../../src/components/side-panels/invest-sell/index.ts","../../src/components/side-panels/invest/index.ts","../../src/components/side-panels/pay-penalty/index.ts","../../src/components/side-panels/repayment-detail/index.ts","../../src/components/side-panels/requisite-add/index.ts","../../src/components/side-panels/setting-auto-wallet/index.ts","../../src/components/side-panels/sms-sign/index.ts","../../src/components/side-panels/taxipark-subjects/index.ts","../../src/components/side-panels/tickets/index.ts","../../src/components/side-panels/topup/index.ts","../../src/components/side-panels/transaction-detail/index.ts","../../src/components/side-panels/transfer-money/index.ts","../../src/components/side-panels/withdrawals/index.ts","../../src/store/side-panel.ts","../../src/router/legacy-routes.ts","../../../../../home/build/node_modules/vuetify/lib/mixins/applicationable/index.js","../../../../../home/build/node_modules/vuetify/lib/components/VFooter/VFooter.js","../../src/components/common/SiteFooter.vue","../../src/router/routes.ts","../../src/router/index.ts","../../../../../home/build/node_modules/lodash-es/isObject.js","../../../../../home/build/node_modules/lodash-es/_freeGlobal.js","../../../../../home/build/node_modules/lodash-es/_root.js","../../../../../home/build/node_modules/lodash-es/now.js","../../../../../home/build/node_modules/lodash-es/_trimmedEndIndex.js","../../../../../home/build/node_modules/lodash-es/_baseTrim.js","../../../../../home/build/node_modules/lodash-es/_Symbol.js","../../../../../home/build/node_modules/lodash-es/_getRawTag.js","../../../../../home/build/node_modules/lodash-es/_objectToString.js","../../../../../home/build/node_modules/lodash-es/_baseGetTag.js","../../../../../home/build/node_modules/lodash-es/isObjectLike.js","../../../../../home/build/node_modules/lodash-es/isSymbol.js","../../../../../home/build/node_modules/lodash-es/toNumber.js","../../../../../home/build/node_modules/lodash-es/debounce.js","../../../../../home/build/node_modules/vue2-teleport/dist/teleport.esm.js","../../src/App.vue","../../src/app-main.js"],"sourcesContent":["import Vue from 'vue'\nimport { getCurrentInstance } from 'vue'\n\nvar isVue2 = true\nvar isVue3 = false\nvar Vue2 = Vue\nvar warn = Vue.util.warn\n\nfunction install() {}\n\n// createApp polyfill\nexport function createApp(rootComponent, rootProps) {\n var vm\n var provide = {}\n var app = {\n config: Vue.config,\n use: Vue.use.bind(Vue),\n mixin: Vue.mixin.bind(Vue),\n component: Vue.component.bind(Vue),\n provide: function (key, value) {\n provide[key] = value\n return this\n },\n directive: function (name, dir) {\n if (dir) {\n Vue.directive(name, dir)\n return app\n } else {\n return Vue.directive(name)\n }\n },\n mount: function (el, hydrating) {\n if (!vm) {\n vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))\n vm.$mount(el, hydrating)\n return vm\n } else {\n return vm\n }\n },\n unmount: function () {\n if (vm) {\n vm.$destroy()\n vm = undefined\n }\n },\n }\n return app\n}\n\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n warn\n}\n\n// Vue 3 components mock\nfunction createMockComponent(name) {\n return {\n setup() {\n throw new Error('[vue-demi] ' + name + ' is not supported in Vue 2. It\\'s provided to avoid compiler errors.')\n }\n }\n}\nexport var Fragment = /*#__PURE__*/ createMockComponent('Fragment')\nexport var Transition = /*#__PURE__*/ createMockComponent('Transition')\nexport var TransitionGroup = /*#__PURE__*/ createMockComponent('TransitionGroup')\nexport var Teleport = /*#__PURE__*/ createMockComponent('Teleport')\nexport var Suspense = /*#__PURE__*/ createMockComponent('Suspense')\nexport var KeepAlive = /*#__PURE__*/ createMockComponent('KeepAlive')\n\nexport * from 'vue'\n\n// Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance()\nexport function hasInjectionContext() {\n return !!getCurrentInstance()\n}\n","export function getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n // @ts-expect-error navigator and windows are not available in all environments\n return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n","export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n","let supported;\nlet perf;\nexport function isPerformanceSupported() {\n var _a;\n if (supported !== undefined) {\n return supported;\n }\n if (typeof window !== 'undefined' && window.performance) {\n supported = true;\n perf = window.performance;\n }\n else if (typeof globalThis !== 'undefined' && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = globalThis.perf_hooks.performance;\n }\n else {\n supported = false;\n }\n return supported;\n}\nexport function now() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\n","import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n }\n catch (e) {\n // noop\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n }\n catch (e) {\n // noop\n }\n currentSettings = value;\n },\n now() {\n return now();\n },\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n }\n else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args,\n });\n };\n }\n },\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n }\n else if (prop === 'on') {\n return this.proxiedOn;\n }\n else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => { },\n });\n return this.fallbacks[prop](...args);\n };\n }\n else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve,\n });\n });\n };\n }\n },\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\n","import { getDevtoolsGlobalHook, getTarget, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from './proxy.js';\nexport * from './api/index.js';\nexport * from './plugin.js';\nexport * from './time.js';\nexport function setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n }\n else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy,\n });\n if (proxy) {\n setupFn(proxy.proxiedTarget);\n }\n }\n}\n","/*!\n * pinia v2.1.7\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, del, nextTick, computed, toRefs } from 'vue-demi';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n return (o &&\n typeof o === 'object' &&\n Object.prototype.toString.call(o) === '[object Object]' &&\n typeof o.toJSON !== 'function');\n}\n// type DeepReadonly = { readonly [P in keyof T]: DeepReadonly }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n /**\n * Direct mutation of the state:\n *\n * - `store.name = 'new name'`\n * - `store.$state.name = 'new name'`\n * - `store.list.push('new item')`\n */\n MutationType[\"direct\"] = \"direct\";\n /**\n * Mutated the state with `$patch` and an object\n *\n * - `store.$patch({ name: 'newName' })`\n */\n MutationType[\"patchObject\"] = \"patch object\";\n /**\n * Mutated the state with `$patch` and a function\n *\n * - `store.$patch(state => state.name = 'newName')`\n */\n MutationType[\"patchFunction\"] = \"patch function\";\n // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\nconst IS_CLIENT = typeof window !== 'undefined';\n/**\n * Should we add the devtools plugins.\n * - only if dev mode or forced through the prod devtools flag\n * - not in test\n * - only if window exists (could change in the future)\n */\nconst USE_DEVTOOLS = ((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test') && IS_CLIENT;\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n ? window\n : typeof self === 'object' && self.self === self\n ? self\n : typeof global === 'object' && global.global === global\n ? global\n : typeof globalThis === 'object'\n ? globalThis\n : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n xhr.onload = function () {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function () {\n console.error('could not download file');\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false);\n try {\n xhr.send();\n }\n catch (e) { }\n return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent('click'));\n }\n catch (e) {\n const evt = document.createEvent('MouseEvents');\n evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = \n typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n /AppleWebKit/.test(_navigator.userAgent) &&\n !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n ? () => { } // noop\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== 'undefined' &&\n 'download' in HTMLAnchorElement.prototype &&\n !isMacOSWebView\n ? downloadSaveAs\n : // Use msSaveOrOpenBlob as a second approach\n 'msSaveOrOpenBlob' in _navigator\n ? msSaveAs\n : // Fallback to using FileReader and a popup\n fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n const a = document.createElement('a');\n a.download = name;\n a.rel = 'noopener'; // tabnabbing\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n }\n else {\n a.target = '_blank';\n click(a);\n }\n }\n else {\n click(a);\n }\n }\n else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function () {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function () {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n }\n else {\n const a = document.createElement('a');\n a.href = blob;\n a.target = '_blank';\n setTimeout(function () {\n click(a);\n });\n }\n }\n else {\n // @ts-ignore: works on windows\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank');\n if (popup) {\n popup.document.title = popup.document.body.innerText = 'downloading...';\n }\n if (typeof blob === 'string')\n return download(blob, name, opts);\n const force = blob.type === 'application/octet-stream';\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n const reader = new FileReader();\n reader.onloadend = function () {\n let url = reader.result;\n if (typeof url !== 'string') {\n popup = null;\n throw new Error('Wrong reader.result type');\n }\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n if (popup) {\n popup.location.href = url;\n }\n else {\n location.assign(url);\n }\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n }\n else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n const piniaMessage = '🍍 ' + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n // No longer available :(\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n }\n else if (type === 'error') {\n console.error(piniaMessage);\n }\n else if (type === 'warn') {\n console.warn(piniaMessage);\n }\n else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n if (!('clipboard' in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error &&\n error.message.toLowerCase().includes('document is not focused')) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n toastMessage('Global state copied to clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n toastMessage('Global state pasted from clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia) {\n try {\n saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n type: 'text/plain;charset=utf-8',\n }), 'pinia-state.json');\n }\n catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.json';\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n // @ts-ignore: TODO: changed from 4.3 to 4.4\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n try {\n const open = getFileOpener();\n const result = await open();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n }\n catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nfunction loadStoresState(pinia, state) {\n for (const key in state) {\n const storeState = pinia.state.value[key];\n // store is already instantiated, patch it\n if (storeState) {\n Object.assign(storeState, state[key]);\n }\n else {\n // store is not instantiated, set the initial state\n pinia.state.value[key] = state[key];\n }\n }\n}\n\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store)\n ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL,\n }\n : {\n id: store.$id,\n label: store.$id,\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId],\n })),\n getters: storeNames\n .filter((id) => storeMap.get(id)._getters)\n .map((id) => {\n const store = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store._getters.reduce((getters, key) => {\n getters[key] = store[key];\n return getters;\n }, {}),\n };\n }),\n };\n return state;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key],\n })),\n };\n // avoid adding empty getters\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName],\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key],\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n // TODO: handle add and delete for arrays and objects\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {},\n });\n }\n else {\n return {\n operation: formatDisplay(events.type),\n key: formatDisplay(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue,\n };\n }\n}\nfunction formatMutationType(type) {\n switch (type) {\n case MutationType.direct:\n return 'mutation';\n case MutationType.patchFunction:\n return '$patch';\n case MutationType.patchObject:\n return '$patch';\n default:\n return 'unknown';\n }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n }, (api) => {\n if (typeof api.now !== 'function') {\n toastMessage('You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 0xe5df88,\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Pinia 🍍',\n icon: 'storage',\n treeFilterPlaceholder: 'Search stores',\n actions: [\n {\n icon: 'content_copy',\n action: () => {\n actionGlobalCopyState(pinia);\n },\n tooltip: 'Serialize and copy the state',\n },\n {\n icon: 'content_paste',\n action: async () => {\n await actionGlobalPasteState(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Replace the state with the content of your clipboard',\n },\n {\n icon: 'save',\n action: () => {\n actionGlobalSaveState(pinia);\n },\n tooltip: 'Save the state as a JSON file',\n },\n {\n icon: 'folder_open',\n action: async () => {\n await actionGlobalOpenStateFile(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Import the state from a JSON file',\n },\n ],\n nodeActions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n }\n else if (typeof store.$reset !== 'function') {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n }\n else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n },\n },\n ],\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = (payload.componentInstance &&\n payload.componentInstance.proxy);\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'state',\n editable: true,\n value: store._isOptionsAPI\n ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state of this store',\n action: () => store.$reset(),\n },\n ],\n },\n }\n : // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {}),\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'getters',\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n }\n catch (error) {\n // @ts-expect-error: we just want to show it in devtools\n getters[key] = error;\n }\n return getters;\n }, {}),\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia];\n stores = stores.concat(Array.from(pinia._s.values()));\n payload.rootNodes = (payload.filter\n ? stores.filter((store) => '$id' in store\n ? store.$id\n .toLowerCase()\n .includes(payload.filter.toLowerCase())\n : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n // this could be the selected store restored for a different project\n // so it's better not to say anything here\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n // access only the state\n if (path.length !== 1 ||\n !inspectedStore._customProperties.has(path[0]) ||\n path[0] in inspectedStore.$state) {\n path.unshift('$state');\n }\n }\n else {\n // Root access, we can omit the `.value` because the devtools API does it for us\n path.unshift('state');\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith('🍍')) {\n const storeId = payload.type.replace(/^🍍\\s*/, '');\n const store = pinia._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (path[0] !== 'state') {\n return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n }\n // rewrite the first entry to be able to directly set the state as\n // well as any other path\n path[0] = '$state';\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: 'Notify about new/deleted stores',\n type: 'boolean',\n defaultValue: true,\n },\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n },\n }, (api) => {\n // gracefully handle errors\n const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛫 ' + name,\n subtitle: 'start',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n },\n groupId,\n },\n });\n after((result) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛬 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n result,\n },\n groupId,\n },\n });\n });\n onError((error) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n logType: 'error',\n title: '💥 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n error,\n },\n groupId,\n },\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: 'Change',\n subtitle: name,\n data: {\n newValue,\n oldValue,\n },\n groupId: activeAction,\n },\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n // rootStore.state[store.id] = state\n const eventData = {\n time: now(),\n title: formatMutationType(type),\n data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n groupId: activeAction,\n };\n if (type === MutationType.patchFunction) {\n eventData.subtitle = '⤵️';\n }\n else if (type === MutationType.patchObject) {\n eventData.subtitle = '🧩';\n }\n else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data['rawEvent(s)'] = {\n _custom: {\n display: 'DebuggerEvent',\n type: 'object',\n tooltip: 'raw DebuggerEvent[]',\n value: events,\n },\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData,\n });\n }, { detached: true, flush: 'sync' });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🔥 ' + store.$id,\n subtitle: 'HMR update',\n data: {\n store: formatDisplay(store.$id),\n info: formatDisplay(`HMR update`),\n },\n },\n });\n // update the devtools too\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n // trigger an update so it can display new registered stores\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n // original actions of the store as they are given by pinia. We are going to override them\n const actions = actionNames.reduce((storeActions, actionName) => {\n // use toRaw to avoid tracking #541\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function () {\n // the running action id is incremented in a before action hook\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy\n ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n },\n })\n : store;\n // For Setup Stores we need https://github.com/tc39/proposal-async-context\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n activeAction = undefined;\n return retValue;\n };\n }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n // HMR module\n if (store.$id.startsWith('__hot:')) {\n return;\n }\n // detect option api vs setup api\n store._isOptionsAPI = !!options.state;\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n // Upgrade the HMR to also update the new actions\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function (newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n addStoreToDevtools(app, \n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n const scope = effectScope(true);\n // NOTE: here we could check the window object for a state and directly set it\n // if there is anything like it with Vue 3 SSR\n const state = scope.run(() => ref({}));\n let _p = [];\n // plugins added before calling app.use(pinia)\n let toBeInstalled = [];\n const pinia = markRaw({\n install(app) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n if (!isVue2) {\n pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n }\n else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: new Map(),\n state,\n });\n // pinia devtools rely on dev only features so they cannot be forced unless\n // the dev build of Vue is used. Avoid old browsers like IE11.\n if (USE_DEVTOOLS && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in oldState) {\n const subPatch = oldState[key];\n // skip the whole sub tree\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n }\n else {\n // objects are either a bit more complex (e.g. refs) or primitives, so we\n // just set the whole thing\n if (isVue2) {\n set(newState, key, subPatch);\n }\n else {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n * import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n // strip as much as possible from iife.prod\n if (!(process.env.NODE_ENV !== 'production')) {\n return () => { };\n }\n return (newModule) => {\n const pinia = hot.data.pinia || initialUseStore._pinia;\n if (!pinia) {\n // this store is still not used\n return;\n }\n // preserve the pinia instance across loads\n hot.data.pinia = pinia;\n // console.log('got data', newStore)\n for (const exportName in newModule) {\n const useStore = newModule[exportName];\n // console.log('checking for', exportName)\n if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n // console.log('Accepting update for', useStore.$id)\n const id = useStore.$id;\n if (id !== initialUseStore.$id) {\n console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n // return import.meta.hot.invalidate()\n return hot.invalidate();\n }\n const existingStore = pinia._s.get(id);\n if (!existingStore) {\n console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n return;\n }\n useStore(pinia, existingStore);\n }\n }\n };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\nfunction mergeReactiveObjects(target, patchToApply) {\n // Handle Map instances\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n // Handle Set instances\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n target.hasOwnProperty(key) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n }\n else {\n // @ts-expect-error: subPatch is a valid value\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n ? Symbol('pinia:skipHydration')\n : /* istanbul ignore next */ Symbol();\nconst skipHydrateMap = /*#__PURE__*/ new WeakMap();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n return isVue2\n ? // in @vue/composition-api, the refs are sealed so defineProperty doesn't work...\n /* istanbul ignore next */ skipHydrateMap.set(obj, 1) && obj\n : Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n return isVue2\n ? /* istanbul ignore next */ !skipHydrateMap.has(obj)\n : !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n if (isVue2) {\n set(pinia.state.value, id, state ? state() : {});\n }\n else {\n pinia.state.value[id] = state ? state() : {};\n }\n }\n // avoid creating a state in pinia.state.value\n const localState = (process.env.NODE_ENV !== 'production') && hot\n ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n : toRefs(pinia.state.value[id]);\n return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if ((process.env.NODE_ENV !== 'production') && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia);\n // it was created just before\n const store = pinia._s.get(id);\n // allow cross using stores\n /* istanbul ignore next */\n if (isVue2 && !store._r)\n return;\n // @ts-expect-error\n // return getters![name].call(context, context)\n // TODO: avoid reading the getter while assigning with a global variable\n return getters[name].call(store, store);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign({ actions: {} }, options);\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n throw new Error('Pinia destroyed');\n }\n // watcher options for $subscribe\n const $subscribeOptions = {\n deep: true,\n // flush: 'post',\n };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production') && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n /* istanbul ignore else */\n if (isListening) {\n debuggerEvents = event;\n // avoid triggering this while the store is being built and the state is being set in pinia\n }\n else if (isListening == false && !store._hotUpdating) {\n // let patch send all the events together later\n /* istanbul ignore else */\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n }\n else {\n console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n }\n }\n };\n }\n // internal state\n let isListening; // set to true at the end\n let isSyncListening; // set to true at the end\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia.state.value[$id];\n // avoid setting the state for option stores if it is set\n // by the setup\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n if (isVue2) {\n set(pinia.state.value, $id, {});\n }\n else {\n pinia.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n // avoid triggering too many listeners\n // https://github.com/vuejs/pinia/issues/1129\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n // reset the debugger events since patches are sync\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === 'function') {\n partialStateOrMutator(pinia.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n else {\n mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n const myListenerId = (activeListener = Symbol());\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n // because we paused the watcher, we need to manually call the subscriptions\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n }\n const $reset = isOptionsStore\n ? function $reset() {\n const { state } = options;\n const newState = state ? state() : {};\n // we use a patch to group all changes into one single subscription\n this.$patch(($state) => {\n assign($state, newState);\n });\n }\n : /* istanbul ignore next */\n (process.env.NODE_ENV !== 'production')\n ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n }\n : noop;\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia._s.delete($id);\n }\n /**\n * Wraps an action to handle subscriptions.\n *\n * @param name - name of the action\n * @param action - action to wrap\n * @returns a wrapped action to handle subscriptions\n */\n function wrapAction(name, action) {\n return function () {\n setActivePinia(pinia);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n // @ts-expect-error\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n // handle sync errors\n }\n catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret\n .then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n })\n .catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n // trigger after callbacks\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /*#__PURE__*/ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState,\n });\n const partialStore = {\n _p: pinia,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n if (options.flush === 'sync' ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents,\n }, state);\n }\n }, assign({}, $subscribeOptions, options)));\n return removeSubscription;\n },\n $dispose,\n };\n /* istanbul ignore if */\n if (isVue2) {\n // start as non ready\n partialStore._r = false;\n }\n const store = reactive((process.env.NODE_ENV !== 'production') || USE_DEVTOOLS\n ? assign({\n _hmrPayload,\n _customProperties: markRaw(new Set()), // devtools custom properties\n }, partialStore\n // must be added later\n // setupStore\n )\n : partialStore);\n // store the partial store now so the setup of stores can instantiate each other before they are finished without\n // creating infinite loops.\n pinia._s.set($id, store);\n const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(setup)));\n // overwrite existing actions to support $onAction\n for (const key in setupStore) {\n const prop = setupStore[key];\n if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n // mark it as a piece of state to be serialized\n if ((process.env.NODE_ENV !== 'production') && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n // createOptionStore directly sets the state in pinia.state.value so we\n // can just skip that\n }\n else if (!isOptionsStore) {\n // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n }\n else {\n // probably a reactive object, lets recursively assign\n // @ts-expect-error: prop is unknown\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n // transfer the ref to the pinia state to keep everything in sync\n /* istanbul ignore if */\n if (isVue2) {\n set(pinia.state.value[$id], key, prop);\n }\n else {\n pinia.state.value[$id][key] = prop;\n }\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.state.push(key);\n }\n // action\n }\n else if (typeof prop === 'function') {\n // @ts-expect-error: we are overriding the function we avoid wrapping if\n const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : wrapAction(key, prop);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n /* istanbul ignore if */\n if (isVue2) {\n set(setupStore, key, actionValue);\n }\n else {\n // @ts-expect-error\n setupStore[key] = actionValue;\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.actions[key] = prop;\n }\n // list actions so they can be used in plugins\n // @ts-expect-error\n optionsForPlugin.actions[key] = prop;\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n // add getters for devtools\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore\n ? // @ts-expect-error\n options.getters[key]\n : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters ||\n // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n // add the state, getters, and action properties\n /* istanbul ignore if */\n if (isVue2) {\n Object.keys(setupStore).forEach((key) => {\n set(store, key, setupStore[key]);\n });\n }\n else {\n assign(store, setupStore);\n // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n // Make `storeToRefs()` work with `reactive()` #799\n assign(toRaw(store), setupStore);\n }\n // use this instead of a computed with setter to be able to create it anywhere\n // without linking the computed lifespan to wherever the store is first\n // created.\n Object.defineProperty(store, '$state', {\n get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n set: (state) => {\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && hot) {\n throw new Error('cannot set hotState');\n }\n $patch(($state) => {\n assign($state, state);\n });\n },\n });\n // add the hotUpdate before plugins to allow them to override it\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === 'object' &&\n isPlainObject(newStateTarget) &&\n isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n }\n else {\n // transfer the ref\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n // patch direct access properties to allow store.stateProperty to work as\n // store.$state.stateProperty\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n // remove deleted state properties\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n // avoid devtools logging this as a mutation\n isListening = false;\n isSyncListening = false;\n pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n // TODO: does this work in both setup and option store?\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore\n ? // special handling of options api\n computed(() => {\n setActivePinia(pinia);\n return getter.call(store, store);\n })\n : getter;\n set(store, getterName, getterValue);\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n // update the values used in devtools and to allow deleting new properties later on\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false,\n };\n ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n });\n }\n /* istanbul ignore if */\n if (isVue2) {\n // mark the store as ready before plugins\n store._r = true;\n }\n // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign(store, extensions);\n }\n else {\n assign(store, scope.run(() => extender({\n store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n })));\n }\n });\n if ((process.env.NODE_ENV !== 'production') &&\n store.$state &&\n typeof store.$state === 'object' &&\n typeof store.$state.constructor === 'function' &&\n !store.$state.constructor.toString().includes('[native code]')) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n `\\tstate: () => new MyClass()\\n` +\n `Found in store \"${store.$id}\".`);\n }\n // only apply hydrate to option stores with an initial state in pinia\n if (initialState &&\n isOptionsStore &&\n options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(\n// TODO: add proper types from above\nidOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === 'function';\n if (typeof idOrOptions === 'string') {\n id = idOrOptions;\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\n }\n else {\n options = idOrOptions;\n id = idOrOptions.id;\n if ((process.env.NODE_ENV !== 'production') && typeof id !== 'string') {\n throw new Error(`[🍍]: \"defineStore()\" must be passed a store id as its first argument.`);\n }\n }\n function useStore(pinia, hot) {\n const hasContext = hasInjectionContext();\n pinia =\n // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia)\n setActivePinia(pinia);\n if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n `This will fail in production.`);\n }\n pinia = activePinia;\n if (!pinia._s.has(id)) {\n // creating the store registers it in `pinia._s`\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia);\n }\n else {\n createOptionsStore(id, options, pinia);\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n // @ts-expect-error: not the right inferred type\n useStore._pinia = pinia;\n }\n }\n const store = pinia._s.get(id);\n if ((process.env.NODE_ENV !== 'production') && hot) {\n const hotId = '__hot:' + id;\n const newStore = isSetupStore\n ? createSetupStore(hotId, setup, options, pinia, true)\n : createOptionsStore(hotId, assign({}, options), pinia, true);\n hot._hotUpdate(newStore);\n // cleanup the state properties and the store from the cache\n delete pinia.state.value[hotId];\n pinia._s.delete(hotId);\n }\n if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n // save stores in instances to access them devtools\n if (currentInstance &&\n currentInstance.proxy &&\n // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n cache[id] = store;\n }\n }\n // StoreGeneric cannot be casted towards Store\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n * computed: {\n * // other computed properties\n * ...mapStores(useUserStore, useCartStore)\n * },\n *\n * created() {\n * this.userStore // store with id \"user\"\n * this.cartStore // store with id \"cart\"\n * }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n `Replace\\n` +\n `\\tmapStores([useAuthStore, useCartStore])\\n` +\n `with\\n` +\n `\\tmapStores(useAuthStore, useCartStore)\\n` +\n `This will fail in production if not fixed.`);\n stores = stores[0];\n }\n return stores.reduce((reduced, useStore) => {\n // @ts-expect-error: $id is added by defineStore\n reduced[useStore.$id + mapStoreSuffix] = function () {\n return useStore(this.$pinia);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = function () {\n return useStore(this.$pinia)[key];\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function () {\n const store = useStore(this.$pinia);\n const storeKey = keysOrMapper[key];\n // for some reason TS is unable to infer the type of storeKey to be a\n // function\n return typeof storeKey === 'function'\n ? storeKey.call(this, store)\n : store[storeKey];\n };\n return reduced;\n }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n return useStore(this.$pinia)[key](...args);\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n return useStore(this.$pinia)[keysOrMapper[key]](...args);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-ignore\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n // it's easier to type it here as any\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-ignore\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\n // it's easier to type it here as any\n return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n },\n };\n return reduced;\n }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n // See https://github.com/vuejs/pinia/issues/852\n // It's easier to just use toRefs() even if it includes more stuff\n if (isVue2) {\n // @ts-expect-error: toRefs include methods and others\n return toRefs(store);\n }\n else {\n store = toRaw(store);\n const refs = {};\n for (const key in store) {\n const value = store[key];\n if (isRef(value) || isReactive(value)) {\n // @ts-expect-error: the key is state or getter\n refs[key] =\n // ---\n toRef(store, key);\n }\n }\n return refs;\n }\n}\n\n/**\n * Vue 2 Plugin that must be installed for pinia to work. Note **you don't need\n * this plugin if you are using Nuxt.js**. Use the `buildModule` instead:\n * https://pinia.vuejs.org/ssr/nuxt.html.\n *\n * @example\n * ```js\n * import Vue from 'vue'\n * import { PiniaVuePlugin, createPinia } from 'pinia'\n *\n * Vue.use(PiniaVuePlugin)\n * const pinia = createPinia()\n *\n * new Vue({\n * el: '#app',\n * // ...\n * pinia,\n * })\n * ```\n *\n * @param _Vue - `Vue` imported from 'vue'.\n */\nconst PiniaVuePlugin = function (_Vue) {\n // Equivalent of\n // app.config.globalProperties.$pinia = pinia\n _Vue.mixin({\n beforeCreate() {\n const options = this.$options;\n if (options.pinia) {\n const pinia = options.pinia;\n // HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/main/src/apis/inject.ts#L31\n /* istanbul ignore else */\n if (!this._provided) {\n const provideCache = {};\n Object.defineProperty(this, '_provided', {\n get: () => provideCache,\n set: (v) => Object.assign(provideCache, v),\n });\n }\n this._provided[piniaSymbol] = pinia;\n // propagate the pinia instance in an SSR friendly way\n // avoid adding it to nuxt twice\n /* istanbul ignore else */\n if (!this.$pinia) {\n this.$pinia = pinia;\n }\n pinia._a = this;\n if (IS_CLIENT) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n }\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(pinia._a, pinia);\n }\n }\n else if (!this.$pinia && options.parent && options.parent.$pinia) {\n this.$pinia = options.parent.$pinia;\n }\n },\n destroyed() {\n delete this._pStores;\n },\n });\n};\n\nexport { MutationType, PiniaVuePlugin, acceptHMRUpdate, createPinia, defineStore, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, skipHydrate, storeToRefs };\n","// src/index.ts\nvar SharedWorkerSupported = \"SharedWorker\" in globalThis;\nvar SharedWorkerPolyfill = class {\n /**\n * The actual worker that is used, depending on browser support it can be either a `SharedWorker` or a normal `Worker`.\n */\n ActualWorker;\n constructor(url, opts) {\n if (SharedWorkerSupported) {\n this.ActualWorker = new SharedWorker(url, opts);\n } else {\n this.ActualWorker = new Worker(url, opts);\n }\n }\n /**\n * An EventListener called when MessageEvent of type message is fired on the port—that is, when the port receives a message.\n */\n get onmessage() {\n if (SharedWorkerSupported) {\n return this.ActualWorker?.port.onmessage;\n } else {\n return this.ActualWorker.onmessage;\n }\n }\n set onmessage(value) {\n if (SharedWorkerSupported) {\n this.ActualWorker.port.onmessage = value;\n } else {\n this.ActualWorker.onmessage = value;\n }\n }\n /**\n * An EventListener called when a MessageEvent of type MessageError is fired—that is, when it receives a message that cannot be deserialized.\n */\n get onmessageerror() {\n if (SharedWorkerSupported) {\n return this.ActualWorker?.port.onmessageerror;\n } else {\n return this.ActualWorker.onmessageerror;\n }\n }\n set onmessageerror(value) {\n if (SharedWorkerSupported) {\n this.ActualWorker.port.onmessageerror = value;\n } else {\n this.ActualWorker.onmessageerror = value;\n }\n }\n /**\n * Starts the sending of messages queued on the port (only needed when using EventTarget.addEventListener; it is implied when using MessagePort.onmessage.)\n */\n start() {\n if (SharedWorkerSupported) {\n return this.ActualWorker?.port.start();\n }\n }\n /**\n * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.\n */\n postMessage(message, transfer) {\n if (SharedWorkerSupported) {\n return this.ActualWorker?.port.postMessage(message, transfer);\n } else {\n return this.ActualWorker.postMessage(message, transfer);\n }\n }\n /**\n * Immediately terminates the worker. This does not let worker finish its operations; it is halted at once. ServiceWorker instances do not support this method.\n */\n terminate() {\n if (SharedWorkerSupported) {\n return this.ActualWorker?.port.close();\n } else {\n return this.ActualWorker.terminate();\n }\n }\n /**\n * Disconnects the port, so it is no longer active.\n */\n close() {\n return this.terminate();\n }\n /**\n * Returns a MessagePort object used to communicate with and control the shared worker.\n */\n get port() {\n return SharedWorkerSupported ? this.ActualWorker.port : this.ActualWorker;\n }\n /**\n * Is an EventListener that is called whenever an ErrorEvent of type error event occurs.\n */\n get onerror() {\n return this.ActualWorker.onerror;\n }\n set onerror(value) {\n this.ActualWorker.onerror = value;\n }\n addEventListener(type, listener, options) {\n if (SharedWorkerSupported && type !== \"error\") {\n return this.ActualWorker?.port.addEventListener(type, listener, options);\n } else {\n return this.ActualWorker.addEventListener(type, listener, options);\n }\n }\n removeEventListener(type, listener, options) {\n if (SharedWorkerSupported && type !== \"error\") {\n return this.ActualWorker?.port.removeEventListener(type, listener, options);\n } else {\n return this.ActualWorker.removeEventListener(type, listener, options);\n }\n }\n /**\n * Dispatches an event to this EventTarget.\n */\n dispatchEvent(event) {\n return this.ActualWorker.dispatchEvent(event);\n }\n};\nvar src_default = SharedWorkerPolyfill;\nexport {\n SharedWorkerPolyfill,\n SharedWorkerSupported,\n src_default as default\n};\n//# sourceMappingURL=index.js.map","/*!\n * vue-router v3.6.5\n * (c) 2022 Evan You\n * @license MIT\n */\n/* */\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error((\"[vue-router] \" + message))\n }\n}\n\nfunction warn (condition, message) {\n if (!condition) {\n typeof console !== 'undefined' && console.warn((\"[vue-router] \" + message));\n }\n}\n\nfunction extend (a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n return a\n}\n\n/* */\n\nvar encodeReserveRE = /[!'()*]/g;\nvar encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };\nvar commaRE = /%2C/g;\n\n// fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\nvar encode = function (str) { return encodeURIComponent(str)\n .replace(encodeReserveRE, encodeReserveReplacer)\n .replace(commaRE, ','); };\n\nfunction decode (str) {\n try {\n return decodeURIComponent(str)\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"Error decoding \\\"\" + str + \"\\\". Leaving it intact.\"));\n }\n }\n return str\n}\n\nfunction resolveQuery (\n query,\n extraQuery,\n _parseQuery\n) {\n if ( extraQuery === void 0 ) extraQuery = {};\n\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n process.env.NODE_ENV !== 'production' && warn(false, e.message);\n parsedQuery = {};\n }\n for (var key in extraQuery) {\n var value = extraQuery[key];\n parsedQuery[key] = Array.isArray(value)\n ? value.map(castQueryParamValue)\n : castQueryParamValue(value);\n }\n return parsedQuery\n}\n\nvar castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };\n\nfunction parseQuery (query) {\n var res = {};\n\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0 ? decode(parts.join('=')) : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n\n return res\n}\n\nfunction stringifyQuery (obj) {\n var res = obj\n ? Object.keys(obj)\n .map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return ''\n }\n\n if (val === null) {\n return encode(key)\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return\n }\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&')\n }\n\n return encode(key) + '=' + encode(val)\n })\n .filter(function (x) { return x.length > 0; })\n .join('&')\n : null;\n return res ? (\"?\" + res) : ''\n}\n\n/* */\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute (\n record,\n location,\n redirectedFrom,\n router\n) {\n var stringifyQuery = router && router.options.stringifyQuery;\n\n var query = location.query || {};\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || (record && record.name),\n meta: (record && record.meta) || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery),\n matched: record ? formatMatch(record) : []\n };\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);\n }\n return Object.freeze(route)\n}\n\nfunction clone (value) {\n if (Array.isArray(value)) {\n return value.map(clone)\n } else if (value && typeof value === 'object') {\n var res = {};\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n return res\n } else {\n return value\n }\n}\n\n// the starting route that represents the initial state\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch (record) {\n var res = [];\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n return res\n}\n\nfunction getFullPath (\n ref,\n _stringifyQuery\n) {\n var path = ref.path;\n var query = ref.query; if ( query === void 0 ) query = {};\n var hash = ref.hash; if ( hash === void 0 ) hash = '';\n\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash\n}\n\nfunction isSameRoute (a, b, onlyPath) {\n if (b === START) {\n return a === b\n } else if (!b) {\n return false\n } else if (a.path && b.path) {\n return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query))\n } else if (a.name && b.name) {\n return (\n a.name === b.name &&\n (onlyPath || (\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query) &&\n isObjectEqual(a.params, b.params))\n )\n )\n } else {\n return false\n }\n}\n\nfunction isObjectEqual (a, b) {\n if ( a === void 0 ) a = {};\n if ( b === void 0 ) b = {};\n\n // handle null value #1566\n if (!a || !b) { return a === b }\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n if (aKeys.length !== bKeys.length) {\n return false\n }\n return aKeys.every(function (key, i) {\n var aVal = a[key];\n var bKey = bKeys[i];\n if (bKey !== key) { return false }\n var bVal = b[key];\n // query values can be null and undefined\n if (aVal == null || bVal == null) { return aVal === bVal }\n // check nested equality\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal)\n }\n return String(aVal) === String(bVal)\n })\n}\n\nfunction isIncludedRoute (current, target) {\n return (\n current.path.replace(trailingSlashRE, '/').indexOf(\n target.path.replace(trailingSlashRE, '/')\n ) === 0 &&\n (!target.hash || current.hash === target.hash) &&\n queryIncludes(current.query, target.query)\n )\n}\n\nfunction queryIncludes (current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false\n }\n }\n return true\n}\n\nfunction handleRouteEntered (route) {\n for (var i = 0; i < route.matched.length; i++) {\n var record = route.matched[i];\n for (var name in record.instances) {\n var instance = record.instances[name];\n var cbs = record.enteredCbs[name];\n if (!instance || !cbs) { continue }\n delete record.enteredCbs[name];\n for (var i$1 = 0; i$1 < cbs.length; i$1++) {\n if (!instance._isBeingDestroyed) { cbs[i$1](instance); }\n }\n }\n }\n}\n\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render (_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data;\n\n // used by devtools to display a router-view badge\n data.routerView = true;\n\n // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {});\n\n // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n var depth = 0;\n var inactive = false;\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode ? parent.$vnode.data : {};\n if (vnodeData.routerView) {\n depth++;\n }\n if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {\n inactive = true;\n }\n parent = parent.$parent;\n }\n data.routerViewDepth = depth;\n\n // render previous view if the tree is inactive and kept-alive\n if (inactive) {\n var cachedData = cache[name];\n var cachedComponent = cachedData && cachedData.component;\n if (cachedComponent) {\n // #2301\n // pass props\n if (cachedData.configProps) {\n fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);\n }\n return h(cachedComponent, data, children)\n } else {\n // render previous empty view\n return h()\n }\n }\n\n var matched = route.matched[depth];\n var component = matched && matched.components[name];\n\n // render empty node if no matched route or no config component\n if (!matched || !component) {\n cache[name] = null;\n return h()\n }\n\n // cache component\n cache[name] = { component: component };\n\n // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n if (\n (val && current !== vm) ||\n (!val && current === vm)\n ) {\n matched.instances[name] = val;\n }\n }\n\n // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n };\n\n // register instance in init hook\n // in case kept-alive component be actived when routes changed\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive &&\n vnode.componentInstance &&\n vnode.componentInstance !== matched.instances[name]\n ) {\n matched.instances[name] = vnode.componentInstance;\n }\n\n // if the route transition has already been confirmed then we weren't\n // able to call the cbs during confirmation as the component was not\n // registered yet, so we call it here.\n handleRouteEntered(route);\n };\n\n var configProps = matched.props && matched.props[name];\n // save route and configProps in cache\n if (configProps) {\n extend(cache[name], {\n route: route,\n configProps: configProps\n });\n fillPropsinData(component, data, route, configProps);\n }\n\n return h(component, data, children)\n }\n};\n\nfunction fillPropsinData (component, data, route, configProps) {\n // resolve props\n var propsToPass = data.props = resolveProps(route, configProps);\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass);\n // pass non-declared props as attrs\n var attrs = data.attrs = data.attrs || {};\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n}\n\nfunction resolveProps (route, config) {\n switch (typeof config) {\n case 'undefined':\n return\n case 'object':\n return config\n case 'function':\n return config(route)\n case 'boolean':\n return config ? route.params : undefined\n default:\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n \"props in \\\"\" + (route.path) + \"\\\" is a \" + (typeof config) + \", \" +\n \"expecting an object, function or boolean.\"\n );\n }\n }\n}\n\n/* */\n\nfunction resolvePath (\n relative,\n base,\n append\n) {\n var firstChar = relative.charAt(0);\n if (firstChar === '/') {\n return relative\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative\n }\n\n var stack = base.split('/');\n\n // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n }\n\n // resolve relative path\n var segments = relative.replace(/^\\//, '').split('/');\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n }\n\n // ensure leading slash\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/')\n}\n\nfunction parsePath (path) {\n var hash = '';\n var query = '';\n\n var hashIndex = path.indexOf('#');\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n }\n}\n\nfunction cleanPath (path) {\n return path.replace(/\\/(?:\\s*\\/)+/g, '/')\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n/**\n * Expose `pathToRegexp`.\n */\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7];\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys;\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n\n/* */\n\n// $flow-disable-line\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams (\n path,\n params,\n routeMsg\n) {\n params = params || {};\n try {\n var filler =\n regexpCompileCache[path] ||\n (regexpCompileCache[path] = pathToRegexp_1.compile(path));\n\n // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}\n // and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string\n if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }\n\n return filler(params, { pretty: true })\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n // Fix #3072 no warn if `pathMatch` is string\n warn(typeof params.pathMatch === 'string', (\"missing param for \" + routeMsg + \": \" + (e.message)));\n }\n return ''\n } finally {\n // delete the 0 if it was added\n delete params[0];\n }\n}\n\n/* */\n\nfunction normalizeLocation (\n raw,\n current,\n append,\n router\n) {\n var next = typeof raw === 'string' ? { path: raw } : raw;\n // named target\n if (next._normalized) {\n return next\n } else if (next.name) {\n next = extend({}, raw);\n var params = next.params;\n if (params && typeof params === 'object') {\n next.params = extend({}, params);\n }\n return next\n }\n\n // relative params\n if (!next.path && next.params && current) {\n next = extend({}, next);\n next._normalized = true;\n var params$1 = extend(extend({}, current.params), next.params);\n if (current.name) {\n next.name = current.name;\n next.params = params$1;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params$1, (\"path \" + (current.path)));\n } else if (process.env.NODE_ENV !== 'production') {\n warn(false, \"relative params navigation requires a current route.\");\n }\n return next\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = (current && current.path) || '/';\n var path = parsedPath.path\n ? resolvePath(parsedPath.path, basePath, append || next.append)\n : basePath;\n\n var query = resolveQuery(\n parsedPath.query,\n next.query,\n router && router.options.parseQuery\n );\n\n var hash = next.hash || parsedPath.hash;\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n }\n}\n\n/* */\n\n// work around weird flow bug\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\n\nvar noop = function () {};\n\nvar warnedCustomSlot;\nvar warnedTagProp;\nvar warnedEventProp;\n\nvar Link = {\n name: 'RouterLink',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n custom: Boolean,\n exact: Boolean,\n exactPath: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n ariaCurrentValue: {\n type: String,\n default: 'page'\n },\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render (h) {\n var this$1$1 = this;\n\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(\n this.to,\n current,\n this.append\n );\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass;\n // Support global empty active class\n var activeClassFallback =\n globalActiveClass == null ? 'router-link-active' : globalActiveClass;\n var exactActiveClassFallback =\n globalExactActiveClass == null\n ? 'router-link-exact-active'\n : globalExactActiveClass;\n var activeClass =\n this.activeClass == null ? activeClassFallback : this.activeClass;\n var exactActiveClass =\n this.exactActiveClass == null\n ? exactActiveClassFallback\n : this.exactActiveClass;\n\n var compareTarget = route.redirectedFrom\n ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)\n : route;\n\n classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);\n classes[activeClass] = this.exact || this.exactPath\n ? classes[exactActiveClass]\n : isIncludedRoute(current, compareTarget);\n\n var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1$1.replace) {\n router.replace(location, noop);\n } else {\n router.push(location, noop);\n }\n }\n };\n\n var on = { click: guardEvent };\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) {\n on[e] = handler;\n });\n } else {\n on[this.event] = handler;\n }\n\n var data = { class: classes };\n\n var scopedSlot =\n !this.$scopedSlots.$hasNormal &&\n this.$scopedSlots.default &&\n this.$scopedSlots.default({\n href: href,\n route: route,\n navigate: handler,\n isActive: classes[activeClass],\n isExactActive: classes[exactActiveClass]\n });\n\n if (scopedSlot) {\n if (process.env.NODE_ENV !== 'production' && !this.custom) {\n !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an element. Use the custom prop to remove this warning:\\n\\n');\n warnedCustomSlot = true;\n }\n if (scopedSlot.length === 1) {\n return scopedSlot[0]\n } else if (scopedSlot.length > 1 || !scopedSlot.length) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n (\" with to=\\\"\" + (this.to) + \"\\\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.\")\n );\n }\n return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if ('tag' in this.$options.propsData && !warnedTagProp) {\n warn(\n false,\n \"'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedTagProp = true;\n }\n if ('event' in this.$options.propsData && !warnedEventProp) {\n warn(\n false,\n \"'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedEventProp = true;\n }\n }\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = { href: href, 'aria-current': ariaCurrentValue };\n } else {\n // find the first child and apply listener and href\n var a = findAnchor(this.$slots.default);\n if (a) {\n // in case the is a static node\n a.isStatic = false;\n var aData = (a.data = extend({}, a.data));\n aData.on = aData.on || {};\n // transform existing events in both objects into arrays so we can push later\n for (var event in aData.on) {\n var handler$1 = aData.on[event];\n if (event in on) {\n aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];\n }\n }\n // append new listeners for router-link\n for (var event$1 in on) {\n if (event$1 in aData.on) {\n // on[event] is always a function\n aData.on[event$1].push(on[event$1]);\n } else {\n aData.on[event$1] = handler;\n }\n }\n\n var aAttrs = (a.data.attrs = extend({}, a.data.attrs));\n aAttrs.href = href;\n aAttrs['aria-current'] = ariaCurrentValue;\n } else {\n // doesn't have child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default)\n }\n};\n\nfunction guardEvent (e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }\n // don't redirect when preventDefault called\n if (e.defaultPrevented) { return }\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0) { return }\n // don't redirect if `target=\"_blank\"`\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target)) { return }\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault) {\n e.preventDefault();\n }\n return true\n}\n\nfunction findAnchor (children) {\n if (children) {\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.tag === 'a') {\n return child\n }\n if (child.children && (child = findAnchor(child.children))) {\n return child\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install (Vue) {\n if (install.installed && _Vue === Vue) { return }\n install.installed = true;\n\n _Vue = Vue;\n\n var isDef = function (v) { return v !== undefined; };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate () {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n this._router.init(this);\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;\n }\n registerInstance(this, this);\n },\n destroyed: function destroyed () {\n registerInstance(this);\n }\n });\n\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get () { return this._routerRoot._router }\n });\n\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get () { return this._routerRoot._route }\n });\n\n Vue.component('RouterView', View);\n Vue.component('RouterLink', Link);\n\n var strats = Vue.config.optionMergeStrategies;\n // use the same hook merging strategy for route hooks\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n\n/* */\n\nvar inBrowser = typeof window !== 'undefined';\n\n/* */\n\nfunction createRouteMap (\n routes,\n oldPathList,\n oldPathMap,\n oldNameMap,\n parentRoute\n) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || [];\n // $flow-disable-line\n var pathMap = oldPathMap || Object.create(null);\n // $flow-disable-line\n var nameMap = oldNameMap || Object.create(null);\n\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);\n });\n\n // ensure wildcard routes are always at the end\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n // warn if routes do not include leading slashes\n var found = pathList\n // check for missing leading slash\n .filter(function (path) { return path && path.charAt(0) !== '*' && path.charAt(0) !== '/'; });\n\n if (found.length > 0) {\n var pathNames = found.map(function (path) { return (\"- \" + path); }).join('\\n');\n warn(false, (\"Non-nested routes must include a leading slash character. Fix the following routes: \\n\" + pathNames));\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n }\n}\n\nfunction addRouteRecord (\n pathList,\n pathMap,\n nameMap,\n route,\n parent,\n matchAs\n) {\n var path = route.path;\n var name = route.name;\n if (process.env.NODE_ENV !== 'production') {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(\n typeof route.component !== 'string',\n \"route config \\\"component\\\" for path: \" + (String(\n path || name\n )) + \" cannot be a \" + \"string id. Use an actual component instead.\"\n );\n\n warn(\n // eslint-disable-next-line no-control-regex\n !/[^\\u0000-\\u007F]+/.test(path),\n \"Route with path \\\"\" + path + \"\\\" contains unencoded characters, make sure \" +\n \"your path is correctly encoded before passing it to the router. Use \" +\n \"encodeURI to encode static segments of your path.\"\n );\n }\n\n var pathToRegexpOptions =\n route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || { default: route.component },\n alias: route.alias\n ? typeof route.alias === 'string'\n ? [route.alias]\n : route.alias\n : [],\n instances: {},\n enteredCbs: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props:\n route.props == null\n ? {}\n : route.components\n ? route.props\n : { default: route.props }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (process.env.NODE_ENV !== 'production') {\n if (\n route.name &&\n !route.redirect &&\n route.children.some(function (child) { return /^\\/?$/.test(child.path); })\n ) {\n warn(\n false,\n \"Named Route '\" + (route.name) + \"' has a default child route. \" +\n \"When navigating to this named route (:to=\\\"{name: '\" + (route.name) + \"'}\\\"), \" +\n \"the default child route will not be rendered. Remove the name from \" +\n \"this route and use the name of the default child route for named \" +\n \"links instead.\"\n );\n }\n }\n route.children.forEach(function (child) {\n var childMatchAs = matchAs\n ? cleanPath((matchAs + \"/\" + (child.path)))\n : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];\n for (var i = 0; i < aliases.length; ++i) {\n var alias = aliases[i];\n if (process.env.NODE_ENV !== 'production' && alias === path) {\n warn(\n false,\n (\"Found an alias with the same value as the path: \\\"\" + path + \"\\\". You have to remove that alias. It will be ignored in development.\")\n );\n // skip in dev to make it work\n continue\n }\n\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(\n pathList,\n pathMap,\n nameMap,\n aliasRoute,\n parent,\n record.path || '/' // matchAs\n );\n }\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if (process.env.NODE_ENV !== 'production' && !matchAs) {\n warn(\n false,\n \"Duplicate named routes definition: \" +\n \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + (record.path) + \"\\\" }\"\n );\n }\n }\n}\n\nfunction compileRouteRegex (\n path,\n pathToRegexpOptions\n) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n if (process.env.NODE_ENV !== 'production') {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(\n !keys[key.name],\n (\"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\")\n );\n keys[key.name] = true;\n });\n }\n return regex\n}\n\nfunction normalizePath (\n path,\n parent,\n strict\n) {\n if (!strict) { path = path.replace(/\\/$/, ''); }\n if (path[0] === '/') { return path }\n if (parent == null) { return path }\n return cleanPath(((parent.path) + \"/\" + path))\n}\n\n/* */\n\n\n\nfunction createMatcher (\n routes,\n router\n) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes (routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function addRoute (parentOrRoute, route) {\n var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;\n // $flow-disable-line\n createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);\n\n // add aliases of parent\n if (parent && parent.alias.length) {\n createRouteMap(\n // $flow-disable-line route is defined if parent is\n parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),\n pathList,\n pathMap,\n nameMap,\n parent\n );\n }\n }\n\n function getRoutes () {\n return pathList.map(function (path) { return pathMap[path]; })\n }\n\n function match (\n raw,\n currentRoute,\n redirectedFrom\n ) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n warn(record, (\"Route with name '\" + name + \"' does not exist\"));\n }\n if (!record) { return _createRoute(null, location) }\n var paramNames = record.regex.keys\n .filter(function (key) { return !key.optional; })\n .map(function (key) { return key.name; });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n location.path = fillParams(record.path, location.params, (\"named route \\\"\" + name + \"\\\"\"));\n return _createRoute(record, location, redirectedFrom)\n } else if (location.path) {\n location.params = {};\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom)\n }\n }\n }\n // no match\n return _createRoute(null, location)\n }\n\n function redirect (\n record,\n location\n ) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function'\n ? originalRedirect(createRoute(record, location, null, router))\n : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = { path: redirect };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false, (\"invalid redirect option: \" + (JSON.stringify(redirect)))\n );\n }\n return _createRoute(null, location)\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n assert(targetRecord, (\"redirect failed: named route \\\"\" + name + \"\\\" not found.\"));\n }\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location)\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record);\n // 2. resolve params\n var resolvedPath = fillParams(rawPath, params, (\"redirect route with path \\\"\" + rawPath + \"\\\"\"));\n // 3. rematch with existing query and hash\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location)\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"invalid redirect option: \" + (JSON.stringify(redirect))));\n }\n return _createRoute(null, location)\n }\n }\n\n function alias (\n record,\n location,\n matchAs\n ) {\n var aliasedPath = fillParams(matchAs, location.params, (\"aliased route with path \\\"\" + matchAs + \"\\\"\"));\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location)\n }\n return _createRoute(null, location)\n }\n\n function _createRoute (\n record,\n location,\n redirectedFrom\n ) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location)\n }\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs)\n }\n return createRoute(record, location, redirectedFrom, router)\n }\n\n return {\n match: match,\n addRoute: addRoute,\n getRoutes: getRoutes,\n addRoutes: addRoutes\n }\n}\n\nfunction matchRoute (\n regex,\n path,\n params\n) {\n var m = path.match(regex);\n\n if (!m) {\n return false\n } else if (!params) {\n return true\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n if (key) {\n // Fix #1994: using * with props: true generates a param named 0\n params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];\n }\n }\n\n return true\n}\n\nfunction resolveRecordPath (path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true)\n}\n\n/* */\n\n// use User Timing api (if present) for more accurate key precision\nvar Time =\n inBrowser && window.performance && window.performance.now\n ? window.performance\n : Date;\n\nfunction genStateKey () {\n return Time.now().toFixed(3)\n}\n\nvar _key = genStateKey();\n\nfunction getStateKey () {\n return _key\n}\n\nfunction setStateKey (key) {\n return (_key = key)\n}\n\n/* */\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll () {\n // Prevent browser scroll behavior on History popstate\n if ('scrollRestoration' in window.history) {\n window.history.scrollRestoration = 'manual';\n }\n // Fix for #1585 for Firefox\n // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678\n // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with\n // window.location.protocol + '//' + window.location.host\n // location.host contains the port and location.hostname doesn't\n var protocolAndPath = window.location.protocol + '//' + window.location.host;\n var absolutePath = window.location.href.replace(protocolAndPath, '');\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, window.history.state);\n stateCopy.key = getStateKey();\n window.history.replaceState(stateCopy, '', absolutePath);\n window.addEventListener('popstate', handlePopState);\n return function () {\n window.removeEventListener('popstate', handlePopState);\n }\n}\n\nfunction handleScroll (\n router,\n to,\n from,\n isPop\n) {\n if (!router.app) {\n return\n }\n\n var behavior = router.options.scrollBehavior;\n if (!behavior) {\n return\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n }\n\n // wait until re-render finishes before scrolling\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior.call(\n router,\n to,\n from,\n isPop ? position : null\n );\n\n if (!shouldScroll) {\n return\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll\n .then(function (shouldScroll) {\n scrollToPosition((shouldScroll), position);\n })\n .catch(function (err) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition () {\n var key = getStateKey();\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction handlePopState (e) {\n saveScrollPosition();\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n}\n\nfunction getScrollPosition () {\n var key = getStateKey();\n if (key) {\n return positionStore[key]\n }\n}\n\nfunction getElementPosition (el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n }\n}\n\nfunction isValidPosition (obj) {\n return isNumber(obj.x) || isNumber(obj.y)\n}\n\nfunction normalizePosition (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n }\n}\n\nfunction normalizeOffset (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n }\n}\n\nfunction isNumber (v) {\n return typeof v === 'number'\n}\n\nvar hashStartsWithNumberRE = /^#\\d/;\n\nfunction scrollToPosition (shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n if (isObject && typeof shouldScroll.selector === 'string') {\n // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]\n // but at the same time, it doesn't make much sense to select an element with an id and an extra selector\n var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line\n ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line\n : document.querySelector(shouldScroll.selector);\n\n if (el) {\n var offset =\n shouldScroll.offset && typeof shouldScroll.offset === 'object'\n ? shouldScroll.offset\n : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n // $flow-disable-line\n if ('scrollBehavior' in document.documentElement.style) {\n window.scrollTo({\n left: position.x,\n top: position.y,\n // $flow-disable-line\n behavior: shouldScroll.behavior\n });\n } else {\n window.scrollTo(position.x, position.y);\n }\n }\n}\n\n/* */\n\nvar supportsPushState =\n inBrowser &&\n (function () {\n var ua = window.navigator.userAgent;\n\n if (\n (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&\n ua.indexOf('Mobile Safari') !== -1 &&\n ua.indexOf('Chrome') === -1 &&\n ua.indexOf('Windows Phone') === -1\n ) {\n return false\n }\n\n return window.history && typeof window.history.pushState === 'function'\n })();\n\nfunction pushState (url, replace) {\n saveScrollPosition();\n // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n var history = window.history;\n try {\n if (replace) {\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, history.state);\n stateCopy.key = getStateKey();\n history.replaceState(stateCopy, '', url);\n } else {\n history.pushState({ key: setStateKey(genStateKey()) }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState (url) {\n pushState(url, true);\n}\n\n// When changing thing, also edit router.d.ts\nvar NavigationFailureType = {\n redirected: 2,\n aborted: 4,\n cancelled: 8,\n duplicated: 16\n};\n\nfunction createNavigationRedirectedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.redirected,\n (\"Redirected when going from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (stringifyRoute(\n to\n )) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createNavigationDuplicatedError (from, to) {\n var error = createRouterError(\n from,\n to,\n NavigationFailureType.duplicated,\n (\"Avoided redundant navigation to current location: \\\"\" + (from.fullPath) + \"\\\".\")\n );\n // backwards compatible with the first introduction of Errors\n error.name = 'NavigationDuplicated';\n return error\n}\n\nfunction createNavigationCancelledError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.cancelled,\n (\"Navigation cancelled from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" with a new navigation.\")\n )\n}\n\nfunction createNavigationAbortedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.aborted,\n (\"Navigation aborted from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createRouterError (from, to, type, message) {\n var error = new Error(message);\n error._isRouter = true;\n error.from = from;\n error.to = to;\n error.type = type;\n\n return error\n}\n\nvar propertiesToLog = ['params', 'query', 'hash'];\n\nfunction stringifyRoute (to) {\n if (typeof to === 'string') { return to }\n if ('path' in to) { return to.path }\n var location = {};\n propertiesToLog.forEach(function (key) {\n if (key in to) { location[key] = to[key]; }\n });\n return JSON.stringify(location, null, 2)\n}\n\nfunction isError (err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1\n}\n\nfunction isNavigationFailure (err, errorType) {\n return (\n isError(err) &&\n err._isRouter &&\n (errorType == null || err.type === errorType)\n )\n}\n\n/* */\n\nfunction runQueue (queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n step(0);\n}\n\n/* */\n\nfunction resolveAsyncComponents (matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n }\n // save resolved on async factory in case it's used elsewhere\n def.resolved = typeof resolvedDef === 'function'\n ? resolvedDef\n : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n if (pending <= 0) {\n next();\n }\n });\n\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n process.env.NODE_ENV !== 'production' && warn(false, msg);\n if (!error) {\n error = isError(reason)\n ? reason\n : new Error(msg);\n next(error);\n }\n });\n\n var res;\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) { next(); }\n }\n}\n\nfunction flatMapComponents (\n matched,\n fn\n) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) { return fn(\n m.components[key],\n m.instances[key],\n m, key\n ); })\n }))\n}\n\nfunction flatten (arr) {\n return Array.prototype.concat.apply([], arr)\n}\n\nvar hasSymbol =\n typeof Symbol === 'function' &&\n typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule (obj) {\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')\n}\n\n// in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\nfunction once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.apply(this, args)\n }\n}\n\n/* */\n\nvar History = function History (router, base) {\n this.router = router;\n this.base = normalizeBase(base);\n // start with a route object that stands for \"nowhere\"\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n this.listeners = [];\n};\n\nHistory.prototype.listen = function listen (cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady (cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError (errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo (\n location,\n onComplete,\n onAbort\n) {\n var this$1$1 = this;\n\n var route;\n // catch redirect option https://github.com/vuejs/vue-router/issues/3201\n try {\n route = this.router.match(location, this.current);\n } catch (e) {\n this.errorCbs.forEach(function (cb) {\n cb(e);\n });\n // Exception should still be thrown\n throw e\n }\n var prev = this.current;\n this.confirmTransition(\n route,\n function () {\n this$1$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1$1.ensureURL();\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n\n // fire ready cbs once\n if (!this$1$1.ready) {\n this$1$1.ready = true;\n this$1$1.readyCbs.forEach(function (cb) {\n cb(route);\n });\n }\n },\n function (err) {\n if (onAbort) {\n onAbort(err);\n }\n if (err && !this$1$1.ready) {\n // Initial redirection should not mark the history as ready yet\n // because it's triggered by the redirection instead\n // https://github.com/vuejs/vue-router/issues/3225\n // https://github.com/vuejs/vue-router/issues/3331\n if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {\n this$1$1.ready = true;\n this$1$1.readyErrorCbs.forEach(function (cb) {\n cb(err);\n });\n }\n }\n }\n );\n};\n\nHistory.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {\n var this$1$1 = this;\n\n var current = this.current;\n this.pending = route;\n var abort = function (err) {\n // changed after adding errors with\n // https://github.com/vuejs/vue-router/pull/3047 before that change,\n // redirect and aborted navigation would produce an err == null\n if (!isNavigationFailure(err) && isError(err)) {\n if (this$1$1.errorCbs.length) {\n this$1$1.errorCbs.forEach(function (cb) {\n cb(err);\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'uncaught error during route navigation:');\n }\n console.error(err);\n }\n }\n onAbort && onAbort(err);\n };\n var lastRouteIndex = route.matched.length - 1;\n var lastCurrentIndex = current.matched.length - 1;\n if (\n isSameRoute(route, current) &&\n // in the case the route map has been dynamically appended to\n lastRouteIndex === lastCurrentIndex &&\n route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]\n ) {\n this.ensureURL();\n if (route.hash) {\n handleScroll(this.router, current, route, false);\n }\n return abort(createNavigationDuplicatedError(current, route))\n }\n\n var ref = resolveQueue(\n this.current.matched,\n route.matched\n );\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n\n var queue = [].concat(\n // in-component leave guards\n extractLeaveGuards(deactivated),\n // global before hooks\n this.router.beforeHooks,\n // in-component update hooks\n extractUpdateHooks(updated),\n // in-config enter guards\n activated.map(function (m) { return m.beforeEnter; }),\n // async components\n resolveAsyncComponents(activated)\n );\n\n var iterator = function (hook, next) {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n try {\n hook(route, current, function (to) {\n if (to === false) {\n // next(false) -> abort navigation, ensure current URL\n this$1$1.ensureURL(true);\n abort(createNavigationAbortedError(current, route));\n } else if (isError(to)) {\n this$1$1.ensureURL(true);\n abort(to);\n } else if (\n typeof to === 'string' ||\n (typeof to === 'object' &&\n (typeof to.path === 'string' || typeof to.name === 'string'))\n ) {\n // next('/') or next({ path: '/' }) -> redirect\n abort(createNavigationRedirectedError(current, route));\n if (typeof to === 'object' && to.replace) {\n this$1$1.replace(to);\n } else {\n this$1$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n // wait until async components are resolved before\n // extracting in-component enter guards\n var enterGuards = extractEnterGuards(activated);\n var queue = enterGuards.concat(this$1$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n this$1$1.pending = null;\n onComplete(route);\n if (this$1$1.router.app) {\n this$1$1.router.app.$nextTick(function () {\n handleRouteEntered(route);\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute (route) {\n this.current = route;\n this.cb && this.cb(route);\n};\n\nHistory.prototype.setupListeners = function setupListeners () {\n // Default implementation is empty\n};\n\nHistory.prototype.teardown = function teardown () {\n // clean up event listeners\n // https://github.com/vuejs/vue-router/issues/2341\n this.listeners.forEach(function (cleanupListener) {\n cleanupListener();\n });\n this.listeners = [];\n\n // reset current history route\n // https://github.com/vuejs/vue-router/issues/3294\n this.current = START;\n this.pending = null;\n};\n\nfunction normalizeBase (base) {\n if (!base) {\n if (inBrowser) {\n // respect tag\n var baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n }\n // make sure there's the starting slash\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n }\n // remove trailing slash\n return base.replace(/\\/$/, '')\n}\n\nfunction resolveQueue (\n current,\n next\n) {\n var i;\n var max = Math.max(current.length, next.length);\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break\n }\n }\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n }\n}\n\nfunction extractGuards (\n records,\n name,\n bind,\n reverse\n) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n if (guard) {\n return Array.isArray(guard)\n ? guard.map(function (guard) { return bind(guard, instance, match, key); })\n : bind(guard, instance, match, key)\n }\n });\n return flatten(reverse ? guards.reverse() : guards)\n}\n\nfunction extractGuard (\n def,\n key\n) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n return def.options[key]\n}\n\nfunction extractLeaveGuards (deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)\n}\n\nfunction extractUpdateHooks (updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard)\n}\n\nfunction bindGuard (guard, instance) {\n if (instance) {\n return function boundRouteGuard () {\n return guard.apply(instance, arguments)\n }\n }\n}\n\nfunction extractEnterGuards (\n activated\n) {\n return extractGuards(\n activated,\n 'beforeRouteEnter',\n function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key)\n }\n )\n}\n\nfunction bindEnterGuard (\n guard,\n match,\n key\n) {\n return function routeEnterGuard (to, from, next) {\n return guard(to, from, function (cb) {\n if (typeof cb === 'function') {\n if (!match.enteredCbs[key]) {\n match.enteredCbs[key] = [];\n }\n match.enteredCbs[key].push(cb);\n }\n next(cb);\n })\n }\n}\n\n/* */\n\nvar HTML5History = /*@__PURE__*/(function (History) {\n function HTML5History (router, base) {\n History.call(this, router, base);\n\n this._startLocation = getLocation(this.base);\n }\n\n if ( History ) HTML5History.__proto__ = History;\n HTML5History.prototype = Object.create( History && History.prototype );\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n\n // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n var location = getLocation(this$1$1.base);\n if (this$1$1.current === START && location === this$1$1._startLocation) {\n return\n }\n\n this$1$1.transitionTo(location, function (route) {\n if (supportsScroll) {\n handleScroll(router, route, current, true);\n }\n });\n };\n window.addEventListener('popstate', handleRoutingEvent);\n this.listeners.push(function () {\n window.removeEventListener('popstate', handleRoutingEvent);\n });\n };\n\n HTML5History.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL (push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {\n return getLocation(this.base)\n };\n\n return HTML5History;\n}(History));\n\nfunction getLocation (base) {\n var path = window.location.pathname;\n var pathLowerCase = path.toLowerCase();\n var baseLowerCase = base.toLowerCase();\n // base=\"/a\" shouldn't turn path=\"/app\" into \"/a/pp\"\n // https://github.com/vuejs/vue-router/issues/3555\n // so we ensure the trailing slash in the base\n if (base && ((pathLowerCase === baseLowerCase) ||\n (pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {\n path = path.slice(base.length);\n }\n return (path || '/') + window.location.search + window.location.hash\n}\n\n/* */\n\nvar HashHistory = /*@__PURE__*/(function (History) {\n function HashHistory (router, base, fallback) {\n History.call(this, router, base);\n // check history fallback deeplinking\n if (fallback && checkFallback(this.base)) {\n return\n }\n ensureSlash();\n }\n\n if ( History ) HashHistory.__proto__ = History;\n HashHistory.prototype = Object.create( History && History.prototype );\n HashHistory.prototype.constructor = HashHistory;\n\n // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n HashHistory.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n if (!ensureSlash()) {\n return\n }\n this$1$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1$1.router, route, current, true);\n }\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n };\n var eventType = supportsPushState ? 'popstate' : 'hashchange';\n window.addEventListener(\n eventType,\n handleRoutingEvent\n );\n this.listeners.push(function () {\n window.removeEventListener(eventType, handleRoutingEvent);\n });\n };\n\n HashHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL (push) {\n var current = this.current.fullPath;\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n return getHash()\n };\n\n return HashHistory;\n}(History));\n\nfunction checkFallback (base) {\n var location = getLocation(base);\n if (!/^\\/#/.test(location)) {\n window.location.replace(cleanPath(base + '/#' + location));\n return true\n }\n}\n\nfunction ensureSlash () {\n var path = getHash();\n if (path.charAt(0) === '/') {\n return true\n }\n replaceHash('/' + path);\n return false\n}\n\nfunction getHash () {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#');\n // empty path\n if (index < 0) { return '' }\n\n href = href.slice(index + 1);\n\n return href\n}\n\nfunction getUrl (path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return (base + \"#\" + path)\n}\n\nfunction pushHash (path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash (path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n\n/* */\n\nvar AbstractHistory = /*@__PURE__*/(function (History) {\n function AbstractHistory (router, base) {\n History.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if ( History ) AbstractHistory.__proto__ = History;\n AbstractHistory.prototype = Object.create( History && History.prototype );\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);\n this$1$1.index++;\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.go = function go (n) {\n var this$1$1 = this;\n\n var targetIndex = this.index + n;\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return\n }\n var route = this.stack[targetIndex];\n this.confirmTransition(\n route,\n function () {\n var prev = this$1$1.current;\n this$1$1.index = targetIndex;\n this$1$1.updateRoute(route);\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n },\n function (err) {\n if (isNavigationFailure(err, NavigationFailureType.duplicated)) {\n this$1$1.index = targetIndex;\n }\n }\n );\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/'\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL () {\n // noop\n };\n\n return AbstractHistory;\n}(History));\n\n/* */\n\n\n\nvar VueRouter = function VueRouter (options) {\n if ( options === void 0 ) options = {};\n\n if (process.env.NODE_ENV !== 'production') {\n warn(this instanceof VueRouter, \"Router must be called with the new operator.\");\n }\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n\n var mode = options.mode || 'hash';\n this.fallback =\n mode === 'history' && !supportsPushState && options.fallback !== false;\n if (this.fallback) {\n mode = 'hash';\n }\n if (!inBrowser) {\n mode = 'abstract';\n }\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break\n default:\n if (process.env.NODE_ENV !== 'production') {\n assert(false, (\"invalid mode: \" + mode));\n }\n }\n};\n\nvar prototypeAccessors = { currentRoute: { configurable: true } };\n\nVueRouter.prototype.match = function match (raw, current, redirectedFrom) {\n return this.matcher.match(raw, current, redirectedFrom)\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current\n};\n\nVueRouter.prototype.init = function init (app /* Vue component instance */) {\n var this$1$1 = this;\n\n process.env.NODE_ENV !== 'production' &&\n assert(\n install.installed,\n \"not installed. Make sure to call `Vue.use(VueRouter)` \" +\n \"before creating root instance.\"\n );\n\n this.apps.push(app);\n\n // set up app destroyed handler\n // https://github.com/vuejs/vue-router/issues/2639\n app.$once('hook:destroyed', function () {\n // clean out app from this.apps array once destroyed\n var index = this$1$1.apps.indexOf(app);\n if (index > -1) { this$1$1.apps.splice(index, 1); }\n // ensure we still have a main app or null if no apps\n // we do not release the router so it can be reused\n if (this$1$1.app === app) { this$1$1.app = this$1$1.apps[0] || null; }\n\n if (!this$1$1.app) { this$1$1.history.teardown(); }\n });\n\n // main app previously initialized\n // return as we don't need to set up new history listener\n if (this.app) {\n return\n }\n\n this.app = app;\n\n var history = this.history;\n\n if (history instanceof HTML5History || history instanceof HashHistory) {\n var handleInitialScroll = function (routeOrError) {\n var from = history.current;\n var expectScroll = this$1$1.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll && 'fullPath' in routeOrError) {\n handleScroll(this$1$1, routeOrError, from, false);\n }\n };\n var setupListeners = function (routeOrError) {\n history.setupListeners();\n handleInitialScroll(routeOrError);\n };\n history.transitionTo(\n history.getCurrentLocation(),\n setupListeners,\n setupListeners\n );\n }\n\n history.listen(function (route) {\n this$1$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach (fn) {\n return registerHook(this.beforeHooks, fn)\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve (fn) {\n return registerHook(this.resolveHooks, fn)\n};\n\nVueRouter.prototype.afterEach = function afterEach (fn) {\n return registerHook(this.afterHooks, fn)\n};\n\nVueRouter.prototype.onReady = function onReady (cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError (errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.push(location, resolve, reject);\n })\n } else {\n this.history.push(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.replace(location, resolve, reject);\n })\n } else {\n this.history.replace(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.go = function go (n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back () {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward () {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {\n var route = to\n ? to.matched\n ? to\n : this.resolve(to).route\n : this.currentRoute;\n if (!route) {\n return []\n }\n return [].concat.apply(\n [],\n route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key]\n })\n })\n )\n};\n\nVueRouter.prototype.resolve = function resolve (\n to,\n current,\n append\n) {\n current = current || this.history.current;\n var location = normalizeLocation(to, current, append, this);\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n }\n};\n\nVueRouter.prototype.getRoutes = function getRoutes () {\n return this.matcher.getRoutes()\n};\n\nVueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {\n this.matcher.addRoute(parentOrRoute, route);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nVueRouter.prototype.addRoutes = function addRoutes (routes) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.');\n }\n this.matcher.addRoutes(routes);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties( VueRouter.prototype, prototypeAccessors );\n\nvar VueRouter$1 = VueRouter;\n\nfunction registerHook (list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n if (i > -1) { list.splice(i, 1); }\n }\n}\n\nfunction createHref (base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path\n}\n\n// We cannot remove this as it would be a breaking change\nVueRouter.install = install;\nVueRouter.version = '3.6.5';\nVueRouter.isNavigationFailure = isNavigationFailure;\nVueRouter.NavigationFailureType = NavigationFailureType;\nVueRouter.START_LOCATION = START;\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\nvar version = '3.6.5';\n\nexport { NavigationFailureType, Link as RouterLink, View as RouterView, START as START_LOCATION, VueRouter$1 as default, isNavigationFailure, version };\n","// FIXME: переместить в utils/storage\n\nexport const lastSelectedCompanyKey = 'last-selected-company';\nexport const lastSelectedRoleKey = 'last-selected-role';\n\nexport const getLastSessionSelectedCompany = () => {\n const value = window?.localStorage.getItem(lastSelectedCompanyKey);\n if (value) {\n try {\n return JSON.parse(value);\n } catch (e) {\n if (e instanceof SyntaxError) {\n return null;\n }\n\n throw e;\n }\n }\n\n return null;\n};\n\nexport const setLastSessionSelectedCompany = (data) => {\n window?.localStorage.setItem(lastSelectedCompanyKey, JSON.stringify(data));\n};\n\nexport const getLastSelectedRole = () => {\n window?.localStorage.getItem(lastSelectedRoleKey);\n};\n\nexport const setLastSelectedRole = (role) => {\n window?.localStorage.setItem(lastSelectedRoleKey, role);\n};\n\nexport const removeLastSessionSelectedCompany = () => window?.localStorage.removeItem(lastSelectedCompanyKey);\n","export const companyList = 'admin/app/company/list';\nexport const companyDelete = 'admin/app/company/delete';\nexport const companyAdd = 'admin/app/company/add';\nexport const companyUpdate = 'admin/app/company/update';\nexport const companyBilling = 'admin/app/company/billing';\nexport const companyInvestmentStats = 'admin/app/company/investment_stats';\nexport const companyAvailableDocuments = 'admin/app/company/available_documents';\nexport const profileGet = 'admin/app/profile/get';\nexport const profileTaskData = 'admin/app/profile/task_data';\n","const signalrMethods = {\n ticketNewMessage: 'ticket:new-message',\n balanceChange: 'balance:change',\n earlyPaymentChange: 'early_payment:change',\n} as const;\n\nexport type SignalRMethod = keyof typeof signalrMethods;\nexport type SignalRMethodName = (typeof signalrMethods)[SignalRMethod];\n\nexport { signalrMethods, signalrMethods as default };\n","const defaultBroadcastServiceSender = window?.BroadcastChannel ? new BroadcastChannel('broadcast_default') : undefined;\nconst defaultBroadcastServiceReceiver = defaultBroadcastServiceSender ? new BroadcastChannel(defaultBroadcastServiceSender.name) : undefined;\n\nexport { defaultBroadcastServiceSender, defaultBroadcastServiceReceiver };\n","// @ts-nocheck\nimport Vue, { type DeepReadonly, type ShallowRef } from 'vue';\nimport { defineStore } from 'pinia';\nimport { setLastSessionSelectedCompany, getLastSessionSelectedCompany, setLastSelectedRole, getLastSelectedRole } from '@/constants/storage-keys';\nimport { companyBilling, companyInvestmentStats, profileGet } from '@/api/endpoints/user-company';\nimport type { AxiosResponse } from 'axios';\nimport { SignalRMethodName, signalrMethods } from '@/constants/signalr-methods';\nimport { defaultBroadcastServiceSender } from '@/utils/broadcast-service';\nimport { formatPhone } from '@/utils/helpers';\n\ntype Nullable = T | null;\nexport type RoleSide = 'investor' | 'borrower';\ntype SwitchCompanyPayload = { role?: Nullable; companyId?: Nullable };\ntype BillingWalletAccount = Record;\n\nconst lastSelectedCompany = getLastSessionSelectedCompany();\n\n// FIXME: в константы\nconst investorRegistrationTasksTypes = [\n 'investor_reg_pp',\n 'investor_reg_le',\n // legacy below\n 'investor_reg_physic',\n 'investor_reg_entity',\n];\n// FIXME: в константы\nconst investorProfileRegistrationTasksTypes = ['invest_profile_config_le', 'invest_profile_config_pp'];\n\nconst billingAccountTypeBySide = {\n investor: 'INV',\n borrower: 'DBT',\n} as const;\n\ninterface State {\n companyTypesByRoles: DeepReadonly>;\n\n serverData?: ShallowRef | null | undefined>;\n userid?: Nullable;\n sessionExpired: boolean;\n phone?: Nullable;\n permissionsAccess?: Nullable>;\n companiesList: Array>; // FIXME: переделать в объект Record\n investorAppTask?: Nullable>;\n investorProfileAppTask?: Nullable>;\n borrowerProfileAppTask?: Nullable>;\n borrowerAppTask?: Nullable>;\n roleSide?: Nullable;\n companyId?: Nullable;\n billingData?: Nullable>;\n isGuestMode: boolean;\n totalUnreadTickets: number;\n\n userDismissQualifiedInvestorCard: boolean;\n}\n\n// FIXME: переделать - нужно частичное обновление каких-то полей\nfunction updateBillingData(this: ReturnType, data: AxiosResponse['data']) {\n const fired_utc_at = new Date(data.fired_utc_at || Date.now());\n if (this.billingData?.fired_utc_at && this.billingData.fired_utc_at > fired_utc_at) {\n return;\n }\n\n const tp = this.roleBasedAccType;\n if (!tp) {\n this.billingData = null;\n return;\n }\n\n const incomingBillingData = data.response;\n\n if (incomingBillingData?.acc?.findIndex((el: BillingWalletAccount) => el.tp === tp) !== -1) {\n this.billingData = {\n ...incomingBillingData,\n fired_utc_at,\n };\n } else {\n this.billingData = null;\n }\n}\n\nconst lsDismissQualifiedInvestorCardKey = 'qualified-investor-card:dismiss';\n\nexport const useProfileStore = defineStore('profile', {\n state: (): State => ({\n serverData: shallowRef(null),\n\n userid: null,\n sessionExpired: false,\n phone: null,\n\n permissionsAccess: null,\n\n companiesList: [],\n\n investorAppTask: null,\n investorProfileAppTask: null,\n borrowerAppTask: null,\n borrowerProfileAppTask: null,\n\n roleSide: lastSelectedCompany?.side || getLastSelectedRole(),\n companyId: lastSelectedCompany?.companyId,\n\n billingData: null,\n\n companyTypesByRoles: readonly({\n borrower: ['borr.UL', 'borr.IP', 'borr'], // \"borr\" = как заглушка при реге, placeholder для метки будущей роли\n investor: ['invest.FL', 'invest.UL', 'invest.IP', 'invest'], // \"invest\" = ... так же метка для будущей роли\n }),\n\n isGuestMode: false,\n totalUnreadTickets: 0,\n\n userDismissQualifiedInvestorCard: window?.localStorage?.getItem(lsDismissQualifiedInvestorCardKey)?.toLowerCase() === 'true' ?? false,\n }),\n\n getters: {\n selectedCompanyData(state): Record | null | undefined {\n const roleSide = state.roleSide;\n const companyId = state.companyId;\n if (!roleSide || !companyId) return null;\n\n return state.companiesList.find((company) => {\n return company.id === companyId && state.companyTypesByRoles[roleSide].includes(company.type);\n });\n },\n\n roleBasedAccType(state) {\n const side = state.roleSide;\n if (!side) return null;\n\n return billingAccountTypeBySide[side];\n },\n\n billingWalletAccountsByTypes(state) {\n const billingDataAcc = state.billingData?.acc;\n if (!billingDataAcc) return null;\n\n return Object.fromEntries(billingDataAcc.map((acc: BillingWalletAccount) => [acc.tp, acc]));\n },\n\n investorAppRegState(state) {\n const regState = state.investorAppTask?.state;\n if (!regState || regState === 'done') {\n return regState;\n }\n\n const lastTaskState = state.investorAppTask?.last_task_state;\n if (\n ['irf_checked', 'irf_considering', 'irf_autocheck_failed', 'irf_autocheck_success', 'iru_checked', 'iru_considering', 'iru_autocheck_failed', 'iru_autocheck_success', 'iru_fin_pass_err', 'irf_fin_pass_err'].includes(lastTaskState)\n ) {\n return 'pending';\n }\n\n if (['irf_waitcoin', 'iru_waitcoin'].includes(lastTaskState)) {\n return 'bank_confirm';\n }\n\n return regState;\n },\n\n borrowerAppRegState(state) {\n return state.borrowerAppTask?.state;\n },\n\n borrowerReturnToFill(state): boolean {\n return state.borrowerAppRegState !== 'done';\n },\n\n investorReturnToFill(state): boolean {\n return state.investorAppRegState == null;\n },\n\n companyRegStateCompleted(state) {\n // TODO: сделать util для определения статусов регистрации роли\n\n const roleSide = state.roleSide;\n if (!roleSide) return null;\n\n if (roleSide === 'borrower') {\n return this.borrowerAppRegState === 'done';\n } else if (roleSide === 'investor') {\n return ['done', 'bank_confirm'].includes(this.investorAppRegState);\n }\n\n return false;\n },\n\n isCurrentQualifiedInvestor(state): boolean | null {\n if (state.roleSide !== 'investor') return null;\n if (!state.selectedCompanyData) return null;\n\n if (state.selectedCompanyData.is_qualified_investor === true) {\n return true;\n }\n\n return false;\n },\n\n canBeQualifiedInvestor(state): boolean | null {\n if (state.investorAppRegState !== 'done') return false;\n if (!state.selectedCompanyData) return null;\n if (state.selectedCompanyData.type !== 'invest.FL') {\n return false;\n }\n\n return state.isCurrentQualifiedInvestor === false;\n },\n\n isAuthenticated(state): boolean {\n return Boolean(state.userid);\n },\n\n investors(state) {\n return state.companiesList?.filter((company) => this.companyTypesByRoles.investor.includes(company.type)) ?? [];\n },\n\n borrowers(state) {\n return state.companiesList?.filter((company) => this.companyTypesByRoles.borrower.includes(company.type)) ?? [];\n },\n\n dismissQualifiedInvestorCard(state): boolean {\n return !state.canBeQualifiedInvestor || this.userDismissQualifiedInvestorCard;\n },\n\n visibleName(state) {\n if (!state.serverData) return null;\n\n const output = state.companyRegStateCompleted === true && state.selectedCompanyData?.name;\n return output || formatPhone(state.phone);\n }, \n\n availableReferralPage(): boolean {\n if (!this.companyRegStateCompleted) return false;\n\n return this.selectedCompanyData.type === 'invest.FL';\n }\n },\n\n actions: {\n onSignalrEvent({ event, data }: { event: SignalRMethodName; data?: any }) {\n if (event === signalrMethods.ticketNewMessage) {\n this.totalUnreadTickets = data.total_unread;\n } else if (event === signalrMethods.balanceChange) {\n if (data.companyid === this.companyId && this.billingData && data.balance != null) {\n const billingDataAccItemById = this.billingData.acc.find((el: BillingWalletAccount) => el.id == data.id);\n if (billingDataAccItemById) {\n billingDataAccItemById.balance = data.balance;\n }\n }\n }\n },\n\n convertCompanyTypeToRoleSide(companyType: string): RoleSide | null {\n if (!companyType) return null;\n\n if (this.companyTypesByRoles.investor.includes(companyType)) {\n return 'investor';\n }\n\n if (this.companyTypesByRoles.borrower.includes(companyType)) {\n return 'borrower';\n }\n\n return null;\n },\n\n findAnyCompanyByRole(role: RoleSide) {\n return this.companiesList.find((company) => this.companyTypesByRoles[role].includes(company.type));\n },\n\n /**\n * Переключение между компаниями (инвестор/заемщик) пользователя.\n * Если payload не задан, то берёт первую из списка\n */\n // FIXME: получать быстро список всех актуальных компаний перед сменой\n async switchToCompany(payload?: Nullable) {\n let role: SwitchCompanyPayload['role'], companyId: SwitchCompanyPayload['companyId'];\n\n payload && ({ role, companyId } = payload);\n\n if (role && !companyId) {\n // ищем первую попавшуюся компанию по роли\n companyId = this.findAnyCompanyByRole(role)?.id;\n } else if (companyId) {\n // ищем роль по ид компании\n role = this.convertCompanyTypeToRoleSide(this.companiesList.find((company) => company.id === companyId)?.type);\n }\n\n this.roleSide = role;\n this.companyId = role ? companyId : null;\n\n setLastSessionSelectedCompany({\n side: this.roleSide,\n companyId: this.companyId,\n userid: this.userid,\n });\n\n role && setLastSelectedRole(role);\n\n // TODO: проверять что companyid/role изменились и только тогда вызывать fetch?\n if (!this.userid) {\n await this.fetchServerData();\n }\n\n this.fetchBillingAccount();\n },\n\n async fetchServerData() {\n // FIXME: посмотреть что именно делает, и упразднить по возможности - слишком перегруженный\n\n this.billingData = null;\n return Vue.http.get(profileGet).then(async (wrapper) => {\n this.sessionExpired = false;\n\n const apiResponse = wrapper.data.response;\n this.serverData = apiResponse;\n\n const newUserid = apiResponse?.userid;\n if (this.userid !== newUserid) {\n defaultBroadcastServiceSender?.postMessage({ type: 'new-login' });\n }\n\n this.userid = newUserid;\n this.phone = apiResponse?.phone;\n\n this.totalUnreadTickets = apiResponse?.total_unread_tickets;\n\n this.companiesList = apiResponse?.companys || [];\n\n if (apiResponse?.tasks) {\n let borrowerTask = null,\n investorTask = null,\n investorProfileTask = [],\n borrowerProfileTask = [];\n for (const task of apiResponse.tasks) {\n if (!borrowerTask && task.type === 'borrower_reg') {\n borrowerTask = task;\n } else if (!investorTask && investorRegistrationTasksTypes.includes(task.type)) {\n investorTask = task;\n } else if (investorProfileRegistrationTasksTypes.includes(task.type)) {\n investorProfileTask.push(task);\n } else if ('borrower_profile_config'.includes(task.type)) {\n borrowerProfileTask.push(task);\n }\n }\n\n this.investorAppTask = investorTask;\n this.borrowerAppTask = borrowerTask;\n if (investorProfileTask.length == 1) {\n this.investorProfileAppTask = investorProfileTask[0];\n } else {\n let filtered = investorProfileTask.sort((b, a) => new Date(a.dadd).getTime() - new Date(b.dadd).getTime());\n this.investorProfileAppTask = filtered[0];\n }\n if (borrowerProfileTask.length == 1) {\n this.borrowerProfileAppTask = borrowerProfileTask[0];\n } else {\n let filtered = borrowerProfileTask.sort((b, a) => new Date(a.dadd).getTime() - new Date(b.dadd).getTime());\n this.borrowerProfileAppTask = filtered[0];\n }\n } else {\n this.borrowerAppTask = this.investorAppTask = null;\n }\n\n if (!this.companyId || this.companiesList.findIndex((company) => company.id === this.companyId) === -1) {\n this.roleSide = this.companyId = null;\n }\n\n if (this.companyId) {\n this.fetchBillingAccount();\n }\n\n return wrapper;\n });\n },\n\n async fetchBillingAccount() {\n return Vue.http\n .get(companyBilling, {\n globalLoader: false,\n shouldRetry: ({ data }, error) => {\n if (!this.companyId || !this.companyRegStateCompleted) {\n return false;\n }\n\n return !data?.response?.acc?.length;\n },\n })\n .then((response) => {\n if (!response.data) {\n return Promise.reject(response);\n }\n\n return updateBillingData.call(this, response.data);\n })\n .catch((error) => {\n this.billingData = null;\n return Promise.reject(error);\n });\n },\n\n setGuestModeAvailable(value: boolean) {\n this.isGuestMode = !this.isAuthenticated && value;\n },\n\n hideDismissQualifiedInvestorCard() {\n this.userDismissQualifiedInvestorCard = true;\n window?.localStorage?.setItem(lsDismissQualifiedInvestorCardKey, this.userDismissQualifiedInvestorCard);\n },\n\n fetchInvestmentStats(tabInfo) {\n return Vue.http.post(companyInvestmentStats, { period: tabInfo || 'all' }, { globalLoader: false }).then(({ data }) => data.response);\n },\n },\n});\n","import type { SidePanel } from '../types';\n\nexport const AcceptAutoApp: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./AcceptAutoApp.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const ApiKeys: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./KeysPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const CardealerSubjects: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./CardealerSubjectsPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const ChangePassword: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./PassPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const ChooseInvestorAutoPanel: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./ChooseInvestorAutoPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const ConfirmDialog: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./ConfirmDialogPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const EarlyRepayment: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./EarlyRepaymentPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const InvestBuy: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./InvestBuyPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const InvestSell: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./InvestSellPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const Invest: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./InvestPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const PayPenalty: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./PayPenaltyPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const RepaymentDetail: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./RepaymentDetailPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const RequisiteAdd: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./RequisiteAddForm.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const SettingAutoWallet: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./SettingAutoWalletPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const SmsSign: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./SmsSign.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const TaxiparkSubjects: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./TaxiparkSubjectsPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const Tickets: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./TicketsPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const Topup: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./TopupCashPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const TransactionDetail: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./TransactionDetailPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const TransferMoney: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./TransferMoneyPanel.vue')),\n};\n","import type { SidePanel } from '../types';\n\nexport const Withdrawals: SidePanel.VueComponent = {\n component: defineAsyncComponent(() => import('./WithdrawalsPanel.vue')),\n};\n","import type { UnwrapRef } from 'vue';\nimport type { SidePanel } from '@/components/side-panels/types';\nimport { defineStore, type _GettersTree } from 'pinia';\nimport * as SidePanels from '@/components/side-panels';\n\ntype Nullable = T | null | undefined;\n\ntype SidePanelId = number;\ntype SidePanelName = keyof typeof SidePanels;\ntype SidePanelCloseVisible = boolean;\ntype SpawnProps = Record;\ntype SpawnEvents = Record;\n\ntype SpawnObjectPayload = { name: SidePanelName; props?: SpawnProps; events?: SpawnEvents; closeVisible: SidePanelCloseVisible };\ntype SpawnPayload = SidePanelName | SpawnObjectPayload | [name: SidePanelName, props?: SpawnProps, events?: SpawnEvents, closeVisible?: SidePanelCloseVisible];\n\nexport type ActiveSidePanel = SidePanel.VueComponent & Required & { id: SidePanelId };\ntype StoreState = {\n activeSidePanels: Ref;\n nextPanelId: SidePanelId;\n};\ntype StoreGetters = {\n panelsNamesInUse: (state: UnwrapRef) => SidePanelName[];\n visibleSidePanel: (state: UnwrapRef) => ActiveSidePanel | null;\n};\ntype StoreActions = {\n spawn(payload: SpawnPayload): SidePanelId | undefined;\n\n despawn(id: SidePanelId): void;\n despawn(name: SidePanelName): void;\n despawn(name: null, all: true): void;\n despawn(closeVisible: SidePanelCloseVisible): void;\n};\n\ntype ComparatorActiveSidePanel = (value: T) => (sidePanel: ActiveSidePanel) => boolean;\nconst findById: ComparatorActiveSidePanel = (value) => (sidePanel) => sidePanel.id === value;\nconst findByName: ComparatorActiveSidePanel = (value) => (sidePanel) => sidePanel.name === value;\n\nexport const useSidepanelStore = defineStore<'side-panel', StoreState, StoreGetters, StoreActions>('side-panel', {\n state: () => ({\n activeSidePanels: ref([]),\n\n nextPanelId: 1,\n }),\n\n getters: {\n panelsNamesInUse(state) {\n return state.activeSidePanels.reduce((result, value) => {\n if (result.includes(value.name)) return result;\n\n result.push(value.name);\n return result;\n }, [] as SidePanelName[]);\n },\n\n visibleSidePanel(state) {\n const length = state.activeSidePanels.length;\n if (!length) return null;\n\n return state.activeSidePanels[length - 1];\n },\n },\n\n actions: {\n spawn(payload: SpawnPayload) {\n let name: SidePanelName, props: Nullable, events: Nullable, closeVisible: SidePanelCloseVisible;\n\n if (typeof payload === 'object') {\n if (Array.isArray(payload)) {\n [name, props, events, closeVisible] = payload;\n } else {\n ({ name, props, events, closeVisible } = payload);\n }\n } else if (typeof payload === 'string') {\n name = payload as SidePanelName;\n } else {\n throw new Error('Unknown payload structure');\n }\n\n const sidePanel = name && SidePanels[name];\n if (!sidePanel) return; // TODO: throw error?\n\n const id = this.nextPanelId++;\n const activeSidePanel: ActiveSidePanel = Object.assign({ id, name, props: props || {}, events: events || {}, closeVisible: closeVisible || true }, sidePanel);\n\n this.activeSidePanels.push(activeSidePanel);\n\n return id;\n },\n\n despawn(...args: unknown[]) {\n const firstArgumentType = typeof args[0];\n\n if (firstArgumentType === 'number' || firstArgumentType === 'string') {\n let comparator: ReturnType | ReturnType;\n if (firstArgumentType === 'string') {\n comparator = findByName(args[0] as SidePanelName);\n } else {\n comparator = findById(args[0] as SidePanelId);\n }\n\n const idx = this.activeSidePanels.findIndex(comparator);\n if (idx !== -1) {\n const sidePanel = this.activeSidePanels[idx];\n sidePanel.events.onDespawn?.();\n\n this.activeSidePanels.splice(idx, 1);\n }\n } else if (args[0] === null && args[1] === true) {\n for (const sidePanel of this.activeSidePanels) {\n sidePanel.events.onDespawn?.();\n }\n\n this.activeSidePanels = [];\n } else {\n throw new Error('Error parsing function arguments \"despawn\" sidepanel');\n }\n },\n },\n});\n","import type { RouteConfig } from 'vue-router';\n\nexport const cabinetRoutes: RouteConfig[] = [\n {\n path: 'investor/projects/:num([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12})/:human?',\n alias: ['borrower/projects/:num([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12})/:human?'],\n redirect: (to) => ({\n name: 'project-direct',\n params: to.params,\n query: to.query,\n hash: to.hash,\n }),\n },\n {\n path: 'borrower/apps/:num([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12})?',\n redirect: '/cabinet/loan-app/:num',\n },\n {\n path: 'borrower/apps/new',\n redirect: '/cabinet/loan-app/new',\n },\n];\n","import { factory as PositionableFactory } from '../positionable'; // Util\n\nimport mixins from '../../util/mixins';\nexport default function applicationable(value, events = []) {\n /* @vue/component */\n return mixins(PositionableFactory(['absolute', 'fixed'])).extend({\n name: 'applicationable',\n props: {\n app: Boolean\n },\n computed: {\n applicationProperty() {\n return value;\n }\n\n },\n watch: {\n // If previous value was app\n // reset the provided prop\n app(x, prev) {\n prev ? this.removeApplication(true) : this.callUpdate();\n },\n\n applicationProperty(newVal, oldVal) {\n this.$vuetify.application.unregister(this._uid, oldVal);\n }\n\n },\n\n activated() {\n this.callUpdate();\n },\n\n created() {\n for (let i = 0, length = events.length; i < length; i++) {\n this.$watch(events[i], this.callUpdate);\n }\n\n this.callUpdate();\n },\n\n mounted() {\n this.callUpdate();\n },\n\n deactivated() {\n this.removeApplication();\n },\n\n destroyed() {\n this.removeApplication();\n },\n\n methods: {\n callUpdate() {\n if (!this.app) return;\n this.$vuetify.application.register(this._uid, this.applicationProperty, this.updateApplication());\n },\n\n removeApplication(force = false) {\n if (!force && !this.app) return;\n this.$vuetify.application.unregister(this._uid, this.applicationProperty);\n },\n\n updateApplication: () => 0\n }\n });\n}\n//# sourceMappingURL=index.js.map","// Styles\nimport \"../../../src/components/VFooter/VFooter.sass\"; // Components\n\nimport VSheet from '../VSheet/VSheet'; // Mixins\n\nimport Applicationable from '../../mixins/applicationable';\nimport SSRBootable from '../../mixins/ssr-bootable'; // Utilities\n\nimport mixins from '../../util/mixins';\nimport { convertToUnit } from '../../util/helpers';\n/* @vue/component */\n\nexport default mixins(VSheet, Applicationable('footer', ['height', 'inset']), SSRBootable).extend({\n name: 'v-footer',\n props: {\n height: {\n default: 'auto',\n type: [Number, String]\n },\n inset: Boolean,\n padless: Boolean,\n tag: {\n type: String,\n default: 'footer'\n }\n },\n computed: {\n applicationProperty() {\n return this.inset ? 'insetFooter' : 'footer';\n },\n\n classes() {\n return { ...VSheet.options.computed.classes.call(this),\n 'v-footer--absolute': this.absolute,\n 'v-footer--fixed': !this.absolute && (this.app || this.fixed),\n 'v-footer--padless': this.padless,\n 'v-footer--inset': this.inset\n };\n },\n\n computedBottom() {\n if (!this.isPositioned) return undefined;\n return this.app ? this.$vuetify.application.bottom : 0;\n },\n\n computedLeft() {\n if (!this.isPositioned) return undefined;\n return this.app && this.inset ? this.$vuetify.application.left : 0;\n },\n\n computedRight() {\n if (!this.isPositioned) return undefined;\n return this.app && this.inset ? this.$vuetify.application.right : 0;\n },\n\n isPositioned() {\n return Boolean(this.absolute || this.fixed || this.app);\n },\n\n styles() {\n const height = parseInt(this.height);\n return { ...VSheet.options.computed.styles.call(this),\n height: isNaN(height) ? height : convertToUnit(height),\n left: convertToUnit(this.computedLeft),\n right: convertToUnit(this.computedRight),\n bottom: convertToUnit(this.computedBottom)\n };\n }\n\n },\n methods: {\n updateApplication() {\n const height = parseInt(this.height);\n return isNaN(height) ? this.$el ? this.$el.clientHeight : 0 : height;\n }\n\n },\n\n render(h) {\n const data = this.setBackgroundColor(this.color, {\n staticClass: 'v-footer',\n class: this.classes,\n style: this.styles\n });\n return h(this.tag, data, this.$slots.default);\n }\n\n});\n//# sourceMappingURL=VFooter.js.map","\n\n\n\n\n","import Vue from 'vue';\nimport { type RouteConfig } from 'vue-router';\nimport { useProfileStore } from '@/store/profile';\nimport { useSidepanelStore } from '@/store/side-panel';\nimport { cabinetRoutes as legacyCabinetRoutes } from './legacy-routes';\n\nconst CabinetLayout = defineAsyncComponent(() => import('@/layouts/CabinetLayout.vue'));\nconst SimpleLayout = defineAsyncComponent(() => import('@/layouts/SimpleLayout.vue'));\n\nconst RoleBasedCabinetSidebar = defineAsyncComponent(() => import('@/components/cabinet/RoleBasedCabinetSidebar.vue'));\nconst SimpleGridView = defineAsyncComponent(() => import('@/views/SimpleGridView.vue'));\n\nimport SiteFooter from '@/components/common/SiteFooter.vue';\n\nconst routes: RouteConfig[] = [\n {\n name: 'index',\n path: '/',\n meta: {\n pageTitle: null,\n },\n // перенаправляем на кабинет, там есть проверка на авторизацию, если не авторизован перенапрвит на account/login\n redirect: { name: 'Cabinet' },\n },\n {\n name: 'account',\n path: '/account',\n components: {\n default: SimpleLayout,\n footer: SiteFooter,\n },\n meta: {\n pageTitle: null,\n },\n children: [\n {\n name: 'register',\n meta: {\n pageTitle: 'Регистрация',\n },\n path: 'register',\n component: defineAsyncComponent(() => import('@/views/RegisterView.vue')),\n },\n {\n name: 'login',\n path: 'login',\n alias: '',\n meta: {\n pageTitle: 'Авторизация',\n },\n component: defineAsyncComponent(() => import('@/views/LoginView.vue')),\n },\n {\n name: 'recovery',\n path: 'recovery',\n meta: {\n pageTitle: 'Восстановления пароля',\n },\n component: defineAsyncComponent(() => import('@/views/RecoveryView.vue')),\n },\n ],\n },\n {\n path: '/cabinet',\n name: 'Cabinet',\n meta: {\n pageTitle: null,\n breadcrumbTitle: 'Главная',\n },\n components: {\n default: CabinetLayout,\n bar: defineAsyncComponent(() => import('@/components/common/FBRAppBar.vue')),\n footer: SiteFooter,\n },\n async beforeEnter(to, from, next) {\n const profileStore = useProfileStore();\n await profileStore.fetchServerData().catch(console.error);\n\n if (to.meta?.guestRole) {\n return next();\n }\n\n if (!profileStore.isAuthenticated) {\n // разрешаем переход на просмотр страниц для которых разрешен режим гостя\n return next({ name: 'login', query: { redirectTo: to.path } });\n }\n\n let finalCompanyId: string | undefined;\n if (!profileStore.roleSide && to.name !== 'pickMemberRole') {\n finalCompanyId = profileStore.findAnyCompanyByRole('investor')?.id || profileStore.findAnyCompanyByRole('borrower')?.id; // сначала ищем инвестора, потом заемщика\n if (!finalCompanyId) {\n return next({ name: 'pickMemberRole' });\n }\n } else if (profileStore.roleSide && !profileStore.companyId) {\n finalCompanyId = profileStore.findAnyCompanyByRole(profileStore.roleSide)?.id;\n }\n\n if (finalCompanyId) {\n await profileStore.switchToCompany({ companyId: finalCompanyId });\n }\n\n next();\n },\n children: [\n ...legacyCabinetRoutes,\n {\n name: 'pickMemberRole',\n path: 'member-role',\n meta: {\n pageTitle: 'Выбор роли участника',\n },\n component: defineAsyncComponent(() => import('@/views/MemberRoleView.vue')),\n },\n {\n name: 'board',\n path: 'board',\n components: {\n default: defineAsyncComponent(() => import('@/components/cabinet/RoleBasedCabinetBoard.vue')),\n sidebar: RoleBasedCabinetSidebar,\n },\n },\n {\n path: 'transactions',\n component: SimpleGridView,\n props: {\n default: {\n backButtonRoute: {\n name: 'board',\n },\n },\n },\n children: [\n {\n name: 'transactionsList',\n path: '/',\n alias: 'list',\n meta: {\n pageTitle: 'Список операций',\n },\n component: defineAsyncComponent(() => import('@/components/transactions/TransactionGrid.vue')),\n },\n ],\n },\n {\n path: 'projects-market',\n component: defineAsyncComponent(() => import('@/components/new-design/ProjectsMarket.vue')),\n meta: {\n role: 'investor',\n pageTitle: 'Рынок',\n },\n },\n {\n path: 'invest-portfolio',\n component: defineAsyncComponent(() => import('@/components/new-design/InvestPortfolio.vue')),\n meta: {\n role: 'investor',\n pageTitle: 'Портфель',\n },\n },\n {\n name: 'project-direct',\n path: 'projects/:num([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12})/:human?', // project direct url,\n meta: {\n pageTitle: 'Просмотр проекта', // TODO: сюда бы вывести номер проекта\n guestRole: 'investor',\n },\n components: {\n default: defineAsyncComponent(() => import('@/views/ProjectView.vue')),\n sidebar: defineAsyncComponent(() => import('@/components/project/sidebar/RoleBasedProjectSidebar.vue')),\n },\n },\n {\n name: 'investorRegistration',\n path: 'investor-registration',\n meta: {\n pageTitle: 'Регистрация инвестора',\n role: 'investor',\n hideAppBarNavigation: true,\n },\n component: defineAsyncComponent(() => import('@/components/apps/StepsInvestor.vue')),\n },\n {\n name: 'investorGetQualified',\n path: 'qualified-investor',\n meta: {\n pageTitle: 'Заявка на квалиф. инвестора',\n role: 'investor',\n hideAppBarNavigation: true,\n },\n component: defineAsyncComponent(() => import('@/views/investor/InvestorQualifiedApp.vue')),\n },\n {\n name: 'loanApp',\n path: 'loan-app/:num([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12})?', // direct url to loan app (new or fill)\n alias: 'loan-app/new',\n meta: {\n pageTitle: 'Заполнение заявки', // TODO: сюда бы вывести статус движения заявки?\n role: 'borrower',\n hideAppBarNavigation: true,\n },\n props: (route) => {\n if (route.path.endsWith('/new') || (!route.params.num && route.params.isBare)) {\n return {\n isBare: true,\n };\n }\n },\n component: defineAsyncComponent(() => import('@/views/borrower/BorrowerAppView.vue')),\n },\n {\n path: 'autoinvest-app/new',\n meta: {\n pageTitle: 'Новая заявка на автоинвестирование/следование',\n breadcrumbTitle: 'Новая заявка',\n role: 'investor',\n hideAppBarNavigation: true,\n },\n props: (route) => {\n return {\n useInternalView: route.meta?.useInternalView,\n };\n },\n component: defineAsyncComponent(() => import('@/views/investor/AutoinvestAppNew.vue')),\n children: [\n {\n path: 'auto-app',\n meta: {\n useInternalView: true,\n pageTitle: 'Новая заявка на автоинвестирование',\n breadcrumbTitle: 'Автоинвестирование',\n },\n component: defineAsyncComponent(() => import('@/views/investor/AutoinvestApp/AutoApp.vue')),\n },\n\n {\n path: 'auto-follow',\n meta: {\n useInternalView: true,\n pageTitle: 'Новая заявка на автоследование',\n breadcrumbTitle: 'Автоследование',\n },\n component: defineAsyncComponent(() => import('@/views/investor/AutoinvestApp/AutoFollow.vue')),\n },\n ],\n },\n {\n path: 'fill',\n meta: {\n pageTitle: 'Регистрация заемщика',\n role: 'borrower',\n hideAppBarNavigation: true,\n },\n beforeEnter(to, from, next) {\n const profileStore = useProfileStore();\n\n if (profileStore.borrowerAppRegState === 'done') {\n return next({ name: 'board' });\n }\n\n return next();\n },\n component: defineAsyncComponent(() => import('@/views/borrower/BorrowerFillView.vue')),\n },\n {\n name: 'profile',\n path: 'profile',\n component: defineAsyncComponent(() => import('@/views/ProfileView.vue')),\n },\n {\n path: 'ticket/:ticketNum',\n alias: 't/:ticketNum',\n beforeEnter(to, from, next) {\n if (to.params.ticketNum) {\n const sidePanelStore = useSidepanelStore();\n sidePanelStore.spawn({\n name: 'Tickets',\n props: {\n ticketNum: to.params.ticketNum,\n },\n });\n }\n\n return next({ name: 'board' });\n },\n },\n ],\n },\n {\n // таск отправляет свой ид, перенаправляем на страницу проекта инвестора\n path: '/resolve-project/:id',\n async beforeEnter(to, from, next) {\n const { response } = await Vue.http.post('/admin/ext/task/resolve_project_by_id', {\n id: to.params.id,\n });\n\n const project_id = response?.project_id;\n if (!project_id) {\n Vue.notify({\n type: 'error',\n text: 'Проект не найден',\n duration: -1,\n });\n return;\n }\n\n return next({ name: 'project-direct', params: { num: response.project_id } });\n },\n },\n {\n path: '*',\n redirect: '/account/login',\n },\n];\n\nexport { routes, routes as default };\n","import Vue from 'vue';\nimport VueRouter, { isNavigationFailure, NavigationFailureType } from 'vue-router';\nimport type { ErrorHandler, Route, RawLocation } from 'vue-router/types/router';\n\nimport routes from './routes';\nimport { useProfileStore } from '@/store/profile';\n\n// vue-router не даёт нам почему-то передавать query через route guard, делаем это\nclass CustomVueRouter extends VueRouter {\n // @ts-expect-error\n push(to: RawLocation, onComplete?: (route: Route) => void, onAbort?: ErrorHandler): void {\n try {\n super.push(to, onComplete, onAbort);\n } catch (exception) {\n if (import.meta.env.DEV === false) {\n if (isNavigationFailure(exception, NavigationFailureType.duplicated)) return;\n }\n\n throw exception;\n }\n }\n}\n\nif (window.location.search.length) {\n // не совладал с тем как vue-router управляет query - храним utm в другом месте\n const initialSearchParams = new URLSearchParams(window.location.search);\n for (const [key, value] of initialSearchParams) {\n if (key.startsWith('utm_') || key === 'ref') {\n localStorage.setItem(key, value);\n document.cookie = [\n key + '=' + encodeURIComponent(value),\n 'Secure',\n import.meta.env.PROD && 'Domain=' + import.meta.env.VITE_APP_COOKIE_DOMAIN,\n 'Expires=' + new Date(Date.now() + 2_678_400 * 1000).toUTCString(),\n `Max-Age=${2_678_400}`,\n 'SameSite=lax',\n ]\n .filter((item) => Boolean(item))\n .join('; ');\n }\n }\n}\n\nconst router = new CustomVueRouter({\n mode: 'history',\n base: import.meta.env.BASE_URL,\n routes,\n});\n\nrouter.afterEach((to) => {\n if (to.meta?.pageTitle !== undefined) {\n // null - сброс на обычное наименование (из dotenv), без упоминания страниц\n Vue.changeTitle(to.meta.pageTitle);\n }\n});\n\nrouter.beforeResolve(async (to, from, next) => {\n if (to.path == '/account/login') return next();\n\n const profileStore = useProfileStore();\n const currentSide = profileStore.roleSide;\n\n if (!profileStore.serverData) {\n await profileStore.fetchServerData();\n }\n\n if (to.meta?.role && currentSide !== to.meta.role) {\n return next({ name: 'board' }); // FIXME: нужна какая-то страница что \"доступ на эту страницу запрещен из-за роли\"\n }\n\n if (to.name === 'Cabinet') {\n return next({ name: 'board' });\n }\n\n // FIXME: создать meta свойство что-то вроде \"requireSelectedCompany\"\n if (to.name === 'board' && !profileStore.companyId) {\n return next({ name: 'pickMemberRole' });\n }\n\n if (profileStore.isAuthenticated) {\n if (currentSide === 'borrower') {\n const toRegisterBorrowerRoute = to.path === '/cabinet/fill' || to.name === 'pickMemberRole';\n if (profileStore.borrowerAppRegState && profileStore.borrowerAppRegState !== 'done') {\n if (!toRegisterBorrowerRoute) {\n return next('/cabinet/fill');\n }\n } else if (!profileStore.borrowerAppRegState && !toRegisterBorrowerRoute) {\n return next({ name: 'pickMemberRole' });\n }\n }\n }\n\n return next();\n});\n\nrouter.beforeEach(async (to, from, next) => {\n const profileStore = useProfileStore();\n const currentSide = profileStore.roleSide;\n\n if (to.query.role) {\n const queryRole = to.query.role;\n\n if ((queryRole === 'investor' || queryRole === 'borrower') && queryRole !== currentSide) {\n profileStore.switchToCompany({ role: queryRole });\n }\n\n return router.replace({ ...to, query: { ...to.query, role: undefined } } as RawLocation);\n }\n\n return next();\n});\n\nexport default router;\nexport { CustomVueRouter };\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","//\n//\n//\n//\n//\n//\n\nvar script = {\n name: 'teleport',\n props: {\n to: {\n type: String,\n required: true,\n },\n where: {\n type: String,\n default: 'after',\n },\n disabled: Boolean,\n },\n data: function data() {\n return {\n nodes: [],\n waiting: false,\n observer: null,\n parent: null,\n };\n },\n watch: {\n to: 'maybeMove',\n where: 'maybeMove',\n disabled: function disabled(value) {\n var this$1 = this;\n\n if (value) {\n this.disable();\n // Ensure all event done.\n this.$nextTick(function () {\n this$1.teardownObserver();\n });\n } else {\n this.bootObserver();\n this.move();\n }\n },\n },\n mounted: function mounted() {\n // Store a reference to the nodes\n this.nodes = Array.from(this.$el.childNodes);\n\n if (!this.disabled) {\n this.bootObserver();\n }\n\n // Move slot content to target\n this.maybeMove();\n },\n beforeDestroy: function beforeDestroy() {\n // Fix nodes reference\n this.nodes = this.getComponentChildrenNode();\n\n // Move back\n this.disable();\n\n // Stop observing\n this.teardownObserver();\n },\n computed: {\n classes: function classes() {\n if (this.disabled) {\n return ['teleporter'];\n }\n\n return ['teleporter', 'hidden'];\n },\n },\n methods: {\n maybeMove: function maybeMove() {\n if (!this.disabled) {\n this.move();\n }\n },\n move: function move() {\n this.waiting = false;\n\n this.parent = document.querySelector(this.to);\n\n if (!this.parent) {\n this.disable();\n\n this.waiting = true;\n\n return;\n }\n\n if (this.where === 'before') {\n this.parent.prepend(this.getFragment());\n } else {\n this.parent.appendChild(this.getFragment());\n }\n },\n disable: function disable() {\n this.$el.appendChild(this.getFragment());\n this.parent = null;\n },\n // Using a fragment is faster because it'll trigger only a single reflow\n // See https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment\n getFragment: function getFragment() {\n var fragment = document.createDocumentFragment();\n\n this.nodes.forEach(function (node) { return fragment.appendChild(node); });\n\n return fragment;\n },\n onMutations: function onMutations(mutations) {\n var this$1 = this;\n\n // Makes sure the move operation is only done once\n var shouldMove = false;\n\n for (var i = 0; i < mutations.length; i++) {\n var mutation = mutations[i];\n var filteredAddedNodes = Array.from(mutation.addedNodes).filter(function (node) { return !this$1.nodes.includes(node); });\n\n if (Array.from(mutation.removedNodes).includes(this.parent)) {\n this.disable();\n this.waiting = !this.disabled;\n } else if (this.waiting && filteredAddedNodes.length > 0) {\n shouldMove = true;\n }\n }\n\n if (shouldMove) {\n this.move();\n }\n },\n bootObserver: function bootObserver() {\n var this$1 = this;\n\n if (this.observer) {\n return;\n }\n\n this.observer = new MutationObserver(function (mutations) { return this$1.onMutations(mutations); });\n\n this.observer.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: false,\n characterData: false,\n });\n\n if (this.childObserver) {\n return;\n }\n // watch childNodes change\n this.childObserver = new MutationObserver(function (mutations) {\n var childChangeRecord = mutations.find(function (i) { return i.target === this$1.$el; });\n if (childChangeRecord) {\n // Remove old nodes before update position.\n this$1.nodes.forEach(function (node) { return node.parentNode && node.parentNode.removeChild(node); });\n this$1.nodes = this$1.getComponentChildrenNode();\n this$1.maybeMove();\n }\n });\n\n this.childObserver.observe(this.$el, {\n childList: true,\n subtree: false,\n attributes: false,\n characterData: false,\n });\n },\n teardownObserver: function teardownObserver() {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n if (this.childObserver) {\n this.childObserver.disconnect();\n this.childObserver = null;\n }\n },\n getComponentChildrenNode: function getComponentChildrenNode() {\n return this.$vnode.componentOptions.children\n .map(function (i) { return i.elm; })\n .filter(function (i) { return i; });\n },\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\nvar isOldIE = typeof navigator !== 'undefined' &&\r\n /msie [6-9]\\\\b/.test(navigator.userAgent.toLowerCase());\r\nfunction createInjector(context) {\r\n return function (id, style) { return addStyle(id, style); };\r\n}\r\nvar HEAD;\r\nvar styles = {};\r\nfunction addStyle(id, css) {\r\n var group = isOldIE ? css.media || 'default' : id;\r\n var style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });\r\n if (!style.ids.has(id)) {\r\n style.ids.add(id);\r\n var code = css.source;\r\n if (css.map) {\r\n // https://developer.chrome.com/devtools/docs/javascript-debugging\r\n // this makes source maps inside style tags work properly in Chrome\r\n code += '\\n/*# sourceURL=' + css.map.sources[0] + ' */';\r\n // http://stackoverflow.com/a/26603875\r\n code +=\r\n '\\n/*# sourceMappingURL=data:application/json;base64,' +\r\n btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +\r\n ' */';\r\n }\r\n if (!style.element) {\r\n style.element = document.createElement('style');\r\n style.element.type = 'text/css';\r\n if (css.media)\r\n { style.element.setAttribute('media', css.media); }\r\n if (HEAD === undefined) {\r\n HEAD = document.head || document.getElementsByTagName('head')[0];\r\n }\r\n HEAD.appendChild(style.element);\r\n }\r\n if ('styleSheet' in style.element) {\r\n style.styles.push(code);\r\n style.element.styleSheet.cssText = style.styles\r\n .filter(Boolean)\r\n .join('\\n');\r\n }\r\n else {\r\n var index = style.ids.size - 1;\r\n var textNode = document.createTextNode(code);\r\n var nodes = style.element.childNodes;\r\n if (nodes[index])\r\n { style.element.removeChild(nodes[index]); }\r\n if (nodes.length)\r\n { style.element.insertBefore(textNode, nodes[index]); }\r\n else\r\n { style.element.appendChild(textNode); }\r\n }\r\n }\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"div\", { class: _vm.classes }, [_vm._t(\"default\")], 2)\n};\nvar __vue_staticRenderFns__ = [];\n__vue_render__._withStripped = true;\n\n /* style */\n var __vue_inject_styles__ = function (inject) {\n if (!inject) { return }\n inject(\"data-v-50f4b45b_0\", { source: \".hidden[data-v-50f4b45b] {\\n visibility: hidden;\\n display: none;\\n}\\n\\n/*# sourceMappingURL=Teleport.vue.map */\", map: {\"version\":3,\"sources\":[\"/home/shodan/Projects/vue2-teleport/src/Teleport.vue\",\"Teleport.vue\"],\"names\":[],\"mappings\":\"AA2LA;EACA,kBAAA;EACA,aAAA;AC1LA;;AAEA,uCAAuC\",\"file\":\"Teleport.vue\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\",\".hidden {\\n visibility: hidden;\\n display: none;\\n}\\n\\n/*# sourceMappingURL=Teleport.vue.map */\"]}, media: undefined });\n\n };\n /* scoped */\n var __vue_scope_id__ = \"data-v-50f4b45b\";\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n createInjector,\n undefined,\n undefined\n );\n\n// Taken from https://vuejs.org/v2/cookbook/packaging-sfc-for-npm.html\n\n// Declare install function executed by Vue.use()\nfunction install (Vue) {\n if (install.installed) { return; }\n\n install.installed = true;\n Vue.component('Teleport', __vue_component__);\n}\n\n// Create module definition for Vue.use()\nvar plugin = {\n install: install,\n};\n\n// Auto-install when vue is found (eg. in browser via \n\n\n","import Vue from 'vue';\nimport mitt from 'mitt';\nimport { createPinia, PiniaVuePlugin } from 'pinia';\nimport SharedWorker from '@okikio/sharedworker';\n\nconst bus = mitt();\n\nimport router, { CustomVueRouter } from '@/router';\nimport vuetify from '@/plugins/vuetify';\n\nimport ChangeTitlePlugin from './plugins/change-title';\nimport HttpPlugin from './plugins/http';\nimport ErrorTrackingPlugin from './plugins/error-tracking';\nimport NotificationsPlugin from './plugins/notifications';\n\nimport { errortrackingNew } from './api/endpoints/misc';\nimport { useProfileStore } from './store/profile';\nimport { defaultBroadcastServiceReceiver } from '@/utils/broadcast-service';\n\nconst signalr = new SharedWorker(new URL('./signalr.sharedworker', import.meta.url), { type: 'module' });\nsignalr.start();\n\nconst busSignalrEventType = 'signalr:event'; // TODO: в константы?\nsignalr.addEventListener('message', ({ data: [event, data] }) => {\n import.meta.env.DEV && console.log(`%c${busSignalrEventType} -> %s`, 'color: black; background-color: orange; padding: 0.25em', event, data);\n\n bus.emit(busSignalrEventType, { event, data });\n});\n\nimport App from './App.vue';\nimport SiteLogo from '@/components/common/SiteLogo.vue';\nimport SiteFooter from '@/components/common/SiteFooter.vue';\n\nVue.use(PiniaVuePlugin);\nVue.use(ChangeTitlePlugin);\nVue.use(NotificationsPlugin, { bus });\n\nconst pinia = createPinia();\npinia.use(({ options, store }) => {\n // проверяем есть ли action onSignalrEvent у store. Если есть - отправляем туда signalr события через emitt\n const { onSignalrEvent } = options.actions;\n if (onSignalrEvent) {\n const busHandler = onSignalrEvent.bind(store);\n bus.on(busSignalrEventType, busHandler);\n\n const originalDispose = store.$dispose.bind(store);\n store.$dispose = () => {\n bus.off(busSignalrEventType, busHandler);\n originalDispose();\n };\n }\n\n if (typeof options.beforeDispose === 'function') {\n const originalDispose = store.$dispose.bind(store);\n\n store.$dispose = () => {\n options.beforeDispose.call(store);\n originalDispose();\n };\n }\n});\n\nVue.use(HttpPlugin, {\n afterInstall(instance) {\n instance.interceptors.request.use((request) => {\n const profileStore = useProfileStore();\n\n const selectedCompanyId = profileStore.companyId;\n if (selectedCompanyId) {\n request.headers.set('companyid', selectedCompanyId);\n }\n\n return request;\n });\n\n instance.interceptors.response.use(undefined, (wrapper) => {\n if (wrapper.config?.localErrorHandle !== true) {\n if (wrapper.name === 'CanceledError') {\n return Promise.reject(wrapper);\n }\n\n let message;\n if (wrapper.err) {\n message = wrapper.response.errdesc || wrapper.response.err || 'Сервер вернул неизвестную ошибку';\n } else if (wrapper.response) {\n message = `Ошибка ${wrapper.response.status}`;\n } else if (wrapper.request) {\n message = 'Не удалось получить ответ от сервера';\n } else {\n message = 'Что-то пошло не так';\n }\n\n Vue.notify({\n text: message,\n type: 'error',\n });\n\n if (wrapper.response?.err === 'unauthorized') {\n const profileStore = useProfileStore();\n profileStore.sessionExpired = true;\n }\n }\n\n return Promise.reject(wrapper);\n });\n },\n});\n\nif (window) {\n window.BUILD_UTC_AT = __BUILD_UTC_AT__;\n\n if (import.meta.env.DEV && import.meta.env.VITE_APP_BUILD_COMMIT_SHORT_SHA) {\n window.COMMIT_SHORT_SHA = import.meta.env.VITE_APP_BUILD_COMMIT_SHORT_SHA;\n }\n}\n\nVue.use(ErrorTrackingPlugin, {\n handler: (data) => {\n if (import.meta.env.DEV || import.meta.env.MODE === 'development') {\n let notifyMessage;\n\n if (data?.error?.vmname) {\n notifyMessage = `${data.error.vmname}: ${data.error.msg}`;\n } else if (data?.error?.msg) {\n notifyMessage = data.error.msg;\n }\n\n Vue.notify({\n text: notifyMessage || 'Ошибка JavaScript Runtime',\n type: 'warning',\n duration: -1,\n });\n\n if (import.meta.env.DEV) {\n console.warn(errortrackingNew, data);\n return;\n }\n }\n\n Vue.http.post(errortrackingNew, data, { globalLoader: false });\n },\n});\nVue.use(CustomVueRouter);\n\ndefaultBroadcastServiceReceiver?.addEventListener('message', (event) => {\n if (event?.data?.type === 'new-login') {\n // TODO: в signalr отправлять/принимать userid с которого установилось соединение и отправлять: на основе этого определять - переподключаться или нет\n signalr?.postMessage(['reconnect']);\n // TODO: update pinia store\n }\n});\n\nnew Vue({\n components: {\n SiteLogo,\n SiteFooter,\n },\n\n provide() {\n return {\n bus,\n notify: Vue.notify,\n };\n },\n\n router,\n vuetify,\n pinia,\n render: (h) => h(App),\n}).$mount('#app');\n"],"file":"js/app-gH2qgYpL.js"}