├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── README.md ├── docs ├── app.js ├── build │ └── app.js ├── index.html └── webpack.config.js ├── package.json ├── src ├── PictureSharesheet.vue └── Sharesheet.vue ├── test └── index.js ├── webpack.base.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "development": { 4 | "presets": ["env"], 5 | "plugins": [ 6 | "add-module-exports" 7 | ] 8 | }, 9 | "production": { 10 | "presets": ["env", "minify"], 11 | "plugins": [ 12 | "add-module-exports" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain 2 | # consistent coding styles between different editors and IDEs. 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "airbnb", 4 | "env": { 5 | "mocha": true 6 | }, 7 | "rules": { 8 | "comma-dangle": ["error", "only-multiline"] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Compiled binary addons (http://nodejs.org/api/addons.html) 21 | build/Release 22 | 23 | # Dependency directories 24 | node_modules 25 | jspm_packages 26 | 27 | # Optional npm cache directory 28 | .npm 29 | 30 | # Optional REPL history 31 | .node_repl_history 32 | 33 | # Editors 34 | .idea 35 | 36 | # Lib 37 | lib 38 | 39 | # npm package lock 40 | package-lock.json 41 | yarn.lock 42 | 43 | others 44 | .DS_Store -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | *.log 2 | npm-debug.log* 3 | 4 | # Coverage directory used by tools like istanbul 5 | coverage 6 | .nyc_output 7 | 8 | # Dependency directories 9 | node_modules 10 | 11 | # npm package lock 12 | package-lock.json 13 | yarn.lock 14 | 15 | # project files 16 | src 17 | test 18 | examples 19 | CHANGELOG.md 20 | .travis.yml 21 | .editorconfig 22 | .eslintignore 23 | .eslintrc 24 | .babelrc 25 | .gitignore 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '8' 4 | - '6' 5 | script: 6 | - npm run test 7 | - npm run build 8 | branches: 9 | only: 10 | - master 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Dineshkumar Pandiyan 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Picture Sharesheet Compoenent 2 | ![image](https://thumbs.gfycat.com/KindSourHammerkop-size_restricted.gif) 3 | 4 | vue-picture-sharesheet provides an easy and beautiful sharesheet when hovering over images. 5 | Currently supported main features are: 6 | * sharing to Twitter/Facebook 7 | * copying the current URL to the Clipboard 8 | * Downloading the Image 9 | 10 | ## [Demo](https://onatcer.github.io/vue-picture-sharesheet/) 😻 11 | with cute cats 😻 12 | (The Download in the Demo will just download random cat images as the image changes with every request) 13 | 14 | ## Getting Started 15 | *(Vue CLI Usage recommended)* 16 | 17 | Install 18 | ```shell 19 | npm install vue-picture-sharesheet --save 20 | ``` 21 | 22 | Import locally 23 | ```javascript 24 | import PictureSharesheet from 'vue-picture-sharesheet'; 25 | 26 | export default { 27 | name: 'HelloWorld', 28 | components: { 29 | PictureSharesheet 30 | } 31 | } 32 | ``` 33 | 34 | OR import globally (f.e. in the Main.js) 35 | ```javascript 36 | import PictureSharesheet from 'vue-picture-sharesheet' 37 | Vue.component('picture-sharesheet',PictureSharesheet); 38 | ``` 39 | 40 | 41 | 42 | ## Properties 43 | ### Native image attributes 🛠 44 | - `src`: String : URL, Specifies the URL of an image 45 | - `alt`: String : text, Specifies an alternate text for an image 46 | - `height`: String : pixels/%, Specifies the height of an image 47 | - `width`: String : pixels/%, Specifies the width of an image 48 | - `ismap`: boolean : ismap, Specifies an image as a server-side image-map 49 | - `longdesc`: String : URL, Specifies a URL to a detailed description of an image 50 | - `usemap`: String : #mapname, Specifies an image as a client-side image-map 51 | - `crossorigin` : String: anonymous | use-credentials, Allow images from third-party sites that allow cross-origin access to be used with canvas 52 | 53 | ### Component attributes 🎨 54 | - `sheetcolor`: String : Color, Specifies the Background-color of the Sharesheet 55 | - `iconcolor`: String : Color, Specifies the Background-color of the Sharesheet 56 | - `position`: String : bottom | top | left| right, Position of the Sharesheet 57 | - `size`: String : pixels/%, height/width of the Sharesheet 58 | - `sharemessage`: String : Will be shared in addition to the link. Per Default Website Title. In Facebook Share Dialog as Quote. 59 | - `fixed`: Boolean : if set Sharesheet is visible all the time 60 | 61 | ## Examples 62 | 63 | Showing the Sharesheet all the time (not only while :hover) and set the background-color of the sharesheet to white and the icon color to black. 64 | ```javascript 65 | 66 | ``` 67 | 68 | Set the position of the sharesheet to top, the height of the Sharesheet to 100px and the message that will be shared via the Social Media Buttons to "YAY!" 69 | ```javascript 70 | 71 | ``` 72 | 73 | ## Commands 74 | - `npm start` - Starting a Server to run the demos/examples 75 | - `npm run-script demo` - Building the demos/examples in /docs 76 | 77 | 90 | ## Roadmap 91 | - [ ] Multiple Image Source (srcset .. ) 92 | - [ ] Mobile optimized 93 | - [ ] different overlay modes 94 | - [ ] custom icons 95 | 96 | 97 | -------------------------------------------------------------------------------- /docs/app.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import PictureSharesheet from '../src/PictureSharesheet.vue'; 3 | 4 | new Vue({ 5 | el: '#app', 6 | 7 | components: { 8 | PictureSharesheet, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /docs/build/app.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/build/",n(n.s=32)}([function(e,t,n){"use strict";n.r(t);let r={};var i={name:"fa-icon",props:{name:{type:String,validator:e=>!e||e in r||(console.warn(`Invalid prop: prop "name" is referring to an unregistered icon "${e}".`+"\nPlease make sure you have imported this icon before using it."),!1)},scale:[Number,String],spin:Boolean,inverse:Boolean,pulse:Boolean,flip:{validator:e=>"horizontal"===e||"vertical"===e},label:String},data:()=>({x:!1,y:!1,childrenWidth:0,childrenHeight:0,outerScale:1}),computed:{normalizedScale(){let e=this.scale;return e=void 0===e?1:Number(e),isNaN(e)||e<=0?(console.warn('Invalid prop: prop "scale" should be a number over 0.',this),this.outerScale):e*this.outerScale},klass(){return{"fa-icon":!0,"fa-spin":this.spin,"fa-flip-horizontal":"horizontal"===this.flip,"fa-flip-vertical":"vertical"===this.flip,"fa-inverse":this.inverse,"fa-pulse":this.pulse,[this.$options.name]:!0}},icon(){return this.name?r[this.name]:null},box(){return this.icon?`0 0 ${this.icon.width} ${this.icon.height}`:`0 0 ${this.width} ${this.height}`},ratio(){if(!this.icon)return 1;let{width:e,height:t}=this.icon;return Math.max(e,t)/16},width(){return this.childrenWidth||this.icon&&this.icon.width/this.ratio*this.normalizedScale||0},height(){return this.childrenHeight||this.icon&&this.icon.height/this.ratio*this.normalizedScale||0},style(){return 1!==this.normalizedScale&&{fontSize:this.normalizedScale+"em"}},raw(){if(!this.icon||!this.icon.raw)return null;let e=this.icon.raw,t={};return e=(e=e.replace(/\s(?:xml:)?id=(["']?)([^"')\s]+)\1/g,(e,n,r)=>{let i=`fa-${(o++).toString(16)}`;return t[r]=i,` id="${i}"`})).replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,(e,n,r,i)=>{let o=n||i;return o&&t[o]?`#${t[o]}`:e})}},mounted(){if(!this.name&&0===this.$children.length)return void console.warn('Invalid prop: prop "name" is required.');if(this.icon)return;let e=0,t=0;this.$children.forEach(n=>{n.outerScale=this.normalizedScale,e=Math.max(e,n.width),t=Math.max(t,n.height)}),this.childrenWidth=e,this.childrenHeight=t,this.$children.forEach(n=>{n.x=(e-n.width)/2,n.y=(t-n.height)/2})},register(e){for(let t in e){let n=e[t];n.paths||(n.paths=[]),n.d&&n.paths.push({d:n.d}),n.polygons||(n.polygons=[]),n.points&&n.polygons.push({points:n.points}),r[t]=n}},icons:r};let o=870711;var a=i,s=(n(25),n(1)),c=Object(s.a)(a,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{class:e.klass,style:e.style,attrs:{version:"1.1",role:e.label?"img":"presentation","aria-label":e.label,x:e.x,y:e.y,width:e.width,height:e.height,viewBox:e.box}},[e._t("default",[e.icon&&e.icon.paths?e._l(e.icon.paths,function(t,r){return n("path",e._b({key:"path-"+r},"path",t,!1))}):e._e(),e._v(" "),e.icon&&e.icon.polygons?e._l(e.icon.polygons,function(t,r){return n("polygon",e._b({key:"polygon-"+r},"polygon",t,!1))}):e._e(),e._v(" "),e.icon&&e.icon.raw?[n("g",{domProps:{innerHTML:e._s(e.raw)}})]:e._e()])],2)},[],!1,null,null,null);t.default=c.exports},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:l}}n.d(t,"a",function(){return r})},function(e,t,n){var r=n(15);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("1352d111",r,!0,{})},function(e,t,n){var r=n(17);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("1013ac1c",r,!0,{})},function(e,t,n){var r=n(24);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(9).default)("2a708f7e",r,!0,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(14));n(26),n(23),n(22),n(21);var i=a(n(0)),o=a(n(20));function a(e){return e&&e.__esModule?e:{default:e}}r.default.use(o.default),t.default={name:"sharesheet",props:{sheetcolor:String,iconcolor:String,sharemessage:String,size:{default:"55px",type:String},position:{default:"bottom",type:String}},components:{Icon:i.default},mounted:function(){},data:function(){return{showAlert:!1,icons:[{name:"facebook",icon:"facebook-square",scale:1.3},{name:"twitter",icon:"twitter",scale:1.3},{name:"copy",icon:"link",scale:1.2,flip:"horizontal"},{name:"download",icon:"arrow-circle-down",scale:1.3}]}},methods:{clickHandler:function(e){"facebook"===e?this.openFacebookWindow():"twitter"===e?this.openTwitterWindow():"copy"===e?this.copyClipboard():"download"===e&&this.$emit("downloadImage")},openFacebookWindow:function(){var e="https://www.facebook.com/sharer/sharer.php?u="+decodeURI(window.location.href)+(this.sharemessage?""e="+this.sharemessage:"");window.open(e,"_blank","toolbar=yes,scrollbars=yes,resizable=yes,top=200,left=200,width=600,height=400")},openTwitterWindow:function(){var e="https://twitter.com/home?status="+(this.sharemessage?this.sharemessage:document.title)+" - "+window.location.href;window.open(e,"_blank","toolbar=yes,scrollbars=yes,resizable=yes,top=200,left=200,width=600,height=400")},copyClipboard:function(){var e=this;this.$copyText(window.location.href).then(function(){e.showAlert=!0,setTimeout(function(){e.showAlert=!1},2e3)},function(e){alert("Can not copy"),console.log(e)})}},computed:{SharesheetAttriputes:function(){var e,t,n,r,i;return("left"===this.position||"right"===this.position)&&(t="100%",e=this.size,n="column",r="center",i="30px 0"),("bottom"===this.position||"top"===this.position)&&(t=this.size,e="100%",n="row",r="left",i="0 30px"),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({width:e,height:t,"flex-direction":n,"justify-content":r,padding:i},this.position,"0px")},IconsAttributes:function(){var e,t;return("left"===this.position||"right"===this.position)&&(e="0px",t="17px"),("bottom"===this.position||"top"===this.position)&&(e="17px",t="0px"),{"margin-right":e,"margin-bottom":t}}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t);var r=n(5),i=n.n(r);for(var o in r)"default"!==o&&function(e){n.d(t,e,function(){return r[e]})}(o);t.default=i.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(27));t.default={name:"picture-sharesheet",components:{Sharesheet:r.default},model:{prop:"model",event:"change"},data:function(){return{hovered:!1}},props:{src:String,alt:String,height:String,width:String,ismap:Boolean,longdesc:String,usemap:String,crossorigin:String,sheetcolor:String,iconcolor:String,position:String,size:String,sharemessage:String,fixed:Boolean},computed:{showSharesheet:function(){return!!this.fixed||this.hovered}},methods:{toDataURL:function(e,t,n){var r=new Image;r.crossOrigin="Anonymous",r.onload=function(){var e,r=document.createElement("CANVAS"),i=r.getContext("2d");r.height=this.naturalHeight,r.width=this.naturalWidth,i.drawImage(this,0,0),e=r.toDataURL(n),t(e)},r.src=e,(r.complete||void 0===r.complete)&&(r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",r.src=e)},download:function(){var e=document.createElement("a");this.toDataURL(this.src,function(t){e.setAttribute("href",t),e.setAttribute("download","download.jpg"),e.setAttribute("target","_blank"),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)},"image/jpeg")}},watch:{value:function(){}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n.n(r);for(var o in r)"default"!==o&&function(e){n.d(t,e,function(){return r[e]})}(o);t.default=i.a},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function _(e,t){return b.call(e,t)}function w(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var x=/-(\w)/g,k=w(function(e){return e.replace(x,function(e,t){return t?t.toUpperCase():""})}),$=w(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),C=/\B([A-Z])/g,A=w(function(e){return e.replace(C,"-$1").toLowerCase()});var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function T(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function O(e,t){for(var n in t)e[n]=t[n];return e}function E(e){for(var t={},n=0;n0,Z=G&&G.indexOf("edge/")>0,Q=(G&&G.indexOf("android"),G&&/iphone|ipad|ipod|ios/.test(G)||"ios"===K),ee=G&&/chrome\/\d+/.test(G)&&!Z,te={}.watch,ne=!1;if(J)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(e){}var ie=function(){return void 0===B&&(B=!J&&!W&&void 0!==t&&"server"===t.process.env.VUE_ENV),B},oe=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var se,ce="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys);se="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var le=j,ue=j,fe=j,de=j,pe="undefined"!=typeof console,ve=/(?:^|[-_])(\w)/g;le=function(e,t){var n=t?fe(t):"";q.warnHandler?q.warnHandler.call(null,e,t,n):pe&&!q.silent&&console.error("[Vue warn]: "+e+n)},ue=function(e,t){pe&&!q.silent&&console.warn("[Vue tip]: "+e+(t?fe(t):""))},de=function(e,t){if(e.$root===e)return"";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e||{},r=n.name||n._componentTag,i=n.__file;if(!r&&i){var o=i.match(/([^/\\]+)\.vue$/);r=o&&o[1]}return(r?"<"+function(e){return e.replace(ve,function(e){return e.toUpperCase()}).replace(/[-_]/g,"")}(r)+">":"")+(i&&!1!==t?" at "+i:"")};fe=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(t.length>0){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map(function(e,t){return""+(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),t>1&&(e+=e),t>>=1;return n}(" ",5+2*t))+(Array.isArray(e)?de(e[0])+"... ("+e[1]+" recursive calls)":de(e))}).join("\n")}return"\n\n(found in "+de(e)+")"};var he=0,me=function(){this.id=he++,this.subs=[]};me.prototype.addSub=function(e){this.subs.push(e)},me.prototype.removeSub=function(e){g(this.subs,e)},me.prototype.depend=function(){me.target&&me.target.addDep(this)},me.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!_(i,"default"))a=!1;else if(""===a||a===A(e)){var u=Ze(String,i.type);(u<0||c0&&(jt((l=e(l,(n||"")+"_"+c))[0])&&jt(f)&&(s[u]=ke(f.text+l[0].text),l.shift()),s.push.apply(s,l)):a(l)?jt(f)?s[u]=ke(f.text+l):""!==l&&s.push(ke(l)):jt(l)&&jt(f)?s[u]=ke(f.text+l.text):(o(t._isVList)&&i(l.tag)&&r(l.key)&&i(n)&&(l.key="__vlist"+n+"_"+c+"__"),s.push(l)));return s}(e):void 0}function jt(e){return i(e)&&i(e.text)&&function(e){return!1===e}(e.isComment)}function Mt(e,t){return(e.__esModule||ce&&"Module"===e[Symbol.toStringTag])&&(e=e.default),s(e)?t.extend(e):e}function It(e){return e.isComment&&e.asyncFactory}function Nt(e){if(Array.isArray(e))for(var t=0;tJt)){le("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=Kt.slice(),r=Wt.slice();Qt=Wt.length=Kt.length=0,Gt={},Yt={},Xt=Zt=!1,function(e){for(var t=0;tQt&&Wt[n].id>e.id;)n--;Wt.splice(n+1,0,e)}else Wt.push(e);Xt||(Xt=!0,pt(en))}}(this)},nn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Qe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},nn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},nn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var rn={enumerable:!0,configurable:!0,get:j,set:j};function on(e,t,n){rn.get=function(){return this[t][n]},rn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,rn)}function an(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&Oe(!1);var o=function(o){i.push(o);var a=We(o,t,n,e),s=A(o);(y(s)||q.isReservedAttr(s))&&le('"'+s+'" is a reserved attribute and cannot be used as component prop.',e),Ne(r,o,a,function(){e.$parent&&!Ut&&le("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+o+'"',e)}),o in e||on(e,"_props",o)};for(var a in t)o(a);Oe(!0)}(e,t.props),t.methods&&function(e,t){var n=e.$options.props;for(var r in t)null==t[r]&&le('Method "'+r+'" has an undefined value in the component definition. Did you reference the function correctly?',e),n&&_(n,r)&&le('Method "'+r+'" has already been defined as a prop.',e),r in e&&H(r)&&le('Method "'+r+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[r]=null==t[r]?j:S(t[r],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;u(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return Qe(e,t,"data()"),{}}finally{be()}}(t,e):t||{})||(t={},le("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,i=e.$options.methods,o=n.length;for(;o--;){var a=n[o];i&&_(i,a)&&le('Method "'+a+'" has already been defined as a data property.',e),r&&_(r,a)?le('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):H(a)||on(e,"_data",a)}Ie(t,!0)}(e):Ie(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;null==a&&le('Getter is missing for computed property "'+i+'".',e),r||(n[i]=new nn(e,a||j,j,sn)),i in e?i in e.$data?le('The computed property "'+i+'" is already defined in data.',e):e.$options.props&&i in e.$options.props&&le('The computed property "'+i+'" is already defined as a prop.',e):cn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function Pn(e){this instanceof Pn||le("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Fn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;o&&ze(o);var a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=Ve(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)on(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)cn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,R.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=O({},a.options),i[r]=a,a}}function Rn(e){return e&&(e.Ctor.options.name||e.tag)}function Dn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function qn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=Rn(a.componentOptions);s&&!t(s)&&Hn(n,o,r,i)}}}function Hn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,g(n,t)}!function(t){t.prototype._init=function(t){var n,r,i=this;i._uid=In++,q.performance&&st&&(n="vue-perf-start:"+i._uid,r="vue-perf-end:"+i._uid,st(n)),i._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r,n._parentElm=t._parentElm,n._refElm=t._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(i,t):i.$options=Ve(Nn(i.constructor),t||{},i),vt(i),i._self=i,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(i),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Ft(e,t)}(i),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=Rt(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Mn(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Mn(t,e,n,r,i,!0)};var o=r&&r.data;Ne(t,"$attrs",o&&o.attrs||e,function(){!Ut&&le("$attrs is readonly.",t)},!0),Ne(t,"$listeners",n._parentListeners||e,function(){!Ut&&le("$listeners is readonly.",t)},!0)}(i),Vt(i,"beforeCreate"),function(e){var t=fn(e.$options.inject,e);t&&(Oe(!1),Object.keys(t).forEach(function(n){Ne(e,n,t[n],function(){le('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "'+n+'"',e)})}),Oe(!0))}(i),an(i),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(i),Vt(i,"created"),q.performance&&st&&(i._name=de(i,!1),st(r),ct("vue "+i._name+" init",n,r)),i.$options.el&&i.$mount(i.$options.el)}}(Pn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};t.set=function(e){le("Avoid replacing instance root $data. Use nested data properties instead.",this)},n.set=function(){le("$props is readonly.",this)},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Le,e.prototype.$delete=Pe,e.prototype.$watch=function(e,t,n){if(u(t))return un(this,e,t,n);(n=n||{}).user=!0;var r=new nn(this,e,t,n);return n.immediate&&t.call(this,r.value),function(){r.teardown()}}}(Pn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){if(Array.isArray(e))for(var r=0,i=e.length;r1?T(r):r;for(var i=T(arguments,1),o=0,a=r.length;oparseInt(this.max)&&Hn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return q},set:function(){le("Do not replace the Vue.config object, set individual fields instead.")}};Object.defineProperty(e,"config",t),e.util={warn:le,extend:O,mergeOptions:Ve,defineReactive:Ne},e.set=Le,e.delete=Pe,e.nextTick=pt,e.options=Object.create(null),R.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,O(e.options.components,zn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=T(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ve(this.options,e),this}}(e),Fn(e),function(e){R.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&ze(e),"component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(Pn),Object.defineProperty(Pn.prototype,"$isServer",{get:ie}),Object.defineProperty(Pn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Pn,"FunctionalRenderContext",{value:$n}),Pn.version="2.5.16";var Bn=h("style,class"),Vn=h("input,textarea,option,select,progress"),Jn=function(e,t,n){return"value"===n&&Vn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Wn=h("contenteditable,draggable,spellcheck"),Kn=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Gn="http://www.w3.org/1999/xlink",Yn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Xn=function(e){return Yn(e)?e.slice(6,e.length):""},Zn=function(e){return null==e||!1===e};function Qn(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=er(r.data,t));for(;i(n=n.parent);)n&&n.data&&(t=er(t,n.data));return function(e,t){if(i(e)||i(t))return tr(e,nr(t));return""}(t.staticClass,t.class)}function er(e,t){return{staticClass:tr(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function tr(e,t){return e?t?e+" "+t:e:t||""}function nr(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r-1?Sr(e,t,n):Kn(t)?Zn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Wn(t)?e.setAttribute(t,Zn(n)||"false"===n?"false":"true"):Yn(t)?Zn(n)?e.removeAttributeNS(Gn,Xn(t)):e.setAttributeNS(Gn,t,n):Sr(e,t,n)}function Sr(e,t,n){if(Zn(n))e.removeAttribute(t);else{if(Y&&!X&&"TEXTAREA"===e.tagName&&"placeholder"===t&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var Tr={create:Cr,update:Cr};function Or(e,t){var n=t.elm,o=t.data,a=e.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Qn(t),c=n._transitionClasses;i(c)&&(s=tr(s,nr(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Er,jr,Mr,Ir,Nr,Lr,Pr,Fr={create:Or,update:Or},Rr=/[\w).+\-_$\]]/;function Dr(e){var t,n,r,i,o,a=!1,s=!1,c=!1,l=!1,u=0,f=0,d=0,p=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&Rr.test(h)||(l=!0)}}else void 0===i?(p=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(p,r).trim()),p=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==p&&m(),o)for(r=0;r-1?{exp:e.slice(0,Ir),key:'"'+e.slice(Ir+1)+'"'}:{exp:e,key:null};jr=e,Ir=Nr=Lr=0;for(;!Qr();)ei(Mr=Zr())?ni(Mr):91===Mr&&ti(Mr);return{exp:e.slice(0,Nr),key:e.slice(Nr+1,Lr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Zr(){return jr.charCodeAt(++Ir)}function Qr(){return Ir>=Er}function ei(e){return 34===e||39===e}function ti(e){var t=1;for(Nr=Ir;!Qr();)if(ei(e=Zr()))ni(e);else if(91===e&&t++,93===e&&t--,0===t){Lr=Ir;break}}function ni(e){for(var t=e;!Qr()&&(e=Zr())!==t;);}var ri,ii="__r",oi="__c";function ai(e,t,n,r,i){t=function(e){return e._withTask||(e._withTask=function(){lt=!0;var t=e.apply(null,arguments);return lt=!1,t})}(t),n&&(t=function(e,t,n){var r=ri;return function i(){null!==e.apply(null,arguments)&&si(t,i,n,r)}}(t,e,r)),ri.addEventListener(e,t,ne?{capture:r,passive:i}:r)}function si(e,t,n,r){(r||ri).removeEventListener(e,t._withTask||t,n)}function ci(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},o=e.data.on||{};ri=t.elm,function(e){if(i(e[ii])){var t=Y?"change":"input";e[t]=[].concat(e[ii],e[t]||[]),delete e[ii]}i(e[oi])&&(e.change=[].concat(e[oi],e.change||[]),delete e[oi])}(n),St(n,o,ai,si,t.context),ri=void 0}}var li={create:ci,update:ci};function ui(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,o,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in i(c.__ob__)&&(c=t.data.domProps=O({},c)),s)r(c[n])&&(a[n]="");for(n in c){if(o=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=o;var l=r(o)?"":String(o);fi(a,l)&&(a.value=l)}else a[n]=o}}}function fi(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return v(n)!==v(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var di={create:ui,update:ui},pi=w(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function vi(e){var t=hi(e.style);return e.staticStyle?O(e.staticStyle,t):t}function hi(e){return Array.isArray(e)?E(e):"string"==typeof e?pi(e):e}var mi,yi=/^--/,gi=/\s*!important$/,bi=function(e,t,n){if(yi.test(t))e.style.setProperty(t,n);else if(gi.test(n))e.style.setProperty(t,n.replace(gi,""),"important");else{var r=wi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Ci(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Ai(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&O(t,Si(e.name||"v")),O(t,e),t}return"string"==typeof e?Si(e):void 0}}var Si=w(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Ti=J&&!X,Oi="transition",Ei="animation",ji="transition",Mi="transitionend",Ii="animation",Ni="animationend";Ti&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ji="WebkitTransition",Mi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ii="WebkitAnimation",Ni="webkitAnimationEnd"));var Li=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Pi(e){Li(function(){Li(e)})}function Fi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),$i(e,t))}function Ri(e,t){e._transitionClasses&&g(e._transitionClasses,t),Ci(e,t)}function Di(e,t,n){var r=Hi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Oi?Mi:Ni,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=a&&l()};setTimeout(function(){c0&&(n=Oi,u=a,f=o.length):t===Ei?l>0&&(n=Ei,u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?Oi:Ei:null)?n===Oi?o.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:n===Oi&&qi.test(r[ji+"Property"])}}function Ui(e,t){for(;e.length explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&le(" explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function Wi(e){return"number"==typeof e&&!isNaN(e)}function Ki(e){if(r(e))return!1;var t=e.fns;return i(t)?Ki(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Gi(e,t){!0!==t.data.show&&Bi(t)}var Yi=function(e){var t,n,s={},c=e.modules,l=e.nodeOps;for(t=0;t - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context),e.elm=e.ns?l.createElementNS(e.ns,h):l.createElement(h,e),w(e),g(e,v,t),i(f)&&_(e,t),y(n,e.elm,r),f&&f.pre&&p--):o(e.isComment)?(e.elm=l.createComment(e.text),y(n,e.elm,r)):(e.elm=l.createTextNode(e.text),y(n,e.elm,r))}}function m(e,t){i(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,b(e)?(_(e,t),w(e)):(pr(e),t.push(e))}function y(e,t,n){i(e)&&(i(n)?n.parentNode===e&&l.insertBefore(e,t,n):l.appendChild(e,t))}function g(e,t,n){if(Array.isArray(t)){A(t);for(var r=0;rp?x(e,r(n[y+1])?null:n[y+1].elm,n,d,y,o):d>y&&$(0,t,f,p)}(c,d,p,n,a):i(p)?(i(e.text)&&l.setTextContent(c,""),x(c,null,p,0,p.length-1,n)):i(d)?$(0,d,0,d.length-1):i(e.text)&&l.setTextContent(c,""):e.text!==t.text&&l.setTextContent(c,t.text),i(f)&&i(u=f.hook)&&i(u=u.postpatch)&&u(e,t)}}}function O(e,t,n){if(o(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r, or missing . Bailing hydration and performing full client-side render.")}e=function(e){return new _e(l.tagName(e).toLowerCase(),{},[],void 0,e)}(e)}var h=e.elm,m=l.parentNode(h);if(v(t,d,h._leaveCb?null:m,l.nextSibling(h)),i(t.parent))for(var y=t.parent,g=b(t);y;){for(var _=0;_-1,a.selected!==o&&(a.selected=o);else if(N(to(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}else le('