{"version":3,"sources":["webpack:///./node_modules/vuex-persistedstate/dist/vuex-persistedstate.es.js","webpack:///./node_modules/vue3-chart-v2/src/components/BaseChart.js","webpack:///./node_modules/vuex/dist/vuex.esm-browser.js","webpack:///(webpack)/buildin/module.js","webpack:///./node_modules/vue-router/dist/vue-router.esm-bundler.js","webpack:///./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack:///./node_modules/vue/dist/vue.runtime.esm-bundler.js","webpack:///./node_modules/normalize-wheel/src/isEventSupported.js","webpack:///./node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","webpack:///./node_modules/vue-cropperjs/dist/VueCropper.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/normalize-wheel/src/ExecutionEnvironment.js","webpack:///./node_modules/normalize-wheel/index.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/normalize-wheel/src/normalizeWheel.js","webpack:///./node_modules/path-browserify/index.js","webpack:///./node_modules/popper.js/dist/esm/popper.js"],"names":["r","t","Object","prototype","toString","call","$$typeof","e","Symbol","for","clone","isMergeableObject","u","Array","isArray","n","concat","map","o","keys","getOwnPropertySymbols","filter","propertyIsEnumerable","c","i","a","arrayMerge","cloneUnlessOtherwiseSpecified","f","forEach","hasOwnProperty","customMerge","all","Error","reduce","storage","window","localStorage","key","getItem","JSON","parse","setItem","stringify","test","split","slice","pop","subscribe","assertStorage","removeItem","s","getState","fetchBeforeUse","replaceState","overwrite","state","arrayMerger","rehydrated","subscriber","setState","reducer","paths","useChartInfo","myName","userData","userOptions","setChartData","payload","setChartOption","generateChart","chartsId","chartsType","name","props","chartId","type","String","required","chartType","width","Number","default","height","cssClasses","styles","chartObj","this","destroy","methods","charObj","data","datasets","ctx","$refs","canvas","getContext","options","document","getElementById","backgroundColor","labels","responsive","computed","watch","prevState","newState","renderChart","currentChartOption","style","class","ref","id","Doughnut","Pie","storeKey","useStore","target","global","devtoolHook","__VUE_DEVTOOLS_GLOBAL_HOOK__","devtoolPlugin","store","_devtoolHook","emit","on","targetState","mutation","prepend","subscribeAction","action","find","list","deepCopy","obj","cache","hit","original","copy","push","forEachValue","fn","isObject","isPromise","val","then","assert","condition","msg","partial","arg","Module","rawModule","runtime","_children","create","_rawModule","rawState","prototypeAccessors","namespaced","configurable","get","addChild","module","removeChild","getChild","hasChild","update","actions","mutations","getters","forEachChild","forEachGetter","forEachAction","forEachMutation","defineProperties","ModuleCollection","rawRootModule","register","path","targetModule","newModule","assertRawModule","modules","console","warn","root","getNamespace","namespace","this$1","length","parent","rawChildModule","unregister","child","isRegistered","functionAssert","value","expected","objectAssert","handler","assertTypes","assertOptions","makeAssertionMessage","buf","join","createStore","Store","Promise","plugins","strict","_committing","_actions","_actionSubscribers","_mutations","_wrappedGetters","_modules","_modulesNamespaceMap","_subscribers","_makeLocalGettersCache","dispatch","commit","installModule","resetStoreState","plugin","useDevtools","undefined","devtools","prototypeAccessors$1","genericSubscribe","subs","indexOf","unshift","splice","resetStore","hot","oldState","_state","wrappedGetters","computedObj","defineProperty","enumerable","enableStrictMode","_withCommit","rootState","isRoot","error","parentState","getNestedState","moduleName","local","context","makeLocalContext","namespacedType","registerMutation","registerAction","getter","registerGetter","noNamespace","_type","_payload","_options","args","unifyObjectStyle","makeLocalGetters","gettersProxy","splitPos","localType","entry","res","rootGetters","resolve","catch","err","rawGetter","deep","flush","install","app","injectKey","provide","config","globalProperties","$store","set","v","sub","silent","before","result","reject","after","cb","assign","registerModule","preserveState","unregisterModule","hasModule","hotUpdate","newOptions","committing","mapState","normalizeNamespace","states","isValidMap","normalizeMap","getModuleByNamespace","vuex","mapMutations","len","arguments","apply","mapGetters","mapActions","createNamespacedHelpers","bind","charAt","helper","createLogger","collapsed","stateBefore","stateAfter","transformer","mutationTransformer","mut","actionFilter","actionTransformer","act","logMutations","logActions","logger","nextState","formattedTime","getFormattedTime","formattedMutation","message","startMessage","log","endMessage","formattedAction","groupCollapsed","group","groupEnd","time","Date","pad","getHours","getMinutes","getSeconds","getMilliseconds","repeat","str","times","num","maxLength","index","version","exports","webpackPolyfill","deprecate","children","l","hasSymbol","toStringTag","PolySymbol","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","isBrowser","isESModule","__esModule","applyToParams","params","newParams","noop","TRAILING_SLASH_RE","removeTrailingSlash","replace","parseURL","parseQuery","location","currentLocation","query","searchString","hash","searchPos","hashPos","resolveRelativePath","fullPath","stringifyURL","stringifyQuery","stripBase","pathname","base","toLowerCase","startsWith","isSameRouteLocation","b","aLastIndex","matched","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","aliasOf","isSameRouteLocationParamsValue","isEquivalentArray","every","to","from","fromSegments","toSegments","toPosition","segment","position","NavigationType","NavigationDirection","normalizeBase","baseEl","querySelector","getAttribute","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","documentElement","getBoundingClientRect","elRect","behavior","left","top","computeScrollPosition","pageXOffset","pageYOffset","scrollToPosition","scrollToOptions","positionEl","isIdSelector","scrollTo","getScrollKey","delta","history","scrollPositions","Map","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","delete","createBaseLocation","protocol","host","createCurrentLocation","search","slicePos","includes","pathFromHash","useHistoryListeners","historyState","listeners","teardowns","pauseState","popStateHandler","fromState","listener","direction","forward","back","unknown","pauseListeners","listen","callback","teardown","beforeUnloadListener","removeEventListener","addEventListener","buildState","current","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","START_LOCATION_NORMALIZED","meta","redirectedFrom","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","sensitive","start","end","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","RegExp","subPattern","match","avoidDuplicatedSlash","endsWith","param","text","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","Math","abs","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parser","matcher","alias","createRouterMatcher","routes","globalOptions","matchers","matcherMap","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","mergeOptions","normalizedRecords","aliases","components","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","insertMatcher","matcherRef","getRoutes","isRecordChildOf","paramsFromLocation","k","m","parentMatcher","mergeMetaFields","redirect","beforeEnter","normalizeRecordProps","instances","leaveGuards","Set","updateGuards","enterCallbacks","component","propsObject","defaults","partialOptions","some","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeURI","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","decodeURIComponent","hasLeadingIM","searchParams","searchParam","eqPos","currentValue","values","normalizeQuery","normalizedQuery","useCallbacks","handlers","add","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","isRouteComponent","__vccOpts","componentPromise","resolved","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","routeMatched","currentMatched","findIndex","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","href","RouterLinkImpl","compatConfig","MODE","Boolean","activeClass","exactActiveClass","custom","ariaCurrentValue","slots","link","elClass","getLinkClass","linkActiveClass","linkExactActiveClass","onClick","RouterLink","metaKey","altKey","ctrlKey","shiftKey","defaultPrevented","button","currentTarget","preventDefault","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","inheritAttrs","attrs","injectedRoute","routeToDisplay","depth","matchedRouteRef","viewRef","instance","oldInstance","oldName","size","matchedRoute","ViewComponent","currentName","normalizeSlot","Component","routePropsOption","routeProps","onVnodeUnmounted","vnode","isUnmounted","slot","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","scrollBehavior","scrollRestoration","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matcherLocation","targetParams","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","newTargetLocation","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","reverse","canceledNavigationCheck","runGuardQueue","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","info","ready","readyHandlers","errorHandlers","isReady","started","installedApps","beforeEach","beforeResolve","afterEach","onError","$router","reactiveRoute","unmountApp","unmount","promise","max","recordFrom","recordTo","MapShim","getIndex","arr","class_1","__entries__","entries","has","clear","_i","_a","global$1","self","Function","requestAnimationFrame$1","requestAnimationFrame","setTimeout","now","trailingTimeout","throttle","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","REFRESH_DELAY","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","addObserver","observer","connect_","removeObserver","observers","disconnect_","changesDetected","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","observe","attributes","childList","characterData","subtree","disconnect","_b","propertyName","isReflowProperty","getInstance","instance_","defineConfigurable","writable","getWindowOf","ownerGlobal","ownerDocument","defaultView","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","positions","getPaddings","paddings","positions_1","getSVGContentRect","bbox","getBBox","getHTMLElementContentRect","clientWidth","clientHeight","getComputedStyle","horizPad","right","vertPad","bottom","boxSizing","round","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getContentRect","createReadOnlyRect","x","y","Constr","DOMRectReadOnly","rect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","broadcastRect","ResizeObserverEntry","rectInit","contentRect","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","unobserve","clearActive","_this","observation","WeakMap","ResizeObserver","method","compile","useHasFeature","ExecutionEnvironment","isEventSupported","eventNameSuffix","capture","canUseDOM","eventName","isSupported","element","createElement","setAttribute","implementation","hasFeature","_ie","_firefox","_opera","_webkit","_chrome","_ie_real_version","_osx","_windows","_linux","_android","_win64","_iphone","_ipad","_native","_mobile","_populated","_populate","uas","navigator","userAgent","agent","exec","os","NaN","documentMode","trident","ver","UserAgent_DEPRECATED","ie","ieCompatibilityMode","ie64","firefox","opera","webkit","safari","chrome","windows","osx","linux","iphone","mobile","nativeApp","android","ipad","_vue","_cropperjs","_cropperjs2","_interopRequireDefault","_objectWithoutProperties","previewPropType","NodeList","render","crossorigin","h","containerStyle","src","alt","imgStyle","viewMode","dragMode","initialAspectRatio","aspectRatio","preview","restore","checkCrossOrigin","checkOrientation","modal","guides","center","highlight","background","autoCrop","autoCropArea","movable","rotatable","scalable","zoomable","zoomOnTouch","zoomOnWheel","wheelZoomRatio","cropBoxMovable","cropBoxResizable","toggleDragModeOnDblclick","minCanvasWidth","minCanvasHeight","minCropBoxWidth","minCropBoxHeight","minContainerWidth","minContainerHeight","cropstart","cropmove","cropend","crop","zoom","mounted","_$options$props","$options","cropper","img","initCrop","onlyColorChanged","enable","disable","move","offsetX","offsetY","moveTo","relativeZoom","ratio","_originalEvent","zoomTo","rotate","degree","rotateTo","scaleX","_scaleX","scaleY","_scaleY","scale","getData","rounded","setData","getContainerData","getImageData","getCanvasData","setCanvasData","getCropBoxData","setCropBoxData","getCroppedCanvas","setAspectRatio","setDragMode","mode","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","makeInvokeMethod","tryCatch","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","__await","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","done","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","isNaN","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","object","skipTempReset","prev","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","canUseWorkers","Worker","canUseEventListeners","attachEvent","canUseViewport","screen","isInWorker","g","PIXEL_STEP","LINE_HEIGHT","PAGE_HEIGHT","normalizeWheel","event","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","deltaY","deltaX","deltaMode","spinX","spinY","pixelX","pixelY","getEventType","normalizeArray","parts","allowAboveRoot","up","basename","matchedSlash","charCodeAt","xs","resolvedPath","resolvedAbsolute","process","cwd","p","normalize","isAbsolute","trailingSlash","substr","relative","trim","fromParts","toParts","min","samePartsLength","outputParts","sep","delimiter","dirname","code","hasRoot","ext","extname","startDot","startPart","preDotState","timeoutDuration","longerTimeoutBrowsers","microtaskDebounce","called","taskDebounce","scheduled","supportsMicroTasks","debounce","isFunction","functionToCheck","getType","getStyleComputedProperty","property","nodeType","css","getParentNode","nodeName","parentNode","getScrollParent","body","_getStyleComputedProp","overflow","overflowX","overflowY","getReferenceNode","reference","referenceNode","isIE11","MSInputMethodContext","isIE10","isIE","getOffsetParent","noOffsetParent","offsetParent","nextElementSibling","isOffsetContainer","firstElementChild","getRoot","node","findCommonOffsetParent","element1","element2","order","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","range","createRange","setStart","setEnd","commonAncestorContainer","contains","element1root","getScroll","side","upperSide","html","scrollingElement","includeScroll","subtract","scrollTop","scrollLeft","modifier","sideA","sideB","getSize","computedStyle","parseInt","getWindowSizes","classCallCheck","Constructor","createClass","descriptor","protoProps","staticProps","_extends","source","getClientRect","offsets","sizes","offsetWidth","offsetHeight","getOffsetRectRelativeToArbitraryNode","fixedPosition","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","getViewportOffsetRectRelativeToArtbitraryNode","excludeScroll","relativeOffset","innerWidth","innerHeight","isFixed","getFixedPositionOffsetParent","parentElement","getBoundaries","popper","padding","boundariesElement","boundaries","boundariesNode","_getWindowSizes","isPaddingNumber","getArea","_ref","computeAutoPlacement","placement","refRect","rects","sortedAreas","area","sort","filteredAreas","_ref2","computedPlacement","variation","getReferenceOffsets","commonOffsetParent","getOuterSizes","marginBottom","marginRight","getOppositePlacement","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","check","prop","cur","runModifiers","modifiers","ends","modifiersToRun","enabled","isDestroyed","arrowStyles","flipped","positionFixed","flip","originalPlacement","isCreated","onUpdate","onCreate","isModifierEnabled","modifierName","getSupportedPropertyName","prefixes","upperProp","toUpperCase","prefix","toCheck","removeAttribute","willChange","disableEventListeners","removeOnDestroy","getWindow","attachToScrollParents","scrollParents","isBody","passive","setupEventListeners","updateBound","scrollElement","eventsEnabled","enableEventListeners","scheduleUpdate","removeEventListeners","cancelAnimationFrame","isNumeric","isFinite","setStyles","unit","setAttributes","applyStyle","arrowElement","applyStyleOnLoad","modifierOptions","getRoundedOffsets","shouldRound","_data$offsets","floor","noRound","referenceWidth","popperWidth","isVertical","isVariation","sameWidthParity","bothOddWidth","horizontalToInteger","verticalToInteger","isFirefox","computeStyle","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","devicePixelRatio","prefixedProperty","invertTop","invertLeft","arrow","isModifierRequired","requestingName","requestedName","requesting","isRequired","_requesting","requested","_data$offsets$arrow","sideCapitalized","altSide","opSide","arrowElementSize","popperMarginSide","popperBorderSide","sideValue","getOppositeVariation","placements","validPlacements","clockwise","counter","BEHAVIORS","FLIP","CLOCKWISE","COUNTERCLOCKWISE","placementOpposite","flipOrder","step","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flipVariations","flippedVariationByContent","flipVariationsByContent","flippedVariation","keepTogether","toValue","parseOffset","basePlacement","useHeight","fragments","frag","divider","splitRegex","ops","op","mergeWithPrevious","index2","preventOverflow","transformProp","popperStyles","transform","priority","primary","escapeWithReference","secondary","shift","shiftvariation","shiftOffsets","hide","bound","subtractLength","onLoad","Defaults","Popper","jquery","Utils","PopperUtils"],"mappings":"0HAAA,IAAIA,EAAE,SAASA,GAAG,OAAO,SAASA,GAAG,QAAQA,GAAG,iBAAiBA,EAAxC,CAA2CA,KAAK,SAASA,GAAG,IAAIC,EAAEC,OAAOC,UAAUC,SAASC,KAAKL,GAAG,MAAM,oBAAoBC,GAAG,kBAAkBA,GAAG,SAASD,GAAG,OAAOA,EAAEM,WAAWC,EAAhC,CAAmCP,GAAzI,CAA6IA,IAAIO,EAAE,mBAAmBC,QAAQA,OAAOC,IAAID,OAAOC,IAAI,iBAAiB,MAAM,SAASR,EAAED,EAAEO,GAAG,OAAM,IAAKA,EAAEG,OAAOH,EAAEI,kBAAkBX,GAAGY,EAAEC,MAAMC,QAAQd,GAAG,GAAG,GAAGA,EA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,GAAOD,SAAWA,GAEH,iB","file":"js/chunk-vendors~b58f7129.c614a712.js","sourcesContent":["var r=function(r){return function(r){return!!r&&\"object\"==typeof r}(r)&&!function(r){var t=Object.prototype.toString.call(r);return\"[object RegExp]\"===t||\"[object Date]\"===t||function(r){return r.$$typeof===e}(r)}(r)},e=\"function\"==typeof Symbol&&Symbol.for?Symbol.for(\"react.element\"):60103;function t(r,e){return!1!==e.clone&&e.isMergeableObject(r)?u(Array.isArray(r)?[]:{},r,e):r}function n(r,e,n){return r.concat(e).map(function(r){return t(r,n)})}function o(r){return Object.keys(r).concat(function(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return r.propertyIsEnumerable(e)}):[]}(r))}function c(r,e){try{return e in r}catch(r){return!1}}function u(e,i,a){(a=a||{}).arrayMerge=a.arrayMerge||n,a.isMergeableObject=a.isMergeableObject||r,a.cloneUnlessOtherwiseSpecified=t;var f=Array.isArray(i);return f===Array.isArray(e)?f?a.arrayMerge(e,i,a):function(r,e,n){var i={};return n.isMergeableObject(r)&&o(r).forEach(function(e){i[e]=t(r[e],n)}),o(e).forEach(function(o){(function(r,e){return c(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))})(r,o)||(i[o]=c(r,o)&&n.isMergeableObject(e[o])?function(r,e){if(!e.customMerge)return u;var t=e.customMerge(r);return\"function\"==typeof t?t:u}(o,n)(r[o],e[o],n):t(e[o],n))}),i}(e,i,a):t(i,a)}u.all=function(r,e){if(!Array.isArray(r))throw new Error(\"first argument should be an array\");return r.reduce(function(r,t){return u(r,t,e)},{})};var i=u;function a(r){var e=(r=r||{}).storage||window&&window.localStorage,t=r.key||\"vuex\";function n(r,e){var t=e.getItem(r);try{return void 0!==t?JSON.parse(t):void 0}catch(r){}}function o(){return!0}function c(r,e,t){return t.setItem(r,JSON.stringify(e))}function u(r,e){return Array.isArray(e)?e.reduce(function(e,t){return function(r,e,t,n){return!/__proto__/.test(e)&&((e=e.split?e.split(\".\"):e.slice(0)).slice(0,-1).reduce(function(r,e){return r[e]=r[e]||{}},r)[e.pop()]=t),r}(e,t,(n=r,void 0===(n=((o=t).split?o.split(\".\"):o).reduce(function(r,e){return r&&r[e]},n))?void 0:n));var n,o},{}):r}function a(r){return function(e){return r.subscribe(e)}}(r.assertStorage||function(){e.setItem(\"@@\",1),e.removeItem(\"@@\")})(e);var f,s=function(){return(r.getState||n)(t,e)};return r.fetchBeforeUse&&(f=s()),function(n){r.fetchBeforeUse||(f=s()),\"object\"==typeof f&&null!==f&&(n.replaceState(r.overwrite?f:i(n.state,f,{arrayMerge:r.arrayMerger||function(r,e){return e},clone:!1})),(r.rehydrated||function(){})(n)),(r.subscriber||a)(n)(function(n,i){(r.filter||o)(n)&&(r.setState||c)(t,(r.reducer||u)(i,r.paths),e)})}}export default a;\n//# sourceMappingURL=vuex-persistedstate.es.js.map\n","import Chart from 'chart.js'\r\nimport { defineComponent, h, reactive } from 'vue'\r\n\r\nfunction useChartInfo() {\r\n const state = reactive({\r\n myName: '',\r\n userData: {},\r\n userOptions: {}\r\n })\r\n\r\n function setChartData(payload) {\r\n state.userData = payload\r\n }\r\n\r\n function setChartOption(payload) {\r\n state.userOptions = payload\r\n }\r\n\r\n return {\r\n state,\r\n setChartData,\r\n setChartOption\r\n }\r\n}\r\n\r\n/**\r\n *\r\n * @param chartsId string\r\n * @param chartsType string\r\n */\r\nfunction generateChart(chartsId, chartsType) {\r\n let { state, setChartData, setChartOption } = useChartInfo()\r\n\r\n return defineComponent({\r\n name: 'BaseChart',\r\n props: {\r\n chartId: {\r\n type: String,\r\n required: false\r\n },\r\n chartType: {\r\n type: String,\r\n required: false\r\n },\r\n width: {\r\n type: Number,\r\n required: false,\r\n default: 400\r\n },\r\n height: {\r\n type: Number,\r\n required: false,\r\n default: 400\r\n },\r\n cssClasses: {\r\n type: String,\r\n required: false,\r\n default: ''\r\n },\r\n styles: {\r\n type: Object,\r\n required: false\r\n }\r\n },\r\n data() {\r\n return {\r\n state: {\r\n chartObj: null\r\n }\r\n }\r\n },\r\n // emits: ['chart:update'],\r\n\r\n beforeUnmount() {\r\n if (this.state.chartObj) {\r\n this.state.chartObj.destroy()\r\n }\r\n },\r\n methods: {\r\n renderChart(userData, userOptions) {\r\n setChartData(userData)\r\n setChartOption(userOptions)\r\n\r\n if (this.state.chartObj) {\r\n // this.state.chartObj.destroy()\r\n }\r\n // if (!this.$refs.canvas) {\r\n // throw new Error('Please remove the tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components')\r\n // }\r\n\r\n // REMOVE OLD DATA FIRST BEFORE UPDATE.\r\n if (this.state.charObj != null && this.state.chartObj.data != null) { this.state.chartObj.data.datasets.pop() }\r\n\r\n let ctx = this.$refs.canvas.getContext('2d')\r\n this.state.chartObj = new Chart(ctx, {\r\n type: chartsType,\r\n data: userData,\r\n options: userOptions\r\n // plugins: this.$data._plugins\r\n })\r\n }\r\n },\r\n beforeMount() {\r\n if (document.getElementById(chartsId)) {\r\n let ctx = document.getElementById(chartsId).getContext('2d')\r\n this.state.chartObj = new Chart(ctx, {\r\n type: chartsType,\r\n data: {\r\n datasets: [\r\n {\r\n data: [1, 2, 3, 4],\r\n backgroundColor: ['Red', 'Yellow', 'Blue', 'Green']\r\n }\r\n ],\r\n // These labels appear in the legend and in the tooltips when hovering different arcs\r\n labels: ['Red', 'Yellow', 'Blue', 'Green']\r\n },\r\n options: {\r\n responsive: false\r\n }\r\n // options: this.options,\r\n // plugins: this.$data._plugins\r\n })\r\n }\r\n },\r\n computed: {\r\n currentChartData() {\r\n return state.userData\r\n },\r\n currentChartOption() {\r\n return state.userOptions\r\n }\r\n },\r\n watch: {\r\n chartData(prevState, newState) {\r\n if (prevState !== newState) {\r\n this.renderChart(newState, this.currentChartOption)\r\n }\r\n }\r\n },\r\n render() {\r\n // return h('canvas', {\r\n // ref: 'canvas',\r\n // id: this.chartId,\r\n // width: this.width,\r\n // height: this.height\r\n // })\r\n return h('div', { style: this.styles, class: this.cssClasses }, [\r\n h('canvas', {\r\n ref: 'canvas',\r\n id: this.chartId,\r\n width: this.width,\r\n height: this.height\r\n })\r\n ])\r\n }\r\n })\r\n}\r\n\r\nconst Bar = generateChart('bar-chart', 'bar')\r\nconst Bubble = generateChart('bubble-chart', 'bubble')\r\nconst Doughnut = generateChart('doughnut-chart', 'doughnut')\r\nconst HorizontalBar = generateChart('horizontalbar-chart', 'horizontalBar')\r\nconst Line = generateChart('line-chart', 'line')\r\nconst Pie = generateChart('pie-chart', 'pie')\r\nconst PolarArea = generateChart('polar-chart', 'polarArea')\r\nconst Radar = generateChart('radar-chart', 'radar')\r\nconst Scatter = generateChart('scatter-chart', 'scatter')\r\n\r\nexport {\r\n Bar,\r\n Bubble,\r\n Doughnut,\r\n HorizontalBar,\r\n Line,\r\n Pie,\r\n PolarArea,\r\n Radar,\r\n Scatter,\r\n generateChart\r\n // renderChart\r\n}\r\n","/*!\n * vuex v4.0.0\n * (c) 2021 Evan You\n * @license MIT\n */\nimport { inject, watch, reactive } from 'vue';\n\nvar storeKey = 'store';\n\nfunction useStore (key) {\n if ( key === void 0 ) key = null;\n\n return inject(key !== null ? key : storeKey)\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\nfunction find (list, f) {\n return list.filter(f)[0]\n}\n\n/**\n * Deep copy the given object considering circular structure.\n * This function caches all nested objects and its copies.\n * If it detects circular structure, use cached copy to avoid infinite loop.\n *\n * @param {*} obj\n * @param {Array} cache\n * @return {*}\n */\nfunction deepCopy (obj, cache) {\n if ( cache === void 0 ) cache = [];\n\n // just return if obj is immutable value\n if (obj === null || typeof obj !== 'object') {\n return obj\n }\n\n // if obj is hit, it is in circular structure\n var hit = find(cache, function (c) { return c.original === obj; });\n if (hit) {\n return hit.copy\n }\n\n var copy = Array.isArray(obj) ? [] : {};\n // put the copy into cache at first\n // because we want to refer it in recursive deepCopy\n cache.push({\n original: obj,\n copy: copy\n });\n\n Object.keys(obj).forEach(function (key) {\n copy[key] = deepCopy(obj[key], cache);\n });\n\n return copy\n}\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.hasChild = function hasChild (key) {\n return key in this._children\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n var child = parent.getChild(key);\n\n if (!child) {\n {\n console.warn(\n \"[vuex] trying to unregister module '\" + key + \"', which is \" +\n \"not registered\"\n );\n }\n return\n }\n\n if (!child.runtime) {\n return\n }\n\n parent.removeChild(key);\n};\n\nModuleCollection.prototype.isRegistered = function isRegistered (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n\n if (parent) {\n return parent.hasChild(key)\n }\n\n return false\n};\n\nfunction update (path, targetModule, newModule) {\n {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nfunction createStore (options) {\n return new Store(options)\n}\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n {\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._makeLocalGettersCache = Object.create(null);\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store state, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreState(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : /* Vue.config.devtools */ true;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nStore.prototype.install = function install (app, injectKey) {\n app.provide(injectKey || storeKey, this);\n app.config.globalProperties.$store = this;\n};\n\nprototypeAccessors$1.state.get = function () {\n return this._state.data\n};\n\nprototypeAccessors$1.state.set = function (v) {\n {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n\n this._subscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n \n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return new Promise(function (resolve, reject) {\n result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n resolve(res);\n }, function (error) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.error; })\n .forEach(function (sub) { return sub.error(action, this$1.state, error); });\n } catch (e) {\n {\n console.warn(\"[vuex] error in error action subscribers: \");\n console.error(e);\n }\n }\n reject(error);\n });\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn, options) {\n return genericSubscribe(fn, this._subscribers, options)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn, options) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers, options)\n};\n\nStore.prototype.watch = function watch$1 (getter, cb, options) {\n var this$1 = this;\n\n {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return watch(function () { return getter(this$1.state, this$1.getters); }, cb, Object.assign({}, options))\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._state.data = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreState(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n delete parentState[path[path.length - 1]];\n });\n resetStore(this);\n};\n\nStore.prototype.hasModule = function hasModule (path) {\n if (typeof path === 'string') { path = [path]; }\n\n {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n return this._modules.isRegistered(path)\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs, options) {\n if (subs.indexOf(fn) < 0) {\n options && options.prepend\n ? subs.unshift(fn)\n : subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset state\n resetStoreState(store, state, hot);\n}\n\nfunction resetStoreState (store, state, hot) {\n var oldState = store._state;\n\n // bind store public getters\n store.getters = {};\n // reset local getters cache\n store._makeLocalGettersCache = Object.create(null);\n var wrappedGetters = store._wrappedGetters;\n var computedObj = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldState.\n // using partial to return function with only arguments preserved in closure environment.\n computedObj[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n // TODO: use `computed` when it's possible. at the moment we can't due to\n // https://github.com/vuejs/vuex/pull/1883\n get: function () { return computedObj[key](); },\n enumerable: true // for local getters\n });\n });\n\n store._state = reactive({\n data: state\n });\n\n // enable strict mode for new state\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldState) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldState.data = null;\n });\n }\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n if (store._modulesNamespaceMap[namespace] && true) {\n console.error((\"[vuex] duplicate namespace \" + namespace + \" for the namespaced module \" + (path.join('/'))));\n }\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n {\n if (moduleName in parentState) {\n console.warn(\n (\"[vuex] state field \\\"\" + moduleName + \"\\\" was overridden by a module with the same name at \\\"\" + (path.join('.')) + \"\\\"\")\n );\n }\n }\n parentState[moduleName] = module.state;\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ( !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ( !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by state update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n if (!store._makeLocalGettersCache[namespace]) {\n var gettersProxy = {};\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n store._makeLocalGettersCache[namespace] = gettersProxy;\n }\n\n return store._makeLocalGettersCache[namespace]\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n watch(function () { return store._state.data; }, function () {\n {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, flush: 'sync' });\n}\n\nfunction getNestedState (state, path) {\n return path.reduce(function (state, key) { return state[key]; }, state)\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n if ( !isValidMap(states)) {\n console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n if ( !isValidMap(mutations)) {\n console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n if ( !isValidMap(getters)) {\n console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if ( !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n if ( !isValidMap(actions)) {\n console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n if (!isValidMap(map)) {\n return []\n }\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Validate whether given map is valid or not\n * @param {*} map\n * @return {Boolean}\n */\nfunction isValidMap (map) {\n return Array.isArray(map) || isObject(map)\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if ( !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\n// Credits: borrowed code from fcomb/redux-logger\n\nfunction createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}\n\nfunction startMessage (logger, message, collapsed) {\n var startMessage = collapsed\n ? logger.groupCollapsed\n : logger.group;\n\n // render\n try {\n startMessage.call(logger, message);\n } catch (e) {\n logger.log(message);\n }\n}\n\nfunction endMessage (logger) {\n try {\n logger.groupEnd();\n } catch (e) {\n logger.log('—— log end ——');\n }\n}\n\nfunction getFormattedTime () {\n var time = new Date();\n return (\" @ \" + (pad(time.getHours(), 2)) + \":\" + (pad(time.getMinutes(), 2)) + \":\" + (pad(time.getSeconds(), 2)) + \".\" + (pad(time.getMilliseconds(), 3)))\n}\n\nfunction repeat (str, times) {\n return (new Array(times + 1)).join(str)\n}\n\nfunction pad (num, maxLength) {\n return repeat('0', maxLength - num.toString().length) + num\n}\n\nvar index = {\n version: '4.0.0',\n Store: Store,\n storeKey: storeKey,\n createStore: createStore,\n useStore: useStore,\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers,\n createLogger: createLogger\n};\n\nexport default index;\nexport { Store, createLogger, createNamespacedHelpers, createStore, mapActions, mapGetters, mapMutations, mapState, storeKey, useStore };\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/*!\n * vue-router v4.0.16\n * (c) 2022 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst hasSymbol = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\r\nconst PolySymbol = (name) => \r\n// vr = vue router\r\nhasSymbol\r\n ? Symbol((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' + name : name)\r\n : ((process.env.NODE_ENV !== 'production') ? '[vue-router]: ' : '_vr_') + name;\r\n// rvlm = Router View Location Matched\r\n/**\r\n * RouteRecord being rendered by the closest ancestor Router View. Used for\r\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\r\n * Location Matched\r\n *\r\n * @internal\r\n */\r\nconst matchedRouteKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : 'rvlm');\r\n/**\r\n * Allows overriding the router view depth to control which component in\r\n * `matched` is rendered. rvd stands for Router View Depth\r\n *\r\n * @internal\r\n */\r\nconst viewDepthKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : 'rvd');\r\n/**\r\n * Allows overriding the router instance returned by `useRouter` in tests. r\r\n * stands for router\r\n *\r\n * @internal\r\n */\r\nconst routerKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router' : 'r');\r\n/**\r\n * Allows overriding the current route returned by `useRoute` in tests. rl\r\n * stands for route location\r\n *\r\n * @internal\r\n */\r\nconst routeLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'route location' : 'rl');\r\n/**\r\n * Allows overriding the current route used by router-view. Internally this is\r\n * used when the `route` prop is passed.\r\n *\r\n * @internal\r\n */\r\nconst routerViewLocationKey = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'router view location' : 'rvl');\n\nconst isBrowser = typeof window !== 'undefined';\n\nfunction isESModule(obj) {\r\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module');\r\n}\r\nconst assign = Object.assign;\r\nfunction applyToParams(fn, params) {\r\n const newParams = {};\r\n for (const key in params) {\r\n const value = params[key];\r\n newParams[key] = Array.isArray(value) ? value.map(fn) : fn(value);\r\n }\r\n return newParams;\r\n}\r\nconst noop = () => { };\n\nfunction warn(msg) {\r\n // avoid using ...args as it breaks in older Edge builds\r\n const args = Array.from(arguments).slice(1);\r\n console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\r\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\r\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\r\n/**\r\n * Transforms an URI into a normalized history location\r\n *\r\n * @param parseQuery\r\n * @param location - URI to normalize\r\n * @param currentLocation - current absolute location. Allows resolving relative\r\n * paths. Must start with `/`. Defaults to `/`\r\n * @returns a normalized history location\r\n */\r\nfunction parseURL(parseQuery, location, currentLocation = '/') {\r\n let path, query = {}, searchString = '', hash = '';\r\n // Could use URL and URLSearchParams but IE 11 doesn't support it\r\n const searchPos = location.indexOf('?');\r\n const hashPos = location.indexOf('#', searchPos > -1 ? searchPos : 0);\r\n if (searchPos > -1) {\r\n path = location.slice(0, searchPos);\r\n searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\r\n query = parseQuery(searchString);\r\n }\r\n if (hashPos > -1) {\r\n path = path || location.slice(0, hashPos);\r\n // keep the # character\r\n hash = location.slice(hashPos, location.length);\r\n }\r\n // no search and no query\r\n path = resolveRelativePath(path != null ? path : location, currentLocation);\r\n // empty path means a relative query or hash `?foo=f`, `#thing`\r\n return {\r\n fullPath: path + (searchString && '?') + searchString + hash,\r\n path,\r\n query,\r\n hash,\r\n };\r\n}\r\n/**\r\n * Stringifies a URL object\r\n *\r\n * @param stringifyQuery\r\n * @param location\r\n */\r\nfunction stringifyURL(stringifyQuery, location) {\r\n const query = location.query ? stringifyQuery(location.query) : '';\r\n return location.path + (query && '?') + query + (location.hash || '');\r\n}\r\n/**\r\n * Strips off the base from the beginning of a location.pathname in a non\r\n * case-sensitive way.\r\n *\r\n * @param pathname - location.pathname\r\n * @param base - base to strip off\r\n */\r\nfunction stripBase(pathname, base) {\r\n // no base or base is not found at the beginning\r\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\r\n return pathname;\r\n return pathname.slice(base.length) || '/';\r\n}\r\n/**\r\n * Checks if two RouteLocation are equal. This means that both locations are\r\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\r\n * parameters and `hash` are the same\r\n *\r\n * @param a - first {@link RouteLocation}\r\n * @param b - second {@link RouteLocation}\r\n */\r\nfunction isSameRouteLocation(stringifyQuery, a, b) {\r\n const aLastIndex = a.matched.length - 1;\r\n const bLastIndex = b.matched.length - 1;\r\n return (aLastIndex > -1 &&\r\n aLastIndex === bLastIndex &&\r\n isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\r\n isSameRouteLocationParams(a.params, b.params) &&\r\n stringifyQuery(a.query) === stringifyQuery(b.query) &&\r\n a.hash === b.hash);\r\n}\r\n/**\r\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\r\n * considered equal to the `RouteRecord` they are aliasing.\r\n *\r\n * @param a - first {@link RouteRecord}\r\n * @param b - second {@link RouteRecord}\r\n */\r\nfunction isSameRouteRecord(a, b) {\r\n // since the original record has an undefined value for aliasOf\r\n // but all aliases point to the original record, this will always compare\r\n // the original record\r\n return (a.aliasOf || a) === (b.aliasOf || b);\r\n}\r\nfunction isSameRouteLocationParams(a, b) {\r\n if (Object.keys(a).length !== Object.keys(b).length)\r\n return false;\r\n for (const key in a) {\r\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction isSameRouteLocationParamsValue(a, b) {\r\n return Array.isArray(a)\r\n ? isEquivalentArray(a, b)\r\n : Array.isArray(b)\r\n ? isEquivalentArray(b, a)\r\n : a === b;\r\n}\r\n/**\r\n * Check if two arrays are the same or if an array with one single entry is the\r\n * same as another primitive value. Used to check query and parameters\r\n *\r\n * @param a - array of values\r\n * @param b - array of values or a single value\r\n */\r\nfunction isEquivalentArray(a, b) {\r\n return Array.isArray(b)\r\n ? a.length === b.length && a.every((value, i) => value === b[i])\r\n : a.length === 1 && a[0] === b;\r\n}\r\n/**\r\n * Resolves a relative path that starts with `.`.\r\n *\r\n * @param to - path location we are resolving\r\n * @param from - currentLocation.path, should start with `/`\r\n */\r\nfunction resolveRelativePath(to, from) {\r\n if (to.startsWith('/'))\r\n return to;\r\n if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\r\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\r\n return to;\r\n }\r\n if (!to)\r\n return from;\r\n const fromSegments = from.split('/');\r\n const toSegments = to.split('/');\r\n let position = fromSegments.length - 1;\r\n let toPosition;\r\n let segment;\r\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\r\n segment = toSegments[toPosition];\r\n // can't go below zero\r\n if (position === 1 || segment === '.')\r\n continue;\r\n if (segment === '..')\r\n position--;\r\n // found something that is not relative path\r\n else\r\n break;\r\n }\r\n return (fromSegments.slice(0, position).join('/') +\r\n '/' +\r\n toSegments\r\n .slice(toPosition - (toPosition === toSegments.length ? 1 : 0))\r\n .join('/'));\r\n}\n\nvar NavigationType;\r\n(function (NavigationType) {\r\n NavigationType[\"pop\"] = \"pop\";\r\n NavigationType[\"push\"] = \"push\";\r\n})(NavigationType || (NavigationType = {}));\r\nvar NavigationDirection;\r\n(function (NavigationDirection) {\r\n NavigationDirection[\"back\"] = \"back\";\r\n NavigationDirection[\"forward\"] = \"forward\";\r\n NavigationDirection[\"unknown\"] = \"\";\r\n})(NavigationDirection || (NavigationDirection = {}));\r\n/**\r\n * Starting location for Histories\r\n */\r\nconst START = '';\r\n// Generic utils\r\n/**\r\n * Normalizes a base by removing any trailing slash and reading the base tag if\r\n * present.\r\n *\r\n * @param base - base to normalize\r\n */\r\nfunction normalizeBase(base) {\r\n if (!base) {\r\n if (isBrowser) {\r\n // respect tag\r\n const baseEl = document.querySelector('base');\r\n base = (baseEl && baseEl.getAttribute('href')) || '/';\r\n // strip full URL origin\r\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\r\n }\r\n else {\r\n base = '/';\r\n }\r\n }\r\n // ensure leading slash when it was removed by the regex above avoid leading\r\n // slash with hash because the file could be read from the disk like file://\r\n // and the leading slash would cause problems\r\n if (base[0] !== '/' && base[0] !== '#')\r\n base = '/' + base;\r\n // remove the trailing slash so all other method can just do `base + fullPath`\r\n // to build an href\r\n return removeTrailingSlash(base);\r\n}\r\n// remove any character before the hash\r\nconst BEFORE_HASH_RE = /^[^#]+#/;\r\nfunction createHref(base, location) {\r\n return base.replace(BEFORE_HASH_RE, '#') + location;\r\n}\n\nfunction getElementPosition(el, offset) {\r\n const docRect = document.documentElement.getBoundingClientRect();\r\n const elRect = el.getBoundingClientRect();\r\n return {\r\n behavior: offset.behavior,\r\n left: elRect.left - docRect.left - (offset.left || 0),\r\n top: elRect.top - docRect.top - (offset.top || 0),\r\n };\r\n}\r\nconst computeScrollPosition = () => ({\r\n left: window.pageXOffset,\r\n top: window.pageYOffset,\r\n});\r\nfunction scrollToPosition(position) {\r\n let scrollToOptions;\r\n if ('el' in position) {\r\n const positionEl = position.el;\r\n const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\r\n /**\r\n * `id`s can accept pretty much any characters, including CSS combinators\r\n * like `>` or `~`. It's still possible to retrieve elements using\r\n * `document.getElementById('~')` but it needs to be escaped when using\r\n * `document.querySelector('#\\\\~')` for it to be valid. The only\r\n * requirements for `id`s are them to be unique on the page and to not be\r\n * empty (`id=\"\"`). Because of that, when passing an id selector, it should\r\n * be properly escaped for it to work with `querySelector`. We could check\r\n * for the id selector to be simple (no CSS combinators `+ >~`) but that\r\n * would make things inconsistent since they are valid characters for an\r\n * `id` but would need to be escaped when using `querySelector`, breaking\r\n * their usage and ending up in no selector returned. Selectors need to be\r\n * escaped:\r\n *\r\n * - `#1-thing` becomes `#\\31 -thing`\r\n * - `#with~symbols` becomes `#with\\\\~symbols`\r\n *\r\n * - More information about the topic can be found at\r\n * https://mathiasbynens.be/notes/html5-id-class.\r\n * - Practical example: https://mathiasbynens.be/demo/html5-id\r\n */\r\n if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\r\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\r\n try {\r\n const foundEl = document.querySelector(position.el);\r\n if (isIdSelector && foundEl) {\r\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\r\n // return to avoid other warnings\r\n return;\r\n }\r\n }\r\n catch (err) {\r\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\r\n // return to avoid other warnings\r\n return;\r\n }\r\n }\r\n }\r\n const el = typeof positionEl === 'string'\r\n ? isIdSelector\r\n ? document.getElementById(positionEl.slice(1))\r\n : document.querySelector(positionEl)\r\n : positionEl;\r\n if (!el) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\r\n return;\r\n }\r\n scrollToOptions = getElementPosition(el, position);\r\n }\r\n else {\r\n scrollToOptions = position;\r\n }\r\n if ('scrollBehavior' in document.documentElement.style)\r\n window.scrollTo(scrollToOptions);\r\n else {\r\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\r\n }\r\n}\r\nfunction getScrollKey(path, delta) {\r\n const position = history.state ? history.state.position - delta : -1;\r\n return position + path;\r\n}\r\nconst scrollPositions = new Map();\r\nfunction saveScrollPosition(key, scrollPosition) {\r\n scrollPositions.set(key, scrollPosition);\r\n}\r\nfunction getSavedScrollPosition(key) {\r\n const scroll = scrollPositions.get(key);\r\n // consume it so it's not used again\r\n scrollPositions.delete(key);\r\n return scroll;\r\n}\r\n// TODO: RFC about how to save scroll position\r\n/**\r\n * ScrollBehavior instance used by the router to compute and restore the scroll\r\n * position when navigating.\r\n */\r\n// export interface ScrollHandler {\r\n// // returns a scroll position that can be saved in history\r\n// compute(): ScrollPositionEntry\r\n// // can take an extended ScrollPositionEntry\r\n// scroll(position: ScrollPosition): void\r\n// }\r\n// export const scrollHandler: ScrollHandler = {\r\n// compute: computeScroll,\r\n// scroll: scrollToPosition,\r\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\r\n/**\r\n * Creates a normalized history location from a window.location object\r\n * @param location -\r\n */\r\nfunction createCurrentLocation(base, location) {\r\n const { pathname, search, hash } = location;\r\n // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\r\n const hashPos = base.indexOf('#');\r\n if (hashPos > -1) {\r\n let slicePos = hash.includes(base.slice(hashPos))\r\n ? base.slice(hashPos).length\r\n : 1;\r\n let pathFromHash = hash.slice(slicePos);\r\n // prepend the starting slash to hash so the url starts with /#\r\n if (pathFromHash[0] !== '/')\r\n pathFromHash = '/' + pathFromHash;\r\n return stripBase(pathFromHash, '');\r\n }\r\n const path = stripBase(pathname, base);\r\n return path + search + hash;\r\n}\r\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\r\n let listeners = [];\r\n let teardowns = [];\r\n // TODO: should it be a stack? a Dict. Check if the popstate listener\r\n // can trigger twice\r\n let pauseState = null;\r\n const popStateHandler = ({ state, }) => {\r\n const to = createCurrentLocation(base, location);\r\n const from = currentLocation.value;\r\n const fromState = historyState.value;\r\n let delta = 0;\r\n if (state) {\r\n currentLocation.value = to;\r\n historyState.value = state;\r\n // ignore the popstate and reset the pauseState\r\n if (pauseState && pauseState === from) {\r\n pauseState = null;\r\n return;\r\n }\r\n delta = fromState ? state.position - fromState.position : 0;\r\n }\r\n else {\r\n replace(to);\r\n }\r\n // console.log({ deltaFromCurrent })\r\n // Here we could also revert the navigation by calling history.go(-delta)\r\n // this listener will have to be adapted to not trigger again and to wait for the url\r\n // to be updated before triggering the listeners. Some kind of validation function would also\r\n // need to be passed to the listeners so the navigation can be accepted\r\n // call all listeners\r\n listeners.forEach(listener => {\r\n listener(currentLocation.value, from, {\r\n delta,\r\n type: NavigationType.pop,\r\n direction: delta\r\n ? delta > 0\r\n ? NavigationDirection.forward\r\n : NavigationDirection.back\r\n : NavigationDirection.unknown,\r\n });\r\n });\r\n };\r\n function pauseListeners() {\r\n pauseState = currentLocation.value;\r\n }\r\n function listen(callback) {\r\n // setup the listener and prepare teardown callbacks\r\n listeners.push(callback);\r\n const teardown = () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n teardowns.push(teardown);\r\n return teardown;\r\n }\r\n function beforeUnloadListener() {\r\n const { history } = window;\r\n if (!history.state)\r\n return;\r\n history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\r\n }\r\n function destroy() {\r\n for (const teardown of teardowns)\r\n teardown();\r\n teardowns = [];\r\n window.removeEventListener('popstate', popStateHandler);\r\n window.removeEventListener('beforeunload', beforeUnloadListener);\r\n }\r\n // setup the listeners and prepare teardown callbacks\r\n window.addEventListener('popstate', popStateHandler);\r\n window.addEventListener('beforeunload', beforeUnloadListener);\r\n return {\r\n pauseListeners,\r\n listen,\r\n destroy,\r\n };\r\n}\r\n/**\r\n * Creates a state object\r\n */\r\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\r\n return {\r\n back,\r\n current,\r\n forward,\r\n replaced,\r\n position: window.history.length,\r\n scroll: computeScroll ? computeScrollPosition() : null,\r\n };\r\n}\r\nfunction useHistoryStateNavigation(base) {\r\n const { history, location } = window;\r\n // private variables\r\n const currentLocation = {\r\n value: createCurrentLocation(base, location),\r\n };\r\n const historyState = { value: history.state };\r\n // build current history entry as this is a fresh navigation\r\n if (!historyState.value) {\r\n changeLocation(currentLocation.value, {\r\n back: null,\r\n current: currentLocation.value,\r\n forward: null,\r\n // the length is off by one, we need to decrease it\r\n position: history.length - 1,\r\n replaced: true,\r\n // don't add a scroll as the user may have an anchor and we want\r\n // scrollBehavior to be triggered without a saved position\r\n scroll: null,\r\n }, true);\r\n }\r\n function changeLocation(to, state, replace) {\r\n /**\r\n * if a base tag is provided and we are on a normal domain, we have to\r\n * respect the provided `base` attribute because pushState() will use it and\r\n * potentially erase anything before the `#` like at\r\n * https://github.com/vuejs/router/issues/685 where a base of\r\n * `/folder/#` but a base of `/` would erase the `/folder/` section. If\r\n * there is no host, the `` tag makes no sense and if there isn't a\r\n * base tag we can just use everything after the `#`.\r\n */\r\n const hashIndex = base.indexOf('#');\r\n const url = hashIndex > -1\r\n ? (location.host && document.querySelector('base')\r\n ? base\r\n : base.slice(hashIndex)) + to\r\n : createBaseLocation() + base + to;\r\n try {\r\n // BROWSER QUIRK\r\n // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\r\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\r\n historyState.value = state;\r\n }\r\n catch (err) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Error with push/replace State', err);\r\n }\r\n else {\r\n console.error(err);\r\n }\r\n // Force the navigation, this also resets the call count\r\n location[replace ? 'replace' : 'assign'](url);\r\n }\r\n }\r\n function replace(to, data) {\r\n const state = assign({}, history.state, buildState(historyState.value.back, \r\n // keep back and forward entries but override current position\r\n to, historyState.value.forward, true), data, { position: historyState.value.position });\r\n changeLocation(to, state, true);\r\n currentLocation.value = to;\r\n }\r\n function push(to, data) {\r\n // Add to current entry the information of where we are going\r\n // as well as saving the current position\r\n const currentState = assign({}, \r\n // use current history state to gracefully handle a wrong call to\r\n // history.replaceState\r\n // https://github.com/vuejs/router/issues/366\r\n historyState.value, history.state, {\r\n forward: to,\r\n scroll: computeScrollPosition(),\r\n });\r\n if ((process.env.NODE_ENV !== 'production') && !history.state) {\r\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\r\n `history.replaceState(history.state, '', url)\\n\\n` +\r\n `You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\r\n }\r\n changeLocation(currentState.current, currentState, true);\r\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\r\n changeLocation(to, state, false);\r\n currentLocation.value = to;\r\n }\r\n return {\r\n location: currentLocation,\r\n state: historyState,\r\n push,\r\n replace,\r\n };\r\n}\r\n/**\r\n * Creates an HTML5 history. Most common history for single page applications.\r\n *\r\n * @param base -\r\n */\r\nfunction createWebHistory(base) {\r\n base = normalizeBase(base);\r\n const historyNavigation = useHistoryStateNavigation(base);\r\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\r\n function go(delta, triggerListeners = true) {\r\n if (!triggerListeners)\r\n historyListeners.pauseListeners();\r\n history.go(delta);\r\n }\r\n const routerHistory = assign({\r\n // it's overridden right after\r\n location: '',\r\n base,\r\n go,\r\n createHref: createHref.bind(null, base),\r\n }, historyNavigation, historyListeners);\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => historyNavigation.location.value,\r\n });\r\n Object.defineProperty(routerHistory, 'state', {\r\n enumerable: true,\r\n get: () => historyNavigation.state.value,\r\n });\r\n return routerHistory;\r\n}\n\n/**\r\n * Creates a in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\r\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\r\n *\r\n * @param base - Base applied to all urls, defaults to '/'\r\n * @returns a history object that can be passed to the router constructor\r\n */\r\nfunction createMemoryHistory(base = '') {\r\n let listeners = [];\r\n let queue = [START];\r\n let position = 0;\r\n base = normalizeBase(base);\r\n function setLocation(location) {\r\n position++;\r\n if (position === queue.length) {\r\n // we are at the end, we can simply append a new entry\r\n queue.push(location);\r\n }\r\n else {\r\n // we are in the middle, we remove everything from here in the queue\r\n queue.splice(position);\r\n queue.push(location);\r\n }\r\n }\r\n function triggerListeners(to, from, { direction, delta }) {\r\n const info = {\r\n direction,\r\n delta,\r\n type: NavigationType.pop,\r\n };\r\n for (const callback of listeners) {\r\n callback(to, from, info);\r\n }\r\n }\r\n const routerHistory = {\r\n // rewritten by Object.defineProperty\r\n location: START,\r\n // TODO: should be kept in queue\r\n state: {},\r\n base,\r\n createHref: createHref.bind(null, base),\r\n replace(to) {\r\n // remove current entry and decrement position\r\n queue.splice(position--, 1);\r\n setLocation(to);\r\n },\r\n push(to, data) {\r\n setLocation(to);\r\n },\r\n listen(callback) {\r\n listeners.push(callback);\r\n return () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n },\r\n destroy() {\r\n listeners = [];\r\n queue = [START];\r\n position = 0;\r\n },\r\n go(delta, shouldTrigger = true) {\r\n const from = this.location;\r\n const direction = \r\n // we are considering delta === 0 going forward, but in abstract mode\r\n // using 0 for the delta doesn't make sense like it does in html5 where\r\n // it reloads the page\r\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\r\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\r\n if (shouldTrigger) {\r\n triggerListeners(this.location, from, {\r\n direction,\r\n delta,\r\n });\r\n }\r\n },\r\n };\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => queue[position],\r\n });\r\n return routerHistory;\r\n}\n\n/**\r\n * Creates a hash history. Useful for web applications with no host (e.g.\r\n * `file://`) or when configuring a server to handle any URL is not possible.\r\n *\r\n * @param base - optional base to provide. Defaults to `location.pathname +\r\n * location.search` If there is a `` tag in the `head`, its value will be\r\n * ignored in favor of this parameter **but note it affects all the\r\n * history.pushState() calls**, meaning that if you use a `` tag, it's\r\n * `href` value **has to match this parameter** (ignoring anything after the\r\n * `#`).\r\n *\r\n * @example\r\n * ```js\r\n * // at https://example.com/folder\r\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\r\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\r\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\r\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\r\n * // you should avoid doing this because it changes the original url and breaks copying urls\r\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\r\n *\r\n * // at file:///usr/etc/folder/index.html\r\n * // for locations with no `host`, the base is ignored\r\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\r\n * ```\r\n */\r\nfunction createWebHashHistory(base) {\r\n // Make sure this implementation is fine in terms of encoding, specially for IE11\r\n // for `file://`, directly use the pathname and ignore the base\r\n // location.pathname contains an initial `/` even at the root: `https://example.com`\r\n base = location.host ? base || location.pathname + location.search : '';\r\n // allow the user to provide a `#` in the middle: `/base/#/app`\r\n if (!base.includes('#'))\r\n base += '#';\r\n if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\r\n warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\r\n }\r\n return createWebHistory(base);\r\n}\n\nfunction isRouteLocation(route) {\r\n return typeof route === 'string' || (route && typeof route === 'object');\r\n}\r\nfunction isRouteName(name) {\r\n return typeof name === 'string' || typeof name === 'symbol';\r\n}\n\n/**\r\n * Initial route location where the router is. Can be used in navigation guards\r\n * to differentiate the initial navigation.\r\n *\r\n * @example\r\n * ```js\r\n * import { START_LOCATION } from 'vue-router'\r\n *\r\n * router.beforeEach((to, from) => {\r\n * if (from === START_LOCATION) {\r\n * // initial navigation\r\n * }\r\n * })\r\n * ```\r\n */\r\nconst START_LOCATION_NORMALIZED = {\r\n path: '/',\r\n name: undefined,\r\n params: {},\r\n query: {},\r\n hash: '',\r\n fullPath: '/',\r\n matched: [],\r\n meta: {},\r\n redirectedFrom: undefined,\r\n};\n\nconst NavigationFailureSymbol = /*#__PURE__*/ PolySymbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : 'nf');\r\n/**\r\n * Enumeration with all possible types for navigation failures. Can be passed to\r\n * {@link isNavigationFailure} to check for specific failures.\r\n */\r\nvar NavigationFailureType;\r\n(function (NavigationFailureType) {\r\n /**\r\n * An aborted navigation is a navigation that failed because a navigation\r\n * guard returned `false` or called `next(false)`\r\n */\r\n NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\r\n /**\r\n * A cancelled navigation is a navigation that failed because a more recent\r\n * navigation finished started (not necessarily finished).\r\n */\r\n NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\r\n /**\r\n * A duplicated navigation is a navigation that failed because it was\r\n * initiated while already being at the exact same location.\r\n */\r\n NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\r\n})(NavigationFailureType || (NavigationFailureType = {}));\r\n// DEV only debug messages\r\nconst ErrorTypeMessages = {\r\n [1 /* MATCHER_NOT_FOUND */]({ location, currentLocation }) {\r\n return `No match for\\n ${JSON.stringify(location)}${currentLocation\r\n ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\r\n : ''}`;\r\n },\r\n [2 /* NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\r\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\r\n },\r\n [4 /* NAVIGATION_ABORTED */]({ from, to }) {\r\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\r\n },\r\n [8 /* NAVIGATION_CANCELLED */]({ from, to }) {\r\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\r\n },\r\n [16 /* NAVIGATION_DUPLICATED */]({ from, to }) {\r\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\r\n },\r\n};\r\nfunction createRouterError(type, params) {\r\n // keep full error messages in cjs versions\r\n if ((process.env.NODE_ENV !== 'production') || !true) {\r\n return assign(new Error(ErrorTypeMessages[type](params)), {\r\n type,\r\n [NavigationFailureSymbol]: true,\r\n }, params);\r\n }\r\n else {\r\n return assign(new Error(), {\r\n type,\r\n [NavigationFailureSymbol]: true,\r\n }, params);\r\n }\r\n}\r\nfunction isNavigationFailure(error, type) {\r\n return (error instanceof Error &&\r\n NavigationFailureSymbol in error &&\r\n (type == null || !!(error.type & type)));\r\n}\r\nconst propertiesToLog = ['params', 'query', 'hash'];\r\nfunction stringifyRoute(to) {\r\n if (typeof to === 'string')\r\n return to;\r\n if ('path' in to)\r\n return to.path;\r\n const location = {};\r\n for (const key of propertiesToLog) {\r\n if (key in to)\r\n location[key] = to[key];\r\n }\r\n return JSON.stringify(location, null, 2);\r\n}\n\n// default pattern for a param: non greedy everything but /\r\nconst BASE_PARAM_PATTERN = '[^/]+?';\r\nconst BASE_PATH_PARSER_OPTIONS = {\r\n sensitive: false,\r\n strict: false,\r\n start: true,\r\n end: true,\r\n};\r\n// Special Regex characters that must be escaped in static tokens\r\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\r\n/**\r\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\r\n *\r\n * @param segments - array of segments returned by tokenizePath\r\n * @param extraOptions - optional options for the regexp\r\n * @returns a PathParser\r\n */\r\nfunction tokensToParser(segments, extraOptions) {\r\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\r\n // the amount of scores is the same as the length of segments except for the root segment \"/\"\r\n const score = [];\r\n // the regexp as a string\r\n let pattern = options.start ? '^' : '';\r\n // extracted keys\r\n const keys = [];\r\n for (const segment of segments) {\r\n // the root segment needs special treatment\r\n const segmentScores = segment.length ? [] : [90 /* Root */];\r\n // allow trailing slash\r\n if (options.strict && !segment.length)\r\n pattern += '/';\r\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\r\n const token = segment[tokenIndex];\r\n // resets the score if we are inside a sub segment /:a-other-:b\r\n let subSegmentScore = 40 /* Segment */ +\r\n (options.sensitive ? 0.25 /* BonusCaseSensitive */ : 0);\r\n if (token.type === 0 /* Static */) {\r\n // prepend the slash if we are starting a new segment\r\n if (!tokenIndex)\r\n pattern += '/';\r\n pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\r\n subSegmentScore += 40 /* Static */;\r\n }\r\n else if (token.type === 1 /* Param */) {\r\n const { value, repeatable, optional, regexp } = token;\r\n keys.push({\r\n name: value,\r\n repeatable,\r\n optional,\r\n });\r\n const re = regexp ? regexp : BASE_PARAM_PATTERN;\r\n // the user provided a custom regexp /:id(\\\\d+)\r\n if (re !== BASE_PARAM_PATTERN) {\r\n subSegmentScore += 10 /* BonusCustomRegExp */;\r\n // make sure the regexp is valid before using it\r\n try {\r\n new RegExp(`(${re})`);\r\n }\r\n catch (err) {\r\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\r\n err.message);\r\n }\r\n }\r\n // when we repeat we must take care of the repeating leading slash\r\n let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\r\n // prepend the slash if we are starting a new segment\r\n if (!tokenIndex)\r\n subPattern =\r\n // avoid an optional / if there are more segments e.g. /:p?-static\r\n // or /:p?-:p2\r\n optional && segment.length < 2\r\n ? `(?:/${subPattern})`\r\n : '/' + subPattern;\r\n if (optional)\r\n subPattern += '?';\r\n pattern += subPattern;\r\n subSegmentScore += 20 /* Dynamic */;\r\n if (optional)\r\n subSegmentScore += -8 /* BonusOptional */;\r\n if (repeatable)\r\n subSegmentScore += -20 /* BonusRepeatable */;\r\n if (re === '.*')\r\n subSegmentScore += -50 /* BonusWildcard */;\r\n }\r\n segmentScores.push(subSegmentScore);\r\n }\r\n // an empty array like /home/ -> [[{home}], []]\r\n // if (!segment.length) pattern += '/'\r\n score.push(segmentScores);\r\n }\r\n // only apply the strict bonus to the last score\r\n if (options.strict && options.end) {\r\n const i = score.length - 1;\r\n score[i][score[i].length - 1] += 0.7000000000000001 /* BonusStrict */;\r\n }\r\n // TODO: dev only warn double trailing slash\r\n if (!options.strict)\r\n pattern += '/?';\r\n if (options.end)\r\n pattern += '$';\r\n // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\r\n else if (options.strict)\r\n pattern += '(?:/|$)';\r\n const re = new RegExp(pattern, options.sensitive ? '' : 'i');\r\n function parse(path) {\r\n const match = path.match(re);\r\n const params = {};\r\n if (!match)\r\n return null;\r\n for (let i = 1; i < match.length; i++) {\r\n const value = match[i] || '';\r\n const key = keys[i - 1];\r\n params[key.name] = value && key.repeatable ? value.split('/') : value;\r\n }\r\n return params;\r\n }\r\n function stringify(params) {\r\n let path = '';\r\n // for optional parameters to allow to be empty\r\n let avoidDuplicatedSlash = false;\r\n for (const segment of segments) {\r\n if (!avoidDuplicatedSlash || !path.endsWith('/'))\r\n path += '/';\r\n avoidDuplicatedSlash = false;\r\n for (const token of segment) {\r\n if (token.type === 0 /* Static */) {\r\n path += token.value;\r\n }\r\n else if (token.type === 1 /* Param */) {\r\n const { value, repeatable, optional } = token;\r\n const param = value in params ? params[value] : '';\r\n if (Array.isArray(param) && !repeatable)\r\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\r\n const text = Array.isArray(param) ? param.join('/') : param;\r\n if (!text) {\r\n if (optional) {\r\n // if we have more than one optional param like /:a?-static and there are more segments, we don't need to\r\n // care about the optional param\r\n if (segment.length < 2 && segments.length > 1) {\r\n // remove the last slash as we could be at the end\r\n if (path.endsWith('/'))\r\n path = path.slice(0, -1);\r\n // do not append a slash on the next iteration\r\n else\r\n avoidDuplicatedSlash = true;\r\n }\r\n }\r\n else\r\n throw new Error(`Missing required param \"${value}\"`);\r\n }\r\n path += text;\r\n }\r\n }\r\n }\r\n return path;\r\n }\r\n return {\r\n re,\r\n score,\r\n keys,\r\n parse,\r\n stringify,\r\n };\r\n}\r\n/**\r\n * Compares an array of numbers as used in PathParser.score and returns a\r\n * number. This function can be used to `sort` an array\r\n *\r\n * @param a - first array of numbers\r\n * @param b - second array of numbers\r\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\r\n * should be sorted first\r\n */\r\nfunction compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}\r\n/**\r\n * Compare function that can be used with `sort` to sort an array of PathParser\r\n *\r\n * @param a - first PathParser\r\n * @param b - second PathParser\r\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\r\n */\r\nfunction comparePathParserScore(a, b) {\r\n let i = 0;\r\n const aScore = a.score;\r\n const bScore = b.score;\r\n while (i < aScore.length && i < bScore.length) {\r\n const comp = compareScoreArray(aScore[i], bScore[i]);\r\n // do not return if both are equal\r\n if (comp)\r\n return comp;\r\n i++;\r\n }\r\n if (Math.abs(bScore.length - aScore.length) === 1) {\r\n if (isLastScoreNegative(aScore))\r\n return 1;\r\n if (isLastScoreNegative(bScore))\r\n return -1;\r\n }\r\n // if a and b share the same score entries but b has more, sort b first\r\n return bScore.length - aScore.length;\r\n // this is the ternary version\r\n // return aScore.length < bScore.length\r\n // ? 1\r\n // : aScore.length > bScore.length\r\n // ? -1\r\n // : 0\r\n}\r\n/**\r\n * This allows detecting splats at the end of a path: /home/:id(.*)*\r\n *\r\n * @param score - score to check\r\n * @returns true if the last entry is negative\r\n */\r\nfunction isLastScoreNegative(score) {\r\n const last = score[score.length - 1];\r\n return score.length > 0 && last[last.length - 1] < 0;\r\n}\n\nconst ROOT_TOKEN = {\r\n type: 0 /* Static */,\r\n value: '',\r\n};\r\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\r\n// After some profiling, the cache seems to be unnecessary because tokenizePath\r\n// (the slowest part of adding a route) is very fast\r\n// const tokenCache = new Map()\r\nfunction tokenizePath(path) {\r\n if (!path)\r\n return [[]];\r\n if (path === '/')\r\n return [[ROOT_TOKEN]];\r\n if (!path.startsWith('/')) {\r\n throw new Error((process.env.NODE_ENV !== 'production')\r\n ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\r\n : `Invalid path \"${path}\"`);\r\n }\r\n // if (tokenCache.has(path)) return tokenCache.get(path)!\r\n function crash(message) {\r\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\r\n }\r\n let state = 0 /* Static */;\r\n let previousState = state;\r\n const tokens = [];\r\n // the segment will always be valid because we get into the initial state\r\n // with the leading /\r\n let segment;\r\n function finalizeSegment() {\r\n if (segment)\r\n tokens.push(segment);\r\n segment = [];\r\n }\r\n // index on the path\r\n let i = 0;\r\n // char at index\r\n let char;\r\n // buffer of the value read\r\n let buffer = '';\r\n // custom regexp for a param\r\n let customRe = '';\r\n function consumeBuffer() {\r\n if (!buffer)\r\n return;\r\n if (state === 0 /* Static */) {\r\n segment.push({\r\n type: 0 /* Static */,\r\n value: buffer,\r\n });\r\n }\r\n else if (state === 1 /* Param */ ||\r\n state === 2 /* ParamRegExp */ ||\r\n state === 3 /* ParamRegExpEnd */) {\r\n if (segment.length > 1 && (char === '*' || char === '+'))\r\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\r\n segment.push({\r\n type: 1 /* Param */,\r\n value: buffer,\r\n regexp: customRe,\r\n repeatable: char === '*' || char === '+',\r\n optional: char === '*' || char === '?',\r\n });\r\n }\r\n else {\r\n crash('Invalid state to consume buffer');\r\n }\r\n buffer = '';\r\n }\r\n function addCharToBuffer() {\r\n buffer += char;\r\n }\r\n while (i < path.length) {\r\n char = path[i++];\r\n if (char === '\\\\' && state !== 2 /* ParamRegExp */) {\r\n previousState = state;\r\n state = 4 /* EscapeNext */;\r\n continue;\r\n }\r\n switch (state) {\r\n case 0 /* Static */:\r\n if (char === '/') {\r\n if (buffer) {\r\n consumeBuffer();\r\n }\r\n finalizeSegment();\r\n }\r\n else if (char === ':') {\r\n consumeBuffer();\r\n state = 1 /* Param */;\r\n }\r\n else {\r\n addCharToBuffer();\r\n }\r\n break;\r\n case 4 /* EscapeNext */:\r\n addCharToBuffer();\r\n state = previousState;\r\n break;\r\n case 1 /* Param */:\r\n if (char === '(') {\r\n state = 2 /* ParamRegExp */;\r\n }\r\n else if (VALID_PARAM_RE.test(char)) {\r\n addCharToBuffer();\r\n }\r\n else {\r\n consumeBuffer();\r\n state = 0 /* Static */;\r\n // go back one character if we were not modifying\r\n if (char !== '*' && char !== '?' && char !== '+')\r\n i--;\r\n }\r\n break;\r\n case 2 /* ParamRegExp */:\r\n // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\r\n // it already works by escaping the closing )\r\n // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\r\n // is this really something people need since you can also write\r\n // /prefix_:p()_suffix\r\n if (char === ')') {\r\n // handle the escaped )\r\n if (customRe[customRe.length - 1] == '\\\\')\r\n customRe = customRe.slice(0, -1) + char;\r\n else\r\n state = 3 /* ParamRegExpEnd */;\r\n }\r\n else {\r\n customRe += char;\r\n }\r\n break;\r\n case 3 /* ParamRegExpEnd */:\r\n // same as finalizing a param\r\n consumeBuffer();\r\n state = 0 /* Static */;\r\n // go back one character if we were not modifying\r\n if (char !== '*' && char !== '?' && char !== '+')\r\n i--;\r\n customRe = '';\r\n break;\r\n default:\r\n crash('Unknown state');\r\n break;\r\n }\r\n }\r\n if (state === 2 /* ParamRegExp */)\r\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\r\n consumeBuffer();\r\n finalizeSegment();\r\n // tokenCache.set(path, tokens)\r\n return tokens;\r\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\r\n const parser = tokensToParser(tokenizePath(record.path), options);\r\n // warn against params with the same name\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const existingKeys = new Set();\r\n for (const key of parser.keys) {\r\n if (existingKeys.has(key.name))\r\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\r\n existingKeys.add(key.name);\r\n }\r\n }\r\n const matcher = assign(parser, {\r\n record,\r\n parent,\r\n // these needs to be populated by the parent\r\n children: [],\r\n alias: [],\r\n });\r\n if (parent) {\r\n // both are aliases or both are not aliases\r\n // we don't want to mix them because the order is used when\r\n // passing originalRecord in Matcher.addRoute\r\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\r\n parent.children.push(matcher);\r\n }\r\n return matcher;\r\n}\n\n/**\r\n * Creates a Router Matcher.\r\n *\r\n * @internal\r\n * @param routes - array of initial routes\r\n * @param globalOptions - global route options\r\n */\r\nfunction createRouterMatcher(routes, globalOptions) {\r\n // normalized ordered array of matchers\r\n const matchers = [];\r\n const matcherMap = new Map();\r\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\r\n function getRecordMatcher(name) {\r\n return matcherMap.get(name);\r\n }\r\n function addRoute(record, parent, originalRecord) {\r\n // used later on to remove by name\r\n const isRootAdd = !originalRecord;\r\n const mainNormalizedRecord = normalizeRouteRecord(record);\r\n // we might be the child of an alias\r\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\r\n const options = mergeOptions(globalOptions, record);\r\n // generate an array of records to correctly handle aliases\r\n const normalizedRecords = [\r\n mainNormalizedRecord,\r\n ];\r\n if ('alias' in record) {\r\n const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\r\n for (const alias of aliases) {\r\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\r\n // this allows us to hold a copy of the `components` option\r\n // so that async components cache is hold on the original record\r\n components: originalRecord\r\n ? originalRecord.record.components\r\n : mainNormalizedRecord.components,\r\n path: alias,\r\n // we might be the child of an alias\r\n aliasOf: originalRecord\r\n ? originalRecord.record\r\n : mainNormalizedRecord,\r\n // the aliases are always of the same kind as the original since they\r\n // are defined on the same record\r\n }));\r\n }\r\n }\r\n let matcher;\r\n let originalMatcher;\r\n for (const normalizedRecord of normalizedRecords) {\r\n const { path } = normalizedRecord;\r\n // Build up the path for nested routes if the child isn't an absolute\r\n // route. Only add the / delimiter if the child path isn't empty and if the\r\n // parent path doesn't have a trailing slash\r\n if (parent && path[0] !== '/') {\r\n const parentPath = parent.record.path;\r\n const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\r\n normalizedRecord.path =\r\n parent.record.path + (path && connectingSlash + path);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\r\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\r\n 'See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\r\n }\r\n // create the object before hand so it can be passed to children\r\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\r\n if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\r\n checkMissingParamsInAbsolutePath(matcher, parent);\r\n // if we are an alias we must tell the original record that we exist\r\n // so we can be removed\r\n if (originalRecord) {\r\n originalRecord.alias.push(matcher);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkSameParams(originalRecord, matcher);\r\n }\r\n }\r\n else {\r\n // otherwise, the first record is the original and others are aliases\r\n originalMatcher = originalMatcher || matcher;\r\n if (originalMatcher !== matcher)\r\n originalMatcher.alias.push(matcher);\r\n // remove the route if named and only for the top record (avoid in nested calls)\r\n // this works because the original record is the first one\r\n if (isRootAdd && record.name && !isAliasRecord(matcher))\r\n removeRoute(record.name);\r\n }\r\n if ('children' in mainNormalizedRecord) {\r\n const children = mainNormalizedRecord.children;\r\n for (let i = 0; i < children.length; i++) {\r\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\r\n }\r\n }\r\n // if there was no original record, then the first one was not an alias and all\r\n // other alias (if any) need to reference this record when adding children\r\n originalRecord = originalRecord || matcher;\r\n // TODO: add normalized records for more flexibility\r\n // if (parent && isAliasRecord(originalRecord)) {\r\n // parent.children.push(originalRecord)\r\n // }\r\n insertMatcher(matcher);\r\n }\r\n return originalMatcher\r\n ? () => {\r\n // since other matchers are aliases, they should be removed by the original matcher\r\n removeRoute(originalMatcher);\r\n }\r\n : noop;\r\n }\r\n function removeRoute(matcherRef) {\r\n if (isRouteName(matcherRef)) {\r\n const matcher = matcherMap.get(matcherRef);\r\n if (matcher) {\r\n matcherMap.delete(matcherRef);\r\n matchers.splice(matchers.indexOf(matcher), 1);\r\n matcher.children.forEach(removeRoute);\r\n matcher.alias.forEach(removeRoute);\r\n }\r\n }\r\n else {\r\n const index = matchers.indexOf(matcherRef);\r\n if (index > -1) {\r\n matchers.splice(index, 1);\r\n if (matcherRef.record.name)\r\n matcherMap.delete(matcherRef.record.name);\r\n matcherRef.children.forEach(removeRoute);\r\n matcherRef.alias.forEach(removeRoute);\r\n }\r\n }\r\n }\r\n function getRoutes() {\r\n return matchers;\r\n }\r\n function insertMatcher(matcher) {\r\n let i = 0;\r\n while (i < matchers.length &&\r\n comparePathParserScore(matcher, matchers[i]) >= 0 &&\r\n // Adding children with empty path should still appear before the parent\r\n // https://github.com/vuejs/router/issues/1124\r\n (matcher.record.path !== matchers[i].record.path ||\r\n !isRecordChildOf(matcher, matchers[i])))\r\n i++;\r\n matchers.splice(i, 0, matcher);\r\n // only add the original record to the name map\r\n if (matcher.record.name && !isAliasRecord(matcher))\r\n matcherMap.set(matcher.record.name, matcher);\r\n }\r\n function resolve(location, currentLocation) {\r\n let matcher;\r\n let params = {};\r\n let path;\r\n let name;\r\n if ('name' in location && location.name) {\r\n matcher = matcherMap.get(location.name);\r\n if (!matcher)\r\n throw createRouterError(1 /* MATCHER_NOT_FOUND */, {\r\n location,\r\n });\r\n name = matcher.record.name;\r\n params = assign(\r\n // paramsFromLocation is a new object\r\n paramsFromLocation(currentLocation.params, \r\n // only keep params that exist in the resolved location\r\n // TODO: only keep optional params coming from a parent record\r\n matcher.keys.filter(k => !k.optional).map(k => k.name)), location.params);\r\n // throws if cannot be stringified\r\n path = matcher.stringify(params);\r\n }\r\n else if ('path' in location) {\r\n // no need to resolve the path with the matcher as it was provided\r\n // this also allows the user to control the encoding\r\n path = location.path;\r\n if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\r\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\r\n }\r\n matcher = matchers.find(m => m.re.test(path));\r\n // matcher should have a value after the loop\r\n if (matcher) {\r\n // TODO: dev warning of unused params if provided\r\n // we know the matcher works because we tested the regexp\r\n params = matcher.parse(path);\r\n name = matcher.record.name;\r\n }\r\n // location is a relative path\r\n }\r\n else {\r\n // match by name or path of current route\r\n matcher = currentLocation.name\r\n ? matcherMap.get(currentLocation.name)\r\n : matchers.find(m => m.re.test(currentLocation.path));\r\n if (!matcher)\r\n throw createRouterError(1 /* MATCHER_NOT_FOUND */, {\r\n location,\r\n currentLocation,\r\n });\r\n name = matcher.record.name;\r\n // since we are navigating to the same location, we don't need to pick the\r\n // params like when `name` is provided\r\n params = assign({}, currentLocation.params, location.params);\r\n path = matcher.stringify(params);\r\n }\r\n const matched = [];\r\n let parentMatcher = matcher;\r\n while (parentMatcher) {\r\n // reversed order so parents are at the beginning\r\n matched.unshift(parentMatcher.record);\r\n parentMatcher = parentMatcher.parent;\r\n }\r\n return {\r\n name,\r\n path,\r\n params,\r\n matched,\r\n meta: mergeMetaFields(matched),\r\n };\r\n }\r\n // add initial routes\r\n routes.forEach(route => addRoute(route));\r\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\r\n}\r\nfunction paramsFromLocation(params, keys) {\r\n const newParams = {};\r\n for (const key of keys) {\r\n if (key in params)\r\n newParams[key] = params[key];\r\n }\r\n return newParams;\r\n}\r\n/**\r\n * Normalizes a RouteRecordRaw. Creates a copy\r\n *\r\n * @param record\r\n * @returns the normalized version\r\n */\r\nfunction normalizeRouteRecord(record) {\r\n return {\r\n path: record.path,\r\n redirect: record.redirect,\r\n name: record.name,\r\n meta: record.meta || {},\r\n aliasOf: undefined,\r\n beforeEnter: record.beforeEnter,\r\n props: normalizeRecordProps(record),\r\n children: record.children || [],\r\n instances: {},\r\n leaveGuards: new Set(),\r\n updateGuards: new Set(),\r\n enterCallbacks: {},\r\n components: 'components' in record\r\n ? record.components || {}\r\n : { default: record.component },\r\n };\r\n}\r\n/**\r\n * Normalize the optional `props` in a record to always be an object similar to\r\n * components. Also accept a boolean for components.\r\n * @param record\r\n */\r\nfunction normalizeRecordProps(record) {\r\n const propsObject = {};\r\n // props does not exist on redirect records but we can set false directly\r\n const props = record.props || false;\r\n if ('component' in record) {\r\n propsObject.default = props;\r\n }\r\n else {\r\n // NOTE: we could also allow a function to be applied to every component.\r\n // Would need user feedback for use cases\r\n for (const name in record.components)\r\n propsObject[name] = typeof props === 'boolean' ? props : props[name];\r\n }\r\n return propsObject;\r\n}\r\n/**\r\n * Checks if a record or any of its parent is an alias\r\n * @param record\r\n */\r\nfunction isAliasRecord(record) {\r\n while (record) {\r\n if (record.record.aliasOf)\r\n return true;\r\n record = record.parent;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Merge meta fields of an array of records\r\n *\r\n * @param matched - array of matched records\r\n */\r\nfunction mergeMetaFields(matched) {\r\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\r\n}\r\nfunction mergeOptions(defaults, partialOptions) {\r\n const options = {};\r\n for (const key in defaults) {\r\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\r\n }\r\n return options;\r\n}\r\nfunction isSameParam(a, b) {\r\n return (a.name === b.name &&\r\n a.optional === b.optional &&\r\n a.repeatable === b.repeatable);\r\n}\r\n/**\r\n * Check if a path and its alias have the same required params\r\n *\r\n * @param a - original record\r\n * @param b - alias record\r\n */\r\nfunction checkSameParams(a, b) {\r\n for (const key of a.keys) {\r\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" should have the exact same param named \"${key.name}\"`);\r\n }\r\n for (const key of b.keys) {\r\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" should have the exact same param named \"${key.name}\"`);\r\n }\r\n}\r\nfunction checkMissingParamsInAbsolutePath(record, parent) {\r\n for (const key of parent.keys) {\r\n if (!record.keys.find(isSameParam.bind(null, key)))\r\n return warn(`Absolute path \"${record.record.path}\" should have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\r\n }\r\n}\r\nfunction isRecordChildOf(record, parent) {\r\n return parent.children.some(child => child === record || isRecordChildOf(record, child));\r\n}\n\n/**\r\n * Encoding Rules ␣ = Space Path: ␣ \" < > # ? { } Query: ␣ \" < > # & = Hash: ␣ \"\r\n * < > `\r\n *\r\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\r\n * defines some extra characters to be encoded. Most browsers do not encode them\r\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\r\n * also encode `!'()*`. Leaving unencoded only ASCII alphanumeric(`a-zA-Z0-9`)\r\n * plus `-._~`. This extra safety should be applied to query by patching the\r\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\r\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\r\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\r\n * encoded everywhere because some browsers like FF encode it when directly\r\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\r\n */\r\n// const EXTRA_RESERVED_RE = /[!'()*]/g\r\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\r\nconst HASH_RE = /#/g; // %23\r\nconst AMPERSAND_RE = /&/g; // %26\r\nconst SLASH_RE = /\\//g; // %2F\r\nconst EQUAL_RE = /=/g; // %3D\r\nconst IM_RE = /\\?/g; // %3F\r\nconst PLUS_RE = /\\+/g; // %2B\r\n/**\r\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\r\n * seems to be less flexible than not doing so and I can't find out the legacy\r\n * systems requiring this for regular requests like text/html. In the standard,\r\n * the encoding of the plus character is only mentioned for\r\n * application/x-www-form-urlencoded\r\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\r\n * leave the plus character as is in queries. To be more flexible, we allow the\r\n * plus character on the query but it can also be manually encoded by the user.\r\n *\r\n * Resources:\r\n * - https://url.spec.whatwg.org/#urlencoded-parsing\r\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\r\n */\r\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\r\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\r\nconst ENC_CARET_RE = /%5E/g; // ^\r\nconst ENC_BACKTICK_RE = /%60/g; // `\r\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\r\nconst ENC_PIPE_RE = /%7C/g; // |\r\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\r\nconst ENC_SPACE_RE = /%20/g; // }\r\n/**\r\n * Encode characters that need to be encoded on the path, search and hash\r\n * sections of the URL.\r\n *\r\n * @internal\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction commonEncode(text) {\r\n return encodeURI('' + text)\r\n .replace(ENC_PIPE_RE, '|')\r\n .replace(ENC_BRACKET_OPEN_RE, '[')\r\n .replace(ENC_BRACKET_CLOSE_RE, ']');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the hash section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeHash(text) {\r\n return commonEncode(text)\r\n .replace(ENC_CURLY_OPEN_RE, '{')\r\n .replace(ENC_CURLY_CLOSE_RE, '}')\r\n .replace(ENC_CARET_RE, '^');\r\n}\r\n/**\r\n * Encode characters that need to be encoded query values on the query\r\n * section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeQueryValue(text) {\r\n return (commonEncode(text)\r\n // Encode the space as +, encode the + to differentiate it from the space\r\n .replace(PLUS_RE, '%2B')\r\n .replace(ENC_SPACE_RE, '+')\r\n .replace(HASH_RE, '%23')\r\n .replace(AMPERSAND_RE, '%26')\r\n .replace(ENC_BACKTICK_RE, '`')\r\n .replace(ENC_CURLY_OPEN_RE, '{')\r\n .replace(ENC_CURLY_CLOSE_RE, '}')\r\n .replace(ENC_CARET_RE, '^'));\r\n}\r\n/**\r\n * Like `encodeQueryValue` but also encodes the `=` character.\r\n *\r\n * @param text - string to encode\r\n */\r\nfunction encodeQueryKey(text) {\r\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the path section of the URL.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodePath(text) {\r\n return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\r\n}\r\n/**\r\n * Encode characters that need to be encoded on the path section of the URL as a\r\n * param. This function encodes everything {@link encodePath} does plus the\r\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\r\n * string instead.\r\n *\r\n * @param text - string to encode\r\n * @returns encoded string\r\n */\r\nfunction encodeParam(text) {\r\n return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\r\n}\r\n/**\r\n * Decode text using `decodeURIComponent`. Returns the original text if it\r\n * fails.\r\n *\r\n * @param text - string to decode\r\n * @returns decoded string\r\n */\r\nfunction decode(text) {\r\n try {\r\n return decodeURIComponent('' + text);\r\n }\r\n catch (err) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\r\n }\r\n return '' + text;\r\n}\n\n/**\r\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\r\n * version with the leading `?` and without Should work as URLSearchParams\r\n\n * @internal\r\n *\r\n * @param search - search string to parse\r\n * @returns a query object\r\n */\r\nfunction parseQuery(search) {\r\n const query = {};\r\n // avoid creating an object with an empty key and empty value\r\n // because of split('&')\r\n if (search === '' || search === '?')\r\n return query;\r\n const hasLeadingIM = search[0] === '?';\r\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\r\n for (let i = 0; i < searchParams.length; ++i) {\r\n // pre decode the + into space\r\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\r\n // allow the = character\r\n const eqPos = searchParam.indexOf('=');\r\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\r\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\r\n if (key in query) {\r\n // an extra variable for ts types\r\n let currentValue = query[key];\r\n if (!Array.isArray(currentValue)) {\r\n currentValue = query[key] = [currentValue];\r\n }\r\n currentValue.push(value);\r\n }\r\n else {\r\n query[key] = value;\r\n }\r\n }\r\n return query;\r\n}\r\n/**\r\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\r\n * doesn't prepend a `?`\r\n *\r\n * @internal\r\n *\r\n * @param query - query object to stringify\r\n * @returns string version of the query without the leading `?`\r\n */\r\nfunction stringifyQuery(query) {\r\n let search = '';\r\n for (let key in query) {\r\n const value = query[key];\r\n key = encodeQueryKey(key);\r\n if (value == null) {\r\n // only null adds the value\r\n if (value !== undefined) {\r\n search += (search.length ? '&' : '') + key;\r\n }\r\n continue;\r\n }\r\n // keep null values\r\n const values = Array.isArray(value)\r\n ? value.map(v => v && encodeQueryValue(v))\r\n : [value && encodeQueryValue(value)];\r\n values.forEach(value => {\r\n // skip undefined values in arrays as if they were not present\r\n // smaller code than using filter\r\n if (value !== undefined) {\r\n // only append & with non-empty search\r\n search += (search.length ? '&' : '') + key;\r\n if (value != null)\r\n search += '=' + value;\r\n }\r\n });\r\n }\r\n return search;\r\n}\r\n/**\r\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\r\n * numbers into strings, removing keys with an undefined value and replacing\r\n * undefined with null in arrays\r\n *\r\n * @param query - query object to normalize\r\n * @returns a normalized query object\r\n */\r\nfunction normalizeQuery(query) {\r\n const normalizedQuery = {};\r\n for (const key in query) {\r\n const value = query[key];\r\n if (value !== undefined) {\r\n normalizedQuery[key] = Array.isArray(value)\r\n ? value.map(v => (v == null ? null : '' + v))\r\n : value == null\r\n ? value\r\n : '' + value;\r\n }\r\n }\r\n return normalizedQuery;\r\n}\n\n/**\r\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\r\n */\r\nfunction useCallbacks() {\r\n let handlers = [];\r\n function add(handler) {\r\n handlers.push(handler);\r\n return () => {\r\n const i = handlers.indexOf(handler);\r\n if (i > -1)\r\n handlers.splice(i, 1);\r\n };\r\n }\r\n function reset() {\r\n handlers = [];\r\n }\r\n return {\r\n add,\r\n list: () => handlers,\r\n reset,\r\n };\r\n}\n\nfunction registerGuard(record, name, guard) {\r\n const removeFromList = () => {\r\n record[name].delete(guard);\r\n };\r\n onUnmounted(removeFromList);\r\n onDeactivated(removeFromList);\r\n onActivated(() => {\r\n record[name].add(guard);\r\n });\r\n record[name].add(guard);\r\n}\r\n/**\r\n * Add a navigation guard that triggers whenever the component for the current\r\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\r\n * used in any component. The guard is removed when the component is unmounted.\r\n *\r\n * @param leaveGuard - {@link NavigationGuard}\r\n */\r\nfunction onBeforeRouteLeave(leaveGuard) {\r\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\r\n warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\r\n return;\r\n }\r\n const activeRecord = inject(matchedRouteKey, \r\n // to avoid warning\r\n {}).value;\r\n if (!activeRecord) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside of a component child of . Maybe you called it inside of App.vue?');\r\n return;\r\n }\r\n registerGuard(activeRecord, 'leaveGuards', leaveGuard);\r\n}\r\n/**\r\n * Add a navigation guard that triggers whenever the current location is about\r\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\r\n * component. The guard is removed when the component is unmounted.\r\n *\r\n * @param updateGuard - {@link NavigationGuard}\r\n */\r\nfunction onBeforeRouteUpdate(updateGuard) {\r\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\r\n warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\r\n return;\r\n }\r\n const activeRecord = inject(matchedRouteKey, \r\n // to avoid warning\r\n {}).value;\r\n if (!activeRecord) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside of a component child of . Maybe you called it inside of App.vue?');\r\n return;\r\n }\r\n registerGuard(activeRecord, 'updateGuards', updateGuard);\r\n}\r\nfunction guardToPromiseFn(guard, to, from, record, name) {\r\n // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\r\n const enterCallbackArray = record &&\r\n // name is defined if record is because of the function overload\r\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\r\n return () => new Promise((resolve, reject) => {\r\n const next = (valid) => {\r\n if (valid === false)\r\n reject(createRouterError(4 /* NAVIGATION_ABORTED */, {\r\n from,\r\n to,\r\n }));\r\n else if (valid instanceof Error) {\r\n reject(valid);\r\n }\r\n else if (isRouteLocation(valid)) {\r\n reject(createRouterError(2 /* NAVIGATION_GUARD_REDIRECT */, {\r\n from: to,\r\n to: valid,\r\n }));\r\n }\r\n else {\r\n if (enterCallbackArray &&\r\n // since enterCallbackArray is truthy, both record and name also are\r\n record.enterCallbacks[name] === enterCallbackArray &&\r\n typeof valid === 'function')\r\n enterCallbackArray.push(valid);\r\n resolve();\r\n }\r\n };\r\n // wrapping with Promise.resolve allows it to work with both async and sync guards\r\n const guardReturn = guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next);\r\n let guardCall = Promise.resolve(guardReturn);\r\n if (guard.length < 3)\r\n guardCall = guardCall.then(next);\r\n if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\r\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\r\n if (typeof guardReturn === 'object' && 'then' in guardReturn) {\r\n guardCall = guardCall.then(resolvedValue => {\r\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\r\n if (!next._called) {\r\n warn(message);\r\n return Promise.reject(new Error('Invalid navigation guard'));\r\n }\r\n return resolvedValue;\r\n });\r\n // TODO: test me!\r\n }\r\n else if (guardReturn !== undefined) {\r\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\r\n if (!next._called) {\r\n warn(message);\r\n reject(new Error('Invalid navigation guard'));\r\n return;\r\n }\r\n }\r\n }\r\n guardCall.catch(err => reject(err));\r\n });\r\n}\r\nfunction canOnlyBeCalledOnce(next, to, from) {\r\n let called = 0;\r\n return function () {\r\n if (called++ === 1)\r\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\r\n // @ts-expect-error: we put it in the original one because it's easier to check\r\n next._called = true;\r\n if (called === 1)\r\n next.apply(null, arguments);\r\n };\r\n}\r\nfunction extractComponentsGuards(matched, guardType, to, from) {\r\n const guards = [];\r\n for (const record of matched) {\r\n for (const name in record.components) {\r\n let rawComponent = record.components[name];\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (!rawComponent ||\r\n (typeof rawComponent !== 'object' &&\r\n typeof rawComponent !== 'function')) {\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\r\n ` a valid component. Received \"${String(rawComponent)}\".`);\r\n // throw to ensure we stop here but warn to ensure the message isn't\r\n // missed by the user\r\n throw new Error('Invalid route component');\r\n }\r\n else if ('then' in rawComponent) {\r\n // warn if user wrote import('/component.vue') instead of () =>\r\n // import('./component.vue')\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\r\n `Promise instead of a function that returns a Promise. Did you ` +\r\n `write \"import('./MyPage.vue')\" instead of ` +\r\n `\"() => import('./MyPage.vue')\" ? This will break in ` +\r\n `production if not fixed.`);\r\n const promise = rawComponent;\r\n rawComponent = () => promise;\r\n }\r\n else if (rawComponent.__asyncLoader &&\r\n // warn only once per component\r\n !rawComponent.__warnedDefineAsync) {\r\n rawComponent.__warnedDefineAsync = true;\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\r\n `using \"defineAsyncComponent()\". ` +\r\n `Write \"() => import('./MyPage.vue')\" instead of ` +\r\n `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\r\n }\r\n }\r\n // skip update and leave guards if the route component is not mounted\r\n if (guardType !== 'beforeRouteEnter' && !record.instances[name])\r\n continue;\r\n if (isRouteComponent(rawComponent)) {\r\n // __vccOpts is added by vue-class-component and contain the regular options\r\n const options = rawComponent.__vccOpts || rawComponent;\r\n const guard = options[guardType];\r\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\r\n }\r\n else {\r\n // start requesting the chunk already\r\n let componentPromise = rawComponent();\r\n if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\r\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\r\n componentPromise = Promise.resolve(componentPromise);\r\n }\r\n guards.push(() => componentPromise.then(resolved => {\r\n if (!resolved)\r\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\r\n const resolvedComponent = isESModule(resolved)\r\n ? resolved.default\r\n : resolved;\r\n // replace the function with the resolved component\r\n record.components[name] = resolvedComponent;\r\n // __vccOpts is added by vue-class-component and contain the regular options\r\n const options = resolvedComponent.__vccOpts || resolvedComponent;\r\n const guard = options[guardType];\r\n return guard && guardToPromiseFn(guard, to, from, record, name)();\r\n }));\r\n }\r\n }\r\n }\r\n return guards;\r\n}\r\n/**\r\n * Allows differentiating lazy components from functional components and vue-class-component\r\n *\r\n * @param component\r\n */\r\nfunction isRouteComponent(component) {\r\n return (typeof component === 'object' ||\r\n 'displayName' in component ||\r\n 'props' in component ||\r\n '__vccOpts' in component);\r\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\r\n// `isExactActive` behavior should go through an RFC\r\nfunction useLink(props) {\r\n const router = inject(routerKey);\r\n const currentRoute = inject(routeLocationKey);\r\n const route = computed(() => router.resolve(unref(props.to)));\r\n const activeRecordIndex = computed(() => {\r\n const { matched } = route.value;\r\n const { length } = matched;\r\n const routeMatched = matched[length - 1];\r\n const currentMatched = currentRoute.matched;\r\n if (!routeMatched || !currentMatched.length)\r\n return -1;\r\n const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\r\n if (index > -1)\r\n return index;\r\n // possible parent record\r\n const parentRecordPath = getOriginalPath(matched[length - 2]);\r\n return (\r\n // we are dealing with nested routes\r\n length > 1 &&\r\n // if the parent and matched route have the same path, this link is\r\n // referring to the empty child. Or we currently are on a different\r\n // child of the same parent\r\n getOriginalPath(routeMatched) === parentRecordPath &&\r\n // avoid comparing the child with its parent\r\n currentMatched[currentMatched.length - 1].path !== parentRecordPath\r\n ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\r\n : index);\r\n });\r\n const isActive = computed(() => activeRecordIndex.value > -1 &&\r\n includesParams(currentRoute.params, route.value.params));\r\n const isExactActive = computed(() => activeRecordIndex.value > -1 &&\r\n activeRecordIndex.value === currentRoute.matched.length - 1 &&\r\n isSameRouteLocationParams(currentRoute.params, route.value.params));\r\n function navigate(e = {}) {\r\n if (guardEvent(e)) {\r\n return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\r\n // avoid uncaught errors are they are logged anyway\r\n ).catch(noop);\r\n }\r\n return Promise.resolve();\r\n }\r\n // devtools only\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n const instance = getCurrentInstance();\r\n if (instance) {\r\n const linkContextDevtools = {\r\n route: route.value,\r\n isActive: isActive.value,\r\n isExactActive: isExactActive.value,\r\n };\r\n // @ts-expect-error: this is internal\r\n instance.__vrl_devtools = instance.__vrl_devtools || [];\r\n // @ts-expect-error: this is internal\r\n instance.__vrl_devtools.push(linkContextDevtools);\r\n watchEffect(() => {\r\n linkContextDevtools.route = route.value;\r\n linkContextDevtools.isActive = isActive.value;\r\n linkContextDevtools.isExactActive = isExactActive.value;\r\n }, { flush: 'post' });\r\n }\r\n }\r\n return {\r\n route,\r\n href: computed(() => route.value.href),\r\n isActive,\r\n isExactActive,\r\n navigate,\r\n };\r\n}\r\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\r\n name: 'RouterLink',\r\n compatConfig: { MODE: 3 },\r\n props: {\r\n to: {\r\n type: [String, Object],\r\n required: true,\r\n },\r\n replace: Boolean,\r\n activeClass: String,\r\n // inactiveClass: String,\r\n exactActiveClass: String,\r\n custom: Boolean,\r\n ariaCurrentValue: {\r\n type: String,\r\n default: 'page',\r\n },\r\n },\r\n useLink,\r\n setup(props, { slots }) {\r\n const link = reactive(useLink(props));\r\n const { options } = inject(routerKey);\r\n const elClass = computed(() => ({\r\n [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\r\n // [getLinkClass(\r\n // props.inactiveClass,\r\n // options.linkInactiveClass,\r\n // 'router-link-inactive'\r\n // )]: !link.isExactActive,\r\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\r\n }));\r\n return () => {\r\n const children = slots.default && slots.default(link);\r\n return props.custom\r\n ? children\r\n : h('a', {\r\n 'aria-current': link.isExactActive\r\n ? props.ariaCurrentValue\r\n : null,\r\n href: link.href,\r\n // this would override user added attrs but Vue will still add\r\n // the listener so we end up triggering both\r\n onClick: link.navigate,\r\n class: elClass.value,\r\n }, children);\r\n };\r\n },\r\n});\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\n/**\r\n * Component to render a link that triggers a navigation on click.\r\n */\r\nconst RouterLink = RouterLinkImpl;\r\nfunction guardEvent(e) {\r\n // don't redirect with control keys\r\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\r\n return;\r\n // don't redirect when preventDefault called\r\n if (e.defaultPrevented)\r\n return;\r\n // don't redirect on right click\r\n if (e.button !== undefined && e.button !== 0)\r\n return;\r\n // don't redirect if `target=\"_blank\"`\r\n // @ts-expect-error getAttribute does exist\r\n if (e.currentTarget && e.currentTarget.getAttribute) {\r\n // @ts-expect-error getAttribute exists\r\n const target = e.currentTarget.getAttribute('target');\r\n if (/\\b_blank\\b/i.test(target))\r\n return;\r\n }\r\n // this may be a Weex event which doesn't have this method\r\n if (e.preventDefault)\r\n e.preventDefault();\r\n return true;\r\n}\r\nfunction includesParams(outer, inner) {\r\n for (const key in inner) {\r\n const innerValue = inner[key];\r\n const outerValue = outer[key];\r\n if (typeof innerValue === 'string') {\r\n if (innerValue !== outerValue)\r\n return false;\r\n }\r\n else {\r\n if (!Array.isArray(outerValue) ||\r\n outerValue.length !== innerValue.length ||\r\n innerValue.some((value, i) => value !== outerValue[i]))\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Get the original path value of a record by following its aliasOf\r\n * @param record\r\n */\r\nfunction getOriginalPath(record) {\r\n return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\r\n}\r\n/**\r\n * Utility class to get the active class based on defaults.\r\n * @param propClass\r\n * @param globalClass\r\n * @param defaultClass\r\n */\r\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\r\n ? propClass\r\n : globalClass != null\r\n ? globalClass\r\n : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\r\n name: 'RouterView',\r\n // #674 we manually inherit them\r\n inheritAttrs: false,\r\n props: {\r\n name: {\r\n type: String,\r\n default: 'default',\r\n },\r\n route: Object,\r\n },\r\n // Better compat for @vue/compat users\r\n // https://github.com/vuejs/router/issues/1315\r\n compatConfig: { MODE: 3 },\r\n setup(props, { attrs, slots }) {\r\n (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\r\n const injectedRoute = inject(routerViewLocationKey);\r\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\r\n const depth = inject(viewDepthKey, 0);\r\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth]);\r\n provide(viewDepthKey, depth + 1);\r\n provide(matchedRouteKey, matchedRouteRef);\r\n provide(routerViewLocationKey, routeToDisplay);\r\n const viewRef = ref();\r\n // watch at the same time the component instance, the route record we are\r\n // rendering, and the name\r\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\r\n // copy reused instances\r\n if (to) {\r\n // this will update the instance for new instances as well as reused\r\n // instances when navigating to a new route\r\n to.instances[name] = instance;\r\n // the component instance is reused for a different route or name so\r\n // we copy any saved update or leave guards. With async setup, the\r\n // mounting component will mount before the matchedRoute changes,\r\n // making instance === oldInstance, so we check if guards have been\r\n // added before. This works because we remove guards when\r\n // unmounting/deactivating components\r\n if (from && from !== to && instance && instance === oldInstance) {\r\n if (!to.leaveGuards.size) {\r\n to.leaveGuards = from.leaveGuards;\r\n }\r\n if (!to.updateGuards.size) {\r\n to.updateGuards = from.updateGuards;\r\n }\r\n }\r\n }\r\n // trigger beforeRouteEnter next callbacks\r\n if (instance &&\r\n to &&\r\n // if there is no instance but to and from are the same this might be\r\n // the first visit\r\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\r\n (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\r\n }\r\n }, { flush: 'post' });\r\n return () => {\r\n const route = routeToDisplay.value;\r\n const matchedRoute = matchedRouteRef.value;\r\n const ViewComponent = matchedRoute && matchedRoute.components[props.name];\r\n // we need the value at the time we render because when we unmount, we\r\n // navigated to a different location so the value is different\r\n const currentName = props.name;\r\n if (!ViewComponent) {\r\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\r\n }\r\n // props from route configuration\r\n const routePropsOption = matchedRoute.props[props.name];\r\n const routeProps = routePropsOption\r\n ? routePropsOption === true\r\n ? route.params\r\n : typeof routePropsOption === 'function'\r\n ? routePropsOption(route)\r\n : routePropsOption\r\n : null;\r\n const onVnodeUnmounted = vnode => {\r\n // remove the instance reference to prevent leak\r\n if (vnode.component.isUnmounted) {\r\n matchedRoute.instances[currentName] = null;\r\n }\r\n };\r\n const component = h(ViewComponent, assign({}, routeProps, attrs, {\r\n onVnodeUnmounted,\r\n ref: viewRef,\r\n }));\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n isBrowser &&\r\n component.ref) {\r\n // TODO: can display if it's an alias, its props\r\n const info = {\r\n depth,\r\n name: matchedRoute.name,\r\n path: matchedRoute.path,\r\n meta: matchedRoute.meta,\r\n };\r\n const internalInstances = Array.isArray(component.ref)\r\n ? component.ref.map(r => r.i)\r\n : [component.ref.i];\r\n internalInstances.forEach(instance => {\r\n // @ts-expect-error\r\n instance.__vrv_devtools = info;\r\n });\r\n }\r\n return (\r\n // pass the vnode to the slot as a prop.\r\n // h and both accept vnodes\r\n normalizeSlot(slots.default, { Component: component, route }) ||\r\n component);\r\n };\r\n },\r\n});\r\nfunction normalizeSlot(slot, data) {\r\n if (!slot)\r\n return null;\r\n const slotContent = slot(data);\r\n return slotContent.length === 1 ? slotContent[0] : slotContent;\r\n}\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\n/**\r\n * Component to display the current route the user is at.\r\n */\r\nconst RouterView = RouterViewImpl;\r\n// warn against deprecated usage with & \r\n// due to functional component being no longer eager in Vue 3\r\nfunction warnDeprecatedUsage() {\r\n const instance = getCurrentInstance();\r\n const parentName = instance.parent && instance.parent.type.name;\r\n if (parentName &&\r\n (parentName === 'KeepAlive' || parentName.includes('Transition'))) {\r\n const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\r\n warn(` can no longer be used directly inside or .\\n` +\r\n `Use slot props instead:\\n\\n` +\r\n `\\n` +\r\n ` <${comp}>\\n` +\r\n ` \\n` +\r\n ` \\n` +\r\n ``);\r\n }\r\n}\n\nfunction formatRouteLocation(routeLocation, tooltip) {\r\n const copy = assign({}, routeLocation, {\r\n // remove variables that can contain vue instances\r\n matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\r\n });\r\n return {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: routeLocation.fullPath,\r\n tooltip,\r\n value: copy,\r\n },\r\n };\r\n}\r\nfunction formatDisplay(display) {\r\n return {\r\n _custom: {\r\n display,\r\n },\r\n };\r\n}\r\n// to support multiple router instances\r\nlet routerId = 0;\r\nfunction addDevtools(app, router, matcher) {\r\n // Take over router.beforeEach and afterEach\r\n // make sure we are not registering the devtool twice\r\n if (router.__hasDevtools)\r\n return;\r\n router.__hasDevtools = true;\r\n // increment to support multiple router instances\r\n const id = routerId++;\r\n setupDevtoolsPlugin({\r\n id: 'org.vuejs.router' + (id ? '.' + id : ''),\r\n label: 'Vue Router',\r\n packageName: 'vue-router',\r\n homepage: 'https://router.vuejs.org',\r\n logo: 'https://router.vuejs.org/logo.png',\r\n componentStateTypes: ['Routing'],\r\n app,\r\n }, api => {\r\n // display state added by the router\r\n api.on.inspectComponent((payload, ctx) => {\r\n if (payload.instanceData) {\r\n payload.instanceData.state.push({\r\n type: 'Routing',\r\n key: '$route',\r\n editable: false,\r\n value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\r\n });\r\n }\r\n });\r\n // mark router-link as active and display tags on router views\r\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\r\n if (componentInstance.__vrv_devtools) {\r\n const info = componentInstance.__vrv_devtools;\r\n node.tags.push({\r\n label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\r\n textColor: 0,\r\n tooltip: 'This component is rendered by <router-view>',\r\n backgroundColor: PINK_500,\r\n });\r\n }\r\n // if multiple useLink are used\r\n if (Array.isArray(componentInstance.__vrl_devtools)) {\r\n componentInstance.__devtoolsApi = api;\r\n componentInstance.__vrl_devtools.forEach(devtoolsData => {\r\n let backgroundColor = ORANGE_400;\r\n let tooltip = '';\r\n if (devtoolsData.isExactActive) {\r\n backgroundColor = LIME_500;\r\n tooltip = 'This is exactly active';\r\n }\r\n else if (devtoolsData.isActive) {\r\n backgroundColor = BLUE_600;\r\n tooltip = 'This link is active';\r\n }\r\n node.tags.push({\r\n label: devtoolsData.route.path,\r\n textColor: 0,\r\n tooltip,\r\n backgroundColor,\r\n });\r\n });\r\n }\r\n });\r\n watch(router.currentRoute, () => {\r\n // refresh active state\r\n refreshRoutesView();\r\n api.notifyComponentUpdate();\r\n api.sendInspectorTree(routerInspectorId);\r\n api.sendInspectorState(routerInspectorId);\r\n });\r\n const navigationsLayerId = 'router:navigations:' + id;\r\n api.addTimelineLayer({\r\n id: navigationsLayerId,\r\n label: `Router${id ? ' ' + id : ''} Navigations`,\r\n color: 0x40a8c4,\r\n });\r\n // const errorsLayerId = 'router:errors'\r\n // api.addTimelineLayer({\r\n // id: errorsLayerId,\r\n // label: 'Router Errors',\r\n // color: 0xea5455,\r\n // })\r\n router.onError((error, to) => {\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n title: 'Error during Navigation',\r\n subtitle: to.fullPath,\r\n logType: 'error',\r\n time: api.now(),\r\n data: { error },\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n // attached to `meta` and used to group events\r\n let navigationId = 0;\r\n router.beforeEach((to, from) => {\r\n const data = {\r\n guard: formatDisplay('beforeEach'),\r\n from: formatRouteLocation(from, 'Current Location during this navigation'),\r\n to: formatRouteLocation(to, 'Target location'),\r\n };\r\n // Used to group navigations together, hide from devtools\r\n Object.defineProperty(to.meta, '__navigationId', {\r\n value: navigationId++,\r\n });\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n time: api.now(),\r\n title: 'Start of navigation',\r\n subtitle: to.fullPath,\r\n data,\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n router.afterEach((to, from, failure) => {\r\n const data = {\r\n guard: formatDisplay('afterEach'),\r\n };\r\n if (failure) {\r\n data.failure = {\r\n _custom: {\r\n type: Error,\r\n readOnly: true,\r\n display: failure ? failure.message : '',\r\n tooltip: 'Navigation Failure',\r\n value: failure,\r\n },\r\n };\r\n data.status = formatDisplay('❌');\r\n }\r\n else {\r\n data.status = formatDisplay('✅');\r\n }\r\n // we set here to have the right order\r\n data.from = formatRouteLocation(from, 'Current Location during this navigation');\r\n data.to = formatRouteLocation(to, 'Target location');\r\n api.addTimelineEvent({\r\n layerId: navigationsLayerId,\r\n event: {\r\n title: 'End of navigation',\r\n subtitle: to.fullPath,\r\n time: api.now(),\r\n data,\r\n logType: failure ? 'warning' : 'default',\r\n groupId: to.meta.__navigationId,\r\n },\r\n });\r\n });\r\n /**\r\n * Inspector of Existing routes\r\n */\r\n const routerInspectorId = 'router-inspector:' + id;\r\n api.addInspector({\r\n id: routerInspectorId,\r\n label: 'Routes' + (id ? ' ' + id : ''),\r\n icon: 'book',\r\n treeFilterPlaceholder: 'Search routes',\r\n });\r\n function refreshRoutesView() {\r\n // the routes view isn't active\r\n if (!activeRoutesPayload)\r\n return;\r\n const payload = activeRoutesPayload;\r\n // children routes will appear as nested\r\n let routes = matcher.getRoutes().filter(route => !route.parent);\r\n // reset match state to false\r\n routes.forEach(resetMatchStateOnRouteRecord);\r\n // apply a match state if there is a payload\r\n if (payload.filter) {\r\n routes = routes.filter(route => \r\n // save matches state based on the payload\r\n isRouteMatching(route, payload.filter.toLowerCase()));\r\n }\r\n // mark active routes\r\n routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\r\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\r\n }\r\n let activeRoutesPayload;\r\n api.on.getInspectorTree(payload => {\r\n activeRoutesPayload = payload;\r\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\r\n refreshRoutesView();\r\n }\r\n });\r\n /**\r\n * Display information about the currently selected route record\r\n */\r\n api.on.getInspectorState(payload => {\r\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\r\n const routes = matcher.getRoutes();\r\n const route = routes.find(route => route.record.__vd_id === payload.nodeId);\r\n if (route) {\r\n payload.state = {\r\n options: formatRouteRecordMatcherForStateInspector(route),\r\n };\r\n }\r\n }\r\n });\r\n api.sendInspectorTree(routerInspectorId);\r\n api.sendInspectorState(routerInspectorId);\r\n });\r\n}\r\nfunction modifierForKey(key) {\r\n if (key.optional) {\r\n return key.repeatable ? '*' : '?';\r\n }\r\n else {\r\n return key.repeatable ? '+' : '';\r\n }\r\n}\r\nfunction formatRouteRecordMatcherForStateInspector(route) {\r\n const { record } = route;\r\n const fields = [\r\n { editable: false, key: 'path', value: record.path },\r\n ];\r\n if (record.name != null) {\r\n fields.push({\r\n editable: false,\r\n key: 'name',\r\n value: record.name,\r\n });\r\n }\r\n fields.push({ editable: false, key: 'regexp', value: route.re });\r\n if (route.keys.length) {\r\n fields.push({\r\n editable: false,\r\n key: 'keys',\r\n value: {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: route.keys\r\n .map(key => `${key.name}${modifierForKey(key)}`)\r\n .join(' '),\r\n tooltip: 'Param keys',\r\n value: route.keys,\r\n },\r\n },\r\n });\r\n }\r\n if (record.redirect != null) {\r\n fields.push({\r\n editable: false,\r\n key: 'redirect',\r\n value: record.redirect,\r\n });\r\n }\r\n if (route.alias.length) {\r\n fields.push({\r\n editable: false,\r\n key: 'aliases',\r\n value: route.alias.map(alias => alias.record.path),\r\n });\r\n }\r\n fields.push({\r\n key: 'score',\r\n editable: false,\r\n value: {\r\n _custom: {\r\n type: null,\r\n readOnly: true,\r\n display: route.score.map(score => score.join(', ')).join(' | '),\r\n tooltip: 'Score used to sort routes',\r\n value: route.score,\r\n },\r\n },\r\n });\r\n return fields;\r\n}\r\n/**\r\n * Extracted from tailwind palette\r\n */\r\nconst PINK_500 = 0xec4899;\r\nconst BLUE_600 = 0x2563eb;\r\nconst LIME_500 = 0x84cc16;\r\nconst CYAN_400 = 0x22d3ee;\r\nconst ORANGE_400 = 0xfb923c;\r\n// const GRAY_100 = 0xf4f4f5\r\nconst DARK = 0x666666;\r\nfunction formatRouteRecordForInspector(route) {\r\n const tags = [];\r\n const { record } = route;\r\n if (record.name != null) {\r\n tags.push({\r\n label: String(record.name),\r\n textColor: 0,\r\n backgroundColor: CYAN_400,\r\n });\r\n }\r\n if (record.aliasOf) {\r\n tags.push({\r\n label: 'alias',\r\n textColor: 0,\r\n backgroundColor: ORANGE_400,\r\n });\r\n }\r\n if (route.__vd_match) {\r\n tags.push({\r\n label: 'matches',\r\n textColor: 0,\r\n backgroundColor: PINK_500,\r\n });\r\n }\r\n if (route.__vd_exactActive) {\r\n tags.push({\r\n label: 'exact',\r\n textColor: 0,\r\n backgroundColor: LIME_500,\r\n });\r\n }\r\n if (route.__vd_active) {\r\n tags.push({\r\n label: 'active',\r\n textColor: 0,\r\n backgroundColor: BLUE_600,\r\n });\r\n }\r\n if (record.redirect) {\r\n tags.push({\r\n label: 'redirect: ' +\r\n (typeof record.redirect === 'string' ? record.redirect : 'Object'),\r\n textColor: 0xffffff,\r\n backgroundColor: DARK,\r\n });\r\n }\r\n // add an id to be able to select it. Using the `path` is not possible because\r\n // empty path children would collide with their parents\r\n let id = record.__vd_id;\r\n if (id == null) {\r\n id = String(routeRecordId++);\r\n record.__vd_id = id;\r\n }\r\n return {\r\n id,\r\n label: record.path,\r\n tags,\r\n children: route.children.map(formatRouteRecordForInspector),\r\n };\r\n}\r\n// incremental id for route records and inspector state\r\nlet routeRecordId = 0;\r\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\r\nfunction markRouteRecordActive(route, currentRoute) {\r\n // no route will be active if matched is empty\r\n // reset the matching state\r\n const isExactActive = currentRoute.matched.length &&\r\n isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\r\n route.__vd_exactActive = route.__vd_active = isExactActive;\r\n if (!isExactActive) {\r\n route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\r\n }\r\n route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\r\n}\r\nfunction resetMatchStateOnRouteRecord(route) {\r\n route.__vd_match = false;\r\n route.children.forEach(resetMatchStateOnRouteRecord);\r\n}\r\nfunction isRouteMatching(route, filter) {\r\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\r\n route.__vd_match = false;\r\n if (!found || found.length < 3) {\r\n return false;\r\n }\r\n // use a regexp without $ at the end to match nested routes better\r\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\r\n if (nonEndingRE.test(filter)) {\r\n // mark children as matches\r\n route.children.forEach(child => isRouteMatching(child, filter));\r\n // exception case: `/`\r\n if (route.record.path !== '/' || filter === '/') {\r\n route.__vd_match = route.re.test(filter);\r\n return true;\r\n }\r\n // hide the / route\r\n return false;\r\n }\r\n const path = route.record.path.toLowerCase();\r\n const decodedPath = decode(path);\r\n // also allow partial matching on the path\r\n if (!filter.startsWith('/') &&\r\n (decodedPath.includes(filter) || path.includes(filter)))\r\n return true;\r\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\r\n return true;\r\n if (route.record.name && String(route.record.name).includes(filter))\r\n return true;\r\n return route.children.some(child => isRouteMatching(child, filter));\r\n}\r\nfunction omit(obj, keys) {\r\n const ret = {};\r\n for (const key in obj) {\r\n if (!keys.includes(key)) {\r\n // @ts-expect-error\r\n ret[key] = obj[key];\r\n }\r\n }\r\n return ret;\r\n}\n\n/**\r\n * Creates a Router instance that can be used by a Vue app.\r\n *\r\n * @param options - {@link RouterOptions}\r\n */\r\nfunction createRouter(options) {\r\n const matcher = createRouterMatcher(options.routes, options);\r\n const parseQuery$1 = options.parseQuery || parseQuery;\r\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\r\n const routerHistory = options.history;\r\n if ((process.env.NODE_ENV !== 'production') && !routerHistory)\r\n throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\r\n ' https://next.router.vuejs.org/api/#history.');\r\n const beforeGuards = useCallbacks();\r\n const beforeResolveGuards = useCallbacks();\r\n const afterGuards = useCallbacks();\r\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\r\n let pendingLocation = START_LOCATION_NORMALIZED;\r\n // leave the scrollRestoration if no scrollBehavior is provided\r\n if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\r\n history.scrollRestoration = 'manual';\r\n }\r\n const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\r\n const encodeParams = applyToParams.bind(null, encodeParam);\r\n const decodeParams = \r\n // @ts-expect-error: intentionally avoid the type check\r\n applyToParams.bind(null, decode);\r\n function addRoute(parentOrRoute, route) {\r\n let parent;\r\n let record;\r\n if (isRouteName(parentOrRoute)) {\r\n parent = matcher.getRecordMatcher(parentOrRoute);\r\n record = route;\r\n }\r\n else {\r\n record = parentOrRoute;\r\n }\r\n return matcher.addRoute(record, parent);\r\n }\r\n function removeRoute(name) {\r\n const recordMatcher = matcher.getRecordMatcher(name);\r\n if (recordMatcher) {\r\n matcher.removeRoute(recordMatcher);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\r\n }\r\n }\r\n function getRoutes() {\r\n return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\r\n }\r\n function hasRoute(name) {\r\n return !!matcher.getRecordMatcher(name);\r\n }\r\n function resolve(rawLocation, currentLocation) {\r\n // const objectLocation = routerLocationAsObject(rawLocation)\r\n // we create a copy to modify it later\r\n currentLocation = assign({}, currentLocation || currentRoute.value);\r\n if (typeof rawLocation === 'string') {\r\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\r\n const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\r\n const href = routerHistory.createHref(locationNormalized.fullPath);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (href.startsWith('//'))\r\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\r\n else if (!matchedRoute.matched.length) {\r\n warn(`No match found for location with path \"${rawLocation}\"`);\r\n }\r\n }\r\n // locationNormalized is always a new object\r\n return assign(locationNormalized, matchedRoute, {\r\n params: decodeParams(matchedRoute.params),\r\n hash: decode(locationNormalized.hash),\r\n redirectedFrom: undefined,\r\n href,\r\n });\r\n }\r\n let matcherLocation;\r\n // path could be relative in object as well\r\n if ('path' in rawLocation) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n 'params' in rawLocation &&\r\n !('name' in rawLocation) &&\r\n // @ts-expect-error: the type is never\r\n Object.keys(rawLocation.params).length) {\r\n warn(`Path \"${\r\n // @ts-expect-error: the type is never\r\n rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\r\n }\r\n matcherLocation = assign({}, rawLocation, {\r\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\r\n });\r\n }\r\n else {\r\n // remove any nullish param\r\n const targetParams = assign({}, rawLocation.params);\r\n for (const key in targetParams) {\r\n if (targetParams[key] == null) {\r\n delete targetParams[key];\r\n }\r\n }\r\n // pass encoded values to the matcher so it can produce encoded path and fullPath\r\n matcherLocation = assign({}, rawLocation, {\r\n params: encodeParams(rawLocation.params),\r\n });\r\n // current location params are decoded, we need to encode them in case the\r\n // matcher merges the params\r\n currentLocation.params = encodeParams(currentLocation.params);\r\n }\r\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\r\n const hash = rawLocation.hash || '';\r\n if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\r\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\r\n }\r\n // decoding them) the matcher might have merged current location params so\r\n // we need to run the decoding again\r\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\r\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\r\n hash: encodeHash(hash),\r\n path: matchedRoute.path,\r\n }));\r\n const href = routerHistory.createHref(fullPath);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (href.startsWith('//')) {\r\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\r\n }\r\n else if (!matchedRoute.matched.length) {\r\n warn(`No match found for location with path \"${'path' in rawLocation ? rawLocation.path : rawLocation}\"`);\r\n }\r\n }\r\n return assign({\r\n fullPath,\r\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\r\n // hash\r\n hash,\r\n query: \r\n // if the user is using a custom query lib like qs, we might have\r\n // nested objects, so we keep the query as is, meaning it can contain\r\n // numbers at `$route.query`, but at the point, the user will have to\r\n // use their own type anyway.\r\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\r\n stringifyQuery$1 === stringifyQuery\r\n ? normalizeQuery(rawLocation.query)\r\n : (rawLocation.query || {}),\r\n }, matchedRoute, {\r\n redirectedFrom: undefined,\r\n href,\r\n });\r\n }\r\n function locationAsObject(to) {\r\n return typeof to === 'string'\r\n ? parseURL(parseQuery$1, to, currentRoute.value.path)\r\n : assign({}, to);\r\n }\r\n function checkCanceledNavigation(to, from) {\r\n if (pendingLocation !== to) {\r\n return createRouterError(8 /* NAVIGATION_CANCELLED */, {\r\n from,\r\n to,\r\n });\r\n }\r\n }\r\n function push(to) {\r\n return pushWithRedirect(to);\r\n }\r\n function replace(to) {\r\n return push(assign(locationAsObject(to), { replace: true }));\r\n }\r\n function handleRedirectRecord(to) {\r\n const lastMatched = to.matched[to.matched.length - 1];\r\n if (lastMatched && lastMatched.redirect) {\r\n const { redirect } = lastMatched;\r\n let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\r\n if (typeof newTargetLocation === 'string') {\r\n newTargetLocation =\r\n newTargetLocation.includes('?') || newTargetLocation.includes('#')\r\n ? (newTargetLocation = locationAsObject(newTargetLocation))\r\n : // force empty params\r\n { path: newTargetLocation };\r\n // @ts-expect-error: force empty params when a string is passed to let\r\n // the router parse them again\r\n newTargetLocation.params = {};\r\n }\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !('path' in newTargetLocation) &&\r\n !('name' in newTargetLocation)) {\r\n warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\r\n throw new Error('Invalid redirect');\r\n }\r\n return assign({\r\n query: to.query,\r\n hash: to.hash,\r\n params: to.params,\r\n }, newTargetLocation);\r\n }\r\n }\r\n function pushWithRedirect(to, redirectedFrom) {\r\n const targetLocation = (pendingLocation = resolve(to));\r\n const from = currentRoute.value;\r\n const data = to.state;\r\n const force = to.force;\r\n // to could be a string where `replace` is a function\r\n const replace = to.replace === true;\r\n const shouldRedirect = handleRedirectRecord(targetLocation);\r\n if (shouldRedirect)\r\n return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\r\n state: data,\r\n force,\r\n replace,\r\n }), \r\n // keep original redirectedFrom if it exists\r\n redirectedFrom || targetLocation);\r\n // if it was a redirect we already called `pushWithRedirect` above\r\n const toLocation = targetLocation;\r\n toLocation.redirectedFrom = redirectedFrom;\r\n let failure;\r\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\r\n failure = createRouterError(16 /* NAVIGATION_DUPLICATED */, { to: toLocation, from });\r\n // trigger scroll to allow scrolling to the same anchor\r\n handleScroll(from, from, \r\n // this is a push, the only way for it to be triggered from a\r\n // history.listen is with a redirect, which makes it become a push\r\n true, \r\n // This cannot be the first navigation because the initial location\r\n // cannot be manually navigated to\r\n false);\r\n }\r\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\r\n .catch((error) => isNavigationFailure(error)\r\n ? // navigation redirects still mark the router as ready\r\n isNavigationFailure(error, 2 /* NAVIGATION_GUARD_REDIRECT */)\r\n ? error\r\n : markAsReady(error) // also returns the error\r\n : // reject any unknown error\r\n triggerError(error, toLocation, from))\r\n .then((failure) => {\r\n if (failure) {\r\n if (isNavigationFailure(failure, 2 /* NAVIGATION_GUARD_REDIRECT */)) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n // we are redirecting to the same location we were already at\r\n isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\r\n // and we have done it a couple of times\r\n redirectedFrom &&\r\n // @ts-expect-error: added only in dev\r\n (redirectedFrom._count = redirectedFrom._count\r\n ? // @ts-expect-error\r\n redirectedFrom._count + 1\r\n : 1) > 10) {\r\n warn(`Detected an infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`);\r\n return Promise.reject(new Error('Infinite redirect in navigation guard'));\r\n }\r\n return pushWithRedirect(\r\n // keep options\r\n assign(locationAsObject(failure.to), {\r\n state: data,\r\n force,\r\n replace,\r\n }), \r\n // preserve the original redirectedFrom if any\r\n redirectedFrom || toLocation);\r\n }\r\n }\r\n else {\r\n // if we fail we don't finalize the navigation\r\n failure = finalizeNavigation(toLocation, from, true, replace, data);\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n return failure;\r\n });\r\n }\r\n /**\r\n * Helper to reject and skip all navigation guards if a new navigation happened\r\n * @param to\r\n * @param from\r\n */\r\n function checkCanceledNavigationAndReject(to, from) {\r\n const error = checkCanceledNavigation(to, from);\r\n return error ? Promise.reject(error) : Promise.resolve();\r\n }\r\n // TODO: refactor the whole before guards by internally using router.beforeEach\r\n function navigate(to, from) {\r\n let guards;\r\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\r\n // all components here have been resolved once because we are leaving\r\n guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\r\n // leavingRecords is already reversed\r\n for (const record of leavingRecords) {\r\n record.leaveGuards.forEach(guard => {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n });\r\n }\r\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeRouteLeave guards\r\n return (runGuardQueue(guards)\r\n .then(() => {\r\n // check global guards beforeEach\r\n guards = [];\r\n for (const guard of beforeGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check in components beforeRouteUpdate\r\n guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\r\n for (const record of updatingRecords) {\r\n record.updateGuards.forEach(guard => {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n });\r\n }\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check the route beforeEnter\r\n guards = [];\r\n for (const record of to.matched) {\r\n // do not trigger beforeEnter on reused views\r\n if (record.beforeEnter && !from.matched.includes(record)) {\r\n if (Array.isArray(record.beforeEnter)) {\r\n for (const beforeEnter of record.beforeEnter)\r\n guards.push(guardToPromiseFn(beforeEnter, to, from));\r\n }\r\n else {\r\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\r\n }\r\n }\r\n }\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // NOTE: at this point to.matched is normalized and does not contain any () => Promise\r\n // clear existing enterCallbacks, these are added by extractComponentsGuards\r\n to.matched.forEach(record => (record.enterCallbacks = {}));\r\n // check in-component beforeRouteEnter\r\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from);\r\n guards.push(canceledNavigationCheck);\r\n // run the queue of per route beforeEnter guards\r\n return runGuardQueue(guards);\r\n })\r\n .then(() => {\r\n // check global guards beforeResolve\r\n guards = [];\r\n for (const guard of beforeResolveGuards.list()) {\r\n guards.push(guardToPromiseFn(guard, to, from));\r\n }\r\n guards.push(canceledNavigationCheck);\r\n return runGuardQueue(guards);\r\n })\r\n // catch any navigation canceled\r\n .catch(err => isNavigationFailure(err, 8 /* NAVIGATION_CANCELLED */)\r\n ? err\r\n : Promise.reject(err)));\r\n }\r\n function triggerAfterEach(to, from, failure) {\r\n // navigation is confirmed, call afterGuards\r\n // TODO: wrap with error handlers\r\n for (const guard of afterGuards.list())\r\n guard(to, from, failure);\r\n }\r\n /**\r\n * - Cleans up any navigation guards\r\n * - Changes the url if necessary\r\n * - Calls the scrollBehavior\r\n */\r\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\r\n // a more recent navigation took place\r\n const error = checkCanceledNavigation(toLocation, from);\r\n if (error)\r\n return error;\r\n // only consider as push if it's not the first navigation\r\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\r\n const state = !isBrowser ? {} : history.state;\r\n // change URL only if the user did a push/replace and if it's not the initial navigation because\r\n // it's just reflecting the url\r\n if (isPush) {\r\n // on the initial navigation, we want to reuse the scroll position from\r\n // history state if it exists\r\n if (replace || isFirstNavigation)\r\n routerHistory.replace(toLocation.fullPath, assign({\r\n scroll: isFirstNavigation && state && state.scroll,\r\n }, data));\r\n else\r\n routerHistory.push(toLocation.fullPath, data);\r\n }\r\n // accept current navigation\r\n currentRoute.value = toLocation;\r\n handleScroll(toLocation, from, isPush, isFirstNavigation);\r\n markAsReady();\r\n }\r\n let removeHistoryListener;\r\n // attach listener to history to trigger navigations\r\n function setupListeners() {\r\n // avoid setting up listeners twice due to an invalid first navigation\r\n if (removeHistoryListener)\r\n return;\r\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\r\n // cannot be a redirect route because it was in history\r\n const toLocation = resolve(to);\r\n // due to dynamic routing, and to hash history with manual navigation\r\n // (manually changing the url or calling history.hash = '#/somewhere'),\r\n // there could be a redirect record in history\r\n const shouldRedirect = handleRedirectRecord(toLocation);\r\n if (shouldRedirect) {\r\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\r\n return;\r\n }\r\n pendingLocation = toLocation;\r\n const from = currentRoute.value;\r\n // TODO: should be moved to web history?\r\n if (isBrowser) {\r\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\r\n }\r\n navigate(toLocation, from)\r\n .catch((error) => {\r\n if (isNavigationFailure(error, 4 /* NAVIGATION_ABORTED */ | 8 /* NAVIGATION_CANCELLED */)) {\r\n return error;\r\n }\r\n if (isNavigationFailure(error, 2 /* NAVIGATION_GUARD_REDIRECT */)) {\r\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\r\n // false) but this is bug prone as we have no way to wait the\r\n // navigation to be finished before calling pushWithRedirect. Using\r\n // a setTimeout of 16ms seems to work but there is not guarantee for\r\n // it to work on every browser. So Instead we do not restore the\r\n // history entry and trigger a new navigation as requested by the\r\n // navigation guard.\r\n // the error is already handled by router.push we just want to avoid\r\n // logging the error\r\n pushWithRedirect(error.to, toLocation\r\n // avoid an uncaught rejection, let push call triggerError\r\n )\r\n .then(failure => {\r\n // manual change in hash history #916 ending up in the URL not\r\n // changing but it was changed by the manual url change, so we\r\n // need to manually change it ourselves\r\n if (isNavigationFailure(failure, 4 /* NAVIGATION_ABORTED */ |\r\n 16 /* NAVIGATION_DUPLICATED */) &&\r\n !info.delta &&\r\n info.type === NavigationType.pop) {\r\n routerHistory.go(-1, false);\r\n }\r\n })\r\n .catch(noop);\r\n // avoid the then branch\r\n return Promise.reject();\r\n }\r\n // do not restore history on unknown direction\r\n if (info.delta)\r\n routerHistory.go(-info.delta, false);\r\n // unrecognized error, transfer to the global handler\r\n return triggerError(error, toLocation, from);\r\n })\r\n .then((failure) => {\r\n failure =\r\n failure ||\r\n finalizeNavigation(\r\n // after navigation, all matched components are resolved\r\n toLocation, from, false);\r\n // revert the navigation\r\n if (failure) {\r\n if (info.delta) {\r\n routerHistory.go(-info.delta, false);\r\n }\r\n else if (info.type === NavigationType.pop &&\r\n isNavigationFailure(failure, 4 /* NAVIGATION_ABORTED */ | 16 /* NAVIGATION_DUPLICATED */)) {\r\n // manual change in hash history #916\r\n // it's like a push but lacks the information of the direction\r\n routerHistory.go(-1, false);\r\n }\r\n }\r\n triggerAfterEach(toLocation, from, failure);\r\n })\r\n .catch(noop);\r\n });\r\n }\r\n // Initialization and Errors\r\n let readyHandlers = useCallbacks();\r\n let errorHandlers = useCallbacks();\r\n let ready;\r\n /**\r\n * Trigger errorHandlers added via onError and throws the error as well\r\n *\r\n * @param error - error to throw\r\n * @param to - location we were navigating to when the error happened\r\n * @param from - location we were navigating from when the error happened\r\n * @returns the error as a rejected promise\r\n */\r\n function triggerError(error, to, from) {\r\n markAsReady(error);\r\n const list = errorHandlers.list();\r\n if (list.length) {\r\n list.forEach(handler => handler(error, to, from));\r\n }\r\n else {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn('uncaught error during route navigation:');\r\n }\r\n console.error(error);\r\n }\r\n return Promise.reject(error);\r\n }\r\n function isReady() {\r\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\r\n return Promise.resolve();\r\n return new Promise((resolve, reject) => {\r\n readyHandlers.add([resolve, reject]);\r\n });\r\n }\r\n function markAsReady(err) {\r\n if (!ready) {\r\n // still not ready if an error happened\r\n ready = !err;\r\n setupListeners();\r\n readyHandlers\r\n .list()\r\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\r\n readyHandlers.reset();\r\n }\r\n return err;\r\n }\r\n // Scroll behavior\r\n function handleScroll(to, from, isPush, isFirstNavigation) {\r\n const { scrollBehavior } = options;\r\n if (!isBrowser || !scrollBehavior)\r\n return Promise.resolve();\r\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\r\n ((isFirstNavigation || !isPush) &&\r\n history.state &&\r\n history.state.scroll) ||\r\n null;\r\n return nextTick()\r\n .then(() => scrollBehavior(to, from, scrollPosition))\r\n .then(position => position && scrollToPosition(position))\r\n .catch(err => triggerError(err, to, from));\r\n }\r\n const go = (delta) => routerHistory.go(delta);\r\n let started;\r\n const installedApps = new Set();\r\n const router = {\r\n currentRoute,\r\n addRoute,\r\n removeRoute,\r\n hasRoute,\r\n getRoutes,\r\n resolve,\r\n options,\r\n push,\r\n replace,\r\n go,\r\n back: () => go(-1),\r\n forward: () => go(1),\r\n beforeEach: beforeGuards.add,\r\n beforeResolve: beforeResolveGuards.add,\r\n afterEach: afterGuards.add,\r\n onError: errorHandlers.add,\r\n isReady,\r\n install(app) {\r\n const router = this;\r\n app.component('RouterLink', RouterLink);\r\n app.component('RouterView', RouterView);\r\n app.config.globalProperties.$router = router;\r\n Object.defineProperty(app.config.globalProperties, '$route', {\r\n enumerable: true,\r\n get: () => unref(currentRoute),\r\n });\r\n // this initial navigation is only necessary on client, on server it doesn't\r\n // make sense because it will create an extra unnecessary navigation and could\r\n // lead to problems\r\n if (isBrowser &&\r\n // used for the initial navigation client side to avoid pushing\r\n // multiple times when the router is used in multiple apps\r\n !started &&\r\n currentRoute.value === START_LOCATION_NORMALIZED) {\r\n // see above\r\n started = true;\r\n push(routerHistory.location).catch(err => {\r\n if ((process.env.NODE_ENV !== 'production'))\r\n warn('Unexpected error when starting the router:', err);\r\n });\r\n }\r\n const reactiveRoute = {};\r\n for (const key in START_LOCATION_NORMALIZED) {\r\n // @ts-expect-error: the key matches\r\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\r\n }\r\n app.provide(routerKey, router);\r\n app.provide(routeLocationKey, reactive(reactiveRoute));\r\n app.provide(routerViewLocationKey, currentRoute);\r\n const unmountApp = app.unmount;\r\n installedApps.add(app);\r\n app.unmount = function () {\r\n installedApps.delete(app);\r\n // the router is not attached to an app anymore\r\n if (installedApps.size < 1) {\r\n // invalidate the current navigation\r\n pendingLocation = START_LOCATION_NORMALIZED;\r\n removeHistoryListener && removeHistoryListener();\r\n removeHistoryListener = null;\r\n currentRoute.value = START_LOCATION_NORMALIZED;\r\n started = false;\r\n ready = false;\r\n }\r\n unmountApp();\r\n };\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\r\n addDevtools(app, router, matcher);\r\n }\r\n },\r\n };\r\n return router;\r\n}\r\nfunction runGuardQueue(guards) {\r\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\r\n}\r\nfunction extractChangingRecords(to, from) {\r\n const leavingRecords = [];\r\n const updatingRecords = [];\r\n const enteringRecords = [];\r\n const len = Math.max(from.matched.length, to.matched.length);\r\n for (let i = 0; i < len; i++) {\r\n const recordFrom = from.matched[i];\r\n if (recordFrom) {\r\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\r\n updatingRecords.push(recordFrom);\r\n else\r\n leavingRecords.push(recordFrom);\r\n }\r\n const recordTo = to.matched[i];\r\n if (recordTo) {\r\n // the type doesn't matter because we are comparing per reference\r\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\r\n enteringRecords.push(recordTo);\r\n }\r\n }\r\n }\r\n return [leavingRecords, updatingRecords, enteringRecords];\r\n}\n\n/**\r\n * Returns the router instance. Equivalent to using `$router` inside\r\n * templates.\r\n */\r\nfunction useRouter() {\r\n return inject(routerKey);\r\n}\r\n/**\r\n * Returns the current route location. Equivalent to using `$route` inside\r\n * templates.\r\n */\r\nfunction useRoute() {\r\n return inject(routeLocationKey);\r\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element ().\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n","import { initCustomFormatter, warn } from '@vue/runtime-dom';\nexport * from '@vue/runtime-dom';\n\nfunction initDev() {\r\n {\r\n initCustomFormatter();\r\n }\r\n}\n\n// This entry exports the runtime only, and is built as\r\nif ((process.env.NODE_ENV !== 'production')) {\r\n initDev();\r\n}\r\nconst compile = () => {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Runtime compilation is not supported in this build of Vue.` +\r\n (` Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".`\r\n ) /* should not happen */);\r\n }\r\n};\n\nexport { compile };\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM ||\n capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n","/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on javascript@lists.facebook.com before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!(/Win64/.exec(uas));\n\n if (agent) {\n _ie = agent[1] ? parseFloat(agent[1]) : (\n agent[5] ? parseFloat(agent[5]) : NaN);\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function() {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function() {\n return _populate() || (_ie_real_version > _ie);\n },\n\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function() {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function() {\n return _populate() || _firefox;\n },\n\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function() {\n return _populate() || _opera;\n },\n\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function() {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function() {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome : function() {\n return _populate() || _chrome;\n },\n\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function() {\n return _populate() || _windows;\n },\n\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function() {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function() {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function() {\n return _populate() || _iphone;\n },\n\n mobile: function() {\n return _populate() || (_iphone || _ipad || _android || _mobile);\n },\n\n nativeApp: function() {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function() {\n return _populate() || _android;\n },\n\n ipad: function() {\n return _populate() || _ipad;\n }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _vue = require('vue');\n\nvar _cropperjs = require('cropperjs');\n\nvar _cropperjs2 = _interopRequireDefault(_cropperjs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar previewPropType = typeof window === 'undefined' ? [String, Array] : [String, Array, Element, NodeList];\n\nexports.default = {\n render: function render() {\n var crossorigin = this.crossorigin || undefined;\n\n return (0, _vue.h)('div', { style: this.containerStyle }, [(0, _vue.h)('img', {\n ref: 'img',\n src: this.src,\n alt: this.alt || 'image',\n style: [{ 'max-width': '100%' }, this.imgStyle],\n crossorigin: crossorigin\n })]);\n },\n\n props: {\n containerStyle: Object,\n src: {\n type: String,\n default: ''\n },\n alt: String,\n imgStyle: Object,\n\n viewMode: Number,\n dragMode: String,\n initialAspectRatio: Number,\n aspectRatio: Number,\n data: Object,\n preview: previewPropType,\n responsive: {\n type: Boolean,\n default: true\n },\n restore: {\n type: Boolean,\n default: true\n },\n checkCrossOrigin: {\n type: Boolean,\n default: true\n },\n checkOrientation: {\n type: Boolean,\n default: true\n },\n crossorigin: {\n type: String\n },\n modal: {\n type: Boolean,\n default: true\n },\n guides: {\n type: Boolean,\n default: true\n },\n center: {\n type: Boolean,\n default: true\n },\n highlight: {\n type: Boolean,\n default: true\n },\n background: {\n type: Boolean,\n default: true\n },\n autoCrop: {\n type: Boolean,\n default: true\n },\n autoCropArea: Number,\n movable: {\n type: Boolean,\n default: true\n },\n rotatable: {\n type: Boolean,\n default: true\n },\n scalable: {\n type: Boolean,\n default: true\n },\n zoomable: {\n type: Boolean,\n default: true\n },\n zoomOnTouch: {\n type: Boolean,\n default: true\n },\n zoomOnWheel: {\n type: Boolean,\n default: true\n },\n wheelZoomRatio: Number,\n cropBoxMovable: {\n type: Boolean,\n default: true\n },\n cropBoxResizable: {\n type: Boolean,\n default: true\n },\n toggleDragModeOnDblclick: {\n type: Boolean,\n default: true\n },\n\n minCanvasWidth: Number,\n minCanvasHeight: Number,\n minCropBoxWidth: Number,\n minCropBoxHeight: Number,\n minContainerWidth: Number,\n minContainerHeight: Number,\n\n ready: Function,\n cropstart: Function,\n cropmove: Function,\n cropend: Function,\n crop: Function,\n zoom: Function\n },\n mounted: function mounted() {\n var _$options$props = this.$options.props,\n containerStyle = _$options$props.containerStyle,\n src = _$options$props.src,\n alt = _$options$props.alt,\n imgStyle = _$options$props.imgStyle,\n data = _objectWithoutProperties(_$options$props, ['containerStyle', 'src', 'alt', 'imgStyle']);\n\n var props = {};\n\n for (var key in data) {\n if (this[key] !== undefined) {\n props[key] = this[key];\n }\n }\n\n this.cropper = new _cropperjs2.default(this.$refs.img, props);\n },\n\n methods: {\n reset: function reset() {\n return this.cropper.reset();\n },\n clear: function clear() {\n return this.cropper.clear();\n },\n initCrop: function initCrop() {\n return this.cropper.crop();\n },\n replace: function replace(url) {\n var onlyColorChanged = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n return this.cropper.replace(url, onlyColorChanged);\n },\n enable: function enable() {\n return this.cropper.enable();\n },\n disable: function disable() {\n return this.cropper.disable();\n },\n destroy: function destroy() {\n return this.cropper.destroy();\n },\n move: function move(offsetX, offsetY) {\n return this.cropper.move(offsetX, offsetY);\n },\n moveTo: function moveTo(x) {\n var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;\n\n return this.cropper.moveTo(x, y);\n },\n relativeZoom: function relativeZoom(ratio, _originalEvent) {\n return this.cropper.zoom(ratio, _originalEvent);\n },\n zoomTo: function zoomTo(ratio, _originalEvent) {\n return this.cropper.zoomTo(ratio, _originalEvent);\n },\n rotate: function rotate(degree) {\n return this.cropper.rotate(degree);\n },\n rotateTo: function rotateTo(degree) {\n return this.cropper.rotateTo(degree);\n },\n scaleX: function scaleX(_scaleX) {\n return this.cropper.scaleX(_scaleX);\n },\n scaleY: function scaleY(_scaleY) {\n return this.cropper.scaleY(_scaleY);\n },\n scale: function scale(scaleX) {\n var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX;\n\n return this.cropper.scale(scaleX, scaleY);\n },\n getData: function getData() {\n var rounded = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n return this.cropper.getData(rounded);\n },\n setData: function setData(data) {\n return this.cropper.setData(data);\n },\n getContainerData: function getContainerData() {\n return this.cropper.getContainerData();\n },\n getImageData: function getImageData() {\n return this.cropper.getImageData();\n },\n getCanvasData: function getCanvasData() {\n return this.cropper.getCanvasData();\n },\n setCanvasData: function setCanvasData(data) {\n return this.cropper.setCanvasData(data);\n },\n getCropBoxData: function getCropBoxData() {\n return this.cropper.getCropBoxData();\n },\n setCropBoxData: function setCropBoxData(data) {\n return this.cropper.setCropBoxData(data);\n },\n getCroppedCanvas: function getCroppedCanvas() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n return this.cropper.getCroppedCanvas(options);\n },\n setAspectRatio: function setAspectRatio(aspectRatio) {\n return this.cropper.setAspectRatio(aspectRatio);\n },\n setDragMode: function setDragMode(mode) {\n return this.cropper.setDragMode(mode);\n }\n }\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n'use strict';\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n","module.exports = require('./src/normalizeWheel.js');\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n'use strict';\n\nvar UserAgent_DEPRECATED = require('./UserAgent_DEPRECATED');\n\nvar isEventSupported = require('./isEventSupported');\n\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) { sY = event.detail; }\n if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }\n if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n // side scrolling on FF with DOMMouseScroll\n if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) { pY = event.deltaY; }\n if ('deltaX' in event) { pX = event.deltaX; }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n return { spinX : sX,\n spinY : sY,\n pixelX : pX,\n pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n return (UserAgent_DEPRECATED.firefox())\n ? 'DOMMouseScroll'\n : (isEventSupported('wheel'))\n ? 'wheel'\n : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\n","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = { top: 0, left: 0 };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n // flips variation if popper content overflows boundaries\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n"],"sourceRoot":""}