From 28a93baeedad4d0e4b87ea913d5b1fa3c3652887 Mon Sep 17 00:00:00 2001 From: Adrian Gaudebert Date: Wed, 26 Jul 2017 16:09:33 +0200 Subject: [PATCH] Made GhettoBlastr. Created a simple web app to play various sounds. This is a vue.js app that loads a JSON file from the server and uses that to generate a sound board. Audio files are put into audio/. It takes most of it CSS from kaamelott-soundboard.2ec0b4.fr. --- .gitignore | 2 + css/main.css | 291 ++++++++++++++++++++++++++++++ css/normalize.css | 447 ++++++++++++++++++++++++++++++++++++++++++++++ css/style.css | 90 ++++++++++ img/play.svg | 4 + img/stop.svg | 4 + index.html | 61 +++++++ js/main.js | 66 +++++++ lib/vue.min.js | 6 + 9 files changed, 971 insertions(+) create mode 100644 .gitignore create mode 100644 css/main.css create mode 100644 css/normalize.css create mode 100644 css/style.css create mode 100644 img/play.svg create mode 100644 img/stop.svg create mode 100644 index.html create mode 100644 js/main.js create mode 100644 lib/vue.min.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f8bc5ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +source.json +audio/* diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..ef5430a --- /dev/null +++ b/css/main.css @@ -0,0 +1,291 @@ +/*! HTML5 Boilerplate v5.3.0 | MIT License | https://html5boilerplate.com/ */ + +/* + * What follows is the result of much research on cross-browser styling. + * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, + * Kroc Camen, and the H5BP dev community and team. + */ + +/* ========================================================================== + Base styles: opinionated defaults + ========================================================================== */ + +html { + color: #222; + font-size: 1em; + line-height: 1.4; +} + +/* + * Remove text-shadow in selection highlight: + * https://twitter.com/miketaylr/status/12228805301 + * + * Vendor-prefixed and regular ::selection selectors cannot be combined: + * https://stackoverflow.com/a/16982510/7133471 + * + * Customize the background color to match your design. + */ + +::-moz-selection { + background: #b3d4fc; + text-shadow: none; +} + +::selection { + background: #b3d4fc; + text-shadow: none; +} + +/* + * A better looking default horizontal rule + */ + +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0; +} + +/* + * Remove the gap between audio, canvas, iframes, + * images, videos and the bottom of their containers: + * https://github.com/h5bp/html5-boilerplate/issues/440 + */ + +audio, +canvas, +iframe, +img, +svg, +video { + vertical-align: middle; +} + +/* + * Remove default fieldset styles. + */ + +fieldset { + border: 0; + margin: 0; + padding: 0; +} + +/* + * Allow only vertical resizing of textareas. + */ + +textarea { + resize: vertical; +} + +/* ========================================================================== + Browser Upgrade Prompt + ========================================================================== */ + +.browserupgrade { + margin: 0.2em 0; + background: #ccc; + color: #000; + padding: 0.2em 0; +} + +/* ========================================================================== + Author's custom styles + ========================================================================== */ + + + + + + + + + + + + + + + + + +/* ========================================================================== + Helper classes + ========================================================================== */ + +/* + * Hide visually and from screen readers + */ + +.hidden { + display: none !important; +} + +/* + * Hide only visually, but have it available for screen readers: + * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility + * + * 1. For long content, line feeds are not interpreted as spaces and small width + * causes content to wrap 1 word per line: + * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe + */ + +.visuallyhidden { + border: 0; + clip: rect(0 0 0 0); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + white-space: nowrap; /* 1 */ +} + +/* + * Extends the .visuallyhidden class to allow the element + * to be focusable when navigated to via the keyboard: + * https://www.drupal.org/node/897638 + */ + +.visuallyhidden.focusable:active, +.visuallyhidden.focusable:focus { + clip: auto; + -webkit-clip-path: none; + clip-path: none; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; + white-space: inherit; +} + +/* + * Hide visually and from screen readers, but maintain layout + */ + +.invisible { + visibility: hidden; +} + +/* + * Clearfix: contain floats + * + * For modern browsers + * 1. The space content is one way to avoid an Opera bug when the + * `contenteditable` attribute is included anywhere else in the document. + * Otherwise it causes space to appear at the top and bottom of elements + * that receive the `clearfix` class. + * 2. The use of `table` rather than `block` is only necessary if using + * `:before` to contain the top-margins of child elements. + */ + +.clearfix:before, +.clearfix:after { + content: " "; /* 1 */ + display: table; /* 2 */ +} + +.clearfix:after { + clear: both; +} + +/* ========================================================================== + EXAMPLE Media Queries for Responsive Design. + These examples override the primary ('mobile first') styles. + Modify as content requires. + ========================================================================== */ + +@media only screen and (min-width: 35em) { + /* Style adjustments for viewports that meet the condition */ +} + +@media print, + (-webkit-min-device-pixel-ratio: 1.25), + (min-resolution: 1.25dppx), + (min-resolution: 120dpi) { + /* Style adjustments for high resolution devices */ +} + +/* ========================================================================== + Print styles. + Inlined to avoid the additional HTTP request: + http://www.phpied.com/delay-loading-your-print-css/ + ========================================================================== */ + +@media print { + *, + *:before, + *:after { + background: transparent !important; + color: #000 !important; /* Black prints faster: + http://www.sanbeiji.com/archives/953 */ + box-shadow: none !important; + text-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + /* + * Don't show links that are fragment identifiers, + * or use the `javascript:` pseudo protocol + */ + + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + + pre { + white-space: pre-wrap !important; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + /* + * Printing Tables: + * http://css-discuss.incutio.com/wiki/Printing_Tables + */ + + thead { + display: table-header-group; + } + + tr, + img { + page-break-inside: avoid; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } +} diff --git a/css/normalize.css b/css/normalize.css new file mode 100644 index 0000000..fa4e73d --- /dev/null +++ b/css/normalize.css @@ -0,0 +1,447 @@ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers (opinionated). + */ + +body { + margin: 0; +} + +/** + * Add the correct display in IE 9-. + */ + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + +figcaption, +figure, +main { /* 1 */ + display: block; +} + +/** + * Add the correct margin in IE 8. + */ + +figure { + margin: 1em 40px; +} + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + +a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ +} + +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + +b, +strong { + font-weight: inherit; +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font style in Android 4.3-. + */ + +dfn { + font-style: italic; +} + +/** + * Add the correct background and color in IE 9-. + */ + +mark { + background-color: #ff0; + color: #000; +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +audio, +video { + display: inline-block; +} + +/** + * Add the correct display in iOS 4-7. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Remove the border on images inside links in IE 10-. + */ + +img { + border-style: none; +} + +/** + * Hide the overflow in IE. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + +button, +html [type="button"], /* 1 */ +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Remove the default vertical scrollbar in IE. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + +details, /* 1 */ +menu { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Scripting + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +canvas { + display: inline-block; +} + +/** + * Add the correct display in IE. + */ + +template { + display: none; +} + +/* Hidden + ========================================================================== */ + +/** + * Add the correct display in IE 10-. + */ + +[hidden] { + display: none; +} diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..b46b71a --- /dev/null +++ b/css/style.css @@ -0,0 +1,90 @@ +* { + font-family: Helvetica Neue, Helvetica, sans-serif; + box-sizing: border-box; +} +html, body { + height: 100%; + margin: 0; + padding: 0; +} +html { + font-size: 16px; +} +body { + background: #3f3552; + color: #fefdfd; + font-size: 100%; + font-weight: 300; + line-height: 1.3; + /**/ + -webkit-font-smoothing: antialiased; +} + +header { + margin: 0.5em; + text-align: center; +} +header h1 { + font-size: 3em; +} +header h2 { + text-transform: capitalize; + color: #6f6f6f; +} + +button, button:hover, button:focus { + background-color: #CB4D59; + background-image: none; + border: 0; + border-bottom: 3px solid #8B121E; + border-radius: 0; + color: #FEFDFD; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: 400; + line-height: 1.42857; + outline: none; + padding: 5px 20px; + position: relative; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + -moz-user-select: none; + -webkit-appearance: none; +} +button.play, button.play:hover, button.play:focus { + background: #18AE90; + border-bottom: 3px solid #017F66; + padding: 10px 30px; +} +button.play:before { + content: ""; + background: url('../img/play.svg') no-repeat center center; + font-size: 1em; + height: 30px; + left: 0; + position: absolute; + top: 5px; + width: 30px; +} +button.play.playing:before { + background: url('../img/stop.svg') no-repeat center center; +} +button:active { + top:3px; + border-bottom: 0; +} + +.sounds ul { + list-style-type: none; +} +.sounds ul li { + display: inline-block; + height: 43px; + line-height: 43px; + margin: 1em; + overflow: hidden; + text-overflow: ellipsis; + position: relative; +} diff --git a/img/play.svg b/img/play.svg new file mode 100644 index 0000000..6d27f5e --- /dev/null +++ b/img/play.svg @@ -0,0 +1,4 @@ + + + + diff --git a/img/stop.svg b/img/stop.svg new file mode 100644 index 0000000..bb46176 --- /dev/null +++ b/img/stop.svg @@ -0,0 +1,4 @@ + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..6ad53e2 --- /dev/null +++ b/index.html @@ -0,0 +1,61 @@ + + + + + + Ghetto Blastr + + + + + + + + + + + + + +
+
+

Ghetto Blastr

+ +
+ +
+ Loading +
+ +
+
    + +
+
+
+ + + + + + + + diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..9b86f71 --- /dev/null +++ b/js/main.js @@ -0,0 +1,66 @@ +(function () { + +Vue.component('ghetto-sound', { + template: '', + props: { + asset: Object, + }, + data: function () { + return { + audio: null, + playing: false, + }; + }, + methods: { + click: function (event) { + if (this.playing) { + this.stop(); + } + else { + this.play(); + } + }, + play: function () { + // Make sure the actual audio element exists. + if (!this.audio) { + this.audio = new Audio('audio/' + this.asset.resource); + } + + // Emit an event so that other playing sounds can be stopped. + this.$emit('ghetto-playsound'); + + this.audio.load(); + this.audio.play(); + this.audio.onended = function () { + this.playing = false; + }.bind(this); + this.playing = true; + }, + stop: function () { + if (this.audio) { + this.audio.pause(); + this.playing = false; + } + }, + }, +}); + +GHETTO_SOURCE_REQUEST.then(function (source) { + var data = Object.assign({}, source, { ready: true }); + var app = new Vue({ + el: '#soundboard', + data: data, + methods: { + stopAllPlayingSounds: function () { + // Find all sounds currently playing and stop them. + this.$refs.sound.forEach(function (item) { + if (item.playing) { + item.stop(); + } + }); + }, + } + }); +}); + +})(); diff --git a/lib/vue.min.js b/lib/vue.min.js new file mode 100644 index 0000000..55568b3 --- /dev/null +++ b/lib/vue.min.js @@ -0,0 +1,6 @@ +/*! + * Vue.js v2.4.0 + * (c) 2014-2017 Evan You + * Released under the MIT License. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return void 0!==t&&null!==t}function n(t){return!0===t}function r(t){return!1===t}function i(t){return"string"==typeof t||"number"==typeof t}function o(t){return null!==t&&"object"==typeof t}function a(t){return"[object Object]"===di.call(t)}function s(t){return"[object RegExp]"===di.call(t)}function c(t){var e=parseFloat(t);return e>=0&&Math.floor(e)===e&&isFinite(t)}function u(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function l(t){var e=parseFloat(t);return isNaN(e)?t:e}function f(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}function d(t,e){return mi.call(t,e)}function v(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function h(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function m(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function y(t,e){for(var n in e)t[n]=e[n];return t}function g(t){for(var e={},n=0;nyo&&fo[n].id>t.id;)n--;fo.splice(n+1,0,t)}else fo.push(t);ho||(ho=!0,Wi(Ot))}}function Nt(t){bo.clear(),Lt(t,bo)}function Lt(t,e){var n,r,i=Array.isArray(t);if((i||o(t))&&Object.isExtensible(t)){if(t.__ob__){var a=t.__ob__.dep.id;if(e.has(a))return;e.add(a)}if(i)for(n=t.length;n--;)Lt(t[n],e);else for(n=(r=Object.keys(t)).length;n--;)Lt(t[r[n]],e)}}function It(t,e,n){$o.get=function(){return this[e][n]},$o.set=function(t){this[e][n]=t},Object.defineProperty(t,n,$o)}function Mt(t){t._watchers=[];var e=t.$options;e.props&&Dt(t,e.props),e.methods&&Ut(t,e.methods),e.data?Pt(t):N(t._data={},!0),e.computed&&Rt(t,e.computed),e.watch&&e.watch!==Hi&&Vt(t,e.watch)}function Dt(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[],o=!t.$parent;eo.shouldConvert=o;for(var a in e)!function(o){i.push(o);var a=J(o,e,n,t);L(r,o,a),o in t||It(t,"_props",o)}(a);eo.shouldConvert=!0}function Pt(t){var e=t.$options.data;a(e=t._data="function"==typeof e?Ft(e,t):e||{})||(e={});for(var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);i--;){var o=n[i];r&&d(r,o)||w(o)||It(t,"_data",o)}N(e,!0)}function Ft(t,e){try{return t.call(e)}catch(t){return k(t,e,"data()"),{}}}function Rt(t,e){var n=t._computedWatchers=Object.create(null);for(var r in e){var i=e[r],o="function"==typeof i?i:i.get;n[r]=new _o(t,o,_,Co),r in t||Ht(t,r,i)}}function Ht(t,e,n){"function"==typeof n?($o.get=Bt(e),$o.set=_):($o.get=n.get?!1!==n.cache?Bt(e):n.get:_,$o.set=n.set?n.set:_),Object.defineProperty(t,e,$o)}function Bt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Zi.target&&e.depend(),e.value}}function Ut(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?_:h(e[n],t)}function Vt(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}function _e(t){this._init(t)}function be(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=m(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function $e(t){t.mixin=function(t){return this.options=z(this.options,t),this}}function Ce(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=z(n.options,t),a.super=n,a.options.props&&we(a),a.options.computed&&xe(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Ai.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=y({},a.options),i[r]=a,a}}function we(t){var e=t.options.props;for(var n in e)It(t.prototype,"_props",n)}function xe(t){var e=t.options.computed;for(var n in e)Ht(t.prototype,n,e[n])}function Ae(t){Ai.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&a(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function ke(t){return t&&(t.Ctor.options.name||t.tag)}function Oe(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!s(t)&&t.test(e)}function Se(t,e,n){for(var r in t){var i=t[r];if(i){var o=ke(i.componentOptions);o&&!n(o)&&(i!==e&&Te(i),t[r]=null)}}}function Te(t){t&&t.componentInstance.$destroy()}function Ee(t){for(var n=t.data,r=t,i=t;e(i.componentInstance);)(i=i.componentInstance._vnode).data&&(n=je(i.data,n));for(;e(r=r.parent);)r.data&&(n=je(n,r.data));return Ne(n.staticClass,n.class)}function je(t,n){return{staticClass:Le(t.staticClass,n.staticClass),class:e(t.class)?[t.class,n.class]:n.class}}function Ne(t,n){return e(t)||e(n)?Le(t,Ie(n)):""}function Le(t,e){return t?e?t+" "+e:t:e||""}function Ie(t){return Array.isArray(t)?Me(t):o(t)?De(t):"string"==typeof t?t:""}function Me(t){for(var n,r="",i=0,o=t.length;i=0&&" "===(m=t.charAt(h));h--);m&&ca.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==v&&e(),a)for(i=0;i=Eo}function dn(t){return 34===t||39===t}function vn(t){var e=1;for(Io=Lo;!pn();)if(t=fn(),dn(t))hn(t);else if(91===t&&e++,93===t&&e--,0===e){Mo=Lo;break}}function hn(t){for(var e=t;!pn()&&(t=fn())!==e;);}function mn(t,e,n){var r=n&&n.number,i=an(t,"value")||"null",o=an(t,"true-value")||"true",a=an(t,"false-value")||"false";en(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),on(t,la,"var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+e+"=$$a.concat($$v))}else{$$i>-1&&("+e+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+un(e,"$$c")+"}",null,!0)}function yn(t,e,n){var r=n&&n.number,i=an(t,"value")||"null";en(t,"checked","_q("+e+","+(i=r?"_n("+i+")":i)+")"),on(t,la,un(e,i),null,!0)}function gn(t,e,n){var r="var $$selectedVal = "+('Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"})")+";";on(t,"change",r=r+" "+un(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),null,!0)}function _n(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?ua:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=un(e,l);c&&(f="if($event.target.composing)return;"+f),en(t,"value","("+e+")"),on(t,u,f,null,!0),(s||a)&&on(t,"blur","$forceUpdate()")}function bn(t){var n;e(t[ua])&&(t[n=Ii?"change":"input"]=[].concat(t[ua],t[n]||[]),delete t[ua]),e(t[la])&&(t[n=Ri?"click":"change"]=[].concat(t[la],t[n]||[]),delete t[la])}function $n(t,e,n,r,i){if(n){var o=e,a=Po;e=function(n){null!==(1===arguments.length?o(n):o.apply(null,arguments))&&Cn(t,e,r,a)}}Po.addEventListener(t,e,Bi?{capture:r,passive:i}:r)}function Cn(t,e,n,r){(r||Po).removeEventListener(t,e,n)}function wn(n,r){var i=e(r.componentOptions),o=i?n.data.nativeOn:n.data.on,a=i?r.data.nativeOn:r.data.on;t(o)&&t(a)||(a=a||{},o=o||{},Po=r.elm,bn(a),tt(a,o,$n,Cn,r.context))}function xn(n,r){if(!t(n.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};e(c.__ob__)&&(c=r.data.domProps=y({},c));for(i in s)t(c[i])&&(a[i]="");for(i in c)if(o=c[i],"textContent"!==i&&"innerHTML"!==i||(r.children&&(r.children.length=0),o!==s[i]))if("value"===i){a._value=o;var u=t(o)?"":String(o);An(a,r,u)&&(a.value=u)}else a[i]=o}}function An(t,e,n){return!t.composing&&("option"===e.tag||kn(t,n)||On(t,n))}function kn(t,e){return document.activeElement!==t&&t.value!==e}function On(t,n){var r=t.value,i=t._vModifiers;return e(i)&&i.number?l(r)!==l(n):e(i)&&i.trim?r.trim()!==n.trim():r!==n}function Sn(t){var e=Tn(t.style);return t.staticStyle?y(t.staticStyle,e):e}function Tn(t){return Array.isArray(t)?g(t):"string"==typeof t?da(t):t}function En(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode).data&&(n=Sn(i.data))&&y(r,n);(n=Sn(t.data))&&y(r,n);for(var o=t;o=o.parent;)o.data&&(n=Sn(o.data))&&y(r,n);return r}function jn(n,r){var i=r.data,o=n.data;if(!(t(i.staticStyle)&&t(i.style)&&t(o.staticStyle)&&t(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=Tn(r.data.style)||{};r.data.normalizedStyle=e(p.__ob__)?y({},p):p;var d=En(r,!0);for(s in f)t(d[s])&&ma(c,s,"");for(s in d)(a=d[s])!==f[s]&&ma(c,s,null==a?"":a)}}function Nn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ln(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function In(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&y(e,ba(t.name||"v")),y(e,t),e}return"string"==typeof t?ba(t):void 0}}function Mn(t){Sa(function(){Sa(t)})}function Dn(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Nn(t,e))}function Pn(t,e){t._transitionClasses&&p(t._transitionClasses,e),Ln(t,e)}function Fn(t,e,n){var r=Rn(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ca?Aa:Oa,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ca,l=a,f=o.length):e===wa?u>0&&(n=wa,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ca:wa:null)?n===Ca?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ca&&Ta.test(r[xa+"Property"])}}function Hn(t,e){for(;t.length1}function Jn(t,e){!0!==e.data.show&&Un(e)}function qn(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=t.options.length;s-1,a.selected!==o&&(a.selected=o);else if(b(Gn(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Wn(t,e){for(var n=0,r=e.length;na&&o.push(JSON.stringify(t.slice(a,i)));var s=Ye(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)e.end&&e.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,o,a=[],s=e.expectHTML,c=e.isUnaryTag||Ci,u=e.canBeLeftOpenTag||Ci,l=0;t;){if(i=t,o&&gs(o)){var f=0,p=o.toLowerCase(),d=_s[p]||(_s[p]=new RegExp("([\\s\\S]*?)(]*>)","i")),v=t.replace(d,function(t,n,r){return f=r.length,gs(p)||"noscript"===p||(n=n.replace(//g,"$1").replace(//g,"$1")),xs(p,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});l+=t.length-v.length,t=v,r(p,l-f,l)}else{xs(o,t)&&n(1);var h=t.indexOf("<");if(0===h){if(os.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(as.test(t)){var y=t.indexOf("]>");if(y>=0){n(y+2);continue}}var g=t.match(is);if(g){n(g[0].length);continue}var _=t.match(rs);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var e=t.match(es);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(ns))&&(o=t.match(Qa));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&Ja(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||!!i,f=t.attrs.length,p=new Array(f),d=0;d=0){for(w=t.slice(h);!(rs.test(w)||es.test(w)||os.test(w)||as.test(w)||(x=w.indexOf("<",1))<0);)h+=x,w=t.slice(h);C=t.substring(0,h),n(h)}h<0&&(C=t,t=""),e.chars&&C&&e.chars(C)}if(t===i){e.chars&&e.chars(t);break}}r()}function pr(t,e){function n(t){t.pre&&(s=!1),ds(t.tag)&&(c=!1)}cs=e.warn||Xe,ds=e.isPreTag||Ci,vs=e.mustUseProp||Ci,hs=e.getTagNamespace||Ci,ls=tn(e.modules,"transformNode"),fs=tn(e.modules,"preTransformNode"),ps=tn(e.modules,"postTransformNode"),us=e.delimiters;var r,i,o=[],a=!1!==e.preserveWhitespace,s=!1,c=!1;return fr(t,{warn:cs,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldKeepComment:e.comments,start:function(t,a,u){function l(t){}var f=i&&i.ns||hs(t);Ii&&"svg"===f&&(a=jr(a));var p={type:1,tag:t,attrsList:a,attrsMap:Sr(a),parent:i,children:[]};f&&(p.ns=f),Er(p)&&!Ki()&&(p.forbidden=!0);for(var d=0;d0,Di=Li&&Li.indexOf("edge/")>0,Pi=Li&&Li.indexOf("android")>0,Fi=Li&&/iphone|ipad|ipod|ios/.test(Li),Ri=Li&&/chrome\/\d+/.test(Li)&&!Di,Hi={}.watch,Bi=!1;if(Ni)try{var Ui={};Object.defineProperty(Ui,"passive",{get:function(){Bi=!0}}),window.addEventListener("test-passive",null,Ui)}catch(t){}var Vi,zi,Ki=function(){return void 0===Vi&&(Vi=!Ni&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),Vi},Ji=Ni&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,qi="undefined"!=typeof Symbol&&O(Symbol)&&"undefined"!=typeof Reflect&&O(Reflect.ownKeys),Wi=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e1?m(n):n;for(var r=m(arguments,1),i=0,o=n.length;i1&&(e[n[0].trim()]=n[1].trim())}}),e}),va=/^--/,ha=/\s*!important$/,ma=function(t,e,n){if(va.test(e))t.style.setProperty(e,n);else if(ha.test(n))t.style.setProperty(e,n.replace(ha,""),"important");else{var r=ga(e);if(Array.isArray(n))for(var i=0,o=n.length;id?g(n,t(i[m+1])?null:i[m+1].elm,i,p,m,o):p>m&&b(n,r,f,d)}function w(r,i,o,a){if(r!==i){var s=i.elm=r.elm;if(n(r.isAsyncPlaceholder))e(i.asyncFactory.resolved)?A(r.elm,i,o):i.isAsyncPlaceholder=!0;else if(n(i.isStatic)&&n(r.isStatic)&&i.key===r.key&&(n(i.isCloned)||n(i.isOnce)))i.componentInstance=r.componentInstance;else{var c,u=i.data;e(u)&&e(c=u.hook)&&e(c=c.prepatch)&&c(r,i);var l=r.children,f=i.children;if(e(u)&&h(i)){for(c=0;c-1?Qo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Qo[t]=/HTMLUnknownElement/.test(e.toString())},y(_e.options.directives,Na),y(_e.options.components,Da),_e.prototype.__patch__=Ni?Ea:_,_e.prototype.$mount=function(t,e){return t=t&&Ni?Fe(t):void 0,bt(this,t,e)},setTimeout(function(){Oi.devtools&&Ji&&Ji.emit("init",_e)},0);var Pa,Fa=!!Ni&&function(t,e){var n=document.createElement("div");return n.innerHTML='
',n.innerHTML.indexOf(e)>0}("\n"," "),Ra=/\{\{((?:.|\n)+?)\}\}/g,Ha=/[-.*+?^${}()|[\]\/\\]/g,Ba=v(function(t){var e=t[0].replace(Ha,"\\$&"),n=t[1].replace(Ha,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),Ua=[{staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=sn(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=an(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}},{staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=sn(t,"style");n&&(t.staticStyle=JSON.stringify(da(n)));var r=an(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}}],Va={model:function(t,e,n){Do=n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return cn(t,r,i),!1;if("select"===o)gn(t,r,i);else if("input"===o&&"checkbox"===a)mn(t,r,i);else if("input"===o&&"radio"===a)yn(t,r,i);else if("input"===o||"textarea"===o)_n(t,r,i);else if(!Oi.isReservedTag(o))return cn(t,r,i),!1;return!0},text:function(t,e){e.value&&en(t,"textContent","_s("+e.value+")")},html:function(t,e){e.value&&en(t,"innerHTML","_s("+e.value+")")}},za=f("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Ka=f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ja=f("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),qa={expectHTML:!0,modules:Ua,directives:Va,isPreTag:function(t){return"pre"===t},isUnaryTag:za,mustUseProp:Bo,canBeLeftOpenTag:Ka,isReservedTag:Yo,getTagNamespace:Pe,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Ua)},Wa={decode:function(t){return Pa=Pa||document.createElement("div"),Pa.innerHTML=t,Pa.textContent}},Ga=/([^\s"'<>/=]+)/,Za=/(?:=)/,Ya=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],Qa=new RegExp("^\\s*"+Ga.source+"(?:\\s*("+Za.source+")\\s*(?:"+Ya.join("|")+"))?"),Xa="[a-zA-Z_][\\w\\-\\.]*",ts="((?:"+Xa+"\\:)?"+Xa+")",es=new RegExp("^<"+ts),ns=/^\s*(\/?)>/,rs=new RegExp("^<\\/"+ts+"[^>]*>"),is=/^]+>/i,os=/^