├── .eslintignore
├── example
├── vue
│ ├── .eslintignore
│ ├── babel.config.js
│ ├── src
│ │ ├── main.js
│ │ └── App.vue
│ └── package.json
└── nuxt
│ ├── .prettierrc
│ ├── static
│ ├── favicon.ico
│ └── README.md
│ ├── jsconfig.json
│ ├── .editorconfig
│ ├── pages
│ ├── README.md
│ └── index.vue
│ ├── plugins
│ ├── twicpics.js
│ └── README.md
│ ├── .eslintrc.js
│ ├── README.md
│ ├── store
│ └── README.md
│ ├── package.json
│ ├── nuxt.config.js
│ └── .gitignore
├── jsconfig.json
├── public
├── favicon.ico
└── index.html
├── babel.config.js
├── dist
├── demo.html
├── vuetwicpics.css
└── vuetwicpics.umd.min.js
├── .editorconfig
├── src
├── main.js
├── utils
│ └── script.js
└── components
│ └── TwicImg.vue
├── .gitignore
├── LICENSE
├── package.json
└── README.md
/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 |
--------------------------------------------------------------------------------
/example/vue/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 |
--------------------------------------------------------------------------------
/example/nuxt/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true
3 | }
4 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": [
3 | "./src/**/*"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TwicPics/vue/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ["@vue/cli-plugin-babel/preset"]
3 | };
4 |
--------------------------------------------------------------------------------
/example/nuxt/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TwicPics/vue/HEAD/example/nuxt/static/favicon.ico
--------------------------------------------------------------------------------
/example/vue/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/dist/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
vuetwicpics demo
3 |
4 |
5 |
6 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_size = 2
6 | indent_style = space
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/example/nuxt/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": {
5 | "~/*": ["./*"],
6 | "@/*": ["./*"],
7 | "~~/*": ["./*"],
8 | "@@/*": ["./*"]
9 | }
10 | },
11 | "exclude": ["node_modules", ".nuxt", "dist"]
12 | }
13 |
--------------------------------------------------------------------------------
/example/nuxt/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_size = 2
6 | indent_style = space
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/example/nuxt/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/example/nuxt/plugins/twicpics.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import VueTwicpics from '@twicpics/vue';
3 | import '@twicpics/vue/dist/vuetwicpics.css';
4 |
5 | Vue.use(VueTwicpics, {
6 | domain: 'https://demo.twic.pics',
7 | defaultParams: {
8 | anticipation: 0.5,
9 | maxDpr: 2,
10 | step: 100,
11 | },
12 | });
13 |
--------------------------------------------------------------------------------
/example/nuxt/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/dist/vuetwicpics.css:
--------------------------------------------------------------------------------
1 | .twic-img{position:relative;width:100%;background-size:cover;background-position:50%;background-repeat:no-repeat;padding-top:100%}.twic-img>img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.twic-img--fade>img{transition-property:opacity;will-change:opacity;opacity:0}.twic-img--fade>img.twic-done{opacity:1}
--------------------------------------------------------------------------------
/example/nuxt/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | browser: true,
5 | node: true,
6 | },
7 | parserOptions: {
8 | parser: 'babel-eslint',
9 | },
10 | extends: [
11 | '@nuxtjs',
12 | 'prettier',
13 | 'prettier/vue',
14 | 'plugin:prettier/recommended',
15 | 'plugin:nuxt/recommended',
16 | ],
17 | plugins: [],
18 | // add your custom rules here
19 | rules: {},
20 | }
21 |
--------------------------------------------------------------------------------
/example/nuxt/README.md:
--------------------------------------------------------------------------------
1 | # twicpics
2 |
3 | ## Build Setup
4 |
5 | ```bash
6 | # install dependencies
7 | $ yarn install
8 |
9 | # serve with hot reload at localhost:3000
10 | $ yarn dev
11 |
12 | # build for production and launch server
13 | $ yarn build
14 | $ yarn start
15 |
16 | # generate static project
17 | $ yarn generate
18 | ```
19 |
20 | For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
21 |
--------------------------------------------------------------------------------
/example/nuxt/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/example/vue/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import App from "./App.vue";
3 |
4 | import VueTwicpics from "@twicpics/vue";
5 | import "@twicpics/vue/dist/vuetwicpics.css";
6 | Vue.use(VueTwicpics, {
7 | domain: "https://demo.twic.pics",
8 | defaultParams: {
9 | anticipation: 0.5,
10 | maxDpr: 2,
11 | step: 100
12 | }
13 | });
14 |
15 | Vue.config.productionTip = false;
16 |
17 | new Vue({
18 | render: h => h(App)
19 | }).$mount("#app");
20 |
--------------------------------------------------------------------------------
/example/nuxt/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import TwicImg from "./components/TwicImg.vue";
2 | import script from "./utils/script";
3 |
4 | const VueTwicpics = {
5 | install(Vue, options) {
6 | Vue.component("twic-img", TwicImg);
7 |
8 | if (typeof window !== "undefined") {
9 | Vue.use(script);
10 | Vue.script({
11 | domain: options.domain,
12 | params: options.defaultParams
13 | });
14 | }
15 |
16 | Vue.prototype.$params = options.defaultParams;
17 | Vue.prototype.$domain = options.domain;
18 | Vue.prototype.$twicClass = "twic";
19 | }
20 | };
21 |
22 | export default VueTwicpics;
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Dependency directories
13 | node_modules/
14 | jspm_packages/
15 |
16 | # TypeScript v1 declaration files
17 | typings/
18 |
19 | # TypeScript cache
20 | *.tsbuildinfo
21 |
22 | # Optional npm cache directory
23 | .npm
24 |
25 | # Optional eslint cache
26 | .eslintcache
27 |
28 | # Optional REPL history
29 | .node_repl_history
30 |
31 | # Output of 'npm pack'
32 | *.tgz
33 |
34 | # Yarn Integrity file
35 | .yarn-integrity
36 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/nuxt/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
18 |
19 |
20 |
21 |
24 |
25 |
42 |
--------------------------------------------------------------------------------
/example/nuxt/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "twicpics",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate",
10 | "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
11 | "lint": "yarn lint:js"
12 | },
13 | "dependencies": {
14 | "core-js": "^3.8.3",
15 | "nuxt": "^2.15.0",
16 | "@twicpics/vue": "link:../../"
17 | },
18 | "devDependencies": {
19 | "@nuxtjs/eslint-config": "^5.0.0",
20 | "@nuxtjs/eslint-module": "^3.0.2",
21 | "babel-eslint": "^10.1.0",
22 | "eslint": "^7.18.0",
23 | "eslint-config-prettier": "^7.2.0",
24 | "eslint-plugin-nuxt": "^2.0.0",
25 | "eslint-plugin-prettier": "^3.3.1",
26 | "eslint-plugin-vue": "^7.5.0",
27 | "prettier": "^2.2.1"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/example/vue/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
19 |
20 |
21 |
22 |
27 |
28 |
45 |
--------------------------------------------------------------------------------
/src/utils/script.js:
--------------------------------------------------------------------------------
1 | const Script = {
2 | install: function (Vue) {
3 | Vue.script = function ({ domain, params }) {
4 | const domainUrl = `${domain}/?v1`;
5 | if (!document.querySelector('script[src="' + domainUrl + '"]')) {
6 | const el = document.createElement("script");
7 | const defaultParams =
8 | params &&
9 | Object.entries(params)
10 | .map(([key, value]) => {
11 | if (key === "maxDpr") return `&max-dpr=${value}`;
12 | else return `&${key}=${value}`;
13 | })
14 | .join("");
15 |
16 | el.src = params ? domainUrl + defaultParams : domainUrl;
17 |
18 | const link = document.createElement("link");
19 | link.setAttribute("rel", "preconnect");
20 | link.setAttribute("href", domain);
21 |
22 | document.head.appendChild(link);
23 | document.head.appendChild(el);
24 | }
25 | };
26 | },
27 | };
28 | export default Script;
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 TwicPics
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/example/vue/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-and-twicpics",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "core-js": "^3.6.5",
12 | "vue": "^2.6.11",
13 | "vue-plugin-load-script": "^1.3.2",
14 | "@twicpics/vue": "link:../../"
15 | },
16 | "devDependencies": {
17 | "@vue/cli-plugin-babel": "~4.5.0",
18 | "@vue/cli-plugin-eslint": "~4.5.0",
19 | "@vue/cli-service": "~4.5.0",
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^6.7.2",
22 | "eslint-plugin-vue": "^6.2.2",
23 | "vue-template-compiler": "^2.6.11"
24 | },
25 | "eslintConfig": {
26 | "root": true,
27 | "env": {
28 | "node": true
29 | },
30 | "extends": [
31 | "plugin:vue/recommended",
32 | "eslint:recommended"
33 | ],
34 | "parserOptions": {
35 | "parser": "babel-eslint"
36 | },
37 | "rules": {}
38 | },
39 | "browserslist": [
40 | "> 1%",
41 | "last 2 versions",
42 | "not dead"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/example/nuxt/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | // Global page headers: https://go.nuxtjs.dev/config-head
3 | head: {
4 | title: 'twicpics',
5 | htmlAttrs: {
6 | lang: 'en',
7 | },
8 | meta: [
9 | { charset: 'utf-8' },
10 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
11 | { hid: 'description', name: 'description', content: '' },
12 | ],
13 | link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
14 | },
15 |
16 | // Global CSS: https://go.nuxtjs.dev/config-css
17 | css: [],
18 |
19 | // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
20 | plugins: [{ src: '~plugins/twicpics.js' }],
21 |
22 | // Auto import components: https://go.nuxtjs.dev/config-components
23 | components: true,
24 |
25 | // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
26 | buildModules: [
27 | // https://go.nuxtjs.dev/eslint
28 | '@nuxtjs/eslint-module',
29 | ],
30 |
31 | // Modules: https://go.nuxtjs.dev/config-modules
32 | modules: [],
33 |
34 | // Build Configuration: https://go.nuxtjs.dev/config-build
35 | build: {},
36 | };
37 |
--------------------------------------------------------------------------------
/example/nuxt/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # Nuxt generate
72 | dist
73 |
74 | # vuepress build output
75 | .vuepress/dist
76 |
77 | # Serverless directories
78 | .serverless
79 |
80 | # IDE / Editor
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
86 | # macOS
87 | .DS_Store
88 |
89 | # Vim swap files
90 | *.swp
91 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@twicpics/vue",
3 | "description": "TwicPics components library for Vue.js",
4 | "version": "0.1.9",
5 | "author": "TwicPics",
6 | "license": "MIT",
7 | "main": "dist/vuetwicpics.umd.js",
8 | "unpkg": "dist/vuetwicpics.umd.min.js",
9 | "style": "dist/vuetwicpics.css",
10 | "files": [
11 | "dist"
12 | ],
13 | "keywords": [
14 | "vue",
15 | "vue-component",
16 | "twicpics",
17 | "vue-twicpics",
18 | "image"
19 | ],
20 | "repository": {
21 | "type": "git",
22 | "url": "git://github.com/TwicPics/vue.git"
23 | },
24 | "devDependencies": {
25 | "@vue/cli-plugin-babel": "~4.5.0",
26 | "@vue/cli-plugin-eslint": "~4.5.0",
27 | "@vue/cli-service": "~4.5.0",
28 | "babel-eslint": "^10.1.0",
29 | "css-loader": "^4.2.1",
30 | "eslint": "^6.7.2",
31 | "eslint-plugin-vue": "^6.2.2",
32 | "optimize-css-assets-webpack-plugin": "^3.2.0",
33 | "vue-style-loader": "^4.1.2",
34 | "vue-template-compiler": "^2.6.11"
35 | },
36 | "dependencies": {
37 | "vue": "^2.6.11"
38 | },
39 | "scripts": {
40 | "serve": "vue-cli-service serve",
41 | "build": "vue-cli-service build",
42 | "lint": "vue-cli-service lint",
43 | "build-lib": "vue-cli-service build --target lib --name vuetwicpics src/main.js",
44 | "test": "npm run lint"
45 | },
46 | "eslintConfig": {
47 | "root": true,
48 | "env": {
49 | "node": true
50 | },
51 | "extends": [
52 | "plugin:vue/recommended",
53 | "eslint:recommended"
54 | ],
55 | "parserOptions": {
56 | "parser": "babel-eslint"
57 | },
58 | "rules": {}
59 | },
60 | "bugs": {
61 | "url": "https://github.com/TwicPics/vue/issues"
62 | },
63 | "homepage": "https://github.com/TwicPics/vue#readme",
64 | "publishConfig": {
65 | "access": "public"
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/components/TwicImg.vue:
--------------------------------------------------------------------------------
1 |
143 |
144 |
145 |
150 |
![]()
158 |
159 |
160 |
161 |
191 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # @twicpics/vue
2 |
3 | [![npm version][npm-version-src]][npm-version-href]
4 | [![npm downloads][npm-downloads-src]][npm-downloads-href]
5 | [![License][license-src]][license-href]
6 |
7 | > [TwicPics](https://www.twicpics.com) integration with Vue.js. This library is also available as a [NuxtJS module](https://github.com/TwicPics/nuxt-twicpics).
8 |
9 | ---
10 |
11 | ## ⚠️ Deprecation warning ⚠️
12 |
13 | **This package has been deprecated in favor of [TwicPics Components](https://github.com/TwicPics/components).**
14 |
15 | [TwicPics Components](https://github.com/TwicPics/components) is a collection of web components that make it dead easy to unleash the power of [TwicPics](https://www.twicpics.com) in your own projects and using the framework of your choice.
16 |
17 | 👉 [Check the documentation](https://github.com/TwicPics/components/tree/main/documentation)
18 |
19 | ---
20 |
21 | ## Setup
22 |
23 | 1. Add `@twicpics/vue` dependency to your project
24 |
25 | ```bash
26 | yarn add @twicpics/vue
27 | # or npm install @twicpics/vue
28 | ```
29 |
30 | 2. Import components
31 |
32 | ```js
33 | import Vue from "vue";
34 | import VueTwicpics from "@twicpics/vue";
35 | import "@twicpics/vue/dist/vuetwicpics.css";
36 |
37 | Vue.use(VueTwicpics, {
38 | // Your TwicPics custom
39 | domain: "https://sub-domain.twic.pics",
40 | // Optional settings
41 | defaultParams: {
42 | ...
43 | }
44 | });
45 | ```
46 |
47 | ## Options
48 |
49 | ### `domain` (required)
50 |
51 | This is your very own [TwicPics domain](https://www.twicpics.com/documentation/subdomain/).
52 |
53 | ### `defaultParams` (optional)
54 |
55 | #### `anticipation`
56 |
57 | * Default value: `0.2` (any value that is not a number will be ignored)
58 |
59 | TwicPics will lazy-load images by default. To avoid too abrupt a transition with elements appearing into view and then images very obviously loading afterwards, TwicPics will "anticipate" lazy loading by a factor of the actual viewport. This behavior is controlled by this setting.
60 |
61 | #### `maxDpr`
62 |
63 | * Default value: `2` (any value that is not a number will be ignored)
64 |
65 | TwicPics will take the Device Pixel Ratio of the current device into consideration when determining the sizes of images to load. By default, it will not take a DPR greater than 2 into consideration. If the DPR of the device is higher than 2, TwicPics will assume it to be 2. So you can lower it to 1 or be more permissive (for instance by setting it to 3 or 4).
66 |
67 | #### `step`
68 |
69 | * Default value: `10` (any value that is not a number will be ignored)
70 |
71 | To avoid requesting too may variants of the same image, TwicPics will round the width of images to the closest multiple of step. The height will then be computed in order to respect the original aspect ratio.
72 |
73 | ## Usage
74 |
75 | ### `TwicImg` component
76 |
77 | ```html
78 |
86 | ```
87 |
88 | | Name | Description | Type | Default | Required |
89 | |------|-------------|------|---------|----------|
90 | | `src` | Absolute or relative path to an image. | `String` | | `true` |
91 | | `width` | See `ratio`. | `Integer` | | `false` |
92 | | `height` | See `ratio`. | `Integer` | | `false` |
93 | | `ratio` | Unitless `width/height` values. You can either use `ratio` or `width` and `height` to set the aspect-ratio of your image. If both are used, `ratio` win. A squared image will be rendered by default. | `String` | `1/1` | `false` |
94 | | `placeholder` | Can be `preview`, `meancolor`, `maincolor` or `none`. | `String` | `preview` | `false` |
95 | | `step` | See [TwicPics documentation](https://www.twicpics.com/documentation/script-attributes-image/#data-twic-src-step) for details. | `Integer` | `10` | `false` |
96 | | `focus` | Can be `auto` or coordinates - see [TwicPics documentation](https://www.twicpics.com/documentation/script-attributes-image/#data-twic-src-focus) for details. | `String` | `10` | `false` |
97 | | `transition` | Whether or not to load images with a fade in effect. | `Boolean` | `true` | `false` |
98 | | `transitionDuration` | Duration of the transition effect. | `String` | `400ms` | `false` |
99 | | `transitionTimingFunction` | CSS timing function applied to the transition effect. | `String` | `ease` | `false` |
100 | | `transitionDelay` | Transition delay of the transition effect. | `String` | `0ms` | `false` |
101 | | `alt` | Alt attribute content | `String` | Image name without extention | `false` |
102 |
103 | ### Example
104 |
105 | ```vue
106 |
107 |
108 |
114 |
115 |
116 |
117 |
122 | ```
123 |
124 | ## Demo
125 |
126 | [](https://codesandbox.io/s/twicpics-vue-vdrbn?fontsize=14&hidenavigation=1&theme=dark)
127 |
128 | ## NuxtJS
129 |
130 | This library is also available as a [NuxtJS module](https://github.com/TwicPics/nuxt-twicpics).
131 |
132 | ## License
133 |
134 | [MIT License](./LICENSE)
135 |
136 | Copyright (c) TwicPics
137 |
138 |
139 | [npm-version-src]: https://img.shields.io/npm/v/@twicpics/vue/latest.svg
140 | [npm-version-href]: https://npmjs.com/package/@twicpics/vue
141 |
142 | [npm-downloads-src]: https://img.shields.io/npm/dt/@twicpics/vue.svg
143 | [npm-downloads-href]: https://npmjs.com/package/@twicpics/vue
144 |
145 | [license-src]: https://img.shields.io/npm/l/@twicpics/vue.svg
146 | [license-href]: https://npmjs.com/package/@twicpics/vue
147 |
--------------------------------------------------------------------------------
/dist/vuetwicpics.umd.min.js:
--------------------------------------------------------------------------------
1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vuetwicpics"]=e():t["vuetwicpics"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},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="",n(n.s="fb15")}({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,n){var r=n("fc6a"),o=n("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),c=n("fc6a"),a=n("c04e"),u=n("5135"),f=n("0cfb"),s=Object.getOwnPropertyDescriptor;e.f=r?s:function(t,e){if(t=c(t),e=a(e,!0),f)try{return s(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"0cb2":function(t,e,n){var r=n("7b0b"),o=Math.floor,i="".replace,c=/\$([$&'`]|\d\d?|<[^>]*>)/g,a=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,n,u,f,s){var l=n+t.length,p=u.length,d=a;return void 0!==f&&(f=r(f),d=c),i.call(s,d,(function(r,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":c=f[i.slice(1,-1)];break;default:var a=+i;if(0===a)return r;if(a>p){var s=o(a/10);return 0===s?r:s<=p?void 0===u[s-1]?i.charAt(1):u[s-1]+i.charAt(1):r}c=u[a-1]}return void 0===c?"":c}))}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"0d03":function(t,e,n){var r=n("6eeb"),o=Date.prototype,i="Invalid Date",c="toString",a=o[c],u=o.getTime;new Date(NaN)+""!=i&&r(o,c,(function(){var t=u.call(this);return t===t?a.call(this):i}))},1148:function(t,e,n){"use strict";var r=n("a691"),o=n("1d80");t.exports="".repeat||function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},1276:function(t,e,n){"use strict";var r=n("d784"),o=n("44e7"),i=n("825a"),c=n("1d80"),a=n("4840"),u=n("8aa5"),f=n("50c4"),s=n("14c3"),l=n("9263"),p=n("d039"),d=[].push,v=Math.min,h=4294967295,g=!p((function(){return!RegExp(h,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(c(this)),i=void 0===n?h:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!o(t))return e.call(r,t,i);var a,u,f,s=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=new RegExp(t.source,p+"g");while(a=l.call(g,r)){if(u=g.lastIndex,u>v&&(s.push(r.slice(v,a.index)),a.length>1&&a.index=i))break;g.lastIndex===a.index&&g.lastIndex++}return v===r.length?!f&&g.test("")||s.push(""):s.push(r.slice(v)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=c(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,o,n):r.call(String(o),e,n)},function(t,o){var c=n(r,t,this,o,r!==e);if(c.done)return c.value;var l=i(t),p=String(this),d=a(l,RegExp),b=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(g?"y":"g"),m=new d(g?l:"^(?:"+l.source+")",y),x=void 0===o?h:o>>>0;if(0===x)return[];if(0===p.length)return null===s(m,p)?[p]:[];var S=0,w=0,O=[];while(w=51||!r((function(){var e=[],n=e.constructor={};return n[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),c=n("6eeb"),a=n("ce4e"),u=n("e893"),f=n("94ca");t.exports=function(t,e){var n,s,l,p,d,v,h=t.target,g=t.global,b=t.stat;if(s=g?r:b?r[h]||a(h,{}):(r[h]||{}).prototype,s)for(l in e){if(d=e[l],t.noTargetGet?(v=o(s,l),p=v&&v.value):p=s[l],n=f(g?l:h+(b?".":"#")+l,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;u(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),c(s,l,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),o=n("825a"),i=n("d039"),c=n("ad6d"),a="toString",u=RegExp.prototype,f=u[a],s=i((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),l=f.name!=a;(s||l)&&r(RegExp.prototype,a,(function(){var t=o(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in u)?c.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},"277d":function(t,e,n){var r=n("23e7"),o=n("e8b5");r({target:"Array",stat:!0},{isArray:o})},"2a62":function(t,e,n){var r=n("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return r(e.call(t)).value}},"2d00":function(t,e,n){var r,o,i=n("da84"),c=n("342f"),a=i.process,u=a&&a.versions,f=u&&u.v8;f?(r=f.split("."),o=r[0]+r[1]):c&&(r=c.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),o=n("3f8c"),i=n("b622"),c=i("iterator");t.exports=function(t){if(void 0!=t)return t[c]||t["@@iterator"]||o[r(t)]}},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),c=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=c(e),a=r.length,u=0;while(a>u)o.f(t,n=r[u++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,o=n("69f3"),i=n("7dd0"),c="String Iterator",a=o.set,u=o.getterFor(c);i(String,"String",(function(t){a(this,{type:c,string:String(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"408a":function(t,e,n){var r=n("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9bf2"),c=r("unscopables"),a=Array.prototype;void 0==a[c]&&i.f(a,c,{configurable:!0,value:o(null)}),t.exports=function(t){a[c][t]=!0}},"44e7":function(t,e,n){var r=n("861d"),o=n("c6b6"),i=n("b622"),c=i("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[c])?!!e:"RegExp"==o(t))}},4840:function(t,e,n){var r=n("825a"),o=n("1c0b"),i=n("b622"),c=i("species");t.exports=function(t,e){var n,i=r(t).constructor;return void 0===i||void 0==(n=r(i)[c])?e:o(n)}},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),c=function(t){return function(e,n,c){var a,u=r(e),f=o(u.length),s=i(c,f);if(t&&n!=n){while(f>s)if(a=u[s++],a!=a)return!0}else for(;f>s;s++)if((t||s in u)&&u[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},"4df4":function(t,e,n){"use strict";var r=n("0366"),o=n("7b0b"),i=n("9bdd"),c=n("e95a"),a=n("50c4"),u=n("8418"),f=n("35a1");t.exports=function(t){var e,n,s,l,p,d,v=o(t),h="function"==typeof this?this:Array,g=arguments.length,b=g>1?arguments[1]:void 0,y=void 0!==b,m=f(v),x=0;if(y&&(b=r(b,g>2?arguments[2]:void 0,2)),void 0==m||h==Array&&c(m))for(e=a(v.length),n=new h(e);e>x;x++)d=y?b(v[x],x):v[x],u(n,x,d);else for(l=m.call(v),p=l.next,n=new h;!(s=p.call(l)).done;x++)d=y?i(l,b,[s.value,x],!0):s.value,u(n,x,d);return n.length=x,n}},"4fad":function(t,e,n){var r=n("23e7"),o=n("6f53").entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5319:function(t,e,n){"use strict";var r=n("d784"),o=n("825a"),i=n("50c4"),c=n("a691"),a=n("1d80"),u=n("8aa5"),f=n("0cb2"),s=n("14c3"),l=Math.max,p=Math.min,d=function(t){return void 0===t?t:String(t)};r("replace",2,(function(t,e,n,r){var v=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,h=r.REPLACE_KEEPS_$0,g=v?"$":"$0";return[function(n,r){var o=a(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!v&&h||"string"===typeof r&&-1===r.indexOf(g)){var a=n(e,t,this,r);if(a.done)return a.value}var b=o(t),y=String(this),m="function"===typeof r;m||(r=String(r));var x=b.global;if(x){var S=b.unicode;b.lastIndex=0}var w=[];while(1){var O=s(b,y);if(null===O)break;if(w.push(O),!x)break;var E=String(O[0]);""===E&&(b.lastIndex=u(y,i(b.lastIndex),S))}for(var A="",j=0,T=0;T=j&&(A+=y.slice(j,I)+F,j=I+_.length)}return A+y.slice(j)}]}))},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),c=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(c(t)),n=i.f;return n?e.concat(n(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),o=n("5899"),i="["+o+"]",c=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),u=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(c,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:u(1),end:u(2),trim:u(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5ede":function(t,e,n){"use strict";n("6a2c")},6547:function(t,e,n){var r=n("a691"),o=n("1d80"),i=function(t){return function(e,n){var i,c,a=String(o(e)),u=r(n),f=a.length;return u<0||u>=f?t?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===f||(c=a.charCodeAt(u+1))<56320||c>57343?t?a.charAt(u):i:t?a.slice(u,u+2):c-56320+(i-55296<<10)+65536)}};t.exports={codeAt:i(!1),charAt:i(!0)}},"65f0":function(t,e,n){var r=n("861d"),o=n("e8b5"),i=n("b622"),c=i("species");t.exports=function(t,e){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)?r(n)&&(n=n[c],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,o,i,c=n("7f9a"),a=n("da84"),u=n("861d"),f=n("9112"),s=n("5135"),l=n("c6cd"),p=n("f772"),d=n("d012"),v=a.WeakMap,h=function(t){return i(t)?o(t):r(t,{})},g=function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(c){var b=l.state||(l.state=new v),y=b.get,m=b.has,x=b.set;r=function(t,e){return e.facade=t,x.call(b,t,e),e},o=function(t){return y.call(b,t)||{}},i=function(t){return m.call(b,t)}}else{var S=p("state");d[S]=!0,r=function(t,e){return e.facade=t,f(t,S,e),e},o=function(t){return s(t,S)?t[S]:{}},i=function(t){return s(t,S)}}t.exports={set:r,get:o,has:i,enforce:h,getterFor:g}},"6a2c":function(t,e,n){},"6eeb":function(t,e,n){var r=n("da84"),o=n("9112"),i=n("5135"),c=n("ce4e"),a=n("8925"),u=n("69f3"),f=u.get,s=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,a){var u,f=!!a&&!!a.unsafe,p=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),u=s(n),u.source||(u.source=l.join("string"==typeof e?e:""))),t!==r?(f?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:c(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||a(this)}))},"6f53":function(t,e,n){var r=n("83ab"),o=n("df75"),i=n("fc6a"),c=n("d1e7").f,a=function(t){return function(e){var n,a=i(e),u=o(a),f=u.length,s=0,l=[];while(f>s)n=u[s++],r&&!c.call(a,n)||l.push(t?[n,a[n]]:a[n]);return l}};t.exports={entries:a(!0),values:a(!1)}},7156:function(t,e,n){var r=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var i,c;return o&&"function"==typeof(i=e.constructor)&&i!==n&&r(c=i.prototype)&&c!==n.prototype&&o(t,c),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),o=n("5135"),i=n("e538"),c=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||c(e,t,{value:i.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a82":function(t,e,n){var r=n("23e7"),o=n("83ab"),i=n("9bf2");r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:i.f})},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),c=n("7839"),a=n("d012"),u=n("1be4"),f=n("cc12"),s=n("f772"),l=">",p="<",d="prototype",v="script",h=s("IE_PROTO"),g=function(){},b=function(t){return p+v+l+t+p+"/"+v+l},y=function(t){t.write(b("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){var t,e=f("iframe"),n="java"+v+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(b("document.F=Object")),t.close(),t.F},x=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}x=r?y(r):m();var t=c.length;while(t--)delete x[d][c[t]];return x()};a[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[d]=o(t),n=new g,g[d]=null,n[h]=t):n=x(),void 0===e?n:i(n,e)}},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),o=n("9ed3"),i=n("e163"),c=n("d2bb"),a=n("d44e"),u=n("9112"),f=n("6eeb"),s=n("b622"),l=n("c430"),p=n("3f8c"),d=n("ae93"),v=d.IteratorPrototype,h=d.BUGGY_SAFARI_ITERATORS,g=s("iterator"),b="keys",y="values",m="entries",x=function(){return this};t.exports=function(t,e,n,s,d,S,w){o(n,e,s);var O,E,A,j=function(t){if(t===d&&R)return R;if(!h&&t in I)return I[t];switch(t){case b:return function(){return new n(this,t)};case y:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",_=!1,I=t.prototype,P=I[g]||I["@@iterator"]||d&&I[d],R=!h&&P||j(d),N="Array"==e&&I.entries||P;if(N&&(O=i(N.call(new t)),v!==Object.prototype&&O.next&&(l||i(O)===v||(c?c(O,v):"function"!=typeof O[g]&&u(O,g,x)),a(O,T,!0,!0),l&&(p[T]=x))),d==y&&P&&P.name!==y&&(_=!0,R=function(){return P.call(this)}),l&&!w||I[g]===R||u(I,g,R),p[e]=R,d)if(E={values:j(y),keys:S?R:j(b),entries:j(m)},w)for(A in E)(h||_||!(A in I))&&f(I,A,E[A]);else r({target:e,proto:!0,forced:h||_},E);return E}},"7e12":function(t,e,n){var r=n("da84"),o=n("58a8").trim,i=n("5899"),c=r.parseFloat,a=1/c(i+"-0")!==-1/0;t.exports=a?function(t){var e=o(String(t)),n=c(e);return 0===n&&"-"==e.charAt(0)?-0:n}:c},"7f9a":function(t,e,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var c=r(e);c in t?o.f(t,c,i(0,n)):t[c]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,a=i.exec(d.stack)||c.exec(d.stack),u=a&&a[1]||!1,f=a&&a[2]||!1,s=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");u===s&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(f-2)+"}[^<]*