diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index ffd78dc2d9dbe114aa384f9cfb3acb933bcfee36..0000000000000000000000000000000000000000
--- a/.babelrc
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "presets": [
- [
- "@babel/preset-env",
- {
- "corejs": "2",
- "useBuiltIns": "usage"
- }
- ]
- ],
- "plugins": [
- "@babel/plugin-proposal-object-rest-spread"
- ]
-}
diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 8162457873d2913d8d5b1d5ae2babcd355324385..0000000000000000000000000000000000000000
--- a/.editorconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
\ No newline at end of file
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000000000000000000000000000000000000..2d6e4205fbb22dabef8d472391c113eabb17d721
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,7 @@
+.history
+.husky
+.vscode
+coverage
+dist
+node_modules
+vite.config.ts
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 0000000000000000000000000000000000000000..2a8d451519cb18c42206eb1c3d26a9ab2f845ca4
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,18 @@
+{
+ "root": true,
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint", "prettier"],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended",
+ "prettier"
+ ],
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "prettier/prettier": "error"
+ }
+}
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index ed1743753684af5503fd6051d6dc5b3f10e2a793..0000000000000000000000000000000000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "extends": "airbnb-base",
- "env": {
- "browser": true
- },
- "rules": {
- "no-underscore-dangle": "off",
- "no-plusplus": "off",
- "no-cond-assign": "off",
- "func-names": "off",
- "no-continue": "off",
- "no-console": "off",
- "no-bitwise": "off",
- "class-methods-use-this": "off",
- "prefer-destructuring": "off",
- "no-param-reassign": [
- "off"
- ],
- "max-len": "off",
- "no-multi-spaces": "off"
- }
-}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 9acea27e840c79956cdddeeef1267e1cbe9d6299..0c623794fa8f39fe77edb0d3a2a0a5c1fb6a3576 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,26 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
node_modules
-npm-debug.log
-.DS_Store
+dist
+dist-ssr
+*.local
+coverage
+
+# Editor directories and files
+.vscode/*
+.history/*
+!.vscode/extensions.json
.idea
-.vscode
-package-lock.json
-yarn-error.log
-dist/demo
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100755
index 0000000000000000000000000000000000000000..d24fdfc601b9ffe8ccc3fca5d3b873109dc56c4a
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+. "$(dirname -- "$0")/_/husky.sh"
+
+npx lint-staged
diff --git a/.lintstagedrc b/.lintstagedrc
new file mode 100644
index 0000000000000000000000000000000000000000..ab71cc0ac96c08ae60587d19d26bf02727db64e1
--- /dev/null
+++ b/.lintstagedrc
@@ -0,0 +1,4 @@
+{
+ "./**/*.{ts,html,json}": "npm run format:scripts",
+ "./**/*.{css,scss}": "npm run format:styles"
+}
diff --git a/.npmignore b/.npmignore
deleted file mode 100644
index a98fa6ea49f31d00f9d5754f75ea3019a6fa4a36..0000000000000000000000000000000000000000
--- a/.npmignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.editorconfig
-.idea
-.eslintrc.json
-index.html
-server.js
-demo
-config
-dist/demo
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000000000000000000000000000000000000..dfa386e11adb34f376ed3eefa17eb75e333fcaf7
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,6 @@
+.history
+.husky
+.vscode
+coverage
+dist
+node_modules
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000000000000000000000000000000000000..ec26f036d46aed93cb397edc974b41f87bb36bfa
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,16 @@
+{
+ "printWidth": 80,
+ "tabWidth": 2,
+ "singleQuote": false,
+ "trailingComma": "es5",
+ "arrowParens": "avoid",
+ "bracketSpacing": true,
+ "useTabs": false,
+ "endOfLine": "auto",
+ "singleAttributePerLine": false,
+ "bracketSameLine": false,
+ "jsxBracketSameLine": false,
+ "jsxSingleQuote": false,
+ "quoteProps": "as-needed",
+ "semi": true
+}
diff --git a/.stylelintignore b/.stylelintignore
new file mode 100644
index 0000000000000000000000000000000000000000..2d6e4205fbb22dabef8d472391c113eabb17d721
--- /dev/null
+++ b/.stylelintignore
@@ -0,0 +1,7 @@
+.history
+.husky
+.vscode
+coverage
+dist
+node_modules
+vite.config.ts
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 0000000000000000000000000000000000000000..bdcfc0d441b8aff9d4ad2b24f274cb203cb88061
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,21 @@
+{
+ "plugins": ["stylelint-prettier"],
+ "extends": [
+ "stylelint-config-recommended",
+ "stylelint-config-sass-guidelines",
+ "stylelint-config-prettier"
+ ],
+ "overrides": [
+ {
+ "files": ["**/*.scss"],
+ "customSyntax": "postcss-scss"
+ }
+ ],
+ "rules": {
+ "prettier/prettier": true,
+ "function-parentheses-space-inside": null,
+ "no-descending-specificity": null,
+ "max-nesting-depth": 2,
+ "selector-max-id": 1
+ }
+}
diff --git a/config/webpack.config.demo.js b/config/webpack.config.demo.js
deleted file mode 100644
index 5174e1b113aa3c858ae637900d123d39b44f5894..0000000000000000000000000000000000000000
--- a/config/webpack.config.demo.js
+++ /dev/null
@@ -1,96 +0,0 @@
-const path = require('path');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const ExtractTextPlugin = require('extract-text-webpack-plugin');
-const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-
-const isProduction = process.env.NODE_ENV === 'production';
-const scriptFileName = 'driver-demo.min.js';
-const styleFileName = 'driver-demo.min.css';
-
-module.exports = {
- mode: isProduction ? 'production' : 'development',
- entry: [
- './demo/styles/demo.scss',
- './demo/scripts/demo.js',
- './src/index.js',
- ].filter(entryPoint => !!entryPoint),
- output: {
- path: path.join(__dirname, '/../dist/demo'),
- publicPath: './',
- filename: scriptFileName,
- libraryTarget: 'umd',
- library: 'Driver',
- libraryExport: 'default',
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- exclude: /node_modules/,
- loader: 'eslint-loader',
- enforce: 'pre',
- options: {
- failOnWarning: false,
- failOnError: true,
- },
- },
- {
- test: /\.js$/,
- exclude: /node_modules/,
- loader: 'babel-loader',
- },
- {
- test: /.scss$/,
- loader: ExtractTextPlugin.extract([
- {
- loader: 'css-loader',
- options: { url: false },
- },
- {
- loader: 'postcss-loader',
- options: {
- ident: 'postcss',
- plugins: [require('autoprefixer')()], // eslint-disable-line global-require
- },
- },
- 'sass-loader',
- ]),
- },
- ],
- },
- plugins: [
- new ExtractTextPlugin({
- filename: styleFileName,
- allChunks: true,
- }),
- new OptimizeCssAssetsPlugin({
- assetNameRegExp: /\.min\.css$/g,
- // eslint-disable-next-line global-require
- cssProcessor: require('cssnano'),
- cssProcessorPluginOptions: {
- preset: [
- 'default',
- {
- discardComments: { removeAll: true },
- },
- ],
- },
- canPrint: true,
- }),
- new CopyWebpackPlugin([
- {
- from: './demo/images/',
- to: 'images',
- },
- ]),
- new HtmlWebpackPlugin({
- template: 'demo/index.html',
- favicon: 'demo/images/favicon.png',
- }),
- ],
- stats: {
- colors: true,
- },
- devtool: 'cheap-module-eval-source-map',
-};
diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js
deleted file mode 100644
index 71be43a01d893e73ec5d9035e9ac819df68b9c63..0000000000000000000000000000000000000000
--- a/config/webpack.config.prod.js
+++ /dev/null
@@ -1,79 +0,0 @@
-const path = require('path');
-const ExtractTextPlugin = require('extract-text-webpack-plugin');
-const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
-
-module.exports = {
- mode: 'production',
- entry: [
- './src/driver.scss',
- './src/index.js',
- ],
- output: {
- path: path.join(__dirname, '/../dist'),
- publicPath: '/dist/',
- filename: 'driver.min.js',
- libraryTarget: 'umd',
- library: 'Driver',
- libraryExport: 'default',
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- exclude: /node_modules/,
- loader: 'eslint-loader',
- enforce: 'pre',
- options: {
- failOnWarning: false,
- failOnError: true,
- },
- },
- {
- test: /\.js$/,
- exclude: /node_modules/,
- loader: 'babel-loader',
- },
- {
- test: /.scss$/,
- loader: ExtractTextPlugin.extract([
- {
- loader: 'css-loader',
- options: { url: false },
- },
- {
- loader: 'postcss-loader',
- options: {
- ident: 'postcss',
- plugins: [require('autoprefixer')()], // eslint-disable-line global-require
- },
- },
- 'sass-loader',
- ]),
- },
- ],
- },
- plugins: [
- new ExtractTextPlugin({
- filename: 'driver.min.css',
- allChunks: true,
- }),
- new OptimizeCssAssetsPlugin({
- assetNameRegExp: /\.min\.css$/g,
- // eslint-disable-next-line global-require
- cssProcessor: require('cssnano'),
- cssProcessorPluginOptions: {
- preset: [
- 'default',
- {
- discardComments: { removeAll: true },
- },
- ],
- },
- canPrint: true,
- }),
- ],
- stats: {
- colors: true,
- },
- devtool: 'cheap-module-source-map',
-};
diff --git a/demo/images/browserstack.png b/demo/images/browserstack.png
deleted file mode 100644
index 5df89c89b2d3bee5540da80b99812ad25cf08040..0000000000000000000000000000000000000000
Binary files a/demo/images/browserstack.png and /dev/null differ
diff --git a/demo/images/driver.png b/demo/images/driver.png
deleted file mode 100644
index 35e1ca95867cda7ea8b5b78ae8d6a532bb66bad1..0000000000000000000000000000000000000000
Binary files a/demo/images/driver.png and /dev/null differ
diff --git a/demo/images/driver.svg b/demo/images/driver.svg
deleted file mode 100644
index db5c2f530b4e930ebbcf9496bd3b4a0a74642b72..0000000000000000000000000000000000000000
--- a/demo/images/driver.svg
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/demo/images/favicon.png b/demo/images/favicon.png
deleted file mode 100644
index 906d2d584015e1e0ca62a3a209f8b15bb9211e51..0000000000000000000000000000000000000000
Binary files a/demo/images/favicon.png and /dev/null differ
diff --git a/demo/images/separator.png b/demo/images/separator.png
deleted file mode 100644
index b5d3d6f487e577329f3c4c3846213616afae1f52..0000000000000000000000000000000000000000
Binary files a/demo/images/separator.png and /dev/null differ
diff --git a/demo/images/split.png b/demo/images/split.png
deleted file mode 100644
index ade976995bf8aa4b5d15820820375f2963045d96..0000000000000000000000000000000000000000
Binary files a/demo/images/split.png and /dev/null differ
diff --git a/demo/index.html b/demo/index.html
deleted file mode 100644
index 8d410d6bbbcc89836cd4e088357e6bc1bf24c333..0000000000000000000000000000000000000000
--- a/demo/index.html
+++ /dev/null
@@ -1,412 +0,0 @@
-
-
-
-
-
-
- Driver
-
-
-
-
-
-
-
-
- A lightweight (~4kb gzipped) yet powerful JavaScript engine that helps you drive the user's focus on page.
- Some sample use-cases can be creating powerful feature introductions, call-to-action
- components, focus shifters etc.
-
-
-
- What are the features?
- Driver is compatible with all the major browsers and can be used for any of your overlay needs. Feature
- introductions, focus shifters, call-to-action are just a few examples.
-
- 🔆 Highlight any (literally any) item on page
- ✋ Block user interactions
- 📣 Create feature introductions
- 👓 Add focus shifters for users
- 🛠️ Highly customizable – Use it anywhere for overlay
- ⌨️ User Friendly – Controllable by keys
- 🆓 MIT Licensed – Free for personal and commercial use
- 🕊️ Lightweight – Only ~4kb when gzipped
- 🌀 Consistent behavior across all major browsers
-
-
-
-
- How does it do that?
- In it simplest, it puts the canvas on top of the whole page and then cuts the part that is over the element to be
- highlighted and provides you several hooks when highlighting, highlighted or un-highlighting elements making it
- highly customizable.
-
-
-
-
-
Can you show some Examples?
-
Below you find some of the examples and sample use-cases on how you can use it.
-
-
-
Highlighting a Single Element – Without Popover
-
If all you want is just highlight a single element, you can do that simply by passing the
- selector
-
Show Demo
-
const driver = new Driver();
-driver.highlight('#create-post');
-
-
-
-
-
-
-
- You can also turn off the animation or set the padding around the corner. More on it later.
-
-
-
-
-
Highlighting a Single Element – With Popover
-
If you would like to show some details alongside the highlighted element, you can do that easily by specifying
- title and description
-
Show Demo
-
const driver = new Driver();
-driver.highlight({
- element: '#some-element',
- popover: {
- title: 'Title for the Popover',
- description: 'Description for it',
- }
-});
-
-
You can modify the behavior of this popover also by a certain set of options. More on it
- below.
-
-
-
-
-
-
Popover Positioning
-
You can also, change the position of the popover to be either left
, left-center
, left-bottom
, top
, top-center
, top-right
,
- right
, right-center
, right-bottom
or bottom
, bottom-center
, bottom-right
, mid-center
.
-
Show Demo
-
const driver = new Driver();
-driver.highlight({
- element: '#some-element',
- popover: {
- title: 'Title for the Popover',
- description: 'Description for it',
- // position can be left, left-center, left-bottom, top,
- // top-center, top-right, right, right-center, right-bottom,
- // bottom, bottom-center, bottom-right, mid-center
- position: 'left',
- }
-});
-
-
-
-
-
If you don't specify the position or specify it to be auto
, it will automatically
- find the suitable position for the popover and show it
-
-
-
-
HTML in Popovers
-
You can also specify HTML in the body or the title of the popovers. Here is an example:
-
Show Demo
-
const driver = new Driver();
-driver.highlight({
- element: '#some-element',
- popover: {
- title: '<em>An italicized title</em>',
- description: 'Description may also contain <strong>HTML</strong>'
- }
-});
-
-
-
- And of course it can be any valid HTML.
-
-
-
-
Disable Close on Outside Click
-
By default, driver.js gets reset if user clicks outside the highlighted element, you can disable this:
-
Show Demo
-
const driver = new Driver({
- allowClose: false,
-});
-
-driver.highlight({
- element: '#some-element',
- popover: {
- title: '<em>An italicized title</em>',
- description: 'Description may also contain <strong>HTML</strong>'
- }
-});
-
-
- If you use this option, for multi-step driver, it would close after you are done with the popover or you can close it programmatically. For single element popover, you need to close it properly, otherwise it won't be closed
-
-
driver.reset()
-
-
-
-
-
Creating Feature Introductions
-
You can also make powerful feature introductions to guide the users
- about the features. Just provide an array of steps where each step specifies an element to highlight.
-
Below is just a quick example showing you how to combine the steps in
- introduction.
-
Show Demo
-
- const driver = new Driver();
-// Define the steps for introduction
-driver.defineSteps([
- {
- element: '#first-element-introduction',
- popover: {
- className: 'first-step-popover-class',
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'left'
- }
- },
- {
- element: '#second-element-introduction',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'top'
- }
- },
- {
- element: '#third-element-introduction',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'right'
- }
- },
-]);
-// Start the introduction
-driver.start();
-
- This is just a quick example for the feature introduction. For a richer one, please have a look at
- the
- "Quick Tour"
-
- You may also turn off the footer buttons in popover, in which case user can control the popover using the arrows
- keys on keyboard. Or you may control it using the methods provided by Driver.
-
-
-
-
-
Without Overlay
-
You can create feature introductions and do everything listed above without overlays also. All you have to do
- is just set the opacity to `0`.
-
Show Demo
-
const driver = new Driver({
- opacity: 0,
-});
-
-driver.highlight({
- element: '#run-element-without-popover',
- popover: {
- title: 'Title for the Popover',
- description: 'Description for it',
- position: 'top', // can be `top`, `left`, `right`, `bottom`
- }
-});
-
-
..and you can do the same for the feature introductions
-
-
-
-
-
-
-
..and much much more
-
Driver comes with many options that you can manipulate to make driver behave as you may like
-
-
Driver Definition
-
Here are the options that Driver understands
-
const driver = new Driver({
- className: 'scoped-class', // className to wrap driver.js popover
- animate: true, // Animate while changing highlighted element
- opacity: 0.75, // Background opacity (0 means only popovers and without overlay)
- padding: 10, // Distance of element from around the edges
- allowClose: true, // Whether clicking on overlay should close or not
- overlayClickNext: false, // Should it move to next step on overlay click
- doneBtnText: 'Done', // Text on the final button
- closeBtnText: 'Close', // Text on the close button for this step
- nextBtnText: 'Next', // Next button text for this step
- prevBtnText: 'Previous', // Previous button text for this step
- showButtons: false, // Do not show control buttons in footer
- keyboardControl: true, // Allow controlling through keyboard (escape to close, arrow keys to move)
- scrollIntoViewOptions: {}, // We use `scrollIntoView()` when possible, pass here the options for it if you want any
- onHighlightStarted: (Element) {}, // Called when element is about to be highlighted
- onHighlighted: (Element) {}, // Called when element is fully highlighted
- onDeselected: (Element) {}, // Called when element has been deselected
- onReset: (Element) {}, // Called when overlay is about to be cleared
- onNext: (Element) => {}, // Called when moving to next step on any step
- onPrevious: (Element) => {}, // Called when moving to next step on any step
-});
-
-
- Note that all the button options that you provide in the driver definition can be overridden for a
- specific step by giving them in the step definition
-
-
Step Definition
-
Here are the set of options that you can pass in each step i.e. an item in array of steps or the object that
- you pass to highlight
method
-
const stepDefinition = {
- element: '#some-item', // Query selector string or Node to be highlighted
- popover: { // There will be no popover if empty or not given
- className: 'popover-class', // className to wrap this specific step popover in addition to the general className in Driver options
- title: 'Title', // Title on the popover
- description: 'Description', // Body of the popover
- showButtons: false, // Do not show control buttons in footer
- closeBtnText: 'Close', // Text on the close button for this step
- nextBtnText: 'Next', // Next button text for this step
- prevBtnText: 'Previous', // Previous button text for this step
- }
-};
-
-
-
-
API Methods
-
Below are the set of methods that are available to you
-
const driver = new Driver(driverOptions);
-
-const isActivated = driver.isActivated; // Checks if the driver is active or not
-driver.moveNext(); // Moves to next step in the steps list
-driver.movePrevious(); // Moves to previous step in the steps list
-driver.start(stepNumber = 0); // Starts driving through the defined steps
-driver.highlight(string|stepDefinition); // highlights the element using query selector or the step definition
-driver.reset(); // Resets the overlay and clears the screen
-driver.hasHighlightedElement(); // Checks if there is any highlighted element
-driver.hasNextStep(); // Checks if there is next step to move to
-driver.hasPreviousStep(); // Checks if there is previous step to move to
-
-// Prevents the current move. Useful in `onNext` or `onPrevious` if you want to
-// perform some asynchronous task and manually move to next step
-driver.preventMove();
-
-// Gets the currently highlighted element on screen
-const activeElement = driver.getHighlightedElement();
-const lastActiveElement = driver.getLastHighlightedElement();
-activeElement.getCalculatedPosition(); // Gets screen co-ordinates of the active element
-activeElement.hidePopover(); // Hide the popover
-activeElement.showPopover(); // Show the popover
-
-activeElement.getNode(); // Gets the DOM Element behind this element
-
-
- You can use a variety of options to achieve whatever you may want. I have some plans on improving
- it further, make sure to keep an eye on the GitHub
- page
-
-
-
-
Contributing
-
You can find the contribution instructions on the GitHub page . Feel free to submit an
- issue, create a pull request or spread the word
-
-
-
-
A product by Kamran produced out of boredom and
- frustration after he gave up on trying to find a perfect solution to integrate journey introduction
- and overlays.
-
-
-
Follow
-
-
-
-
-
-
-
-
-
-
diff --git a/demo/scripts/demo.js b/demo/scripts/demo.js
deleted file mode 100644
index 95ef9d96f9bed0eeedfa60ca869b5080e2b57e94..0000000000000000000000000000000000000000
--- a/demo/scripts/demo.js
+++ /dev/null
@@ -1,359 +0,0 @@
-/* eslint-disable */
-import Driver from '../../src';
-
-document.addEventListener('DOMContentLoaded', function () {
- const tourSteps = [
- {
- element: document.getElementById('driver-demo-head'),
- popover: {
- className: 'scoped-driver-popover',
- title: 'Before we start',
- description: 'This is just one use-case, make sure to check out the rest of the docs below.',
- nextBtnText: 'Okay, Start!',
- },
- }, {
- element: '#logo_img',
- popover: {
- title: 'Focus Anything',
- description: 'You can use it to highlight literally anything, images, text, div, span, li etc.',
- },
- }, {
- element: '#name_driver',
- popover: {
- title: 'Why Driver?',
- description: 'Because it lets you drive the user across the page',
- }
- }, {
- element: '#driver-demo-head',
- popover: {
- title: 'Let\'s talk features',
- description: 'You may leave your mouse and use the arrow keys to move next and back or escape key anytime to close this',
- position: 'bottom'
- }
- }, {
- element: '#highlight_feature',
- popover: {
- title: 'Highlight Feature',
- description: 'You may use it to highlight single elements (with or without popover) e.g. like facebook does while creating posts',
- }
- }, {
- element: '#feature_introductions_feature',
- popover: {
- title: 'Feature Introductions',
- description: 'With it\'s powerful API you can use it to make programmatic or user driven feature introductions',
- position: 'bottom'
- }
- }, {
- element: '#focus_shifters_feature',
- popover: {
- title: 'Focus Shifters',
- description: 'If some element or part of the page needs user\'s interaction, you can just call the highlight method. Driver will take care of driving the user there',
- position: 'bottom'
- }
- }, {
- element: '#customizable_feature',
- popover: {
- title: 'Highly Customizable',
- description: 'Driver has a powerful API allowing you to customize the experience as much as you can.',
- position: 'bottom'
- }
- }, {
- element: '#keyboard_feature',
- popover: {
- title: 'User Friendly',
- description: 'Your users can control it with the arrow keys on keyboard, or escape to close it',
- position: 'bottom'
- }
- }, {
- element: '#free_use_feature',
- popover: {
- title: 'MIT License',
- description: 'I believe in open-source and thus Driver is completely free for both personal or commercial use'
- }
- }, {
- element: '#lightweight_feature',
- popover: {
- title: 'Only ~4KB',
- description: 'Driver is free of bloat and written in Vanilla JS. There is no external dependency at all, thus keeping it smaller in size.'
- }
- }, {
- element: '#examples_section',
- popover: {
- title: 'Usage Examples',
- description: 'Have a look at the usage examples and see how you can use it.'
- }
- }, {
- element: '#driver-demo-head',
- popover: {
- title: 'Quick Tour Ends',
- description: 'This was just a sneak peak, have a look at the API section and examples to learn more!'
- }
- }
- ];
-
- const animatedTourDriver = new Driver({
- animate: true,
- opacity: 0.8,
- padding: 5,
- showButtons: true,
- });
-
- const boringTourDriver = new Driver({
- animate: false,
- opacity: 0.8,
- padding: 5,
- showButtons: true,
- className: 'boring-scope',
- });
-
- boringTourDriver.defineSteps(tourSteps);
- animatedTourDriver.defineSteps(tourSteps);
-
- document.querySelector('#animated-tour')
- .addEventListener('click', () => {
- if (boringTourDriver.isActivated) {
- boringTourDriver.reset(true);
- }
-
- animatedTourDriver.start();
- });
-
- document.querySelector('#boring-tour')
- .addEventListener('click', () => {
- if (animatedTourDriver.isActivated) {
- animatedTourDriver.reset(true);
- }
-
- boringTourDriver.start();
- });
-
-
- try {
- document.querySelectorAll('pre code')
- .forEach((element) => {
- hljs.highlightBlock(element);
- });
- } catch (e) {
- // Silently ignore the highlight errors
- }
-
-
-/////////////////////////////////////////////
-// First example – highlighting without popover
-/////////////////////////////////////////////
- const singleDriverNoPopover = new Driver();
- document.querySelector('#run-single-element-no-popover')
- .addEventListener('click', (e) => {
- e.preventDefault();
- singleDriverNoPopover.highlight('#single-element-no-popover');
- });
-
-/////////////////////////////////////////////
-// Form focus examples
-/////////////////////////////////////////////
- const focusDriver = new Driver({ padding: 0 });
- const inputIds = ['creation-input', 'creation-input-2', 'creation-input-3', 'creation-input-4'];
- inputIds.forEach(inputId => {
- // Highlight the section on focus
- document.getElementById(inputId)
- .addEventListener('focus', () => {
- focusDriver.highlight(`#${inputId}`);
- });
- });
-
-/////////////////////////////////////////////
-// Highlighting single element with popover
-/////////////////////////////////////////////
- const singleDriverWithPopover = new Driver();
- document.querySelector('#run-single-element-with-popover')
- .addEventListener('click', (e) => {
- e.preventDefault();
- singleDriverWithPopover.highlight({
- element: '#single-element-with-popover',
- showButtons: false,
- popover: {
- title: 'Did you know?',
- description: 'You can add HTML in title or description also!',
- position: 'top'
- }
- });
- });
-
-/////////////////////////////////////////////////////
-// Highlighting single element with popover position
-/////////////////////////////////////////////////////
- const singleDriverWithPopoverPosition = new Driver();
- document.querySelector('#run-single-element-with-popover-position')
- .addEventListener('click', (e) => {
- e.preventDefault();
-
- singleDriverWithPopoverPosition.highlight({
- element: '#single-element-with-popover-position',
- showButtons: false,
- popover: {
- title: 'Did you know?',
- description: 'You can add HTML in title or description also!',
- position: 'top'
- }
- });
- });
-
-/////////////////////////////////////////////////////
-// Highlighting single element with popover position
-/////////////////////////////////////////////////////
- const positionBtnsDriver = new Driver({
- padding: 0,
- });
-
- document.querySelector('#position-btns')
- .addEventListener('click', (e) => {
- e.preventDefault();
-
- let id = e.target.id;
- let alignment = e.target.dataset.alignment;
-
- if (!alignment) return;
-
- positionBtnsDriver.highlight({
- element: `#${id}`,
- showButtons: false,
- popover: {
- title: 'Did you know?',
- description: 'You can add HTML in title or description also!',
- position: alignment
- }
- });
- })
-
-/////////////////////////////////////////////////////
-// Highlighting single element with popover position
-/////////////////////////////////////////////////////
- const htmlDriver = new Driver();
-
- document.querySelector('#run-single-element-with-popover-html')
- .addEventListener('click', (e) => {
- e.preventDefault();
-
- htmlDriver.highlight({
- element: '#single-element-with-popover-html',
- showButtons: false,
- popover: {
- title: 'Tags in title or body ',
- description: 'Body can also have html tags !',
- position: 'top'
- }
- });
- });
-
-/////////////////////////////////////////////////////
-// Without Overlay Example
-/////////////////////////////////////////////////////
- const withoutOverlay = new Driver({
- opacity: 0,
- padding: 0
- });
-
- document.querySelector('#run-element-without-popover')
- .addEventListener('click', (e) => {
- e.preventDefault();
-
- withoutOverlay.highlight({
- element: '#run-element-without-popover',
- popover: {
- title: 'Title for the Popover',
- description: 'Description for it',
- position: 'top', // can be `top`, `left`, `right`, `bottom`
- }
- });
- });
-
-/////////////////////////////////////////////
-// Single no close demo
-/////////////////////////////////////////////
- const singleNoClose = new Driver({
- allowClose: false,
- position: 'top'
- });
-
- singleNoClose.defineSteps([{
- element: '#single-element-no-close',
- popover: {
- title: 'Uh-huh!',
- description: 'You cannot close by clicking outside'
- }
- }, {
- element: '#third-element-introduction',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'top'
- }
- }]);
-
- document.querySelector('#run-single-element-no-close')
- .addEventListener('click', function (e) {
- e.preventDefault();
- singleNoClose.start();
- });
-
-/////////////////////////////////////////////////////
-// Highlighting single element with popover position
-/////////////////////////////////////////////////////
- const featureIntroductionDriver = new Driver();
- featureIntroductionDriver.defineSteps([
- {
- element: '#first-element-introduction',
- popover: {
- className: 'first-step-popover-class',
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'top'
- }
- },
- {
- element: '#second-para-feature-introductions',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'bottom'
- }
- },
- {
- element: '#third-para-feature-introductions',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'top'
- }
- },
- {
- element: '#run-multi-element-popovers',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'top'
- }
- },
- {
- element: '#third-element-introduction',
- popover: {
- title: 'Title on Popover',
- description: 'Body of the popover',
- position: 'top'
- }
- },
- ]);
-
- document.querySelector('#run-multi-element-popovers')
- .addEventListener('click', (e) => {
- e.preventDefault();
- e.stopPropagation();
- featureIntroductionDriver.start();
- });
-
- const newURL = location.href.split('?')[0];
- if (newURL !== location.href) {
- window.location = newURL;
- window.location.href = newURL;
- }
-});
diff --git a/demo/styles/base.scss b/demo/styles/base.scss
deleted file mode 100644
index c4a3d1d866d948978346e793dfda20fccee4daa3..0000000000000000000000000000000000000000
--- a/demo/styles/base.scss
+++ /dev/null
@@ -1,154 +0,0 @@
-$global-guttering: 24px;
-$global-font-size-h1: 32px;
-$global-font-size-h2: 24px;
-$global-font-size-h3: 20px;
-$global-font-size-h4: 18px;
-$global-font-size-h5: 16px;
-$global-font-size-h6: 14px;
-$heading-font-weight: 700;
-
-/*=============================================
-= Generic styling =
-=============================================*/
-
-* {
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- margin: 0;
- padding: 0;
-}
-
-*, *:before, *:after {
- box-sizing: border-box
-}
-
-html, body {
- position: relative;
- margin: 0;
- width: 100%;
- height: 100%;
-}
-
-body {
- padding-top: 1px;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
- font-size: 16px;
- line-height: 1.4;
- color: white;
- background-color: #2E2E30;
- overflow-x: hidden;
-}
-
-label {
- display: block;
- margin-bottom: 8px;
- font-size: 14px;
- font-weight: 500;
- cursor: pointer;
-}
-
-p {
- margin-top: 0;
- margin-bottom: 20px;
- line-height: 1.5;
-}
-
-hr, .hr {
- display: block;
- margin: $global-guttering*1.25 0;
- border: 0;
- border-bottom: 1px solid #eaeaea;
- height: 1px;
-
- &.hr__fancy {
- background: url("./images/separator.png") repeat-y;
- height: 5px;
- background-size: cover;
- }
-}
-
-h1, h2, h3, h4, h5, h6 {
- margin-top: 0;
- margin-bottom: $global-guttering/2;
- font-weight: $heading-font-weight;
- line-height: 1.2;
-}
-
-a, a:visited, a:focus {
- color: #FFFFFF;
- text-decoration: none;
- font-weight: 600;
-}
-
-.form-control {
- display: block;
- width: 100%;
- background-color: #f9f9f9;
- padding: 12px;
- border: 1px solid #ddd;
- border-radius: 2.5px;
- font-size: 14px;
- -webkit-appearance: none;
- appearance: none;
- outline: none;
- margin-bottom: $global-guttering;
-}
-
-h1, .h1 {
- font-size: $global-font-size-h1;
-}
-
-h2, .h2 {
- font-size: $global-font-size-h2;
-}
-
-h3, .h3 {
- font-size: $global-font-size-h3;
-}
-
-h4, .h4 {
- font-size: $global-font-size-h4;
-}
-
-h5, .h5 {
- font-size: $global-font-size-h5;
-}
-
-h6, .h6 {
- font-size: $global-font-size-h6;
-}
-
-ul li, ol li {
- list-style-type: none;
- line-height: 1.5;
- margin-bottom: 3px;
-}
-
-blockquote {
- background: #f5f3f1;
- padding: 10px;
- margin-bottom: 35px;
- border-radius: 10px;
-}
-
-.top-20 {
- margin-top: 20px;
-}
-
-.top-30 {
- margin-top: 30px;
-}
-
-.zero-bottom {
- margin-bottom: 0;
-}
-
-.zero-top {
- margin-top: 0;
-}
-
-.text-center {
- text-align: center;
-}
-
-/*===== End of Section comment block ======*/
diff --git a/demo/styles/demo.scss b/demo/styles/demo.scss
deleted file mode 100644
index 0ee93b421a303199f11792735ce687462527ef31..0000000000000000000000000000000000000000
--- a/demo/styles/demo.scss
+++ /dev/null
@@ -1,129 +0,0 @@
-@import "./base";
-@import "../../src/driver";
-
-img.emoji {
- height: 1em;
- width: 1em;
- margin: 0 .05em 0 .1em;
- vertical-align: -0.1em;
-}
-
-.brand {
- position: relative;
-
- img {
- height: 67px;
- position: relative;
- top: 10px;
- }
-}
-
-.page-wrap {
- max-width: 550px;
- margin: 50px auto;
- background: white;
- padding: 10px 30px;
- border-radius: 5px;
- color: #1f1f1f;
-
- a, a:visited, a:focus {
- color: #1f1f1f;
- text-decoration: underline;
- }
-
- a.btn__dark {
- text-decoration: none;
- color: #FFFFFF;
- background-color: #F44336;
- padding: 0 18px;
- height: 40px;
- line-height: 40px;
- border-radius: 8px;
- cursor: pointer;
- transition: background-color 0.2s, color 0.2s;
- font-weight: 500;
- width: 195px;
- font-size: 17px;
- display: inline-block;
- margin-top: 2px;
- }
-
- a.btn__run-demo {
- text-decoration: none;
- background: #f54336;
- padding: 5px;
- border-radius: 20px;
- color: white;
- display: block;
- margin: 15px 0 10px;
- text-align: center;
- }
-}
-
-section {
- margin-bottom: $global-guttering*1.25;
-}
-
-.section__header {
- margin: 10px 0 20px;
- text-align: center;
- display: block;
- padding: 10px;
-
- h1 {
- font-size: 55px;
-
- .emoji {
- font-size: 45px;
- top: -4px;
- margin-right: 3px;
- position: relative;
- }
- }
-
- .tagline {
- max-width: 450px;
- margin: 0 auto 25px;
- text-align: center;
- }
-}
-
-.section__examples {
- .section__example {
- margin-bottom: 20px;
- }
-
- #creation-input {
- margin-top: 20px;
- }
-
- input {
- padding: 10px;
- background-color: #fafbfc;
- border: 3px solid #e1e4e8;
- border-radius: 3px;
- box-shadow: inset 0 0 10px rgba(27, 31, 35, 0.05);
- margin-bottom: 0;
- margin-top: 7px;
- }
-}
-
-.position-btns {
- display: grid;
- grid-template-columns: repeat(3,1fr);
- grid-gap: 8px;
- text-align: center;
-
- #position-btn-mid-center{
- grid-column: 2/ span 1;
- }
-}
-
-.position-btns a {
- text-decoration: none;
- font-size: 13px;
- padding: 10px 15px;
- background: #f54336;
- color: white !important;
- border-radius: 6px;
-}
diff --git a/dist/driver.min.css b/dist/driver.min.css
deleted file mode 100644
index 9828d38f4b1805bab994ebe68b4f2f3121e22947..0000000000000000000000000000000000000000
--- a/dist/driver.min.css
+++ /dev/null
@@ -1 +0,0 @@
-div#driver-popover-item{display:none;position:absolute;background:#fff;color:#2d2d2d;margin:0;padding:15px;border-radius:5px;min-width:250px;max-width:300px;box-shadow:0 1px 10px rgba(0,0,0,.4);z-index:1000000000}div#driver-popover-item .driver-popover-tip{border:5px solid #fff;content:"";position:absolute}div#driver-popover-item .driver-popover-tip.bottom{bottom:-10px;border-color:#fff transparent transparent}div#driver-popover-item .driver-popover-tip.bottom.position-center{left:49%}div#driver-popover-item .driver-popover-tip.bottom.position-right{right:20px}div#driver-popover-item .driver-popover-tip.left{left:-10px;top:10px;border-color:transparent #fff transparent transparent}div#driver-popover-item .driver-popover-tip.left.position-center{top:46%}div#driver-popover-item .driver-popover-tip.left.position-bottom{top:auto;bottom:20px}div#driver-popover-item .driver-popover-tip.right{right:-10px;top:10px;border-color:transparent transparent transparent #fff}div#driver-popover-item .driver-popover-tip.right.position-center{top:46%}div#driver-popover-item .driver-popover-tip.right.position-bottom{top:auto;bottom:20px}div#driver-popover-item .driver-popover-tip.top{top:-10px;border-color:transparent transparent #fff}div#driver-popover-item .driver-popover-tip.top.position-center{left:49%}div#driver-popover-item .driver-popover-tip.top.position-right{right:20px}div#driver-popover-item .driver-popover-tip.mid-center{display:none}div#driver-popover-item .driver-popover-footer{display:block;margin-top:10px}div#driver-popover-item .driver-popover-footer button{display:inline-block;padding:3px 10px;border:1px solid #d4d4d4;text-decoration:none;text-shadow:1px 1px 0 #fff;color:#2d2d2d;font:11px/normal sans-serif;cursor:pointer;outline:0;background-color:#f1f1f1;border-radius:2px;zoom:1;line-height:1.3}div#driver-popover-item .driver-popover-footer button.driver-disabled{color:grey;cursor:default;pointer-events:none}div#driver-popover-item .driver-popover-footer .driver-close-btn{float:left}div#driver-popover-item .driver-popover-footer .driver-btn-group,div#driver-popover-item .driver-popover-footer .driver-close-only-btn{float:right}div#driver-popover-item .driver-popover-title{font:19px/normal sans-serif;margin:0 0 5px;font-weight:700;display:block;position:relative;line-height:1.5;zoom:1}div#driver-popover-item .driver-popover-description{margin-bottom:0;font:14px/normal sans-serif;line-height:1.5;color:#2d2d2d;font-weight:400;zoom:1}.driver-clearfix:after,.driver-clearfix:before{content:"";display:table}.driver-clearfix:after{clear:both}.driver-stage-no-animation{transition:none!important;background:transparent!important;outline:5000px solid rgba(0,0,0,.75)}div#driver-page-overlay{background:#000;position:fixed;top:0;left:0;bottom:0;right:0;display:block;width:100%;height:100%;zoom:1;filter:alpha(opacity=75);opacity:.75;z-index:100002!important;transition:all .3s}div#driver-highlighted-element-stage{position:absolute;top:0;left:0;height:50px;width:300px;background:#fff;z-index:100003!important;display:none;border-radius:2px;transition:all .3s}.driver-highlighted-element{z-index:100004!important}.driver-position-relative{position:relative!important}.driver-fix-stacking{z-index:auto!important;opacity:1!important;transform:none!important;-webkit-filter:none!important;filter:none!important;perspective:none!important;transform-style:flat!important;transform-box:border-box!important;will-change:unset!important}
\ No newline at end of file
diff --git a/dist/driver.min.js b/dist/driver.min.js
deleted file mode 100644
index 997df23b3bfa86947a98ac14ad9401ed3797d0e3..0000000000000000000000000000000000000000
--- a/dist/driver.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Driver=e():t.Driver=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=57)}([function(t,e,n){var o=n(2),i=n(11),r=n(4),s=n(13),a=n(22),c=function(t,e,n){var u,l,h,f,p=t&c.F,d=t&c.G,v=t&c.S,y=t&c.P,g=t&c.B,m=d?o:v?o[e]||(o[e]={}):(o[e]||{}).prototype,b=d?i:i[e]||(i[e]={}),w=b.prototype||(b.prototype={});for(u in d&&(n=e),n)h=((l=!p&&m&&void 0!==m[u])?m:n)[u],f=g&&l?a(h,o):y&&"function"==typeof h?a(Function.call,h):h,m&&s(m,u,h,t&c.U),b[u]!=h&&r(b,u,f),y&&w[u]!=h&&(w[u]=h)};o.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var o=n(17)("wks"),i=n(14),r=n(2).Symbol,s="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=s&&r[t]||(s?r:i)("Symbol."+t))}).store=o},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var o=n(5),i=n(16);t.exports=n(6)?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(12),i=n(35),r=n(21),s=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(o(t),e=r(e,!0),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(39),i=n(24);t.exports=function(t){return o(i(t))}},function(t,e,n){var o=n(0);o(o.S+o.F*!n(6),"Object",{defineProperty:n(5).f})},function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(t,e,n){var o=n(3);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var o=n(2),i=n(4),r=n(8),s=n(14)("src"),a=n(59),c=(""+a).split("toString");n(11).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(r(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(r(n,s)||i(n,s,t[e]?""+t[e]:c.join(String(e)))),t===o?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e,n){var o=n(45),i=n(28);t.exports=Object.keys||function(t){return o(t,i)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var o=n(11),i=n(2),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n(18)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){var o=n(24);t.exports=function(t){return Object(o(t))}},function(t,e,n){"use strict";var o=n(2),i=n(8),r=n(6),s=n(0),a=n(13),c=n(62).KEY,u=n(7),l=n(17),h=n(26),f=n(14),p=n(1),d=n(43),v=n(44),y=n(63),g=n(42),m=n(12),b=n(3),w=n(19),x=n(9),S=n(21),O=n(16),k=n(30),P=n(67),E=n(49),N=n(47),j=n(5),L=n(15),T=E.f,C=j.f,_=P.f,M=o.Symbol,H=o.JSON,B=H&&H.stringify,F=p("_hidden"),I=p("toPrimitive"),R={}.propertyIsEnumerable,A=l("symbol-registry"),z=l("symbols"),D=l("op-symbols"),V=Object.prototype,W="function"==typeof M&&!!N.f,q=o.QObject,G=!q||!q.prototype||!q.prototype.findChild,K=r&&u(function(){return 7!=k(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var o=T(V,e);o&&delete V[e],C(t,e,n),o&&t!==V&&C(V,e,o)}:C,U=function(t){var e=z[t]=k(M.prototype);return e._k=t,e},Y=W&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},J=function(t,e,n){return t===V&&J(D,e,n),m(t),e=S(e,!0),m(n),i(z,e)?(n.enumerable?(i(t,F)&&t[F][e]&&(t[F][e]=!1),n=k(n,{enumerable:O(0,!1)})):(i(t,F)||C(t,F,O(1,{})),t[F][e]=!0),K(t,e,n)):C(t,e,n)},X=function(t,e){m(t);for(var n,o=y(e=x(e)),i=0,r=o.length;r>i;)J(t,n=o[i++],e[n]);return t},Q=function(t){var e=R.call(this,t=S(t,!0));return!(this===V&&i(z,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(z,t)||i(this,F)&&this[F][t])||e)},$=function(t,e){if(t=x(t),e=S(e,!0),t!==V||!i(z,e)||i(D,e)){var n=T(t,e);return!n||!i(z,e)||i(t,F)&&t[F][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=_(x(t)),o=[],r=0;n.length>r;)i(z,e=n[r++])||e==F||e==c||o.push(e);return o},tt=function(t){for(var e,n=t===V,o=_(n?D:x(t)),r=[],s=0;o.length>s;)!i(z,e=o[s++])||n&&!i(V,e)||r.push(z[e]);return r};W||(a((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(D,n),i(this,F)&&i(this[F],t)&&(this[F][t]=!1),K(this,t,O(1,n))};return r&&G&&K(V,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",function(){return this._k}),E.f=$,j.f=J,n(48).f=P.f=Z,n(29).f=Q,N.f=tt,r&&!n(18)&&a(V,"propertyIsEnumerable",Q,!0),d.f=function(t){return U(p(t))}),s(s.G+s.W+s.F*!W,{Symbol:M});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var ot=L(p.store),it=0;ot.length>it;)v(ot[it++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return i(A,t+="")?A[t]:A[t]=M(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in A)if(A[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?k(t):X(k(t),e)},defineProperty:J,defineProperties:X,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var rt=u(function(){N.f(1)});s(s.S+s.F*rt,"Object",{getOwnPropertySymbols:function(t){return N.f(w(t))}}),H&&s(s.S+s.F*(!W||u(function(){var t=M();return"[null]"!=B([t])||"{}"!=B({a:t})||"{}"!=B(Object(t))})),"JSON",{stringify:function(t){for(var e,n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e=o[1],(b(e)||void 0!==t)&&!Y(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Y(e))return e}),o[1]=e,B.apply(H,o)}}),M.prototype[I]||n(4)(M.prototype,I,M.prototype.valueOf),h(M,"Symbol"),h(Math,"Math",!0),h(o.JSON,"JSON",!0)},function(t,e,n){var o=n(3);t.exports=function(t,e){if(!o(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!o(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var o=n(37);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,i){return t.call(e,n,o,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var o=n(7);t.exports=function(t,e){return!!t&&o(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var o=n(5).f,i=n(8),r=n(1)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,r)&&o(t,r,{configurable:!0,value:e})}},function(t,e,n){var o=n(17)("keys"),i=n(14);t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var o=n(12),i=n(65),r=n(28),s=n(27)("IE_PROTO"),a=function(){},c=function(){var t,e=n(36)("iframe"),o=r.length;for(e.style.display="none",n(66).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("
+